//Copyright (c) 2003 paulgrant.ca
//http://www.paulgrant.ca

self.defaultStatus = "AnSirTech";

function DoStatus(sString)
{
	if(!sString)
		sString = self.defaultStatus;

	self.status = sString;

	return true;
}

function DoEmail(sEmail)
{
	var bRc = false;

	bRc = window.confirm("Open your email client to: " + sEmail + " ?");
	if(bRc == false)
		return false;

	return true;
}

function DoContact(sPrefix, sSufix, sMsg)
{
	if(!sMsg)
		sMsg = sPrefix + "@" + sSufix;

	document.writeln("<a href 		='mailto:" + sPrefix + "@" + sSufix + "' ");
	document.writeln("onMouseOver	=\"return DoStatus(this.text);\" ");
	document.writeln("onMouseOut	=\"return DoStatus();\" ");
	document.writeln("onClick		=\"return DoEmail(this.href);\" ");
	document.writeln(">" + sMsg + "</A>");

	return true;
}

function DoPopup(sUrl, sName, iWidth, iHeight)
{
	if(!sName)
		sName = "DoPopup";

	if(!iWidth)
		iWidth		= 500;

	if(!iHeight)
		iHeight		= 500;

	var iX			= Math.round((screen.width - iWidth) / 2);
	var iY			= Math.round((screen.height - iHeight) / 2);

	var sPopProp	= "directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,status=yes,toolbar=no";

	var sFeatures	= sPopProp + ",height=" + iHeight + ",width=" + iWidth + ",left=" + iX + ",top=" + iY;

	var oWin = window.open(sUrl, sName, sFeatures);
	if(!oWin)
		return false;

	oWin.focus();

	return true;
}

//End.
