var testing = 0 var orderplaced = 0 var ordermodified = 0 this.why_on = new Image() this.why_on.src = "/graphics/nav_why_on.gif" this.about_on = new Image() this.about_on.src = "/graphics/nav_about_on.gif" this.system_on = new Image() this.system_on.src = "/graphics/nav_system_on.gif" this.supp_on = new Image() this.supp_on.src = "/graphics/nav_supp_on.gif" this.emf_on = new Image() this.emf_on.src = "/graphics/nav_emf_on.gif" this.contact_on = new Image() this.contact_on.src = "/graphics/nav_contact_on.gif" isIE = (navigator.appName.indexOf("Explorer")!=-1); isNet = (navigator.appName.indexOf("Netscape") != -1); function formCheck(form) { if (testing == 1) {return true} var fieldName = form.fname var userName = fieldName.value if (!userName) { alert("You must provide your first name.") //fieldName.focus() //fieldName.select() return false } var fieldName = form.lname var userName = fieldName.value if (!userName) { alert("You must provide your last name.") //fieldName.focus() //fieldName.select() return false } field = form.email userEmail = field.value if (!isEmail(userEmail)) { alert("Please include a proper email address.") //field.focus() //field.select() return false } if (!form.gender[0].checked) { if (!form.gender[1].checked) { //fieldName.focus() alert("You must provide your gender.") //fieldName.blur() return false } } return true } function isEmail(str) { // are regular expressions supported? var supported = 0 if (window.RegExp) { var tempStr = "a" var tempReg = new RegExp(tempStr) if (tempReg.test(tempStr)) supported = 1 } if (!supported) return (str.indexOf(".") > 2) && (str.indexOf("@") > 0) var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)") var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$") return (!r1.test(str) && r2.test(str)) } // check to see if the user has agreed or disagreed to the disclaimer then displays the coresponding page function checkdisclaimer(x) { if (x == "yes") { location.href = "https://start2health.securesites.com/s2h/supp_questions.html" } else { location.href = "http://www.start2health.com/index.html" } } function moreinfo(x) { var more_info = window.open( "https://start2health.securesites.com/cgi-bin/orders/moreinfo.cgi?product="+x, "moreinfo", "toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=612,height=414") more_info.focus() } function testimonials(x){ var testimonials_popup = window.open( "http://yip.start2health.com/cgi-bin/testimonials.cgi?testimonial="+x, "testimonials", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=504,height=385") testimonials_popup.focus() } function qtymodified() { ordermodified = 1 } function checkout() { if (ordermodified == 0) { document.checkoutform.submit() } else { alert("You must Update Totals before Checking Out.") } } function placeorder() { if (orderplaced == 0) { document.placeorderform.submit() orderplaced = 1 } else { alert("Please wait. Your order is being processed.") } } function setShippping() { if (document.form.sameaddress.checked) { document.form.s_name.value = document.form.name.value document.form.s_address.value = document.form.address.value document.form.s_city.value = document.form.city.value document.form.s_state.selectedIndex = document.form.state.selectedIndex document.form.s_zip.value = document.form.zip.value document.form.s_country.selectedIndex = document.form.country.selectedIndex } else { document.form.s_name.value = "" document.form.s_address.value = "" document.form.s_city.value = "" document.form.s_state.selectedIndex = "" document.form.s_zip.value = "" document.form.s_country.selectedIndex = "" } } function submitOrder() { document.form.submit() }