// JavaScript Document

function openNewWindow(fileName,windowName,theWidth,theHeight) {
	if (windowName == "newWindow") 
	{
		//generate random window ID
		 windowName = new String(Math.round(Math.random() * 100000));
	}
	newWin = window.open(fileName,windowName,"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width="+theWidth+",height="+theHeight);
	newWin.focus();
}

function popup(url, width, height, chrome) {
	var w = width, h = height, docw = width, doch = height;
	if (document.all) {
		docw = document.body.clientWidth;
		doch = document.body.clientHeight;
	}
	else if (document.layers) {
		docw = window.innerWidth;
		doch = window.innerHeight;
	} 
	if (docw <= w) { w = (docw - 40)}
	if (doch <= h) { h = (doch - 40)}
	var leftPos = (screen.width / 2) - (w / 2);
	var topPos = (screen.height / 2) - (h / 2);     
	OpenWin = this.open(url,"ImageWindow","top="+topPos+",screenX="+topPos+", left="+leftPos+", screenY="+leftPos+",width="+w+",height="+h+", toolbar="+chrome+",menubar="+chrome+",location="+chrome+",status="+chrome+",scrollbars=yes,resizable=yes,");
}


function startList() 
{
	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 = function() { 
	startList(); 	
}