// Mail To Javascript Code
// Copyright 2003-2009 Warburton Technology

function createMailToLink(theRecipient,theDomain,theSubject)
{
	// Reverse the recipient string
	var Recipient = stringReverse(theRecipient)

	// Create the mailto link
	document.write("<a href=\"mailto:" + Recipient + "@" + theDomain + "?subject=" + theSubject + "\">" + Recipient + "@" + theDomain + "</a>");
}

function stringReverse(theSourceString)
{
   if (!theSourceString)
	return '';

   var DestinationString = '';

   for (index = (theSourceString.length - 1); index >= 0; index--)
       DestinationString += theSourceString.charAt(index);

   return DestinationString;
}
