var a;function FCKeditor(b,c,d,f,e){this.InstanceName=b;this.Width=c||"100%";this.Height=d||"200";this.ToolbarSet=f||"Default";this.Value=e||"";this.BasePath=FCKeditor.BasePath;this.DisplayErrors=this.CheckBrowser=true;this.Config={};this.OnError=null}FCKeditor.BasePath="/fckeditor/";FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;a=FCKeditor.prototype;a.Version="2.6.4.1";a.VersionBuild="23187";a.Create=function(){document.write(this.CreateHtml())};
a.CreateHtml=function(){if(!this.InstanceName||this.InstanceName.length==0){this._ThrowError(701,"You must specify an instance name.");return""}var b="";if(!this.CheckBrowser||this._IsCompatibleBrowser()){b+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />';b+=this._GetConfigHtml();b+=this._GetIFrameHtml()}else{var c=this.Width.toString().indexOf("%")>0?this.Width:this.Width+"px",d=this.Height.toString().indexOf("%")>
0?this.Height:this.Height+"px";b+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+c+";height:"+d;if(this.TabIndex)b+='" tabindex="'+this.TabIndex;b+='">'+this._HTMLEncode(this.Value)+"</textarea>"}return b};
a.ReplaceTextarea=function(){if(!document.getElementById(this.InstanceName+"___Frame"))if(!this.CheckBrowser||this._IsCompatibleBrowser()){for(var b=document.getElementById(this.InstanceName),c=document.getElementsByName(this.InstanceName),d=0;b||d==0;){if(b&&b.tagName.toLowerCase()=="textarea")break;b=c[d++]}if(b){b.style.display="none";if(b.tabIndex)this.TabIndex=b.tabIndex;this._InsertHtmlBefore(this._GetConfigHtml(),b);this._InsertHtmlBefore(this._GetIFrameHtml(),b)}}};
a._InsertHtmlBefore=function(b,c){if(c.insertAdjacentHTML)c.insertAdjacentHTML("beforeBegin",b);else{var d=document.createRange();d.setStartBefore(c);b=d.createContextualFragment(b);c.parentNode.insertBefore(b,c)}};a._GetConfigHtml=function(){var b="";for(var c in this.Config){if(b.length>0)b+="&amp;";b+=encodeURIComponent(c)+"="+encodeURIComponent(this.Config[c])}return'<input type="hidden" id="'+this.InstanceName+'___Config" value="'+b+'" style="display:none" />'};
a._GetIFrameHtml=function(){var b="fckeditor.html";try{if(/fcksource=true/i.test(window.top.location.search))b="fckeditor.original.html"}catch(c){}b=this.BasePath+"editor/"+b+"?InstanceName="+encodeURIComponent(this.InstanceName);if(this.ToolbarSet)b+="&amp;Toolbar="+this.ToolbarSet;b='<iframe id="'+this.InstanceName+'___Frame" src="'+b+'" width="'+this.Width+'" height="'+this.Height;if(this.TabIndex)b+='" tabindex="'+this.TabIndex;b+='" frameborder="0" scrolling="no"></iframe>';return b};
a._IsCompatibleBrowser=function(){return FCKeditor_IsCompatibleBrowser()};a._ThrowError=function(b,c){this.ErrorNumber=b;this.ErrorDescription=c;if(this.DisplayErrors){document.write('<div style="COLOR: #ff0000">');document.write("[ FCKeditor Error "+this.ErrorNumber+": "+this.ErrorDescription+" ]");document.write("</div>")}typeof this.OnError=="function"&&this.OnError(this,b,c)};
a._HTMLEncode=function(b){if(typeof b!="string")b=b.toString();return b=b.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};
(function(){function b(c){var d=new FCKeditor(c.name);d.Width=Math.max(c.offsetWidth,FCKeditor.MinWidth);d.Height=Math.max(c.offsetHeight,FCKeditor.MinHeight);return d}FCKeditor.ReplaceAllTextareas=function(c){for(var d=document.getElementsByTagName("textarea"),f=0;f<d.length;f++){var e=null,g=d[f],h=g.name;if(!(!h||h.length==0)){if(typeof c=="string"){h=new RegExp("(?:^| )"+c+"(?:$| )");if(!h.test(g.className))continue}else if(typeof c=="function"){e=b(g);if(c(g,e)===false)continue}e||(e=b(g));e.ReplaceTextarea()}}}})();
function FCKeditor_IsCompatibleBrowser(){var b=navigator.userAgent.toLowerCase();if(navigator.product=="Gecko"&&navigator.productSub>=20030210&&!(typeof opera=="object"&&opera.postError))return true;if(window.opera&&window.opera.version&&parseFloat(window.opera.version())>=9.5)return true;if(b.indexOf(" adobeair/")!=-1)return b.match(/ adobeair\/(\d+)/)[1]>=1;if(b.indexOf(" applewebkit/")!=-1)return b.match(/ applewebkit\/(\d+)/)[1]>=522;return false};
