function trim(B){if(B!=null){var A;for(A=0;A<B.length;A++){if(B.charAt(A)!=" "){B=B.substring(A,B.length);break}}for(A=B.length-1;A>=0;A--){if(B.charAt(A)!=" "){B=B.substring(0,A+1);break}}if(B.charAt(0)==" "){return""}else{return B}}}function validateRequired(E){var D=true;var C=null;var B=0;var A=new Array();oRequired=new required();for(x in oRequired){if((E[oRequired[x][0]].type=="text"||E[oRequired[x][0]].type=="textarea"||E[oRequired[x][0]].type=="select-one"||E[oRequired[x][0]].type=="radio"||E[oRequired[x][0]].type=="password")&&E[oRequired[x][0]].value==""){if(B==0){C=E[oRequired[x][0]]}A[B++]=oRequired[x][1];D=false}}if(A.length>0){C.focus();alert(A.join("\n"))}return D}window.defaultStatus=document.title;function highlightFormElements(){addFocusHandlers(document.getElementsByTagName("input"));addFocusHandlers(document.getElementsByTagName("textarea"))}function addFocusHandlers(A){for(i=0;i<A.length;i++){if(A[i].type!="button"&&A[i].type!="submit"&&A[i].type!="reset"&&A[i].type!="checkbox"&&A[i].type!="radio"){if(!A[i].getAttribute("readonly")&&!A[i].getAttribute("disabled")){A[i].onfocus=function(){this.style.backgroundColor="#ffd";this.select()};A[i].onmouseover=function(){this.style.backgroundColor="#ffd"};A[i].onblur=function(){this.style.backgroundColor=""};A[i].onmouseout=function(){this.style.backgroundColor=""}}}}}function highlightTableRows(D){var A=null;var C=document.getElementById(D);var B=C.getElementsByTagName("tbody")[0];var E;if(B==null){E=C.getElementsByTagName("tr")}else{E=B.getElementsByTagName("tr")}for(i=0;i<E.length;i++){E[i].onmouseover=function(){A=this.className;this.className+=" over"};E[i].onmouseout=function(){this.className=A}}};