
addEvent(window,'load',menu,false);

function menu()
{
	activateMenu('nav');	
}

activateMenu = function(nav)
{
	var navroot = document.getElementById(nav);
	
	var lis=navroot.getElementsByTagName("LI");
	
	for (i=0; i<lis.length; i++)
	{
		var uls = lis[i].childNodes;
		
		for (c=0; c<uls.length; c++)
		{
			if (uls[c].tagName=="UL")
			{
				lis[i].className+=" sub";
			}
		}
		
		if (document.all && document.getElementById(nav).currentStyle)
		{  
			lis[i].onmouseover=function()
			{	
			   this.className+=" over";
			}
			lis[i].onmouseout=function()
			{                       
			   this.className=this.className.replace(" over", "");
			}
		}

	}
}



// DIV TOGGLE --------------------------------------------------- //


currentdiv = 'div1'

function dtoggle(newdiv)
{ document.getElementById(currentdiv).style.display = "none";  
  document.getElementById(newdiv).style.display = "block";
  document.getElementById(currentdiv + "_b").className = "classoff"
  document.getElementById(newdiv + "_b").className = "classon"
  currentdiv = newdiv; }
  
  
  
//drop down code for IE
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", "");
   }
   }
  }
 }
}

addEvent(window,'load',startList,false);

function addEvent(elm, evType, fn, useCapture)
{
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture);
		return true;
	}
	else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn);
		return r;
	}
	else {
		elm['on' + evType] = fn;
	}
}  

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=230,height=220,left = 490,top = 362');");
}


