var isIe4=false, isDom=false, isMac=false, isNs4=false, isWin=false, isLoaded=false, isIe=false;
var imgString="";

function init()
{
	if (isDom)
	{
		isLoaded=true;
	}
}

function popImg(img)
{
	imgString='<img src='+img+' width="350" height="250" />';
	writeMe('popText',imgString);
	positionMe('popUp',226,40);
	showMe('popUp');
}

function closePop()
{
	hideMe('popUp');
	document.getElementById('popUp').style.display="none";
}

function showMe(divID)
{
	if (isLoaded) document.getElementById(divID).style.visibility='visible';
}

function hideMe(divID)
{
	if (isLoaded) document.getElementById(divID).style.visibility='hidden';
}

function writeMe(divID,divText)
{
	if (isLoaded)
	{
		document.getElementById(divID).innerHTML=divText;
	}
	if (isNs4)
	{
		document.layers[divID].document.open()
		document.layers[divID].document.write(divtext)
		document.layers[divID].document.close()
	}
}

function positionMe(divID,t,l)
{
	if (isLoaded)
	{
		document.getElementById(divID).style.display="block";
		document.getElementById(divID).style.position="absolute";
		document.getElementById(divID).style.top=t+"px";
		document.getElementById(divID).style.left=l+"px";
	}
}



isMac=(navigator.platform=="MacPPC")? true:false;
isWin=(navigator.appVersion.indexOf("Win")!=-1)? true:false;
isIe=(navigator.appName=="Microsoft Internet Explorer")? true:false;
isIe4=(document.all)? true:false;
isDom=(document.getElementById)? true:false;
if ((parseInt(navigator.appVersion)==4) && (navigator.appName=="Netscape"))
{
	isNs4 = true;
	isImg = true;
}
window.onload=init;