
var thisMenu = new Object;
var theTimer;

function showMenu(menuName){

if (thisMenu.id != null){
	clearMenu();
}
if (theTimer != null){
clearTimeout(theTimer);
}

theMenu = new Object;
theMenu = eval("document.getElementById('" + menuName + "')");

theMenu.style.visibility = "visible";

}

function hideMenu(menuName){


theMenu = new Object;
theMenu = eval("document.getElementById('" + menuName + "')");

thisMenu = theMenu;

theTimer = setTimeout("clearMenu(thisMenu)",500);

}

function on(theMenu){

theMenu.className="menuItemOn";

}

function off(theMenu){

theMenu.className="menuItem";

}

function clearMenu(){

	
	thisMenu.style.visibility = "hidden";
	thisMenu == null;
	

}

nsdom = (document.layers) ? true:false;
iedom = (document.all) ? true:false;

function getWindowWidth() 
{
    winW = (nsdom) ? window.outerWidth : screen.width;
    return winW;		
}

function getWindowHeight() 
{
    winH = (nsdom) ? window.outerHeight : screen.Availheight;
    return winH;		
}


function popIt(theFile,windowW,windowH,wName,scrollable){

    bWidth = getWindowWidth();
    bHeight = getWindowHeight();

    bTop = (nsdom) ? this.window.screenY : 0;
    bLeft = (nsdom) ? this.window.screenX : 0;

    popLeft = ((bWidth - windowW)/2) + bLeft;
    popTop = 20;

    if (wName == null)
    {
        wName = 'pop';
    }
    if (scrollable == null)
    {
        scrollable = 'auto';
    }


    var popWindow = window.open(theFile,wName,'width='+windowW+',height='+windowH+',top='+popTop+',left='+popLeft+',scrollbars=' + scrollable + ',statusbar=no,toolbar=no,resizable=yes');
    popWindow.focus();
}

function loadParent(theUrl){

	if (top.opener != null){
		top.opener.location.href = theUrl;
		opener.focus();
	}else{
		
		popWin(theUrl);
	}
	


}


function popWin(theFile)
{
    var popWindow = window.open(theFile);
    popWindow.focus();
}


