// JavaScript Document
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.nodeName=="LI") {
  node.onmouseover=function() {
  this.className+=" over";
    }
  node.onmouseout=function() {
  this.className=this.className.replace
      (" over", "");
   }
   }
  }
 }
}
window.onload=startList;




//make dropdown visible
function DropSwap(dropthis, bgcolor) {	


	var swabbg=new Array('navitem1','navitem2', 'navitem3','navitem4','navitem5', 'navitem6', 'navitem7');
	for (k=0; k<swabbg.length; k++){
		if(swabbg[k] != currentpage){
		document.getElementById(swabbg[k]).style.backgroundColor = '#fff';
		}
		}
	document.getElementById(bgcolor).style.backgroundColor = '#6c91c9';
	
	var hideDrop=new Array('subnav2','subnav3');
	for (i=0; i<hideDrop.length; i++){
		document.getElementById(hideDrop[i]).style.visibility = 'hidden';
		}
		
	document.getElementById(dropthis).style.visibility = 'visible';
}

function dropout(remdrop){
	timer = setTimeout ( "hidesubnav()", 1000 ); 
	
	var swapsubbg=new Array('subnavitem1','subnavitem2', 'subnavitem3','subnavitem4');
	for (k=0; k<swapsubbg.length; k++){
		if(swapsubbg[k] != currentpage){
		document.getElementById(swapsubbg[k]).style.backgroundColor = '#fff';
		}
	}
	}
	
function hidesubnav(){
	document.getElementById('subnav2').style.visibility = 'hidden';
	document.getElementById('subnav3').style.visibility = 'hidden';
	}
	
	
	
function cleartimer(thissubnav){
	
document.getElementById(thissubnav).style.backgroundColor = '#6c91c9';	
clearTimeout(timer);
}


function whitebg(thisnav){
	if(thisnav != currentpage){
	document.getElementById(thisnav).style.backgroundColor = '#fff';
	}
}
