function check_form(form){return getFormState(form);}function getFormState(thisForm){if(!thisForm)return false;for(x=0;thisForm[x];x++){if(getValue(thisForm,thisForm[x].name)==''&thisForm[x].title!=''){thisForm[x].focus();alert(thisForm[x].title);thisForm[x].focus();return false;}}return true;}function getFormStr(thisForm){if(!thisForm)return false;$s='';for(x=0;thisForm[x];x++){if(thisForm[x].name!=undefined)$s+='&'+thisForm[x].name+'='+escape(getValue(thisForm,thisForm[x].name));}return $s;}function countInstances(string1,word){var substrings=string1.split(word);alert(string1);return substrings.length-1;}function myFunction(somestring){var splitArray=somestring.split('|');for(var v=0;v<splitArray.length;v++){alert('str'+(v+1)+'="'+splitArray[v]+'"');}}function getFormObj(thisForm,thisName){var found=0;for(i=0;thisForm[i];i++){if(thisForm[i].name==thisName){return thisForm[i];found=1;}}if(found==0)alert("Error: Could not locate "+thisName+" in "+thisForm+".  function getFormObj() ");}function setSelectToValue(thisSelect,thisValue){var found=0;if(thisSelect.length==0)return '';for(i=0;thisSelect[i];i++){if(thisSelect[i].value==thisValue){thisSelect[i].selected=true;found=1;}}if(found==0){alert("Error: Could not locate "+thisValue+" in "+thisSelect+".  function setSelectToValue() ");}}function getSelectOptionOfThisValue(thisSelect,thisValue){var found=0;if(thisSelect.length==0)return '';for(i=0;thisSelect[i];i++){if(thisSelect[i].value==thisValue){found=1;return i;}}if(found==0){alert("Error: Could not locate "+thisValue+" in "+thisSelect+". function getSelectOptionOfThisValue() ");}}function getSelectValue(thisSelect){var found=0;if(thisSelect.length==0)return '';for(y=0;thisSelect[y];y++){if(thisSelect[y].selected==true){found=1;return thisSelect[y].value;}}return '';}function getValue(thisForm,thisName){var found=0;var thisValue='';if(thisForm.length==0)return '';for(i=0;thisForm[i];i++){if(thisForm[i].name==thisName){switch(thisForm[i].tagName.toUpperCase()){case 'INPUT':{switch(thisForm[i].type.toUpperCase()){case 'CHECKBOX':{if(thisForm[i].checked==true)thisValue=thisForm[i].value;break;}case 'RADIO':{if(thisForm[i].checked==true)thisValue=thisForm[i].value;break;}default:thisValue=thisForm[i].value;}break;}case 'SELECT':{thisValue=getSelectValue(thisForm[i]);break;}case 'TEXTAREA':{thisValue=thisForm[i].value;break;}default:thisValue=thisForm[i].value;}found=1;}}if(found==0){alert("Error: Could not locate "+thisName+" in "+thisForm+". function getValue() ");}return thisValue;}