// JavaScript Document

/* Global Nav */
var timerID = null; 
var timerOn = false; 
/* Menu will hide after this timeout (ms) */
var timecount = 400; 

function navOver(layerName){hideAll(); showLayer(layerName); stopTime();}
function navOut(){ startTime(); }


function showLayer(layerName) { 
	if (document.getElementById) {
		document.getElementById(layerName).style.left = ((getAnchorPosition(layerName+'Link').x)-1) + 'px';
		document.getElementById(layerName).style.visibility="visible"; 
	}
	} 
function hideLayer(layerName) { 	if (document.getElementById) {document.getElementById(layerName).style.visibility="hidden";} } 

function hideAll() {
	//Put all layers used in the nav here.  
	if (document.getElementById) {
	hideLayer("navSolutions"); hideLayer("navProducts"); hideLayer("navServices"); hideLayer("navPartners"); hideLayer("navCompany"); 
	}
} 

function startTime() {  if (timerOn == false) {  timerID=setTimeout("hideAll()" , timecount);  timerOn = true;  }  } 
function stopTime() {  if (timerOn) {  clearTimeout(timerID);  timerID = null;  timerOn = false;  }  } 
function onLoad() {  init();  } 

function IEHoverPseudo() {
	var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "menuparent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "menuparent"; }
		}
	}
}




