(function(a,b){function y(){e=!e;g.innerHTML=e?"ON":"OFF";h=e?n:m;(i?u:v)()}function x(){i=false}function w(){i=true}function v(){c.value=t(h(l(d.value),false),s);i=false}function u(){d.value=t(h(c.value,true),r);i=true}function t(a,b){var c="",d=a.length,e,f,g=false;for(e=0;e<d;e+=1){f=a.charAt(e);if(f==="\\"){if(o(a,e)==="\\"){c+="\\";e+=1}else{g=!g}}else if(g){c+=f}else{c+=b(f)}}return c}function s(a){return q(a,"IKLNOPQRUSTVMWEXZBCDAFGHYJ[\\]^_`iklnopqrustvmwexzbcdafghyj")}function r(a){return q(a,"URSTOVWXAZBCMDEFGHJKILNP0Q[\\]^_`urstovwxazbcmdefghjkilnp0q")}function q(a,b){var c=a.charCodeAt(0);if(c>=65&&c<=122){return b.charAt(c-65)}return a}function p(a,b){return b<a.length-1?a.charCodeAt(b+1):-1}function o(a,b){return b<a.length-1?a.charAt(b+1):""}function n(a,b){var c=a.split("\\"),d=c.length,e,f,g;if(b){g=/(?=(\b))\1([A-HJ-Z][A-Za-z']+|I[A-Za-z][A-Za-z']*)/g}else{g=/(?=(\b))\1([B-Z][A-Za-z']+|A[A-Za-z][A-Za-z']*)/g}for(e=0;e<d;e+=2){f=c[e].replace(g,"\\$&\\");c[e]=f.replace(/([\.\!\?][\s'"]+)\\([A-Za-z']+)\\/g,"$1$2")}c[0]=c[0].replace(/^([\s'"]*)\\([A-Za-z']+)\\/g,"$1$2");return c.join("\\")}function m(a,b){return a}function l(a){var b=a.split("\\"),c=b.length,d,e;for(d=0;d<c;d+=2){e=b[d].replace(/(^[\s'"]*)0([A-Za-z'])/g,"$1Y$2");e=e.replace(/([\.\!\?][\s'"]+)0([A-Za-z'])/g,"$1Y$2");b[d]=e.replace(/([^0-9])0([^0-9\.]|(\.[^0-9]))/g,"$1y$2")}return b.join("\\")}var c=b.getElementById("english"),d=b.getElementById("saurian"),e=true,f=b.getElementById("properOption"),g=b.getElementById("properToggle"),h,i=true;var j=function(){if(a.addEventListener){return function(a,b,c){a.addEventListener(b,c,false)}}else if(a.attachEvent){return function(a,b,c){a.attachEvent("on"+b,c)}}else{return function(a,b,c){a["on"+b]=c}}}();var k=function(){var c=b.createElement("textarea"),d,e=false;e="oninput"in c;if(!e){c.setAttribute("oninput","return;");e=typeof c.oninput==="function"}try{d=b.createEvent("KeyboardEvent");d.initKeyEvent("keypress",true,true,a,false,false,false,false,0,"e".charCodeAt(0));b.body.appendChild(c);that.AddEvent(c,"input",function(a){e=true;a.preventDefault();a.stopPropagation()},false);c.focus();c.dispatchEvent(d);b.body.removeChild(c)}catch(f){}return e}();h=n;if(k){j(c,"input",u);j(d,"input",v)}else{j(c,"keyup",u);j(d,"keyup",v);j(c,"keydown",u);j(d,"keydown",v)}j(c,"focus",w);j(d,"focus",x);j(f,"click",y)})(this,this.document)
