function validateDomain() { var sConfig = document.email_form.config.value; if (sConfig == '') { document.getElementById('emailMsg').innerHTML = "A domain name must be entered"; return false; } if (!sConfig.match(/(\.).{2}/)) { document.getElementById('emailMsg').innerHTML = "Invalid domain name"; return false; } if (sConfig.match(/:\/\/(.[^/]+)/)) var eDomain1 = sConfig.match(/:\/\/(.[^/]+)/)[1]; else eDomain1 = sConfig; var eDomain2 = eDomain1.split("."); if (eDomain2.length > 2) { eDomain2.splice(0,1); } var eDomain = eDomain2.join("."); var domain = new Array(); domain["281south.com"] = true;domain["abigailgrace.info"] = true;domain["areawideservices.com"] = true;domain["billspaintandbody.com"] = true;domain["bsccgatesville.com"] = true;domain["camelotbell.com"] = true;domain["cbwhitetailranchandresort.com"] = true;domain["centraltexasstriper.com"] = true;domain["christianvisionmexico.com"] = true;domain["chucksautocenter.com"] = true;domain["criticalmasstri.com"] = true;domain["debbyholmes.com"] = true;domain["digitalexploits.com"] = true;domain["docsonmain.com"] = true;domain["donnalifecoach.com"] = true;domain["dustinwayne.com"] = true;domain["equitytradeonline.com"] = true;domain["fibernetworktechnologies.com"] = true;domain["gransglamourbabies.com"] = true;domain["hogcreekicehouse.com"] = true;domain["hooksetguideservice.net"] = true;domain["hopeministriesfellowship.com"] = true;domain["iconwaco.com"] = true;domain["innovativesolutionsonline.com"] = true;domain["jhbrahmans.com"] = true;domain["ctwp.com"] = true;domain["komencentraltexas.org"] = true;domain["labellawaco.com"] = true;domain["landdevelopmentandbrushcontrol.com"] = true;domain["mackabernathy.com"] = true;domain["madisonelizabeth.com"] = true;domain["vickyconawayphotography.com"] = true;domain["prizmstaging.com"] = true;domain["rhsbobcats.net"] = true;domain["specialtyrestorationoftexas.com"] = true;domain["swanerbrahmans.com"] = true;domain["texasnbha22.com"] = true;domain["vhv-vetshelpingvets.com"] = true;domain["wacomargaritapartyrentals.com"] = true;domain["wiethorns.com"] = true;domain["womenofwaco.org"] = true;domain["centexbuzzfastpitch.com"] = true;domain["brazosbikerbash.com"] = true;domain["starsovertexas.com"] = true;domain["idoonadimewaco.com"] = true;domain["web4babies.com"] = true;domain["southlandbuilding.com"] = true;domain["nofishnocharge.com"] = true;domain["cdp-axiom.com"] = true;domain["summerskinspraytan.com"] = true;domain["legacycafeartgallery.com"] = true;domain["cmswaco.com"] = true;domain["focusonfitnesswaco.com"] = true;domain["praterbuilders.net"] = true;domain["holmes-realestate.com"] = true;domain["mistautoair.com"] = true;domain["mdapattyparty.org"] = true; if(domain[eDomain]) { document.getElementById('emailMsg').innerHTML = ""; return true; } else { document.getElementById('emailMsg').innerHTML = "The domain you entered is not hosted through us."; return false; } } function validateEmail(f){ var eAddress = document.email_form.f_email; var sConfig = document.email_form.config; if (eAddress.value == '') { return true; } if( !/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i.test(eAddress.value) ) { document.getElementById('emailMsg').innerHTML = "Invalid email address"; return false; } else { var ar = eAddress.value.split("@"); sConfig.value = ar[1]; document.getElementById('emailMsg').innerHTML = ""; } return true; } function validateLogin(){ var eAddress = document.getElementById("f_email"); var ePassword = document.getElementById("f_pass"); if (eAddress.value == '' ) { document.getElementById('emailMsg').innerHTML = "Email is a required field"; return false; } else if( ePassword.value == '' ) { document.getElementById('emailMsg').innerHTML = "Password is a required field"; return false; } else if( !/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i.test(eAddress.value) ) { document.getElementById('emailMsg').innerHTML = "Invalid email address"; return false; } if (!(validateDomain())) { document.getElementById('emailMsg').innerHTML = "The email address you entered isn't registered through us."; return false; } var ar = eAddress.value.split("@"); document.email_form.f_user.value = ar[0]; document.email_form.action = 'http://email.' + ar[1] + '/process.php'; return true; } function getStats(){ var eAddress = document.getElementById("f_email"); var ePassword = document.getElementById("f_pass"); if (eAddress.value == '' ) { document.getElementById('emailMsg').innerHTML = "Email is a required field"; return false; } else if( ePassword.value == '' ) { document.getElementById('emailMsg').innerHTML = "Password is a required field"; return false; } else if( !/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i.test(eAddress.value) ) { document.getElementById('emailMsg').innerHTML = "Invalid email address"; return false; } if (!(validateDomain())) { document.getElementById('emailMsg').innerHTML = "The email address you entered isn't registered through us."; return false; } var ar = eAddress.value.split("@"); document.email_form.f_user.value = ar[0]; document.email_form.action = 'stats.htm'; return true; }