/* 
** Script Name: mailer.js
**
** Functions usage:
** mailme(email name, domain of the email address, text to be display in browser, subject, body)
**
** example:
** mailme('ccetest1','nus.edu.sg','Email Me','subject','body');
**
*/

function mailme(email,domain,text,subject,body){

	str='<a href="mailto:' + email + '@' + domain
	if(subject != ""){
		str+='?subject=' + subject
		if(body!="")str+="&body=" + body
	}
	str+= '">'
	if(text==""){
		str+= email
	}else{
		str+= text
	}
	str+='</a>'


	document.write(str);
};
