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=true;this.Config={};this.OnError=null};FCKeditor.BasePath="/fckeditor/";FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;FCKeditor.prototype.Version="2.6.5";FCKeditor.prototype.VersionBuild="23959";FCKeditor.prototype.Create=function(){document.write(this.CreateHtml())};
FCKeditor.prototype.CreateHtml=function(){if(!this.InstanceName||this.InstanceName.length==0){this._ThrowError(701,"You must specify an instance name.");return""}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;if(this.TabIndex)a+='" tabindex="'+this.TabIndex;a+='">'+this._HTMLEncode(this.Value)+"</textarea>"}return a};
FCKeditor.prototype.ReplaceTextarea=function(){if(!document.getElementById(this.InstanceName+"___Frame"))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="";for(var b in this.Config){if(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{if(/fcksource=true/i.test(window.top.location.search))a="fckeditor.original.html"}catch(b){}a=this.BasePath+"editor/"+a+"?InstanceName="+encodeURIComponent(this.InstanceName);if(this.ToolbarSet)a+="&amp;Toolbar="+this.ToolbarSet;a='<iframe id="'+this.InstanceName+'___Frame" src="'+a+'" width="'+this.Width+'" height="'+this.Height;if(this.TabIndex)a+='" tabindex="'+this.TabIndex;a+='" frameborder="0" scrolling="no"></iframe>';
return a};FCKeditor.prototype._IsCompatibleBrowser=function(){return FCKeditor_IsCompatibleBrowser()};FCKeditor.prototype._ThrowError=function(a,b){this.ErrorNumber=a;this.ErrorDescription=b;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,a,b)};
FCKeditor.prototype._HTMLEncode=function(a){if(typeof a!="string")a=a.toString();return a=a.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};
(function(){var a=function(b){var c=new FCKeditor(b.name);c.Width=Math.max(b.offsetWidth,FCKeditor.MinWidth);c.Height=Math.max(b.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);if(arguments[0](e,
d)===false)continue}d||(d=a(e));d.ReplaceTextarea()}}}})();
function FCKeditor_IsCompatibleBrowser(){var a=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(a.indexOf(" adobeair/")!=-1)return a.match(/ adobeair\/(\d+)/)[1]>=1;if(a.indexOf(" applewebkit/")!=-1)return a.match(/ applewebkit\/(\d+)/)[1]>=522;return false};
