
function validForm(thisForm)
{

	if (thisForm["200contactname"].value == "") {
		alert("Please Enter a First Name");
		thisForm["200contactname"].focus();
		thisForm["200contactname"].select();
		return (false);
	}
	
	
	if (!checkEmail(thisForm["200email"].value)) {
		alert("Please Enter a Valid Email Address");
		thisForm["200email"].focus();
		thisForm["200email"].select();
		return (false);
	}
	
	thisForm["200username"].value = thisForm["200email"].value
	
	return true;
}

function cleanNumber (input, iMax) {

  s = input;
  //remove leading 1
  if (s.substring(0,1) == "1") s = s.substring(1);
  okChars = "1234567890";     // Characters to include
  var i;
  var strRet = "";
  
  for (i = 0; i < s.length; i++) {
    //alert (strRet + ":" + strRet.length);
    if (strRet.length == iMax) return strRet;
    var c = s.charAt(i);
    {if (okChars.indexOf(c) > -1) strRet += c;} 
  }
  
  return strRet;
}

function checkEmail(sEmail) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(sEmail)){
return (true)
}
return (false)
}

