function validateDomain() { var sConfig = document.stats_form.config.value; if (sConfig == '') { document.getElementById('statsMsg').innerHTML = "A domain name must be entered"; return false; } if (!sConfig.match(/(\.).{2}/)) { document.getElementById('statsMsg').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["areawideservices.com"] = true;domain["billspaintandbody.com"] = true;domain["bsccgatesville.com"] = true;domain["camelotbell.com"] = true;domain["cbwhitetailranchandresort.com"] = true;domain["christianvisionmexico.com"] = true;domain["chucksautocenter.com"] = true;domain["docsonmain.com"] = true;domain["donnalifecoach.com"] = true;domain["dustinwayne.com"] = true;domain["fibernetworktechnologies.com"] = true;domain["gransglamourbabies.com"] = true;domain["hogcreekicehouse.com"] = 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["vickyconawayphotography.com"] = 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["idoonadimewaco.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["mistautoair.com"] = true;domain["mdapattyparty.org"] = true; if(domain[eDomain]) { document.getElementById('statsMsg').innerHTML = ""; return true; } else { document.getElementById('statsMsg').innerHTML = "The domain you entered is not hosted through Innovative Solutions"; return false; } } function validateEmail(){ var eAddress = document.getElementById("email"); var sConfig = document.stats_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 = ""; document.getElementById('statsMsg').innerHTML = ""; } return true; } function validateLogin(){ var eAddress = document.getElementById("email"); var ePassword = document.getElementById("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 Innovative Solutions"; return false; } var ar = eAddress.value.split("@"); document.email_form.user.value = eAddress.value; document.email_form.action = 'http://www.' + ar[1] + ':2095/login/'; return true; }