var FCKeditor=function(instanceName,width,height,toolbarSet,value) {this.InstanceName=instanceName;this.Width=width||'100%';this.Height=height||'200';this.ToolbarSet=toolbarSet||'Default';this.Value=value||'';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.2';FCKeditor.prototype.VersionBuild='19417';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 sHtml='';if(!this.CheckBrowser||this._IsCompatibleBrowser()) {sHtml+='';sHtml+=this._GetConfigHtml();sHtml+=this._GetIFrameHtml();} else {var sWidth=this.Width.toString().indexOf('%')>0?this.Width:this.Width+'px';var sHeight=this.Height.toString().indexOf('%')>0?this.Height:this.Height+'px';sHtml+=''+ this._HTMLEncode(this.Value)+'<\/textarea>';} return sHtml;} FCKeditor.prototype.ReplaceTextarea=function() {if(!this.CheckBrowser||this._IsCompatibleBrowser()) {var oTextarea=document.getElementById(this.InstanceName);var colElementsByName=document.getElementsByName(this.InstanceName);var i=0;while(oTextarea||i==0) {if(oTextarea&&oTextarea.tagName.toLowerCase()=='textarea') break;oTextarea=colElementsByName[i++];} if(!oTextarea) {alert('Error: The TEXTAREA with id or name set to "'+this.InstanceName+'" was not found');return;} oTextarea.style.display='none';if(oTextarea.tabIndex) this.TabIndex=oTextarea.tabIndex;this._InsertHtmlBefore(this._GetConfigHtml(),oTextarea);this._InsertHtmlBefore(this._GetIFrameHtml(),oTextarea);}} FCKeditor.prototype._InsertHtmlBefore=function(html,element) {if(element.insertAdjacentHTML) element.insertAdjacentHTML('beforeBegin',html);else {var oRange=document.createRange();oRange.setStartBefore(element);var oFragment=oRange.createContextualFragment(html);element.parentNode.insertBefore(oFragment,element);}} FCKeditor.prototype._GetConfigHtml=function() {var sConfig='';for(var o in this.Config) {if(sConfig.length>0)sConfig+='&';sConfig+=encodeURIComponent(o)+'='+encodeURIComponent(this.Config[o]);} return'';} FCKeditor.prototype._GetIFrameHtml=function() {var sFile='fckeditor.html';try {if((/fcksource=true/i).test(window.top.location.search)) sFile='fckeditor.original.html';} catch(e){} var sLink=this.BasePath+'editor/'+sFile+'?InstanceName='+encodeURIComponent(this.InstanceName);if(this.ToolbarSet) sLink+='&Toolbar='+this.ToolbarSet;html='';return html;} FCKeditor.prototype._IsCompatibleBrowser=function() {return FCKeditor_IsCompatibleBrowser();} FCKeditor.prototype._ThrowError=function(errorNumber,errorDescription) {this.ErrorNumber=errorNumber;this.ErrorDescription=errorDescription;if(this.DisplayErrors) {document.write('');document.write('[ FCKeditor Error '+this.ErrorNumber+': '+this.ErrorDescription+' ]');document.write('');} if(typeof(this.OnError)=='function') this.OnError(this,errorNumber,errorDescription);} FCKeditor.prototype._HTMLEncode=function(text) {if(typeof(text)!="string") text=text.toString();text=text.replace(/&/g,"&").replace(/"/g,""").replace(//g,">");return text;};(function() {var textareaToEditor=function(textarea) {var editor=new FCKeditor(textarea.name);editor.Width=Math.max(textarea.offsetWidth,FCKeditor.MinWidth);editor.Height=Math.max(textarea.offsetHeight,FCKeditor.MinHeight);return editor;} FCKeditor.ReplaceAllTextareas=function() {var textareas=document.getElementsByTagName('textarea');for(var i=0;i=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;}