function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

 function checkform()
{
       
 
        if (document.commentform.author.value == '') {
        alert('Please input your name');
        document.commentform.author.focus();
        return false;
        }
  		if (document.commentform.email.value == "") {
    	alert("Please input an email address.");
    	document.commentform.email.focus();
    	return (false);
  		}
  		if (!isEmailAddr(document.commentform.email.value)) {
    	alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    	document.commentform.email.focus();
    	return (false);
  		}
  		if (document.commentform.comment.value == '') {
        alert('Please input your comment');
        document.commentform.comment.focus();
        return false;
        }

        return true;
}