function ratesSubmitHandler(sec) { error=true; errorText=""; mo = document.ratesForm.month.options[document.ratesForm.month.selectedIndex].value; yr = document.ratesForm.year.options[document.ratesForm.year.selectedIndex].value; st = document.ratesForm.state.options[document.ratesForm.state.selectedIndex].value; //check if month was selected if ((mo=="00") || (mo==null)) { error=false; errorText = "Please Select a Month\n"; } //check if year was selected if ( (yr=="00") || (yr==null) || (yr=="") ) { error=false; errorText += "Please Select a Year\n"; } //check if state was selected if ((st=="00") || (st==null)) { error=false; errorText += "Please Select a State"; } if(error==false) { alert(errorText); } else { loc="rates" + st +"?pageId=" + mo + yr + st + ".htm§ion=" + sec; document.ratesForm.action=loc; document.ratesForm.submit(); } } function newsSubmitHandler(sec) { error=true; errorText=""; st = document.newsForm.state.options[document.newsForm.state.selectedIndex].value; typ = document.newsForm.type.options[document.newsForm.type.selectedIndex].value; //check if state was selected if(st=="00") { error=false; errorText += "Please Select a State\n"; } //check if type was selected if(typ=="00") { error=false; errorText += "Please Select an Information Type"; } if(error==false) { alert(errorText); } else { loc= typ + st + "?section=" +sec; document.newsForm.action=loc; document.newsForm.submit(); } }