function setFocus() { document.forms[0].SurveyForum.focus(); } function whatisregion() { var doc = document.forms[0]; alert ( doc.SurveyRegion[doc.SurveyRegion.selectedIndex].text ); } function validateData() { var doc = document.forms[0]; if (document.forms[0].Organization[0].checked == false && document.forms[0].Organization[1].checked == false) { alert("Organization is required"); document.forms[0].Organization[0].focus(); return false; } if (document.forms[0].SurveyForumType[0].checked == false && document.forms[0].SurveyForumType[1].checked == false && document.forms[0].SurveyForumType[2].checked == false && document.forms[0].SurveyForumType[3].checked == false && document.forms[0].SurveyForumType[4].checked == false && document.forms[0].SurveyForumType[5].checked == false && document.forms[0].SurveyForumType[6].checked == false && document.forms[0].SurveyForumType[7].checked == false && document.forms[0].SurveyForumType[8].checked == false) { alert("Forum Type is required"); document.forms[0].Organization[0].focus(); return false; } if (document.forms[0].SurveyChapter[document.forms[0].SurveyChapter.selectedIndex].text == "Select Chapter Name") { alert("You must select a Chapter Name"); document.forms[0].SurveyChapter[document.forms[0].SurveyChapter.selectedIndex].focus(); return; } if(document.forms[0].SurveyModerator.value == "" || document.forms[0].SurveyModerator.value == null) { alert("You must enter the Moderator Name"); document.forms[0].SurveyModerator.focus(); return; } if(document.forms[0].ModeratorEmail.value == "" || document.forms[0].ModeratorEmail.value == null) { alert("You must enter the Moderator Email Address"); document.forms[0].ModeratorEmail.focus(); return; } if(document.forms[0].EmailAddresses.value == "" || document.forms[0].EmailAddresses.value == null) { alert("You must enter Member Email Addresses"); document.forms[0].EmailAddresses.focus(); return; } if(document.forms[0].ModeratorPassword.value == "" || document.forms[0].ModeratorPassword.value == null) { alert("You must enter the Moderator Password"); document.forms[0].ModeratorPassword.focus(); return; } if(document.forms[0].MemberPassword.value == "" || document.forms[0].MemberPassword.value == null) { alert("You must enter the Member Password"); document.forms[0].MemberPassword.focus(); return; } if(document.forms[0].EndMonth[document.forms[0].EndMonth.selectedIndex].text == "MM") { alert("You must select the Survey End Month"); document.forms[0].EndMonth.focus(); return; } if(document.forms[0].EndDay[document.forms[0].EndDay.selectedIndex].text == "DD") { alert("You must select the Survey End Day"); document.forms[0].EndDay.focus(); return; } if(document.forms[0].EndYear[document.forms[0].EndYear.selectedIndex].text == "YYYY") { alert("You must select the Survey End Year"); document.forms[0].EndYear.focus(); return; } f = document.forms[0]; var btn = valButton(f.FSFE); if (btn == null){ alert('Four-Step Forum Exploration answer is required') f.MilitaryID.focus(); } document.forms[0].submit(); } var win; function closePopWin(){ if(win != null) if(!win.closed) win.close(); } function LaunchWindow(url) { var Browser; Browser = navigator.userAgent; closePopWin(); win = window.open (url, "NewWin", "scrollbars=-1,toolbar=0,location=0,directories=0,status=1,menubar=0," + "width=790,height=700"); window.open } // Radio Button Validation // copyright Stephen Chapman, 15th Nov 2004,14th Sep 2005 // you may copy this function but please keep the copyright notice with it function valButton(btn) { var cnt = -1; for (var i=btn.length-1; i > -1; i--) { if (btn[i].checked) {cnt = i; i = -1;} } if (cnt > -1) return btn[cnt].value; else return null; }