function ValidateEmail( Email )
	{
		var atCharPresent = false;
		var dotPresent = false;

		for ( var Idx = 0; Idx < Email.length; Idx++ )
		{
			if ( Email.charAt ( Idx ) == '@' )
				atCharPresent = true;
			if ( Email.charAt ( Idx ) == '.' )
				dotPresent = true;
		}

		if ( !atCharPresent || !dotPresent )
			return false;

		return true;
	}


function validate(theForm){
	if (theForm.name.value == ""){
		alert("Please fill in your name");
		theForm.name.focus();
		return false;
	}
	if (theForm.phone.value == ""){
		alert("Please fill in your Phone");
		theForm.phone.focus();
		return false;
	}
    if (theForm.email.value == ""){
		alert("Please fill in your Email");
		theForm.email.focus();
		return false;
	}
	if ( !ValidateEmail( theForm.email.value ) )
			{
				alert( "Invalid E-mail " + theForm.email.value );
				theForm.email.focus( );
				return false;
			}
    if (theForm.jobtitle.value == ""){
		alert("Please fill in your Job Title");
		theForm.jobtitle.focus();
		return false;
	}
}
