function MM_openBrWindow() { //v2.0
  window.open('exampleletter.php','top=75,left=150,width=540,height=490,scrollbars=no,resizable=no');
}
function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function check() {
  var okSoFar=true //-- Changes to false when bad field found.
  //-- Check the userName field, reject if blank.
 if (document.form1.firstname.value=="" && okSoFar) {
  okSoFar=false; alert("Please Enter Your First Name");
  document.form1.firstname.focus();
  return false;
  }
  
 if (document.form1.lastname.value=="" && okSoFar) {
  okSoFar=false; alert("Please Enter Your Last Name"); 
  document.form1.lastname.focus();
  return false;
  }
  
  if (document.form1.email.value=="" && okSoFar) {
  okSoFar=false; alert("Please Enter Your Email Address"); 
  document.form1.email.focus();
  return false;
  }    
  
   if (document.form1.contactno.value=="" && okSoFar) {
  okSoFar=false; alert("Please Enter a Contact Number"); 
  document.form1.contactno.focus();
  return false;
  }    
  



}
function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}