function genEmail(u,d,s,how,p,desc,cls){
	//user
	//domain
	//suffix
	//how - how to generate the email: asLink, withDesc
	//parameters (i.e. ?subject=I loved your website!)
	//description of the link (what goes between the <a></a> tags
	//class - style sheet
	var parameters = (p ? p : "");
	if(parameters!="" && parameters.substring(0,1) != "?"){parameters = "?" + parameters;}
	var e = u + "@" + d + "." + s;
	var txt;
	if(how == "asLink"){
		document.write("<a href='mailto:" + e + parameters + "'" + (cls ? " class=\"" + cls + "\"" : "") + ">" + e + "</a>");
	} else if(how == "withDesc"){
		document.write("<a href='mailto:" + e + parameters + "'" + (cls ? " class=\"" + cls + "\"" : "") + ">" + desc + "</a>");
	} else {
		document.write(e);
	}
}

function checkURL(u){
	if(u.value=="") return;
	if(u.value.indexOf("http://") == -1 && u.value.indexOf("https://") == -1) u.value = "http://" + u.value;
}

function popImage(img,width,height){
	var url = "/showimage.html?src=" + img + "&width=" + width + "&height=" + height; 
	var w = 10 + width;
	var h = 10 + height;
	n = window.open(url,"popImage","left=20,top=20,screenX=20,screenY=20,menubar=false,location=false,scrollbars=false,toolbar=false,width=" + w + ",height=" + h);
	n.focus()
}
