
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300');");
}


//  code by Alan Dix 2004   http://www.meandeviation.com/
//  you are free to use, copy, or distribute this code so long as this notice
//  is included in full and any modifications clearly indicated

function email_addr(name,host,isLink,otherName) {
	var email = name + "@" + host;
	var linktext = email;   // text to display within link
	if (otherName) {
		linktext = otherName;
		isLink = 1;  // only makes sense for live link
	}
	if ( isLink ) document.write("<a title=\"Email protected by anti-harvesting anti-spam function.  Click to start email.\" href=\"mailto:" + email + "\">");
	document.write(linktext);
	if ( isLink ) document.write("</a>");
	document.close();
}

/* Sample Use
<script language="JavaScript">	
email_addr('khaizuran.abdullah','eng.monash.edu.au',true,'')
</script>	
*/

function addLoadHandler(handler)
{
	if(window.addEventListener)
	{
		window.addEventListener("load",handler,false);
	}
	else if(window.attachEvent)
	{
		window.attachEvent("onload",handler);
	}
	else if(window.onload)
	{
		var oldHandler = window.onload;
		window.onload = function piggyback()
		{
			oldHandler();
			handler();
		};
	}
	else
	{
		window.onload = handler;
	}
}
