/*
 * (c) 2004-2006 SpellingCow Software - All rights reserved.  This is not free software.
 *     derived from Copyright (c) 2005 Emil A Eklund under the MIT license (http://me.eae.net/archive/2005/07/26/litespellchecker/)
 */
var ayty  = 'http://greasy.com/blogapp/spellingcow/' ;
var aythh =  ayty + 'im/spellc.gif';
var aytgg = 'Speller';
var aytii = '';

var aytaa=true,aytn=false,ayts=false,aytr=false,aytq=20000,aytp='highlight',ayto='yellow',aytk,aytbb,aytj;var aytc;function aytl(fv,be){this.fr=fv;this.be=be;this.ia=false;};function aytb(n){if(!aytc){aytc=new Array();};this.ii='5.0';this.au=100;this.gr=100;this.dx=20000;this.df=(n.df)?n.df:'';this.bs=this.dd(n.bs,'success');this.bq=this.dd(n.bq,'failure');this.p=n.p;this.ch=n.ch;this.ac=null;this.ab=new Array();this.cg=-1;this.hf=0;this.bn=true;this.af=null;};aytb.prototype.dd=function(param_handler_setting,type){if(param_handler_setting){return(param_handler_setting=='none')?null:param_handler_setting;}else{throw new Error("ERROR: undefined "+type+" handler function.  Connection not established");};};aytb.prototype.check_cows_ajax_aware=function(success_command,fail_command){};aytb.prototype.cr=function(gk){if(this.ac!=null){};this.ac=document.createElement('SCRIPT');this.ac.src=gk;this.ac.type='text/javascript';var hr=document.getElementsByTagName('HEAD')[0];hr.appendChild(this.ac);};aytb.prototype.eb=function(){this.ac.parentNode.removeChild(this.ac);this.ac=null;};aytb.prototype.connect=function(n){this.cg=aytc.length;aytc.push(this);var gk=this.bd(n);this.cr(gk);this.ae=this.cq()+this.dx;this.bj();};aytb.prototype.bd=function(n){cw=n.cw;be=(n.be)?n.be:false;var fv=this.df+cw+'&connection_id='+this.cg;if(aytaa){fv+='&use_job_name=1';};this.ab[this.ab.length]=new aytl(fv,be);return fv;};aytb.prototype.send=function(n){this.bd(n);this.bj();};aytb.prototype.send_immediate=function(n){this.bd(n);this.em();};aytb.prototype.em=function(){if(this.ab.length<=0){return;};if((this.p)&&(!this.ab[0].be)){this.p('on');};var fk=this.ab[0].fr;parent.cows_ajax_response=null;this.cr(fk);this.ae=this.cq()+this.dx;};aytb.prototype.response_received=function(){if(this.p){this.p('off');};this.ab.shift();this.ae=null;this.eb();if(this.bs){this.bs();};};aytb.prototype.bj=function(){if(this.af==null){if(aytaa){this.af=window.setInterval('aytc['+this.cg+'].poll()',this.au);}else{this.af=window.setInterval('cows_ajax_connections['+this.cg+'].poll()',this.au);};};};aytb.prototype.poll=function(){if(this.ae){if(this.ae<=this.cq()){this.aytdd();if(this.bq){this.bq('Server Timed Out');};}else if(parent.cows_ajax_response!=null){parent.cows_ajax_response();};}else if(this.ab.length>0){this.em();};};aytb.prototype.gq=function(){this.ab.length=0;};aytb.prototype.aytdd=function(){this.ae=null;this.gq();if(this.af){window.clearInterval(this.af);};this.af=null;};aytb.prototype.disconnect=function(){this.aytdd();};aytb.prototype.cq=function(){return(new Date()).getTime();};aytb.prototype.debug=function(d){if(this.ch){this.ch(d);};};function aytcc(ad){this.ad=ad;this.cx='';this.dw=false;this.ao=new Array();};function ayta(ad,ci){this.ad=ad;this.ci=ci;};function aytm(n){this.a=n.ej;this.external_style=n.external_style;this.spellingcow_style=n.spellingcow_style;this.spellingcow_style_ie=n.spellingcow_style_ie;this.spellingcow_apply_all=n.spellingcow_apply_all;this.override_font=n.override_font;this.ayt_default=n.ayt_default;this.highlight_err_type=n.highlight_err_type;this.highlight_err_color=n.highlight_err_color;this.ca='';this.hy=false;this.b=new Array();this.r=new Object();this.o=new Object();this.ap=0;this.au=250;this.gi=30;this.cp=300;this.dt=1000;this.ff=40;this.bi=0;this.bn=true;this.af=null;this.at=false;this.bz=0;this.l=0;this.fe=0;this.el=0;this.dm=0;this.ag=false;this.co=true;this.ex=true;this.cn=false;this.cd=false;this.y=false;this.z=0;this.db=0;this.aj=0;this.ai=null;this.aytee=null;this.v=null;this.w='window';this.dl=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);this.da=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);this.aytff=null;this.fq(0);};aytm.prototype.fq=function(retry_count){this.aytff=new aytb({df:ayty+'spell/',bs:ayth,bq:aytg,p:ayte,ch:aytt});this.dv();};aytm.prototype.dv=function(){var br=this.ee();if(window.spellingcow_favelet){}else if(this.ayt_default=='off'){if(parseInt(br['auto_ayt'])!=1){this.cc(true);if(!isNaN(parseInt(br['auto_ayt']))){this.bh('spellingcow_ayt',escape('auto_ayt:0;autologinid:foo;user_id:bar;'),30)};return;};}else if((!isNaN(br['auto_ayt']))&&(br['auto_ayt']==0)){this.cc(true);this.bh('spellingcow_ayt',escape('auto_ayt:0;autologinid:foo;user_id:bar;'),30);return;};this.bh('spellingcow_ayt',escape('auto_ayt:1;autologinid:foo;user_id:bar;'),365);this.t(this.a,'z-index','zIndex','3');this.t(this.a,'position','position','relative');this.fd();this.t(this.a,'background','background','transparent');this.fj();this.cc(false);this.gp();this.dr();this.ea();var gj=this.cq(),ij=gj+'ac.',bc=location.hostname;bc=bc.replace(/%/g,'_AYT');this.aytff.connect({cw:'connect?message_mode=ayt&timestamp='+gj+'&msg='+bc});if(!aytn){document.getElementById('spellingcow_debug').style.display='';document.getElementById('spellingcow_debug').style.display='none';};};aytm.prototype.disable_spellingcow=function(){if(confirm("Really disable spell check as you type?  You won't be able to renable it without reloading the page.")){this.aytdd();this.aytff.disconnect();this.fy();this.at=true;if(window.handle_sc_ayt_disable){window.handle_sc_ayt_disable();};this.bh('spellingcow_ayt',escape('auto_ayt:0;autologinid:foo;user_id:bar;'),30)}else{document.getElementById("spellingcow_enable").checked=true;};};aytm.prototype.enable_spellingcow=function(){var gu=document.getElementById("spellingcow_toolbar");gu.parentNode.removeChild(gu);this.bh('spellingcow_ayt',escape('auto_ayt:1;autologinid:foo;user_id:bar;'),365);this.ayt_default='on';this.dv();};aytm.prototype.bh=function(name,value,days){if(days){var ds=new Date();ds.setTime(ds.getTime()+(days*24*60*60*1000));var gt="; expires="+ds.toGMTString();}else var gt="";document.cookie=name+"="+value+gt+"; path=/";};aytm.prototype.go=function(name){var hl=name+"=",ek=document.cookie.split(';');for(var i=0;i<ek.length;i++){var am=ek[i];while(am.charAt(0)==' ')am=am.substring(1,am.length);if(am.indexOf(hl)==0)return am.substring(hl.length,am.length);};return null;};aytm.prototype.ee=function(){var fx=unescape(this.go('spellingcow_ayt')),n=fx.split(';');var gg=new Object();for(i=0;i<n.length;i++){if(n[i]!=''){var ft=n[i].split(':');gg[ft[0]]=ft[1];};};return gg;};aytm.prototype.toggle_debug_mode=function(){var cj=document.getElementById("mirror_mode_checkbox").checked;this.q.style.position=(cj)?'relative':'absolute';this.q.style.color=(cj)?'white':'window';this.q.style['background-color']=(cj)?'black':'window';this.q.style['backgroundColor']=(cj)?'black':'window';aytn=cj;document.getElementById('spellingcow_debug').style.display=(cj)?'':'none';};aytm.prototype.fy=function(){this.t(this.a,'background-color','backgroundColor',this.w);document.getElementById("spellingcow_div").style.display='none';document.getElementById("spellingcow_toolbar").style.display='none';};aytm.prototype.g=function(selector,declaration){if(!document.getElementsByTagName||!(document.createElement||document.createElementNS))return;var hv=navigator.userAgent.toLowerCase(),hu=((hv.indexOf("msie")!=-1)&&(hv.indexOf("opera")==-1)),gf=(hu&&(hv.indexOf("win")!=-1)),hq=(hu&&(hv.indexOf("mac")!=-1));if(hq)return;var hr=document.getElementsByTagName("head")[0],ce=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml","style"):document.createElement("style");if(!gf){var hj=document.createTextNode(selector+" {"+declaration+"}");ce.appendChild(hj);};ce.setAttribute("type","text/css");ce.setAttribute("media","screen");hr.appendChild(ce);if(gf&&document.styleSheets&&document.styleSheets.length>0){var fs=document.styleSheets[document.styleSheets.length-1];if(typeof fs.addRule=="object"){fs.addRule(selector,declaration);};};};aytm.prototype.m=function(element,style_prop,style_prop_alt,default_value){var ba;if(element.currentStyle){ba=(element.currentStyle[style_prop])?element.currentStyle[style_prop]:element.currentStyle[style_prop_alt];}else if(window.getComputedStyle){ba=document.defaultView.getComputedStyle(element,null).getPropertyValue(style_prop);}else if(document.defaultView&&document.defaultView.getComputedStyle){var ge=style_prop;ge=ge.replace(/([A-Z])/g,"-$1");ge=ge.toLowerCase();return document.defaultView.getComputedStyle(element,"").getPropertyValue(ge);}else{alert('using default: ['+default_value+']');ba=default_value;};return((ba==undefined)||(ba==''))?default_value:ba;};aytm.prototype.t=function(element,style_prop,style_prop_alt,value){element.style[style_prop]=value;element.style[style_prop_alt]=value;};aytm.prototype.bb=function(style1,style2,subtract){if((style1['numeric']=='auto')){style1['numeric']=0;style1['unit']='px';};if((style2['numeric']=='auto')){style2['numeric']=0;style2['unit']='px';};var ah=new Array();if(style1['unit']==style2['unit']){ah['numeric']=(subtract)?style1['numeric']-style2['numeric']:style1['numeric']+style2['numeric'];ah['unit']=style1['unit'];return ah;}else if(style1['numeric']==0){ah['numeric']=style2['numeric'];ah['unit']=style2['unit'];return ah;}else{ah['numeric']=style2['numeric'];ah['unit']=style2['unit'];return ah;};};aytm.prototype.k=function(value,auto_as_text){var az=new Array();if((value=='auto')&&(auto_as_text)){az['numeric']='auto';az['unit']='';return az;}else if(value=='auto'){value='0px';};var hb='';if(value.substr(value.length-1)=='%'){hb='%';}else{hb=value.substr(value.length-2);};var hx=value.substr(0,value.length-(hb.length));az['numeric']=parseInt(hx);az['unit']=hb;return az;};aytm.prototype.cf=function(top,right,bottom,left){return top['numeric']+top['unit']+' '+right['numeric']+right['unit']+' '+bottom['numeric']+bottom['unit']+' '+left['numeric']+left['unit'];};aytm.prototype.fd=function(){var cy=this.m(this.a,'font-size','fontSize','11px');if(cy=='relative'){cy='13px';};var ew=this.m(this.a,'font-family','fontFamily','Verdana, Arial, Helvetica, sans-serif'),fi=this.m(this.a,'font-style','fontStyle','normal'),ei=this.m(this.a,'font-variant','fontVariant','normal'),ev=this.m(this.a,'font-weight','fontWeight','400'),eh=this.m(this.a,'font-stretch','fontStretch',''),cv=this.m(this.a,'line-height','lineHeight','normal');if(document.all){var di=this.k(cy);cv=(parseInt(di['numeric'])*1.2)+di['unit'];};var bl="line-height: "+cv+";font-size: "+cy+";font-family: "+ew+";font-style: "+fi+";font-variant: "+ei+";font-weight: "+ev+";font-stretch: "+eh+";";if(this.override_font){bl="line-height:normal;font-size:13px;font-family: monospace;font-style:normal;font-variant:normal;font-weight:400;font-stretch:;";};this.w=this.m(this.a,'background-color','backgroundColor','window');if(this.w=='transparent'){this.w='#FFFFFF'};var ha=this.m(this.a,'text-align','textAlign','left'),gz=(ayts)?'relative':'absolute',gd=(ayts)?'white':this.w,dn=(ayts)?'black':this.w,ak=this.k(this.m(this.a,'padding-top','paddingTop','0px')),ar=this.k(this.m(this.a,'padding-right','paddingRight','0px')),by=this.k(this.m(this.a,'padding-bottom','paddingBottom','0px')),cm=this.k(this.m(this.a,'padding-left','paddingLeft','0px'));if(this.da){ak['numeric']=1;ak['unit']='px';ar['numeric']=0;ar['unit']='px';by['numeric']=0;by['unit']='px';cm['numeric']=6;cm['unit']='px';};ak['numeric']=(ak['unit']=='px')?ak['numeric']+1:ak['numeric'];var cl=ar;if(this.dl){var bm=new Array();bm['numeric']=0;bm['unit']='px';cl=bm;}else if((document.all)&&(ar['unit']=='px')){ar['numeric']=ar['numeric']+4;};var fp="padding: "+(this.cf(ak,cl,by,cm))+";";var bx=this.k(this.m(this.a,'border-top-width','borderTopWidth','0px')),ay=this.k(this.m(this.a,'border-right-width','borderRightWidth','0px')),aq=this.k(this.m(this.a,'border-bottom-width','borderBottomWidth','0px')),bk=this.k(this.m(this.a,'border-left-width','borderLeftWidth','0px'));if(this.da){bx['numeric']=0;bx['unit']='px';ay['numeric']=0;ay['unit']='px';aq['numeric']=0;aq['unit']='px';bk['numeric']=0;bk['unit']='px';};var de=this.k(this.m(this.a,'margin-top','marginTop','0px')),eg=this.k(this.m(this.a,'margin-right','marginRight','0px')),ed=this.k(this.m(this.a,'margin-bottom','marginBottom','0px')),eu=this.k(this.m(this.a,'margin-left','marginLeft','0px'));if(this.da){de['numeric']=0;de['unit']='px';};var hw=this.bb(bx,de),hi=this.bb(ay,eg),gy=this.bb(aq,ed),hp=this.bb(bk,eu),ef=this.cf(de,eg,ed,eu),et="margin: "+this.cf(hw,hi,gy,hp)+";";var hh=this.cf(bx,ay,aq,bk),bp="position: "+gz+";"+bl+fp+et+"background: "+dn+";text-align: "+ha+";color: "+gd+";z-index: 2; overflow: hidden; white-space: normal;border:0px transparent solid;";if((this.spellingcow_style!=-1)||(this.spellingcow_style_ie!=-1)){if((!document.all)&&(this.spellingcow_style!=-1)){bp=this.spellingcow_style;}else if(this.spellingcow_style_ie!=-1){bp=this.spellingcow_style_ie;}else if((this.spellingcow_style!=-1)&&(this.spellingcow_apply_all)){bp=this.spellingcow_style;};};if(!this.external_style){this.g('#spellingcow_div',bp);};this.g('.sc_ayt_debug',"position: relative;font: menu;text-align:left;line-height: expression('1.5em');background: white;border: 1px solid gray; overflow: auto ;");this.g('.sc_ayt_comm',"width:468px;height:60px;framespacing:0;frameborder:no;scrolling:no;marginwidth:0px;marginheight:0px;border:0px;display:block;");if(!this.external_style){this.g('#spellingcow_div .white_span',bl+"white-space: pre;");this.g('#spellingcow_div .double_space_span',bl+"white-space: pre;");};if(this.external_style){}else if(this.highlight_err_type=='highlight'){this.g('#spellingcow_div .red_span',bl+"background:"+this.highlight_err_color+";color:"+this.highlight_err_color+";");}else{this.g('#spellingcow_div .red_span',bl+"background:url("+ayty+"images/redline.png) repeat-x bottom;");};if(document.all){this.t(this.a,'line-height','lineHeight',cv);};this.t(this.a,'margin','margin',ef);this.t(this.a,'border-top-width','borderTopWidth',bx['numeric']+bx['unit']);this.t(this.a,'border-right-width','borderRightWidth',ay['numeric']+ay['unit']);this.t(this.a,'border-bottom-width','borderBottomWidth',aq['numeric']+aq['unit']);this.t(this.a,'border-left-width','borderLeftWidth',bk['numeric']+bk['unit']);this.q=document.createElement('div');this.q.id='spellingcow_div';this.q.style.height=(this.a.clientHeight)+'px';this.q.style.width=this.a.clientWidth+'px';if(this.dl){var ax=new Array();ax['numeric']=this.a.clientWidth;ax['unit']='px';var hg=this.bb(ax,cm,true);this.q.style.width=hg['numeric']-21;var av=new Array();av['numeric']=this.a.clientHeight;av['unit']='px';var fo=this.bb(ak,by),gx=this.bb(av,fo,true);this.q.style.height=gx['numeric'];}else if(this.da){this.q.style.width=this.a.clientWidth-27;};this.t(this.a,'font-size','fontSize',cy);this.t(this.a,'font-family','fontFamily',ew);this.t(this.a,'font-style','fontStyle',fi);this.t(this.a,'font-variant','fontVariant',ei);this.t(this.a,'font-weight','fontWeight',ev);this.t(this.a,'font-stretch','fontStretch',eh);this.t(this.a,'line-height','lineHeight',cv);this.a.parentNode.insertBefore(this.q,this.a);};aytm.prototype.cc=function(ayt_disabled){var u=document.createElement('div');u.id='spellingcow_toolbar';var bg=this.m(this.a,'width','width',this.a.style.width);bg=((bg=='')||(bg=='auto'))?this.q.style.width:bg;u.style.width=bg;u.style.height='25px';u.style.border='0px';u.style.background='transparent';u.style['textAlign']='left';this.aytee=this.a.parentNode.insertBefore(u,this.a.nextSibling);this.g('.sc_toolbar_label',"display:inline;position:relative;top:-3px;padding:0;margin:0;border:0;");this.g('#sc_toolbar_msg',"font-size:8px;font-weight:normal;font-family:Verdana, Arial, Helvetica, sans-serif;position:relative;left:150px;top:0px;padding:0;margin:0;border:0;");if(ayt_disabled){if(aytaa){ck='<label class="sc_toolbar_label"><input style="position:relative;top:3px;" type="checkbox" id="spellingcow_enable" onclick="aytk.enable_spellingcow();"/> Spell check as I type</label>';}else{ck='<label class="sc_toolbar_label"><input style="position:relative;top:3px;" type="checkbox" id="spellingcow_enable" onclick="oSpell.enable_spellingcow();"/> Spell check as I type</label>';};}else{var fh=((aytii=='')||(aythh==''))?'':'<a href="'+aytii+'" target="_blank">',fa=(aythh=='')?'':'<img title="'+aytgg+'" alt="'+aytgg+'" style="border:none;" src="'+aythh+'" />';var fg=(aytii=='')?'':'</a>',dh=(aythh=='')?'display:block;margin:0;padding:0;border:none;':'display:inline;';var dy=(aytaa)?'aytk':'oSpell',ck=fh+fa+fg+' &nbsp; <label class="sc_toolbar_label" style="'+dh+'"><input type="checkbox" id="spellingcow_enable" style="position:relative;top:-3px;width:20px;padding:0;margin:0;border:0;" onclick="'+dy+'.disable_spellingcow();" checked="checked"/> Spell check</label> &nbsp; <label id="sc_toolbar_msg" style="display:none;">Ad from SpellingCow</label>';};try{document.getElementById("spellingcow_toolbar").innerHTML=ck;}catch(e){var gc=u;u.parentNode.removeChild(u);gc.innerHTML=ck;this.a.parentNode.insertBefore(gc,this.a.nextSibling);};};aytm.prototype.fj=function(){var aa=document.createElement('div');aa.id='spellingcow_debug';aa.className='sc_ayt_debug';aa.style.width=(this.a.clientWidth+20)+'px';aa.style.height=this.a.clientHeight+'px';aa.style.display=(aytn)?'':'none';this.q.parentNode.insertBefore(aa,this.q);};aytm.prototype.gp=function(){this.g('.sc_ayt_menu','border: 1px solid ;border-color: threedlightshadow threeddarkshadow threeddarkshadow threedlightshadow;padding:0px;position:absolute;z-index:4;');this.g('.sc_ayt_menu .inner','border: 1px solid ;border-color: threedhighlight threedshadow threedshadow threedhighlight;background: threedface;padding: 2px;text-align:left');this.g('.sc_ayt_menu a','display: block;font: menu;color: menutext;padding: 1px 5ex 1px 3ex;text-decoration: none;');this.g('.sc_ayt_menu a:hover','background: highlight;color: highlighttext;');this.g('.sc_ayt_menu .separator','border-top: 1px solid threedshadow;border-bottom: 1px solid threedhighlight;overflow: hidden;margin: 2px;padding: 0px;');this.ai=new aytv();document.body.appendChild(this.ai.ai);};aytm.prototype.not_available=function(){if(window.handle_sc_ayt_incompatiable){window.handle_sc_ayt_incompatiable('Your browser is not COWS AJAX aware and the spell checker will not run, sorry!');};};aytm.prototype.dz=function(){if((this.b.length==0)||(this.y)){return;};var d=this.b[0].ad;for(var i=1;i<this.b.length;i++){d+=' '+this.b[i].ad;};this.y=true;this.aytff.send({cw:'ayt_check?message_mode=ayt&session_id='+this.ca+'&replace='+this.ap+'&message='+d.replace(/'/g,'\'')});this.ap=0;};function ayth(){aytk.bz=0;aytk.l=0;};function aytg(ie){aytk.bz++;aytk.l=0;};function ayte(ib){if(ib=='on'){};};aytm.prototype.read=function(remote_response){};aytm.prototype.set_session_id=function(ca){this.ca=ca;this.bj();};aytm.prototype.update_message=function(ca){document.getElementById('sc_toolbar_msg').style.display='inline';this.v=parent.document.createElement('iframe');this.v.className='sc_ayt_comm';this.v.src=ayty+'ayt_session?message_mode=ayt&session_id='+this.ca;var ih=this.aytee.appendChild(this.v);};aytm.prototype.update_word=function(remote_response){var du=remote_response.split(', '),ad=du[0],he=remote_response.substr(ad.length+2);if(!isNaN(ad)){return;};this.b[this.r[ad]].cx=he;this.b[this.r[ad]].dw=true;};aytm.prototype.word_fragment=function(orig_word,fragment,ci){var du=fragment.split(', '),ad=du[0],he=fragment.substr(ad.length+2);if((!isNaN(ad))||(!isNaN(orig_word))){return;};if((this.r[ad]==undefined)&&(this.o[ad]==undefined)){this.r[ad]=this.b.length;this.b[this.b.length]=new aytcc(ad);this.b[this.b.length-1].dw=true;this.b[this.b.length-1].cx=he;};var ao=new ayta(ad,ci);this.b[this.r[orig_word]].dw=true;this.b[this.r[orig_word]].ao[this.b[this.r[orig_word]].ao.length]=ao;};aytm.prototype.done_update=function(timestamp){for(var i=0;i<this.b.length;i++){this.o[this.b[i].ad]=this.b[i];};this.dk();this.r.length=0;this.b.length=0;this.y=false;this.db=this.cq();};aytm.prototype.bj=function(){if(this.af==null){if(aytaa){this.af=window.setInterval('aytk.poll()',this.au);}else{this.af=window.setInterval('oSpell.poll()',this.au);};};};aytm.prototype.poll=function(){if(this.bi==this.ff){this.bi=0;}else if(this.bn){this.bn=false;this.bi=0;};this.bi++;if((this.bz>0)&&(this.l==0)){if(this.bz<=2){this.l=0;}else if(this.bz<=6){this.l=this.cq()+30000;}else{this.l=this.cq()+120000;};};if((this.ex)&&(this.b.length==0)){this.bu();this.dz();this.ex=false;}else if((this.bz>0)&&(this.l!=-1)&&(this.cq()>=this.l)){this.b.length=0;this.y=false;this.aytff.bj();this.l=-1;}else if((this.b.length==0)&&(this.bi%this.gi==0)){this.bu();if(this.b.length>0){this.dz();}else{this.dk();};}else if((!this.b.length)&&(this.ag)&&(!this.y)&&(!this.cn)&&(!this.cd)){this.bu();this.dz();}else if(!this.co){this.dk();};};aytm.prototype.aytdd=function(){if(!this.af){return;};window.clearInterval(this.af);this.af=null;};aytm.prototype.ea=function(){var gn="able about above act add afraid after again against age ago agree air all allow alot also always am among an and anger "+"animal answer any appear anybody anywhere apple are aren't area arm around arrange arrive art as ask asked at atom baby back bad ball band bank "+"bar base basic bat be bear beat beauty because bed been before began begin behind being believe bell best better between big bird bit black block "+"blood blow blue board boat body bone book born both bottom bought box boy branch bread break bright bring broad broke brother brought brown btw "+"build burn busy but buy by call came can can't capital captain car card care carry case cat catch caught cause cell cent center century certain "+"chair chance change character charge chart check chick child children choose chord come could couldn't circle city claim class clean clear climb "+"clock close clothe cloud coast coat cold collect colony color column come common company compare complete condition connect consider consonant "+"contain continent continue control cool cool copy corn corner correct cost cotton could count country course cover cow crease create crop cross "+"crowd cry current cut dad dance danger dark day days dead deal dear death decide decimal deep degree depend describe desert design determine "+"develop dictionary did didn't die differ difficult direct discuss distant divide division do does doesn't dog dollar don't done door double down "+"draw dream dress drink dive drop dry duck during each ear early earth ease east eat edge effect egg either electric element else end enemy energy "+"engine enough enter equal equate especially etc even evening event ever every everybody everyone exact example except excite exercise expect "+"experience experiment eye face fact fair fall family famous far farm fast fat father favor fear feed feel feet fell felt few field fig fight "+"figure fill final find fine finger finish fire first fish fit five flat floor flow flower fly follow food foot for force forest form forum forward "+"found four fraction free fresh friend from front fruit full fun game garden gas gather gave general gentle get girl give glad glass go going gone "+"good got govern gotten grand grass gray great green grew ground group grow guess guide gun had hair half hand happen happy hard has hat have "+"haven't having he head hear heard heart heat heavy held help her here her's high hill him his history hit hold hole home hope horse hot hour house "+"how how's href huge human hundred hunt hurry I I've ice idea if imagine in inch include indicate industry insect instant instrument interest into "+"invent iron is isn't island it its it's job join joy jump just keep kept key kill kind king knew know lady lake land language large last late "+"laugh law lay lead learn least leave led left leg length less let letter level lie life lift light like liked line link liquid list listen little "+"live locate log lone long looking look looked lost lot loud love low machine made magnet main major make man many map mark market mass master "+"match material matter may maybe me mean meant measure meat meet melody men metal method middle might mile milk million mind mine minute miss mix "+"modern molecule moment money month moon more morning most mother motion mount mountain mouth move much multiply music must my name nation natural "+"nature near necessary neck need neighbor never new news next night nine no noise none noon nor north nose note not nothing notice noun now number "+"numeral object observe occur ocean of off offer office often oh oil old on once one only open operate opposite oops or order organ original other "+"our our's out over own oxygen page paint pair paper paragraph parent part particular party pass past path pattern pay people perhaps period person "+"phrase pick picture piece pitch place plain plan plane planet plant play please plural poem point poor populate port pose position possible post "+"post pound power practice prepare present press pretty print probable problem process produce product proper property protect prove provide pull "+"push put quart question question questions quick quiet quite quote quotient race radio rail rain raise ran range rather reach read ready real "+"really reason receive recent record red region remember repeat reply represent require rest result rich ride right ring rise river road rock roll "+"room root rope rose round row rub rule run safe said sail salt same sand sat save saw say says scale school science score sea search season seat "+"second section see sees seed seem segment select self sell send sense sent sentence separate serve set settle seven several shall shape share "+"sharp she sheet shell shine ship shoe shop shore short should shoulder shout show side sight sign silent silver similar simple since sing single "+"sister sit site sites six size skill skin sky slave sleep slip slow small smell smile snow so soft soil soldier solution solve some something "+"sometime somewhere son song soon sound south space speak special speech speed spell spend spoke spot spread spring square stand star start state "+"station stay stead steam steel step stick still stone stood stop store story straight strange stream street stretch string strong student study "+"subject substance subtract success such sudden suffix sugar suggest suit summer sun supply support sure surface surprise swim syllable symbol "+"system table tail take talk tall teach team teeth tell temperature ten term test than thank that that'd that's the their theirs their's them then "+"there there's these they they'll they'd they're thick thin thing think third this those though thought thousand three through thus tie time times "+"tiny tire to together told tone to too took tool top total touch toward town track trade train travel tree triangle trip trouble truck true try "+"tube turn twenty two type under until up upon us use user users usual valley value vary verb version very via view village visit voice vowel wait "+"walk wall want war warm was wash watch wave way we weak wear weather week weight well went were weren't west what wheel when where whether which "+"while white who whole whom whose why wide wife wild will win wind window wing winter wire wish with within without woman women won't wonder wood "+"word work world worse worst would write written wrong wrote www yard year yellow yes yet you you'd you'll your you're yours young AFAIK IIRC LOL ROTF",dq=gn.split(' ');for(var i=0;i<dq.length;i++){this.o[dq[i]]=new aytcc(dq[i]);};};aytm.prototype.dk=function(){if(this.cd){return;}else if(this.cn){this.co=false;return;}else if(this.cq()-this.dm<300){this.co=false;return;};this.cn=true;var ho=(new Date()).getTime(),d=this.a.value.replace(/\r\n/g,'\n');function bv(hz){var as='';if(x=='\t'){as='<span class="white_span" id="tab'+eq+'"></span>';eq++;}else if((x==' ')&&(i<d.length-2)&&(d.substr(i+1,1)==' ')){as='<span class="double_space_span" id="double_space'+bw+'"></span>';bw++;}else if(x=='<'){as='&lt;';}else if(x=='>'){as='&gt;';}else{as=(x=="\n")?'<br/>':((hz)?'':x);};return as;};var s='',f=0,c='',x,eq=0,aw=0,bw=0,ig='',hn='';for(var i=0;i<d.length;i++){x=d.substr(i,1);if((!x.match(/[\w\'\-]/))||(i==d.length-1)){if(f==i){s+=bv();f++;}else if(i-f==1){hk=d.substr(f,i-f);s+=hk;s+=bv();f=i+1;}else{c=d.substr(f,i-f);if((x.match(/[\w\'\-]/))&&(i==d.length-1)){c=d.substr(f);};if(this.o[c]!=undefined){if(this.o[c].dw){if(this.o[c].ao.length){var dg=0;for(var j=0;j<this.o[c].ao.length;j++){fc=(this.o[c].ao[j].ci)?c.substr(dg,this.o[c].ao[j].ci-dg):'';s+=fc;s+='<span class="red_span" id="sc_err'+aw+'">'+this.o[c].ao[j].ad+'</span>';aw++;dg=this.o[c].ao[j].ci+this.o[c].ao[j].ad.length;};fc=c.substr(dg);s+=fc;}else{s+='<span class="red_span" id="sc_err'+aw+'">'+c+'</span>';aw++;};}else{s+=c;};}else{s+=c;};s+=bv(i==d.length-1);f=i+1;};};hn=x;};s+='<br/>';try{this.q.innerHTML=s;}catch(e){var fn=this.q;this.q.parentNode.removeChild(this.q);this.q=fn;this.q.innerHTML=s;this.a.parentNode.insertBefore(this.q,this.a);};for(i=0;i<eq;i++){fb=document.createTextNode('\t');document.getElementById('tab'+i).appendChild(fb);};for(i=0;i<bw;i++){fb=document.createTextNode(' ');document.getElementById('double_space'+i).appendChild(fb);};var hd=(new Date()).getTime();this.el=hd-ho;this.co=true;this.cn=false;this.dm=this.cq();};aytm.prototype.bu=function(){if((this.cd)||(this.b.length)){return;};this.cd=true;this.ag=false;var fm=(new Date()).getTime(),d=this.a.value,f=0,ep=new Array(),dq=new Object(),c='',x,cu=0;for(var i=0;i<d.length;i++){x=d.substr(i,1);if((!x.match(/[\w\'\-]/))||(i==d.length-1)){if(f==i){f++;}else if(i-f==1){f=i+1;}else{c=d.substr(f,i-f);if(!isNaN(c)){f=i+1;continue;};if((x.match(/[\w\'\-]/))&&(i==d.length-1)){c=d.substr(f);};if(this.o[c]!=undefined){f=i+1;continue;};if(cu+c.length+1>750){this.ag=true;break;}else{cu+=c.length+1;};ep[ep.length]=c;if(!dq[c]){dq[c]=new Array();};dq[c][dq[c].length]=f;f=i+1;};};};ep.sort();var gm='';for(var i=0;i<ep.length;i++){if(ep[i]==gm){continue;};this.b[this.b.length]=new aytcc(ep[i]);this.r[ep[i]]=this.b.length-1;gm=ep[i];};var fz=(new Date()).getTime();this.fe=fz-fm;this.cd=false;};aytm.prototype.replace_word=function(an,ad){var bf=this.q.firstChild,cb=0;for(i=0;bf;bf=bf.nextSibling){if(bf.nodeType==1){gl=(bf.firstChild)?bf.firstChild.nodeValue:'\n';}else{gl=bf.nodeValue;};if(bf.id==an){var d=this.a.value.replace(/\r\n/g,'\n');this.a.value=d.substr(0,cb)+ad+d.substr(cb+gl.length);var ec=document.getElementById(an);ec.className='';try{ec.innerHTML=ad;}catch(e){var ht=ec,eo=ec.nextSibling;ec.parentNode.removeChild(ec);eo.parentNode.insertBefore(ht,eo);};this.ai.hide_menu();this.al();this.ap+=1;return;};cb+=gl.length;};this.ai.hide_menu();this.o[ad]=new aytcc(ad);};aytm.prototype.ignore_word=function(){var an=this.cz(this.aj),ec=document.getElementById(an);ec.className='';this.o[ec.innerHTML].dw=false;this.ai.hide_menu();};aytm.prototype.al=function(){if(this.dl){}else this.q.scrollTop=this.a.scrollTop;if(this.dl){}else this.q.scrollLeft=this.a.scrollLeft;};aytm.prototype.dr=function(){var h=this;this.a.onkeyup=function(e){if(h.at){return;};if(h.db+h.dt<h.cq()){var hm=h.dc();if(!h.a.value.substr(hm-1,1).match(/[\w\'\-]/)){h.ag=true;};};if((!h.dl)&&(!h.da)){if(h.q.style.width!=(h.a.clientWidth)+'px'){h.q.style.width=(h.a.clientWidth)+'px';};if(h.q.style.height!=h.a.clientHeight+'px'){h.q.style.height=h.a.clientHeight+'px';};};h.dk();h.al();h.ai.hide_menu();};this.a.onkeydown=function(e){if(h.at){return;};if(h.cq()-h.z>this.cp){h.z=h.cq();h.dk();};h.al();};this.a.onchange=function(e){if(h.at){return;};h.ag=true;if(h.cq()-h.z>this.cp){h.z=h.cq();h.dk();};h.al();};this.a.onselect=function(e){if(h.at){return;};h.ag=true;if(h.cq()-h.z>this.cp){h.z=h.cq();h.dk();};h.al();};this.a.onclick=function(e){if(h.at){return;};e=(e)?e:window.event;h.al();var an=h.cz();if(an!=''){if(!h.has_selection()){h.ai.show_menu(e,an);};}else{h.ai.hide_menu();};};this.a.onmousemove=function(e){if(h.at){return;};h.al();};this.a.onscroll=function(e){if(h.at){return;};h.al();};};function aytv(){this.ai=document.createElement('div');this.ai.className='sc_ayt_menu';this.ai.style.display='none';var gb=document.createElement('div');gb.className='inner';this.ai.appendChild(gb);var bo=document.createElement('div');bo.className='separator';gb.appendChild(bo);bo=document.createElement('a');if(aytaa){bo.href='javascript:aytk.ignore_word();'}else{bo.href='javascript:oSpell.ignore_word();'};bo.appendChild(document.createTextNode('Ignore'));gb.appendChild(bo);};aytv.prototype.show_menu=function(e,an){var bo,bt,en=document.getElementById(an),gw=this.ai.firstChild.childNodes.length;while(gw>2){this.ai.firstChild.removeChild(this.ai.firstChild.firstChild);gw--;};var dp=en.innerHTML;bt=aytk.o[dp].cx.split(', ');gw=bt.length;if(gw>10){gw=10;};for(var i=gw-1;i>=0;i--){bo=document.createElement('a');if(aytaa){bo.href='javascript:aytk.replace_word( "'+an+'", "'+bt[i]+'");'}else{bo.href='javascript:oSpell.replace_word( "'+an+'", "'+bt[i]+'");'};bo.appendChild(document.createTextNode(bt[i]));this.ai.firstChild.insertBefore(bo,this.ai.firstChild.firstChild);};if(aytk.o[dp].cx==''){bo=document.createElement('a');bo.href='javascript:void(0);';bo.style.color='gray';bo.appendChild(document.createTextNode('- No suggestions -'));this.ai.firstChild.insertBefore(bo,this.ai.firstChild.firstChild);};var es=0,er=0;if((document.documentElement)&&(document.documentElement.scrollTop)){es=e.clientX+document.documentElement.scrollLeft;er=e.clientY+document.documentElement.scrollTop;}else if(document.body){es=e.clientX+document.body.scrollLeft;er=e.clientY+document.body.scrollTop;}else{es=e.pageX;er=e.pageY;};this.ai.style.left=es+'px';this.ai.style.top=er+(en.offsetHeight/2)+'px';this.ai.style.display='block';};aytv.prototype.hide_menu=function(){this.ai.style.display='none';};aytm.prototype.cq=function(){return(new Date()).getTime();};aytm.prototype.dc=function(return_is_selected){var try_moz=true;if(document.all){var ct,ga,offset;ct=document.selection.createRange();ga=ct.duplicate();if(ga.moveToElementText){try_moz=false;ga.moveToElementText(this.a);ga.setEndPoint('EndToEnd',ct);var ic=ga.text.replace(/\r\n/g,'\n'),gv=ct.text.replace(/\r\n/g,'\n');if(return_is_selected){return gv.length;}else{return ic.length-gv.length;};}}if(try_moz){if(return_is_selected){return(this.a.selectionEnd-this.a.selectionStart);}else{return this.a.selectionStart;};};};aytm.prototype.has_selection=function(){return this.dc(true);};aytm.prototype.cz=function(cs){if(cs){this.aj=cs;}else{this.aj=this.dc();};var bf=this.q.firstChild,cb=0,gl='';for(i=0;bf;bf=bf.nextSibling){if(bf.nodeType==1){gl=(bf.firstChild)?bf.firstChild.nodeValue:'\n';}else{gl=bf.nodeValue;};cb+=gl.length;if(cb>=this.aj){return((bf.className)&&(bf.className=='red_span'))?bf.id:'';};};return'';};function aytt(d){if(aytn){var aa=document.getElementById('spellingcow_debug');aa.innerHTML='<span style="color:red;">['+(aytk?aytk.cq():'')+']'+d+'</span><br/>'+aa.innerHTML;};};function aytu(d){if(aytn){var aa=document.getElementById('spellingcow_debug');aa.innerHTML=d+'<br/>'+aa.innerHTML;};};if(aytr){window.onerror=ayti;};function aytz(ez){gh=new Error(ez);gh.display();return gh;};function ayti(ez,fv,ey){if((ey==0)&&(fv=='')){var fw=ez.lastIndexOf(":"),d=ez.substring(ez.indexOf(":")+2,ez.indexOf("@")-3),hs=ez.substring(ez.indexOf("@")+1,fw),hc=ez.substr(fw+1);alert('msg=['+d+'] line_number=['+hc+'] url=['+hs+']');}else{alert('msg=['+ez+'] line_number=['+ey+'] url=['+fv+']');};return false;};Error.prototype.display=function(){if(this.id){var gs=this.id.split("\n");throw this.d+' '+gs[2];};return false;};function aytd(){var v=document.createElement('iframe');v.src=ayty+'ad_iframe.html';v.width='472px';v.height='62px';v.name='aa79071b';v.id='aa79071b';v.framespacing=0;v.frameborder='no';v.scrolling='no';v.marginwidth='0px';v.marginheight='0px';v.padding='0px';v.style.border='none';return v;};function aytf(cs){var a;if(!(a=document.getElementById(cs))){var fl=document.getElementsByName(cs);if(fl.length>0){a=fl[0];}else{return false;};}else{};return a;};function aytw(){if(aytk){alert('SpellingCow is already running.');return;};if(window.sc_ayt_params==undefined){sc_ayt_params=new Object();};if(window.sc_ayt_params.nostart){return;};var n={ej:a,spellingcow_style:(sc_ayt_params.spellingcow_style)?sc_ayt_params.spellingcow_style:-1,spellingcow_style_ie:(sc_ayt_params.spellingcow_style_ie)?sc_ayt_params.spellingcow_style_ie:-1,spellingcow_apply_all:(sc_ayt_params.spellingcow_apply_all)?sc_ayt_params.spellingcow_apply_all:false,override_font:(sc_ayt_params.override_font)?true:false,ayt_default:(sc_ayt_params.ayt_default)?sc_ayt_params.ayt_default:'on'},ik=navigator.userAgent.toLowerCase();if(0){if(window.handle_sc_ayt_incompatiable){window.handle_sc_ayt_incompatiable();};return;};var a;if((aytbb!=undefined)&&(aytbb!='')){a=aytf(aytbb);}else{a=aytf('bug_note');};if(!a){a=aytf('message');};if(!a){fu=document.getElementsByTagName('textarea');if(fu.length){a=fu[0];}else{return;};};var n={ej:a,external_style:(sc_ayt_params.external_style)?sc_ayt_params.external_style:false,spellingcow_style:(sc_ayt_params.spellingcow_style)?sc_ayt_params.spellingcow_style:-1,spellingcow_style_ie:(sc_ayt_params.spellingcow_style_ie)?sc_ayt_params.spellingcow_style_ie:-1,spellingcow_apply_all:(sc_ayt_params.spellingcow_apply_all)?sc_ayt_params.spellingcow_apply_all:false,override_font:(sc_ayt_params.override_font)?true:false,highlight_err_type:(sc_ayt_params.highlight_err_type)?sc_ayt_params.highlight_err_type:aytp,highlight_err_color:(sc_ayt_params.highlight_err_color)?sc_ayt_params.highlight_err_color:ayto,dj:(sc_ayt_params.dj)?sc_ayt_params.dj:new Array(),ayt_default:(sc_ayt_params.ayt_default)?sc_ayt_params.ayt_default:'on'};aytk=new aytm(n);};function launch_spellingcow(){window.sc_ayt_params.nostart=false;aytw();};function aytx(){if(aytj){aytj();};aytw();};if(window.spellingcow_favelet){aytbb='message';aytw();}else{aytj=window.onload;window.onload=aytx;};
