

function checkVer(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.isie=(this.ie5 || this.ie4)?1:0;
	this.isns=(this.ns5 || this.ns4)?1:0;
	this.ie=(document.all)?1:0;
	this.ns=(document.layers)?1:0;
	this.ns6=(document.getElementById)?1:0;
	return this
}
bv=new checkVer();

featureFocus=0;
menuSlideAcc=0;
menuSlideX=0;
featureSlideX=165;
slideInFlag=0;
menuX=0;

function move()
{
centerIt();
preloadImages();

}



function centerIt()
{
	if (bv.ie||((bv.ns||bv.ns6)&&(winH<500)))
	{
	if (bv.ie) winW = winW - 18;
	if (bv.ns||bv.ns) winW = winW - 15;
	}
	x_offset = (winW/2)-(760/2);
	y_offset = 50;
	if (y_offset<50) y_offset=50;
	if (x_offset<0) x_offset=0;
	moveTo('redArea',x_offset,y_offset,'');	
	toggleLayer('redArea','show','');
}



function moveTo(target,x,y,nest)
{
		if (bv.ie)
			{
			document.all[target].style.left=x+"px";
			document.all[target].style.top=y+"px";
			}
		if (bv.ns)
			{
			(nest=='')?document.eval(target).left=x:eval(nest).eval(target).left=x;
			(nest=='')?document.eval(target).top=y:eval(nest).eval(target).top=y;
			}
		if (bv.ns6)
			{
			document.getElementById(target).style.left=x+"px";
			document.getElementById(target).style.top=y+"px";
			}
}



function toggleLayer(target,value,nest)
{
		if (bv.ie)
			{
			if (value=="show") value="visible";
			if (value=="hide") value="hidden";
			document.all[target].style.visibility=value;
			}
		if (bv.ns)
			{			
			(nest=='')?document.eval(target).visibility=value:eval(nest).eval(target).visibility=value;
			}
		if (bv.ns6)
			{
			if (value=="show") value="visible";
			if (value=="hide") value="hidden";
			document.getElementById(target).style.visibility=value;
			}
}




var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		
	}
}




function scrollLoop()
{
	if (featureFocus==0)
		{
		featureSlideX--;

		
		}
		else
		{
		distance = (featureSlideX-(640-(featureFocus*484)));
        distance = distance + (featureFocus*30.1); 
		featureSlideX = (featureSlideX - distance/10);
		
		}
		if(Math.round(featureSlideX)<-5665) featureSlideX = featureSlideX+5918;

		if (bv.ie)
			{
			document.all.ZXL.style.left=Math.round(featureSlideX)+"px";
			}
		else if (bv.ns)
			{
			document.redArea.document.ZXLAll.document.eval('ZXL').left=Math.round(featureSlideX);
			}
		else if (bv.ns6)
			{
			document.getElementById('ZXL').style.left=Math.round(featureSlideX)+"px";
			}
	
	
	
	if (slideInFlag==1)
	{
	getMenuWidth();

	menuX = menuX-0;
	moveTo('redMen',menuX,0,'document.redArea.document.redMenuViewArea.document');
	
	if (menuX<0-halfwit) slideInFlag=0;
	menuSlideX=menuX;
	}
	else handleMenuScroll();	
	
	
	
	

scrollTimer=setTimeout('scrollLoop()',50);
}


function changeImage(layer,imgName,imgSrc) {
	if (document.images && (preloadFlag == true)) {
		

	}
}



function handleMenuScroll()
{
	menuSlideX=menuSlideX+menuSlideAcc;
		getMenuWidth();
			
		if (menuSlideX>0) 
		{
		menuSlideX = menuSlideX - halfwit;
		}
		else if (menuSlideX<-halfwit) 
		{
		menuSlideX = menuSlideX + halfwit;
		}
	
	if (bv.ie)
		{
		document.all.redMen.style.left=menuSlideX+"px";
		}
	else if (bv.ns)
		{
		document.redArea.document.redMenuViewArea.document.eval('redMen').left=menuSlideX;
		}
	else if (bv.ns6)
		{
		document.getElementById('redMen').style.left=menuSlideX+"px";
		}


}


function getMenuWidth()
{
		if (bv.ie)
			{
			halfwit=document.all.redMen.clientWidth/2
			
			}
		if (bv.ns)
			{
			halfwit=document.redArea.document.redMenuViewArea.document.redMen.clip.width/2
			}
		if (bv.ns6)
			{
				halfwit=document.getElementById("redMen").clientWidth/2
			}
}





function resetSlide()
{
if (slideInFlag==1)
{
slideInFlag=0;
menuSlideX=menuX;
}
}


function ZX(id)
{
buffer=featureFocus;

featureFocus=id;
}


function setScroll(speed)
{
menuSlideAcc=speed;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}