﻿/*
* sendto 
*  - function e-mail hiding. stops email address harvesters collecting e-mails by hiding
*     the address in this java code.
*  - param's 
*     name       - name to left of @
*     domain name - domain name address from @ to first .
*     dot        - the final bit of email address bit after first dot
*     comment    - this is the text displayed on the web page
*     class name  - if required set to the class name to use for the link
*     extension  - main to extension ie subject and body must be the complete string to append to the mailto
*                    eg ?Subject='Support Request'&amp;Body='drear Joe,'
*
*	eg sendto('fred','lasa','co.uk','e-mail support', 'links', 'email_link','?Subject='Support Request'&amp;Body='drear Joe,'');
*         will send an e-mail to fred@lasa.co.uk
*/
function sendto (name, domainname, dot, comment, classname, extension)
{
	address = name+"@"+domainname+"."+dot+extension;	
	document.write("<a href=");
	document.write("\"mail"+"to"+":"+address+"\" ");
	document.write("title=\"mail to "+address+"\" "); 
	if (classname !== "")
	   {document.write(" class=\""+classname+"\"");}
	document.write(">"+comment+"</a>");
}

/* set the current page */
	function  initialize() 
	{
		try {
			page = document.getElementById(currentPage );
			page.className = 'on';
		} catch (e)
		{
		}
	}


	 window.onload = function() {
	 initialize();
	 }
