Begin
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i&lt;which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)==&quot;required&quot;) {
if (((tempobj.type==&quot;text&quot;||tempobj.type==&quot;textarea&quot;)&amp;&amp;
tempobj.value=='')||(tempobj.type.toString().charAt(0)==&quot;s&quot;&amp;&amp;
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert(&quot;Please make sure the &quot;+shortFieldName+&quot; field was properly completed.&quot;);
return false;
}
else
return true;
}