// URL-Obfuscater.js
// This script creates clickable mailto links, while hiding the e-mail address from spambots.
// Written by: Brian Bahn
// Updated: 01/15/2010


/*
Note: Modify the two suffix variables so that when joined together they make-up the Top Level Domain of your site.
Then modify the two 'domain' lines to make-up the rest of your domain-name.
*/

var strTLD1 = "co";
var strTLD2 = "m";
var strDomain = "midw"; 
strDomain += "estmtn";


// This function is called from within the page text, writes the clickable link into the document:
function fnEmailObfuscater(strMailName, strCaption) 
	{
  if (strCaption == undefined)
  	{
  	strCaption = strMailName; 
  	}
  	var strMail = "<a href='javascript:fnSendMail(\"" + strMailName + "\");' title='Click here to send us an e-mail.'>" + strCaption +"</a>";
  	document.write(strMail);
	}


// This function is called by the clickable link, and launches the mailprogram:
function fnSendMail(strMailName)
	{
  var strMailTo = "mai" + "lto:" + strMailName + "@" + strDomain + "." + strTLD1 + strTLD2;
  document.location = strMailTo;
  }



// End of URL-Obfuscater.js