/* VP js library */

function nav_menu(x,pObj)
{
	var objName = "nav_dropdown"+x;
	obj=document.getElementById(objName);
	
	var leftPos=LeftPos(pObj,0);
	lstrLeft=leftPos;
	if(navigator.appName == "Microsoft Internet Explorer")
	{			
		obj.style.left = lstrLeft;
	}
	else
	{
		obj.style.left = lstrLeft + "px";
	}	
	obj.style.display="block";
	//alert(pObj.className);
	if(pObj.className != "active")
	{
		pObj.style.backgroundImage = "url(./images/navbgHover.gif)";
	}
}
 
 
 function closure_check(x,pObj)
 {
	
	var objName = "nav_dropdown"+x;
	obj=document.getElementById(objName);
	if(obj.style.display=='block')
	{	
		 obj.style.display="none";
	}
	
	//alert(pObj.className);
	if(pObj.className != "active")
	{
		pObj.style.backgroundImage = "url(./images/navBg.gif)";
	}
 }
 
 
 function showDiv(pobj,objParent)
 {
	pobj.style.display = 'block';
	//var backimage = document.getElementById(objParent).background;
	objParent=document.getElementById(objParent);
	
	objParent.style.backgroundImage = "url(./images/navbgHover.gif)";
	
	//alert(objParent.className);
	if(objParent.className != "active")
	{
		objParent.style.backgroundImage = "../images/navbgHover.gif";
	}
}
	 
function hideDiv(pobj,objId)
{
	if(pobj.style.display=='block')
	{
		pobj.style.display = 'none'; 
	}
	objParent=document.getElementById(objId);
	//alert(objParent.className);
	if(objParent.className != "active")
	{
		objParent.style.backgroundImage = "url(./images/navBg.gif)";
	}
}
	 	 
	 
	 
function LeftPos(obj, pos)
{
    var leftCoord = 0;
while(obj)
{
   leftCoord += obj.offsetLeft;
   obj = obj.offsetParent;
}
return leftCoord + pos;
}	 
	 
function div_Still(objId)
{
    divId= "nav_dropdown"+objId;
	document.getElementById(divId).style.display = 'block';
	objParent=document.getElementById(objId);
	if(objParent.className != "active")
	{
		objParent.style.backgroundImage = "url(./images/navbgHover.gif)";
	}
}


