currentBody = null;
timeOn = null;

if(is.ns4)
{
	origWidth = innerWidth;
	origHeight = innerHeight;
	
	doc = "document";
	sty = "";
}

if(is.ie4)
{
	doc = "document.all";
	sty = ".style";
}

if(document.images)
{
	var featured1		= new Image();
	featured1.src		= "/products/images/nav/nav_02.jpg";
	var featured2		= new Image();
	featured2.src		= "/products/images/nav/nav_02-over.jpg";
	
	var windows1		= new Image();
	windows1.src		= "/products/images/nav/nav_03.jpg";
	var windows2		= new Image();
	windows2.src		= "/products/images/nav/nav_03-over.jpg";

	var playstation21	= new Image();
	playstation21.src	= "/products/images/nav/nav_04.jpg";
	var playstation22	= new Image();
	playstation22.src	= "/products/images/nav/nav_04-over.jpg";

	var xbox1	= new Image();
	xbox1.src	= "/products/images/nav/nav_05.jpg";
	var xbox2	= new Image();
	xbox2.src	= "/products/images/nav/nav_05-over.jpg";

	var gamecube1	= new Image();
	gamecube1.src	= "/products/images/nav/nav_06.jpg";
	var gamecube2	= new Image();
	gamecube2.src	= "/products/images/nav/nav_06-over.jpg";

	var gameboy1		= new Image();
	gameboy1.src		= "/products/images/nav/nav_08.jpg";
	var gameboy2		= new Image();
	gameboy2.src		= "/products/images/nav/nav_08-over.jpg";
	
	var other1		= new Image();
	other1.src		= "/products/images/nav/nav_09.jpg";
	var other2		= new Image();
	other2.src		= "/products/images/nav/nav_09-over.jpg";
		
	var mac1		= new Image();
	mac1.src		= "/products/images/nav/nav_07.jpg";
	var mac2		= new Image();
	mac2.src		= "/products/images/nav/nav_07-over.jpg";

}


function highlight(img)
{
	document[img].src = eval(img + "2.src");
	showBody(img);
}

function unhighlight(img, imgNo)
{
	document[img].src = eval(img + "1.src");
}

function highlightClassics(img)
{
	document[img].src = eval(img + "2.src");
}

function unhighlightClassics(img)
{
	document[img].src = eval(img + "1.src");
}

function showBody(nav) {

	if(currentBody != null)
	{
		myTemp = eval(doc + '["' + currentBody + '"]' + sty);
		myTemp.visibility = "hidden";
	}
	
	currentBody = nav + "Nav";
	myTemp = eval(doc + '["' + currentBody + '"]' + sty);
	myTemp.visibility = "visible";
}

function hideBody(nav)
{
	if(currentBody != null)
	{
		myTemp2 = eval(doc + '["' + currentBody + '"]' + sty);
		myTemp2.visibility = "hidden";
	}
}

function startTimer()
{
	timeOn = setTimeout("hideBody()",180);
}

function stopTimer()
{
	clearTimeout(timeOn);
}



function handleResize()
{
	if(is.ns4)
	{
		if (innerWidth != origWidth || innerHeight != origHeight)
	 	{
	 		origWidth = innerWidth;
	 		origHeight = innerHeight;
	 		location.reload();
	 	}
	}
	
	if(is.ie4)
		setMenus();
}


function setMenus()
{

	if(is.ie4)
		bodyCenter	= (document.body.clientWidth /2);
	
	if(is.ns4)
		bodyCenter	= (window.innerWidth/2);
	
		windowPos	= bodyCenter - 301;
		ps2Pos		= bodyCenter - 191;
		xboxPos		= bodyCenter - 68;
		gamecubePos	= bodyCenter - (-4);
		macPos		= bodyCenter -(-107);
		gameboyPos		= bodyCenter -(-152);
		otherPos	= bodyCenter - (-293);
		
	if(is.ie4 )
	{
		if(windowPos < 102)
			windowPos = 101;
			
		if(ps2Pos < 205)
			ps2Pos = 204;

		if(xboxPos < 269)
			xboxPos = 268;

		if(gamecubePos < 370)
			gamecubePos = 369;			
			
		if(macPos < 427)
			macPos = 428;

		if(gameboyPos < 557)
			gameboyPos = 556;
			
		if(otherPos < 671)
			otherPos = 670;
			
		document.all.windowsNav.style.left = windowPos;
		document.all.playstation2Nav.style.left = ps2Pos;
		document.all.xboxNav.style.left = xboxPos;
		document.all.gamecubeNav.style.left = gamecubePos;
		document.all.otherNav.style.left = otherPos;
		document.all.gameboyNav.style.left = gameboyPos;
		document.all.macNav.style.left = macPos;
	}
	
	if(is.ns4)
	{
		TOP	= 57;
		
		if(windowPos < 113)
			windowPos = 112;
			
		if(ps2Pos < 222)
			ps2Pos = 221;

		if(xboxPos < 290)
			xboxPos = 289;

		if(gamecubePos < 380)
			gamecubePos = 379;
						
		if(macPos < 445)
			macPos = 444;

		if(gameboyPos < 561)
			gameboyPos = 560;
			
		if(otherPos < 675)
			otherPos = 674;
		
		document.windowsNav.moveTo(windowPos-10,TOP);
		document.playstation2Nav.moveTo(ps2Pos-10,TOP);
		document.xboxNav.moveTo(xboxPos-10,TOP);
		document.gamecubeNav.moveTo(gamecubePos-10,TOP);
		document.otherNav.moveTo(otherPos-10,TOP);
		document.gameboyNav.moveTo(gameboyPos-10,TOP);
		document.macNav.moveTo(macPos-10,TOP);
	}
}


