// note:
//		all subnav layer ids are greater than 100, therefore we do not need to swap
//		images for any ids that are greater than 100 (since the subnav has no image
//		to swap)

function cellOn(objCell, intNavID)
{
	if (document.all)
	{
		eval("document.all.cell" + intNavID + ".style.cursor='hand';");
		eval("document.all.cell" + intNavID + ".style.backgroundColor='#F3F3F3';");
		eval("document.all.nav" + intNavID + ".style.color='#FF0000';");
		
		if (((intNavID == 1)||(intNavID == 2)||(intNavID == 4))&&(eval("document.all.divSubNav" + intNavID + ".style.display")=='none'))
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_add.gif';");
		else if ((intNavID < 101)&&((intNavID != 1)&&(intNavID != 2)&&(intNavID != 4)))
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_on.gif';");
	}
	else
	{
		eval("document.getElementById('cell" + intNavID + "').style.cursor='hand';");	
		eval("document.getElementById('cell" + intNavID + "').style.backgroundColor='#F3F3F3';");	
		eval("document.getElementById('nav" + intNavID + "').style.color='#FF0000';");	

		if (((intNavID == 1)||(intNavID == 2)||(intNavID == 4))&&(eval("document.getElementById('divSubNav" + intNavID + "').style.display")=='none'))
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_add.gif';");	
		else if ((intNavID < 101)&&((intNavID != 1)&&(intNavID != 2)&&(intNavID != 4)))
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_on.gif';");	
	}
}

function cellOff(objCell, intNavID)
{
	if (document.all)
	{	
		if (((intNavID == 1)||(intNavID == 2)||(intNavID == 4))&&(eval("document.all.divSubNav" + intNavID + ".style.display")=='block'))
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_sub.gif';");
		else if (intNavID < 101)
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_off.gif';");
			
		eval("document.all.cell" + intNavID + ".style.backgroundColor='#CCCCCC';");
		eval("document.all.nav" + intNavID + ".style.color='#333333';");
	}
	else
	{
		if (((intNavID == 1)||(intNavID == 2)||(intNavID == 4))&&(eval("document.getElementById('divSubNav" + intNavID + "').style.display")=='block'))
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_sub.gif';");
		else if (intNavID < 101)
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_off.gif';");
			
		eval("document.getElementById('cell" + intNavID + "').style.backgroundColor='#CCCCCC';");	
		eval("document.getElementById('nav" + intNavID + "').style.color='#333333';");	
	}
}

function cellClick(intNavID)
{
	switch (intNavID) 
	{ 
   	case 1 : 
     		document.location.href = "/pages/services/index.asp";
	      break; 
   	case 101 : 
     		document.location.href = "/pages/services/svc_oil.asp";
	      break; 
   	case 102 : 
     		document.location.href = "/pages/services/svc_trans.asp";
	      break; 
   	case 103 : 
     		document.location.href = "/pages/services/svc_cooling.asp";
	      break; 
   	case 104 : 
     		document.location.href = "/pages/services/svc_filter.asp";
	      break; 
   	case 105 : 
     		document.location.href = "/pages/services/svc_fuel.asp";
	      break; 
   	case 106 : 
     		document.location.href = "/pages/services/svc_serpentine.asp";
	      break; 
   	case 107 : 
     		document.location.href = "/pages/services/svc_ac.asp";
	      break; 
   	case 108 : 
     		document.location.href = "/pages/services/svc_tire.asp";
	      break; 
   	case 109 : 
     		document.location.href = "/pages/services/svc_suv.asp";
	      break; 
   	case 110 : 
     		document.location.href = "/pages/services/svc_recycle.asp";
	      break; 
   	//case 2 : 
     		//document.location.href = "/pages/carhistory/index.asp";
	      //break; 
   	case 2 : 
     		document.location.href = "/pages/fleet/index.asp";
	      break; 
   	case 201 : 
     		document.location.href = "/pages/fleet/flt_reasons.asp";
	      break; 
   	case 202 : 
     		document.location.href = "/pages/fleet/flt_managing.asp";
	      break; 
   	case 203 : 
     		document.location.href = "/pages/fleet/flt_payment.asp";
	      break; 
   	case 3 : 
     		document.location.href = "/pages/carcare/index.asp";
	      break; 
   	case 4 : 
     		document.location.href = "/pages/about/index.asp";
	      break; 
   	case 401 : 
     		document.location.href = "/pages/about/abt_press.asp";
	      break; 
   	case 402 : 
     		document.location.href = "/pages/about/abt_community.asp";
	      break; 
   	case 403 : 
     		document.location.href = "/pages/about/abt_franchising.asp";
	      break; 
   	case 404 : 
     		document.location.href = "/pages/about/abt_careers.asp";
	      break; 
   	case 5 : 
     		document.location.href = "http://www.customerpulse.net:8080/vlvcontactus/Welcome.jsp";
	      break; 
   	default : 
     		document.location.href = "/index.asp";
	} 
}

function toggleDisplay(layerID, intNavID)
{
	if (document.all)
	{ 
		if (eval("document.all." + layerID + ".style.display")=='none')
		{
			eval("document.all." + layerID + ".style.display='block';");
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_sub.gif';");
		}
		else
		{
			eval("document.all." + layerID + ".style.display='none';");
			eval("document.all.img" + intNavID + ".src='/images/buttons/btn_nav_add.gif';");
		}
	}
	else
	{
		if (eval("document.getElementById('" + layerID + "').style.display")=='none')
		{
			eval("document.getElementById('" + layerID + "').style.display='block';");
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_sub.gif';");
		}
		else
		{
			eval("document.getElementById('" + layerID + "').style.display='none';");
			eval("document.getElementById('img" + intNavID + "').src='/images/buttons/btn_nav_add.gif';");
		}
	}
}
