/*
Javascript functions that encapsulates menu navigation.
- to avoid name collision prefix all functions with NB_.

History:
08/16/04	Arnie Arguna	-Created
*/
var WinPop = null;
    
function PI_MenuLinkTo(parent, page, bookmark)
{
	var theForm;
	var nextPage;
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
		theForm = document.forms["Form"];
	}
	else {
		theForm = document.Form;
	}
	
	nextPage = parent + "|" + page;	
	
	if(bookmark != null)
		nextPage = nextPage + "|" + bookmark;
		
	theForm.targetPage.value = nextPage;
	theForm.submit();
	
}
function PI_PopWin(parent, page, feature)
{
    var w;
    var h;
    
	if(w == null) w=420;
	if(h == null) h=410;
	if(feature == null) feature="width=" + w + ",height=" + h + ",menubar=no, scrollbars=yes, statusbar=no, maximize=no, minimize=no, resizable=no";
	var url = "Default.aspx?PopUp=" + parent + "|" + page;
	
	
	if(WinPop  == null|| WinPop.closed == true)
	{
	   WinPop  = window.open(url,"WinPop",feature);
	}
	else
	{
        	WinPop.location = url;
        	WinPop.focus();
	}
}
function goToBookmark(bk)
{
	window.location.hash =   "#" + bk; ;
}
