// JavaScript Document// function to check that form elements aren't blankfunction checkrequired(which) {  var pass=true;  for (i=0;i<which.length;i++) {    var tempobj=which.elements[i];       if (((tempobj.type=="text"||tempobj.type=="textarea")&&          tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&          tempobj.selectedIndex==0)) {        pass=false;        break;      }      }  if (!pass) {    shortFieldName=tempobj.name.toUpperCase();	ms2=1;	if(shortFieldName=="CAT1"){		shortFieldName ="CATEGORY";		}	if(shortFieldName=="TITLE1"){		shortFieldName ="TITLE";		}	if(shortFieldName=="TEXT1"){		shortFieldName ="INSTRUCTIONS";			alert("Please give instructions for your recipe. ");		ms2=0;	}		if(ms2==1){    alert("The Recipe "+shortFieldName+" is required.");	}    return false;  } else {  alert("Thank You, we will review your recipe soon.");  return true;  }}