// JavaScript Document

function openmail(user,host) {
    locationstring = "mailto:" + user + "@" + host;
    window.location = locationstring;
}

function openMailWithBody(user,host,ccuser,cchost,bccuser,bcchost,subject,messagebody) {
    s = "mailto:" + user+"@"+host + '?';
	if (ccuser && cchost) {s = s +"cc="+ ccuser+"@"+cchost+"&"}
	if (bccuser && bcchost) {s = s +"bcc="+ bccuser+"@"+bcchost+"&"}
	if (subject) {s = s + "subject="+escape(subject)+"&"}
	if (messagebody) {s = s + "body="+escape(messagebody)}
//	alert(s);
    window.location = s;
}


