function stripString (s) { filteredValues = "!@#$%^&*()_+;'<>?,/~`'" // Characters stripped out var i; var returnString = ""; for (i = 0; i < s.length; i++) { var c = s.charAt(i); if (filteredValues.indexOf(c) == -1) returnString += c; } return returnString; } function formCheck() { var subje, descr, emailaddr, realphone; document.Form.subject.value = stripString(document.Form.subject.value); subje = document.Form.subject.value.toUpperCase(); descr = document.Form.description.value.toUpperCase(); emailaddr = document.Form.email.value.toUpperCase(); realphone = document.Form.phone.value.toUpperCase(); if (document.Form.name.value=="") { alert("Please enter your name");document.Form.name.focus();return false } if (document.Form.name.value.length<3) { alert("Please enter your name");document.Form.name.focus();return false } if (document.Form.email.value=="" && document.Form.phone.value=="") { alert("You are required to enter a valid email address or phone number.");document.Form.email.focus();return false } if (document.Form.email.value!="") { if (document.Form.email.value.indexOf("@")==-1 || document.Form.email.value.indexOf(".")==-1 || document.Form.email.value.indexOf(" ")!=-1 || document.Form.email.value.length<6) { alert("Sorry, your email address is not valid.");document.Form.email.focus();return false }} if (document.Form.email.value=="jill@ebtech.net" || document.Form.email.value=="jill@sarnia.com") { alert("You are not authorized to post under this name, continued attempts will result in prosecution");location.href='http://www.csc-scc.gc.ca';return false } if (subje.indexOf("SATELLITE")!=-1 && document.Form.phone.value.length<6) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();location.href='http://classified.sarnia.com/guide.asp';return false } if (emailaddr.indexOf("HITMAIL")!=-1) { alert("Sorry, your entry was rejected by our form processor.");document.Form.reset();document.Form.subject.focus();return false } if (descr.indexOf("DTV")!=-1 && descr.indexOf("EMULATOR")!=-1) { alert("Our form processor has rejected this ad because of content. If you believe this is in error, contact webman@sarnia.com.");document.Form.reset();document.Form.subject.focus();location.href='http://classified.sarnia.com/guide.asp';return false } if (descr.indexOf("FLASH")!=-1 && descr.indexOf("WEBSITE")!=-1) { alert("Our form processor has rejected this ad because of content. If you believe this is in error, contact webman@sarnia.com.");document.Form.reset();document.Form.subject.focus();location.href='http://classified.sarnia.com/guide.asp';return false } if (emailaddr.indexOf("BONZAI-PIPELINE")!=-1) { alert("Game over. You are no longer welcome to post here.");document.Form.reset();document.Form.subject.focus();return false } if (emailaddr.indexOf("NETNRD")!=-1) { alert("Script Timeout.");document.Form.reset();location.href='http://classified.sarnia.com';return false } if (descr.indexOf("ONESTOPCOMPUTER")!=-1) { alert("Game over. You are no longer welcome to post here.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("DIRECTHU")!=-1 || descr.indexOf("DIRECTHU")!=-1) { alert("Game over. You are no longer welcome to post here.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("OUTWAR")!=-1 || descr.indexOf("OUTWAR")!=-1) { alert("Our form processor has rejected this ad because of content.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("E-M-U")!=-1 || descr.indexOf("E-M-U")!=-1) { alert("Our form processor has rejected this ad because of content. If you believe this is in error, contact webman@sarnia.com.");document.Form.reset();document.Form.subject.focus();location.href='http://classified.sarnia.com/guide.asp';return false } if (subje.indexOf("ONESTOPCOMPUTER")!=-1) { alert("Game over. You are no longer welcome to post here.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("SAT. PROGRAMMING")!=-1) { alert("One more and we block your whole domain - you can deal with them :) ");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("HU FIX")!=-1) { alert("Sorry, our form processor was unable to process your submission based on the content..");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("SARNIAROCKS")!=-1 || descr.indexOf("SARNIAROCKS")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("SATELLITE SYSTEM")!=-1 || descr.indexOf("SATELLITE SYSTEM")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("NEVER GET HIT AGAIN")!=-1 || descr.indexOf("NEVER GET HIT AGAIN")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("CLASSIFIEDS.XCELCO.ON.CA")!=-1 || descr.indexOf("CLASSIFIEDS.XCELCO.ON.CA")!=-1) { alert("How great they must be.");document.Form.reset();location.href='http://www.ebtech.net';return false } // Stupid f#$ktards... I will win. if (subje.indexOf("LAMBTONCOUNTY.COM")!=-1 || descr.indexOf("LAMBTONCOUNTY.COM")!=-1) { alert("Having difficulty reading?");document.Form.reset();location.href='http://www.ebtech.net';return false } // This guy even had the nerve to say he developed schoolbusinfo.com if (subje.indexOf("HASHING FIX")!=-1 || descr.indexOf("HASHING FIX")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("P3 CARD")!=-1 || descr.indexOf("P3 CARD")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("PLEASE STAND BY")!=-1 || descr.indexOf("PLEASE STAND BY")!=-1) { alert("Whoops, our form processor didn't like your input. Try again.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("DIRECT SAVER")!=-1 || descr.indexOf("DIRECT SAVER")!=-1) { alert("Is there really a need to list a business name?");document.Form.reset();document.Form.subject.focus();return false } if (emailaddr.indexOf("@FASTMAIL.CA")!=-1) { alert("Because of continued abuse from the FASTMAIL.CA domain, posting privileges have been removed.");document.Form.reset();location.href='http://www.cnn.com';return false } if (subje.indexOf("PUPPIES")!=-1 || descr.indexOf("PUPPIES")!=-1) { alert("This site was not meant for the pet trade.");document.Form.reset();document.Form.subject.focus();return false } if (document.Form.email.value=="fake@email.com" || document.Form.email.value=="no@mail.com" || document.Form.email.value=="not@mail.com" || document.Form.phone.value=="no@email.com" || document.Form.phone.value=="none@none.com" || document.Form.email.value=="not@email.com" || document.Form.email.value=="not@hotmail.com" || document.Form.email.value=="no@e-mail.com") { alert("Please insert a valid e-mail address.");document.Form.reset();location.href='http://classified.sarnia.com/guide.asp';return false } if (document.Form.password.value=="") { alert("Please enter a password");document.Form.password.focus();return false } if (document.Form.subject.value=="" || document.Form.subject.value==" " || document.Form.subject.value==" ") { alert("What would you like to buy or sell?");document.Form.subject.focus();return false } if (document.Form.description.value.indexOf("://")!=-1) { alert("The string :// is not allowed in the Description field.");document.Form.description.focus();return false } if (subje.indexOf("DSS")!=-1 || descr.indexOf("DSS")!=-1 || subje.indexOf(" H U CARD")!=-1 || descr.indexOf(" H U CARD")!=-1 || subje.indexOf("FOOTBALL CARD")!=-1 || descr.indexOf("FOOTBALL CARD")!=-1 || subje.indexOf(" H CARD")!=-1 || descr.indexOf(" H CARD")!=-1 || subje.indexOf(" HU CARD")!=-1 || descr.indexOf(" HU CARD")!=-1) { alert("Because of their 'grey' nature, we have been requested to not allow postings about US satellite TV service.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("D-T-V")!=-1 || descr.indexOf("D-T-V")!=-1){ alert("Because of their 'grey' nature, we have been requested to not allow postings about US satellite TV service.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("D--T--V")!=-1 || descr.indexOf("D--T--V")!=-1){ alert("Because of their 'grey' nature, we have been requested to not allow postings about US satellite TV service.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("WEBPAGE DESIGN")!=-1 || descr.indexOf("WEBPAGE DESIGN")!=-1 || subje.indexOf("WEB DESIGN")!=-1 || descr.indexOf("WEB DESIGN")!=-1) { alert("This is not the avenue to promote or solicit the development of webpages. Contact sales@ebtech.net");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("WEBPAGE")!=-1 && subje.indexOf("CREATION")!=-1) { alert("This is not the avenue to promote or solicit the development of webpages. Contact sales@ebtech.net");document.Form.reset();document.Form.subject.focus();return false } if (descr.indexOf("WEB")!=-1 && descr.indexOf("DESIGN")!=-1) { alert("This is not the avenue to promote or solicit the development of webpages. Contact sales@ebtech.net");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("YARD SALE")!=-1 || subje.indexOf("GARAGE SALE")!=-1) { alert("Garage/Yard sale listings are not posted in the general classifieds section");document.Form.reset();location.href='http://classified.sarnia.com/garagesales';return false } if (descr.indexOf("YARD SALE")!=-1 || descr.indexOf("GARAGE SALE")!=-1) { alert("Garage/Yard sale listings are not posted in the general classifieds section");document.Form.reset();location.href='http://classified.sarnia.com/garagesales';return false } if (descr.indexOf("RTOLAMBTON.ON.CA")!=-1 || subje.indexOf("RTOLAMBTON.ON.CA")!=-1) { alert("For a retired teacher, you have a hard time reading.");document.Form.reset();document.Form.subject.focus();return false } if (descr.indexOf("SARNIACHAT")!=-1 || subje.indexOf("SARNIACHAT")!=-1) { alert("If your site is so good for advertising, why are you posting on ours? Get lost.");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("WEB")!=-1 && subje.indexOf("DESIGN")!=-1) { alert("This is not the avenue to promote or solicit the development of webpages. Contact sales@ebtech.net");document.Form.reset();document.Form.subject.focus();return false } if (descr.indexOf("WEB")!=-1 && descr.indexOf("CREATION")!=-1) { alert("This is not the avenue to promote or solicit the development of webpages. Contact sales@ebtech.net");document.Form.reset();document.Form.subject.focus();return false } if (subje.indexOf("SEX")!=-1 || subje.indexOf("PUSSY")!=-1 || subje.indexOf(" ASS ")!=-1 || subje.indexOf("FUCK")!=-1 || subje.indexOf("PROSTIT")!=-1 || subje.indexOf(" ANAL ")!=-1 || subje.indexOf(" TIT ")!=-1 || subje.indexOf(" TITS ")!=-1 || subje.indexOf("CUNT")!=-1 || subje.indexOf("BITCH")!=-1 || subje.indexOf(" COCK ")!=-1 || subje.indexOf(" SUCK ")!=-1) { alert("Profanity is not acceptable. Please do not attempt to use such.");document.Form.subject.focus();return false } if (subje.indexOf(" CLIT")!=-1 || subje.indexOf("WHORE")!=-1 || subje.indexOf("SLUT")!=-1 || subje.indexOf(" DINK ")!=-1 || subje.indexOf("NIGGER")!=-1 || subje.indexOf("CHINK")!=-1 || subje.indexOf("REDNECK")!=-1 || subje.indexOf(" PISS")!=-1 || subje.indexOf(" SPIC ")!=-1 || subje.indexOf("PEDOPHILE")!=-1 || subje.indexOf("HOOKER")!=-1) { alert("Profanity is not acceptable. Please do not attempt to use such.");document.Form.subject.focus();return false } if (descr.indexOf("SEX")!=-1 || descr.indexOf("PUSSY")!=-1 || descr.indexOf(" ASS ")!=-1 || descr.indexOf("FUCK")!=-1 || descr.indexOf("PROSTIT")!=-1 || descr.indexOf(" ANAL ")!=-1 || descr.indexOf(" TIT ")!=-1 || descr.indexOf(" TITS ")!=-1 || descr.indexOf("CUNT")!=-1 || descr.indexOf("BITCH")!=-1 || descr.indexOf(" COCK ")!=-1 || descr.indexOf(" SUCK ")!=-1) { alert("Profanity is not acceptable. Please do not attempt to use such.");document.Form.description.focus();return false } if (descr.indexOf(" CLIT")!=-1 || descr.indexOf("WHORE")!=-1 || descr.indexOf("SLUT")!=-1 || descr.indexOf(" DINK ")!=-1 || descr.indexOf("NIGGER")!=-1 || descr.indexOf("CHINK")!=-1 || descr.indexOf("REDNECK")!=-1 || descr.indexOf(" PISS")!=-1 || descr.indexOf(" SPIC ")!=-1 || descr.indexOf("PEDOPHILE")!=-1 || descr.indexOf("HOOKER")!=-1) { alert("Profanity is not acceptable. Please do not attempt to use such.");document.Form.description.focus();return false } if (document.Form.phone.value.indexOf("555")!=-1 && document.Form.phone.value.indexOf("1212")!=-1) { alert("Our form processor has rejected this ad because of content. If you believe this is in error, contact webman@sarnia.com.");document.Form.reset();document.Form.subject.focus();return false } if (emailaddr=="FASHIKHANG@HOTMAIL.COM" || descr.indexOf("GLOBALWEBSHOSTING") !=-1 || subje.indexOf("GLOBALWEBSHOSTING") != -1 || emailaddr=="ASIFZESHAN17@HOTMAIL") //|| (descr.indexOf("globalwebshosting") !=-1)) { alert("You have logged numerous violations and our server has taken steps to prevent you from posting. Attempting to avoid the ban will result in us contacting your ISP and, failing that, blocking your complete domain from posting.");document.Form.reset();location.href='http://classified.sarnia.com/guide.asp';return false } if (confirm("\nClick OK if you have NOT posted an ad on Sarnia Online Classifieds for this particular item in the last 7 days.\n")) { document.forms[0].submit(); } else { document.Form.reset();location.href='http://classified.sarnia.com/guide.asp?js=C';return false } if (document.Form.description.value.indexOf("<")!=-1) { alert("HTML tags are not allowed.");document.Form.description.focus();return false } }