function checkform(theForm)
{

 
  //question1 checks
  if (theForm.company_name.value == "")
  {
    alert("Please enter a value for the \"Company Name\" field.");
    theForm.company_name.focus();
    return (false);
  }
  
  if (theForm.contact_name.value == "")
    {
      alert("Please enter a value for the \"Contact Name\" field.");
      theForm.contact_name.focus();
      return (false);
  }
  
  
  if (theForm.tel_no.value == "")
      {
        alert("Please enter a value for the \"Telephone No.\" field.");
        theForm.tel_no.focus();
        return (false);
    }
    
    
  if (theForm.e_mail.value == "")
      {
          alert("Please enter a value for the \"E-mail\" field.");
          theForm.e_mail.focus();
          return (false);
    }
  
}


// open new window
function openWindow(url, name, w, h) {
  popupWin = window.open(url, name, 'resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,status=yes,width=' + w + ',height=' + h);
}

function openAnyWindow(url, name) {
  var l = openAnyWindow.arguments.length;
  var w = "";
  var h = "";
  var features = "";

  for (i=2; i<l; i++) {
    var param = openAnyWindow.arguments[i];
    if ( (parseInt(param) == 0) || (isNaN(parseInt(param))) ) {
      features += param + ',';
    } else {
      (w == "") ? w = "width=" + param + "," :
        h = "height=" + param;
    }
  }

  features += w + h;
  var code = "popupWin = window.open(url, name";
  if (l > 2) code += ", '" + features;
  code += "')";
  eval(code);
}
