<!--
function validateZIP(field) {
		var valid = "0123456789-";
		var hyphencount = 0;
		
		if (field.length!=5 && field.length!=10) {
		alert("Please enter your 5 digit or 5 digit+4 zip code.");
		return false;
		}
		for (var i=0; i < field.length; i++) {
		temp = "" + field.substring(i, i+1);
		if (temp == "-") hyphencount++;
		if (valid.indexOf(temp) == "-1") {
		alert("Invalid characters in your zip code.  Please try again.");
		return false;
		}
		if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
		alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
		return false;
		   }
		}
		return true;
}
function validateEmail(field) {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(field)){
		return (true)
		}
		alert("Invalid E-mail Address! Please re-enter.")
		return (false)
}
function validateAlphas(field) {
		if (/^[A-z -]+$/.test(field)){
		return (true)
		}
		alert("Please do not include punctuation or numbers in this field")
		return (false)
}
function validateNums(field) {
		if (/^[0-9\.]+$/.test(field)){
		return (true)
		}
		alert("Please do not include punctuation,alphas or spaces in this field")
		return (false)
}
function validateRegex(field,$special) {
		$blah="/^"+$special+"+$/";
		if (eval($blah).test(field)){
		return (true)
		}
		alert("You have entered a non-allowable character\n")
		return (false)
}
function validateAllow(field,$special) {
		var valid = $special;
		for (var i=0; i < field.length; i++) 
		{
		temp = "" + field.substring(i, i+1);
		if (temp == "-") {  hyphencount++; }
		if (valid.indexOf(temp) == "-1") {
			alert('Invalid characters used.');
			return false;
		}}
		return (true);
		
}

function validateForm($fieldname,$form_check) 
{ 
	if ($form_check!='')   
	{
		$form_check = $form_check.split(',');
		//alert($form_check[1]);
		
		if ($fieldname!='')
		{	
		
			if ($form_check[0]=='zip')				{ validateZIP($fieldname);				}
			if ($form_check[0]=='email')			{ return(validateEmail($fieldname));			}
			if ($form_check[0]=='alphas')			{ validateAlphas($fieldname);			}
			if ($form_check[0]=='numeric')			{ validateNums($fieldname);				}
			if ($form_check[0]=='allowable')		{ validateAllow($fieldname,$form_check[1]);	}
			if ($form_check[0]=='regex')			{ validateAllow($fieldname,$form_check[1]);	}
		}
	}
	else	{	alert('Error: Form Validation not called properly');   }
}
//-->
