function checkrequired(which) {
    var pass=true;
    var errmsg='';
    if (document.images) {
        for (i=0;i<which.length;i++) {
            var tempobj=which.elements[i];
            if (tempobj.name.substring(0,2)=="R_") {
                if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==0)) {
                    pass=false;
                    if (tempobj.alt.substring(0,30)=='') {
                        shortFieldName=tempobj.name.substring(2,30).toUpperCase();
                    }
                    else {
                        shortFieldName=tempobj.alt.substring(0,30).toUpperCase();
                    }
                    tempobj.style.backgroundColor="#feffcc"; 
                    if (errmsg=='') {
                        tempobj.focus(); 
                    }
                    errmsg+='--> '+shortFieldName+'\n'
                }
            }
        }
    }
    if (!pass) {
        errmsg='The following information is missing from your form:\n\n'+errmsg;
        alert(errmsg);
        return false;
    }
    else
    return true;
}

