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

