// default JavaScript

var BaseURL = "";

function hideMail(thisUser, thisDomain, thisTLD, thisOpt, thisStr, thisAttrib, thisSubj) {
	/*
	OPTIONS
	-------
	undefined or empty = link
	"nolink" = no link
	"linktext" = link text from parameter
	*/
	
	var strOut;	
	strOut = subChrs(thisUser + "@" + thisDomain + "." + thisTLD);
	
	if (typeof thisAttrib != "undefined") {
		if (thisAttrib != "") {
			thisAttrib = " " + thisAttrib;
		}
	} else {
		thisAttrib = "";
	}
	if (typeof thisSubj != "undefined") {
		if (thisSubj != "") {
			thisSubj = "?" + thisSubj;
		}
	} else {
		thisSubj = "";
	}
	
	if (typeof thisOpt == "undefined" || thisOpt == "") {
		strOut = "<a href=\"mailto:" + strOut + thisSubj + "\"" + thisAttrib + ">" + strOut + "</a>";
	} else if (thisOpt == "linktext") {
		strOut = "<a href=\"mailto:" + strOut +  thisSubj + "\"" + thisAttrib + ">" + thisStr + "</a>";
	}
	document.write(strOut);
}

function subChrs(thisStr) {
	var strNew = "";
	for (var i = 0; i < thisStr.length; i++) {
		strNew += "&#" + thisStr.charCodeAt(i) + ";";
	}
	return strNew;
}