		    function validContact(form) 
{
	name = form.name.value;
	email = form.email.value;
	comments = form.comments.value;
	
	if(name==null || name=="") 
	{
		alert ("\nYou did not enter a name. Please try again.")
		form.name.focus();
		return false;
	}  
	if(email==null || email=="") 
	{
		alert ("\nYou did not enter an email address. Please try again.")
		form.email.focus();		
		return false;
	}
    else
    {
		if(!emailValidation(form.email))
		return false;
    }
	
	if(comments==null || comments=="") 
	{
		alert ("\nYou did not enter any comments. Please try again.")
		form.comments.focus();		
		return false;
	}


	return true;
    }


function emailValidation(textBox)
{
	with(textBox)
	{
		aposition=value.indexOf("@");
		dotposition=value.lastIndexOf(".");
		lastposition=value.length-1;
		if(aposition < 1 || 
			dotposition - aposition < 2 ||
			lastposition - dotposition > 3 ||
			lastposition - dotposition < 2)
		{
			alert ("\nYou did not enter a valid E-mail address. Please re-enter your E-mail address.")
			form.email.focus();
			return false;
		}
			return true;
	}
}
