
var intervalId;
var clip_height=0;
var content=new Array(3);
content[0]='Fine Art Prints<BR>';
content[1]='Isle of Skye<BR>';
content[2]='West Lothian<BR>';
content[3]='';
//Count the number of phrases
no_of_phrases=0;
if(content[0]) no_of_phrases++;
if(content[1]) no_of_phrases++;
if(content[2]) no_of_phrases++;
if(content[3]) no_of_phrases++;
content[0]='<font color="#66cc00" face="arial, helvetica, sans-serif">Fine Art Prints<BR></font>';
content[1]='<font color="#66cc00" face="arial, helvetica, sans-serif">Isle of Skye<BR></font>';
content[2]='<font color="#66cc00" face="arial, helvetica, sans-serif">West Lothian<BR></font>';
content[3]='<font color="#66cc00" face="arial, helvetica, sans-serif"></font>';

var div_name=new Array(3);
div_name[0]="scroll_1";
div_name[1]="scroll_2";
div_name[2]="scroll_3";
div_name[3]="scroll_4";
var name=div_name[0];
var counter=0;
var limit=no_of_phrases-1;//no of contents-1
var scroll_limit=0;//pixels from top of container
var scroll_by_amount=1;
function wait(){
	intervalId=setTimeout("set_up_scroll()",7000)
}
function set_up_scroll(){
	if (version < 4) return;
	if (counter>limit) {
	counter=0;
	shift_to("scroll_1",0,-scroll_limit);
	shift_to("scroll_2",0,-scroll_limit);
	shift_to("scroll_3",0,-scroll_limit);
	shift_to("scroll_4",0,-scroll_limit);
	}
	clip_height=0;
	hide(name);
	name=div_name[counter];
	container_width=200;//check style sheet container width!
	container_height=100;//check style sheet container height!
	hide(name);
	shift_to(name,0,container_height);
	show(name);
	scroll(name);
	counter++;

}
function scroll(name){
	shift_by(name,0,-scroll_by_amount);
	clip_height+=scroll_by_amount;
	set_clip(name,0,200,clip_height,0);
	the_top=get_top(name);
	the_left=get_left(name);
	if (the_top > scroll_limit){
		intervalId=setTimeout("scroll(name)",1);
	} else {
		clip_height=0;
		clearTimeout(intervalId);
		wait();
	}
}
