// scrolling.js// the following items can be changed to alter the speeds and so on of the scrolling routinesvar autoscrollspeed=1;  // the number of pixels that the autoscroll moves byvar autoscrollrate=20;  // the number of milliseconds between moves (1000 milliseconds=1 second)var autotimer;// contains all the scrolling routines for the template systemvar thisisthefirst=true;var whichLayerIsTop=new Array();	function findHeight(objectID) {	f=document.getElementById(objectID);		if(f.offsetHeight)		return f.offsetHeight;	return 0;}function findWidth(objectID) {	f=document.getElementById(objectID);		if(f.offsetHeight)		return f.offsetHeight;	return 0;}function findTop(objectID) {	var domStyle = document.getElementById(objectID).style;	var dom = document.getElementById(objectID);	if (domStyle.top)		return domStyle.top;	if (domStyle.pixelTop)		return domStyle.pixelTop;	if (dom.offsetTop)		return dom.offsetTop;	return (0);}function autoScroll(){	clearTimeout(autotimer);	// cycle throught the autoscroll divs	// for each one, get the current position and the height	// also get the height of it's container	// move it, and then setTimeout!	if(autoscrollerlayers.length==0) // there isn't anything to scroll		return;  // and don't set a timeout!			if(thisisthefirst){		// set the top one to be 0		for(c=0;c<autoscrollerlayers.length;c++)			whichLayerIsTop[c]=0;					thisisthefirst=false;	}		for(c=0;c<autoscrollerlayers.length;c++){		name=autoscrollerlayers[c];				topMod="";		if(whichLayerIsTop[c]==1)			topMod="2";						iH=findHeight(name+"Div"+topMod);		iT=findTop(name+"Div"+topMod);		oH=findHeight(name+"Container");		iH=parseInt(iH);		iT=parseInt(iT);		oH=parseInt(oH);						if(iH>oH) // we need to scroll		{			if(iT+iH>0) // still showing				iT-=autoscrollspeed;			else{				// we need to loop it round!				// so make the top the height								//iT=oH; // start at the bottom again!				iT=iH;				whichLayerIsTop[c]= whichLayerIsTop[c]==0 ? 1 : 0; // change the layer over.			}		f=document.getElementById(name+"Div"+topMod).style;		f.top=iT;				// now move the other layer up.		topMod = topMod=="" ? "2" : "";		iT=findTop(name+"Div"+topMod);		iT=parseInt(iT);		iT-=autoscrollspeed;		f=document.getElementById(name+"Div"+topMod).style;		f.top=iT;		}	}	autotimer=setTimeout("autoScroll()",autoscrollrate);}var hidetimer=null;var scrolltimer=null;var stoptimer=null;var scrollAmount=3,scrollMax=8,scrollDir=-1;function scrollIt(d,n){	// rollover effect...
	modifier=d==-1 ? "up" : "down";		eval("document.images."+n+modifier+"arrowIMG.src=arrow"+modifier+"ov.src");		// get textTop...	textTop=findTop(n+"Div");	textTop=parseInt(textTop);		var oh=document.getElementById(n+"Container").offsetHeight;		clearTimeout(stoptimer);	if(d!=scrollDir && scrollDir>=0)scrollAmount=-scrollAmount;	scrollDir=d;	f=document.getElementById(n+"Div");		h=f.offsetHeight;	if(h<oh)return;		textTop=scrollDir==1 ? textTop-scrollAmount : textTop+scrollAmount;	if((textTop+h)<oh && h>oh)textTop=oh-h;	if(textTop>0)textTop=0;	f.style.top=textTop;	scrollAmount++;	if(scrollAmount>scrollMax)scrollAmount=scrollMax;	ll="scrolltimer=setTimeout(\"scrollIt("+d+",'"+n+"')\",60)";	eval(ll);}function stopScroll(n){	modifier="up";	eval("document.images."+n+modifier+"arrowIMG.src=arrow"+modifier+".src");	modifier="down";	eval("document.images."+n+modifier+"arrowIMG.src=arrow"+modifier+".src");	textTop=findTop(n+"Div");	textTop=parseInt(textTop);			var oh=document.getElementById(n+"Container").offsetHeight;	clearTimeout(scrolltimer);	f=document.getElementById(n+"Div");	h=f.offsetHeight;		if(h<oh)		return;			if(scrollAmount!=0)scrollAmount=scrollAmount>0 ? scrollAmount-1 : scrollAmount+1;	if(scrollAmount!=0)	{				textTop=scrollDir>0 ? textTop-scrollAmount : textTop+scrollAmount;		if((textTop+h)<oh && h>oh)textTop=oh-h;		if(textTop>0)textTop=0;		f.style.top=textTop;		ll="stoptimer=setTimeout(\"stopScroll('"+n+"')\",60)";		eval(ll);	}	else		scrollDir=-1;}