var arNames = new Array("First Name","Last Name","Email","Type of Question", "Comments or Questions");
function Validate(arNames,FrmName) {
  if (!FrmName) {
    FrmName='myForm';
  }
  Mssge1 = 'Sorry, ';
  Mssge2 = ' is a required field.';
  var VldTxt = 0; 
  var frmObj=eval('document.'+FrmName+'.elements');
  var ElNum = frmObj.length;
  for (var i=0;i<frmObj.length;i++) { // for all of the elements on the form..
    if ((frmObj[i].name.indexOf('rqd') > -1)) { // if the element has the letters 'rqd' in it's name..
      if (frmObj[i].type == 'select-one' || frmObj[i].type == 'select-multiple') { // If it's a list element(for Nav)..
        if (!frmObj[i].options[frmObj[i].selectedIndex].value) { // and if the element is empty..
          alert(Mssge1 + arNames[VldTxt] + Mssge2) //give a warning..
          frmObj[i].focus();
          return false; //return false to the form...
          break;        //exit out of the loop.
        }
      } else { // We have a regular old form field..
        if (!frmObj[i].value) {
          alert(Mssge1 + arNames[VldTxt] + Mssge2);
          frmObj[i].focus();
          return false;
          break;
        }
      }
      VldTxt++; // Increment the number of required fields based on the Rqd prefix
    } 
  } 
  return true;
} 