// JavaScript Document

function validateName ()
{
		if (document.getElementById("name").value == null || document.getElementById("name").value == ""){
			alert("Name is a required field");
		}
}


function validateEmail ()
{
		if (document.getElementById("email").value == null || document.getElementById("email").value == ""){
			alert("Email is a required field");
		}
}

function validateCity ()
{
		if (document.getElementById("city").value == null || document.getElementById("city").value == ""){
			alert("City is a required field");
		}
}

function validateState ()
{
		if (document.getElementById("state").value == null || document.getElementById("state").value == ""){
			alert("State is a required field");
		}
}




function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false}
else {return true}
}
}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
 
}

function checkEmailCharacters(str)
{
	var illegalChars= /[\(\)\<\>\,\'\;\:\\\"\[\]]/ ;
	if (str.match(illegalChars))
	{
		return false
	}
}

