/*
 * (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 aytaa=true;var ayty='http://buttercup.spellingcow.com/spell/';var aytjj=ayty+'spell',aythh=ayty+'images/cow_25px.gif';var aytgg='SpellingCow';var aytii='http://www.spellingcow.com';var 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.gs=100;this.dz=20000;this.dh=(n.dh)?n.dh:'';this.bs=this.df(n.bs,'success');this.br=this.df(n.br,'failure');this.p=n.p;this.cj=n.cj;this.ac=null;this.ab=new Array();this.ci=-1;this.hg=0;this.bn=true;this.af=null;};aytb.prototype.df=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.cv=function(gl){if(this.ac!=null){};this.ac=document.createElement('SCRIPT');this.ac.src=gl;this.ac.type='text/javascript';var hr=document.getElementsByTagName('HEAD')[0];hr.appendChild(this.ac);};aytb.prototype.ed=function(){this.ac.parentNode.removeChild(this.ac);this.ac=null;};aytb.prototype.connect=function(n){this.ci=aytc.length;aytc.push(this);var gl=this.bd(n);this.cv(gl);this.ae=this.cu()+this.dz;this.bj();};aytb.prototype.bd=function(n){da=n.da;be=(n.be)?n.be:false;var fv=this.dh+da+'&connection_id='+this.ci;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.eo();};aytb.prototype.eo=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.cv(fk);this.ae=this.cu()+this.dz;};aytb.prototype.response_received=function(){if(this.p){this.p('off');};this.ab.shift();this.ae=null;this.ed();if(this.bs){this.bs();};};aytb.prototype.bj=function(){if(this.af==null){if(aytaa){this.af=window.setInterval('aytc['+this.ci+'].poll()',this.au);}else{this.af=window.setInterval('cows_ajax_connections['+this.ci+'].poll()',this.au);};};};aytb.prototype.poll=function(){if(this.ae){if(this.ae<=this.cu()){this.aytdd();if(this.br){this.br('Server Timed Out');};}else if(parent.cows_ajax_response!=null){parent.cows_ajax_response();};}else if(this.ab.length>0){this.eo();};};aytb.prototype.gr=function(){this.ab.length=0;};aytb.prototype.aytdd=function(){this.ae=null;this.gr();if(this.af){window.clearInterval(this.af);};this.af=null;};aytb.prototype.disconnect=function(){this.aytdd();};aytb.prototype.cu=function(){return(new Date()).getTime();};aytb.prototype.debug=function(d){if(this.cj){this.cj(d);};};function aytcc(ad){this.ad=ad;this.db='';this.dy=false;this.ao=new Array();};function ayta(ad,ck){this.ad=ad;this.ck=ck;};function aytm(n){this.a=n.el;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.cb='';this.hy=false;this.b=new Array();this.r=new Object();this.o=new Object();this.ap=0;this.au=250;this.gj=30;this.ct=300;this.dv=1000;this.ff=40;this.bi=0;this.bn=true;this.af=null;this.at=false;this.ca=0;this.l=0;this.fe=0;this.en=0;this.dp=0;this.ag=false;this.cs=true;this.ex=true;this.cr=false;this.ce=false;this.y=false;this.z=0;this.de=0;this.aj=0;this.ai=null;this.aytee=null;this.v=null;this.w='window';this.dn=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);this.bv=(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);this.aytff=null;this.fq(0);};aytm.prototype.fq=function(retry_count){this.aytff=new aytb({dh:aytjj,bs:ayth,br:aytg,p:ayte,cj:aytt});this.dx();};aytm.prototype.dx=function(){var bq=this.eg();if(window.spellingcow_favelet){}else if(this.ayt_default=='off'){if(parseInt(bq['auto_ayt'])!=1){this.cd(true);if(!isNaN(parseInt(bq['auto_ayt']))){this.bh('spellingcow_ayt',escape('auto_ayt:0;autologinid:foo;user_id:bar;'),30)};return;};}else if((!isNaN(bq['auto_ayt']))&&(bq['auto_ayt']==0)){this.cd(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.cd(false);this.gq();this.dt();this.ec();var gk=this.cu(),ij=gk+'ac.',bc=location.hostname;bc=bc.replace(/%/g,'_AYT');this.aytff.connect({da:'?message_mode=ayt&mode=connect&timestamp='+gk+'&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.fz();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 gv=document.getElementById("spellingcow_toolbar");gv.parentNode.removeChild(gv);this.bh('spellingcow_ayt',escape('auto_ayt:1;autologinid:foo;user_id:bar;'),365);this.ayt_default='on';this.dx();};aytm.prototype.bh=function(name,value,days){if(days){var du=new Date();du.setTime(du.getTime()+(days*24*60*60*1000));var gu="; expires="+du.toGMTString();}else var gu="";document.cookie=name+"="+value+gu+"; path=/";};aytm.prototype.gp=function(name){var hm=name+"=",em=document.cookie.split(';');for(var i=0;i<em.length;i++){var am=em[i];while(am.charAt(0)==' ')am=am.substring(1,am.length);if(am.indexOf(hm)==0)return am.substring(hm.length,am.length);};return null;};aytm.prototype.eg=function(){var fy=unescape(this.gp('spellingcow_ayt')),n=fy.split(';');var gh=new Object();for(i=0;i<n.length;i++){if(n[i]!=''){var ft=n[i].split(':');gh[ft[0]]=ft[1];};};return gh;};aytm.prototype.toggle_debug_mode=function(){var cl=document.getElementById("mirror_mode_checkbox").checked;this.q.style.position=(cl)?'relative':'absolute';this.q.style.color=(cl)?'white':'window';this.q.style['background-color']=(cl)?'black':'window';this.q.style['backgroundColor']=(cl)?'black':'window';aytn=cl;document.getElementById('spellingcow_debug').style.display=(cl)?'':'none';};aytm.prototype.fz=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.h=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)),gg=(hu&&(hv.indexOf("win")!=-1)),hq=(hu&&(hv.indexOf("mac")!=-1));if(hq)return;var hr=document.getElementsByTagName("head")[0],cf=(typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml","style"):document.createElement("style");if(!gg){var hk=document.createTextNode(selector+" {"+declaration+"}");cf.appendChild(hk);};cf.setAttribute("type","text/css");cf.setAttribute("media","screen");hr.appendChild(cf);if(gg&&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 gf=style_prop;gf=gf.replace(/([A-Z])/g,"-$1");gf=gf.toLowerCase();return document.defaultView.getComputedStyle(element,"").getPropertyValue(gf);}else{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 hc='';if(value.substr(value.length-1)=='%'){hc='%';}else{hc=value.substr(value.length-2);};var hx=value.substr(0,value.length-(hc.length));az['numeric']=parseInt(hx);az['unit']=hc;return az;};aytm.prototype.ch=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 dc=this.m(this.a,'font-size','fontSize','11px');if(dc=='relative'){dc='13px';};var ew=this.m(this.a,'font-family','fontFamily','Verdana, Arial, Helvetica, sans-serif'),fi=this.m(this.a,'font-style','fontStyle','normal'),ek=this.m(this.a,'font-variant','fontVariant','normal'),ev=this.m(this.a,'font-weight','fontWeight','400'),ej=this.m(this.a,'font-stretch','fontStretch',''),cz=this.m(this.a,'line-height','lineHeight','normal');if(document.all){var dk=this.k(dc);cz=(parseInt(dk['numeric'])*1.2)+dk['unit'];};var bl="line-height: "+cz+";font-size: "+dc+";font-family: "+ew+";font-style: "+fi+";font-variant: "+ek+";font-weight: "+ev+";font-stretch: "+ej+";";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 hb=this.m(this.a,'text-align','textAlign','left'),ha=(ayts)?'relative':'absolute',ge=(ayts)?'white':this.w,dq=(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')),bz=this.k(this.m(this.a,'padding-bottom','paddingBottom','0px')),cq=this.k(this.m(this.a,'padding-left','paddingLeft','0px'));if(this.bv){ak['numeric']=1;ak['unit']='px';ar['numeric']=0;ar['unit']='px';bz['numeric']=0;bz['unit']='px';cq['numeric']=6;cq['unit']='px';};ak['numeric']=(ak['unit']=='px')?ak['numeric']+1:ak['numeric'];var cp=ar;if(this.dn){var bm=new Array();bm['numeric']=0;bm['unit']='px';cp=bm;}else if((document.all)&&(ar['unit']=='px')){ar['numeric']=ar['numeric']+4;};var fp="padding: "+(this.ch(ak,cp,bz,cq))+";";var by=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.bv){by['numeric']=0;by['unit']='px';ay['numeric']=0;ay['unit']='px';aq['numeric']=0;aq['unit']='px';bk['numeric']=0;bk['unit']='px';};var dg=this.k(this.m(this.a,'margin-top','marginTop','0px')),ei=this.k(this.m(this.a,'margin-right','marginRight','0px')),ef=this.k(this.m(this.a,'margin-bottom','marginBottom','0px')),eu=this.k(this.m(this.a,'margin-left','marginLeft','0px'));if(this.bv){dg['numeric']=0;dg['unit']='px';};var hw=this.bb(by,dg),hj=this.bb(ay,ei),gz=this.bb(aq,ef),hp=this.bb(bk,eu),eh=this.ch(dg,ei,ef,eu),et="margin: "+this.ch(hw,hj,gz,hp)+";";var hi=this.ch(by,ay,aq,bk),bp="position: "+ha+";"+bl+fp+et+"background: "+dq+";text-align: "+hb+";color: "+ge+";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.h('#spellingcow_div',bp);};this.h('.sc_ayt_debug',"position: relative;font: menu;text-align:left;line-height: expression('1.5em');background: white;border: 1px solid gray; overflow: auto ;");this.h('.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.h('#spellingcow_div .white_span',bl+"white-space: pre;");this.h('#spellingcow_div .double_space_span',bl+"white-space: pre;");};if(this.external_style){}else if(this.highlight_err_type=='highlight'){this.h('#spellingcow_div .red_span',bl+"background:"+this.highlight_err_color+";color:"+this.highlight_err_color+";");}else{this.h('#spellingcow_div .red_span',bl+"background:url("+ayty+"images/redline.png) repeat-x bottom;");};if(document.all){this.t(this.a,'line-height','lineHeight',cz);};this.t(this.a,'margin','margin',eh);this.t(this.a,'border-top-width','borderTopWidth',by['numeric']+by['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.dn){var ax=new Array();ax['numeric']=this.a.clientWidth;ax['unit']='px';var hh=this.bb(ax,cq,true);this.q.style.width=hh['numeric']-21;var av=new Array();av['numeric']=this.a.clientHeight;av['unit']='px';var fo=this.bb(ak,bz),gy=this.bb(av,fo,true);this.q.style.height=gy['numeric'];}else if(this.bv){this.q.style.width=this.a.clientWidth-27;};this.t(this.a,'font-size','fontSize',dc);this.t(this.a,'font-family','fontFamily',ew);this.t(this.a,'font-style','fontStyle',fi);this.t(this.a,'font-variant','fontVariant',ek);this.t(this.a,'font-weight','fontWeight',ev);this.t(this.a,'font-stretch','fontStretch',ej);this.t(this.a,'line-height','lineHeight',cz);this.a.parentNode.insertBefore(this.q,this.a);};aytm.prototype.cd=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.h('.sc_toolbar_label',"display:inline;position:relative;top:-3px;padding:0;margin:0;border:0;");this.h('#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){co='<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{co='<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>',dj=(aythh=='')?'display:block;margin:0;padding:0;border:none;':'display:inline;';var ea=(aytaa)?'aytk':'oSpell',co=fh+fa+fg+' &nbsp; <label class="sc_toolbar_label" style="'+dj+'"><input type="checkbox" id="spellingcow_enable" style="position:relative;top:-3px;width:20px;padding:0;margin:0;border:0;" onclick="'+ea+'.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=co;}catch(e){var gd=u;u.parentNode.removeChild(u);gd.innerHTML=co;this.a.parentNode.insertBefore(gd,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.gq=function(){this.h('.sc_ayt_menu','border: 1px solid ;border-color: threedlightshadow threeddarkshadow threeddarkshadow threedlightshadow;padding:0px;position:absolute;z-index:4;');this.h('.sc_ayt_menu .inner','border: 1px solid ;border-color: threedhighlight threedshadow threedshadow threedhighlight;background: threedface;padding: 2px;text-align:left');this.h('.sc_ayt_menu a','display: block;font: menu;color: menutext;padding: 1px 5ex 1px 3ex;text-decoration: none;');this.h('.sc_ayt_menu a:hover','background: highlight;color: highlighttext;');this.h('.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.eb=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({da:'?message_mode=ayt&session_id='+this.cb+'&mode=ayt_check&replace='+this.ap+'&message='+d.replace(/'/g,'\'')});this.ap=0;};function ayth(){aytk.ca=0;aytk.l=0;};function aytg(ie){aytk.ca++;aytk.l=0;};function ayte(ib){if(ib=='on'){};};aytm.prototype.read=function(remote_response){};aytm.prototype.set_session_id=function(cb){this.cb=cb;this.bj();};aytm.prototype.update_message=function(cb){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.cb;var ih=this.aytee.appendChild(this.v);};aytm.prototype.update_word=function(remote_response){var dw=remote_response.split(', '),ad=dw[0],hf=remote_response.substr(ad.length+2);if(!isNaN(ad)){return;};this.b[this.r[ad]].db=hf;this.b[this.r[ad]].dy=true;};aytm.prototype.word_fragment=function(orig_word,fragment,ck){var dw=fragment.split(', '),ad=dw[0],hf=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].dy=true;this.b[this.b.length-1].db=hf;};var ao=new ayta(ad,ck);this.b[this.r[orig_word]].dy=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.dm();this.r.length=0;this.b.length=0;this.y=false;this.de=this.cu();};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.ca>0)&&(this.l==0)){if(this.ca<=2){this.l=0;}else if(this.ca<=6){this.l=this.cu()+30000;}else{this.l=this.cu()+120000;};};if((this.ex)&&(this.b.length==0)){this.bu();this.eb();this.ex=false;}else if((this.ca>0)&&(this.l!=-1)&&(this.cu()>=this.l)){this.b.length=0;this.y=false;this.aytff.bj();this.l=-1;}else if((this.b.length==0)&&(this.bi%this.gj==0)){this.bu();if(this.b.length>0){this.eb();}else{this.dm();};}else if((!this.b.length)&&(this.ag)&&(!this.y)&&(!this.cr)&&(!this.ce)){this.bu();this.eb();}else if(!this.cs){this.dm();};};aytm.prototype.aytdd=function(){if(!this.af){return;};window.clearInterval(this.af);this.af=null;};aytm.prototype.ec=function(){var go="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",ds=go.split(' ');for(var i=0;i<ds.length;i++){this.o[ds[i]]=new aytcc(ds[i]);};};aytm.prototype.dm=function(){if(this.ce){return;}else if(this.cr){this.cs=false;return;}else if(this.cu()-this.dp<300){this.cs=false;return;};this.cr=true;var ho=(new Date()).getTime(),d=this.a.value.replace(/\r\n/g,'\n');function bw(hz){var as='';if(x=='\t'){as='<span class="white_span" id="tab'+es+'"></span>';es++;}else if((x==' ')&&(i<d.length-2)&&(d.substr(i+1,1)==' ')){as='<span class="double_space_span" id="double_space'+bx+'"></span>';bx++;}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,es=0,aw=0,bx=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+=bw();f++;}else if(i-f==1){hl=d.substr(f,i-f);s+=hl;s+=bw();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].dy){if(this.o[c].ao.length){var di=0;for(var j=0;j<this.o[c].ao.length;j++){fc=(this.o[c].ao[j].ck)?c.substr(di,this.o[c].ao[j].ck-di):'';s+=fc;s+='<span class="red_span" id="sc_err'+aw+'">'+this.o[c].ao[j].ad+'</span>';aw++;di=this.o[c].ao[j].ck+this.o[c].ao[j].ad.length;};fc=c.substr(di);s+=fc;}else{s+='<span class="red_span" id="sc_err'+aw+'">'+c+'</span>';aw++;};}else{s+=c;};}else{s+=c;};s+=bw(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<es;i++){fb=document.createTextNode('\t');document.getElementById('tab'+i).appendChild(fb);};for(i=0;i<bx;i++){fb=document.createTextNode(' ');document.getElementById('double_space'+i).appendChild(fb);};var he=(new Date()).getTime();this.en=he-ho;this.cs=true;this.cr=false;this.dp=this.cu();};aytm.prototype.bu=function(){if((this.ce)||(this.b.length)){return;};this.ce=true;this.ag=false;var fm=(new Date()).getTime(),d=this.a.value,f=0,er=new Array(),ds=new Object(),c='',x,cy=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(cy+c.length+1>750){this.ag=true;break;}else{cy+=c.length+1;};er[er.length]=c;if(!ds[c]){ds[c]=new Array();};ds[c][ds[c].length]=f;f=i+1;};};};er.sort();var gn='';for(var i=0;i<er.length;i++){if(er[i]==gn){continue;};this.b[this.b.length]=new aytcc(er[i]);this.r[er[i]]=this.b.length-1;gn=er[i];};var ga=(new Date()).getTime();this.fe=ga-fm;this.ce=false;};aytm.prototype.replace_word=function(an,ad){var bf=this.q.firstChild,cc=0;for(i=0;bf;bf=bf.nextSibling){if(bf.nodeType==1){gm=(bf.firstChild)?bf.firstChild.nodeValue:'\n';}else{gm=bf.nodeValue;};if(bf.id==an){var d=this.a.value.replace(/\r\n/g,'\n');this.a.value=d.substr(0,cc)+ad+d.substr(cc+gm.length);var ee=document.getElementById(an);ee.className='';try{ee.innerHTML=ad;}catch(e){var ht=ee,eq=ee.nextSibling;ee.parentNode.removeChild(ee);eq.parentNode.insertBefore(ht,eq);};this.ai.hide_menu();this.al();this.ap+=1;return;};cc+=gm.length;};this.ai.hide_menu();this.o[ad]=new aytcc(ad);};aytm.prototype.ignore_word=function(){var an=this.dd(this.aj),ee=document.getElementById(an);ee.className='';this.o[ee.innerHTML].dy=false;this.ai.hide_menu();};aytm.prototype.al=function(){if((this.dn)||(this.bv)){}else this.q.scrollTop=this.a.scrollTop;if((this.dn)||(this.bv)){}else this.q.scrollLeft=this.a.scrollLeft;};aytm.prototype.dt=function(){var g=this;this.a.onkeyup=function(e){if(g.at){return;};if(g.de+g.dv<g.cu()){var fx=g.cg();if(!g.a.value.substr(fx-1,1).match(/[\w\'\-]/)){g.ag=true;};};if((!g.dn)&&(!g.bv)){if(g.q.style.width!=(g.a.clientWidth)+'px'){g.q.style.width=(g.a.clientWidth)+'px';};if(g.q.style.height!=g.a.clientHeight+'px'){g.q.style.height=g.a.clientHeight+'px';};};g.dm();g.al();g.ai.hide_menu();};this.a.onkeydown=function(e){if(g.at){return;};if(g.cu()-g.z>this.ct){g.z=g.cu();g.dm();};g.al();};this.a.onchange=function(e){if(g.at){return;};g.ag=true;if(g.cu()-g.z>this.ct){g.z=g.cu();g.dm();};g.al();};this.a.onselect=function(e){if(g.at){return;};g.ag=true;if(g.cu()-g.z>this.ct){g.z=g.cu();g.dm();};g.al();};this.a.onclick=function(e){if(g.at){return;};e=(e)?e:window.event;g.al();var fx=g.cg(),an=g.dd();if(an!=''){if(!g.has_selection()){g.ai.show_menu(e,an);};}else{g.ai.hide_menu();};};this.a.onmousemove=function(e){if(g.at){return;};g.al();};this.a.onscroll=function(e){if(g.at){return;};g.al();};};function aytv(){this.ai=document.createElement('div');this.ai.className='sc_ayt_menu';this.ai.style.display='none';var gc=document.createElement('div');gc.className='inner';this.ai.appendChild(gc);var bo=document.createElement('div');bo.className='separator';gc.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'));gc.appendChild(bo);};aytv.prototype.show_menu=function(e,an){var bo,bt,ep=document.getElementById(an),gx=this.ai.firstChild.childNodes.length;while(gx>2){this.ai.firstChild.removeChild(this.ai.firstChild.firstChild);gx--;};var dr=ep.innerHTML;bt=aytk.o[dr].db.split(', ');gx=bt.length;if(gx>10){gx=10;};for(var i=gx-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[dr].db==''){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 cn=0,cm=0;if((document.documentElement)&&(document.documentElement.scrollTop)){cn=e.clientX+document.documentElement.scrollLeft;cm=e.clientY+document.documentElement.scrollTop;}else if(document.body){cn=e.clientX+document.body.scrollLeft;cm=e.clientY+document.body.scrollTop;}else{cn=e.pageX;cm=e.pageY;};this.ai.style.left=cn+'px';this.ai.style.top=cm+(ep.offsetHeight/2)+'px';this.ai.style.display='block';};aytv.prototype.hide_menu=function(){this.ai.style.display='none';};aytm.prototype.cu=function(){return(new Date()).getTime();};aytm.prototype.cg=function(return_is_selected){var try_moz=1;if(document.all){var cx,gb,offset;cx=document.selection.createRange();gb=cx.duplicate();if(gb.moveToElementText){try_moz=0;gb.moveToElementText(this.a);gb.setEndPoint('EndToEnd',cx);var ic=gb.text.replace(/\r\n/g,'\n'),gw=cx.text.replace(/\r\n/g,'\n');if(return_is_selected){return gw.length;}else{return ic.length-gw.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.cg(true);};aytm.prototype.dd=function(cw){if(cw){this.aj=cw;}else{this.aj=this.cg();};var bf=this.q.firstChild,cc=0,gm='';for(i=0;bf;bf=bf.nextSibling){if(bf.nodeType==1){gm=(bf.firstChild)?bf.firstChild.nodeValue:'\n';}else{gm=bf.nodeValue;};cc+=gm.length;if(cc>=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.cu():'')+']'+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){gi=new Error(ez);gi.display();return gi;};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),hd=ez.substr(fw+1);alert('msg=['+d+'] line_number=['+hd+'] url=['+hs+']');}else{alert('msg=['+ez+'] line_number=['+ey+'] url=['+fv+']');};return false;};Error.prototype.display=function(){if(this.id){var gt=this.id.split("\n");throw this.d+' '+gt[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(cw){var a;if(!(a=document.getElementById(cw))){var fl=document.getElementsByName(cw);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={el: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={el: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,dl:(sc_ayt_params.dl)?sc_ayt_params.dl: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;};
