//FOR TOP MENU

if(!window.ActiveXObject)
{
	Node.prototype.selectSingleNode = function(xPath)
	{
		var nodes = document.evaluate(xPath, this, null, 0, null); 	
		var node = nodes.iterateNext(); 
		return(node);
	}

	Node.prototype.selectNodes = function(xPath) 
	{ 	
		var nodes = document.evaluate(xPath, this, null, 0, null); 
		var nodelist = new Array(); 
		var node = nodes.iterateNext(); 
		while(node){nodelist.push(node); node = nodes.iterateNext();} 
		return nodelist; 
	}	
}

function onover(src, onoff, mid)
{	
	cont = document.getElementById('menuChilds')
	for (i=0 ; i < cont.childNodes.length; i++)
	{
		cont.childNodes[i].style.display = 'none'
		if (cont.childNodes[i].getAttribute('pID') == src.getAttribute('myID'))
		{
			cont.childNodes[i].style.display = (onoff==1?'':'none');			
			thePos = src.style.position
			src.style.position='relative';
			cont.childNodes[i].style.top = parseInt(src.offsetTop) + 26;
			cont.childNodes[i].style.left = parseInt(src.offsetLeft)
			src.style.position=thePos;
		}		
	}	
	//if (mid == "")
	src.className = (onoff == 1? 'menuON': 'menu')	
}

// onover of the sub table fix level 0 class
function SubonOver(src, onoff, mid)
{
	theP = document.getElementById('pMenu').childNodes[0]
	for (i = 0 ; i < theP.rows[0].cells.length; i++)
	{
		if (theP.rows[0].cells[i].getAttribute('myID') == src.getAttribute('pid') && mid == "")
			theP.rows[0].cells[i].className = (onoff == 1? 'menuON': 'menu');		
	}	
	src.style.display =(onoff==1? '': 'none')	
}

//onover fix individual submenu item class
function mItemonOver(src, onoff, pid)
{
	if (onoff == 1){src.className = 'submenuON';}
	else{src.className = 'submenu';}		
}

function tMenuOver(s, id, obj, mid)
{
	if (mid == id) return;
	var td = document.getElementById('td'+id)
	if (s=='on')
	{
		td.childNodes[0].childNodes[0].src = 'images/m'+id+'Over.gif';		
	}
	else
	{
		td.childNodes[0].childNodes[0].src = 'images/m'+id+'.gif';		
	}
}

function WriteCookie (cookieName, cookieValue, url) 
{
	document.cookie = cookieName + "=" + escape (cookieValue) + "; expires='Tuesday, 01-Apr-2020 07:00:00 GMT'"
	window.location = url
}


