<!-- 
var charexp = /./
var letterexp = /[a-z]/i
var contactexp = /^[a-zA-Z_0-9_%!',"=&amp;#<>\s\.\?\-\$\(\)\+]*$/
var phonexp =  /^\d{10}/
var zipexp = /^\d{5}$|^\d{5}[\-\s]?\d{4}$/
var emailexp = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid email
var bademailexp = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // invalid email
var webexp = /http[s]*:\/\/[\w.\/]+/
var pwdexp = /^[a-zA-Z0-9]{4,12}$/
var lginexp = /^[a-zA-Z0-9]{4,12}$/
var nibsOrder = /^[C|K|W-X][9A-Z](0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[0-9]{4}$/i
var csrid = /^[A-Z][0-9]{6}$/i
var timecheck = /^([0-9]|[0-1][0-9]|2[0-3]):([0-5][0-9])$/
var minutecheck = /^\d{1,4}$/

function isValid(pattern, str) {
	return pattern.test(str)
}

function hasLetter(str) {
	return letterexp.test(str)
}

function hasChar(str) {
	return charexp.test(str)
}

function hasTime(str) {
	return timecheck.test(str)
}

function hasMin(str) {
	return minutecheck.test(str)
}

function hasMinute(str) {
        return minutecheck.test(str)
}

function stripChars(pattern, str) {
	return str.replace(pattern,"")
}

function stripNonDigits(str) {
	return str.replace(/[^0-9]/g,"")
}

function checkMultiple(frm,target) {
  // Walk through each option in the select list and 
  // check to see if it selected AND contains the target string
  for (var loop = 0; loop < frm.options.length; loop++) {
    if ( (frm.options[loop].selected == true) && (frm.options[loop].value.indexOf(target) != -1) ) {
      // If this option is selected and contains the target text we return true
      return true;
    }
  }              
  // Otherwise we got through the whole select list
  // without finding any matches so we return false
  return false;
}

function LTrim(str) {
	var whitespace = new String(" \t\n\r");
	var s = new String(str);

	if (whitespace.indexOf(s.charAt(0)) != -1) {
		var j=0, i = s.length;
		while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
		j++;
		s = s.substring(j, i);
	}
        return s;
}

function RTrim(str) {
	var whitespace = new String(" \t\n\r");
	var s = new String(str);

	if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
        	var i = s.length - 1;
		while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
		i--;
		s = s.substring(0, i+1);
	}
	return s;
}

	function Trim(str) {
		return RTrim(LTrim(str));
	}
	
	
function main(form) {
	if (!hasLetter(form.Name.value)) {
		alert("Please enter your name.")
		form.Name.focus()
		return false
	}
	
	if (!isValid(emailexp,form.Email.value) || isValid(bademailexp,form.Email.value)) {
	   	alert("Please enter a valid Email address.")
	   	form.Email.focus()
	   	return false
	}
	
	if (!isValid(contactexp,form.Comments.value)) {
	   	alert("Please enter a Comment using only letters, number and the following approved symbols   .   _  ?  $  #  %  !  '  (  )  <  >  ,  +  &  =  ")
	   	form.Comments.focus()
	   	return false
	}
	
	if (!hasChar(form.Phone.value)) {
		alert("Please enter your phone number.")
		form.Phone.focus()
		return false
	}
}
       
//-->