function IsIE()
{
	return document.all != null;
}

function IsNN()
{
	return document.layers != null;
}


function Write(s)
{
	g_sHTML += s;
}

function Writeln(s)
{
	g_sHTML += s;
}

function DocWrite()
{
	document.write(g_sHTML);
	g_sHTML = "";
}

function BeginDiv(nTop, nLeft, zIndex, sId, bVis)
{
	var sVis = " ";
	var sM = " ";
	var sSize = " ";

	if (bVis == NO)
	{
		if (g_bNETS) 
		{
			sVis = " visibility=hide";
			sM = " onmouseover=\"ShowObj('"+sId+"');\" onmouseout=\"HideObj('"+sId+"');\"";
		}
		else if (g_bIE)
		{
			sVis = " visibility: hidden;"
			sM = " onmouseover=\"ShowObj('"+sId+"');\" onmouseout=\"HideObj('"+sId+"');\""; 
			sSize = " width: 100px; height: 150px;";
		}
	}

	if (g_bIE) var sValue = "<DIV"+sM+" id="+sId+" STYLE=\"POSITION: absolute; TOP: "+nTop+"px; LEFT: "+nLeft+"px;"+sSize+"z-Index: "+zIndex+";"+sVis+"\">"
	else if (g_bNETS) var sValue = "<LAYER"+sM+" id="+sId+" TOP="+nTop+" LEFT="+nLeft+" z-Index="+zIndex+sVis+">"

	Writeln(sValue);
}


function BeginDivVis(nTop, nLeft, zIndex, sId, bVis)
{
	var sVis = " ";
	var sM = " ";
	var sSize = " ";

	if (bVis == NO)
	{
		if (g_bNETS) 
		{
			sVis = " visibility=hide";
			sM = " onmouseover=\"ShowObj('"+sId+"');\"";
		}
		else if (g_bIE)
		{
			sVis = " visibility: hidden;"
			sM = " onmouseover=\"ShowObj('"+sId+"');\""; 
			sSize = " width: 100px; height: 150px;";
		}
	}

	if (g_bIE) var sValue = "<DIV"+sM+" id="+sId+" STYLE=\"POSITION: absolute; TOP: "+nTop+"px; LEFT: "+nLeft+"px;"+sSize+"z-Index: "+zIndex+";"+sVis+"\">"
	else if (g_bNETS) var sValue = "<LAYER"+sM+" id="+sId+" TOP="+nTop+" LEFT="+nLeft+" z-Index="+zIndex+sVis+">"

	Writeln(sValue);
}

function EndDiv()
{
	if (g_bIE) var sValue = "</DIV>"
	else if (g_bNETS) var sValue = "</LAYER>"
	Writeln(sValue);
}

function ShowObj(name)
{
	if (g_bNETS) document.layers[name].visibility = "show" 
	else 
	if (g_bIE) document.all[name].style.visibility = "visible"
}

function HideObj(name)
{
	if (g_bNETS) document.layers[name].visibility = "hide"
	else if (g_bIE) document.all[name].style.visibility = "hidden"
}

