//C Functions //BEGINNING OF CHECKONLYONE FUNCTION function checkOnlyOne(fld, witch1) { unCheckAll() if (fld=="1") { thisform.TOB1[witch1-1].checked=true } else if (fld=="2") { thisform.TOB2[witch1-1].checked=true } else if (fld=="3") { thisform.TOB3[witch1-1].checked=true } else { thisform.TOB4.checked=true } } //END OF CHECKONLYONE FUNCTION //E Functions //BEGINNING OF EMAIL VALIDATION CHECK function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ //alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ return false } if (str.indexOf(at,(lat+1))!=-1){ return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ return false } if (str.indexOf(dot,(lat+2))==-1){ return false } if (str.indexOf(" ")!=-1){ return false } return true } //END OF EMAIL VALIDATION CHECK //H Functions //BEGINNING OF HIDE FUNCTION function hide(object) { if (document.getElementById && document.getElementById(object) != null) node = document.getElementById(object).style.visibility='hidden'; else if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'hidden'; else if (document.all) document.all[object].style.visibility = 'hidden'; } //END OF HIDE FUNCTION //BEGINNING OF HIPWIN FUNCTION function hipwin(site) { thewindow=window.open(site,"HIPAA","width=800,height=530,resizable=yes,scrollbars=yes,status=yes,toolbar=yes") } //END OF HIPWIN FUNCTION //M Functions //BEGINNING OF MIM FUNCTION function mim(site) { thewindow=window.open(site,"window2","width=691,height=530,resizable=no,scrollbars=yes,status=yes") } //END OF MIM FUNCTION //S Functions //BEGINNING OF SHOW FUNCTION function show(object) { if (document.getElementById && document.getElementById(object) != null) node = document.getElementById(object).style.visibility='visible'; else if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'visible'; else if (document.all) document.all[object].style.visibility = 'visible'; } //END OF SHOW FUNCTION //U Functions //BEGINNING OF UNCHECKALL FUNCTION function unCheckAll() { for (i=0; i < thisform.TOB1.length; i++) { thisform.TOB1[i].checked=false } for (i=0; i < thisform.TOB2.length; i++) { thisform.TOB2[i].checked=false } for (i=0; i < thisform.TOB3.length; i++) { thisform.TOB3[i].checked=false } thisform.TOB4.checked=false } //END OF UNCHECKALL FUNCTION //V Functions //BEGINNING OF VALIDATEHCC FUNCTION function validateHCC() { //alert("Beginning validateHCC function") allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.fName.value=="") { allOK=false errMsg+=newline+"First Name" thisform.fName.focus() } if(thisform.lName.value=="") { allOK=false errMsg+=newline+"Last Name" thisform.lName.focus() } if(thisform.compPrac.value=="") { allOK=false errMsg+=newline+"Company/Practice" thisform.compPrac.focus() } if(thisform.phone.value=="") { allOK=false errMsg+=newline+"Phone" thisform.phone.focus() } if(thisform.email.value=="") { allOK=false errMsg+=newline+"E-mail" thisform.confEmail.value="" thisform.email.focus() } if(thisform.confEmail.value=="") { allOK=false errMsg+=newline+"Confirm E-mail" thisform.confEmail.value="" thisform.confEmail.focus() } else if(thisform.confEmail.value!=thisform.email.value) { allOK=false errMsg+=newline+"E-mail and Confirm E-mail fields appear to be different" thisform.confEmail.value="" thisform.confEmail.focus() } if(thisform.TOB1[0].checked==false && thisform.TOB1[1].checked==false && thisform.TOB1[2].checked==false && thisform.TOB2[0].checked==false && thisform.TOB2[1].checked==false && thisform.TOB2[2].checked==false && thisform.TOB3[0].checked==false && thisform.TOB3[1].checked==false && thisform.TOB4.checked==false) { allOK=false errMsg+=newline+"Type of Business" } else if(thisform.TOB4.checked==true && thisform.TOBOther.value=="") { allOK=false errMsg+=newline+"Type of Business, Other, please indicate" thisform.TOBOther.focus() } if(thisform.Cat.selectedIndex==0) { allOK=false errMsg+=newline+"Question Category" thisform.Cat.focus() } else if(thisform.Cat.selectedIndex==1 && thisform.CatTrans.selectedIndex==0) { allOK=false errMsg+=newline+"Question Transaction" thisform.CatTrans.focus() } else if(thisform.Cat.selectedIndex==6 && thisform.CatOther.value=="") { allOK=false errMsg+=newline+"Question Other, please indicate" thisform.CatOther.focus() } if(thisform.question.value=="") { allOK=false errMsg+=newline+"Question" thisform.question.focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIDATEHCC FUNCTION //BEGINNING OF VALIFAC FUNCTION function valIFAC(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.ACName.value=="") { allOK=false errMsg+=newline+"Name" thisform.ACName.focus() } if(thisform.ACTitle.value=="") { allOK=false errMsg+=newline+"Title" thisform.ACTitle.focus() } if(thisform.ACEmail.value=="") { allOK=false errMsg+=newline+"E-mail Address" thisform.ACEmail.focus() } else { if(thisform.ACEmail.value.indexOf("@")==-1 || thisform.ACEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"E-mail Address"+newline+" Please enter your e-mail address in the format: EmailAddress@domain.ext" thisform.ACEmail.focus() } } if(thisform.ACConfirmEmail.value=="") { allOK=false errMsg+=newline+"Confirm E-mail Address" thisform.ACConfirmEmail.focus() } else { if(thisform.ACEmail.value!=thisform.ACConfirmEmail.value) { allOK=false errMsg+=newline+"E-mail Address and Confirm E-mail Address fields appear to be different. Please type your E-mail address twice to verify." thisform.ACConfirmEmail.value="" thisform.ACEmail.focus() thisform.ACEmail.select() } } if(thisform.ACPhn1.value.length<3 | thisform.ACPhn2.value.length<3 | thisform.ACPhn3.value.length<4) { allOK=false errMsg+=newline+"Phone number" thisform.ACPhn1.focus() } if(thisform.ACHPName.value=="") { allOK=false errMsg+=newline+"Practice/Company Name" thisform.ACHPName.focus() } if(thisform.ACAddress.value=="") { allOK=false errMsg+=newline+"Physical Location Address" thisform.ACAddress.focus() } if(thisform.ACCity.value=="") { allOK=false errMsg+=newline+"City" thisform.ACCity.focus() } if(thisform.ACState.selectedIndex==0) { allOK=false errMsg+=newline+"State" thisform.ACState.focus() } if(thisform.ACZip.value=="") { allOK=false errMsg+=newline+"ZIP Code" thisform.ACZip.focus() } if(thisform.ACWebSite.value=="") { allOK=false errMsg+=newline+"Web Site" thisform.ACWebSite.focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFAC FUNCTION //BEGINNING OF VALIFBG FUNCTION function valIFBG(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.BGName.value=="") { allOK=false errMsg+=newline+"Name" thisform.BGName.focus() } if(thisform.BGTitle.value=="") { allOK=false errMsg+=newline+"Title" thisform.BGTitle.focus() } if(thisform.BGEmail.value=="") { allOK=false errMsg+=newline+"E-mail address" thisform.BGEmail.focus() } else { if(thisform.BGEmail.value.indexOf("@")==-1 || thisform.BGEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"E-mail Address"+newline+" Please enter your e-mail address in the format: EmailAddress@domain.ext" thisform.BGEmail.focus() } } if(thisform.BGConfirmEmail.value=="") { allOK=false errMsg+=newline+"Confirm E-mail Address" thisform.BGConfirmEmail.focus() } else { if(thisform.BGEmail.value!=thisform.BGConfirmEmail.value) { allOK=false errMsg+=newline+"E-mail Address and Confirm E-mail Address fields appear to be different. Please type your E-mail address twice to verify." thisform.BGConfirmEmail.value="" thisform.BGEmail.focus() thisform.BGEmail.select() } } if(thisform.BGPhn1.value.length<3 || thisform.BGPhn2.value.length<3 || thisform.BGPhn3.value.length<4) { allOK=false errMsg+=newline+"Phone" thisform.BGPhn1.select() thisform.BGPhn1.focus() } if(thisform.BGLocName.value=="") { allOK=false errMsg+=newline+"Location Name" thisform.BGLocName.focus() } if(thisform.BGAddr1.value=="") { allOK=false errMsg+=newline+"Address 1" thisform.BGAddr1.focus() } if(thisform.BGCity.value=="") { allOK=false errMsg+=newline+"City" thisform.BGCity.focus() } if(thisform.BGState.selectedIndex==0) { allOK=false errMsg+=newline+"State" thisform.BGState.focus() } if(thisform.BGZip.value=="") { allOK=false errMsg+=newline+"ZIP Code" thisform.BGZip.focus() } if(thisform.BGAPhn1.value.length<3 || thisform.BGAPhn2.value.length<3 || thisform.BGAPhn3.value.length<4) { allOK=false errMsg+=newline+"Appointment Phone Number" thisform.BGAPhn1.select() thisform.BGAPhn1.focus() } if(thisform.BGWheelChairAcc[0].checked==false && thisform.BGWheelChairAcc[1].checked==false) { allOK=false errMsg+=newline+"Is this location wheelchair accessible?" thisform.BGWheelChairAcc[0].focus() } if(thisform.BGHearingImp[0].checked==false && thisform.BGHearingImp[1].checked==false) { allOK=false errMsg+=newline+"Is this location equipped for the hearing impaired?" thisform.BGHearingImp[0].focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFBG FUNCTION //BEGINNING OF VALIFBGINPUT FUNCTION function valIFBGInput(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.BGPHPName.value=="") { allOK=false errMsg+=newline+"Name" thisform.BGPHPName.focus() } if(thisform.BGPHPLicNum.value=="") { allOK=false errMsg+=newline+"SC License Number" thisform.BGPHPLicNum.focus() } if(thisform.BGPHPApp[0].checked==false && thisform.BGPHPApp[1].checked==false) { allOK=false errMsg+=newline+"Does this person accept appointment at this address?" thisform.BGPHPApp[0].focus() } if(thisform.BGPHPGender[0].checked==false && thisform.BGPHPGender[1].checked==false) { allOK=false errMsg+=newline+"Gender" thisform.BGPHPGender[0].focus() } if(thisform.BGPHPEmail.value!="") { if(thisform.BGPHPEmail.value.indexOf("@")==-1 || thisform.BGPHPEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"E-mail Address"+newline+" Please enter the affiliate's e-mail address in the format: EmailAddress@domain.ext" thisform.BGPHPEmail.focus() } else { if(thisform.BGPHPEmail.value!=thisform.BGPHPConfirmEmail.value) { allOK=false errMsg+=newline+"E-mail Address and Confirm E-mail Address fields appear to be different. Please type the affiliate's e-mail address twice to verify." thisform.BGPHPConfirmEmail.value="" thisform.BGPHPEmail.focus() thisform.BGPHPEmail.select() } } } if(thisform.BGPHPAgeRestrict.value=="") { allOK=false errMsg+=newline+"Age Restrictions" thisform.BGPHPAgeRestrict.focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFBGINPUT FUNCTION //BEGINNING OF VALIFES FUNCTION function valIFES(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.ESCounty.selectedIndex==0) { allOK=false errMsg+=newline + "Select the county your practice is located in to contact your Education Specialist." thisform.ESCounty.focus() } if(thisform.ESName.value=="") { allOK=false errMsg+=newline+"Name" thisform.ESName.focus() } if(thisform.ESCompName.value=="") { allOK=false errMsg+=newline+"Practice/Company Name" thisform.ESCompName.focus() } if(thisform.ESAddress.value=="") { allOK=false errMsg+=newline+"Physical Location Address" thisform.ESAddress.focus() } if(thisform.ESCity.value=="") { allOK=false errMsg+=newline+"City" thisform.ESCity.focus() } if(thisform.ESState.selectedIndex==0) { allOK=false errMsg+=newline+"State" thisform.ESState.focus() } if(thisform.ESZip.value=="") { allOK=false errMsg+=newline+"ZIP Code" thisform.ESZip.focus() } if(thisform.ESEmail.value=="") { allOK=false errMsg+=newline+"E-mail Address" thisform.ESEmail.focus() } else { if(thisform.ESEmail.value.indexOf("@")==-1 || thisform.ESEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"E-mail Address"+newline+" Please enter your e-mail address in the format: EmailAddress@domain.ext" thisform.ESEmail.focus() } } if(thisform.ESConfirmEmail.value=="") { allOK=false errMsg+=newline+"Confirm E-mail Address" thisform.ESConfirmEmail.focus() } else { if(thisform.ESEmail.value!=thisform.ESConfirmEmail.value) { allOK=false errMsg+=newline+"E-mail Address and Confirm E-mail Address fields appear to be different. Please type your E-mail address twice to verify." thisform.ESConfirmEmail.value="" thisform.ESEmail.focus() thisform.ESEmail.select() } } if(thisform.ESPhn1.value.length<3 || thisform.ESPhn2.value.length<3 || thisform.ESPhn3.value.length<4) { allOK=false errMsg+=newline+"Phone" thisform.ESPhn1.focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFES FUNCTION //BEGINNING OF VALIFSP FUNCTION function valIFSP(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.SPName.value=="") { allOK=false errMsg+=newline+"Name" thisform.SPName.focus() } if(thisform.SPTitle.value=="") { allOK=false errMsg+=newline+"Title" thisform.SPTitle.focus() } if(thisform.SPEmail.value=="") { allOK=false errMsg+=newline+"E-mail Address" thisform.SPEmail.focus() } else { if(thisform.SPEmail.value.indexOf("@")==-1 || thisform.SPEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"E-mail Address"+newline+" Please enter your e-mail address in the format: EmailAddress@domain.ext" thisform.SPEmail.focus() } } if(thisform.SPConfirmEmail.value=="") { allOK=false errMsg+=newline+"Confirm E-mail Address" thisform.SPConfirmEmail.focus() } else { if(thisform.SPEmail.value!=thisform.SPConfirmEmail.value) { allOK=false errMsg+=newline+"E-mail Address and Confirm E-mail Address fields appear to be different. Please type your E-mail address twice to verify." thisform.SPConfirmEmail.value="" thisform.SPEmail.focus() thisform.SPEmail.select() } } if(thisform.SPPhn1.value.length<3 || thisform.SPPhn2.value.length<3 || thisform.SPPhn3.value.length<4) { allOK=false errMsg+=newline+"Phone Number" thisform.SPPhn1.focus() } if(thisform.SPPHPName.value=="") { allOK=false errMsg+=newline+"Physicians' or Healthcare Professional's Name" thisform.SPPHPName.focus() } if(thisform.SPPHPLicNum.value=="") { allOK=false errMsg+=newline+"SC License Number" thisform.SPPHPLicNum.focus() } if(thisform.SPPHPGender[0].checked==false && thisform.SPPHPGender[1].checked==false) { allOK=false errMsg+=newline+"Gender" thisform.SPPHPGender[0].focus() } if(thisform.SPPHPEmail.value!="") { if(thisform.SPPHPEmail.value.indexOf("@")==-1 || thisform.SPPHPEmail.value.indexOf(".")==-1) { allOK=false errMsg+=newline+"Physicians' or Healthcare Professional's E-mail Address"+newline+" Please enter the e-mail address in the format: EmailAddress@domain.ext" thisform.SPPHPEmail.focus() } else { if(thisform.SPPHPConfirmEmail.value=="") { allOK=false errMsg+=newline+"Physicians' or Healthcare Professional's Confirm E-mail Address" thisform.SPPHPConfirmEmail.focus() } else { if(thisform.SPPHPEmail.value!=thisform.SPPHPConfirmEmail.value) { allOK=false errMsg+=newline+"Physicians' or Healthcare Professional's E-mail Address and Confirm E-mail Address fields appear to be different. Please type the E-mail address twice to verify." thisform.SPPHPConfirmEmail.value="" thisform.SPPHPEmail.focus() thisform.SPPHPEmail.select() } } } } if(thisform.SPPHPAgeRestrict.value=="") { allOK=false errMsg+=newline+"Age Restrictions" thisform.SPPHPAgeRestrict.focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFSP FUNCTION //BEGINNING OF VALIFSPINPUT FUNCTION function valIFSPInput(thisform) { allOK=true newline="\n" errMsg="Please complete the following fields as they are required for submission:" + newline if(thisform.SPLocName.value=="") { allOK=false errMsg+=newline+"Location Name" thisform.SPLocName.focus() } if(thisform.SPAddr1.value=="") { allOK=false errMsg+=newline+"Address 1" thisform.SPAddr1.focus() } if(thisform.SPCity.value=="") { allOK=false errMsg+=newline+"City" thisform.SPCity.focus() } if(thisform.SPState.selectedIndex==0) { allOK=false errMsg+=newline+"State" thisform.SPState.focus() } if(thisform.SPZip.value=="") { allOK=false errMsg+=newline+"ZIP Code" thisform.SPZip.focus() } if(thisform.SPApp[0].checked == false && thisform.SPApp[1].checked == false) { allOK=false errMsg+=newline+"Does this person accept appointments at this address?" thisform.SPApp[0].focus() } if(thisform.SPAPhn1.value.length<3 || thisform.SPAPhn2.value.length<3 || thisform.SPAPhn3.value.length<4) { allOK=false errMsg+=newline+"Appointment Phone Number" thisform.SPAPhn1.focus() } if(thisform.SPWheelChairAcc[0].checked == false && thisform.SPWheelChairAcc[1].checked == false) { allOK=false errMsg+=newline+"Is this location wheelchair accessible?" thisform.SPWheelChairAcc[0].focus() } if(thisform.SPHearingImp[0].checked == false && thisform.SPHearingImp[1].checked == false) { allOK=false errMsg+=newline+"Is this location equipped for the hearing impaired?" thisform.SPHearingImp[0].focus() } if(allOK==false) { alert(errMsg) } else { thisform.submit() } } //END OF VALIFSPINPUT FUNCTION //beginning of append area to links functions function getArea() { var issue = document.forms[0].db.value; return issue; } function loadPage() { var varea = getArea(); n=0 setlinks(varea, n); } function setlinks(v, n) { for (var i = n; i < document.links.length; i++) { var strQuestion = ''; //Use the search property of the link object to append the area if (document.links[i].search.indexOf('?') == -1) { strQuestion = '?'; } document.links[i].search = document.links[i].search + strQuestion + 'open&' + v; } } //end of append links functions