var FCKeditor=function(B,D,A,C,E){this.InstanceName=B;this.Width=D||"100%";this.Height=A||"200";this.ToolbarSet=C||"Default";this.Value=E||"";this.BasePath=FCKeditor.BasePath;this.CheckBrowser=true;this.DisplayErrors=true;this.Config=new Object();this.OnError=null};FCKeditor.BasePath="/fckeditor/";FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;FCKeditor.prototype.Version="2.6.3";FCKeditor.prototype.VersionBuild="19836";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 C="";if(!this.CheckBrowser||this._IsCompatibleBrowser()){C+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />';C+=this._GetConfigHtml();C+=this._GetIFrameHtml()}else{var B=this.Width.toString().indexOf("%")>0?this.Width:this.Width+"px";var A=this.Height.toString().indexOf("%")>0?this.Height:this.Height+"px";C+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+B+";height:"+A;if(this.TabIndex){C+='" tabindex="'+this.TabIndex}C+='">'+this._HTMLEncode(this.Value)+"</textarea>"}return C};FCKeditor.prototype.ReplaceTextarea=function(){if(!this.CheckBrowser||this._IsCompatibleBrowser()){var C=document.getElementById(this.InstanceName);var B=document.getElementsByName(this.InstanceName);var A=0;while(C||A==0){if(C&&C.tagName.toLowerCase()=="textarea"){break}C=B[A++]}if(!C){alert('Error: The TEXTAREA with id or name set to "'+this.InstanceName+'" was not found');return }C.style.display="none";if(C.tabIndex){this.TabIndex=C.tabIndex}this._InsertHtmlBefore(this._GetConfigHtml(),C);this._InsertHtmlBefore(this._GetIFrameHtml(),C)}};FCKeditor.prototype._InsertHtmlBefore=function(C,B){if(B.insertAdjacentHTML){B.insertAdjacentHTML("beforeBegin",C)}else{var D=document.createRange();D.setStartBefore(B);var A=D.createContextualFragment(C);B.parentNode.insertBefore(A,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 C="fckeditor.html";try{if((/fcksource=true/i).test(window.top.location.search)){C="fckeditor.original.html"}}catch(B){}var A=this.BasePath+"editor/"+C+"?InstanceName="+encodeURIComponent(this.InstanceName);if(this.ToolbarSet){A+="&amp;Toolbar="+this.ToolbarSet}html='<iframe id="'+this.InstanceName+'___Frame" src="'+A+'" width="'+this.Width+'" height="'+this.Height;if(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(B,A){this.ErrorNumber=B;this.ErrorDescription=A;if(this.DisplayErrors){document.write('<div style="COLOR: #ff0000">');document.write("[ FCKeditor Error "+this.ErrorNumber+": "+this.ErrorDescription+" ]");document.write("</div>")}if(typeof (this.OnError)=="function"){this.OnError(this,B,A)}};FCKeditor.prototype._HTMLEncode=function(A){if(typeof (A)!="string"){A=A.toString()}A=A.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return A};(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(){var B=document.getElementsByTagName("textarea");for(var E=0;E<B.length;E++){var F=null;var C=B[E];var D=C.name;if(!D||D.length==0){continue}if(typeof arguments[0]=="string"){var G=new RegExp("(?:^| )"+arguments[0]+"(?:$| )");if(!G.test(C.className)){continue}}else{if(typeof arguments[0]=="function"){F=A(C);if(arguments[0](C,F)===false){continue}}}if(!F){F=A(C)}F.ReplaceTextarea()}}})();function FCKeditor_IsCompatibleBrowser(){var sAgent=navigator.userAgent.toLowerCase();if(/*@cc_on!@*/false&&sAgent.indexOf("mac")==-1){var sBrowserVersion=navigator.appVersion.match(/MSIE (.\..)/)[1];return(sBrowserVersion>=5.5)}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(sAgent.indexOf(" adobeair/")!=-1){return(sAgent.match(/ adobeair\/(\d+)/)[1]>=1)}if(sAgent.indexOf(" applewebkit/")!=-1){return(sAgent.match(/ applewebkit\/(\d+)/)[1]>=522)}return false};