// this function traps the co ordinates of the top nav rows
function trap()
{
	if (document.all)
	{
	document.all.toprowtext.onmousemove=displaytop;
	document.all.bottrowtext.onmousemove=displaybott;
	}
	else if(document.layers) 
	{
	document.toprowtext.captureEvents(Event.MOUSEMOVE);
	document.toprowtext.onmousemove=displaytop;
	document.bottrowtext.captureEvents(Event.MOUSEMOVE);
	document.bottrowtext.onmousemove=displaybott;
	}
}
// this function controls the movement of the glow of the top nav row
function displaytop(e)
{
var xpos
var ypos
	if (document.all)
	{
	document.all.glowbott.style.visibility="hidden";
	xpos=event.x
	ypos=event.y
//	window.status=(xpos+" : "+ypos);//for debugging--- will display the coordinates in the status bar
	if (xpos <= 365)//check if the x position of the glow is less than 365px
	{
	document.all.glowtop.style.visibility="visible";
	document.all.glowtop.style.left=310;
	}
	else if ( xpos >= 700 )//check if the x position of the glow is less than 700px
	{
	document.all.glowtop.style.visibility="visible";
	document.all.glowtop.style.left=645;
	}
	else{
	document.all.glowtop.style.visibility="visible";
	document.all.glowtop.style.left=xpos-60;
	}
	}
	
	else if (document.layers)
	{
	document.glowbott.visibility = "hidden";
	xpos=e.pageX
	ypos=e.pageY
//	status=(xpos+" : "+ypos);
	if (xpos <= 365)
	{
	document.glowtop.visibility="visible";
	document.glowtop.left=310;
	}
	else if ( xpos >= 700 )
	{
	document.glowtop.visibility="visible";
	document.glowtop.left=645;
	}
	else{
	document.glowtop.visibility="visible";
	document.glowtop.left=xpos-60;
	}
	return true
	}
}

// this function controls the movement of the glow of the bottom nav row

function displaybott(e)
{
var xpos
var ypos
	if (document.all)
	{
	document.all.glowtop.style.visibility="hidden";
	xpos=event.x
	ypos=event.y
//	window.status=(xpos+" : "+ypos);
		if (xpos <= 440)
		{
		document.all.glowbott.style.visibility="visible";
		document.all.glowbott.style.left=380;
		}else if ( xpos >= 700 )
			{
			document.all.glowbott.style.visibility="visible";
			document.all.glowbott.style.left=645;
			}
		else
		{
		document.all.glowbott.style.visibility="visible";
		document.all.glowbott.style.left=xpos-60;	
		}
	}
	else if (document.layers)
	{
	document.glowtop.visibility = "hidden";
	xpos=e.pageX
	ypos=e.pageY
//		status=(xpos+" : "+ypos);
		if (xpos <= 440)
		{
		document.glowbott.visibility="visible";
		document.glowbott.left=380;
		}else if ( xpos >= 700 )
			{
			document.glowbott.visibility="visible";
			document.glowbott.left=645;
			}
		else
		{
		document.glowbott.visibility="visible";
		document.glowbott.left=xpos-60;	}
		}
	
return true
	}
	

//*******this function is for the cart display********//
var mytimer, mystatus=0;
function cartdisp(what,from)
{
if (what == "show")
{
	if (document.all)
	{
	document.all.quickcart.style.visibility="visible";
	}
	else if(document.layers)
	{
	document.quickcart.visibility="visible";
	if(from == "2")
	{
	mystatus ++;
	if(mystatus == 6)
	{
		clearTimeout(mytimer);
		mystatus=0;
		cartdisp('hide','2');
	}
	else
	{
		mytimer = setTimeout("cartdisp('show','2')",500);
	}
	}
	else
	{
		clearTimeout(mytimer);
		mystatus=0;
	}
	}
}
else if (what == "hide")
{
	if (document.all)
	{
	document.all.quickcart.style.visibility="hidden";
	}
	else if(document.layers)
	{
	document.quickcart.visibility="hidden";
	}
}
}

//********these functions mentioned below are used for the accinfo page*******


var currlayer,currlayertop,browser
var prevlayer=""
var hideprevlayer
var ypos
if (navigator.appName == "Netscape")
browser="NS";
else
browser="IE";
function showmenu(whichlayer,evt)
{
if (browser=="IE")
	{
	if(navigator.appVersion.indexOf("5") > -1)
		ypos=event.y + bbody.scrollTop
	else
		ypos=event.y;
		if (prevlayer != "")
		{
		hideprevlayer=eval("document.all."+prevlayer+".style.visibility='hidden'")
		currlayer=eval("document.all."+whichlayer+".style.top="+ypos)
		currlayertop=eval("document.all."+whichlayer+".style.visibility='visible'")
		}
		else
		{
		currlayer=eval("document.all."+whichlayer+".style.top="+ypos)
		currlayertop=eval("document.all."+whichlayer+".style.visibility='visible'")
		}
	}
	else if(browser=="NS")
	{
		ypos=evt.pageY
		if (prevlayer != "")
		{
		hideprevlayer=eval("document."+prevlayer+".visibility='hidden'")
		currlayer=eval("document."+whichlayer+".top="+ypos)
		currlayertop=eval("document."+whichlayer+".visibility='visible'")
		}
		else
		{
		currlayer=eval("document."+whichlayer+".top="+ypos)
		currlayertop=eval("document."+whichlayer+".visibility='visible'")
		}
	}
prevlayer=whichlayer

}

function hidemenu(whichlayer)
{
var layerhide
	if (browser=="IE")
	{
	layerhide=eval("document.all."+whichlayer+".style.visibility='hidden'")
	}
	else if (browser=="NS")
	{
	layerhide=eval("document."+whichlayer+".visibility='hidden'")
	}
}

//**********this function is for the new user page

var browser
function show()
{
//layername=whichlayer
if (navigator.appName == "Netscape")
browser="NS";
else
browser="IE";
//alert(layername)
if(browser == "IE")
	{
	xpos=620
	ypos=130
//	alert(xpos+","+ypos)
 	document.all.helpindex.style.visibility="visible"
	document.all.helpindex.style.left=xpos;
	document.all.helpindex.style.top=ypos;
	}
	else if(browser == "NS")
	{
	xpos=620
	ypos=130

	document.helpindex.visibility = "visible"
	document.helpindex.left=xpos;
	document.helpindex.top=ypos;
	}

}
function hidethis()
{
 		if(browser == "IE")
		{	
		document.all.helpindex.style.visibility="hidden"
		}
		else if(browser == "NS")
		{
		document.helpindex.visibility="hidden"
		}


}
// ******* this function is for checkout page **********

var browser
function showchkoptions(evt)
{
//layername=whichlayer
if (navigator.appName == "Netscape")
browser="NS";
else
browser="IE";
//alert(layername)
if(browser == "IE")
	{
	if(navigator.appVersion.indexOf("5") > -1)
		ypos=event.y + bbody.scrollTop
	else
		ypos=event.y;

	xpos=600
	//ypos=290
//	alert(xpos+","+ypos)
 	document.all.options.style.visibility="visible"
	document.all.options.style.left=xpos;
	document.all.options.style.top=ypos;
	}
	else if(browser == "NS")
	{
	ypos=evt.pageY
	xpos=600
	//ypos=290

	document.options.visibility = "visible"
	document.options.left=xpos;
	document.options.top=ypos;
	}

}
function hidechkoptions()
{
 		if(browser == "IE")
		{	
		document.all.options.style.visibility="hidden"
		}
		else if(browser == "NS")
		{
		document.options.visibility="hidden"
		}


}
