ns4 = (document.layers) ? 1:0;
ie = (document.all)    ? 1:0;

var loaded;

function show(idname)
{
	if (document.getElementById)
	{
		var bxNM = document.getElementById(idname);
		bxNM.style.visibility = "visible";
	}
	else if (ns4)
	{
		document[idname].visibility = "show";
	}
	else if (ie)
	{
		document.all[idname].style.visibility = "visible";
	}
}


function hide(idname)
{
	if (document.getElementById)
	{
		var bxNM = document.getElementById(idname);
		bxNM.style.visibility = "hidden";
	}
	else if (ns4)
	{
		document[idname].visibility = "hide";
	}
	else if (ie)
	{
		document.all[idname].style.visibility = "hidden";
	}
}

function hideAll()
{
	clearTimeout(TimeOutNum);
	hide('Layer1');
	hide('Layer2');
	hide('Layer3');
	hide('Layer4');
	hide('Sub01');
	hide('Layer5');
}

var TimeOutNum = 0;

loaded = 0;


function SetTimer()
{
	TimeOutNum = setTimeout("hideAll();",600);
}

function openAWindow(pageToLoad, winName, width, height, center, scroll)
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=1,"
    + "scrollbars="+scroll+", "
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open(pageToLoad,winName,args );
}

