// JavaScript Document	
function errorcheck_email(formField,errorElementId)
	{
		var formerror_mail = document.getElementById(errorElementId);
		write_to_element(formerror_mail,'');
		
		if ( formField.value == "" ) 
		{
			write_to_element(formerror_mail,'Please Include an Email Address');
			return false;	
		}
		else if (InvalidMail(formField.value))
		{
			write_to_element(formerror_mail,'Not a Valid Email Address');
			return false;
		}
		return true;
	}

	function InvalidMail(strAddress) 
	{
		var objRegExp  = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
				         
		if (objRegExp.test(strAddress)) 
		{
			return false;
		}
		else 
		{
			return true;
		}
	}
	
	// Allows you to write into an element such as a div or span
	// create a variable to hold the element by using getElementById then provide
	// this variable into the "el" of this function
	function write_to_element(el,value)
	{
		if(document.all){ el.innerText = value;} else { el.textContent = value; }	
		return true;
	}


