function formValidate(realTime){var inp=document.getElementById('inputbox');var len=inp.value.length;if(realTime){document.getElementById('counter').innerHTML=len;if(len>255)inp.value=inp.value.substring(0,255);}else
{if(!len){alert("Please enter some text to make into a hangman puzzle in the \"What would you like to hangmanify?\" box.");inp.focus();return false;}else
{var count=0;for(var i=0;i<len;i++){var char=inp.value.charAt(i);if((char>="a"&&char<="z")||(char>="A"&&char<="Z"))count++;}var r=true;if(count>=20){r=confirm("Your hangtwit has "+count+" unique guess-able characters. With this many characters, it will be impossible not to win this game. If you're okay with this, press OK. Otherwise press cancel and shorten your message.");inp.focus();}else if(count>12){r=confirm("Your hangtwit has "+count+" unique guess-able characters. It will likely be an easy puzzle to solve. If you're okay with this, press OK. Otherwise press cancel and shorten your message.");inp.focus();}else if(count<4){r=confirm("Your hangtwit only has "+count+" unique guess-able character"+((count==1)?"":"s")+". This will be a very difficult puzzle to solve. If you're okay with this, press OK. Otherwise press cancel and make your message a bit longer.");inp.focus();}return r;}}}
