function checkrequired(which) {
  var pass=true;
  for (i=0;i<which.length;i++) {
    var tempobj=which.elements[i];
    if (tempobj.id.substring(0,8)=="required") {
      if ((tempobj.value=="")||(tempobj.type.toString().charAt(0)=="s" && tempobj.selectedIndex.value=="")) {
        pass=false;
        break;
      }
    }
  }
  if (!pass) {
    shortFieldName=tempobj.id.substring(8,30);
	shortFieldName=shortFieldName.replace(/_/," ")
    alert("The "+shortFieldName+" field is a required field.");
    return false;
  } else {
  return true;
  }
}
