/* The function hide_email
 * 
 * This function uses both special HTML characters and JavaScript to hide 
 * email addresses from address harvesters.
 *
 * It can take 1 or 3 arguments. If there's only one argument it defaults
 * to Tanner de Witt's domain name. Otherwise it assumes arg0@arg1.arg2.
 *
 * Written by Andy Bell, 1 June 2003.
 */
function hide_email(address)
{
	var args = hide_email.arguments;
	var at_tdwbusiness_dot_com = '&#64;&#116;&#100;&#119;&#98;&#117;&#115;&#105;&#110;&#101;&#115;&#115;&#46;&#99;&#111;&#109;'

	if (args.length == 1)
	{
		/* This writes "email: "
		document.write('&#101;&#109;&#97;&#105;&#108;&#58; ');
		*/
		/* mailto: */
		/* document.write('<a class="email" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;'); */
		document.write('<a class="email" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;');
		document.write(address);
		document.write(at_tdwbusiness_dot_com)
		document.write('?Subject=Enquiry from TDW Business Services Limited website">');
		document.write(address);
		document.write(at_tdwbusiness_dot_com)
		document.write('</a>');
	}
	else
	{
		document.write('<a class="email" href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;');
		document.write(args[0]);
		document.write('&#64;'); /* at */
		document.write(args[1]);
		document.write('&#46;'); /* dot */
		document.write(args[2]);
		document.write('">');
		document.write(args[0]);
		document.write('&#64;');
		document.write(args[1]);
		document.write('&#46;');
		document.write(args[2]);
		document.write('</a>');
	}
}

function Popup(page, name, width, height, scroll) 
{
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	features = 'height=' + height + ',width=' + width + ',top=' + top + ',left=' + left + ',scrollbars=' + scroll + ',resizable=yes toolbar=no'
	win = window.open(page, name, features)
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}

