

dhtmlPopped = false;
var PopupTimer;
var lastPopup;
var loaded;

function Popup(PopupName) 
{
	if (loaded)
	{
		if (lastPopup) closePopup(lastPopup);
		if (document.layers) 
			{ thePopup = document.layers[PopupName]; } 

		else if (document.getElementById) 
			{ thePopup = document.getElementById(PopupName).style;} 
		else 
			{ thePopup = document.all.tags("DIV")[PopupName].style; }
//			{ thePopup = document.all.tags("DIV")[PopupName].style; }
	
		thePopup.visibility = 'visible';
		dhtmlPopped = true;
		lastPopup = PopupName;
	}
}

function closePopup(PopupName) {
	try {
		window.clearInterval(PopupTimer);
	} catch(e) {
		// do nothing	
	}
	if (loaded) {
		document.getElementById(PopupName).style.visibility="hidden";
		dhtmlPopped = false;
	}
}


function setPopupTimer(PopupName) 
{
	if (loaded) 
	{
		PopupTimer = setTimeout('closePopup("' + PopupName + '")',500);
	}
}

function makePopupLayer(layertop,layerleft,layername) 
{
	if (document.layers) 
		{ document.writeln('<LAYER NAME="' + layername + '" TOP=' + layertop + ' LEFT=' + layerleft + '  VISIBILITY="hidden" ONMOUSEOVER="clearTimeout(PopupTimer)" ONMOUSEOUT=setPopupTimer("' + layername + '");>'); } 
	else 
		{ document.writeln('<DIV ID="' + layername + '" STYLE="position:absolute; top:' + layertop + '; left: ' + layerleft + '; z-index:10; visibility:hidden;" ONMOUSEOVER="clearTimeout(PopupTimer);" ONMOUSEOUT=setPopupTimer("' + layername + '");>'); }
}