 function initPage(form) {
    form.custname.focus();
 }
 
 function trim(str) {
   return str;
 }
 
 function checkmandatory(ctl, value, name){
    if (trim(value) == "") {
        alert("Please specify the " + name + " field.");
        ctl.focus();
        return false;
    }
    return true;
 }
 
 function submitform(form) {
    if (!checkmandatory(form.custname, form.custname.value, "Name")) {
      return false;
    }
    if (!checkmandatory(form.email, form.email.value, "Email")) {
      return false;
    }
    
    if (!confirm("Are you sure want to submit your inquiry?")) {
      return;
    }
    form.submit();
 }
