var submenus = new Array();
function getLayer(name) {
return (document.all)?document.all[name]:document.getElementById(name);
}

function makePopUp(urlValue,widthValue,heightValue) {
    var leftPos = (screen.availWidth-900) / 2;
    var topPos = (screen.availHeight-600) / 2;
    NewWidthValue=widthValue+20;
    NewHeightValue=heightValue+20;
    window.open(urlValue, 'PopUpWindow','width='+NewWidthValue+',height='+NewHeightValue+',menubar=0,scrollbars=yes,resizable=no,statusbar=no,location=no,titlebar=0,toolbar=0,status=0,top=' + topPos + ',left=' + leftPos);

}

var ns4=document.layers;
var ns6=document.getElementById&&(!document.all);
var ie4=document.all;
var opr=navigator.userAgent.indexOf("Opera");

function GetObj(Id) {
   return (document.getElementById)?document.getElementById(Id):(document.all?document.all[Id]:eval(Id));
}

function fadeMenu(oId) {
	menu = GetObj(oId);
	if (ns4) {
		menu.visibility="hide";
	} else {
		menu.style.visibility = "hidden";
	}
}

function showSubMenu(oId) {
    menu = GetObj('submenu_'+oId);
	
	clearTimeout(menu.fade);
	menu.fade = null;
    st = (ns6||ie4) ? menu.style : menu;
	st.visibility="visible";
}

function hideSubMenu(oId) {
	menu = GetObj('submenu_'+oId);
	clearTimeout(menu.fade);
	menu.fade = setTimeout("fadeMenu('submenu_"+oId+"')", 30);
}
