function checkFields(formObj) 
{
var missinginfo = "";
var emailValue= formObj.formemail.value;
var confirmValue;

	if (emailValue == "")
	{		
		missinginfo += "\n     -  Please enter your email address";
	}

	if (emailValue != "") 
	{


		var reg=/^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+([a-z]{2,3})$/;

		var match=reg.exec(emailValue);

		if (match==null)	{
			missinginfo+="\n     -  Email Address is invalid.";
		}
	}

	if ((formObj.formconfirmemail) && (emailValue != ""))
	{
		confirmValue = formObj.formconfirmemail.value;

		if (confirmValue != emailValue)
		{
			missinginfo += "\n     -  The email and confirm email fields do not match";
		}
	}

	if (formObj.formsubject.value == "") 
	{
		missinginfo += "\n     -  Please enter a subject";
	}

	if (formObj.formmessage.value == "") 
	{
		missinginfo += "\n     -  Please enter a message";
	}

	if (missinginfo != "") 
	{
		missinginfo ="Please correct the following errors:\n" + missinginfo;
		alert(missinginfo);
		return false;
	}
	else 
		return true;
}


