function isEmail(fieldval)
{
	re = /^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/;
	return re.test(fieldval);
}

function isNull(fieldval)
{
	re = /^\s{0,}$/;
	return re.test(fieldval);
}

function Comments()
{
	var returnvalue = false;
	if (document.commentsfrm.subject.value == "")
	{
		alert ('Please enter a subject.');
		document.commentsfrm.subject.focus();
	}
	else if (document.commentsfrm.name.value == "")
	{
		alert ('Please enter your name.');
		document.commentsfrm.name.focus();
	}
	else if (isNull(document.commentsfrm.emailaddress.value))
	{
		alert ('Please enter your email address.');
		document.commentsfrm.emailaddress.focus();

	}
	else if (!isEmail(document.commentsfrm.emailaddress.value))
	{
		alert ('Incorrect format for Email.  The Email address must be in the form name@company.com' );	
		document.commentsfrm.emailaddress.focus();
		document.commentsfrm.emailaddress.select(); 
		return false;
	}
	else if (isNull(document.commentsfrm.comments.value))
	{
		alert ('Please enter your comments.');
		document.commentsfrm.comments.focus();

	}
	else
	{
	returnvalue = true;
	}
	return returnvalue;
}//end password validate page
