// scripts.js
function insertM2Link(nam, dom, text, subject, bodytext) { 
        // Goal of this function is to prevent spam robots from harvesting e-m-a-i-l addresses. 
        // "M2 is short for "m-a-i-l t-o" (without hyphens). 
        // To use, user needs to insert a short call to this function in web page body. 
        // Avoid or scramble references to "at" signs, "dot-com" domain suffixes, 
        // the text "m-a-i-l t-o" in HREF attributes, and break up the user name and the 
        // domain name so they are not near each other in the document. 
        // This assumes that spam harvesters are not javascript aware. 
        // If they are then move to a server-side form-submit model. 
        // Build default domain name in case no parameter is sent. 
		default_dom = "wolfcr" + "eekconsulting" + String.fromCharCode(46) + "c" + "om";
		// Build full address including at sign from name portion and specified or default domain 
        full = nam + String.fromCharCode(64) + (dom == "" ? default_dom : dom); 
		// handle calls to old version of function where subject and body are not specified
		if (subject == undefined) {subject = ""}
		if (bodytext == undefined) {bodytext = ""}
		// handle blank subject where a body is stil lspecified - need a ? operator in link h-ref
		if (subject == "" && bodytext != "") {subject = " "}
		// Write link into page
		document.write("<a hr" + "ef=\"mai" + "lto:" + full 
					   + (subject == "" ? "" : "?subject=" + subject)
					   + (bodytext == "" ? "" : "&body=" + bodytext)
					   + "\">" + (text == "" ? full : text) 
					   + "</a>"); 
} 

function createObject(html) {
	// fix for IE SP2 "click to activate and use this control" bug
	document.write(html)
}
