/*
	System:			sidharta.com
	Copyright:	Timco Electronics Pty Ltd, All rights reserved
	Purpose:		Global js functions
	
	Author:			Tim Coy
	History:		12/11/03	TWC	Initial write
								
*/

/* 
	Global declarations
	====================
*/



/*
	Functions
	=========
*/

/*
	Email function
	Purpose:		hides the email address from spiders
	Arguments:	contact - the nominated recipient of the email
*/

function send(contact, subject) {
	var hostname = "sidharta.com.au";
	location.href = "mailto:" + contact + "@" + hostname + "?subject=" + subject;	
}

/*
	Dynamic CSS changer
	Purpose:		Dynamically alters the css style class providing hilighting of hyperlinks
	Arguments:	id - the dom id reference to the <a> tag
							condition - boolean passed from the mouseover event used to set 
													and reset the css style class
							
*/
function highLight(id, condition)
{
	var styleClass = document.getElementById(id).className
	if(condition)
		document.getElementById(id).className = "hilite_"+styleClass;
	else
		document.getElementById(id).className = styleClass.substr(7);
}

