﻿pic1= new Image(8,95); 
  pic1.src="/images/bgimages/SilverNav/silvernav-expand-arrows.png"; 
pic2= new Image(11,91); 
  pic2.src="/images/bgimages/SilverNav/silvernav-expanded-arrows.png"; 


//Adds the red corners to the side navs
function modifyNav()
{
	//Pre Load Images
		var tableCapLeft = document.getElementById('LeftNavCap');
	var tableCapRight = document.getElementById('RightNavCap');
	
	//Change table HTML
	var tableCelLeft = document.getElementById('zz1_CustomMenun0');
	var tableCelRight = document.getElementById('zz1_CustomMenun6');
	
	tableCelLeft.onmouseover=function() {
		tableCapLeft.src='/images/topnavselected_aricent_left.png';
		Menu_HoverStatic(this);
		};
 	tableCelLeft.onmouseout=function() {
 		tableCapLeft.src='/images/topnavunselected_aricent_left.png';
 		Menu_Unhover(this);	
 		};
 	tableCelRight.onmouseover=function() {
		tableCapRight.src='/images/topnavselected_aricent_right.png';
		Menu_HoverStatic(this);
		};
		
 	tableCelRight.onmouseout=function() {
 		tableCapRight.src='/images/topnavunselected_aricent_right.png';
		Menu_Unhover(this);	
 		};
 		topNavTabs = document.getElementById("zz1_CustomMenu"); 	
 		currentTabLink = topNavTabs.getElementsByTagName("a");
 		
 	for (var i=0; i<6; i++)
 	{
 		if(location.href.toLowerCase().indexOf("/"+currentTabLink[i].innerHTML.replace(" ","%20").toLowerCase()+"/")>1)
 		{
 			document.getElementById("zz1_CustomMenun" + i).style.background="url('/images/bgimages/topnavselected_aricent.png')";
 			currentTabLink[i].style.color="white";
 			//Handle special case of left and right ends
 			if(currentTabLink[i].innerHTML.toLowerCase() == "products")
 			{
 				tableCapLeft.src='/images/topnavselected_aricent_left.png';
 				tableCelLeft.onmouseout=function() {Menu_Unhover(this);	}

 			}
 			else if(currentTabLink[i].innerHTML.toLowerCase()== "press center")
 			{
 				tableCapRight.src='/images/topnavselected_aricent_right.png';
 				 tableCelRight.onmouseout=function() { Menu_Unhover(this);	}
 			return;

 		}
 			
 		}
 		
 	}
}
//Modify the silver navigation 
function modifySilverNav()
{
	var navName = "Sub";
	var i=1;
	for (i=1;i<7;i++)
	{
		var currentNav = document.getElementById(navName + i);
		if (currentNav == null)
		{
			return;
		}
		var navLinks = currentNav.getElementsByTagName("a");
		for (var j=0; j<navLinks.length; j++)
		{
			if(navLinks[j].href.toLowerCase() == location.href.toLowerCase())
			{
				navLinks[j].style.color = "#e12947";
				currentNav.style.display = "block";
				return;
			}
	
		}
		
	}
}
function modifySilverNavNoSubs()
{
	
		var currentNav = document.getElementById("silverNav");
		var navLinks = currentNav.getElementsByTagName("a");
		for (var j=0; j<navLinks.length; j++)
		{
			if(navLinks[j].href.toLowerCase() == location.href.toLowerCase())
			{
				navLinks[j].style.color = "#e12947";
				return;
			}
		}
		
}


function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function changeClass(obj)
{
	obj.className=(obj.className == "expandable") ? "expanded" : "expandable";
}