// JavaScript Document
function validate(theForm)
{
	noerrors = true;
	missings = "\n"; 
	if(theForm.fname.value == "")
 	{
    	alert ("Please supply your name");
		theForm.fname.focus();
      	return (false);
  	}
	if(theForm.email.value == "")
 	{
    	alert ("Please supply your e-mail address");
		theForm.email.focus();
      	return (false);
  	}

	apos=theForm.email.value.indexOf("@");
	dotpos=theForm.email.value.lastIndexOf(".");
	lastpos=theForm.email.value.length-1;
	if (apos < 1 || dotpos - apos < 2 || lastpos - dotpos > 3 || lastpos - dotpos < 2)
	{
		alert ("Please supply valid e-mail address");
		theForm.email.select();
      	return (false);
	}
	if (theForm.comments.value == "")
	{
		alert ("Please drop your comments");
		theForm.comments.focus();
      	return (false);
	}
	if (noerrors == true)
	{
		return (true);
	}
	else
	{
		message = "Please enter the fields marked by an asterix!";
		alert (message);
		return (false);
	}
}
