text: /*
  Copyright (c) 2008, Yahoo! Inc. All rights reserved.
  Code licensed under the BSD License:
  http://developer.yahoo.net/yui/license.txt
  version: 2.5.2
  */
  (function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(F){var E=this.getMenu().getItems();if(E.length===0){this.getMenu()._onBeforeShow();E=this.getMenu().getItems();}for(var D=0;D<E.length;D++){E[D].cfg.setProperty("checked",false);if(E[D].value==F){E[D].cfg.setProperty("checked",true);}}};}else{YAHOO.widget.ToolbarButtonAdvanced=function(){};}YAHOO.widget.ToolbarButton=function(E,D){if(C.isObject(arguments[0])&&!B.get(E).nodeType){D=E;}var G=(D||{});var F={element:null,attributes:G};if(!F.attributes.type){F.attributes.type="push";}F.element=document.createElement("span");F.element.setAttribute("unselectable","on");F.element.className="yui-button yui-"+F.attributes.type+"-button";F.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';F.element.firstChild.firstChild.tabIndex="-1";F.attributes.id=B.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,F.element,F.attributes);};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover");}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover");},checkValue:function(F){if(this.get("type")=="menu"){var E=this._button.options;for(var D=0;D<E.length;D++){if(E[D].value==F){E.selectedIndex=D;}}}},init:function(E,D){YAHOO.widget.ToolbarButton.superclass.init.call(this,E,D);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true);},initAttributes:function(D){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,D);this.setAttributeConfig("value",{value:D.value});this.setAttributeConfig("menu",{value:D.menu||false});this.setAttributeConfig("type",{value:D.type,writeOnce:true,method:function(H){var G,F;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}switch(H){case"select":case"menu":G=document.createElement("select");var I=this.get("menu");for(var E=0;E<I.length;E++){F=document.createElement("option");F.innerHTML=I[E].text;F.value=I[E].value;if(I[E].checked){F.selected=true;}G.appendChild(F);}this._button.parentNode.replaceChild(G,this._button);A.on(G,"change",this._handleSelect,this,true);this._button=G;break;}}});this.setAttributeConfig("disabled",{value:D.disabled||false,method:function(E){if(E){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled");if(this.get("type")=="color"){this.get("menu").hide();}}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled");}if(this.get("type")=="menu"){this._button.disabled=E;}}});this.setAttributeConfig("label",{value:D.label,method:function(E){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}if(this.get("type")=="push"){this._button.innerHTML=E;}}});this.setAttributeConfig("title",{value:D.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(E){this.appendTo(E);}});},_handleSelect:function(E){var D=A.getTarget(E);var F=D.options[D.selectedIndex].value;this.fireEvent("change",{type:"change",value:F});},getMenu:function(){return this.get("menu");},destroy:function(){A.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;}}},fireEvent:function(E,D){if(this.DOM_EVENTS[E]&&this.get("disabled")){return ;}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,E,D);},toString:function(){return"ToolbarButton ("+this.get("id")+")";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang;var B=function(G){var F=G;if(E.isString(G)){F=this.getButtonById(G);}if(E.isNumber(G)){F=this.getButtonByIndex(G);}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(G);}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){return F;}return false;};YAHOO.widget.Toolbar=function(J,I){if(E.isObject(arguments[0])&&!C.get(J).nodeType){I=J;}var L=(I||{});var K={element:null,attributes:L};if(E.isString(J)&&C.get(J)){K.element=C.get(J);}else{if(E.isObject(J)&&C.get(J)&&C.get(J).nodeType){K.element=C.get(J);}}if(!K.element){K.element=document.createElement("DIV");K.element.id=C.generateId();if(L.container&&C.get(L.container)){C.get(L.container).appendChild(K.element);}}if(!K.element.id){K.element.id=((E.isString(J))?J:C.generateId());}var G=document.createElement("fieldset");var H=document.createElement("legend");H.innerHTML="Toolbar";G.appendChild(H);var F=document.createElement("DIV");K.attributes.cont=F;C.addClass(F,"yui-toolbar-subcont");G.appendChild(F);K.element.appendChild(G);K.element.tabIndex=-1;K.attributes.element=K.element;K.attributes.id=K.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,K.element,K.attributes);};function D(I,F,J){C.addClass(this.element,"yui-toolbar-"+J.get("value")+"-menu");if(C.hasClass(J._button.parentNode.parentNode,"yui-toolbar-select")){C.addClass(this.element,"yui-toolbar-select-menu");}var G=this.getItems();for(var H=0;H<G.length;H++){C.addClass(G[H].element,"yui-toolbar-"+J.get("value")+"-"+((G[H].value)?G[H].value.replace(/ /g,"-").toLowerCase():G[H]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));C.addClass(G[H].element,"yui-toolbar-"+J.get("value")+"-"+((G[H].value)?G[H].value.replace(/ /g,"-"):G[H]._oText.nodeValue.replace(/ /g,"-")));}}YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(G,F){YAHOO.widget.Toolbar.superclass.init.call(this,G,F);
  },initAttributes:function(F){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,F);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:F.buttonType||"basic",writeOnce:true,validator:function(G){switch(G){case"advanced":case"basic":return true;}return false;},method:function(G){if(G=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(H){for(var G in H){if(E.hasOwnProperty(H,G)){if(H[G].type=="separator"){this.addSeparator();}else{if(H[G].group!==undefined){this.addButtonGroup(H[G]);}else{this.addButton(H[G]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(G){if(this.get("disabled")===G){return false;}if(G){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:F.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((F.grouplabels===false)?false:true),method:function(G){if(G){C.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{C.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(H){if(H){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";A.on(this._titlebar,"focus",function(){this._handleFocus();},this,true);C.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(E.isString(H)){var G=document.createElement("h2");G.tabIndex="-1";G.innerHTML='<a href="#" tabIndex="0">'+H+"</a>";this._titlebar.appendChild(G);A.on(G.firstChild,"click",function(I){A.stopEvent(I);});A.on([G,G.firstChild],"focus",function(){this._handleFocus();},this,true);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collapse",true);}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(I){if(this._titlebar){var H=null;var G=C.getElementsByClassName("collapse","span",this._titlebar);if(I){if(G.length>0){return true;}H=document.createElement("SPAN");H.innerHTML="X";H.title=this.STR_COLLAPSE;C.addClass(H,"collapse");this._titlebar.appendChild(H);A.addListener(H,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{H=C.getElementsByClassName("collapse","span",this._titlebar);if(H[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}H[0].parentNode.removeChild(H[0]);}}}}});this.setAttributeConfig("draggable",{value:(F.draggable||false),method:function(G){if(G&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";C.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(G){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);C.addClass(this._titlebar,"draggable");}else{C.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(H){var G=true;if(!YAHOO.util.DD){G=false;}return G;}});},addButtonGroup:function(J){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped");}var K=document.createElement("DIV");C.addClass(K,this.CLASS_PREFIX+"-group");C.addClass(K,this.CLASS_PREFIX+"-group-"+J.group);if(J.label){var G=document.createElement("h3");G.innerHTML=J.label;K.appendChild(G);}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(K);var I=document.createElement("ul");K.appendChild(I);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[J.group]=I;for(var H=0;H<J.buttons.length;H++){var F=document.createElement("li");F.className=this.CLASS_PREFIX+"-groupitem";I.appendChild(F);if((J.buttons[H].type!==undefined)&&J.buttons[H].type=="separator"){this.addSeparator(F);}else{J.buttons[H].container=F;this.addButton(J.buttons[H]);}}},addButtonToGroup:function(H,I,J){var G=this._buttonGroupList[I];var F=document.createElement("li");F.className=this.CLASS_PREFIX+"-groupitem";H.container=F;this.addButton(H,J);G.appendChild(F);},addButton:function(K,J){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!K.container){K.container=this.get("cont");}if((K.type=="menu")||(K.type=="split")||(K.type=="select")){if(E.isArray(K.menu)){for(var Q in K.menu){if(E.hasOwnProperty(K.menu,Q)){var W={fn:function(Z,X,Y){if(!K.menucmd){K.menucmd=K.value;}K.value=((Y.value)?Y.value:Y._oText.nodeValue);},scope:this};K.menu[Q].onclick=W;}}}}var R={},O=false;for(var M in K){if(E.hasOwnProperty(K,M)){if(!this._toolbarConfigs[M]){R[M]=K[M];}}}if(K.type=="select"){R.type="menu";}if(K.type=="spin"){R.type="push";
  }if(R.type=="color"){if(YAHOO.widget.Overlay){R=this._makeColorButton(R);}else{O=true;}}if(R.menu){if((YAHOO.widget.Overlay)&&(K.menu instanceof YAHOO.widget.Overlay)){K.menu.showEvent.subscribe(function(){this._button=R;});}else{for(var P=0;P<R.menu.length;P++){if(!R.menu[P].value){R.menu[P].value=R.menu[P].text;}}if(this.browser.webkit){R.focusmenu=false;}}}if(O){K=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=K;var U=new this.buttonType(R);U.get("element").tabIndex="-1";U.get("element").setAttribute("role","button");U._selected=true;if(!U.buttonType){U.buttonType="rich";U.checkValue=function(Z){var Y=this.getMenu().getItems();if(Y.length===0){this.getMenu()._onBeforeShow();Y=this.getMenu().getItems();}for(var X=0;X<Y.length;X++){Y[X].cfg.setProperty("checked",false);if(Y[X].value==Z){Y[X].cfg.setProperty("checked",true);}}};}if(this.get("disabled")){U.set("disabled",true);}if(!K.id){K.id=U.get("id");}if(J){var G=U.get("element");var N=null;if(J.get){N=J.get("element").nextSibling;}else{if(J.nextSibling){N=J.nextSibling;}}if(N){N.parentNode.insertBefore(G,N);}}U.addClass(this.CLASS_PREFIX+"-"+U.get("value"));var T=document.createElement("span");T.className=this.CLASS_PREFIX+"-icon";U.get("element").insertBefore(T,U.get("firstChild"));if(U._button.tagName.toLowerCase()=="button"){U.get("element").setAttribute("unselectable","on");var V=document.createElement("a");V.innerHTML=U._button.innerHTML;V.href="#";V.tabIndex="-1";A.on(V,"click",function(X){A.stopEvent(X);});U._button.parentNode.replaceChild(V,U._button);U._button=V;}if(K.type=="select"){if(U._button.tagName.toLowerCase()=="select"){T.parentNode.removeChild(T);var H=U._button;var S=U.get("element");S.parentNode.replaceChild(H,S);}else{U.addClass(this.CLASS_PREFIX+"-select");}}if(K.type=="spin"){if(!E.isArray(K.range)){K.range=[10,100];}this._makeSpinButton(U,K);}U.get("element").setAttribute("title",U.get("label"));if(K.type!="spin"){if((YAHOO.widget.Overlay)&&(R.menu instanceof YAHOO.widget.Overlay)){var I=function(Z){var X=true;if(Z.keyCode&&(Z.keyCode==9)){X=false;}if(X){if(this._colorPicker){this._colorPicker._button=K.value;}var Y=U.getMenu().element;if(C.getStyle(Y,"visibility")=="hidden"){U.getMenu().show();}else{U.getMenu().hide();}}YAHOO.util.Event.stopEvent(Z);};U.on("mousedown",I,K,this);U.on("keydown",I,K,this);}else{if((K.type!="menu")&&(K.type!="select")){U.on("keypress",this._buttonClick,K,this);U.on("mousedown",function(X){YAHOO.util.Event.stopEvent(X);this._buttonClick(X,K);},K,this);U.on("click",function(X){YAHOO.util.Event.stopEvent(X);});}else{U.on("mousedown",function(X){YAHOO.util.Event.stopEvent(X);});U.on("click",function(X){YAHOO.util.Event.stopEvent(X);});U.on("change",function(X){if(!K.menucmd){K.menucmd=K.value;}K.value=X.value;this._buttonClick(X,K);},this,true);var L=this;if(U.getMenu().mouseDownEvent){U.getMenu().mouseDownEvent.subscribe(function(Z,Y){var X=Y[1];YAHOO.util.Event.stopEvent(Y[0]);U._onMenuClick(Y[0],U);if(!K.menucmd){K.menucmd=K.value;}K.value=((X.value)?X.value:X._oText.nodeValue);L._buttonClick.call(L,Y[1],K);U._hideMenu();return false;});U.getMenu().clickEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});U.getMenu().mouseUpEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});}}}}else{U.on("mousedown",function(X){YAHOO.util.Event.stopEvent(X);});U.on("click",function(X){YAHOO.util.Event.stopEvent(X);});}if(this.browser.ie){}if(this.browser.webkit){U.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=U;if((K.type=="menu")||(K.type=="split")||(K.type=="select")){if(E.isArray(K.menu)){var F=U.getMenu();if(F.renderEvent){F.renderEvent.subscribe(D,U);if(K.renderer){F.renderEvent.subscribe(K.renderer,U);}}}}}return K;},addSeparator:function(F,I){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var G=((F)?F:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");C.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var H=this._sep.cloneNode(true);this._sepCount++;C.addClass(H,this.CLASS_SEPARATOR+"-"+this._sepCount);if(I){var J=null;if(I.get){J=I.get("element").nextSibling;}else{if(I.nextSibling){J=I.nextSibling;}else{J=I;}}if(J){if(J==I){J.parentNode.appendChild(H);}else{J.parentNode.insertBefore(H,J);}}}else{G.appendChild(H);}return H;},_createColorPicker:function(I){if(C.get(I+"_colors")){C.get(I+"_colors").parentNode.removeChild(C.get(I+"_colors"));}var F=document.createElement("div");F.className="yui-toolbar-colors";F.id=I+"_colors";F.style.display="none";A.on(window,"load",function(){document.body.appendChild(F);},this,true);this._colorPicker=F;var H="";for(var G in this._colorData){if(E.hasOwnProperty(this._colorData,G)){H+='<a style="background-color: '+G+'" href="#">'+G.replace("#","")+"</a>";}}H+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){F.innerHTML=H;},0);A.on(F,"mouseover",function(N){var L=this._colorPicker;var M=L.getElementsByTagName("em")[0];var K=L.getElementsByTagName("strong")[0];var J=A.getTarget(N);if(J.tagName.toLowerCase()=="a"){M.style.backgroundColor=J.style.backgroundColor;K.innerHTML=this._colorData["#"+J.innerHTML]+"<br>"+J.innerHTML;}},this,true);A.on(F,"focus",function(J){A.stopEvent(J);});A.on(F,"click",function(J){A.stopEvent(J);});A.on(F,"mousedown",function(K){A.stopEvent(K);var J=A.getTarget(K);if(J.tagName.toLowerCase()=="a"){var M=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:J.innerHTML,colorName:this._colorData["#"+J.innerHTML]});if(M!==false){var L={color:J.innerHTML,colorName:this._colorData["#"+J.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:L});}this.getButtonByValue(this._colorPicker._button).getMenu().hide();
  }},this,true);},_resetColorPicker:function(){var G=this._colorPicker.getElementsByTagName("em")[0];var F=this._colorPicker.getElementsByTagName("strong")[0];G.style.backgroundColor="transparent";F.innerHTML="";},_makeColorButton:function(F){if(!this._colorPicker){this._createColorPicker(this.get("id"));}F.type="color";F.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+F.value+"_menu",{visible:false,position:"absolute",iframe:true});F.menu.setBody("");F.menu.render(this.get("cont"));C.addClass(F.menu.element,"yui-button-menu");C.addClass(F.menu.element,"yui-color-button-menu");F.menu.beforeShowEvent.subscribe(function(){F.menu.cfg.setProperty("zindex",5);F.menu.cfg.setProperty("context",[this.getButtonById(F.id).get("element"),"tl","bl"]);this._resetColorPicker();var G=this._colorPicker;if(G.parentNode){G.parentNode.removeChild(G);}F.menu.setBody("");F.menu.appendToBody(G);this._colorPicker.style.display="block";},this,true);return F;},_makeSpinButton:function(S,M){S.addClass(this.CLASS_PREFIX+"-spinbutton");var T=this,O=S._button.parentNode.parentNode,J=M.range,I=document.createElement("a"),H=document.createElement("a");I.href="#";H.href="#";I.tabIndex="-1";H.tabIndex="-1";I.className="up";I.title=this.STR_SPIN_UP;I.innerHTML=this.STR_SPIN_UP;H.className="down";H.title=this.STR_SPIN_DOWN;H.innerHTML=this.STR_SPIN_DOWN;O.appendChild(I);O.appendChild(H);var N=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:S.get("label")});S.set("title",N);var R=function(U){U=((U<J[0])?J[0]:U);U=((U>J[1])?J[1]:U);return U;};var Q=this.browser;var G=false;var L=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){G=this._titlebar.firstChild;}var F=function(V){YAHOO.util.Event.stopEvent(V);if(!S.get("disabled")&&(V.keyCode!=9)){var W=parseInt(S.get("label"),10);W++;W=R(W);S.set("label",""+W);var U=YAHOO.lang.substitute(L,{VALUE:S.get("label")});S.set("title",U);if(!Q.webkit&&G){}T._buttonClick(V,M);}};var P=function(V){YAHOO.util.Event.stopEvent(V);if(!S.get("disabled")&&(V.keyCode!=9)){var W=parseInt(S.get("label"),10);W--;W=R(W);S.set("label",""+W);var U=YAHOO.lang.substitute(L,{VALUE:S.get("label")});S.set("title",U);if(!Q.webkit&&G){}T._buttonClick(V,M);}};var K=function(U){if(U.keyCode==38){F(U);}else{if(U.keyCode==40){P(U);}else{if(U.keyCode==107&&U.shiftKey){F(U);}else{if(U.keyCode==109&&U.shiftKey){P(U);}}}}};S.on("keydown",K,this,true);A.on(I,"mousedown",function(U){A.stopEvent(U);},this,true);A.on(H,"mousedown",function(U){A.stopEvent(U);},this,true);A.on(I,"click",F,this,true);A.on(H,"click",P,this,true);},_buttonClick:function(M,G){var F=true;if(M&&M.type=="keypress"){if(M.keyCode==9){F=false;}else{if((M.keyCode===13)||(M.keyCode===0)||(M.keyCode===32)){}else{F=false;}}}if(F){var O=true,I=false;if(G.value){I=this.fireEvent(G.value+"Click",{type:G.value+"Click",target:this.get("element"),button:G});if(I===false){O=false;}}if(G.menucmd&&O){I=this.fireEvent(G.menucmd+"Click",{type:G.menucmd+"Click",target:this.get("element"),button:G});if(I===false){O=false;}}if(O){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:G});}if(G.type=="select"){var L=this.getButtonById(G.id);if(L.buttonType=="rich"){var K=G.value;for(var J=0;J<G.menu.length;J++){if(G.menu[J].value==G.value){K=G.menu[J].text;break;}}L.set("label",'<span class="yui-toolbar-'+G.menucmd+"-"+(G.value).replace(/ /g,"-").toLowerCase()+'">'+K+"</span>");var N=L.getMenu().getItems();for(var H=0;H<N.length;H++){if(N[H].value.toLowerCase()==G.value.toLowerCase()){N[H].cfg.setProperty("checked",true);}else{N[H].cfg.setProperty("checked",false);}}}}if(M){A.stopEvent(M);}}},_keyNav:null,_navCounter:null,_navigateButtons:function(G){switch(G.keyCode){case 37:case 39:if(G.keyCode==37){this._navCounter--;}else{this._navCounter++;}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0;}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1);}var F=this._buttonList[this._navCounter].get("element");if(this.browser.ie){F=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0];}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(G);}else{F.focus();}break;}},_handleFocus:function(){if(!this._keyNav){var F="keypress";if(this.browser.ie){F="keydown";}A.on(this.get("element"),F,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1;}},getButtonById:function(H){var F=this._buttonList.length;for(var G=0;G<F;G++){if(this._buttonList[G].get("id")==H){return this._buttonList[G];}}return false;},getButtonByValue:function(L){var I=this.get("buttons");var G=I.length;for(var J=0;J<G;J++){if(I[J].group!==undefined){for(var F=0;F<I[J].buttons.length;F++){if((I[J].buttons[F].value==L)||(I[J].buttons[F].menucmd==L)){return this.getButtonById(I[J].buttons[F].id);}if(I[J].buttons[F].menu){for(var K=0;K<I[J].buttons[F].menu.length;K++){if(I[J].buttons[F].menu[K].value==L){return this.getButtonById(I[J].buttons[F].id);}}}}}else{if((I[J].value==L)||(I[J].menucmd==L)){return this.getButtonById(I[J].id);}if(I[J].menu){for(var H=0;H<I[J].menu.length;H++){if(I[J].menu[H].value==L){return this.getButtonById(I[J].id);}}}}}return false;},getButtonByIndex:function(F){if(this._buttonList[F]){return this._buttonList[F];}else{return false;}},getButtons:function(){return this._buttonList;},disableButton:function(G){var F=B.call(this,G);if(F){F.set("disabled",true);}else{return false;}},enableButton:function(G){if(this.get("disabled")){return false;}var F=B.call(this,G);if(F){if(F.get("disabled")){F.set("disabled",false);}}else{return false;}},isSelected:function(G){var F=B.call(this,G);if(F){return F._selected;}return false;},selectButton:function(J,H){var G=B.call(this,J);if(G){G.addClass("yui-button-selected");G.addClass("yui-button-"+G.get("value")+"-selected");G._selected=true;if(H){if(G.buttonType=="rich"){var I=G.getMenu().getItems();for(var F=0;F<I.length;F++){if(I[F].value==H){I[F].cfg.setProperty("checked",true);G.set("label",'<span class="yui-toolbar-'+G.get("value")+"-"+(H).replace(/ /g,"-").toLowerCase()+'">'+I[F]._oText.nodeValue+"</span>");
  }else{I[F].cfg.setProperty("checked",false);}}}}}else{return false;}},deselectButton:function(G){var F=B.call(this,G);if(F){F.removeClass("yui-button-selected");F.removeClass("yui-button-"+F.get("value")+"-selected");F.removeClass("yui-button-hover");F._selected=false;}else{return false;}},deselectAllButtons:function(){var F=this._buttonList.length;for(var G=0;G<F;G++){this.deselectButton(this._buttonList[G]);}},disableAllButtons:function(){if(this.get("disabled")){return false;}var F=this._buttonList.length;for(var G=0;G<F;G++){this.disableButton(this._buttonList[G]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var F=this._buttonList.length;for(var G=0;G<F;G++){this.enableButton(this._buttonList[G]);}},resetAllButtons:function(J){if(!E.isObject(J)){J={};}if(this.get("disabled")){return false;}var F=this._buttonList.length;for(var G=0;G<F;G++){var I=this._buttonList[G];var H=I._configs.disabled._initialConfig.value;if(J[I.get("id")]){this.enableButton(I);this.selectButton(I);}else{if(H){this.disableButton(I);}else{this.enableButton(I);}this.deselectButton(I);}}},destroyButton:function(J){var H=B.call(this,J);if(H){var I=H.get("id");H.destroy();var F=this._buttonList.length;for(var G=0;G<F;G++){if(this._buttonList[G].get("id")==I){this._buttonList[G]=null;}}}else{return false;}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var F in this){if(E.hasOwnProperty(this,F)){this[F]=null;}}return true;},collapse:function(G){var F=C.getElementsByClassName("collapse","span",this._titlebar);if(G===false){C.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(F[0]){C.removeClass(F[0],"collapsed");}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this});}else{if(F[0]){C.addClass(F[0],"collapsed");}C.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this});}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons.";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(I,N){var H={};if(D.isObject(I)&&(!I.tagName)&&!N){D.augmentObject(H,I);I=document.createElement("textarea");this.DOMReady=true;if(H.container){var L=C.get(H.container);L.appendChild(I);}else{document.body.appendChild(I);}}else{if(N){D.augmentObject(H,N);}}var J={element:null,attributes:H},G=null;if(D.isString(I)){G=I;}else{if(J.attributes.id){G=J.attributes.id;}else{G=C.generateId(I);}}J.element=I;var K=document.createElement("DIV");J.attributes.element_cont=new YAHOO.util.Element(K,{id:G+"_container"});var F=document.createElement("div");C.addClass(F,"first-child");J.attributes.element_cont.appendChild(F);if(!J.attributes.toolbar_cont){J.attributes.toolbar_cont=document.createElement("DIV");J.attributes.toolbar_cont.id=G+"_toolbar";F.appendChild(J.attributes.toolbar_cont);}var M=document.createElement("DIV");F.appendChild(M);J.attributes.editor_wrapper=M;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,J.element,J.attributes);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_docType:'<!DOCTYPE HTML PUBLIC "-/'+"/W3C/"+"/DTD HTML 4.01/"+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',editorDirty:null,_defaultCSS:"html { height: 95%; } body { padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: text; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }",_defaultToolbar:null,_lastButton:null,_baseHREF:function(){var F=document.location.href;if(F.indexOf("?")!==-1){F=F.substring(0,F.indexOf("?"));}F=F.substring(0,F.lastIndexOf("/"))+"/";return F;}(),_lastImage:null,_blankImageLoaded:null,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:null,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:null,dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,iframe:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{},_alwaysEnabled:{},_semantic:{"bold":true,"italic":true,"underline":true},_tag2cmd:{"b":"bold","strong":"bold","i":"italic","em":"italic","u":"underline","sup":"superscript","sub":"subscript","img":"insertimage","a":"createlink","ul":"insertunorderedlist","ol":"insertorderedlist"},_createIframe:function(){var J=document.createElement("iframe");J.id=this.get("id")+"_editor";var H={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};if(this.get("autoHeight")){H.scrolling="no";}for(var I in H){if(D.hasOwnProperty(H,I)){J.setAttribute(I,H[I]);}}var G="javascript:;";if(this.browser.ie){G="about:blank";}J.setAttribute("src",G);var F=new YAHOO.util.Element(J);return F;},_isElement:function(G,F){if(G&&G.tagName&&(G.tagName.toLowerCase()==F)){return true;}if(G&&G.getAttribute&&(G.getAttribute("tag")==F)){return true;}return false;},_hasParent:function(G,F){if(!G||!G.parentNode){return false;}while(G.parentNode){if(this._isElement(G,F)){return G;}if(G.parentNode){G=G.parentNode;}else{return false;}}return false;},_getDoc:function(){var F=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element").contentWindow.document){F=this.get("iframe").get("element").contentWindow.document;
  return F;}}}catch(G){}}}}}return false;},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},_focusWindow:function(F){if(this.browser.webkit){if(F){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}this._getWindow().focus();}else{this._getWindow().focus();}},_hasSelection:function(){var H=this._getSelection();var F=this._getRange();var G=false;if(!H||!F){return G;}if(this.browser.ie||this.browser.opera){if(F.text){G=true;}if(F.html){G=true;}}else{if(this.browser.webkit){if(H+""!==""){G=true;}}else{if(H&&(H.toString()!=="")&&(H!==undefined)){G=true;}}}return G;},_getSelection:function(){var F=null;if(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){F=this._getDoc().selection;}else{F=this._getWindow().getSelection();}if(this.browser.webkit){if(F.baseNode){this._selection={};this._selection.baseNode=F.baseNode;this._selection.baseOffset=F.baseOffset;this._selection.extentNode=F.extentNode;this._selection.extentOffset=F.extentOffset;}else{if(this._selection!==null){F=this._getWindow().getSelection();F.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return F;},_selectNode:function(G){if(!G){return false;}var H=this._getSelection(),F=null;if(this.browser.ie){try{F=this._getDoc().body.createTextRange();F.moveToElementText(G);F.select();}catch(I){}}else{if(this.browser.webkit){H.setBaseAndExtent(G,0,G,G.innerText.length);}else{if(this.browser.opera){H=this._getWindow().getSelection();F=this._getDoc().createRange();F.selectNode(G);H.removeAllRanges();H.addRange(F);}else{F=this._getDoc().createRange();F.selectNodeContents(G);H.removeAllRanges();H.addRange(F);}}}},_getRange:function(){var F=this._getSelection();if(F===null){return null;}if(this.browser.webkit&&!F.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(F.anchorNode,F.anchorOffset);H.setEnd(F.focusNode,F.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(this.browser.ie||this.browser.opera){try{return F.createRange();}catch(G){return null;}}if(F.rangeCount>0){return F.getRangeAt(0);}return null;},_setDesignMode:function(F){try{var H=true;if(this.browser.ie&&(F.toLowerCase()=="off")){H=false;}if(H){this._getDoc().designMode=F;}}catch(G){}},_toggleDesignMode:function(){var G=this._getDoc().designMode.toLowerCase(),F="on";if(G=="on"){F="off";}this._setDesignMode(F);return F;},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0";}if(!this.get("disabled")){if(this._getDoc().designMode.toLowerCase()!="on"){this._setDesignMode("on");this._contentTimerCounter=0;}}if(!this._getDoc().body){this._contentTimerCounter=0;this._checkLoaded();return false;}this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);A.on(this._getDoc(),"mouseup",this._handleMouseUp,this,true);A.on(this._getDoc(),"mousedown",this._handleMouseDown,this,true);A.on(this._getDoc(),"click",this._handleClick,this,true);A.on(this._getDoc(),"dblclick",this._handleDoubleClick,this,true);A.on(this._getDoc(),"keypress",this._handleKeyPress,this,true);A.on(this._getDoc(),"keyup",this._handleKeyUp,this,true);A.on(this._getDoc(),"keydown",this._handleKeyDown,this,true);if(!this.get("disabled")){this.toolbar.set("disabled",false);}this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var F=this;setTimeout(function(){F._writeDomPath.call(F);},150);}this.nodeChange(true);this._setBusy(true);},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>500){return false;}var H=false;try{if(this._getDoc()&&this._getDoc().body){if(this.browser.ie){if(this._getDoc().body.readyState=="complete"){H=true;}}else{if(this._getDoc().body._rteLoaded===true){H=true;}}}}catch(G){H=false;}if(H===true){this._initEditor();}else{var F=this;this._contentTimer=setTimeout(function(){F._checkLoaded.call(F);},20);}},_setInitialContent:function(){var G=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(this.get("element").value),CSS:this.get("css"),HIDDEN_CSS:((this.get("hiddencss"))?this.get("hiddencss"):"/* No Hidden CSS */"),EXTRA_CSS:((this.get("extracss"))?this.get("extracss"):"/* No Extra CSS */")}),F=true;if(document.compatMode!="BackCompat"){G=this._docType+"\n"+G;}else{}if(this.browser.ie||this.browser.webkit||this.browser.opera||(navigator.userAgent.indexOf("Firefox/1.5")!=-1)){try{if(this.browser.air){var J=this._getDoc().implementation.createHTMLDocument();var K=this._getDoc();K.open();K.close();J.open();J.write(G);J.close();var H=K.importNode(J.getElementsByTagName("html")[0],true);K.replaceChild(H,K.getElementsByTagName("html")[0]);K.body._rteLoaded=true;}else{this._getDoc().open();this._getDoc().write(G);this._getDoc().close();}}catch(I){F=false;}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(G);}if(F){this._checkLoaded();}},_setMarkupType:function(F){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[F]){this._setEditorStyle(false);}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(G){try{this._getDoc().execCommand("useCSS",false,!G);}catch(F){}},_getSelectedElement:function(){var I=this._getDoc(),F=null,G=null,J=null;if(this.browser.ie){this.currentEvent=this._getWindow().event;F=this._getRange();if(F){J=F.item?F.item(0):F.parentElement();if(J==I.body){J=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){J=A.getTarget(this.currentEvent);
  }}else{G=this._getSelection();F=this._getRange();if(!G||!F){return null;}if(!this._hasSelection()){if(G.anchorNode&&(G.anchorNode.nodeType==3)){if(G.anchorNode.parentNode){J=G.anchorNode.parentNode;}if(G.anchorNode.nextSibling!=G.focusNode.nextSibling){J=G.anchorNode.nextSibling;}}if(this._isElement(J,"br")){J=null;}if(!J){J=F.commonAncestorContainer;if(!F.collapsed){if(F.startContainer==F.endContainer){if(F.startOffset-F.endOffset<2){if(F.startContainer.hasChildNodes()){J=F.startContainer.childNodes[F.startOffset];}}}}}}}if(this.currentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":J=A.getTarget(this.currentEvent);break;default:break;}}catch(H){}}else{if((this.currentElement&&this.currentElement[0])&&(!this.browser.ie)){J=this.currentElement[0];}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!J){J=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!J||!J.tagName){J=I.body;}if(this._isElement(J,"html")){J=I.body;}if(this._isElement(J,"body")){J=I.body;}if(J&&!J.parentNode){J=I.body;}if(J===undefined){J=null;}return J;},_getDomPath:function(F){if(!F){F=this._getSelectedElement();}var G=[];while(F!==null){if(F.ownerDocument!=this._getDoc()){F=null;break;}if(F.nodeName&&F.nodeType&&(F.nodeType==1)){G[G.length]=F;}if(this._isElement(F,"body")){break;}F=F.parentNode;}if(G.length===0){if(this._getDoc()&&this._getDoc().body){G[0]=this._getDoc().body;}}return G.reverse();},_writeDomPath:function(){var L=this._getDomPath(),J=[],H="",M="";for(var F=0;F<L.length;F++){var N=L[F].tagName.toLowerCase();if((N=="ol")&&(L[F].type)){N+=":"+L[F].type;}if(C.hasClass(L[F],"yui-tag")){N=L[F].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(N){case"b":N="strong";break;case"i":N="em";break;}}if(!C.hasClass(L[F],"yui-non")){if(C.hasClass(L[F],"yui-tag")){M=N;}else{H=((L[F].className!=="")?"."+L[F].className.replace(/ /g,"."):"");if((H.indexOf("yui")!=-1)||(H.toLowerCase().indexOf("apple-style-span")!=-1)){H="";}M=N+((L[F].id)?"#"+L[F].id:"")+H;}switch(N){case"a":if(L[F].getAttribute("href",2)){M+=":"+L[F].getAttribute("href",2).replace("mailto:","").replace("http:/"+"/","").replace("https:/"+"/","");}break;case"img":var G=L[F].height;var K=L[F].width;if(L[F].style.height){G=parseInt(L[F].style.height,10);}if(L[F].style.width){K=parseInt(L[F].style.width,10);}M+="("+G+"x"+K+")";break;}if(M.length>10){M='<span title="'+M+'">'+M.substring(0,10)+"..."+"</span>";}else{M='<span title="'+M+'">'+M+"</span>";}J[J.length]=M;}}var I=J.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!=I){this.dompath.innerHTML=I;}},_fixNodes:function(){var K=this._getDoc(),I=[];for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(F.toLowerCase()!="span"){var G=K.body.getElementsByTagName(F);if(G.length){for(var H=0;H<G.length;H++){I.push(G[H]);}}}}}for(var J=0;J<I.length;J++){if(I[J].parentNode){if(D.isObject(this.invalidHTML[I[J].tagName.toLowerCase()])&&this.invalidHTML[I[J].tagName.toLowerCase()].keepContents){this._swapEl(I[J],"span",function(M){M.className="yui-non";});}else{I[J].parentNode.removeChild(I[J]);}}}var L=this._getDoc().getElementsByTagName("img");C.addClass(L,"yui-img");},_isNonEditable:function(H){if(this.get("allowNoEdit")){var G=A.getTarget(H);if(this._isElement(G,"html")){G=null;}var J=this._getDomPath(G);for(var F=(J.length-1);F>-1;F--){if(C.hasClass(J[F],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false");}catch(I){}this.nodeChange();A.stopEvent(H);return true;}}try{this._getDoc().execCommand("enableObjectResizing",false,"true");}catch(I){}}return false;},_setCurrentEvent:function(F){this.currentEvent=F;},_handleClick:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this.browser.webkit){var F=A.getTarget(G);if(this._isElement(F,"a")||this._isElement(F.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();}},_handleMouseUp:function(G){if(this._isNonEditable(G)){return false;}var F=this;if(this.browser.opera<9.5){var H=A.getTarget(G);if(this._isElement(H,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(G);}else{this.operaEvent=window.setTimeout(function(){F.operaEvent=false;},700);}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(G);}}this.nodeChange();this.fireEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:G});},_handleMouseDown:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this.browser.webkit&&this._hasSelection()){var H=this._getSelection();if(!this.browser.webkit3){H.collapse(true);}else{H.collapseToStart();}}if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}if(this._isElement(G,"img")||this._isElement(G,"a")){if(this.browser.webkit){A.stopEvent(F);if(this._isElement(G,"img")){C.addClass(G,"selected");this._lastImage=G;}}this.nodeChange();}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);if(this.browser.opera>=9.5){A.preventDefault(F);}var G=A.getTarget(F);if(this._isElement(G,"img")){this.currentElement[0]=G;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}else{if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}}this.nodeChange();this.editorDirty=false;
  this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);switch(G.keyCode){case 37:case 38:case 39:case 40:case 46:case 8:case 87:if((G.keyCode==87)&&this.currentWindow&&G.shiftKey&&G.ctrlKey){this.closeWindow();}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var F=this;this._nodeChangeTimer=setTimeout(function(){F._nodeChangeTimer=null;F.nodeChange.call(F);},100);}else{this.nodeChange();}this.editorDirty=true;}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",target:this,ev:G});},_handleKeyPress:function(F){if(this.get("allowNoEdit")){if(F&&F.keyCode&&((F.keyCode==46)||F.keyCode==63272)){A.stopEvent(F);}}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);if(this.browser.webkit){if(!this.browser.webkit3){if(F.keyCode&&(F.keyCode==122)&&(F.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(F);}}}this._listFix(F);}this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:F});},_listFix:function(L){var O=null,J=null,F=false,H=null;if(this.browser.webkit){if(L.keyCode&&(L.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var I=this._hasParent(this._getSelectedElement(),"li");var N=this._getDoc().createElement("li");N.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;';if(I.nextSibling){I.parentNode.insertBefore(N,I.nextSibling);}else{I.parentNode.appendChild(N);}this.currentElement[0]=N;this._selectNode(N.firstChild);if(!this.browser.webkit3){I.parentNode.style.display="list-item";setTimeout(function(){I.parentNode.style.display="block";},1);}A.stopEvent(L);}}}if(L.keyCode&&((!this.browser.webkit3&&(L.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((L.keyCode==9)&&L.shiftKey)))){O=this._getSelectedElement();if(this._hasParent(O,"li")){O=this._hasParent(O,"li");if(this._hasParent(O,"ul")||this._hasParent(O,"ol")){J=this._hasParent(O,"ul");if(!J){J=this._hasParent(O,"ol");}if(this._isElement(J.previousSibling,"li")){J.removeChild(O);J.parentNode.insertBefore(O,J.nextSibling);if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(O);H.collapse(false);H.select();}if(this.browser.webkit){if(!this.browser.webkit3){J.style.display="list-item";J.parentNode.style.display="list-item";setTimeout(function(){J.style.display="block";J.parentNode.style.display="block";},1);}}A.stopEvent(L);}}}}if(L.keyCode&&((L.keyCode==9)&&(!L.shiftKey))){var G=this._getSelectedElement();if(this._hasParent(G,"li")){F=this._hasParent(G,"li").innerHTML;}if(this.browser.webkit){this._getDoc().execCommand("inserttext",false,"\t");}O=this._getSelectedElement();if(this._hasParent(O,"li")){J=this._hasParent(O,"li");var K=this._getDoc().createElement(J.parentNode.tagName.toLowerCase());if(this.browser.webkit){var M=C.getElementsByClassName("Apple-tab-span","span",J);if(M[0]){J.removeChild(M[0]);J.innerHTML=D.trim(J.innerHTML);if(F){J.innerHTML='<span class="yui-non">'+F+"</span>&nbsp;";}else{J.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;';}}}else{if(F){J.innerHTML=F+"&nbsp;";}else{J.innerHTML="&nbsp;";}}J.parentNode.replaceChild(K,J);K.appendChild(J);if(this.browser.webkit){this._getSelection().setBaseAndExtent(J.firstChild,1,J.firstChild,J.firstChild.innerText.length);if(!this.browser.webkit3){J.parentNode.parentNode.style.display="list-item";setTimeout(function(){J.parentNode.parentNode.style.display="block";},1);}}else{if(this.browser.ie){H=this._getDoc().body.createTextRange();H.moveToElementText(J);H.collapse(false);H.select();}else{this._selectNode(J);}}A.stopEvent(L);}if(this.browser.webkit){A.stopEvent(L);}this.nodeChange();}},_handleKeyDown:function(K){var F=null,M=null;if(this._isNonEditable(K)){return false;}this._setCurrentEvent(K);if(this.currentWindow){this.closeWindow();}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}var J=false,L=null,H=false;if(K.shiftKey&&K.ctrlKey){J=true;}switch(K.keyCode){case 84:if(K.shiftKey&&K.ctrlKey){var I=this.toolbar.getElementsByTagName("h2")[0];if(I){I.focus();}A.stopEvent(K);J=false;}break;case 27:if(K.shiftKey){this.afterElement.focus();A.stopEvent(K);H=false;}break;case 76:if(this._hasSelection()){if(K.shiftKey&&K.ctrlKey){var G=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){G=false;}}if(G){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});J=false;}}}break;case 65:if(K.metaKey&&this.browser.webkit){A.stopEvent(K);this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,this._getDoc().body.innerHTML.length);}break;case 66:L="bold";break;case 73:L="italic";break;case 85:L="underline";break;case 9:if(this.browser.ie){M=this._getRange();F=this._getSelectedElement();if(!this._isElement(F,"li")){if(M){M.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");M.collapse(false);M.select();}A.stopEvent(K);}}if(this.browser.gecko>1.8){F=this._getSelectedElement();if(this._isElement(F,"li")){if(K.shiftKey){this._getDoc().execCommand("outdent",null,"");}else{this._getDoc().execCommand("indent",null,"");}}else{if(!this._hasSelection()){this.execCommand("inserthtml","&nbsp;&nbsp;&nbsp;&nbsp;");}}A.stopEvent(K);}break;case 13:if(this.browser.ie){M=this._getRange();F=this._getSelectedElement();if(!this._isElement(F,"li")){if(M){M.pasteHTML("<br>");M.collapse(false);M.select();}A.stopEvent(K);}}}if(this.browser.ie){this._listFix(K);}if(J&&L){this.execCommand(L,null);A.stopEvent(K);this.nodeChange();}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:K});},nodeChange:function(G){var H=parseInt(this.get("nodeChangeThreshold"),10);var N=Math.round(new Date().getTime()/1000);if(G===true){this._lastNodeChange=0;
  }if((this._lastNodeChange+H)<N){var Q=this;if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){Q._fixNodes.call(Q);Q._fixNodesTimer=null;},0);}}this._lastNodeChange=N;if(this.currentEvent){this._lastNodeChangeEvent=this.currentEvent.type;}var Y=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Y===false){return false;}if(this.get("dompath")){this._writeDomPath();}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var S=this._getSelection(),P=this._getRange(),F=this._getSelectedElement(),L=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize");if(G!==true){this.editorDirty=true;}var M={};if(this._lastButton){M[this._lastButton.id]=true;}if(!this._isElement(F,"body")){if(L){M[L.get("id")]=true;}if(K){M[K.get("id")]=true;}}this.toolbar.resetAllButtons(M);for(var Z=0;Z<this._disabled.length;Z++){var O=this.toolbar.getButtonByValue(this._disabled[Z]);if(O&&O.get){if(this._lastButton&&(O.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()){switch(this._disabled[Z]){case"fontname":case"fontsize":break;default:this.toolbar.disableButton(O);}}else{if(!this._alwaysDisabled[this._disabled[Z]]){this.toolbar.enableButton(O);}}if(!this._alwaysEnabled[this._disabled[Z]]){this.toolbar.deselectButton(O);}}}}var R=this._getDomPath();var a=null,V=null;for(var W=0;W<R.length;W++){a=R[W].tagName.toLowerCase();if(R[W].getAttribute("tag")){a=R[W].getAttribute("tag").toLowerCase();}V=this._tag2cmd[a];if(V===undefined){V=[];}if(!D.isArray(V)){V=[V];}if(R[W].style.fontWeight.toLowerCase()=="bold"){V[V.length]="bold";}if(R[W].style.fontStyle.toLowerCase()=="italic"){V[V.length]="italic";}if(R[W].style.textDecoration.toLowerCase()=="underline"){V[V.length]="underline";}if(V.length>0){for(var U=0;U<V.length;U++){this.toolbar.selectButton(V[U]);this.toolbar.enableButton(V[U]);}}switch(R[W].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var T=R[W].style.textAlign.toLowerCase();if(R[W].style.textAlign.toLowerCase()=="justify"){T="full";}this.toolbar.selectButton("justify"+T);this.toolbar.enableButton("justify"+T);break;}}if(L){var X=L._configs.label._initialConfig.value;L.set("label",'<span class="yui-toolbar-fontname-'+E(X)+'">'+X+"</span>");this._updateMenuChecked("fontname",X);}if(K){K.set("label",K._configs.label._initialConfig.value);}var J=this.toolbar.getButtonByValue("heading");if(J){J.set("label",J._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(F,G,I){if(!I){I=this.toolbar;}var H=I.getButtonByValue(F);H.checkValue(G);},_handleToolbarClick:function(G){var I="";var J="";var H=G.button.value;if(G.button.menucmd){I=H;H=G.button.menucmd;}this._lastButton=G.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(H,I);if(!this.browser.webkit){var F=this;setTimeout(function(){F._focusWindow.call(F);},5);}}A.stopEvent(G);},_setupAfterElement:function(){if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"));}if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(G){if(G){if(!this._mask){if(!!this.browser.ie){this._setDesignMode("off");}if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMode("on");this._focusWindow();var F=this;window.setTimeout(function(){F.nodeChange.call(F);},100);}}},EDITOR_PANEL_ID:"yui-editor-panel",SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image URL Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var F=YAHOO.env.ua;if(F.webkit>=420){F.webkit3=F.webkit;}else{F.webkit3=0;}return F;}(),init:function(G,F){if(!this._defaultToolbar){this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};
  }YAHOO.widget.SimpleEditor.superclass.init.call(this,G,F);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.currentElement=[];this.on("contentReady",function(){this.DOMReady=true;this.fireQueue();},this,true);},initAttributes:function(F){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,F);var G=this;this.setAttributeConfig("container",{writeOnce:true,value:F.container||false});this.setAttributeConfig("plainText",{writeOnce:true,value:F.plainText||false});this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("container",{readOnly:true,value:null});this.setAttributeConfig("nodeChangeThreshold",{value:F.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:F.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:F.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:F.element_cont});this.setAttributeConfig("editor_wrapper",{value:F.editor_wrapper||null,writeOnce:true});this.setAttributeConfig("height",{value:F.height||C.getStyle(G.get("element"),"height"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(H,10)}},0.5);I.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",H);}}}});this.setAttributeConfig("autoHeight",{value:F.autoHeight||false,method:function(H){if(H){if(this.get("iframe")){this.get("iframe").get("element").setAttribute("scrolling","no");}this.on("afterNodeChange",this._handleAutoHeight,this,true);this.on("editorKeyDown",this._handleAutoHeight,this,true);this.on("editorKeyPress",this._handleAutoHeight,this,true);}else{if(this.get("iframe")){this.get("iframe").get("element").setAttribute("scrolling","auto");}this.unsubscribe("afterNodeChange",this._handleAutoHeight);this.unsubscribe("editorKeyDown",this._handleAutoHeight);this.unsubscribe("editorKeyPress",this._handleAutoHeight);}}});this.setAttributeConfig("width",{value:F.width||C.getStyle(this.get("element"),"width"),method:function(H){if(this._rendered){if(this.get("animate")){var I=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(H,10)}},0.5);I.animate();}else{this.get("element_cont").setStyle("width",H);}}}});this.setAttributeConfig("blankimage",{value:F.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:F.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:F.html||'<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="'+this._baseHREF+'"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',writeOnce:true});this.setAttributeConfig("extracss",{value:F.extracss||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:F.handleSubmit||false,method:function(H){if(this.get("element").form){if(!this._formButtons){this._formButtons=[];}if(H){A.on(this.get("element").form,"submit",this._handleFormSubmit,this,true);var I=this.get("element").form.getElementsByTagName("input");for(var K=0;K<I.length;K++){var J=I[K].getAttribute("type");if(J&&(J.toLowerCase()=="submit")){A.on(I[K],"click",this._handleFormButtonClick,this,true);this._formButtons[this._formButtons.length]=I[K];}}}else{A.removeListener(this.get("element").form,"submit",this._handleFormSubmit);if(this._formButtons){A.removeListener(this._formButtons,"click",this._handleFormButtonClick);}}}}});this.setAttributeConfig("disabled",{value:false,method:function(H){if(this._rendered){this._disableEditor(H);}}});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:F.toolbar||this._defaultToolbar,writeOnce:true,method:function(H){if(!H.buttonType){H.buttonType=this._defaultToolbar.buttonType;}this._defaultToolbar=H;}});this.setAttributeConfig("animate",{value:((F.animate)?((YAHOO.util.Anim)?true:false):false),validator:function(I){var H=true;if(!YAHOO.util.Anim){H=false;}return H;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(I){var H=true;if(!YAHOO.widget.Overlay){H=false;}return H;}});this.setAttributeConfig("focusAtStart",{value:F.focusAtStart||false,writeOnce:true,method:function(){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H._focusWindow.call(H,true);H.editorDirty=false;},400);},this,true);}});this.setAttributeConfig("dompath",{value:F.dompath||false,method:function(H){if(H&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";C.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath();}}else{if(!H&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}}});this.setAttributeConfig("markup",{value:F.markup||"semantic",validator:function(H){switch(H.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:F.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.on("afterRender",function(){this._renderPanel();});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var F="";if(!this._blankImageLoaded){if(YAHOO.widget.EditorInfo.blankImage){this.set("blankimage",YAHOO.widget.EditorInfo.blankImage);this._blankImageLoaded=true;}else{var G=document.createElement("div");G.style.position="absolute";G.style.top="-9999px";G.style.left="-9999px";G.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(G);F=YAHOO.util.Dom.getStyle(G,"background-image");F=F.replace("url(","").replace(")","").replace(/"/g,"");F=F.replace("app:/","");this.set("blankimage",F);
  this._blankImageLoaded=true;YAHOO.widget.EditorInfo.blankImage=F;}}else{F=this.get("blankimage");}return F;},_handleAutoHeight:function(){var J=this._getDoc(),G=J.body,K=J.documentElement;var F=parseInt(C.getStyle(this.get("editor_wrapper"),"height"),10);var H=G.scrollHeight;if(this.browser.webkit){H=K.scrollHeight;}if(H<parseInt(this.get("height"),10)){H=parseInt(this.get("height"),10);}if((F!=H)&&(H>=parseInt(this.get("height"),10))){C.setStyle(this.get("editor_wrapper"),"height",H+"px");if(this.browser.ie){this.get("iframe").setStyle("height","99%");this.get("iframe").setStyle("zoom","1");var I=this;window.setTimeout(function(){I.get("iframe").setStyle("height","100%");},1);}}},_formButtons:null,_formButtonClicked:null,_handleFormButtonClick:function(G){var F=A.getTarget(G);this._formButtonClicked=F;},_handleFormSubmit:function(I){A.stopEvent(I);this.saveHTML();var H=this.get("element").form;var F=this._formButtonClicked||false;var G=this;window.setTimeout(function(){YAHOO.util.Event.removeListener(H,"submit",G._handleFormSubmit);if(YAHOO.env.ua.ie){H.fireEvent("onsubmit");if(F&&!F.disabled){F.click();}}else{if(F&&!F.disabled){F.click();}else{var J=document.createEvent("HTMLEvents");J.initEvent("submit",true,true);H.dispatchEvent(J);if(YAHOO.env.ua.webkit){if(YAHOO.lang.isFunction(H.submit)){H.submit();}}}}},200);},_handleFontSize:function(H){var F=this.toolbar.getButtonById(H.button.id);var G=F.get("label")+"px";this.execCommand("fontsize",G);this.STOP_EXEC_COMMAND=true;},_handleColorPicker:function(H){var G=H.button;var F="#"+H.color;if((G=="forecolor")||(G=="backcolor")){this.execCommand(G,F);}},_handleAlign:function(I){var H=null;for(var F=0;F<I.button.menu.length;F++){if(I.button.menu[F].value==I.button.value){H=I.button.menu[F].value;}}var G=this._getSelection();this.execCommand(H,G);this.STOP_EXEC_COMMAND=true;},_handleAfterNodeChange:function(){var R=this._getDomPath(),M=null,I=null,N=null,G=false;var K=this.toolbar.getButtonByValue("fontname");var L=this.toolbar.getButtonByValue("fontsize");var F=this.toolbar.getButtonByValue("heading");for(var H=0;H<R.length;H++){M=R[H];var Q=M.tagName.toLowerCase();if(M.getAttribute("tag")){Q=M.getAttribute("tag");}I=M.getAttribute("face");if(C.getStyle(M,"font-family")){I=C.getStyle(M,"font-family");I=I.replace(/'/g,"");}if(Q.substring(0,1)=="h"){if(F){for(var J=0;J<F._configs.menu.value.length;J++){if(F._configs.menu.value[J].value.toLowerCase()==Q){F.set("label",F._configs.menu.value[J].text);}}this._updateMenuChecked("heading",Q);}}}if(K){for(var P=0;P<K._configs.menu.value.length;P++){if(I&&K._configs.menu.value[P].text.toLowerCase()==I.toLowerCase()){G=true;I=K._configs.menu.value[P].text;}}if(!G){I=K._configs.label._initialConfig.value;}var O='<span class="yui-toolbar-fontname-'+E(I)+'">'+I+"</span>";if(K.get("label")!=O){K.set("label",O);this._updateMenuChecked("fontname",I);}}if(L){N=parseInt(C.getStyle(M,"fontSize"),10);if((N===null)||isNaN(N)){N=L._configs.label._initialConfig.value;}L.set("label",""+N);}if(!this._isElement(M,"body")&&!this._isElement(M,"img")){this.toolbar.enableButton(K);this.toolbar.enableButton(L);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(M,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink");}}if(this._isElement(M,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent");}if(this._hasParent(M,"ol")||this._hasParent(M,"ul")){this.toolbar.disableButton("indent");}this._lastButton=null;},_setBusy:function(F){},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var F=this.currentElement[0],H="http://";if(!F){F=this._getSelectedElement();}if(F){if(F.getAttribute("src")){H=F.getAttribute("src",2);if(H.indexOf(this.get("blankimage"))!=-1){H=this.STR_IMAGE_HERE;}}}var G=prompt(this.STR_LINK_URL+": ",H);if((G!=="")&&(G!==null)){F.setAttribute("src",G);}else{if(G===null){F.parentNode.removeChild(F);this.currentElement=[];this.nodeChange();}}this.closeWindow();this.toolbar.set("disabled",false);},this,true);},_handleInsertImageWindowClose:function(){this.nodeChange();},_isLocalFile:function(F){if((F!=="")&&((F.indexOf("file:/")!=-1)||(F.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var H=this.currentElement[0],G="";if(H){if(H.getAttribute("href",2)!==null){G=H.getAttribute("href",2);}}var J=prompt(this.STR_LINK_URL+": ",G);if((J!=="")&&(J!==null)){var I=J;if((I.indexOf(":/"+"/")==-1)&&(I.substring(0,1)!="/")&&(I.substring(0,6).toLowerCase()!="mailto")){if((I.indexOf("@")!=-1)&&(I.substring(0,6).toLowerCase()!="mailto")){I="mailto:"+I;}else{if(I.substring(0,1)!="#"){I="http:/"+"/"+I;}}}H.setAttribute("href",I);}else{if(J!==null){var F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;C.addClass(F,"yui-non");H.parentNode.replaceChild(F,H);}}this.closeWindow();this.toolbar.set("disabled",false);});},_handleCreateLinkWindowClose:function(){this.nodeChange();this.currentElement=[];},render:function(){if(this._rendered){return false;}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false;}this._rendered=true;var F=this;window.setTimeout(function(){F._render.call(F);},4);},_render:function(){this._setBusy();var F=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){F._setInitialContent.call(F);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var G=this.get("toolbar");
  if(G instanceof B){this.toolbar=G;this.toolbar.set("disabled",true);}else{G.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),G);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",function(H){this._handleFontSize(H);},this,true);this.toolbar.on("colorPickerClicked",function(H){this._handleColorPicker(H);return false;},this,true);this.toolbar.on("alignClick",function(H){this._handleAlign(H);},this,true);this.on("afterNodeChange",function(){this._handleAfterNodeChange();},this,true);this.toolbar.on("insertimageClick",function(){this._handleInsertImageClick();},this,true);this.on("windowinsertimageClose",function(){this._handleInsertImageWindowClose();},this,true);this.toolbar.on("createlinkClick",function(){this._handleCreateLinkClick();},this,true);this.on("windowcreatelinkClose",function(){this._handleCreateLinkWindowClose();},this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");window.setTimeout(function(){F._setupAfterElement.call(F);},0);this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(H,G){var K=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((K===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._setMarkupType(H);if(this.browser.ie){this._getWindow().focus();}var F=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(H)){F=false;}}this.editorDirty=true;if((typeof this["cmd_"+H.toLowerCase()]=="function")&&F){var J=this["cmd_"+H.toLowerCase()](G);F=J[0];if(J[1]){H=J[1];}if(J[2]){G=J[2];}}if(F){try{this._getDoc().execCommand(H,false,G);}catch(I){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_backcolor:function(I){var F=true,G=this._getSelectedElement(),H="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);H="hilitecolor";}if(!this._isElement(G,"body")&&!this._hasSelection()){C.setStyle(G,"background-color",I);this._selectNode(G);F=false;}else{this._createCurrentElement("span",{backgroundColor:I});this._selectNode(this.currentElement[0]);F=false;}return[F,H];},cmd_forecolor:function(H){var F=true,G=this._getSelectedElement();if(!this._isElement(G,"body")&&!this._hasSelection()){C.setStyle(G,"color",H);this._selectNode(G);F=false;}else{this._createCurrentElement("span",{color:H});this._selectNode(this.currentElement[0]);F=false;}return[F];},cmd_unlink:function(F){this._swapEl(this.currentElement[0],"span",function(G){G.className="yui-non";});return[false];},cmd_createlink:function(H){var G=this._getSelectedElement(),F=null;if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");}else{if(!this._isElement(G,"a")){this._createCurrentElement("a");F=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=F;}else{this.currentElement[0]=G;}}return[false];},cmd_insertimage:function(K){var F=true,G=null,J="insertimage",I=this._getSelectedElement();if(K===""){K=this.get("blankimage");}if(this._isElement(I,"img")){this.currentElement[0]=I;F=false;}else{if(this._getDoc().queryCommandEnabled(J)){this._getDoc().execCommand("insertimage",false,K);var L=this._getDoc().getElementsByTagName("img");for(var H=0;H<L.length;H++){if(!YAHOO.util.Dom.hasClass(L[H],"yui-img")){YAHOO.util.Dom.addClass(L[H],"yui-img");this.currentElement[0]=L[H];}}F=false;}else{if(I==this._getDoc().body){G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this._getDoc().body.appendChild(G);}else{this._createCurrentElement("img");G=this._getDoc().createElement("img");G.setAttribute("src",K);YAHOO.util.Dom.addClass(G,"yui-img");this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);}this.currentElement[0]=G;F=false;}}return[F];},cmd_inserthtml:function(I){var F=true,H="inserthtml",G=null,J=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(H)){this._createCurrentElement("img");G=this._getDoc().createElement("span");G.innerHTML=I;this.currentElement[0].parentNode.replaceChild(G,this.currentElement[0]);F=false;}else{if(this.browser.ie){J=this._getRange();if(J.item){J.item(0).outerHTML=I;}else{J.pasteHTML(I);}F=false;}}return[F];},cmd_list:function(W){var Q=true,T=null,M=0,G=null,P="",U=this._getSelectedElement(),R="insertorderedlist";if(W=="ul"){R="insertunorderedlist";}if((this.browser.webkit&&!this._getDoc().queryCommandEnabled(R))){if(this._isElement(U,"li")&&this._isElement(U.parentNode,W)){G=U.parentNode;T=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(T,"yui-non");P="";var F=G.getElementsByTagName("li");for(M=0;M<F.length;M++){P+="<div>"+F[M].innerHTML+"</div>";}T.innerHTML=P;this.currentElement[0]=G;this.currentElement[0].parentNode.replaceChild(T,this.currentElement[0]);}else{this._createCurrentElement(W.toLowerCase());T=this._getDoc().createElement(W);for(M=0;M<this.currentElement.length;M++){var J=this._getDoc().createElement("li");J.innerHTML=this.currentElement[M].innerHTML+'<span class="yui-non">&nbsp;</span>&nbsp;';
  T.appendChild(J);if(M>0){this.currentElement[M].parentNode.removeChild(this.currentElement[M]);}}this.currentElement[0].parentNode.replaceChild(T,this.currentElement[0]);this.currentElement[0]=T;var H=this.currentElement[0].firstChild;H=C.getElementsByClassName("yui-non","span",H)[0];this._getSelection().setBaseAndExtent(H,1,H,H.innerText.length);}Q=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,W)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))||(this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){if(this.browser.ie){if((this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){G=G.getElementsByTagName("li")[0];}P="";var I=G.parentNode.getElementsByTagName("li");for(var S=0;S<I.length;S++){P+=I[S].innerHTML+"<br>";}var V=this._getDoc().createElement("span");V.innerHTML=P;G.parentNode.parentNode.replaceChild(V,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(R,"",G.parentNode);this.nodeChange();}Q=false;}if(this.browser.opera){var O=this;window.setTimeout(function(){var X=O._getDoc().getElementsByTagName("li");for(var Y=0;Y<X.length;Y++){if(X[Y].innerHTML.toLowerCase()=="<br>"){X[Y].parentNode.parentNode.removeChild(X[Y].parentNode);}}},30);}if(this.browser.ie&&Q){var K="";if(this._getRange().html){K="<li>"+this._getRange().html+"</li>";}else{var L=this._getRange().text.split("\n");if(L.length>1){K="";for(var N=0;N<L.length;N++){K+="<li>"+L[N]+"</li>";}}else{K="<li>"+this._getRange().text+"</li>";}}this._getRange().pasteHTML("<"+W+">"+K+"</"+W+">");Q=false;}}return Q;},cmd_insertorderedlist:function(F){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(F){return[this.cmd_list("ul")];},cmd_fontname:function(H){var F=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()){YAHOO.util.Dom.setStyle(G,"font-family",H);F=false;}return[F];},cmd_fontsize:function(G){if(this.currentElement&&(this.currentElement.length>0)&&(!this._hasSelection())){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){var F=this._getSelectedElement();YAHOO.util.Dom.setStyle(F,"fontSize",G);this._selectNode(F);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}return[false];},_swapEl:function(G,F,I){var H=this._getDoc().createElement(F);H.innerHTML=G.innerHTML;if(typeof I=="function"){I.call(this,H);}G.parentNode.replaceChild(H,G);return H;},_createCurrentElement:function(H,U){H=((H)?H:"a");var b=null,G=[],I=this._getDoc();if(this.currentFont){if(!U){U={};}U.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var X=function(){var f=null;switch(H){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":f=I.createElement(H);break;default:f=I.createElement("span");YAHOO.util.Dom.addClass(f,"yui-tag-"+H);YAHOO.util.Dom.addClass(f,"yui-tag");f.setAttribute("tag",H);for(var e in U){if(YAHOO.lang.hasOwnProperty(U,e)){f.style[e]=U[e];}}break;}return f;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var W=this._getDoc().getElementsByTagName("img");for(var Z=0;Z<W.length;Z++){if(W[Z].getAttribute("src",2)=="yui-tmp-img"){G=X();W[Z].parentNode.replaceChild(G,W[Z]);this.currentElement[this.currentElement.length]=G;}}}else{if(this.currentEvent){b=YAHOO.util.Event.getTarget(this.currentEvent);}else{b=this._getDoc().body;}}if(b){G=X();if(this._isElement(b,"body")||this._isElement(b,"html")){if(this._isElement(b,"html")){b=this._getDoc().body;}b.appendChild(G);}else{if(b.nextSibling){b.parentNode.insertBefore(G,b.nextSibling);}else{b.parentNode.appendChild(G);}}this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var F=[];var R=this._getDoc().getElementsByTagName("font");var P=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);var M=this._getDoc().getElementsByTagName("span");var L=this._getDoc().getElementsByTagName("i");var K=this._getDoc().getElementsByTagName("b");var J=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);for(var V=0;V<R.length;V++){F[F.length]=R[V];}for(var N=0;N<J.length;N++){F[F.length]=J[N];}for(var T=0;T<P.length;T++){F[F.length]=P[T];}for(var S=0;S<M.length;S++){F[F.length]=M[S];}for(var Q=0;Q<L.length;Q++){F[F.length]=L[Q];}for(var O=0;O<K.length;O++){F[F.length]=K[O];}for(var a=0;a<F.length;a++){if((YAHOO.util.Dom.getStyle(F[a],"font-family")=="yui-tmp")||(F[a].face&&(F[a].face=="yui-tmp"))){G=X();G.innerHTML=F[a].innerHTML;if(this._isElement(F[a],"ol")||(this._isElement(F[a],"ul"))){var Y=F[a].getElementsByTagName("li")[0];F[a].style.fontFamily="inherit";Y.style.fontFamily="inherit";G.innerHTML=Y.innerHTML;Y.innerHTML="";Y.appendChild(G);this.currentElement[this.currentElement.length]=G;}else{if(this._isElement(F[a],"li")){F[a].innerHTML="";F[a].appendChild(G);F[a].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=G;}else{if(F[a].parentNode){F[a].parentNode.replaceChild(G,F[a]);this.currentElement[this.currentElement.length]=G;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(G,0,G,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&U&&U.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var c=this.currentElement.length;for(var d=0;d<c;d++){if((d+1)!=c){if(this.currentElement[d]&&this.currentElement[d].nextSibling){if(this._isElement(this.currentElement[d],"br")){this.currentElement[this.currentElement.length]=this.currentElement[d].nextSibling;
  }}}}}},saveHTML:function(){var F=this.cleanHTML();this.get("element").value=F;return F;},setEditorHTML:function(F){F=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=F;this.nodeChange();},getEditorHTML:function(){var F=this._getDoc().body;if(F===null){return null;}return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var F=this;window.setTimeout(function(){F._setInitialContent.call(F);},10);}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(F){F=F.replace(/<strong([^>]*)>/gi,"<b$1>");F=F.replace(/<\/strong>/gi,"</b>");F=F.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");F=F.replace(/<\/embed>/gi,"</YUI_EMBED>");F=F.replace(/<em([^>]*)>/gi,"<i$1>");F=F.replace(/<\/em>/gi,"</i>");F=F.replace(/<YUI_EMBED([^>]*)>/gi,"<embed$1>");F=F.replace(/<\/YUI_EMBED>/gi,"</embed>");if(this.get("plainText")){F=F.replace(/\n/g,"<br>").replace(/\r/g,"<br>");F=F.replace(/  /gi,"&nbsp;&nbsp;");F=F.replace(/\t/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");}F=F.replace(/<script([^>]*)>/gi,"<bad>");F=F.replace(/<\/script([^>]*)>/gi,"</bad>");F=F.replace(/&lt;script([^>]*)&gt;/gi,"<bad>");F=F.replace(/&lt;\/script([^>]*)&gt;/gi,"</bad>");F=F.replace(/\n/g,"<YUI_LF>").replace(/\r/g,"<YUI_LF>");F=F.replace(new RegExp("<bad([^>]*)>(.*?)</bad>","gi"),"");F=F.replace(/<YUI_LF>/g,"\n");return F;},cleanHTML:function(H){if(!H){H=this.getEditorHTML();}var G=this.get("markup");H=this.pre_filter_linebreaks(H,G);H=H.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");H=H.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");H=H.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT$1>");H=H.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");H=H.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");H=H.replace(/<\/ul>/gi,"</YUI_UL>");H=H.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");H=H.replace(/<\/blockquote>/gi,"</YUI_BQ>");H=H.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");H=H.replace(/<\/embed>/gi,"</YUI_EMBED>");if((G=="semantic")||(G=="xhtml")){H=H.replace(/<i(\s+[^>]*)?>/gi,"<em$1>");H=H.replace(/<\/i>/gi,"</em>");H=H.replace(/<b([^>]*)>/gi,"<strong$1>");H=H.replace(/<\/b>/gi,"</strong>");}H=H.replace(/<font/gi,"<font");H=H.replace(/<\/font>/gi,"</font>");H=H.replace(/<span/gi,"<span");H=H.replace(/<\/span>/gi,"</span>");if((G=="semantic")||(G=="xhtml")||(G=="css")){H=H.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)</font>',"gi"),'<span $1 style="font-family: $2;">$3</span>');H=H.replace(/<u/gi,'<span style="text-decoration: underline;"');if(this.browser.webkit){H=H.replace(new RegExp('<span class="Apple-style-span" style="font-weight: bold;">([^>]*)</span>',"gi"),"<strong>$1</strong>");H=H.replace(new RegExp('<span class="Apple-style-span" style="font-style: italic;">([^>]*)</span>',"gi"),"<em>$1</em>");}H=H.replace(/\/u>/gi,"/span>");if(G=="css"){H=H.replace(/<em([^>]*)>/gi,"<i$1>");H=H.replace(/<\/em>/gi,"</i>");H=H.replace(/<strong([^>]*)>/gi,"<b$1>");H=H.replace(/<\/strong>/gi,"</b>");H=H.replace(/<b/gi,'<span style="font-weight: bold;"');H=H.replace(/\/b>/gi,"/span>");H=H.replace(/<i/gi,'<span style="font-style: italic;"');H=H.replace(/\/i>/gi,"/span>");}H=H.replace(/  /gi," ");}else{H=H.replace(/<u/gi,"<u");H=H.replace(/\/u>/gi,"/u>");}H=H.replace(/<ol([^>]*)>/gi,"<ol$1>");H=H.replace(/\/ol>/gi,"/ol>");H=H.replace(/<li/gi,"<li");H=H.replace(/\/li>/gi,"/li>");H=this.filter_safari(H);H=this.filter_internals(H);H=this.filter_all_rgb(H);H=this.post_filter_linebreaks(H,G);if(G=="xhtml"){H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{H=H.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");H=H.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}H=H.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");H=H.replace(/<\/YUI_UL>/g,"</ul>");H=this.filter_invalid_lists(H);H=H.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");H=H.replace(/<\/YUI_BQ>/g,"</blockquote>");H=H.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");H=H.replace(/<\/YUI_EMBED>/g,"</embed>");H=YAHOO.lang.trim(H);if(this.get("removeLineBreaks")){H=H.replace(/\n/g,"").replace(/\r/g,"");H=H.replace(/  /gi," ");}if(H.substring(0,6).toLowerCase()=="<span>"){H=H.substring(6);if(H.substring(H.length-7,H.length).toLowerCase()=="</span>"){H=H.substring(0,H.length-7);}}for(var F in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,F)){if(D.isObject(F)&&F.keepContents){H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"$1");}else{H=H.replace(new RegExp("<"+F+"([^>]*)>(.*?)</"+F+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:H});return H;},filter_invalid_lists:function(F){F=F.replace(/<\/li>\n/gi,"</li>");F=F.replace(/<\/li><ol>/gi,"</li><li><ol>");F=F.replace(/<\/ol>/gi,"</ol></li>");F=F.replace(/<\/ol><\/li>\n/gi,"</ol>\n");F=F.replace(/<\/li><ul>/gi,"</li><li><ul>");F=F.replace(/<\/ul>/gi,"</ul></li>");F=F.replace(/<\/ul><\/li>\n/gi,"</ul>\n");F=F.replace(/<\/li>/gi,"</li>\n");F=F.replace(/<\/ol>/gi,"</ol>\n");F=F.replace(/<ol>/gi,"<ol>\n");F=F.replace(/<ul>/gi,"<ul>\n");return F;},filter_safari:function(F){if(this.browser.webkit){F=F.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");F=F.replace(/Apple-style-span/gi,"");F=F.replace(/style="line-height: normal;"/gi,"");F=F.replace(/<li><\/li>/gi,"");F=F.replace(/<li> <\/li>/gi,"");
  F=F.replace(/<li>  <\/li>/gi,"");F=F.replace(/<div><\/div>/gi,"");F=F.replace(/<div> <\/div>/gi,"");}return F;},filter_internals:function(F){F=F.replace(/\r/g,"");F=F.replace(/<\/?(body|head|html)[^>]*>/gi,"");F=F.replace(/<YUI_BR><\/li>/gi,"</li>");F=F.replace(/yui-tag-span/gi,"");F=F.replace(/yui-tag/gi,"");F=F.replace(/yui-non/gi,"");F=F.replace(/yui-img/gi,"");F=F.replace(/ tag="span"/gi,"");F=F.replace(/ class=""/gi,"");F=F.replace(/ style=""/gi,"");F=F.replace(/ class=" "/gi,"");F=F.replace(/ class="  "/gi,"");F=F.replace(/ target=""/gi,"");F=F.replace(/ title=""/gi,"");if(this.browser.ie){F=F.replace(/ class= /gi,"");F=F.replace(/ class= >/gi,"");F=F.replace(/_height="([^>])"/gi,"");F=F.replace(/_width="([^>])"/gi,"");}return F;},filter_all_rgb:function(J){var I=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var F=J.match(I);if(D.isArray(F)){for(var H=0;H<F.length;H++){var G=this.filter_rgb(F[H]);J=J.replace(F[H].toString(),G);}}return J;},filter_rgb:function(H){if(H.toLowerCase().indexOf("rgb")!=-1){var K=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var G=H.replace(K,"$1,$2,$3,$4,$5").split(",");if(G.length==5){var J=parseInt(G[1],10).toString(16);var I=parseInt(G[2],10).toString(16);var F=parseInt(G[3],10).toString(16);J=J.length==1?"0"+J:J;I=I.length==1?"0"+I:I;F=F.length==1?"0"+F:F;H="#"+J+I+F;}}return H;},pre_filter_linebreaks:function(G,F){if(this.browser.webkit){G=G.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");G=G.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}G=G.replace(/<br>/gi,"<YUI_BR>");G=G.replace(/<br (.*?)>/gi,"<YUI_BR>");G=G.replace(/<br\/>/gi,"<YUI_BR>");G=G.replace(/<br \/>/gi,"<YUI_BR>");G=G.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");G=G.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<YUI_BR>");G=G.replace(/<p><br>&nbsp;<\/p>/gi,"<YUI_BR>");G=G.replace(/<p>&nbsp;<\/p>/gi,"<YUI_BR>");G=G.replace(/<YUI_BR>$/,"");G=G.replace(/<YUI_BR><\/p>/g,"</p>");return G;},post_filter_linebreaks:function(G,F){if(F=="xhtml"){G=G.replace(/<YUI_BR>/g,"<br />");}else{G=G.replace(/<YUI_BR>/g,"<br>");}return G;},clearEditorDoc:function(){this._getDoc().body.innerHTML="&nbsp;";},_renderPanel:function(){},openWindow:function(F){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.unsubscribeAll("afterExecCommand");this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");var G=this.get("element");this.get("element_cont").get("parentNode").replaceChild(G,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);for(var F in this){if(D.hasOwnProperty(this,F)){this[F]=null;}}return true;},toString:function(){var F="SimpleEditor";if(this.get&&this.get("element_cont")){F="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(F){if(!YAHOO.lang.isString(F)){F=F.id;}if(this._instances[F]){return this._instances[F];}return false;},toString:function(){var F=0;for(var G in this._instances){F++;}return"Editor Info ("+F+" registered intance"+((F>1)?"s":"")+")";}};})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.Editor=function(G,F){YAHOO.widget.Editor.superclass.constructor.call(this,G,F);};function E(F){return F.replace(/ /g,"-").toLowerCase();}YAHOO.extend(YAHOO.widget.Editor,YAHOO.widget.SimpleEditor,{STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_CLOSE_WINDOW:"Close Window",STR_CLOSE_WINDOW_NOTE:"To close this window use the Control + Shift + W key",STR_IMAGE_PROP_TITLE:"Image Options",STR_IMAGE_URL:"Image URL",STR_IMAGE_TITLE:"Description",STR_IMAGE_SIZE:"Size",STR_IMAGE_ORIG_SIZE:"Original Size",STR_IMAGE_COPY:'<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',STR_IMAGE_PADDING:"Padding",STR_IMAGE_BORDER:"Border",STR_IMAGE_TEXTFLOW:"Text Flow",STR_LOCAL_FILE_WARNING:'<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',STR_LINK_PROP_TITLE:"Link Options",STR_LINK_PROP_REMOVE:"Remove link from text",STR_LINK_NEW_WINDOW:"Open in a new window.",STR_LINK_TITLE:"Description",CLASS_LOCAL_FILE:"warning-localfile",CLASS_HIDDEN:"yui-hidden",init:function(G,F){this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",draggable:false,buttonType:"advanced",buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"push",label:"Subscript",value:"subscript",disabled:true},{type:"push",label:"Superscript",value:"superscript",disabled:true},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true},{type:"separator"},{type:"push",label:"Remove Formatting",value:"removeformat",disabled:true},{type:"push",label:"Show/Hide Hidden Elements",value:"hiddenelements"}]},{type:"separator"},{group:"alignment",label:"Alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{type:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"parastyle",label:"Paragraph Style",buttons:[{type:"select",label:"Normal",value:"heading",disabled:true,menu:[{text:"Normal",value:"none",checked:true},{text:"Header 1",value:"h1"},{text:"Header 2",value:"h2"},{text:"Header 3",value:"h3"},{text:"Header 4",value:"h4"},{text:"Header 5",value:"h5"},{text:"Header 6",value:"h6"}]}]},{type:"separator"},{group:"indentlist",label:"Indenting and Lists",buttons:[{type:"push",label:"Indent",value:"indent",disabled:true},{type:"push",label:"Outdent",value:"outdent",disabled:true},{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};
  YAHOO.widget.Editor.superclass.init.call(this,G,F);},initAttributes:function(F){YAHOO.widget.Editor.superclass.initAttributes.call(this,F);this.setAttributeConfig("localFileWarning",{value:F.locaFileWarning||true});this.setAttributeConfig("hiddencss",{value:F.hiddencss||".yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }",writeOnce:true});},_fixNodes:function(){YAHOO.widget.Editor.superclass._fixNodes.call(this);var I="";var J=this._getDoc().getElementsByTagName("img");for(var G=0;G<J.length;G++){if(J[G].getAttribute("href",2)){I=J[G].getAttribute("src",2);if(this._isLocalFile(I)){C.addClass(J[G],this.CLASS_LOCAL_FILE);}else{C.removeClass(J[G],this.CLASS_LOCAL_FILE);}}}var H=this._getDoc().body.getElementsByTagName("a");for(var F=0;F<H.length;F++){if(H[F].getAttribute("href",2)){I=H[F].getAttribute("href",2);if(this._isLocalFile(I)){C.addClass(H[F],this.CLASS_LOCAL_FILE);}else{C.removeClass(H[F],this.CLASS_LOCAL_FILE);}}}},_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{"outdent":true},_alwaysEnabled:{hiddenelements:true},_handleKeyDown:function(H){YAHOO.widget.Editor.superclass._handleKeyDown.call(this,H);var G=false,I=null,F=false;if(H.shiftKey&&H.ctrlKey){G=true;}switch(H.keyCode){case 219:I="justifyleft";break;case 220:I="justifycenter";break;case 221:I="justifyright";break;}if(G&&I){this.execCommand(I,null);A.stopEvent(H);this.nodeChange();}},_handleCreateLinkClick:function(){var F=this._getSelectedElement();if(this._isElement(F,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=F;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});return false;}if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.on("afterExecCommand",function(){var M=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var J=this.currentElement[0],I="",P="",N="",K=false;if(J){if(J.getAttribute("href",2)!==null){I=J.getAttribute("href",2);if(this._isLocalFile(I)){M.setFooter(this.STR_LOCAL_FILE_WARNING);K=true;}else{M.setFooter(" ");}}if(J.getAttribute("title")!==null){P=J.getAttribute("title");}if(J.getAttribute("target")!==null){N=J.getAttribute("target");}}var O='<label for="createlink_url"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="createlink_url" class="createlink_url" id="createlink_url" value="'+I+'"'+((K)?' class="warning"':"")+"></label>";O+='<label for="createlink_target"><strong>&nbsp;</strong><input type="checkbox" name="createlink_target" id="createlink_target" class="createlink_target" value="_blank"'+((N)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";O+='<label for="createlink_title"><strong>'+this.STR_LINK_TITLE+':</strong> <input type="text" name="createlink_title" class="createlink_title" id="createlink_title" value="'+P+'"></label>';var L=document.createElement("div");L.innerHTML=O;var H=document.createElement("div");H.className="removeLink";var G=document.createElement("a");G.href="#";G.innerHTML=this.STR_LINK_PROP_REMOVE;G.title=this.STR_LINK_PROP_REMOVE;A.on(G,"click",function(Q){A.stopEvent(Q);this.execCommand("unlink");this.closeWindow();},this,true);H.appendChild(G);L.appendChild(H);M.setHeader(this.STR_LINK_PROP_TITLE);M.setBody(L);A.onAvailable("createlink_url",function(){window.setTimeout(function(){try{YAHOO.util.Dom.get("createlink_url").focus();}catch(Q){}},50);A.on("createlink_url","blur",function(){var Q=C.get("createlink_url");if(this._isLocalFile(Q.value)){C.addClass(Q,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(Q,"warning");this.get("panel").setFooter(" ");}},this,true);},this,true);this.openWindow(M);});},_handleCreateLinkWindowClose:function(){var H=C.get("createlink_url"),J=C.get("createlink_target"),L=C.get("createlink_title"),I=this.currentElement[0],F=I;if(H&&H.value){var K=H.value;if((K.indexOf(":/"+"/")==-1)&&(K.substring(0,1)!="/")&&(K.substring(0,6).toLowerCase()!="mailto")){if((K.indexOf("@")!=-1)&&(K.substring(0,6).toLowerCase()!="mailto")){K="mailto:"+K;}else{if(K.substring(0,1)!="#"){K="http:/"+"/"+K;}}}I.setAttribute("href",K);if(J.checked){I.setAttribute("target",J.value);}else{I.setAttribute("target","");}I.setAttribute("title",((L.value)?L.value:""));}else{var G=this._getDoc().createElement("span");G.innerHTML=I.innerHTML;C.addClass(G,"yui-non");I.parentNode.replaceChild(G,I);}this.nodeChange();this.currentElement=[];},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this._setBusy();this.on("afterExecCommand",function(){var I=this.currentElement[0],S=null,P="",e="",f="",O="",b="",V=75,Y=75,U=0,Q=0,N=0,W=false,M=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!I){I=this._getSelectedElement();}if(I){if(I.getAttribute("src")){O=I.getAttribute("src",2);if(O.indexOf(this.get("blankimage"))!=-1){O=this.STR_IMAGE_HERE;W=true;}}if(I.getAttribute("alt",2)){f=I.getAttribute("alt",2);}if(I.getAttribute("title",2)){f=I.getAttribute("title",2);}if(I.parentNode&&this._isElement(I.parentNode,"a")){P=I.parentNode.getAttribute("href",2);if(I.parentNode.getAttribute("target")!==null){e=I.parentNode.getAttribute("target");}}V=parseInt(I.height,10);Y=parseInt(I.width,10);if(I.style.height){V=parseInt(I.style.height,10);}if(I.style.width){Y=parseInt(I.style.width,10);}if(I.style.margin){U=parseInt(I.style.margin,10);}if(!I._height){I._height=V;}if(!I._width){I._width=Y;}Q=I._height;N=I._width;}var Z='<label for="insertimage_url"><strong>'+this.STR_IMAGE_URL+':</strong> <input type="text" id="insertimage_url" class="insertimage_url" value="'+O+'" size="40"></label>';
  S=document.createElement("div");S.innerHTML=Z;var K=document.createElement("div");K.id="img_toolbar";S.appendChild(K);var F='<label for="insertimage_title"><strong>'+this.STR_IMAGE_TITLE+':</strong> <input type="text" id="insertimage_title" class="insertimage_title" value="'+f+'" size="40"></label>';F+='<label for="insertimage_link"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="insertimage_link" id="insertimage_link" class="insertimage_link" value="'+P+'"></label>';F+='<label for="insertimage_target"><strong>&nbsp;</strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" class="insertimage_target" value="_blank"'+((e)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";var T=document.createElement("div");T.innerHTML=F;S.appendChild(T);M.cache=S;var H=new YAHOO.widget.Toolbar(K,{buttonType:this._defaultToolbar.buttonType,buttons:[{group:"textflow",label:this.STR_IMAGE_TEXTFLOW+":",buttons:[{type:"push",label:"Left",value:"left"},{type:"push",label:"Inline",value:"inline"},{type:"push",label:"Block",value:"block"},{type:"push",label:"Right",value:"right"}]},{type:"separator"},{group:"padding",label:this.STR_IMAGE_PADDING+":",buttons:[{type:"spin",label:""+U,value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:"Border Size",value:"bordersize",menu:[{text:"none",value:"0",checked:true},{text:"1px",value:"1"},{text:"2px",value:"2"},{text:"3px",value:"3"},{text:"4px",value:"4"},{text:"5px",value:"5"}]},{type:"select",label:"Border Type",value:"bordertype",disabled:true,menu:[{text:"Solid",value:"solid",checked:true},{text:"Dashed",value:"dashed"},{text:"Dotted",value:"dotted"}]},{type:"color",label:"Border Color",value:"bordercolor",disabled:true}]}]});var G="0";var X="solid";if(I.style.borderLeftWidth){G=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){X=I.style.borderLeftStyle;}var d=H.getButtonByValue("bordersize");var a=((parseInt(G,10)>0)?"":"none");d.set("label",'<span class="yui-toolbar-bordersize-'+G+'">'+a+"</span>");this._updateMenuChecked("bordersize",G,H);var R=H.getButtonByValue("bordertype");R.set("label",'<span class="yui-toolbar-bordertype-'+X+'"></span>');this._updateMenuChecked("bordertype",X,H);if(parseInt(G,10)>0){H.enableButton(R);H.enableButton(d);}var J=H.get("cont");var c=document.createElement("div");c.className="yui-toolbar-group yui-toolbar-group-height-width height-width";c.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";var L="";if((V!=Q)||(Y!=N)){L='<span class="info">'+this.STR_IMAGE_ORIG_SIZE+"<br>"+N+" x "+Q+"</span>";}c.innerHTML+='<span tabIndex="-1"><input type="text" size="3" value="'+Y+'" id="insertimage_width"> x <input type="text" size="3" value="'+V+'" id="insertimage_height"></span>'+L;J.insertBefore(c,J.firstChild);A.onAvailable("insertimage_width",function(){A.on("insertimage_width","blur",function(){var g=parseInt(C.get("insertimage_width").value,10);if(g>5){I.style.width=g+"px";}},this,true);},this,true);A.onAvailable("insertimage_height",function(){A.on("insertimage_height","blur",function(){var g=parseInt(C.get("insertimage_height").value,10);if(g>5){I.style.height=g+"px";}},this,true);},this,true);if((I.align=="right")||(I.align=="left")){H.selectButton(I.align);}else{if(I.style.display=="block"){H.selectButton("block");}else{H.selectButton("inline");}}if(parseInt(I.style.marginLeft,10)>0){H.getButtonByValue("padding").set("label",""+parseInt(I.style.marginLeft,10));}if(I.style.borderSize){H.selectButton("bordersize");H.selectButton(parseInt(I.style.borderSize,10));}H.on("colorPickerClicked",function(k){var h="1",j="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){j=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}var i=h+"px "+j+" #"+k.color;I.style.border=i;},this.toolbar,true);H.on("buttonClick",function(m){var k=m.button.value,j="";if(m.button.menucmd){k=m.button.menucmd;}var h="1",i="solid",g="black";if(I.style.borderLeftWidth){h=parseInt(I.style.borderLeftWidth,10);}if(I.style.borderLeftStyle){i=I.style.borderLeftStyle;}if(I.style.borderLeftColor){g=I.style.borderLeftColor;}switch(k){case"bordersize":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=parseInt(m.button.value,10)+"px "+i+" "+g;I.style.border=j;if(parseInt(m.button.value,10)>0){H.enableButton("bordertype");H.enableButton("bordercolor");}else{H.disableButton("bordertype");H.disableButton("bordercolor");}break;case"bordertype":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}j=h+"px "+m.button.value+" "+g;I.style.border=j;break;case"right":case"left":H.deselectAllButtons();I.style.display="";I.align=m.button.value;break;case"inline":H.deselectAllButtons();I.style.display="";I.align="";break;case"block":H.deselectAllButtons();I.style.display="block";I.align="center";break;case"padding":var l=H.getButtonById(m.button.id);I.style.margin=l.get("label")+"px";break;}H.selectButton(m.button.value);this.moveWindow();},this,true);M.setHeader(this.STR_IMAGE_PROP_TITLE);M.setBody(S);if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){M.setFooter(this.STR_IMAGE_COPY);}this.openWindow(M);A.onAvailable("insertimage_url",function(){this.toolbar.selectButton("insertimage");window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_url").focus();if(W){YAHOO.util.Dom.get("insertimage_url").select();}},50);if(this.get("localFileWarning")){A.on("insertimage_link","blur",function(){var g=C.get("insertimage_link");if(this._isLocalFile(g.value)){C.addClass(g,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(g,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}}},this,true);
  A.on("insertimage_url","blur",function(){var i=C.get("insertimage_url");if(i.value&&I){if(i.value==I.getAttribute("src",2)){return false;}}if(this._isLocalFile(i.value)){C.addClass(i,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{if(this.currentElement[0]){C.removeClass(i,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}if(i&&i.value&&(i.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",i.value);var h=this,g=new Image();g.onerror=function(){i.value=h.STR_IMAGE_HERE;g.setAttribute("src",h.get("blankimage"));h.currentElement[0].setAttribute("src",h.get("blankimage"));YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;};window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_height").value=g.height;YAHOO.util.Dom.get("insertimage_width").value=g.width;if(h.currentElement&&h.currentElement[0]){if(!h.currentElement[0]._height){h.currentElement[0]._height=g.height;}if(!h.currentElement[0]._width){h.currentElement[0]._width=g.width;}}},800);if(i.value!=this.STR_IMAGE_HERE){g.src=i.value;}}}}},this,true);}},this,true);});},_handleInsertImageWindowClose:function(){var F=C.get("insertimage_url");var M=C.get("insertimage_title");var J=C.get("insertimage_link");var K=C.get("insertimage_target");var I=this.currentElement[0];if(F&&F.value&&(F.value!=this.STR_IMAGE_HERE)){I.setAttribute("src",F.value);I.setAttribute("title",M.value);I.setAttribute("alt",M.value);var H=I.parentNode;if(J.value){var L=J.value;if((L.indexOf(":/"+"/")==-1)&&(L.substring(0,1)!="/")&&(L.substring(0,6).toLowerCase()!="mailto")){if((L.indexOf("@")!=-1)&&(L.substring(0,6).toLowerCase()!="mailto")){L="mailto:"+L;}else{L="http:/"+"/"+L;}}if(H&&this._isElement(H,"a")){H.setAttribute("href",L);if(K.checked){H.setAttribute("target",K.value);}else{H.setAttribute("target","");}}else{var G=this._getDoc().createElement("a");G.setAttribute("href",L);if(K.checked){G.setAttribute("target",K.value);}else{G.setAttribute("target","");}I.parentNode.replaceChild(G,I);G.appendChild(I);}}else{if(H&&this._isElement(H,"a")){H.parentNode.replaceChild(I,H);}}}else{I.parentNode.removeChild(I);}this.currentElement=[];this.nodeChange();},_renderPanel:function(){var F=null;if(!YAHOO.widget.EditorInfo.panel){F=new YAHOO.widget.Overlay(this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});YAHOO.widget.EditorInfo.panel=F;}else{F=YAHOO.widget.EditorInfo.panel;}this.set("panel",F);this.get("panel").setBody("---");this.get("panel").setHeader(" ");this.get("panel").setFooter(" ");if(this.DOMReady){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){this.toolbar.set("disabled",true);A.on(document,"keypress",this._closeWindow,this,true);if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope);}YAHOO.widget.EditorInfo.window.win=K;YAHOO.widget.EditorInfo.window.scope=this;var P=this,L=C.getXY(this.currentElement[0]),U=C.getXY(this.get("iframe").get("element")),N=this.get("panel"),T=[(L[0]+U[0]-20),(L[1]+U[1]+10)],O=(parseInt(K.attrs.width,10)/2),R="center",M=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:N});M=document.createElement("div");M.className=this.CLASS_PREFIX+"-body-cont";for(var V in this.browser){if(this.browser[V]){C.addClass(M,V);break;}}C.addClass(M,((YAHOO.widget.Button&&(this._defaultToolbar.buttonType=="advanced"))?"good-button":"no-button"));var S=document.createElement("h3");S.className="yui-editor-skipheader";S.innerHTML=this.STR_CLOSE_WINDOW_NOTE;M.appendChild(S);form=document.createElement("form");form.setAttribute("method","GET");var W=K.name;A.on(form,"submit",function(Y){var X="window"+W+"Submit";P.fireEvent(X,{type:X,target:this});A.stopEvent(Y);},this,true);M.appendChild(form);if(D.isObject(K.body)){form.appendChild(K.body);}else{var F=document.createElement("div");F.innerHTML=K.body;form.appendChild(F);}var J=document.createElement("span");J.innerHTML="X";J.title=this.STR_CLOSE_WINDOW;J.className="close";A.on(J,"click",function(){this.closeWindow();},this,true);var H=document.createElement("span");H.innerHTML="^";H.className="knob";K._knob=H;var I=document.createElement("h3");I.innerHTML=K.header;N.cfg.setProperty("width",K.attrs.width);N.setHeader(" ");N.appendToHeader(I);I.appendChild(J);I.appendChild(H);N.setBody(" ");N.setFooter(" ");if(K.footer!==null){N.setFooter(K.footer);C.addClass(N.footer,"open");}else{C.removeClass(N.footer,"open");}N.appendToBody(M);var Q=function(){N.bringToTop();A.on(N.element,"click",function(X){A.stopPropagation(X);});this._setBusy(true);N.showEvent.unsubscribe(Q);};N.showEvent.subscribe(Q,this,true);var G=function(){this.currentWindow=null;var X="window"+W+"Close";this.fireEvent(X,{type:X,target:this});N.hideEvent.unsubscribe(G);};N.hideEvent.subscribe(G,this,true);this.currentWindow=K;this.moveWindow(true);N.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:N});},moveWindow:function(G){if(!this.currentWindow){return false;}var J=this.currentWindow,K=C.getXY(this.currentElement[0]),b=C.getXY(this.get("iframe").get("element")),P=this.get("panel"),Z=[(K[0]+b[0]),(K[1]+b[1])],S=(parseInt(J.attrs.width,10)/2),V="center",R=P.cfg.getProperty("xy")||[0,0],H=J._knob,Y=0,M=0,U=false;Z[0]=((Z[0]-S)+20);Z[0]=Z[0]-C.getDocumentScrollLeft(this._getDoc());Z[1]=Z[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){Z[0]=(Z[0]+(75/2));
  Z[1]=(Z[1]+75);}else{var O=parseInt(this.currentElement[0].width,10);var X=parseInt(this.currentElement[0].height,10);Z[0]=(Z[0]+(O/2));Z[1]=(Z[1]+X);}Z[1]=Z[1]+15;}else{var L=C.getStyle(this.currentElement[0],"fontSize");if(L&&L.indexOf&&L.indexOf("px")!=-1){Z[1]=Z[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{Z[1]=Z[1]+20;}}if(Z[0]<b[0]){Z[0]=b[0]+5;V="left";}if((Z[0]+(S*2))>(b[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){Z[0]=((b[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(S*2)-5);V="right";}try{Y=(Z[0]-R[0]);M=(Z[1]-R[1]);}catch(c){}var Q=b[1]+parseInt(this.get("height"),10);var I=b[0]+parseInt(this.get("width"),10);if(Z[1]>Q){Z[1]=Q;}if(Z[0]>I){Z[0]=(I/2);}Y=((Y<0)?(Y*-1):Y);M=((M<0)?(M*-1):M);if(((Y>10)||(M>10))||G){var T=0,W=0;if(this.currentElement[0].width){W=(parseInt(this.currentElement[0].width,10)/2);}var N=K[0]+b[0]+W;T=N-Z[0];if(T>(parseInt(J.attrs.width,10)-1)){T=((parseInt(J.attrs.width,10)-30)-1);}else{if(T<40){T=1;}}if(isNaN(T)){T=1;}if(G){if(H){H.style.left=T+"px";}if(this.get("animate")){C.setStyle(P.element,"opacity","0");U=new YAHOO.util.Anim(P.element,{opacity:{from:0,to:1}},0.1,YAHOO.util.Easing.easeOut);P.cfg.setProperty("xy",Z);U.onComplete.subscribe(function(){if(this.browser.ie){P.element.style.filter="none";}},this,true);U.animate();}else{P.cfg.setProperty("xy",Z);}}else{if(this.get("animate")){U=new YAHOO.util.Anim(P.element,{},0.5,YAHOO.util.Easing.easeOut);U.attributes={top:{to:Z[1]},left:{to:Z[0]}};U.onComplete.subscribe(function(){P.cfg.setProperty("xy",Z);});var a=new YAHOO.util.Anim(P.iframe,U.attributes,0.5,YAHOO.util.Easing.easeOut);var F=new YAHOO.util.Anim(H,{left:{to:T}},0.6,YAHOO.util.Easing.easeOut);U.animate();a.animate();F.animate();}else{H.style.left=T+"px";P.cfg.setProperty("xy",Z);}}}},_closeWindow:function(F){if((F.charCode==87)&&F.shiftKey&&F.ctrlKey){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(){YAHOO.widget.EditorInfo.window={};this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keypress",this._closeWindow);},cmd_heading:function(J){var G=true,H=null,I="heading",K=this._getSelection(),F=this._getSelectedElement();if(F){K=F;}if(this.browser.ie){I="formatblock";}if(J=="none"){if((K&&K.tagName&&(K.tagName.toLowerCase().substring(0,1)=="h"))||(K&&K.parentNode&&K.parentNode.tagName&&(K.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(K.parentNode.tagName.toLowerCase().substring(0,1)=="h"){K=K.parentNode;}if(this._isElement(K,"html")){return[false];}H=this._swapEl(F,"span",function(L){L.className="yui-non";});this._selectNode(H);this.currentElement[0]=H;}G=false;}else{if(this._isElement(F,"h1")||this._isElement(F,"h2")||this._isElement(F,"h3")||this._isElement(F,"h4")||this._isElement(F,"h5")||this._isElement(F,"h6")){H=this._swapEl(F,J);this._selectNode(H);this.currentElement[0]=H;}else{this._createCurrentElement(J);this._selectNode(this.currentElement[0]);}G=false;}return[G,I];},cmd_hiddenelements:function(F){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}return[false];},cmd_removeformat:function(I){var G=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var F=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=F;for(var H=1;H<this.currentElement.length;H++){this.currentElement[H].parentNode.removeChild(this.currentElement[H]);}G=false;}return[G];},cmd_script:function(L,K){var H=true,F=L.toLowerCase().substring(0,3),I=null,G=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(G,F)){I=this._swapEl(this.currentElement[0],"span",function(M){M.className="yui-non";});this._selectNode(I);}else{this._createCurrentElement(F);var J=this._swapEl(this.currentElement[0],F);this._selectNode(J);this.currentElement[0]=J;}H=false;}return H;},cmd_superscript:function(F){return[this.cmd_script("superscript",F)];},cmd_subscript:function(F){return[this.cmd_script("subscript",F)];},cmd_indent:function(I){var F=true,H=this._getSelectedElement(),J=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){if(this._isElement(H,"blockquote")){J=this._getDoc().createElement("blockquote");J.innerHTML=H.innerHTML;H.innerHTML="";H.appendChild(J);this._selectNode(J);}else{this._createCurrentElement("blockquote");for(var G=0;G<this.currentElement.length;G++){J=this._getDoc().createElement("blockquote");J.innerHTML=this.currentElement[G].innerHTML;this.currentElement[G].parentNode.replaceChild(J,this.currentElement[G]);this.currentElement[G]=J;}this._selectNode(this.currentElement[0]);}F=false;}else{I="blockquote";}return[F,"indent",I];},cmd_outdent:function(J){var F=true,I=this._getSelectedElement(),K=null,G=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){I=this._getSelectedElement();if(this._isElement(I,"blockquote")){var H=I.parentNode;if(this._isElement(I.parentNode,"blockquote")){H.innerHTML=I.innerHTML;this._selectNode(H);}else{G=this._getDoc().createElement("span");G.innerHTML=I.innerHTML;YAHOO.util.Dom.addClass(G,"yui-non");H.replaceChild(G,I);this._selectNode(G);}}else{}F=false;}else{J="blockquote";}return[F,"indent",J];},toString:function(){var F="Editor";if(this.get&&this.get("element_cont")){F="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return F;}});YAHOO.widget.EditorWindow=function(G,F){this.name=G.replace(" ","_");
  this.attrs=F;};YAHOO.widget.EditorWindow.prototype={_cache:null,header:null,body:null,footer:null,setHeader:function(F){this.header=F;},setBody:function(F){this.body=F;},setFooter:function(F){this.footer=F;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.5.2",build:"1076"});