
// DROP-DOWN NAVIGATION JAVASCRIPT IS HERE
// image objects for global nav

companyOn=new Image;
companyOn.src="start/glonav_ci_on_arrow.gif";
companyOff=new Image;
companyOff.src="start/glonav_ci_on_arrow.gif";

productsOn=new Image;
productsOn.src="start/glonav_ps_on_arrow.gif";
productsOff=new Image;
productsOff.src="start/glonav_ps_on_arrow.gif";

customerOn=new Image;
customerOn.src="start/glonav_cs_on_arrow.gif";
customerOff=new Image;
customerOff.src="start/glonav_cs_on_arrow.gif";

newsOn=new Image;
newsOn.src="start/glonav_ne_on_arrow.gif";
newsOff=new Image;
newsOff.src="start/glonav_ne_on_arrow.gif";


// Variables for Roll-Up Timelines
var over_checker;  // checks to see if an on function has been called
var timeline_checker;  // checks to see which timeline should be played

// Image Rollover Functions
function On(pic)
	{	document.images[pic].src=eval(pic + "On.src");
		over_checker='on';
		setTimeout("over_checker='on'", 10);	}

function Off(pic)
	{	document.images[pic].src=eval(pic + "Off.src");	}

function scrollUp(layername)
	{	timeline_checker=layername;
		over_checker='off';
		setTimeout('Check()', 10);	}

// This function plays the correct timeline when the scrollUp function is called
function Check()
	{
		if ((over_checker=='off')&&(timeline_checker=='ci'))
			{	MoveUp('ci');	}

		if ((over_checker=='off')&&(timeline_checker=='ps'))
			{	MoveUp('ps');	}

		if ((over_checker=='off')&&(timeline_checker=='cs'))
			{	MoveUp('cs');	}

		if ((over_checker=='off')&&(timeline_checker=='ne'))
			{	MoveUp('ne');	}
	}

var intervalID

function MoveDown(theLayer) 
	{
		clearTimeout(intervalID);
	
		if (theLayer == 'ci') 
			{document.all['ps'].style.pixelTop = -128;
			 document.all['cs'].style.pixelTop = -128;
			 document.all['ne'].style.pixelTop = -128;	} 
		
		if (theLayer == 'ps') 
			{document.all['ci'].style.pixelTop = -128;
			 document.all['cs'].style.pixelTop = -128;
			 document.all['ne'].style.pixelTop = -128;	} 
		
		if (theLayer == 'cs') 
			{document.all['ci'].style.pixelTop = -128;
			 document.all['ps'].style.pixelTop = -128;
			 document.all['ne'].style.pixelTop = -128;	} 
		
		if (theLayer == 'ne') 
			{document.all['ci'].style.pixelTop = -128;
			 document.all['ps'].style.pixelTop = -128;
			 document.all['cs'].style.pixelTop = -128;	} 	
		
		theObj = eval("document.all." + theLayer + ".style");
	
		if (theObj.pixelTop >= 10) 
			{	document.all['cheater'].style.visibility='visible'; clearTimeout(intervalID);}
				else 
					{ theObj.pixelTop += 20;	intervalID=setTimeout("MoveDown('" + theLayer + "')", 10);	}
	}

function MoveUp(theLayer) 
	{
		clearTimeout(intervalID);

		theObj = eval("document.all." + theLayer + ".style");

		if (theObj.pixelTop <= -128) 
		
		{		
			if (theLayer == 'ci') 
				{document.company.src="start/glonav_ci_off.gif";}
			if (theLayer == 'ps') 
				{document.products.src="start/glonav_ps_off.gif";}
			if (theLayer == 'cs') 
				{document.customer.src="start/glonav_cs_off.gif";}
			if (theLayer == 'ne') 
				{document.news.src="start/glonav_ne_off.gif";}
			
			document.all['cheater'].style.visibility='hidden';
	
		}
			else 
			{theObj.pixelTop -= 20;		intervalID=setTimeout("MoveUp('" + theLayer + "')", 10)	}
	}

function fixit() 
	{	if (document.all['ci'].style.pixelTop > -128) 
			{MoveUp('ci');}
		if (document.all['ps'].style.pixelTop > -128) 
			{MoveUp('ps');}
		if (document.all['cs'].style.pixelTop > -128) 
			{MoveUp('cs');}
		if (document.all['ne'].style.pixelTop > -128) 
			{MoveUp('ne');}
	}	
	

function showEm() 
{	document.all.navbar.style.visibility = 'visible';
	document.all.ci.style.visibility = 'visible';
	document.all.ps.style.visibility = 'visible';
	document.all.cs.style.visibility = 'visible';
	document.all.ne.style.visibility = 'visible';
}
