function CorrectEmailAddress( elementId, subject )
{
  	var protocol = "a";
	var anchor = document.getElementById(elementId);
	protocol += "i";
	protocol = "m" + protocol;
	protocol += "lt";
	
	if ((anchor != null) && (anchor.href != null))
	{
		protocol += "o:";
	  	var emailText = anchor.innerHTML;
	  	var href = protocol + emailText;
	  	
	  	if ((subject != null) && (subject.length > 0))
	  	{
			href += "?subject=" + subject;
	  	}
		anchor.href = href;
		anchor.innerHTML = emailText;
		anchor.target = "";
	}
}
