var display_url = 0;
var activeSection="";
var activePage="";
//------------------------------------------------------------------------------
function ShowPopupMenu(event,nav4) 
{
var vPopupMenu=document.getElementById("PopupMenu");
var vX=0;
var vY=0;

// Netscape
if (nav4) 
	{
	vX=event.pageX;
	vY=event.pageY;
	} 
// Internet Explorer 
else 
	{ 
	vX=(event.clientX + document.body.scrollLeft);
	vY=(event.clientY + document.body.scrollTop);
	}

vPopupMenu.style.left = vX;
vPopupMenu.style.top = vY;
vPopupMenu.style.visibility = "visible";

return false;
}
//------------------------------------------------------------------------------
function HidePopupMenu() 
{
var vPopupMenu=document.getElementById("PopupMenu");
vPopupMenu.style.visibility = "hidden";
}
//------------------------------------------------------------------------------
function HighLightPopupMenu(event) 
{
// Netscape
if (nav4 && event.target.className == "menuitems" )
	{
	event.target.style.backgroundColor = "gray";
	event.target.style.color = "black";
	if (display_url) window.status = event.target.url;	
	}
// Internet Explorer
else if (event.srcElement.className == "menuitems") 
	{
	event.srcElement.style.backgroundColor = "gray";
	event.srcElement.style.color = "black";
	if (display_url) window.status = event.srcElement.url;
	}
}
//------------------------------------------------------------------------------
function LowLightPopupMenu(event,nav4) 
{
if ( nav4 && event.target.className == "menuitems" )
	{
	event.target.style.backgroundColor = "";
	event.target.style.color = "black";
	window.status = "";		
	}
else if (event.srcElement.className == "menuitems") 
	{
	event.srcElement.style.backgroundColor = "";
	event.srcElement.style.color = "black";
	window.status = "";
	}
}
//------------------------------------------------------------------------------
function ExecutePopupMenu(event,nav4) 
{
if ( nav4 )
	{
	if (event.target.className == "menuitems")	var newURL=event.target.getAttribute("url");
	}
else
	{
	if (event.srcElement.className == "menuitems") var newURL=event.srcElement.url;
	}
	
switch ( newURL )
	{
	case 'modify.php':    
		window.location = newURL + "?sec_id=" + activeSection + "&pag_id=" + activePage ; break
	case 'edit_page.php': 
		window.location = newURL + "?pag_id=" + activePage + "&useback=1" ; break
	case 'cms.php':   	  
		window.location = newURL ; break
	default:    		  
		window.location = newURL ;
	}
}
