function findChattyWords(a){forbiddenWords=new RegExp("( btw )","i");if(a.match(forbiddenWords)){alert("Please don't use TXT talk in a written story such as '"+RegExp.$1+"'");return true}else{return false}}function validate(d){if(d.thename){var a=d.thename.value}if(d.email){var h=d.email.value}var b=d.country.options[d.country.options.selectedIndex].value;var g=d.us_states.options[d.us_states.options.selectedIndex].value;var c=d.storytitle.value;var i=d.story.value;var e=d.about_users_comments.options[d.about_users_comments.options.selectedIndex].value;if(d.terms){var f=d.terms}username_illegal_chars=new RegExp("[^ .A-Za-z0-9-]");title_illegal_chars=new RegExp("[^ .':?,A-Za-z0-9-]");find_commas=new RegExp(",");if(findLeetSpeak(i)){return false}if(findCurseWords(i)){return false}if(findTextAbuse(i)){return false}if(findChattyWords(i)){return false}if(d.thename){if(a==""){alert("Please insert your name");d.thename.focus();return false}else{if(username_illegal_chars.test(a)){alert(a.match(username_illegal_chars)+" is an illegal character in a name. You can only use alphanumerical characters, spaces, point, dash.");d.thename.focus();return false}}}if((d.email)&&(h=="")){alert("You forgot to insert your email address");d.email.focus();return false}else{if(b=="select"){alert("You forgot to select your country");d.country.focus();return false}else{if((b=="US")&&(g=="select")){alert("You forgot to select your state");d.us_states.focus();return false}else{if(c==""){alert("You forgot to insert a title");d.storytitle.focus();return false}else{if(title_illegal_chars.test(c)){alert("The character '"+c.match(title_illegal_chars)+"' is not permitted in a title");d.storytitle.focus();return false}else{if(c.length>60){alert("Your title has "+c.length+" characters, the maximum is 60.\nPlease shorten it a bit.");d.storytitle.focus();return false}else{if(c.charAt(c.length-1)=="."){alert("Titles shouldn't end with a period. Please remove it.");d.storytitle.focus();return false}else{if(i.length<1500){alert("Your story has "+i.length+" characters, the minimum is 1500.\nPlease provide more details or develop it a bit more.\nStories stuffed with repetitive characters, spaces or punctuations to avoid this message will be discarded.");d.story.focus();return false}else{if(i==i.toUpperCase()){alert("Please don't write stories in all uppercase");d.story.focus();return false}else{if((i.charAt(0).toUpperCase()=="O")&&(i.charAt(1).toUpperCase()=="K")){alert("Please don't start a story with \"OK\",\nit's not needed, just get right to the story.");d.story.focus();return false}else{if((i.charAt(0).toUpperCase()=="H")&&(i.charAt(1).toUpperCase()=="I")){alert("Please don't start a story with \"HI\",\nit's not needed, just get right to the story.");d.story.focus();return false}else{if((i.charAt(0).toUpperCase()=="H")&&(i.charAt(1).toUpperCase()=="E")&&(i.charAt(2).toUpperCase()=="L")&&(i.charAt(3).toUpperCase()=="L")&&(i.charAt(4).toUpperCase()=="O")){alert("Please don't start a story with \"HELLO\",\nit's not needed, just get right to the story.");d.story.focus();return false}else{if((i.charAt(0).toUpperCase()=="W")&&(i.charAt(1).toUpperCase()=="E")&&(i.charAt(2).toUpperCase()=="L")&&(i.charAt(3).toUpperCase()=="L")){alert("Please don't start a story with \"WELL\",\nit's not needed, just get right to the story.");d.story.focus();return false}else{if(!i.match(find_commas)){alert("Please use commas in your story.\nStories with no punctuation will be discarded.");d.story.focus();return false}else{if(e=="select"){alert("You forgot to indicate your expectations toward users comments");d.about_users_comments.focus();return false}else{if((f)&&(f.checked==false)){alert("You must read and agree to our terms and conditions before submitting your story");d.terms.focus();return false}}}}}}}}}}}}}}}}if(d.email){if(verifyEmail(h)){return true}}else{return true}}function countcharacters(a){a.charcounter.value=(a.story.value).length};

