Index: main/trunk/greenstone3/web/interfaces/oran/interfaceConfig.xml
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/interfaceConfig.xml	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/interfaceConfig.xml	(revision 24510)
@@ -27,4 +27,5 @@
       <subaction name="authen" xslt='pages/authen.xsl'/>
       <subaction name="berry" xslt='pages/berry.xsl'/>
+	  <subaction name="documentbasket" xslt='pages/documentbasket.xsl'/>
     </action>
   </actionList>
@@ -187,4 +188,5 @@
     <option name="highlightQueryTerms" value="true"/>
     <option name="berryBaskets" value="true"/>
+	<option name="documentBasket" value="true"/>
   </optionList>
 </interfaceConfig>
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/button-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/button-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/button-min.js	(revision 24510)
@@ -0,0 +1,11 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){var G=YAHOO.util.Dom,M=YAHOO.util.Event,I=YAHOO.lang,L=YAHOO.env.ua,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(O,N,R,P){var S,Q;if(I.isString(O)&&I.isString(N)){if(L.ie&&(L.ie<9)){Q='<input type="'+O+'" name="'+N+'"';if(P){Q+=" checked";}Q+=">";S=document.createElement(Q);S.value=R;}else{S=document.createElement("input");S.name=N;S.type=O;S.value=R;if(P){S.checked=true;}}}return S;}function H(O,V){var N=O.nodeName.toUpperCase(),S=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME),T=this,U,P,Q;function W(X){if(!(X in V)){U=O.getAttributeNode(X);if(U&&("value" in U)){V[X]=U.value;}}}function R(){W("type");if(V.type=="button"){V.type="push";}if(!("disabled" in V)){V.disabled=O.disabled;}W("name");W("value");W("title");}switch(N){case"A":V.type="link";W("href");W("target");break;case"INPUT":R();if(!("checked" in V)){V.checked=O.checked;}break;case"BUTTON":R();P=O.parentNode.parentNode;if(G.hasClass(P,S+"-checked")){V.checked=true;}if(G.hasClass(P,S+"-disabled")){V.disabled=true;}O.removeAttribute("value");O.setAttribute("type","button");break;}O.removeAttribute("id");O.removeAttribute("name");if(!("tabindex" in V)){V.tabindex=O.tabIndex;}if(!("label" in V)){Q=N=="INPUT"?O.value:O.innerHTML;if(Q&&Q.length>0){V.label=Q;}}}function A(P){var O=P.attributes,N=O.srcelement,R=N.nodeName.toUpperCase(),Q=this;if(R==this.NODE_NAME){P.element=N;P.id=N.id;G.getElementsBy(function(S){switch(S.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(Q,S,O);break;}},"*",N);}else{switch(R){case"BUTTON":case"A":case"INPUT":H.call(this,N,O);break;}}}YAHOO.widget.Button=function(R,O){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var Q=YAHOO.widget.Button.superclass.constructor,P,N;if(arguments.length==1&&!I.isString(R)&&!R.nodeName){if(!R.id){R.id=G.generateId();}Q.call(this,(this.createButtonElement(R.type)),R);}else{P={element:null,attributes:(O||{})};if(I.isString(R)){N=G.get(R);if(N){if(!P.attributes.id){P.attributes.id=R;}P.attributes.srcelement=N;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}else{if(R.nodeName){if(!P.attributes.id){if(R.id){P.attributes.id=R.id;}else{P.attributes.id=G.generateId();}}P.attributes.srcelement=R;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,CLASS_NAME_PREFIX:"yui-",NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"button",_setType:function(N){if(N=="split"){this.on("option",this._onOption);}},_setLabel:function(O){this._button.innerHTML=O;var P,N=L.gecko;if(N&&N<1.9&&G.inDocument(this.get("element"))){P=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);this.removeClass(P);I.later(0,this,this.addClass,P);}},_setTabIndex:function(N){this._button.tabIndex=N;},_setTitle:function(N){if(this.get("type")!="link"){this._button.title=N;}},_setDisabled:function(N){if(this.get("type")!="link"){if(N){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(N){if(this.get("type")=="link"){this._button.href=N;}},_setTarget:function(N){if(this.get("type")=="link"){this._button.setAttribute("target",N);}},_setChecked:function(N){var O=this.get("type");if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");}else{this.removeStateCSSClasses("checked");}}},_setMenu:function(U){var P=this.get("lazyloadmenu"),R=this.get("element"),N,W=false,X,O,Q;function V(){X.render(R.parentNode);this.removeListener("appendTo",V);}function T(){X.cfg.queueProperty("container",R.parentNode);this.removeListener("appendTo",T);}function S(){var Y;if(X){G.addClass(X.element,this.get("menuclassname"));G.addClass(X.element,this.CLASS_NAME_PREFIX+this.get("type")+"-button-menu");X.showEvent.subscribe(this._onMenuShow,null,this);X.hideEvent.subscribe(this._onMenuHide,null,this);X.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&X instanceof J){if(P){Y=this.get("container");if(Y){X.cfg.queueProperty("container",Y);}else{this.on("appendTo",T);}}X.cfg.queueProperty("clicktohide",false);X.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);X.subscribe("click",this._onMenuClick,this,true);this.on("selectedMenuItemChange",this._onSelectedMenuItemChange);Q=X.srcElement;if(Q&&Q.nodeName.toUpperCase()=="SELECT"){Q.style.display="none";Q.parentNode.removeChild(Q);}}else{if(B&&X instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn);
+this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){I.later(0,this,this.focus);}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){this.inMouseDown=false;var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){if((P.which||P.button)!=1){return;}this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;
+if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var R=this.get("type"),Q,N,O;switch(R){case"submit":if(P.returnValue!==false){this.submitForm();}break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(P)>this._nOptionRegionX)){O=false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"&&P.returnValue!==false){this.submitForm();}}break;}return O;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(R){var O=M.getTarget(R),Q=this.get("element"),P=this._menu.element;function N(T){var V,S,U;if(!T){return true;}for(V=0,S=T.length;V<S;V++){U=T[V].element;if(O==U||G.isAncestor(U,O)){return true;}if(T[V]&&T[V].getSubmenus){if(N(T[V].getSubmenus())){return true;}}}return false;}if(O!=Q&&!G.isAncestor(Q,O)&&O!=P&&!G.isAncestor(P,O)){if(this._menu&&this._menu.getSubmenus){if(!N(this._menu.getSubmenus())){return;}}this._hideMenu();if(L.ie&&(L.ie<9)&&O.focus){O.setActive();}M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass(this.CLASS_NAME_PREFIX+"split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onMenuShow:function(N){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var O=(this.get("type")=="split")?"activeoption":"active";this.addStateCSSClasses(O);},_onMenuHide:function(N){var O=(this.get("type")=="split")?"activeoption":"active";this.removeStateCSSClasses(O);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(P){var S=this.get("element"),O=S.parentNode,N=this._menu,R=N.element,Q=N.srcElement,T;if(O!=R.parentNode){O.appendChild(R);}this._renderedMenu=true;if(Q&&Q.nodeName.toLowerCase()==="select"&&Q.value){T=N.getItem(Q.selectedIndex);this.set("selectedMenuItem",T,true);this._onSelectedMenuItemChange({newValue:T});}},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){this.set("selectedMenuItem",Q);P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},_onSelectedMenuItemChange:function(O){var P=O.prevValue,Q=O.newValue,N=this.CLASS_NAME_PREFIX;if(P){G.removeClass(P.element,(N+"button-selectedmenuitem"));}if(Q){G.addClass(Q.element,(N+"button-selectedmenuitem"));}},_onLabelClick:function(N){this.focus();var O=this.get("type");if(O=="radio"||O=="checkbox"){this.set("checked",(!this.get("checked")));}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"<a></a>":'<button type="button"></button>')+"</"+P+">";return O;},addStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){if(O!="activeoption"&&O!="hoveroption"){this.addClass(N+this.CSS_CLASS_NAME+("-"+O));}this.addClass(N+P+("-button-"+O));}},removeStateCSSClasses:function(O){var P=this.get("type"),N=this.CLASS_NAME_PREFIX;if(I.isString(O)){this.removeClass(N+this.CSS_CLASS_NAME+("-"+O));this.removeClass(N+P+("-button-"+O));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){N=V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;}if(L.ie&&(L.ie<9)){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(P,d){var V=d.type=="link"?"a":"button",a=d.srcelement,S=P.getElementsByTagName(V)[0],U;if(!S){U=P.getElementsByTagName("input")[0];if(U){S=document.createElement("button");S.setAttribute("type","button");U.parentNode.replaceChild(S,U);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,P,d);var T=this.get("id"),Z=T+"-button";S.id=Z;var X,Q;var e=function(f){return(f.htmlFor===T);};var c=function(){Q.setAttribute((L.ie?"htmlFor":"for"),Z);};if(a&&this.get("type")!="link"){X=G.getElementsBy(e,"label");if(I.isArray(X)&&X.length>0){Q=X[0];}}D[T]=this;var b=this.CLASS_NAME_PREFIX;this.addClass(b+this.CSS_CLASS_NAME);this.addClass(b+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);
+this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var R=this.get("onclick");this.set("onclick",null);this.set("onclick",R);this.on("dblclick",this._onDblClick);var O;if(Q){if(this.get("replaceLabel")){this.set("label",Q.innerHTML);O=Q.parentNode;O.removeChild(Q);}else{this.on("appendTo",c);M.on(Q,"click",this._onLabelClick,null,this);this._label=Q;}}this.on("appendTo",this._onAppendTo);var N=this.get("container"),Y=this.get("element"),W=G.inDocument(Y);if(N){if(a&&a!=Y){O=a.parentNode;if(O){O.removeChild(a);}}if(I.isString(N)){M.onContentReady(N,this.appendTo,N,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,N);});}}else{if(!W&&a&&a!=Y){O=a.parentNode;if(O){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:O});O.replaceChild(Y,a);this.fireEvent("appendTo",{type:"appendTo",target:O});}}else{if(this.get("type")!="link"&&W&&a&&a==Y){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||(this.CLASS_NAME_PREFIX+"button-menu")),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});this.setAttributeConfig("replaceLabel",{value:false,validator:I.isBoolean,writeOnce:true});},focus:function(){if(!this.get("disabled")){try{this._button.focus();}catch(N){}}},blur:function(){if(!this.get("disabled")){try{this._button.blur();}catch(N){}}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),N=this._menu,T=this._label,O,S;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);if(T){M.removeListener(T,"click",this._onLabelClick);O=T.parentNode;O.removeChild(T);}var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();O=P.parentNode;if(O){O.removeChild(P);}delete D[this.get("id")];var R=(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);S=G.getElementsByClassName(R,this.NODE_NAME,Q);if(I.isArray(S)&&S.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var R=YAHOO.widget.Button.prototype,T=G.getElementsByClassName((R.CLASS_NAME_PREFIX+R.CSS_CLASS_NAME),"*",N),Q=T.length,S,O,P;if(Q>0){for(P=0;P<Q;P++){O=T[P].id;if(O){S=D[O];if(S){S.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;
+if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CLASS_NAME_PREFIX:"yui-",CSS_CLASS_NAME:"buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CLASS_NAME_PREFIX+this.CSS_CLASS_NAME);var K=(YAHOO.widget.Button.prototype.CLASS_NAME_PREFIX+"radio-button"),J=this.getElementsByClassName(K);if(J.length>0){this.addButtons(J);}function F(L){return(L.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/calendar.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/calendar.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/calendar.js	(revision 24510)
@@ -0,0 +1,15 @@
+
+
+var pagebg = '#add9f5';  // pop-up background colour
+var headbg = '#98AD7E';  // table heading background colour
+var todaybg = '#7DECFF'; // current day of month background colour
+
+// valid range for yy is 1901 to 2100 inclusive or zero for current year
+// valid range for mm is 1 to 12 or zero for current month
+
+function monthlength(month,year) {var dd = new Date(year, month, 0);return dd.getDate();}
+function dispCal(yy,mm) { var dow = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']; var moy = ['January','February','March','April','May','June','July','August','September','October','November','December'];  if (mm < 0 || mm > 12) {alert('month must be between 1 and 12'); return false;} if (yy != 0 && (yy < 1901 || yy > 2100)) {alert('year must be after 1900 and before 2101'); return false;} var calendar = new Date();  var today = calendar.getDate(); calendar.setDate(1); if (yy > 1900) calendar.setFullYear(yy); if (mm > 0) calendar.setMonth(mm - 1); var yy = year = calendar.getFullYear(); var month = calendar.getMonth(); calendar.setDate(today); var weekday = calendar.getDay(); var daysInMonth = monthlength(month+1,year); var hilite_start = '<td width="30" style="background:' + todaybg + '" align="center"><b>'; var td_start = '<td width="30" align="center">'; var cal = '<div id="cal"><div style="border:1pt solid #98AD7E;height:190px;width:238px"><table border="0" cellspacing="0" cellpadding="2"><tr><td colspan="7" style="background:' + headbg + '" align="center"><b>' + moy[month]  + ' ' + year + '</b></td></tr><tr style="height:23px">'; for(dex=0; dex < 7; dex++) {if(weekday == dex) cal += td_start + '<b>' + dow[dex] + '</b></td>'; else cal += td_start + dow[dex] + '</td>';} cal += '</tr><tr style="height:23px">'; var day2 = today; for (dex = today; dex > 6; dex -=7) day2 = dex; weekday -= day2 - 1; while (weekday < 0) weekday += 7; for(dex=0; dex < weekday; dex++) cal += td_start + ' </td>'; for(dex=1; dex <= daysInMonth; dex++) {if(weekday == 7) {cal += '</tr><tr style="height:23px">'; weekday = 0;} if(today==dex) cal += hilite_start + dex + '</b></td>'; else cal += td_start + dex + '</td>'; weekday += 1;} for(dex=weekday; dex < 7; dex++) cal += td_start + ' </td>'; cal += '</tr></table></div>';
+if (document.getElementById && arguments.length == 2) {var mmb = month;  mm = month + 1; var yya = yyb = yy; if (mmb <1) {mmb += 12; yyb--;} var mma = month + 2; if (mma > 12) {mma -= 12; yya++;} var yb = yy -1; var ya = yy +1; cal += '<table border="0" cellspacing="0" cellpadding="2" width="1"><tr><td><a href="#" onclick="if (cala = dispCal('+yb+','+mm+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><<</a></td><td><a href="#" onclick="if (cala = dispCal('+yyb+','+mmb+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}"><</a></td><td align="right"><a href="#" onclick="if (cala = dispCal('+yya+','+mma+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}">></a></td><td align="right"><a href="#" onclick="if (cala = dispCal('+ya+','+mm+')) {document.getElementById(\'cal\').innerHTML = cala; return false;}">>></a></td></tr></table>';} else {cal += '<div> </div>';} cal += '</div>'; return cal;}
+function calendar(yy,mm) {var cal = dispCal(yy,mm); if (!cal) return false; TheNewWin = window.open('','calendar','height=255,width=260,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); TheNewWin.document.write('<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd"><html xmlns="http:\/\/www.w3.org\/1999\/xhtml"><head><title>Calendar<\/title>');
+if (document.getElementById) TheNewWin.document.write('<script>var pagebg = "'+pagebg+'";var headbg = "'+headbg+'";var todaybg = "'+todaybg+'";'+dispCal.toString()+'<\/script>');
+TheNewWin.document.write('<\/head><body style="overflow:hidden;background:'+ pagebg + '">' + cal + '<div style="text-align:center; width:250px"><a href="#" onclick="self.close();return false;">Close Window<\/a><\/div><div style="text-align:center; width:250px;font-size:8px;></a>.</div><\/body><\/html>'); return true;}
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/container_core-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/container_core-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/container_core-min.js	(revision 24510)
@@ -0,0 +1,14 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){YAHOO.util.Config=function(d){if(d){this.init(d);}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE);},checkNumber:function(d){return(!isNaN(d));},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f);}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner);}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value);}},getConfig:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value;}}}return d;},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value;}else{return undefined;}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(d in this.initialConfig){this.setProperty(d,this.initialConfig[d]);return true;}}else{return false;}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true;}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false;}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g]);}return true;}}else{return false;}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false;}else{if(!b.isUndefined(r)){u.value=r;}else{r=u.value;}l=false;k=this.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break;}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r]);}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,d]);this.eventQueue[e]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event&&!b.isUndefined(e.value)){if(this.queueInProgress){this.queueProperty(d);}else{this.fireEvent(d,e.value);}}},applyConfig:function(d,g){var f,e;if(g){e={};for(f in d){if(b.hasOwnProperty(d,f)){e[f.toLowerCase()]=d[f];}}this.initialConfig=e;}for(f in d){if(b.hasOwnProperty(d,f)){this.queueProperty(f,d[f]);}}},refresh:function(){var d;for(d in this.config){if(b.hasOwnProperty(this.config,d)){this.refireEvent(d);}}},fireQueue:function(){var e,h,d,g,f;this.queueInProgress=true;for(e=0;e<this.eventQueue.length;e++){h=this.eventQueue[e];if(h){d=h[0];g=h[1];f=this.config[d];f.value=g;this.eventQueue[e]=null;this.fireEvent(d,g);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(d,e,g,h){var f=this.config[d.toLowerCase()];if(f&&f.event){if(!a.alreadySubscribed(f.event,e,g)){f.event.subscribe(e,g,h);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(d,e,g){var f=this.config[d.toLowerCase()];if(f&&f.event){return f.event.unsubscribe(e,g);}else{return false;}},toString:function(){var d="Config";if(this.owner){d+=" ["+this.owner.toString()+"]";}return d;},outputEventQueue:function(){var d="",g,e,f=this.eventQueue.length;for(e=0;e<f;e++){g=this.eventQueue[e];if(g){d+=g[0]+"="+g[1]+", ";}}return d;},destroy:function(){var e=this.config,d,f;for(d in e){if(b.hasOwnProperty(e,d)){f=e[d];f.event.unsubscribeAll();f.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};a.alreadySubscribed=function(e,h,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true;}}while(g--);}return false;};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(r,q){if(r){this.init(r,q);}else{}};var f=YAHOO.util.Dom,d=YAHOO.util.Config,n=YAHOO.util.Event,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,i=YAHOO.env.ua,h,p,o,e,a={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},j={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};g.IMG_ROOT=null;g.IMG_ROOT_SSL=null;g.CSS_MODULE="yui-module";g.CSS_HEADER="hd";g.CSS_BODY="bd";g.CSS_FOOTER="ft";g.RESIZE_MONITOR_SECURE_URL="javascript:false;";g.RESIZE_MONITOR_BUFFER=1;g.textResizeEvent=new m("textResize");g.forceDocumentRedraw=function(){var q=document.documentElement;if(q){q.className+=" ";q.className=YAHOO.lang.trim(q.className);}};function l(){if(!h){h=document.createElement("div");h.innerHTML=('<div class="'+g.CSS_HEADER+'"></div>'+'<div class="'+g.CSS_BODY+'"></div><div class="'+g.CSS_FOOTER+'"></div>');p=h.firstChild;o=p.nextSibling;e=o.nextSibling;}return h;}function k(){if(!p){l();}return(p.cloneNode(false));}function b(){if(!o){l();}return(o.cloneNode(false));}function c(){if(!e){l();}return(e.cloneNode(false));}g.prototype={constructor:g,element:null,header:null,body:null,footer:null,id:null,imageRoot:g.IMG_ROOT,initEvents:function(){var q=m.LIST;
+this.beforeInitEvent=this.createEvent(a.BEFORE_INIT);this.beforeInitEvent.signature=q;this.initEvent=this.createEvent(a.INIT);this.initEvent.signature=q;this.appendEvent=this.createEvent(a.APPEND);this.appendEvent.signature=q;this.beforeRenderEvent=this.createEvent(a.BEFORE_RENDER);this.beforeRenderEvent.signature=q;this.renderEvent=this.createEvent(a.RENDER);this.renderEvent.signature=q;this.changeHeaderEvent=this.createEvent(a.CHANGE_HEADER);this.changeHeaderEvent.signature=q;this.changeBodyEvent=this.createEvent(a.CHANGE_BODY);this.changeBodyEvent.signature=q;this.changeFooterEvent=this.createEvent(a.CHANGE_FOOTER);this.changeFooterEvent.signature=q;this.changeContentEvent=this.createEvent(a.CHANGE_CONTENT);this.changeContentEvent.signature=q;this.destroyEvent=this.createEvent(a.DESTROY);this.destroyEvent.signature=q;this.beforeShowEvent=this.createEvent(a.BEFORE_SHOW);this.beforeShowEvent.signature=q;this.showEvent=this.createEvent(a.SHOW);this.showEvent.signature=q;this.beforeHideEvent=this.createEvent(a.BEFORE_HIDE);this.beforeHideEvent.signature=q;this.hideEvent=this.createEvent(a.HIDE);this.hideEvent.signature=q;},platform:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("windows")!=-1||q.indexOf("win32")!=-1){return"windows";}else{if(q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("opera")!=-1){return"opera";}else{if(q.indexOf("msie 7")!=-1){return"ie7";}else{if(q.indexOf("msie")!=-1){return"ie";}else{if(q.indexOf("safari")!=-1){return"safari";}else{if(q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(j.VISIBLE.key,{handler:this.configVisible,value:j.VISIBLE.value,validator:j.VISIBLE.validator});this.cfg.addProperty(j.EFFECT.key,{handler:this.configEffect,suppressEvent:j.EFFECT.suppressEvent,supercedes:j.EFFECT.supercedes});this.cfg.addProperty(j.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:j.MONITOR_RESIZE.value});this.cfg.addProperty(j.APPEND_TO_DOCUMENT_BODY.key,{value:j.APPEND_TO_DOCUMENT_BODY.value});},init:function(v,u){var s,w;this.initEvents();this.beforeInitEvent.fire(g);this.cfg=new d(this);if(this.isSecure){this.imageRoot=g.IMG_ROOT_SSL;}if(typeof v=="string"){s=v;v=document.getElementById(v);if(!v){v=(l()).cloneNode(false);v.id=s;}}this.id=f.generateId(v);this.element=v;w=this.element.firstChild;if(w){var r=false,q=false,t=false;do{if(1==w.nodeType){if(!r&&f.hasClass(w,g.CSS_HEADER)){this.header=w;r=true;}else{if(!q&&f.hasClass(w,g.CSS_BODY)){this.body=w;q=true;}else{if(!t&&f.hasClass(w,g.CSS_FOOTER)){this.footer=w;t=true;}}}}}while((w=w.nextSibling));}this.initDefaultConfig();f.addClass(this.element,g.CSS_MODULE);if(u){this.cfg.applyConfig(u,true);}if(!d.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(g);},initResizeMonitor:function(){var r=(i.gecko&&this.platform=="windows");if(r){var q=this;setTimeout(function(){q._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var q,s,u;function w(){g.textResizeEvent.fire();}if(!i.opera){s=f.get("_yuiResizeMonitor");var v=this._supportsCWResize();if(!s){s=document.createElement("iframe");if(this.isSecure&&g.RESIZE_MONITOR_SECURE_URL&&i.ie){s.src=g.RESIZE_MONITOR_SECURE_URL;}if(!v){u=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");s.src="data:text/html;charset=utf-8,"+encodeURIComponent(u);}s.id="_yuiResizeMonitor";s.title="Text Resize Monitor";s.tabIndex=-1;s.setAttribute("role","presentation");s.style.position="absolute";s.style.visibility="hidden";var r=document.body,t=r.firstChild;if(t){r.insertBefore(s,t);}else{r.appendChild(s);}s.style.backgroundColor="transparent";s.style.borderWidth="0";s.style.width="2em";s.style.height="2em";s.style.left="0";s.style.top=(-1*(s.offsetHeight+g.RESIZE_MONITOR_BUFFER))+"px";s.style.visibility="visible";if(i.webkit){q=s.contentWindow.document;q.open();q.close();}}if(s&&s.contentWindow){g.textResizeEvent.subscribe(this.onDomResize,this,true);if(!g.textResizeInitialized){if(v){if(!n.on(s.contentWindow,"resize",w)){n.on(s,"resize",w);}}g.textResizeInitialized=true;}this.resizeMonitor=s;}}},_supportsCWResize:function(){var q=true;if(i.gecko&&i.gecko<=1.8){q=false;}return q;},onDomResize:function(s,r){var q=-1*(this.resizeMonitor.offsetHeight+g.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=q+"px";this.resizeMonitor.style.left="0";},setHeader:function(r){var q=this.header||(this.header=k());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderHeader();}this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},appendToHeader:function(r){var q=this.header||(this.header=k());q.appendChild(r);this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},setBody:function(r){var q=this.body||(this.body=b());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderBody();}this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},appendToBody:function(r){var q=this.body||(this.body=b());q.appendChild(r);this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},setFooter:function(r){var q=this.footer||(this.footer=c());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderFooter();}this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},appendToFooter:function(r){var q=this.footer||(this.footer=c());q.appendChild(r);this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},render:function(s,q){var t=this;function r(u){if(typeof u=="string"){u=document.getElementById(u);
+}if(u){t._addToParent(u,t.element);t.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!q){q=this.element;}if(s){r(s);}else{if(!f.inDocument(this.element)){return false;}}this._renderHeader(q);this._renderBody(q);this._renderFooter(q);this._rendered=true;this.renderEvent.fire();return true;},_renderHeader:function(q){q=q||this.element;if(this.header&&!f.inDocument(this.header)){var r=q.firstChild;if(r){q.insertBefore(this.header,r);}else{q.appendChild(this.header);}}},_renderBody:function(q){q=q||this.element;if(this.body&&!f.inDocument(this.body)){if(this.footer&&f.isAncestor(q,this.footer)){q.insertBefore(this.body,this.footer);}else{q.appendChild(this.body);}}},_renderFooter:function(q){q=q||this.element;if(this.footer&&!f.inDocument(this.footer)){q.appendChild(this.footer);}},destroy:function(q){var r,s=!(q);if(this.element){n.purgeElement(this.element,s);r=this.element.parentNode;}if(r){r.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;g.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(r,q,s){var t=q[0];if(t){if(this.beforeShowEvent.fire()){f.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(this.beforeHideEvent.fire()){f.setStyle(this.element,"display","none");this.hideEvent.fire();}}},configEffect:function(r,q,s){this._cachedEffects=(this.cacheEffects)?this._createEffects(q[0]):null;},cacheEffects:true,_createEffects:function(t){var q=null,u,r,s;if(t){if(t instanceof Array){q=[];u=t.length;for(r=0;r<u;r++){s=t[r];if(s.effect){q[q.length]=s.effect(this,s.duration);}}}else{if(t.effect){q=[t.effect(this,t.duration)];}}}return q;},configMonitorResize:function(s,r,t){var q=r[0];if(q){this.initResizeMonitor();}else{g.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(q,r){if(!this.cfg.getProperty("appendtodocumentbody")&&q===document.body&&q.firstChild){q.insertBefore(r,q.firstChild);}else{q.appendChild(r);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(g,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(p,o){YAHOO.widget.Overlay.superclass.constructor.call(this,p,o);};var i=YAHOO.lang,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,n=YAHOO.util.Event,f=YAHOO.util.Dom,d=YAHOO.util.Config,k=YAHOO.env.ua,b=YAHOO.widget.Overlay,h="subscribe",e="unsubscribe",c="contained",j,a={"BEFORE_MOVE":"beforeMove","MOVE":"move"},l={"X":{key:"x",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:i.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(k.ie==6?true:false),validator:i.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:i.isBoolean,supercedes:["constraintoviewport"]}};b.IFRAME_SRC="javascript:false;";b.IFRAME_OFFSET=3;b.VIEWPORT_OFFSET=10;b.TOP_LEFT="tl";b.TOP_RIGHT="tr";b.BOTTOM_LEFT="bl";b.BOTTOM_RIGHT="br";b.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};b.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};b.CSS_OVERLAY="yui-overlay";b.CSS_HIDDEN="yui-overlay-hidden";b.CSS_IFRAME="yui-overlay-iframe";b.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;b.windowScrollEvent=new m("windowScroll");b.windowResizeEvent=new m("windowResize");b.windowScrollHandler=function(p){var o=n.getTarget(p);if(!o||o===window||o===window.document){if(k.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){b.windowScrollEvent.fire();},1);}else{b.windowScrollEvent.fire();}}};b.windowResizeHandler=function(o){if(k.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){b.windowResizeEvent.fire();},100);}else{b.windowResizeEvent.fire();}};b._initialized=null;if(b._initialized===null){n.on(window,"scroll",b.windowScrollHandler);n.on(window,"resize",b.windowResizeHandler);b._initialized=true;}b._TRIGGER_MAP={"windowScroll":b.windowScrollEvent,"windowResize":b.windowResizeEvent,"textResize":g.textResizeEvent};YAHOO.extend(b,g,{CONTEXT_TRIGGERS:[],init:function(p,o){b.superclass.init.call(this,p);this.beforeInitEvent.fire(b);f.addClass(this.element,b.CSS_OVERLAY);if(o){this.cfg.applyConfig(o,true);}if(this.platform=="mac"&&k.gecko){if(!d.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!d.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(b);},initEvents:function(){b.superclass.initEvents.call(this);var o=m.LIST;this.beforeMoveEvent=this.createEvent(a.BEFORE_MOVE);this.beforeMoveEvent.signature=o;this.moveEvent=this.createEvent(a.MOVE);this.moveEvent.signature=o;},initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);var o=this.cfg;o.addProperty(l.X.key,{handler:this.configX,validator:l.X.validator,suppressEvent:l.X.suppressEvent,supercedes:l.X.supercedes});o.addProperty(l.Y.key,{handler:this.configY,validator:l.Y.validator,suppressEvent:l.Y.suppressEvent,supercedes:l.Y.supercedes});
+o.addProperty(l.XY.key,{handler:this.configXY,suppressEvent:l.XY.suppressEvent,supercedes:l.XY.supercedes});o.addProperty(l.CONTEXT.key,{handler:this.configContext,suppressEvent:l.CONTEXT.suppressEvent,supercedes:l.CONTEXT.supercedes});o.addProperty(l.FIXED_CENTER.key,{handler:this.configFixedCenter,value:l.FIXED_CENTER.value,validator:l.FIXED_CENTER.validator,supercedes:l.FIXED_CENTER.supercedes});o.addProperty(l.WIDTH.key,{handler:this.configWidth,suppressEvent:l.WIDTH.suppressEvent,supercedes:l.WIDTH.supercedes});o.addProperty(l.HEIGHT.key,{handler:this.configHeight,suppressEvent:l.HEIGHT.suppressEvent,supercedes:l.HEIGHT.supercedes});o.addProperty(l.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:l.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:l.AUTO_FILL_HEIGHT.supercedes});o.addProperty(l.ZINDEX.key,{handler:this.configzIndex,value:l.ZINDEX.value});o.addProperty(l.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:l.CONSTRAIN_TO_VIEWPORT.value,validator:l.CONSTRAIN_TO_VIEWPORT.validator,supercedes:l.CONSTRAIN_TO_VIEWPORT.supercedes});o.addProperty(l.IFRAME.key,{handler:this.configIframe,value:l.IFRAME.value,validator:l.IFRAME.validator,supercedes:l.IFRAME.supercedes});o.addProperty(l.PREVENT_CONTEXT_OVERLAP.key,{value:l.PREVENT_CONTEXT_OVERLAP.value,validator:l.PREVENT_CONTEXT_OVERLAP.validator,supercedes:l.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(o,p){this.cfg.setProperty("xy",[o,p]);},hideMacGeckoScrollbars:function(){f.replaceClass(this.element,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){f.replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibility:function(o){f.setStyle(this.element,"visibility",(o)?"visible":"hidden");var p=b.CSS_HIDDEN;if(o){f.removeClass(this.element,p);}else{f.addClass(this.element,p);}},configVisible:function(x,w,t){var p=w[0],B=f.getStyle(this.element,"visibility"),o=this._cachedEffects||this._createEffects(this.cfg.getProperty("effect")),A=(this.platform=="mac"&&k.gecko),y=d.alreadySubscribed,q,v,s,r,u,z;if(B=="inherit"){v=this.element.parentNode;while(v.nodeType!=9&&v.nodeType!=11){B=f.getStyle(v,"visibility");if(B!="inherit"){break;}v=v.parentNode;}if(B=="inherit"){B="visible";}}if(p){if(A){this.showMacGeckoScrollbars();}if(o){if(p){if(B!="visible"||B===""||this._fadingOut){if(this.beforeShowEvent.fire()){z=o.length;for(s=0;s<z;s++){q=o[s];if(s===0&&!y(q.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){q.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}q.animateIn();}}}}}else{if(B!="visible"||B===""){if(this.beforeShowEvent.fire()){this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire();}}else{this._setDomVisibility(true);}}}else{if(A){this.hideMacGeckoScrollbars();}if(o){if(B=="visible"||this._fadingIn){if(this.beforeHideEvent.fire()){z=o.length;for(r=0;r<z;r++){u=o[r];if(r===0&&!y(u.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){u.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}u.animateOut();}}}else{if(B===""){this._setDomVisibility(false);}}}else{if(B=="visible"||B===""){if(this.beforeHideEvent.fire()){this._setDomVisibility(false);this.hideEvent.fire();}}else{this._setDomVisibility(false);}}}},doCenterOnDOMEvent:function(){var o=this.cfg,p=o.getProperty("fixedcenter");if(o.getProperty("visible")){if(p&&(p!==c||this.fitsInViewport())){this.center();}}},fitsInViewport:function(){var s=b.VIEWPORT_OFFSET,q=this.element,t=q.offsetWidth,r=q.offsetHeight,o=f.getViewportWidth(),p=f.getViewportHeight();return((t+s<o)&&(r+s<p));},configFixedCenter:function(s,q,t){var u=q[0],p=d.alreadySubscribed,r=b.windowResizeEvent,o=b.windowScrollEvent;if(u){this.center();if(!p(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center);}if(!p(r,this.doCenterOnDOMEvent,this)){r.subscribe(this.doCenterOnDOMEvent,this,true);}if(!p(o,this.doCenterOnDOMEvent,this)){o.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);r.unsubscribe(this.doCenterOnDOMEvent,this);o.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(r,p,s){var o=p[0],q=this.element;f.setStyle(q,"height",o);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(t,s,p){var v=s[0],q=this.cfg,u="autofillheight",w="height",r=q.getProperty(u),o=this._autoFillOnHeightChange;q.unsubscribeFromConfigEvent(w,o);g.textResizeEvent.unsubscribe(o);this.changeContentEvent.unsubscribe(o);if(r&&v!==r&&this[r]){f.setStyle(this[r],w,"");}if(v){v=i.trim(v.toLowerCase());q.subscribeToConfigEvent(w,o,this[v],this);g.textResizeEvent.subscribe(o,this[v],this);this.changeContentEvent.subscribe(o,this[v],this);q.setProperty(u,v,true);}},configWidth:function(r,o,s){var q=o[0],p=this.element;f.setStyle(p,"width",q);this.cfg.refireEvent("iframe");},configzIndex:function(q,o,r){var s=o[0],p=this.element;if(!s){s=f.getStyle(p,"zIndex");if(!s||isNaN(s)){s=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(s<=0){s=1;}}f.setStyle(p,"zIndex",s);this.cfg.setProperty("zIndex",s,true);if(this.iframe){this.stackIframe();}},configXY:function(q,p,r){var t=p[0],o=t[0],s=t[1];this.cfg.setProperty("x",o);this.cfg.setProperty("y",s);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configX:function(q,p,r){var o=p[0],s=this.cfg.getProperty("y");this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setX(this.element,o,true);this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configY:function(q,p,r){var o=this.cfg.getProperty("x"),s=p[0];this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setY(this.element,s,true);
+this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},showIframe:function(){var p=this.iframe,o;if(p){o=this.element.parentNode;if(o!=p.parentNode){this._addToParent(o,p);}p.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var o=this.iframe,q=this.element,s=b.IFRAME_OFFSET,p=(s*2),r;if(o){o.style.width=(q.offsetWidth+p+"px");o.style.height=(q.offsetHeight+p+"px");r=this.cfg.getProperty("xy");if(!i.isArray(r)||(isNaN(r[0])||isNaN(r[1]))){this.syncPosition();r=this.cfg.getProperty("xy");}f.setXY(o,[(r[0]-s),(r[1]-s)]);}},stackIframe:function(){if(this.iframe){var o=f.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(o)&&!isNaN(o)){f.setStyle(this.iframe,"zIndex",(o-1));}}},configIframe:function(r,q,s){var o=q[0];function t(){var v=this.iframe,w=this.element,x;if(!v){if(!j){j=document.createElement("iframe");if(this.isSecure){j.src=b.IFRAME_SRC;}if(k.ie){j.style.filter="alpha(opacity=0)";j.frameBorder=0;}else{j.style.opacity="0";}j.style.position="absolute";j.style.border="none";j.style.margin="0";j.style.padding="0";j.style.display="none";j.tabIndex=-1;j.className=b.CSS_IFRAME;}v=j.cloneNode(false);v.id=this.id+"_f";x=w.parentNode;var u=x||document.body;this._addToParent(u,v);this.iframe=v;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function p(){t.call(this);this.beforeShowEvent.unsubscribe(p);this._iframeDeferred=false;}if(o){if(this.cfg.getProperty("visible")){t.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(p);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(p,o,q){var r=o[0];if(r){if(!d.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!d.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(u,t,q){var x=t[0],r,o,v,s,p,w=this.CONTEXT_TRIGGERS;if(x){r=x[0];o=x[1];v=x[2];s=x[3];p=x[4];if(w&&w.length>0){s=(s||[]).concat(w);}if(r){if(typeof r=="string"){this.cfg.setProperty("context",[document.getElementById(r),o,v,s,p],true);}if(o&&v){this.align(o,v,p);}if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}if(s){this._processTriggers(s,h,this._alignOnTrigger);this._contextTriggers=s;}}}},_alignOnTrigger:function(p,o){this.align();},_findTriggerCE:function(o){var p=null;if(o instanceof m){p=o;}else{if(b._TRIGGER_MAP[o]){p=b._TRIGGER_MAP[o];}}return p;},_processTriggers:function(s,v,r){var q,u;for(var p=0,o=s.length;p<o;++p){q=s[p];u=this._findTriggerCE(q);if(u){u[v](r,this,true);}else{this[v](q,r);}}},align:function(p,w,s){var v=this.cfg.getProperty("context"),t=this,o,q,u;function r(z,A){var y=null,x=null;switch(p){case b.TOP_LEFT:y=A;x=z;break;case b.TOP_RIGHT:y=A-q.offsetWidth;x=z;break;case b.BOTTOM_LEFT:y=A;x=z-q.offsetHeight;break;case b.BOTTOM_RIGHT:y=A-q.offsetWidth;x=z-q.offsetHeight;break;}if(y!==null&&x!==null){if(s){y+=s[0];x+=s[1];}t.moveTo(y,x);}}if(v){o=v[0];q=this.element;t=this;if(!p){p=v[1];}if(!w){w=v[2];}if(!s&&v[4]){s=v[4];}if(q&&o){u=f.getRegion(o);switch(w){case b.TOP_LEFT:r(u.top,u.left);break;case b.TOP_RIGHT:r(u.top,u.right);break;case b.BOTTOM_LEFT:r(u.bottom,u.left);break;case b.BOTTOM_RIGHT:r(u.bottom,u.right);break;}}}},enforceConstraints:function(p,o,q){var s=o[0];var r=this.getConstrainedXY(s[0],s[1]);this.cfg.setProperty("x",r[0],true);this.cfg.setProperty("y",r[1],true);this.cfg.setProperty("xy",r,true);},_getConstrainedPos:function(y,p){var t=this.element,r=b.VIEWPORT_OFFSET,A=(y=="x"),z=(A)?t.offsetWidth:t.offsetHeight,s=(A)?f.getViewportWidth():f.getViewportHeight(),D=(A)?f.getDocumentScrollLeft():f.getDocumentScrollTop(),C=(A)?b.PREVENT_OVERLAP_X:b.PREVENT_OVERLAP_Y,o=this.cfg.getProperty("context"),u=(z+r<s),w=this.cfg.getProperty("preventcontextoverlap")&&o&&C[(o[1]+o[2])],v=D+r,B=D+s-z-r,q=p;if(p<v||p>B){if(w){q=this._preventOverlap(y,o[0],z,s,D);}else{if(u){if(p<v){q=v;}else{if(p>B){q=B;}}}else{q=v;}}}return q;},_preventOverlap:function(y,w,z,u,C){var A=(y=="x"),t=b.VIEWPORT_OFFSET,s=this,q=((A)?f.getX(w):f.getY(w))-C,o=(A)?w.offsetWidth:w.offsetHeight,p=q-t,r=(u-(q+o))-t,D=false,v=function(){var x;if((s.cfg.getProperty(y)-C)>q){x=(q-z);}else{x=(q+o);}s.cfg.setProperty(y,(x+C),true);return x;},B=function(){var E=((s.cfg.getProperty(y)-C)>q)?r:p,x;if(z>E){if(D){v();}else{v();D=true;x=B();}}return x;};B();return this.cfg.getProperty(y);},getConstrainedX:function(o){return this._getConstrainedPos("x",o);},getConstrainedY:function(o){return this._getConstrainedPos("y",o);},getConstrainedXY:function(o,p){return[this.getConstrainedX(o),this.getConstrainedY(p)];},center:function(){var r=b.VIEWPORT_OFFSET,s=this.element.offsetWidth,q=this.element.offsetHeight,p=f.getViewportWidth(),t=f.getViewportHeight(),o,u;if(s<p){o=(p/2)-(s/2)+f.getDocumentScrollLeft();}else{o=r+f.getDocumentScrollLeft();}if(q<t){u=(t/2)-(q/2)+f.getDocumentScrollTop();}else{u=r+f.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(o,10),parseInt(u,10)]);this.cfg.refireEvent("iframe");if(k.webkit){this.forceContainerRedraw();}},syncPosition:function(){var o=f.getXY(this.element);
+this.cfg.setProperty("x",o[0],true);this.cfg.setProperty("y",o[1],true);this.cfg.setProperty("xy",o,true);},onDomResize:function(q,p){var o=this;b.superclass.onDomResize.call(this,q,p);setTimeout(function(){o.syncPosition();o.cfg.refireEvent("iframe");o.cfg.refireEvent("context");},0);},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(p){var o=null;if(p.ownerDocument&&p.ownerDocument.defaultView){var q=p.ownerDocument.defaultView.getComputedStyle(p,"");if(q){o=parseInt(q.height,10);}}return(i.isNumber(o))?o:null;};}else{return function(p){var o=null;if(p.style.pixelHeight){o=p.style.pixelHeight;}return(i.isNumber(o))?o:null;};}})(),_validateAutoFillHeight:function(o){return(!o)||(i.isString(o)&&b.STD_MOD_RE.test(o));},_autoFillOnHeightChange:function(r,p,q){var o=this.cfg.getProperty("height");if((o&&o!=="auto")||(o===0)){this.fillHeight(q);}},_getPreciseHeight:function(p){var o=p.offsetHeight;if(p.getBoundingClientRect){var q=p.getBoundingClientRect();o=q.bottom-q.top;}return o;},fillHeight:function(r){if(r){var p=this.innerElement||this.element,o=[this.header,this.body,this.footer],v,w=0,x=0,t=0,q=false;for(var u=0,s=o.length;u<s;u++){v=o[u];if(v){if(r!==v){x+=this._getPreciseHeight(v);}else{q=true;}}}if(q){if(k.ie||k.opera){f.setStyle(r,"height",0+"px");}w=this._getComputedHeight(p);if(w===null){f.addClass(p,"yui-override-padding");w=p.clientHeight;f.removeClass(p,"yui-override-padding");}t=Math.max(w-x,0);f.setStyle(r,"height",t+"px");if(r.offsetHeight!=t){t=Math.max(t-(r.offsetHeight-t),0);}f.setStyle(r,"height",t+"px");}}},bringToTop:function(){var s=[],r=this.element;function v(z,y){var B=f.getStyle(z,"zIndex"),A=f.getStyle(y,"zIndex"),x=(!B||isNaN(B))?0:parseInt(B,10),w=(!A||isNaN(A))?0:parseInt(A,10);if(x>w){return -1;}else{if(x<w){return 1;}else{return 0;}}}function q(y){var x=f.hasClass(y,b.CSS_OVERLAY),w=YAHOO.widget.Panel;if(x&&!f.isAncestor(r,y)){if(w&&f.hasClass(y,w.CSS_PANEL)){s[s.length]=y.parentNode;}else{s[s.length]=y;}}}f.getElementsBy(q,"div",document.body);s.sort(v);var o=s[0],u;if(o){u=f.getStyle(o,"zIndex");if(!isNaN(u)){var t=false;if(o!=r){t=true;}else{if(s.length>1){var p=f.getStyle(s[1],"zIndex");if(!isNaN(p)&&(u==p)){t=true;}}}if(t){this.cfg.setProperty("zindex",(parseInt(u,10)+2));}}}},destroy:function(o){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;b.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);b.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);g.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}b.superclass.destroy.call(this,o);},forceContainerRedraw:function(){var o=this;f.addClass(o.element,"yui-force-redraw");setTimeout(function(){f.removeClass(o.element,"yui-force-redraw");},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(g){this.init(g);};var d=YAHOO.widget.Overlay,c=YAHOO.util.Event,e=YAHOO.util.Dom,b=YAHOO.util.Config,f=YAHOO.util.CustomEvent,a=YAHOO.widget.OverlayManager;a.CSS_FOCUSED="focused";a.prototype={constructor:a,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(i){this.cfg=new b(this);this.initDefaultConfig();if(i){this.cfg.applyConfig(i,true);}this.cfg.fireQueue();var h=null;this.getActive=function(){return h;};this.focus=function(j){var k=this.find(j);if(k){k.focus();}};this.remove=function(k){var m=this.find(k),j;if(m){if(h==m){h=null;}var l=(m.element===null&&m.cfg===null)?true:false;if(!l){j=e.getStyle(m.element,"zIndex");m.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));m.hideEvent.unsubscribe(m.blur);m.destroyEvent.unsubscribe(this._onOverlayDestroy,m);m.focusEvent.unsubscribe(this._onOverlayFocusHandler,m);m.blurEvent.unsubscribe(this._onOverlayBlurHandler,m);if(!l){c.removeListener(m.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);m.cfg.setProperty("zIndex",j,true);m.cfg.setProperty("manager",null);}if(m.focusEvent._managed){m.focusEvent=null;}if(m.blurEvent._managed){m.blurEvent=null;}if(m.focus._managed){m.focus=null;}if(m.blur._managed){m.blur=null;}}};this.blurAll=function(){var k=this.overlays.length,j;if(k>0){j=k-1;do{this.overlays[j].blur();}while(j--);}};this._manageBlur=function(j){var k=false;if(h==j){e.removeClass(h.element,a.CSS_FOCUSED);h=null;k=true;}return k;};this._manageFocus=function(j){var k=false;if(h!=j){if(h){h.blur();}h=j;this.bringToTop(h);e.addClass(h.element,a.CSS_FOCUSED);k=true;}return k;};var g=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(g){this.register(g);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(i){var g=c.getTarget(i),h=this.close;if(h&&(g==h||e.isAncestor(h,g))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(h,g,i){this.remove(i);},_onOverlayFocusHandler:function(h,g,i){this._manageFocus(i);},_onOverlayBlurHandler:function(h,g,i){this._manageBlur(i);},_bindFocus:function(g){var h=this;if(!g.focusEvent){g.focusEvent=g.createEvent("focus");g.focusEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.focusEvent.subscribe(h._onOverlayFocusHandler,g,h);}if(!g.focus){c.on(g.element,h.cfg.getProperty("focusevent"),h._onOverlayElementFocus,null,g);g.focus=function(){if(h._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst();}this.focusEvent.fire();}};g.focus._managed=true;}},_bindBlur:function(g){var h=this;if(!g.blurEvent){g.blurEvent=g.createEvent("blur");g.blurEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.blurEvent.subscribe(h._onOverlayBlurHandler,g,h);}if(!g.blur){g.blur=function(){if(h._manageBlur(this)){this.blurEvent.fire();}};g.blur._managed=true;}g.hideEvent.subscribe(g.blur);
+},_bindDestroy:function(g){var h=this;g.destroyEvent.subscribe(h._onOverlayDestroy,g,h);},_syncZIndex:function(g){var h=e.getStyle(g.element,"zIndex");if(!isNaN(h)){g.cfg.setProperty("zIndex",parseInt(h,10));}else{g.cfg.setProperty("zIndex",0);}},register:function(g){var k=false,h,j;if(g instanceof d){g.cfg.addProperty("manager",{value:this});this._bindFocus(g);this._bindBlur(g);this._bindDestroy(g);this._syncZIndex(g);this.overlays.push(g);this.bringToTop(g);k=true;}else{if(g instanceof Array){for(h=0,j=g.length;h<j;h++){k=this.register(g[h])||k;}}}return k;},bringToTop:function(m){var i=this.find(m),l,g,j;if(i){j=this.overlays;j.sort(this.compareZIndexDesc);g=j[0];if(g){l=e.getStyle(g.element,"zIndex");if(!isNaN(l)){var k=false;if(g!==i){k=true;}else{if(j.length>1){var h=e.getStyle(j[1].element,"zIndex");if(!isNaN(h)&&(l==h)){k=true;}}}if(k){i.cfg.setProperty("zindex",(parseInt(l,10)+2));}}j.sort(this.compareZIndexDesc);}}},find:function(g){var l=g instanceof d,j=this.overlays,p=j.length,k=null,m,h;if(l||typeof g=="string"){for(h=p-1;h>=0;h--){m=j[h];if((l&&(m===g))||(m.id==g)){k=m;break;}}}return k;},compareZIndexDesc:function(j,i){var h=(j.cfg)?j.cfg.getProperty("zIndex"):null,g=(i.cfg)?i.cfg.getProperty("zIndex"):null;if(h===null&&g===null){return 0;}else{if(h===null){return 1;}else{if(g===null){return -1;}else{if(h>g){return -1;}else{if(h<g){return 1;}else{return 0;}}}}}},showAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].show();}},hideAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].hide();}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay");}l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);
+this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentBasketDragDrop.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentBasketDragDrop.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentBasketDragDrop.js	(revision 24510)
@@ -0,0 +1,346 @@
+/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
+
+function documentBasketDDStack(id, sGroup) {
+	if (id) {
+		this.init(id, sGroup);
+		this.initFrame();
+	}
+}
+
+documentBasketDDStack.prototype = new YAHOO.util.DDTarget();
+
+documentBasketDDPlayer.TYPE = "documentBasketDDPlayer";
+
+/**
+* @class a YAHOO.util.DDFramed implementation. During the drag over event, the
+* dragged element is inserted before the dragged-over element.
+*
+* @extends YAHOO.util.DDProxy
+* @constructor
+* @param {String} id the id of the linked element
+* @param {String} sGroup the group of related DragDrop objects
+*/
+function documentBasketDDPlayer(id, sGroup, bl) {
+	this.initPlayer(id, sGroup);
+	this.documentList = bl;     
+	
+}
+
+documentBasketDDPlayer.prototype = new YAHOO.util.DDProxy();
+
+documentBasketDDPlayer.prototype.documentList = new Array();
+
+documentBasketDDPlayer.prototype.initPlayer = function(id, sGroup) {
+	if (!id) { return; }
+
+	this.init(id, sGroup);
+	this.initFrame();
+	var s = this.getDragEl().style;
+	s.borderColor = "transparent";
+	// s.backgroundColor = "#cccccc";
+	s.opacity = 0.76;
+	s.filter = "alpha(opacity=76)";
+
+	// specify that this is not currently a drop target
+	this.isTarget = false;
+
+	this.originalStyles = [];
+
+	this.type = documentBasketDDPlayer.TYPE;
+	this.slot = null;
+	this.startPos = YAHOO.util.Dom.getXY( this.getEl() );
+
+}
+
+documentBasketDDPlayer.prototype.startDrag = function(x, y) {
+	
+	var dragEl = this.getDragEl();
+	var clickEl = this.getEl();
+	
+	dragEl.innerHTML = clickEl.innerHTML;
+	//dragEl.className = clickEl.className;
+	//dragEl.style.color = clickEl.style.color;
+	//dragEl.style.backgroundColor = clickEl.style.backgroundColor;
+	//dragEl.style.visibility = clickEl.style.visibility;
+	
+	while (dragEl.hasChildNodes())	{
+		dragEl.removeChild(dragEl.firstChild);
+	}	
+	
+	var img = document.createElement('img');
+	img.src = gs.imageURLs.pageIcon;
+	dragEl.appendChild(img);
+	
+	var added = true;
+
+	var s = clickEl.style;
+	s.opacity = .1;
+	s.filter = "alpha(opacity=10)";
+
+	var targets = YAHOO.util.DDM.getRelated(this, true);
+	
+	for (var i=0; i<targets.length; i++) {
+		
+		var targetEl = this.getTargetDomRef(targets[i]);
+
+		if (!this.originalStyles[targetEl.id]) {
+			this.originalStyles[targetEl.id] = targetEl.className;
+		}
+
+		targetEl.className = "target";
+	}
+	correctDocumentExpandCollapseButtons();
+};
+
+documentBasketDDPlayer.prototype.getTargetDomRef = function(oDD) {
+	if (oDD.player) {
+		return oDD.player.getEl();
+	} else {
+		return oDD.getEl();
+	}
+};
+
+documentBasketDDPlayer.prototype.endDrag = function(e) {
+	// reset the linked element styles
+	var s = this.getEl().style;
+	s.opacity = 1;
+	s.filter = "alpha(opacity=100)";
+
+	this.resetTargets();
+};
+
+documentBasketDDPlayer.prototype.resetTargets = function() {
+
+	// reset the target styles
+	var targets = YAHOO.util.DDM.getRelated(this, true);
+	for (var i=0; i<targets.length; i++) {
+		var targetEl = this.getTargetDomRef(targets[i]);
+		var oldStyle = this.originalStyles[targetEl.id];
+		if (oldStyle) {
+			targetEl.className = oldStyle;
+		}
+	}
+};
+
+var request_type = "GET";
+var docAddurlPath ="?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
+var docDelurlPath ="?a=pr&rt=r&ro=1&s=DeleteDocument&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
+var postdata = null;
+
+documentBasketDDPlayer.prototype.onDragDrop = function(e, id) {
+
+	// get the drag and drop object that was targeted
+	var oDD;
+	var player = this;
+
+	if ("string" == typeof id) {
+		oDD = YAHOO.util.DDM.getDDById(id);
+	} else {
+		oDD = YAHOO.util.DDM.getBestMatch(id);
+	}
+
+
+	var el = this.getEl();
+
+	// check if the slot has a player in it already
+	if (oDD.player) {
+		// check if the dragged player was already in a slot
+		if (this.slot) {
+			// check to see if the player that is already in the
+			// slot can go to the slot the dragged player is in
+			// YAHOO.util.DDM.isLegalTarget is a new method
+			if ( YAHOO.util.DDM.isLegalTarget(oDD.player, this.slot) ) {
+				YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
+				this.slot.player = oDD.player;
+				oDD.player.slot = this.slot;
+			} else {
+				YAHOO.util.Dom.setXY(oDD.player.getEl(), oDD.player.startPos);
+				this.slot.player = null;
+				oDD.player.slot = null
+			}
+		} else {
+			// the player in the slot will be moved to the dragged
+			// players start position
+			//oDD.player.slot = null;
+			//YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
+		}
+	}else {
+		// Move the player into the emply slot
+		// I may be moving off a slot so I need to clear the player ref
+		if (this.slot) {
+			this.slot.player = null;
+		}
+	}
+
+	var  addurl = docAddurlPath + el.id;	
+	var addSuccess = function(o){
+		alert("HERE!" + o.responseText);
+		var result = o.responseXML;
+		var items = result.getElementsByTagName('item');
+		if (items.length > 0){
+			var item = items[0];
+			var documentbasket = YAHOO.util.Dom.get('documentbasket');
+			var documents = YAHOO.util.Dom.get('documentpages');
+			player.documentList[player.documentList.length]= item;     
+			
+			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
+			var parent =el.parentNode;
+			parent.removeChild(el);
+			
+			if (parent !=null && parent.id == "documentbasket"){
+				var root = YAHOO.util.Dom.get(itemID+":root");
+				var section = YAHOO.util.Dom.get(itemID+":section");
+				if(root!=null && root.id.indexOf(itemID) !=-1){
+					parent.removeChild(root);
+				}
+				
+				if(section!=null && section.id.indexOf(itemID) !=-1){
+					parent.removeChild(section);
+				}                                                
+			}
+			
+
+			if (!YAHOO.util.Dom.get('hideview') && player.documentList.length <13){
+				
+				while (documents.hasChildNodes()) {
+					documents.removeChild(documents.firstChild);
+				}
+				
+				for (var i =0; i < player.documentList.length; i++ ){
+					var img = document.createElement('img');
+					img.src = gs.imageURLs.pageIcon;
+					documents.appendChild(img);
+				}
+
+				correctBerryExpandCollapseButtons();
+				
+			}
+			else{
+				
+				
+				if (YAHOO.util.Dom.get('hideview')){
+					
+					var documentBasket  = YAHOO.util.Dom.get('documentbasket');
+					var documents  = YAHOO.util.Dom.get('documents');
+					var doclist = YAHOO.util.Dom.get('doclist'); 
+					var tid = el.id;                                  
+					var documentItem; 
+					var documentElement = document.createElement('li');
+					for (var i in player.documentList){
+						documentItem = player.documentList[i];
+						var id = documentItem.getAttribute('collection')+":"+documentItem.getAttribute('name');
+						if (id == tid){
+							var title = documentItem.getAttribute('title');
+							var root_title = documentItem.getAttribute('root_title');  
+							if (root_title != ""){
+								root_title +=":";
+							}
+							
+							title = root_title+title;	
+							if (title.length > 50){
+								title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+							}
+							
+							documentElement.appendChild(document.createTextNode(title));
+							documentElement.setAttribute("class","documentitem");
+							doclist.appendChild(berryElement);
+							var heightStr =  documentBasket.style.height+"";
+							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;                             
+							documentBasket.style.height = height;
+							documents.style.height = height;
+							break;
+						}
+					}
+				}    
+				
+			}
+		}
+		
+		//Makes sure all the documents on the page are up to date
+		dmcheckout();
+	}
+
+	var addFailure = function(o){ alert("Adding document failed" + o); }
+
+
+	var addcallback = {
+		success:addSuccess,
+		failure:addFailure,  
+		argument:player
+	}
+	
+
+	var  delurl = docDelurlPath + el.id;
+	var delSuccess = function(o){ 
+		var result = o.responseXML;
+		var parent =el.parentNode;
+		var ancestor = parent.parentNode;
+		if (parent == null) return;                   
+
+		ancestor.removeChild(parent);
+		
+		for (var i in player.berryList){
+			var document = player.berryList[i];
+			
+			var id = document['collection']+":"+document['name'];
+			
+			if (id == el.id){
+				player.documentList.splice(i,1);
+				
+				break;
+			}
+
+		}
+
+		if (!parent.hasChildNodes()){
+			var content =  YAHOO.util.Dom.get('content');
+			while (content.hasChildNodes()) {
+				content.removeChild(content.firstChild);
+			}  
+			content.appendChild(document.createTextNode('Your document basket is empty.'));
+		}
+		var trashbin =  YAHOO.util.Dom.get('trashbin');
+		if ( trashbin !=null){
+			trashbin.style.background = "url(\"" + gs.imageURLs.trashFull + "\") 0 0 no-repeat";
+		}
+	}                                       
+	
+
+	var delFailure = function(o){ alert("Deletion failed" + o);}
+
+
+	var delcallback = {
+		success:delSuccess,
+		failure:delFailure,  
+		argument:player
+	}
+	
+	if (id == 'documentbasket'){
+		YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);    		
+	} else {
+		if (id == 'trashbin'){
+			YAHOO.util.Connect.asyncRequest(request_type , delurl , delcallback); 
+		}
+	}
+
+	this.resetTargets();  	
+	this.slot = oDD;	
+	this.slot.player = this;
+};
+
+documentBasketDDPlayer.prototype.swap = function(el1, el2) {
+	var dom = YAHOO.util.Dom;
+	var pos1 = dom.getXY(el1);
+	var pos2 = dom.getXY(el2);
+	dom.setXY(el1, pos2);
+	dom.setXY(el2, pos1);
+};
+
+documentBasketDDPlayer.prototype.onDragOver = function(e, id) {};
+
+documentBasketDDPlayer.prototype.onDrag = function(e, id) {};
+
+
+
+
+
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentbasket.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentbasket.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentbasket.js	(revision 24510)
@@ -0,0 +1,370 @@
+//used to stored the current items in document basket, including collection name, document id and dodument title
+//in the format of collection:id:[title], it is updated when the page is loaded (reloaded) or the user adds
+// new items in the berry basket (see documentBasketDDPlayer.js). It is used to show the contents of the berry basket.
+
+var show = false;
+var docList =  new Array();
+
+var oldHeight=120;
+var oldWidth=140;
+var oldBg;
+
+var dd = new ygDDOnTop('documentbasket');
+dd.setHandleElId('documenthandle');
+
+var dmcheckout = function(){
+
+	if ( document.getElementById('documentbasket') == null ) return;
+	
+	var request_type = "GET";
+	var url = "?a=pr&rt=r&ro=1&s=GetDocuments&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&c=";
+
+	var responseSuccess = function(o){
+		alert(o.responseText);
+		var response = o.responseXML;
+		var size = response.getElementsByTagName('size').item(0).getAttribute('value');
+
+		var items = response.getElementsByTagName('item');
+
+		docList = new Array();
+		for (var i=0;i < items.length ; i++ )
+		{
+			// remove document images from the document basket if it already contains this item
+			var itemID = "documentBasketBook" + items[i].getAttribute('collection') + ":" + items[i].getAttribute('name');
+			var item = YAHOO.util.Dom.get(itemID);
+			if (item != null){
+				var parent = item.parentNode;
+				parent.removeChild(item);
+			}
+			docList[docList.length] = items[i];
+		}
+
+		//add document image into the document basket
+		updateDocumentImages();
+
+		// set document images visible
+		// they are set to be invisible to prevent flickering when first loaded (see documentbasket.css)
+
+		var docs = document.getElementsByTagName('img');
+		new YAHOO.util.DDTarget('documentbasket','documentbox');
+
+		for (var j=0; j < docs.length; j++){
+			var doc = docs[j]; 
+			var parent = doc.parentNode;
+
+			if (doc.id.indexOf("documentBasketBook") != -1){
+				doc.style.visibility = "visible";
+				new documentBasketDDPlayer(doc.id,'documentbox',docList); 
+			}
+		}
+		//updateDocumentCount();
+		correctDocumentExpandCollapseButtons();
+	}
+
+	var responseFailure = function(o){
+		alert("CHECKOUT FAILED");
+	}
+
+	var callback = {
+		success: responseSuccess,
+		failure: responseFailure
+	}
+
+	//var date = new Date();
+	//url += "&rand=" + date.getTime();
+	YAHOO.util.Connect.asyncRequest(request_type , url , callback);
+}
+
+function updateDocumentImages(){
+
+	var docs = YAHOO.util.Dom.get('documentpages');
+	if ( docs == null ) return;
+	
+	while(docs.hasChildNodes())
+	{
+		docs.removeChild(docs.firstChild);
+	}
+	
+	for (var i = 0; i < docList.length && i < 12; i++ ){
+		var img = document.createElement('img');
+		img.src = gs.imageURLs.pageIcon;
+		docs.appendChild(img);
+	}
+
+	//show the help message if there are no docs
+	if ( docList.length == 0 ) {
+		var docHelpMsg = document.createElement('span');
+		docs.appendChild(docHelpMsg);
+		docHelpMsg.appendChild(document.createTextNode('Drop your document/pages here'));
+		docHelpMsg.setAttribute('id','docHelpMsg');
+	}
+
+	//show the expand buttons
+	correctDocumentExpandCollapseButtons();
+
+}
+
+function correctDocumentExpandCollapseButtons() {
+	var dbecl = YAHOO.util.Dom.get('documentBasketExpandCollapseLinks');
+	if ( dbecl == null ) return;
+	if ( docList.length > 0 ) {
+		YAHOO.util.Dom.get('documentBasketExpandCollapseLinks').style.display='';
+	} else {
+		YAHOO.util.Dom.get('documentBasketExpandCollapseLinks').style.display='none';
+	}
+}
+
+function updateDocumentCount() {
+	var docs = YAHOO.util.Dom.get('documentpages');
+	var documentCount = YAHOO.util.Dom.get('documentCount');
+	if ( docs == null || documentCount == null ) return;
+	if ( docList.length == 0 ) {
+		documentCount.innerHTML = "empty";
+	} else {
+		documentCount.innerHTML = docList.length;
+	}
+}
+
+function documentBoxUpdate(e) {
+//alert( arguments.callee );
+	var target = e.target;
+	if ((target.id.toLowerCase() == 'documentbasket' || target.id.toLowerCase() == 'documentpages') && !show){
+		showDocumentBox();
+		show = true;
+	}else{
+		if (target.id.toLowerCase() == 'hideview' && show){
+			hideDocumentBox();
+			show = false;
+		}
+	}
+
+	if (target.className == 'pick'){
+		addDocument(target);
+	}
+}
+
+function showDocumentBox() {
+//alert( arguments.callee );
+	var documentBasket= YAHOO.util.Dom.get('documentbasket');
+	var documentHandle = YAHOO.util.Dom.get('documenthandle');
+	var documentPages = YAHOO.util.Dom.get('documentpages');
+	var width = 500;
+	var height = 40;
+	var i=0;
+
+	//remove berryImages in the berry basket
+	while (documentPages.hasChildNodes()) {
+		documentPages.removeChild(documentPages.firstChild);
+	}
+	while (documentHandle.hasChildNodes()) {
+		documentHandle.removeChild(documentHandle.firstChild);
+	}
+	
+	var div = document.createElement('div');
+	documentPages.appendChild(div);
+	var list = document.createElement('ol');
+	div.appendChild(list);
+	
+	list.id = 'doclist';
+
+	//put the document pages in
+	for (i; i < docList.length; i++){
+		var documentItem = docList[i];
+		var documentElement = document.createElement('li');
+		list.appendChild(documentElement);
+		var title = documentItem.getAttribute('title');
+		var root_title = documentItem.getAttribute('root_title');
+		//var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
+
+		if (root_title != ""){
+			root_title +=":";
+		}
+
+		title = root_title+title;
+		if (title.length > 50){
+			title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+		}
+		
+		documentElement.setAttribute("class","documentitem");
+		documentElement.setAttribute("title",title);
+		documentElement.innerHTML = title;
+		height +=40;
+	}
+
+	oldHeight = documentBasket.style.height;
+	oldWidth = documentBasket.style.width;
+	oldBg = documentBasket.style.background;
+
+	documentBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
+	documentBasket.style.cursor = "default";
+	documentBasket.className = "show";
+
+	//put the full view link in
+	var fullView = document.createElement('a');
+	documentPages.appendChild(fullView);
+	
+	//Find the collection in the cgi parameters
+	var url = window.location.href;
+	var colstart = url.indexOf("&c=");
+	var collectionName = "";
+	if (colstart != -1)
+	{
+		var colend = url.indexOf("&", (colstart + 1));
+		if (colend == -1)
+		{
+			colend = url.length - 1;
+		}
+		collectionName = url.substring(colstart + 3, colend);
+	}
+	
+	fullView.appendChild(document.createTextNode('Full View Â»'));
+	fullView.setAttribute("href","?a=g&sa=documentbasket&c=&s=DisplayDocumentList&rt=r&p.c=" + collectionName);
+	fullView.setAttribute("id","documentpagesFullViewLink");
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('documentBasketExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('documentBasketCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = 'none';
+		collapseLink.style.display = '';
+	}
+
+}
+
+function hideDocumentBox() {
+//alert( arguments.callee );
+	var i = 0;
+	var documentBasket = YAHOO.util.Dom.get('documentbasket');
+	var documentHandle = YAHOO.util.Dom.get('documenthandle');
+	var documentPages = YAHOO.util.Dom.get('documentpages');
+	documentBasket.style.height = oldHeight;
+	documentBasket.style.width = oldWidth;
+	documentBasket.style.background = oldBg;
+	documentBasket.style.cursor = "pointer";
+	documentBasket.className = "hide";
+
+	while (documentPages.hasChildNodes()) {
+		documentPages.removeChild(documentPages.firstChild);
+	}
+
+	while (documentHandle.hasChildNodes()) {
+		documentHandle.removeChild(documentHandle.firstChild);
+	}
+
+	updateDocumentImages();
+	//updateDocumentCount();
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('documentBasketExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('documentBasketCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = '';
+		collapseLink.style.display = 'none';
+	}
+	
+}
+
+
+function addDocument(el){
+	var addurl = "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=" + el.id;
+
+	var addSuccess = function(o){
+		var result = o.responseXML;
+		var items = result.getElementsByTagName('item');
+
+		if (items.length < 0){
+
+			var item = items[0];
+			var documentbasket = YAHOO.util.Dom.get('documentbasket');
+			var documentPages = YAHOO.util.Dom.get('documentpages');
+			docList[docList.length]= item;
+			var parent =el.parentNode;
+			if (parent == null) return;
+			parent.removeChild(el);
+			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
+			//added
+			if (parent !=null && parent.id == "documentberries"){
+
+				var root = YAHOO.util.Dom.get(itemID+":root");
+				var section = YAHOO.util.Dom.get(itemID+":section");
+
+				if(root!=null && root.id.indexOf(itemID) !=-1){
+					parent.removeChild(root);
+				}
+
+				if(section!=null && section.id.indexOf(itemID) !=-1){
+					parent.removeChild(section);
+				}
+
+			}
+
+			if (!YAHOO.util.Dom.get('hideview') && docList.length < 13){
+
+				while (documentpages.hasChildNodes()) {
+					documentpages.removeChild(documentpages.firstChild);
+				}
+
+				for (var i =0; i < docList.length; i++ ){
+					var img = document.createElement('img');
+					img.src = gs.imageURLs.pageIcon;
+					documentpages.appendChild(img);
+				}
+
+			}  else {
+
+				if (YAHOO.util.Dom.get('hideview')){
+					var documentBasket = YAHOO.util.Dom.get('documentbasket');
+					var documentPages = YAHOO.util.Dom.get('documentpages');
+					var doclist = YAHOO.util.Dom.get('doclist');
+					var tid = el.id;
+					var documentItem;
+					var documentElement = document.createElement('li');
+
+					for (var i in docList){
+						documentItem = docList[i];
+						var id = documentItem.getAttribute('collection')+":"+documentItem.getAttribute('name');
+
+						if (id == tid){
+							var title = documentItem.getAttribute('title');
+							var root_title = documentItem.getAttribute('root_title');
+							if (root_title != ""){
+								root_title +=":";
+							}
+
+							title = root_title+title;
+							if (title.length > 50){
+								title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+							}
+
+							documentElement.appendChild(document.createTextNode(title));
+							documentElement.setAttribute("class","documentitem");
+							doclist.appendChild(documentElement);
+							var heightStr = documentBasket.style.height+"";
+							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;
+							documentBasket.style.height = height;
+							documentPages.style.height = height;
+							break;
+						}
+
+					}
+
+				}
+
+			}
+		}
+	}
+
+	var addFailure = function(o){
+	}
+
+	var addcallback = {
+		success:addSuccess,
+		failure:addFailure
+	}
+	
+	YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);
+}
+
+YAHOO.util.Event.addListener(window, 'load', dmcheckout);
+//YAHOO.util.Event.addListener(window, 'click', documentBoxUpdate);
+
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentcheckout.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentcheckout.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentcheckout.js	(revision 24510)
@@ -0,0 +1,455 @@
+var docList = new Array();
+var urlonly = false;
+var mailinfo = new Array();
+mailinfo['address'] = "To: ";
+mailinfo['cc'] = "CC: ";
+mailinfo['bcc'] = "Bcc: ";
+mailinfo['subject'] = "Subject: ";
+var textwin;
+var mailwin;
+
+var options = new Array(3);
+options[0] = 'fullview';
+options[1] = 'textview';
+options[2] = 'email';
+
+function navigate(e){
+	
+	var target = this;
+
+	if ( target.id.toLowerCase() == '' ) {
+		target = target.parentNode;
+	}
+
+	if (target.id.toLowerCase() == 'fullview'){
+		documentCheckoutHighlight( 'fullview' );
+		showFullView();
+	}
+
+	if (target.id.toLowerCase() == 'textview'){
+		documentCheckoutHighlight( 'textview' );
+		showTextView();
+	}
+
+	if (target.id.toLowerCase() == 'email'){
+		documentCheckoutHighlight( 'email' );
+		showEmail();
+	}
+
+	if (target.id.toLowerCase() == 'sendmail'){
+		sendMail();
+	}
+
+	if (target.id.toLowerCase() == 'urlcheck' && urlonly){
+		var urlcheck = YAHOO.util.Dom.get('urlcheck');
+		urlcheck.src = 'interfaces/default/images/check3.gif';
+		var parea =YAHOO.util.Dom.get('pretextarea');
+		urlonly = false;
+		
+		this.value='URL only view';
+		
+		populateUrlsAndMetadata(parea);
+		return;
+	}
+
+	if (target.id.toLowerCase() == 'urlcheck' && !urlonly ){
+		var urlcheck = YAHOO.util.Dom.get('urlcheck');
+		urlcheck.src = 'interfaces/default/images/check4.gif';
+		var parea =YAHOO.util.Dom.get('pretextarea');
+		populateUrls(parea);
+		urlonly = true;
+		
+		this.value='URL and Metadata view';
+		
+		return;
+	}
+
+	if (target.id.toLowerCase() == 'extextview' ){
+		if (textwin != null){
+			textwin.close();
+		}
+
+		textwin = window.open("","Document Basket plain text view","status=1,width=450,height=300");
+		textwin.moveTo(0,0);
+		var content = document.createElement('div');
+		buildPreview(content);
+		var body = textwin.document.getElementsByTagName('body')[0]; 
+		body.appendChild(content);
+		var prearea = textwin.document.getElementsByTagName('textarea')[0];
+		prearea.cols = '55';
+		prearea.rows = '15';
+	}
+
+	if (target.id.toLowerCase() == 'exemail' ){
+		if (mailwin != null){
+			mailwin.close();
+		}
+		mailwin = window.open("","Document Basket mail to a friend","status=1,width=450,height=350");
+		mailwin.moveTo(0,0);
+		var content = document.createElement('div');
+		getEmailContent(content);
+		var body = mailwin.document.getElementsByTagName('body')[0];
+		body.appendChild(content);
+		var prearea = mailwin.document.getElementsByTagName('textarea')[0];
+		prearea.cols = '50';
+		prearea.rows = '11';
+	}
+}
+
+function pageLoad(){
+	for(var j = 0; j < options.length; j++)
+	{
+		var ele = document.getElementById(options[j]);
+		YAHOO.util.Event.addListener(ele, 'click', navigate);
+	}
+	
+	showFullView();
+}
+
+function showFullView(){
+
+	var content =  YAHOO.util.Dom.get('documentBasketContent');
+	var fullview =  YAHOO.util.Dom.get('fullview');
+	docuemtnCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Document Basket is empty."));
+		return;
+	}
+
+	var trashbin = document.createElement('div');
+	trashbin.id ='trashbin';
+
+	var binhandle = document.createElement('div');
+	binhandle.id = 'binhandle';
+	binhandle.appendChild(document.createElement('span'));
+	trashbin.appendChild(binhandle);
+	content.appendChild(trashbin);
+
+	var dd = new ygDDOnTop('trashbin');
+	dd.setHandleElId('binhandle');
+	new YAHOO.util.DDTarget('trashbin','trash');
+
+	var dlist = document.createElement('div');
+	content.appendChild(dlist);
+	var ol = document.createElement('ol');
+	dlist.appendChild(ol);
+
+	for (var i in docList){
+		var doc = docList[i];
+		var li = document.createElement('li');
+		var a = document.createElement('a');
+		var img = document.createElement('img');
+		var text ="";
+		
+		img.setAttribute("src", gs.imageURLs.pageIcon);
+		img.setAttribute("id", doc['collection']+":"+ doc['name']);
+		img.setAttribute("height", "15px");
+		img.setAttribute("width", "15px");
+		li.appendChild(img);
+		
+		a.href ="?a=d&c="+doc['collection']+"&d="+doc['name'];
+		
+		if(window.interfaceName && window.interfaceName == "dev")
+		{
+			a.href +="&dt=hierarchy&ed=1";
+		}
+		
+		a.appendChild(document.createTextNode(doc['title'])); 
+		if (doc['root_title'] != ""){
+			li.appendChild(document.createTextNode(doc['root_title']+": ")); 
+		}
+		li.appendChild(a);
+
+		var metadata = "";
+		for (var metaItem in doc && metaItem != 'title'){
+			metadata = "\n"+metaItem+": "+ doc[metaItem]+"\n";
+		}
+		text +=metadata+"\n";
+		li.appendChild(document.createTextNode(text));
+		li.className = 'documentdoc';
+		ol.appendChild(li);
+		new ygDDPlayer(img.id,'trash',docList);
+	}
+
+	/**
+	var extra = document.createElement('div');
+	var textview = document.createElement('span');
+	textview.id = 'extextview';
+	textview.className = 'extralink';
+	textview.appendChild(document.createTextNode("plain text version"));
+	var email = document.createElement('span');
+	email.appendChild(document.createTextNode("email to a friend"));
+	email.id = 'exemail';
+	email.className = 'extralink';
+	extra.appendChild(textview);
+	extra.appendChild(email);
+	content.appendChild(extra);
+	**/
+	//alert('x');
+
+}
+
+function showTextView(){
+
+	var content = YAHOO.util.Dom.get('documentBasketContent');
+	var textview = YAHOO.util.Dom.get('textview');
+
+	documentCheckoutPageClear();
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Document Basket is empty."));
+		return;
+	}
+	buildPreview(content);
+
+}
+
+function getEmailContent(content){
+	var item ;
+	var tr;
+	var td;
+	var input;
+
+	table = document.createElement('table');
+	table.setAttribute("class","mailtable");
+
+	for (item in mailinfo){
+		tr = document.createElement('tr');
+		td = document.createElement('td');
+		td.setAttribute("class","mailitem");
+		td.appendChild(document.createTextNode(mailinfo[item]));
+		tr.appendChild(td);
+		td = document.createElement('td');
+		input = document.createElement('input');
+		input.setAttribute("id", item);
+		input.setAttribute("class", "mailinput");
+		input.setAttribute("type", "text");
+		td.appendChild(input);
+		tr.appendChild(td);
+		table.appendChild(tr);
+	}
+
+	// an empty line
+	tr = document.createElement('tr');
+	td = document.createElement('td');
+	td.appendChild(document.createElement('br'));
+	tr.appendChild(td);
+	table.appendChild(tr);
+
+	content.appendChild(table);
+
+	buildPreview(content);
+
+	//send button
+	input = document.createElement('input');
+	input.setAttribute("id", 'sendmail');
+	input.setAttribute("class", "sendbutton");
+	input.setAttribute("type", "button");
+	input.setAttribute("value", "send");
+	content.appendChild(input);
+}
+
+function showEmail(){
+	var content = YAHOO.util.Dom.get('documentBasketContent');
+	var email = YAHOO.util.Dom.get('email');
+
+	berryCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Document Basket is empty."));
+		return;
+	}
+
+	var item;
+	var tr;
+	var td;
+	var input;
+
+	table = document.createElement('table');
+	table.setAttribute("class","mailtable");
+
+	for (item in mailinfo){
+		tr = document.createElement('tr');
+		td = document.createElement('td');
+		td.setAttribute("class","mailitem");
+		td.appendChild(document.createTextNode(mailinfo[item]));
+		tr.appendChild(td);
+
+		td = document.createElement('td');
+		input = document.createElement('input');
+		input.setAttribute("id", item);
+		input.setAttribute("class", "mailinput");
+		input.setAttribute("type", "text");
+		td.appendChild(input);
+		tr.appendChild(td);
+		table.appendChild(tr);
+
+	}
+
+	// an empty line
+	tr = document.createElement('tr');
+	td = document.createElement('td');
+	td.appendChild(document.createElement('br'));
+	tr.appendChild(td);
+	table.appendChild(tr);
+
+	content.appendChild(table);
+
+	buildPreview(content);
+
+	//send button
+	input = document.createElement('input');
+	input.setAttribute("id", 'sendmail');
+	input.setAttribute("class", "sendbutton");
+	input.setAttribute("type", "button");
+	input.setAttribute("value", "send");
+	content.appendChild(input);
+	
+	YAHOO.util.Event.addListener(input, 'click', navigate);
+}
+
+function buildPreview(parent){
+
+	var div = document.createElement('div');
+	var cb = document.createElement('input');
+	cb.setAttribute('class', 'sendbutton');
+	cb.type = 'button';
+	cb.id = 'urlcheck';
+	if (urlonly)
+	{
+		cb.value='URL and Metadata view';
+	}
+	else
+	{
+		cb.value='URL only view';
+	}
+
+	YAHOO.util.Event.addListener(cb, 'click', navigate);
+	
+	var img = document.createElement('img');
+	img.src = 'interfaces/default/images/check3.gif';
+	img.id = 'urlcheck';
+	div.appendChild(cb);
+	//div.appendChild(img);
+
+	var urls = document.createElement('span');
+	urls.id = 'urls';
+	urls.className = 'documentcheck';
+	//urls.appendChild(document.createTextNode('URL only'));
+	div.appendChild(urls);
+
+	// var urlsmetadata = document.createElement('span');
+	// urlsmetadata.id = 'urlsmetadata'
+	// urlsmetadata.className = 'berryradio';
+	// urlsmetadata.appendChild(document.createTextNode('URLs and Metadata'));
+	// div.appendChild(urlsmetadata);
+
+	parent.appendChild(div);
+
+	var parea = document.createElement('textarea');
+	parea.id = 'pretextarea';
+
+	parent.appendChild(parea);
+
+	if(urlonly)
+	{
+		populateUrls(parea);
+	}
+	else
+	{
+		populateUrlsAndMetadata(parea);
+	}
+}
+
+function populateUrls(parea){
+
+	var urls="";
+	var doc_url = document.URL;
+	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
+
+	for (var i in docList){
+		var doc = docList[i];
+		urls +=root_url+"?a=d&c="+doc["collection"]+"&d="+doc["name"]+"\n\n";
+	}
+
+	parea.value = urls;
+
+}
+
+function populateUrlsAndMetadata(parea){
+
+	var doc_url = document.URL;
+	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
+	var fulltext="";
+
+	for (var i in docList){
+		var doc = docList[i];
+		var url =root_url+"?a=d&c="+doc['collection']+"&d="+doc['name']+"\n";
+		for (var metaItem in doc){
+			var metadata = metaItem+": "+ doc[metaItem]+"\n";
+		}
+		fulltext +=url+metadata+"\n";
+	}
+
+	parea.value = fulltext;
+
+}
+
+function sendMail(){
+	var url = "?a=pr&rt=r&ro=1&s=SendMail&c=";
+	var request_type = "POST";
+	var postdata = "";
+	var i;
+	//get checked items
+	for (i in mailinfo) {
+		var input = YAHOO.util.Dom.get(i);
+		var value = input.value;
+		postdata +="&s1."+i+"="+value;
+	}
+
+	var content = YAHOO.util.Dom.get('pretextarea').value;
+
+	content = content.replace(/&/g,'-------');
+	postdata +="&s1.content="+content;
+
+	var callback = {
+		success: function(o) {
+			var result = o.responseText;
+			alert("Sending mail Succeeded");
+		} ,
+		failure: function(o) {
+			alert("Sending mail falied");
+		}
+	}
+	YAHOO.util.Connect.asyncRequest(request_type , url , callback, postdata);
+}	
+
+function documentCheckoutPageClear() {
+	var bbc = document.getElementById('documentBasketContent');
+	if ( bbc == null ) return;
+	bbc.innerHTML = '';
+}
+
+function documentCheckoutHighlight( id ) {
+
+	for ( var i=0; i<options.length; i++ ) {
+		var option = document.getElementById( options[i] );
+		if ( option != null ) {
+			if ( id == options[i] ) {
+				//YAHOO.util.Dom.addClass( option, 'current' );
+				option.className='current';
+			} else {
+				//YAHOO.util.Dom.removeClass( option, 'current' );
+				option.className='';
+			}
+		}
+	}
+
+	if ( option == null ) return;
+	option.style.className = 'current';
+
+}
+
+YAHOO.util.Event.addListener(window,'load', pageLoad);
+
+
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-debug.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-debug.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-debug.js	(revision 24510)
@@ -0,0 +1,9562 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    /**
+     * @module editor    
+     * @description <p>Creates a rich custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p>
+     * @class ToolbarButtonAdvanced
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event, container_core, menu, button
+     * 
+     * Provides a toolbar button based on the button and menu widgets.
+     * @constructor
+     * @class ToolbarButtonAdvanced
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    if (YAHOO.widget.Button) {
+        YAHOO.widget.ToolbarButtonAdvanced = YAHOO.widget.Button;
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType = 'rich';
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue = function(value) {
+            var _menuItems = this.getMenu().getItems();
+            if (_menuItems.length === 0) {
+                this.getMenu()._onBeforeShow();
+                _menuItems = this.getMenu().getItems();
+            }
+            for (var i = 0; i < _menuItems.length; i++) {
+                _menuItems[i].cfg.setProperty('checked', false);
+                if (_menuItems[i].value == value) {
+                    _menuItems[i].cfg.setProperty('checked', true);
+                }
+            }      
+        };
+    } else {
+        YAHOO.widget.ToolbarButtonAdvanced = function() {};
+    }
+
+
+    /**
+     * @description <p>Creates a basic custom Toolbar Button. Primarily used with the Rich Text Editor's Toolbar</p><p>Provides a toolbar button based on the button and menu widgets, &lt;select&gt; elements are used in place of menu's.</p>
+     * @class ToolbarButton
+     * @namespace YAHOO.widget
+     * @requires yahoo, dom, element, event
+     * @extends YAHOO.util.Element
+     * 
+     * 
+     * @constructor
+     * @param {String/HTMLElement} el The element to turn into a button.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+
+    YAHOO.widget.ToolbarButton = function(el, attrs) {
+        YAHOO.log('ToolbarButton Initalizing', 'info', 'ToolbarButton');
+        YAHOO.log(arguments.length + ' arguments passed to constructor', 'info', 'Toolbar');
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = (attrs || {});
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+
+        if (!oConfig.attributes.type) {
+            oConfig.attributes.type = 'push';
+        }
+        
+        oConfig.element = document.createElement('span');
+        oConfig.element.setAttribute('unselectable', 'on');
+        oConfig.element.className = 'yui-button yui-' + oConfig.attributes.type + '-button';
+        oConfig.element.innerHTML = '<span class="first-child"><a href="#">LABEL</a></span>';
+        oConfig.element.firstChild.firstChild.tabIndex = '-1';
+        oConfig.attributes.id = (oConfig.attributes.id || Dom.generateId());
+        oConfig.element.id = oConfig.attributes.id;
+
+        YAHOO.widget.ToolbarButton.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+    YAHOO.extend(YAHOO.widget.ToolbarButton, YAHOO.util.Element, {
+        /**
+        * @property buttonType
+        * @private
+        * @description Tells if the Button is a Rich Button or a Simple Button
+        */
+        buttonType: 'normal',
+        /**
+        * @method _handleMouseOver
+        * @private
+        * @description Adds classes to the button elements on mouseover (hover)
+        */
+        _handleMouseOver: function() {
+            if (!this.get('disabled')) {
+                this.addClass('yui-button-hover');
+                this.addClass('yui-' + this.get('type') + '-button-hover');
+            }
+        },
+        /**
+        * @method _handleMouseOut
+        * @private
+        * @description Removes classes from the button elements on mouseout (hover)
+        */
+        _handleMouseOut: function() {
+            this.removeClass('yui-button-hover');
+            this.removeClass('yui-' + this.get('type') + '-button-hover');
+        },
+        /**
+        * @method checkValue
+        * @param {String} value The value of the option that we want to mark as selected
+        * @description Select an option by value
+        */
+        checkValue: function(value) {
+            if (this.get('type') == 'menu') {
+                var opts = this._button.options;
+                if (opts) {
+                    for (var i = 0; i < opts.length; i++) {
+                        if (opts[i].value == value) {
+                            opts.selectedIndex = i;
+                        }
+                    }
+                }
+            }
+        },
+        /** 
+        * @method init
+        * @description The ToolbarButton class's initialization method
+        */        
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.ToolbarButton.superclass.init.call(this, p_oElement, p_oAttributes);
+
+            this.on('mouseover', this._handleMouseOver, this, true);
+            this.on('mouseout', this._handleMouseOut, this, true);
+            this.on('click', function(ev) {
+                Event.stopEvent(ev);
+                return false;
+            }, this, true);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */        
+        initAttributes: function(attr) {
+            YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this, attr);
+            /**
+            * @attribute value
+            * @description The value of the button
+            * @type String
+            */            
+            this.setAttributeConfig('value', {
+                value: attr.value
+            });
+            /**
+            * @attribute menu
+            * @description The menu attribute, see YAHOO.widget.Button
+            * @type Object
+            */            
+            this.setAttributeConfig('menu', {
+                value: attr.menu || false
+            });
+            /**
+            * @attribute type
+            * @description The type of button to create: push, menu, color, select, spin
+            * @type String
+            */            
+            this.setAttributeConfig('type', {
+                value: attr.type,
+                writeOnce: true,
+                method: function(type) {
+                    var el, opt;
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    switch (type) {
+                        case 'select':
+                        case 'menu':
+                            el = document.createElement('select');
+                            el.id = this.get('id');
+                            var menu = this.get('menu');
+                            for (var i = 0; i < menu.length; i++) {
+                                opt = document.createElement('option');
+                                opt.innerHTML = menu[i].text;
+                                opt.value = menu[i].value;
+                                if (menu[i].checked) {
+                                    opt.selected = true;
+                                }
+                                el.appendChild(opt);
+                            }
+                            this._button.parentNode.replaceChild(el, this._button);
+                            Event.on(el, 'change', this._handleSelect, this, true);
+                            this._button = el;
+                            break;
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Set the button into a disabled state
+            * @type String
+            */            
+            this.setAttributeConfig('disabled', {
+                value: attr.disabled || false,
+                method: function(disabled) {
+                    if (disabled) {
+                        this.addClass('yui-button-disabled');
+                        this.addClass('yui-' + this.get('type') + '-button-disabled');
+                    } else {
+                        this.removeClass('yui-button-disabled');
+                        this.removeClass('yui-' + this.get('type') + '-button-disabled');
+                    }
+                    if ((this.get('type') == 'menu') || (this.get('type') == 'select')) {
+                        this._button.disabled = disabled;
+                    }
+                }
+            });
+
+            /**
+            * @attribute label
+            * @description The text label for the button
+            * @type String
+            */            
+            this.setAttributeConfig('label', {
+                value: attr.label,
+                method: function(label) {
+                    if (!this._button) {
+                        this._button = this.get('element').getElementsByTagName('a')[0];
+                    }
+                    if (this.get('type') == 'push') {
+                        this._button.innerHTML = label;
+                    }
+                }
+            });
+
+            /**
+            * @attribute title
+            * @description The title of the button
+            * @type String
+            */            
+            this.setAttributeConfig('title', {
+                value: attr.title
+            });
+
+            /**
+            * @config container
+            * @description The container that the button is rendered to, handled by Toolbar
+            * @type String
+            */            
+            this.setAttributeConfig('container', {
+                value: null,
+                writeOnce: true,
+                method: function(cont) {
+                    this.appendTo(cont);
+                }
+            });
+
+        },
+        /** 
+        * @private
+        * @method _handleSelect
+        * @description The event fired when a change event gets fired on a select element
+        * @param {Event} ev The change event.
+        */        
+        _handleSelect: function(ev) {
+            var tar = Event.getTarget(ev);
+            var value = tar.options[tar.selectedIndex].value;
+            this.fireEvent('change', {type: 'change', value: value });
+        },
+        /** 
+        * @method getMenu
+        * @description A stub function to mimic YAHOO.widget.Button's getMenu method
+        */        
+        getMenu: function() {
+            return this.get('menu');
+        },
+        /** 
+        * @method destroy
+        * @description Destroy the button
+        */        
+        destroy: function() {
+            Event.purgeElement(this.get('element'), true);
+            this.get('element').parentNode.removeChild(this.get('element'));
+            //Brutal Object Destroy
+            for (var i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }       
+        },
+        /** 
+        * @method fireEvent
+        * @description Overridden fireEvent method to prevent DOM events from firing if the button is disabled.
+        */        
+        fireEvent: function(p_sType, p_aArgs) {
+            //  Disabled buttons should not respond to DOM events
+            if (this.DOM_EVENTS[p_sType] && this.get('disabled')) {
+                Event.stopEvent(p_aArgs);
+                return;
+            }
+        
+            YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this, p_sType, p_aArgs);
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */        
+        toString: function() {
+            return 'ToolbarButton (' + this.get('id') + ')';
+        }
+        
+    });
+})();
+/**
+ * @module editor
+ * @description <p>Creates a rich Toolbar widget based on Button. Primarily used with the Rich Text Editor</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbarbutton
+ * @optional container_core, dragdrop
+ */
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang;
+    
+    var getButton = function(id) {
+        var button = id;
+        if (Lang.isString(id)) {
+            button = this.getButtonById(id);
+        }
+        if (Lang.isNumber(id)) {
+            button = this.getButtonByIndex(id);
+        }
+        if ((!(button instanceof YAHOO.widget.ToolbarButton)) && (!(button instanceof YAHOO.widget.ToolbarButtonAdvanced))) {
+            button = this.getButtonByValue(id);
+        }
+        if ((button instanceof YAHOO.widget.ToolbarButton) || (button instanceof YAHOO.widget.ToolbarButtonAdvanced)) {
+            return button;
+        }
+        return false;
+    };
+
+    /**
+     * Provides a rich toolbar widget based on the button and menu widgets
+     * @constructor
+     * @class Toolbar
+     * @extends YAHOO.util.Element
+     * @param {String/HTMLElement} el The element to turn into a toolbar.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    YAHOO.widget.Toolbar = function(el, attrs) {
+        YAHOO.log('Toolbar Initalizing', 'info', 'Toolbar');
+        YAHOO.log(arguments.length + ' arguments passed to constructor', 'info', 'Toolbar');
+        
+        if (Lang.isObject(arguments[0]) && !Dom.get(el).nodeType) {
+            attrs = el;
+        }
+        var local_attrs = {};
+        if (attrs) {
+            Lang.augmentObject(local_attrs, attrs); //Break the config reference
+        }
+        
+
+        var oConfig = {
+            element: null,
+            attributes: local_attrs
+        };
+        
+        
+        if (Lang.isString(el) && Dom.get(el)) {
+            oConfig.element = Dom.get(el);
+        } else if (Lang.isObject(el) && Dom.get(el) && Dom.get(el).nodeType) {  
+            oConfig.element = Dom.get(el);
+        }
+        
+
+        if (!oConfig.element) {
+            YAHOO.log('No element defined, creating toolbar container', 'warn', 'Toolbar');
+            oConfig.element = document.createElement('DIV');
+            oConfig.element.id = Dom.generateId();
+            
+            if (local_attrs.container && Dom.get(local_attrs.container)) {
+                YAHOO.log('Container found in config appending to it (' + Dom.get(local_attrs.container).id + ')', 'info', 'Toolbar');
+                Dom.get(local_attrs.container).appendChild(oConfig.element);
+            }
+        }
+        
+
+        if (!oConfig.element.id) {
+            oConfig.element.id = ((Lang.isString(el)) ? el : Dom.generateId());
+            YAHOO.log('No element ID defined for toolbar container, creating..', 'warn', 'Toolbar');
+        }
+        YAHOO.log('Initing toolbar with id: ' + oConfig.element.id, 'info', 'Toolbar');
+        
+        var fs = document.createElement('fieldset');
+        var lg = document.createElement('legend');
+        lg.innerHTML = 'Toolbar';
+        fs.appendChild(lg);
+        
+        var cont = document.createElement('DIV');
+        oConfig.attributes.cont = cont;
+        Dom.addClass(cont, 'yui-toolbar-subcont');
+        fs.appendChild(cont);
+        oConfig.element.appendChild(fs);
+
+        oConfig.element.tabIndex = -1;
+
+        
+        oConfig.attributes.element = oConfig.element;
+        oConfig.attributes.id = oConfig.element.id;
+
+        this._configuredButtons = [];
+
+        YAHOO.widget.Toolbar.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+         
+    };
+
+    YAHOO.extend(YAHOO.widget.Toolbar, YAHOO.util.Element, {
+        /**
+        * @protected
+        * @property _configuredButtons
+        * @type Array
+        */
+        _configuredButtons: null,
+        /**
+        * @method _addMenuClasses
+        * @private
+        * @description This method is called from Menu's renderEvent to add a few more classes to the menu items
+        * @param {String} ev The event that fired.
+        * @param {Array} na Array of event information.
+        * @param {Object} o Button config object. 
+        */
+        _addMenuClasses: function(ev, na, o) {
+            Dom.addClass(this.element, 'yui-toolbar-' + o.get('value') + '-menu');
+            if (Dom.hasClass(o._button.parentNode.parentNode, 'yui-toolbar-select')) {
+                Dom.addClass(this.element, 'yui-toolbar-select-menu');
+            }
+            var items = this.getItems();
+            for (var i = 0; i < items.length; i++) {
+                Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-').toLowerCase() : items[i]._oText.nodeValue.replace(/ /g, '-').toLowerCase()));
+                Dom.addClass(items[i].element, 'yui-toolbar-' + o.get('value') + '-' + ((items[i].value) ? items[i].value.replace(/ /g, '-') : items[i]._oText.nodeValue.replace(/ /g, '-')));
+            }
+        },
+        /** 
+        * @property buttonType
+        * @description The default button to use
+        * @type Object
+        */
+        buttonType: YAHOO.widget.ToolbarButton,
+        /** 
+        * @property dd
+        * @description The DragDrop instance associated with the Toolbar
+        * @type Object
+        */
+        dd: null,
+        /** 
+        * @property _colorData
+        * @description Object reference containing colors hex and text values.
+        * @type Object
+        */
+        _colorData: {
+/* {{{ _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'
+/* }}} */
+        },
+        /** 
+        * @property _colorPicker
+        * @description The HTML Element containing the colorPicker
+        * @type HTMLElement
+        */
+        _colorPicker: null,
+        /** 
+        * @property STR_COLLAPSE
+        * @description String for Toolbar Collapse Button
+        * @type String
+        */
+        STR_COLLAPSE: 'Collapse Toolbar',
+        /** 
+        * @property STR_EXPAND
+        * @description String for Toolbar Collapse Button - Expand
+        * @type String
+        */
+        STR_EXPAND: 'Expand Toolbar',
+        /** 
+        * @property STR_SPIN_LABEL
+        * @description String for spinbutton dynamic label. Note the {VALUE} will be replaced with YAHOO.lang.substitute
+        * @type String
+        */
+        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.',
+        /** 
+        * @property STR_SPIN_UP
+        * @description String for spinbutton up
+        * @type String
+        */
+        STR_SPIN_UP: 'Click to increase the value of this input',
+        /** 
+        * @property STR_SPIN_DOWN
+        * @description String for spinbutton down
+        * @type String
+        */
+        STR_SPIN_DOWN: 'Click to decrease the value of this input',
+        /** 
+        * @property _titlebar
+        * @description Object reference to the titlebar
+        * @type HTMLElement
+        */
+        _titlebar: null,
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: YAHOO.env.ua,
+        /**
+        * @protected
+        * @property _buttonList
+        * @description Internal property list of current buttons in the toolbar
+        * @type Array
+        */
+        _buttonList: null,
+        /**
+        * @protected
+        * @property _buttonGroupList
+        * @description Internal property list of current button groups in the toolbar
+        * @type Array
+        */
+        _buttonGroupList: null,
+        /**
+        * @protected
+        * @property _sep
+        * @description Internal reference to the separator HTML Element for cloning
+        * @type HTMLElement
+        */
+        _sep: null,
+        /**
+        * @protected
+        * @property _sepCount
+        * @description Internal refernce for counting separators, so we can give them a useful class name for styling
+        * @type Number
+        */
+        _sepCount: null,
+        /**
+        * @protected
+        * @property draghandle
+        * @type HTMLElement
+        */
+        _dragHandle: null,
+        /**
+        * @protected
+        * @property _toolbarConfigs
+        * @type Object
+        */
+        _toolbarConfigs: {
+            renderer: true
+        },
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the toolbar container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-toolbar-container',
+        /**
+        * @protected
+        * @property CLASS_DRAGHANDLE
+        * @description Default CSS class to apply to the toolbar's drag handle element
+        * @type String
+        */
+        CLASS_DRAGHANDLE: 'yui-toolbar-draghandle',
+        /**
+        * @protected
+        * @property CLASS_SEPARATOR
+        * @description Default CSS class to apply to all separators in the toolbar
+        * @type String
+        */
+        CLASS_SEPARATOR: 'yui-toolbar-separator',
+        /**
+        * @protected
+        * @property CLASS_DISABLED
+        * @description Default CSS class to apply when the toolbar is disabled
+        * @type String
+        */
+        CLASS_DISABLED: 'yui-toolbar-disabled',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-toolbar',
+        /** 
+        * @method init
+        * @description The Toolbar class's initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.widget.Toolbar.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the toolbar.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the toolbar.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Toolbar.superclass.initAttributes.call(this, attr);
+            this.addClass(this.CLASS_CONTAINER);
+
+            /**
+            * @attribute buttonType
+            * @description The buttonType to use (advanced or basic)
+            * @type String
+            */
+            this.setAttributeConfig('buttonType', {
+                value: attr.buttonType || 'basic',
+                writeOnce: true,
+                validator: function(type) {
+                    switch (type) {
+                        case 'advanced':
+                        case 'basic':
+                            return true;
+                    }
+                    return false;
+                },
+                method: function(type) {
+                    if (type == 'advanced') {
+                        if (YAHOO.widget.Button) {
+                            this.buttonType = YAHOO.widget.ToolbarButtonAdvanced;
+                        } else {
+                            YAHOO.log('Can not find YAHOO.widget.Button', 'error', 'Toolbar');
+                            this.buttonType = YAHOO.widget.ToolbarButton;
+                        }
+                    } else {
+                        this.buttonType = YAHOO.widget.ToolbarButton;
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute buttons
+            * @description Object specifying the buttons to include in the toolbar
+            * Example:
+            * <code><pre>
+            * {
+            *   { id: 'b3', type: 'button', label: 'Underline', value: 'underline' },
+            *   { type: 'separator' },
+            *   { id: 'b4', type: 'menu', label: 'Align', value: 'align',
+            *       menu: [
+            *           { text: "Left", value: 'alignleft' },
+            *           { text: "Center", value: 'aligncenter' },
+            *           { text: "Right", value: 'alignright' }
+            *       ]
+            *   }
+            * }
+            * </pre></code>
+            * @type Array
+            */
+            
+            this.setAttributeConfig('buttons', {
+                value: [],
+                writeOnce: true,
+                method: function(data) {
+                    var i, button, buttons, len, b;
+                    for (i in data) {
+                        if (Lang.hasOwnProperty(data, i)) {
+                            if (data[i].type == 'separator') {
+                                this.addSeparator();
+                            } else if (data[i].group !== undefined) {
+                                buttons = this.addButtonGroup(data[i]);
+                                if (buttons) {
+                                    len = buttons.length;
+                                    for(b = 0; b < len; b++) {
+                                        if (buttons[b]) {
+                                            this._configuredButtons[this._configuredButtons.length] = buttons[b].id;
+                                        }
+                                    }
+                                }
+                                
+                            } else {
+                                button = this.addButton(data[i]);
+                                if (button) {
+                                    this._configuredButtons[this._configuredButtons.length] = button.id;
+                                }
+                            }
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute disabled
+            * @description Boolean indicating if the toolbar should be disabled. It will also disable the draggable attribute if it is on.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this.get('disabled') === disabled) {
+                        return false;
+                    }
+                    if (disabled) {
+                        this.addClass(this.CLASS_DISABLED);
+                        this.set('draggable', false);
+                        this.disableAllButtons();
+                    } else {
+                        this.removeClass(this.CLASS_DISABLED);
+                        if (this._configs.draggable._initialConfig.value) {
+                            //Draggable by default, set it back
+                            this.set('draggable', true);
+                        }
+                        this.resetAllButtons();
+                    }
+                }
+            });
+
+            /**
+            * @config cont
+            * @description The container for the toolbar.
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('cont', {
+                value: attr.cont,
+                readOnly: true
+            });
+
+
+            /**
+            * @attribute grouplabels
+            * @description Boolean indicating if the toolbar should show the group label's text string.
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig('grouplabels', {
+                value: ((attr.grouplabels === false) ? false : true),
+                method: function(grouplabels) {
+                    if (grouplabels) {
+                        Dom.removeClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    } else {
+                        Dom.addClass(this.get('cont'), (this.CLASS_PREFIX + '-nogrouplabels'));
+                    }
+                }
+            });
+            /**
+            * @attribute titlebar
+            * @description Boolean indicating if the toolbar should have a titlebar. If
+            * passed a string, it will use that as the titlebar text
+            * @default false
+            * @type Boolean or String
+            */
+            this.setAttributeConfig('titlebar', {
+                value: false,
+                method: function(titlebar) {
+                    if (titlebar) {
+                        if (this._titlebar && this._titlebar.parentNode) {
+                            this._titlebar.parentNode.removeChild(this._titlebar);
+                        }
+                        this._titlebar = document.createElement('DIV');
+                        this._titlebar.tabIndex = '-1';
+                        Event.on(this._titlebar, 'focus', function() {
+                            this._handleFocus();
+                        }, this, true);
+                        Dom.addClass(this._titlebar, this.CLASS_PREFIX + '-titlebar');
+                        if (Lang.isString(titlebar)) {
+                            var h2 = document.createElement('h2');
+                            h2.tabIndex = '-1';
+                            h2.innerHTML = '<a href="#" tabIndex="0">' + titlebar + '</a>';
+                            this._titlebar.appendChild(h2);
+                            Event.on(h2.firstChild, 'click', function(ev) {
+                                Event.stopEvent(ev);
+                            });
+                            Event.on([h2, h2.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);
+                        }
+                    }
+                }
+            });
+
+
+            /**
+            * @attribute collapse
+            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * The collapse button will not remove the toolbar, it will minimize it to the titlebar
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('collapse', {
+                value: false,
+                method: function(collapse) {
+                    if (this._titlebar) {
+                        var collapseEl = null;
+                        var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                        if (collapse) {
+                            if (el.length > 0) {
+                                //There is already a collapse button
+                                return true;
+                            }
+                            collapseEl = document.createElement('SPAN');
+                            collapseEl.innerHTML = 'X';
+                            collapseEl.title = this.STR_COLLAPSE;
+
+                            Dom.addClass(collapseEl, 'collapse');
+                            this._titlebar.appendChild(collapseEl);
+                            Event.addListener(collapseEl, 'click', function() {
+                                if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                    this.collapse(false); //Expand Toolbar
+                                } else {
+                                    this.collapse(); //Collapse Toolbar
+                                }
+                            }, this, true);
+                        } else {
+                            collapseEl = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+                            if (collapseEl[0]) {
+                                if (Dom.hasClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed')) {
+                                    //We are closed, reopen the titlebar..
+                                    this.collapse(false); //Expand Toolbar
+                                }
+                                collapseEl[0].parentNode.removeChild(collapseEl[0]);
+                            }
+                        }
+                    }
+                }
+            });
+
+            /**
+            * @attribute draggable
+            * @description Boolean indicating if the toolbar should be draggable.  
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('draggable', {
+                value: (attr.draggable || false),
+                method: function(draggable) {
+                    if (draggable && !this.get('titlebar')) {
+                        YAHOO.log('Dragging enabled', 'info', 'Toolbar');
+                        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';
+                            Dom.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 {
+                        YAHOO.log('Dragging disabled', 'info', 'Toolbar');
+                        if (this._dragHandle) {
+                            this._dragHandle.parentNode.removeChild(this._dragHandle);
+                            this._dragHandle = null;
+                            this.dd = null;
+                        }
+                    }
+                    if (this._titlebar) {
+                        if (draggable) {
+                            this.dd = new YAHOO.util.DD(this.get('id'));
+                            this.dd.setHandleElId(this._titlebar);
+                            Dom.addClass(this._titlebar, 'draggable');
+                        } else {
+                            Dom.removeClass(this._titlebar, 'draggable');
+                            if (this.dd) {
+                                this.dd.unreg();
+                                this.dd = null;
+                            }
+                        }
+                    }
+                },
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.DD) {
+                        ret = false;
+                    }
+                    return ret;
+                }
+            });
+
+        },
+        /**
+        * @method addButtonGroup
+        * @description Add a new button group to the toolbar. (uses addButton)
+        * @param {Object} oGroup Object literal reference to the Groups Config (contains an array of button configs as well as the group label)
+        */
+        addButtonGroup: function(oGroup) {
+            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 div = document.createElement('DIV');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group');
+            Dom.addClass(div, this.CLASS_PREFIX + '-group-' + oGroup.group);
+            if (oGroup.label) {
+                var label = document.createElement('h3');
+                label.innerHTML = oGroup.label;
+                div.appendChild(label);
+            }
+            if (!this.get('grouplabels')) {
+                Dom.addClass(this.get('cont'), this.CLASS_PREFIX, '-nogrouplabels');
+            }
+
+            this.get('cont').appendChild(div);
+
+            //For accessibility, let's put all of the group buttons in an Unordered List
+            var ul = document.createElement('ul');
+            div.appendChild(ul);
+
+            if (!this._buttonGroupList) {
+                this._buttonGroupList = {};
+            }
+            
+            this._buttonGroupList[oGroup.group] = ul;
+
+            //An array of the button ids added to this group
+            //This is used for destruction later...
+            var addedButtons = [],
+                button;
+            
+
+            for (var i = 0; i < oGroup.buttons.length; i++) {
+                var li = document.createElement('li');
+                li.className = this.CLASS_PREFIX + '-groupitem';
+                ul.appendChild(li);
+                if ((oGroup.buttons[i].type !== undefined) && oGroup.buttons[i].type == 'separator') {
+                    this.addSeparator(li);
+                } else {
+                    oGroup.buttons[i].container = li;
+                    button = this.addButton(oGroup.buttons[i]);
+                    if (button) {
+                        addedButtons[addedButtons.length]  = button.id;
+                    }
+                }
+            }
+            return addedButtons;
+        },
+        /**
+        * @method addButtonToGroup
+        * @description Add a new button to a toolbar group. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {String} group The Group identifier passed into the initial config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButtonToGroup: function(oButton, group, after) {
+            var groupCont = this._buttonGroupList[group],
+                li = document.createElement('li');
+
+            li.className = this.CLASS_PREFIX + '-groupitem';
+            oButton.container = li;
+            this.addButton(oButton, after);
+            groupCont.appendChild(li);
+        },
+        /**
+        * @method addButton
+        * @description Add a new button to the toolbar. Buttons supported:
+        *   push, split, menu, select, color, spin
+        * @param {Object} oButton Object literal reference to the Button's Config
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addButton: function(oButton, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addButton', arguments];
+                return false;
+            }
+            if (!this._buttonList) {
+                this._buttonList = [];
+            }
+            YAHOO.log('Adding button of type: ' + oButton.type, 'info', 'Toolbar');
+            if (!oButton.container) {
+                oButton.container = this.get('cont');
+            }
+
+            if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                if (Lang.isArray(oButton.menu)) {
+                    for (var i in oButton.menu) {
+                        if (Lang.hasOwnProperty(oButton.menu, i)) {
+                            var funcObject = {
+                                fn: function(ev, x, oMenu) {
+                                    if (!oButton.menucmd) {
+                                        oButton.menucmd = oButton.value;
+                                    }
+                                    oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                },
+                                scope: this
+                            };
+                            oButton.menu[i].onclick = funcObject;
+                        }
+                    }
+                }
+            }
+            var _oButton = {}, skip = false;
+            for (var o in oButton) {
+                if (Lang.hasOwnProperty(oButton, o)) {
+                    if (!this._toolbarConfigs[o]) {
+                        _oButton[o] = oButton[o];
+                    }
+                }
+            }
+            if (oButton.type == 'select') {
+                _oButton.type = 'menu';
+            }
+            if (oButton.type == 'spin') {
+                _oButton.type = 'push';
+            }
+            if (_oButton.type == 'color') {
+                if (YAHOO.widget.Overlay) {
+                    _oButton = this._makeColorButton(_oButton);
+                } else {
+                    skip = true;
+                }
+            }
+            if (_oButton.menu) {
+                if ((YAHOO.widget.Overlay) && (oButton.menu instanceof YAHOO.widget.Overlay)) {
+                    oButton.menu.showEvent.subscribe(function() {
+                        this._button = _oButton;
+                    });
+                } else {
+                    for (var m = 0; m < _oButton.menu.length; m++) {
+                        if (!_oButton.menu[m].value) {
+                            _oButton.menu[m].value = _oButton.menu[m].text;
+                        }
+                    }
+                    if (this.browser.webkit) {
+                        _oButton.focusmenu = false;
+                    }
+                }
+            }
+            if (skip) {
+                oButton = false;
+            } else {
+                //Add to .get('buttons') manually
+                this._configs.buttons.value[this._configs.buttons.value.length] = oButton;
+                
+                var tmp = new this.buttonType(_oButton);
+                tmp.get('element').tabIndex = '-1';
+                tmp.get('element').setAttribute('role', 'button');
+                tmp._selected = true;
+                
+                if (this.get('disabled')) {
+                    //Toolbar is disabled, disable the new button too!
+                    tmp.set('disabled', true);
+                }
+                if (!oButton.id) {
+                    oButton.id = tmp.get('id');
+                }
+                YAHOO.log('Button created (' + oButton.type + ')', 'info', 'Toolbar');
+                
+                if (after) {
+                    var el = tmp.get('element');
+                    var nextSib = null;
+                    if (after.get) {
+                        nextSib = after.get('element').nextSibling;
+                    } else if (after.nextSibling) {
+                        nextSib = after.nextSibling;
+                    }
+                    if (nextSib) {
+                        nextSib.parentNode.insertBefore(el, nextSib);
+                    }
+                }
+                tmp.addClass(this.CLASS_PREFIX + '-' + tmp.get('value'));
+
+                var icon = document.createElement('span');
+                icon.className = this.CLASS_PREFIX + '-icon';
+                tmp.get('element').insertBefore(icon, tmp.get('firstChild'));
+                if (tmp._button.tagName.toLowerCase() == 'button') {
+                    tmp.get('element').setAttribute('unselectable', 'on');
+                    //Replace the Button HTML Element with an a href if it exists
+                    var a = document.createElement('a');
+                    a.innerHTML = tmp._button.innerHTML;
+                    a.href = '#';
+                    a.tabIndex = '-1';
+                    Event.on(a, 'click', function(ev) {
+                        Event.stopEvent(ev);
+                    });
+                    tmp._button.parentNode.replaceChild(a, tmp._button);
+                    tmp._button = a;
+                }
+
+                if (oButton.type == 'select') {
+                    if (tmp._button.tagName.toLowerCase() == 'select') {
+                        icon.parentNode.removeChild(icon);
+                        var iel = tmp._button,
+                            parEl = tmp.get('element');
+                        parEl.parentNode.replaceChild(iel, parEl);
+                        //The 'element' value is currently the orphaned element
+                        //In order for "destroy" to execute we need to get('element') to reference the correct node.
+                        //I'm not sure if there is a direct approach to setting this value.
+                        tmp._configs.element.value = iel;
+                    } else {
+                        //Don't put a class on it if it's a real select element
+                        tmp.addClass(this.CLASS_PREFIX + '-select');
+                    }
+                }
+                if (oButton.type == 'spin') {
+                    if (!Lang.isArray(oButton.range)) {
+                        oButton.range = [ 10, 100 ];
+                    }
+                    this._makeSpinButton(tmp, oButton);
+                }
+                tmp.get('element').setAttribute('title', tmp.get('label'));
+                if (oButton.type != 'spin') {
+                    if ((YAHOO.widget.Overlay) && (_oButton.menu instanceof YAHOO.widget.Overlay)) {
+                        var showPicker = function(ev) {
+                            var exec = true;
+                            if (ev.keyCode && (ev.keyCode == 9)) {
+                                exec = false;
+                            }
+                            if (exec) {
+                                if (this._colorPicker) {
+                                    this._colorPicker._button = oButton.value;
+                                }
+                                var menuEL = tmp.getMenu().element;
+                                if (Dom.getStyle(menuEL, 'visibility') == 'hidden') {
+                                    tmp.getMenu().show();
+                                } else {
+                                    tmp.getMenu().hide();
+                                }
+                            }
+                            YAHOO.util.Event.stopEvent(ev);
+                        };
+                        tmp.on('mousedown', showPicker, oButton, this);
+                        tmp.on('keydown', showPicker, oButton, this);
+                        
+                    } else if ((oButton.type != 'menu') && (oButton.type != 'select')) {
+                        tmp.on('keypress', this._buttonClick, oButton, this);
+                        tmp.on('mousedown', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                            this._buttonClick(ev, oButton);
+                        }, oButton, this);
+                        tmp.on('click', function(ev) {
+                            YAHOO.util.Event.stopEvent(ev);
+                        });
+                    } else {
+                        //Stop the mousedown event so we can trap the selection in the editor!
+                        tmp.on('mousedown', function(ev) {
+                            //YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('click', function(ev) {
+                            //YAHOO.util.Event.stopEvent(ev);
+                        });
+                        tmp.on('change', function(ev) {
+                            if (!ev.target) {
+                                if (!oButton.menucmd) {
+                                    oButton.menucmd = oButton.value;
+                                }
+                                oButton.value = ev.value;
+                                this._buttonClick(ev, oButton);
+                            }
+                        }, this, true);
+
+                        var self = this;
+                        //Hijack the mousedown event in the menu and make it fire a button click..
+                        tmp.on('appendTo', function() {
+                            var tmp = this;
+                            if (tmp.getMenu() && tmp.getMenu().mouseDownEvent) {
+                                tmp.getMenu().mouseDownEvent.subscribe(function(ev, args) {
+                                    YAHOO.log('mouseDownEvent', 'warn', 'Toolbar');
+                                    var oMenu = args[1];
+                                    YAHOO.util.Event.stopEvent(args[0]);
+                                    tmp._onMenuClick(args[0], tmp);
+                                    if (!oButton.menucmd) {
+                                        oButton.menucmd = oButton.value;
+                                    }
+                                    oButton.value = ((oMenu.value) ? oMenu.value : oMenu._oText.nodeValue);
+                                    self._buttonClick.call(self, args[1], oButton);
+                                    tmp._hideMenu();
+                                    return false;
+                                });
+                                tmp.getMenu().clickEvent.subscribe(function(ev, args) {
+                                    YAHOO.log('clickEvent', 'warn', 'Toolbar');
+                                    YAHOO.util.Event.stopEvent(args[0]);
+                                });
+                                tmp.getMenu().mouseUpEvent.subscribe(function(ev, args) {
+                                    YAHOO.log('mouseUpEvent', 'warn', 'Toolbar');
+                                    YAHOO.util.Event.stopEvent(args[0]);
+                                });
+                            }
+                        });
+                        
+                    }
+                } else {
+                    //Stop the mousedown event so we can trap the selection in the editor!
+                    tmp.on('mousedown', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    });
+                }
+                if (this.browser.ie) {
+                    /*
+                    //Add a couple of new events for IE
+                    tmp.DOM_EVENTS.focusin = true;
+                    tmp.DOM_EVENTS.focusout = true;
+                    
+                    //Stop them so we don't loose focus in the Editor
+                    tmp.on('focusin', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    
+                    tmp.on('focusout', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    tmp.on('click', function(ev) {
+                        YAHOO.util.Event.stopEvent(ev);
+                    }, oButton, this);
+                    */
+                }
+                if (this.browser.webkit) {
+                    //This will keep the document from gaining focus and the editor from loosing it..
+                    //Forcefully remove the focus calls in button!
+                    tmp.hasFocus = function() {
+                        return true;
+                    };
+                }
+                this._buttonList[this._buttonList.length] = tmp;
+                if ((oButton.type == 'menu') || (oButton.type == 'split') || (oButton.type == 'select')) {
+                    if (Lang.isArray(oButton.menu)) {
+                        YAHOO.log('Button type is (' + oButton.type + '), doing extra renderer work.', 'info', 'Toolbar');
+                        var menu = tmp.getMenu();
+                        if (menu && menu.renderEvent) {
+                            menu.renderEvent.subscribe(this._addMenuClasses, tmp);
+                            if (oButton.renderer) {
+                                menu.renderEvent.subscribe(oButton.renderer, tmp);
+                            }
+                        }
+                    }
+                }
+            }
+            return oButton;
+        },
+        /**
+        * @method addSeparator
+        * @description Add a new button separator to the toolbar.
+        * @param {HTMLElement} cont Optional HTML element to insert this button into.
+        * @param {HTMLElement} after Optional HTML element to insert this button after in the DOM.
+        */
+        addSeparator: function(cont, after) {
+            if (!this.get('element')) {
+                this._queue[this._queue.length] = ['addSeparator', arguments];
+                return false;
+            }
+            var sepCont = ((cont) ? cont : 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) {
+                YAHOO.log('Separator does not yet exist, creating', 'info', 'Toolbar');
+                this._sep = document.createElement('SPAN');
+                Dom.addClass(this._sep, this.CLASS_SEPARATOR);
+                this._sep.innerHTML = '|';
+            }
+            YAHOO.log('Separator does exist, cloning', 'info', 'Toolbar');
+            var _sep = this._sep.cloneNode(true);
+            this._sepCount++;
+            Dom.addClass(_sep, this.CLASS_SEPARATOR + '-' + this._sepCount);
+            if (after) {
+                var nextSib = null;
+                if (after.get) {
+                    nextSib = after.get('element').nextSibling;
+                } else if (after.nextSibling) {
+                    nextSib = after.nextSibling;
+                } else {
+                    nextSib = after;
+                }
+                if (nextSib) {
+                    if (nextSib == after) {
+                        nextSib.parentNode.appendChild(_sep);
+                    } else {
+                        nextSib.parentNode.insertBefore(_sep, nextSib);
+                    }
+                }
+            } else {
+                sepCont.appendChild(_sep);
+            }
+            return _sep;
+        },
+        /**
+        * @method _createColorPicker
+        * @private
+        * @description Creates the core DOM reference to the color picker menu item.
+        * @param {String} id the id of the toolbar to prefix this DOM container with.
+        */
+        _createColorPicker: function(id) {
+            if (Dom.get(id + '_colors')) {
+               Dom.get(id + '_colors').parentNode.removeChild(Dom.get(id + '_colors'));
+            }
+            var picker = document.createElement('div');
+            picker.className = 'yui-toolbar-colors';
+            picker.id = id + '_colors';
+            picker.style.display = 'none';
+            Event.on(window, 'load', function() {
+                document.body.appendChild(picker);
+            }, this, true);
+
+            this._colorPicker = picker;
+
+            var html = '';
+            for (var i in this._colorData) {
+                if (Lang.hasOwnProperty(this._colorData, i)) {
+                    html += '<a style="background-color: ' + i + '" href="#">' + i.replace('#', '') + '</a>';
+                }
+            }
+            html += '<span><em>X</em><strong></strong></span>';
+            window.setTimeout(function() {
+                picker.innerHTML = html;
+            }, 0);
+
+            Event.on(picker, 'mouseover', function(ev) {
+                var picker = this._colorPicker;
+                var em = picker.getElementsByTagName('em')[0];
+                var strong = picker.getElementsByTagName('strong')[0];
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    em.style.backgroundColor = tar.style.backgroundColor;
+                    strong.innerHTML = this._colorData['#' + tar.innerHTML] + '<br>' + tar.innerHTML;
+                }
+            }, this, true);
+            Event.on(picker, 'focus', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'click', function(ev) {
+                Event.stopEvent(ev);
+            });
+            Event.on(picker, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+                var tar = Event.getTarget(ev);
+                if (tar.tagName.toLowerCase() == 'a') {
+                    var retVal = this.fireEvent('colorPickerClicked', { type: 'colorPickerClicked', target: this, button: this._colorPicker._button, color: tar.innerHTML, colorName: this._colorData['#' + tar.innerHTML] } );
+                    if (retVal !== false) {
+                        var info = {
+                            color: tar.innerHTML,
+                            colorName: this._colorData['#' + tar.innerHTML],
+                            value: this._colorPicker._button 
+                        };
+                    
+                        this.fireEvent('buttonClick', { type: 'buttonClick', target: this.get('element'), button: info });
+                    }
+                    this.getButtonByValue(this._colorPicker._button).getMenu().hide();
+                }
+            }, this, true);
+        },
+        /**
+        * @method _resetColorPicker
+        * @private
+        * @description Clears the currently selected color or mouseover color in the color picker.
+        */
+        _resetColorPicker: function() {
+            var em = this._colorPicker.getElementsByTagName('em')[0];
+            var strong = this._colorPicker.getElementsByTagName('strong')[0];
+            em.style.backgroundColor = 'transparent';
+            strong.innerHTML = '';
+        },
+        /**
+        * @method _makeColorButton
+        * @private
+        * @description Called to turn a "color" button into a menu button with an Overlay for the menu.
+        * @param {Object} _oButton <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        */
+        _makeColorButton: function(_oButton) {
+            if (!this._colorPicker) {   
+                this._createColorPicker(this.get('id'));
+            }
+            _oButton.type = 'color';
+            _oButton.menu = new YAHOO.widget.Overlay(this.get('id') + '_' + _oButton.value + '_menu', { visible: false, position: 'absolute', iframe: true });
+            _oButton.menu.setBody('');
+            _oButton.menu.render(this.get('cont'));
+            Dom.addClass(_oButton.menu.element, 'yui-button-menu');
+            Dom.addClass(_oButton.menu.element, 'yui-color-button-menu');
+            _oButton.menu.beforeShowEvent.subscribe(function() {
+                _oButton.menu.cfg.setProperty('zindex', 5); //Re Adjust the overlays zIndex.. not sure why.
+                _oButton.menu.cfg.setProperty('context', [this.getButtonById(_oButton.id).get('element'), 'tl', 'bl']); //Re Adjust the overlay.. not sure why.
+                //Move the DOM reference of the color picker to the Overlay that we are about to show.
+                this._resetColorPicker();
+                var _p = this._colorPicker;
+                if (_p.parentNode) {
+                    _p.parentNode.removeChild(_p);
+                }
+                _oButton.menu.setBody('');
+                _oButton.menu.appendToBody(_p);
+                this._colorPicker.style.display = 'block';
+            }, this, true);
+            return _oButton;
+        },
+        /**
+        * @private
+        * @method _makeSpinButton
+        * @description Create a button similar to an OS Spin button.. It has an up/down arrow combo to scroll through a range of int values.
+        * @param {Object} _button <a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> reference
+        * @param {Object} oButton Object literal containing the buttons initial config
+        */
+        _makeSpinButton: function(_button, oButton) {
+            _button.addClass(this.CLASS_PREFIX + '-spinbutton');
+            var self = this,
+                _par = _button._button.parentNode.parentNode, //parentNode of Button Element for appending child
+                range = oButton.range,
+                _b1 = document.createElement('a'),
+                _b2 = document.createElement('a');
+                _b1.href = '#';
+                _b2.href = '#';
+                _b1.tabIndex = '-1';
+                _b2.tabIndex = '-1';
+            
+            //Setup the up and down arrows
+            _b1.className = 'up';
+            _b1.title = this.STR_SPIN_UP;
+            _b1.innerHTML = this.STR_SPIN_UP;
+            _b2.className = 'down';
+            _b2.title = this.STR_SPIN_DOWN;
+            _b2.innerHTML = this.STR_SPIN_DOWN;
+
+            //Append them to the container
+            _par.appendChild(_b1);
+            _par.appendChild(_b2);
+            
+            var label = YAHOO.lang.substitute(this.STR_SPIN_LABEL, { VALUE: _button.get('label') });
+            _button.set('title', label);
+
+            var cleanVal = function(value) {
+                value = ((value < range[0]) ? range[0] : value);
+                value = ((value > range[1]) ? range[1] : value);
+                return value;
+            };
+
+            var br = this.browser;
+            var tbar = false;
+            var strLabel = this.STR_SPIN_LABEL;
+            if (this._titlebar && this._titlebar.firstChild) {
+                tbar = this._titlebar.firstChild;
+            }
+            
+            var _intUp = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value++;
+                    value = cleanVal(value);
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intDown = function(ev) {
+                YAHOO.util.Event.stopEvent(ev);
+                if (!_button.get('disabled') && (ev.keyCode != 9)) {
+                    var value = parseInt(_button.get('label'), 10);
+                    value--;
+                    value = cleanVal(value);
+
+                    _button.set('label', ''+value);
+                    var label = YAHOO.lang.substitute(strLabel, { VALUE: _button.get('label') });
+                    _button.set('title', label);
+                    if (!br.webkit && tbar) {
+                        //tbar.focus(); //We do this for accessibility, on the re-focus of the element, a screen reader will re-read the title that was just changed
+                        //_button.focus();
+                    }
+                    self._buttonClick(ev, oButton);
+                }
+            };
+
+            var _intKeyUp = function(ev) {
+                if (ev.keyCode == 38) {
+                    _intUp(ev);
+                } else if (ev.keyCode == 40) {
+                    _intDown(ev);
+                } else if (ev.keyCode == 107 && ev.shiftKey) {  //Plus Key
+                    _intUp(ev);
+                } else if (ev.keyCode == 109 && ev.shiftKey) {  //Minus Key
+                    _intDown(ev);
+                }
+            };
+
+            //Handle arrow keys..
+            _button.on('keydown', _intKeyUp, this, true);
+
+            //Listen for the click on the up button and act on it
+            //Listen for the click on the down button and act on it
+            Event.on(_b1, 'mousedown',function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b2, 'mousedown', function(ev) {
+                Event.stopEvent(ev);
+            }, this, true);
+            Event.on(_b1, 'click', _intUp, this, true);
+            Event.on(_b2, 'click', _intDown, this, true);
+        },
+        /**
+        * @protected
+        * @method _buttonClick
+        * @description Click handler for all buttons in the toolbar.
+        * @param {String} ev The event that was passed in.
+        * @param {Object} info Object literal of information about the button that was clicked.
+        */
+        _buttonClick: function(ev, info) {
+            var doEvent = true;
+            
+            if (ev && ev.type == 'keypress') {
+                if (ev.keyCode == 9) {
+                    doEvent = false;
+                } else if ((ev.keyCode === 13) || (ev.keyCode === 0) || (ev.keyCode === 32)) {
+                } else {
+                    doEvent = false;
+                }
+            }
+
+            if (doEvent) {
+                var fireNextEvent = true,
+                    retValue = false;
+                    
+                info.isSelected = this.isSelected(info.id);
+
+                if (info.value) {
+                    YAHOO.log('fireEvent::' + info.value + 'Click', 'info', 'Toolbar');
+                    retValue = this.fireEvent(info.value + 'Click', { type: info.value + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                
+                if (info.menucmd && fireNextEvent) {
+                    YAHOO.log('fireEvent::' + info.menucmd + 'Click', 'info', 'Toolbar');
+                    retValue = this.fireEvent(info.menucmd + 'Click', { type: info.menucmd + 'Click', target: this.get('element'), button: info });
+                    if (retValue === false) {
+                        fireNextEvent = false;
+                    }
+                }
+                if (fireNextEvent) {
+                    YAHOO.log('fireEvent::buttonClick', 'info', 'Toolbar');
+                    this.fireEvent('buttonClick', { type: 'buttonClick', target: this.get('element'), button: info });
+                }
+
+                if (info.type == 'select') {
+                    var button = this.getButtonById(info.id);
+                    if (button.buttonType == 'rich') {
+                        var txt = info.value;
+                        for (var i = 0; i < info.menu.length; i++) {
+                            if (info.menu[i].value == info.value) {
+                                txt = info.menu[i].text;
+                                break;
+                            }
+                        }
+                        button.set('label', '<span class="yui-toolbar-' + info.menucmd + '-' + (info.value).replace(/ /g, '-').toLowerCase() + '">' + txt + '</span>');
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value.toLowerCase() == info.value.toLowerCase()) {
+                                _items[m].cfg.setProperty('checked', true);
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
+                        }
+                    }
+                }
+                if (ev) {
+                    Event.stopEvent(ev);
+                }
+            }
+        },
+        /**
+        * @private
+        * @property _keyNav
+        * @description Flag to determine if the arrow nav listeners have been attached
+        * @type Boolean
+        */
+        _keyNav: null,
+        /**
+        * @private
+        * @property _navCounter
+        * @description Internal counter for walking the buttons in the toolbar with the arrow keys
+        * @type Number
+        */
+        _navCounter: null,
+        /**
+        * @private
+        * @method _navigateButtons
+        * @description Handles the navigation/focus of toolbar buttons with the Arrow Keys
+        * @param {Event} ev The Key Event
+        */
+        _navigateButtons: function(ev) {
+            switch (ev.keyCode) {
+                case 37:
+                case 39:
+                    if (ev.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);
+                    }
+                    if (this._buttonList[this._navCounter]) {
+                        var el = this._buttonList[this._navCounter].get('element');
+                        if (this.browser.ie) {
+                            el = this._buttonList[this._navCounter].get('element').getElementsByTagName('a')[0];
+                        }
+                        if (this._buttonList[this._navCounter].get('disabled')) {
+                            this._navigateButtons(ev);
+                        } else {
+                            el.focus();
+                        }
+                    }
+                    break;
+            }
+        },
+        /**
+        * @private
+        * @method _handleFocus
+        * @description Sets up the listeners for the arrow key navigation
+        */
+        _handleFocus: function() {
+            if (!this._keyNav) {
+                var ev = 'keypress';
+                if (this.browser.ie) {
+                    ev = 'keydown';
+                }
+                Event.on(this.get('element'), ev, this._navigateButtons, this, true);
+                this._keyNav = true;
+                this._navCounter = -1;
+            }
+        },
+        /**
+        * @method getButtonById
+        * @description Gets a button instance from the toolbar by is Dom id.
+        * @param {String} id The Dom id to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonById: function(id) {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                if (this._buttonList[i] && this._buttonList[i].get('id') == id) {
+                    return this._buttonList[i];
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByValue
+        * @description Gets a button instance or a menuitem instance from the toolbar by it's value.
+        * @param {String} value The button value to query for.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a> or <a href="YAHOO.widget.MenuItem.html">YAHOO.widget.MenuItem</a>}
+        */
+        getButtonByValue: function(value) {
+            var _buttons = this.get('buttons');
+            if (!_buttons) {
+                return false;
+            }
+            var len = _buttons.length;
+            for (var i = 0; i < len; i++) {
+                if (_buttons[i].group !== undefined) {
+                    for (var m = 0; m < _buttons[i].buttons.length; m++) {
+                        if ((_buttons[i].buttons[m].value == value) || (_buttons[i].buttons[m].menucmd == value)) {
+                            return this.getButtonById(_buttons[i].buttons[m].id);
+                        }
+                        if (_buttons[i].buttons[m].menu) { //Menu Button, loop through the values
+                            for (var s = 0; s < _buttons[i].buttons[m].menu.length; s++) {
+                                if (_buttons[i].buttons[m].menu[s].value == value) {
+                                    return this.getButtonById(_buttons[i].buttons[m].id);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    if ((_buttons[i].value == value) || (_buttons[i].menucmd == value)) {
+                        return this.getButtonById(_buttons[i].id);
+                    }
+                    if (_buttons[i].menu) { //Menu Button, loop through the values
+                        for (var j = 0; j < _buttons[i].menu.length; j++) {
+                            if (_buttons[i].menu[j].value == value) {
+                                return this.getButtonById(_buttons[i].id);
+                            }
+                        }
+                    }
+                }
+            }
+            return false;
+        },
+        /**
+        * @method getButtonByIndex
+        * @description Gets a button instance from the toolbar by is index in _buttonList.
+        * @param {Number} index The index of the button in _buttonList.
+        * @return {<a href="YAHOO.widget.ToolbarButton.html">YAHOO.widget.ToolbarButton</a>}
+        */
+        getButtonByIndex: function(index) {
+            if (this._buttonList[index]) {
+                return this._buttonList[index];
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method getButtons
+        * @description Returns an array of buttons in the current toolbar
+        * @return {Array}
+        */
+        getButtons: function() {
+            return this._buttonList;
+        },
+        /**
+        * @method disableButton
+        * @description Disables a button in the toolbar.
+        * @param {String/Number} id Disable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        disableButton: function(id) {
+            var button = getButton.call(this, id);
+            if (button) {
+                button.set('disabled', true);
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method enableButton
+        * @description Enables a button in the toolbar.
+        * @param {String/Number} id Enable a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        enableButton: function(id) {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var button = getButton.call(this, id);
+            if (button) {
+                if (button.get('disabled')) {
+                    button.set('disabled', false);
+                }
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method isSelected
+        * @description Tells if a button is selected or not.
+        * @param {String/Number} id A button by it's id, index or value.
+        * @return {Boolean}
+        */
+        isSelected: function(id) {
+            var button = getButton.call(this, id);
+            if (button) {
+                return button._selected;
+            }
+            return false;
+        },
+        /**
+        * @method selectButton
+        * @description Selects a button in the toolbar.
+        * @param {String/Number} id Select a button by it's id, index or value.
+        * @param {String} value If this is a Menu Button, check this item in the menu
+        * @return {Boolean}
+        */
+        selectButton: function(id, value) {
+            var button = getButton.call(this, id);
+            if (button) {
+                button.addClass('yui-button-selected');
+                button.addClass('yui-button-' + button.get('value') + '-selected');
+                button._selected = true;
+                if (value) {
+                    if (button.buttonType == 'rich') {
+                        var _items = button.getMenu().getItems();
+                        for (var m = 0; m < _items.length; m++) {
+                            if (_items[m].value == value) {
+                                _items[m].cfg.setProperty('checked', true);
+                                button.set('label', '<span class="yui-toolbar-' + button.get('value') + '-' + (value).replace(/ /g, '-').toLowerCase() + '">' + _items[m]._oText.nodeValue + '</span>');
+                            } else {
+                                _items[m].cfg.setProperty('checked', false);
+                            }
+                        }
+                    }
+                }
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method deselectButton
+        * @description Deselects a button in the toolbar.
+        * @param {String/Number} id Deselect a button by it's id, index or value.
+        * @return {Boolean}
+        */
+        deselectButton: function(id) {
+            var button = getButton.call(this, id);
+            if (button) {
+                button.removeClass('yui-button-selected');
+                button.removeClass('yui-button-' + button.get('value') + '-selected');
+                button.removeClass('yui-button-hover');
+                button._selected = false;
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method deselectAllButtons
+        * @description Deselects all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        deselectAllButtons: function() {
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.deselectButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method disableAllButtons
+        * @description Disables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        disableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.disableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method enableAllButtons
+        * @description Enables all buttons in the toolbar.
+        * @return {Boolean}
+        */
+        enableAllButtons: function() {
+            if (this.get('disabled')) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                this.enableButton(this._buttonList[i]);
+            }
+        },
+        /**
+        * @method resetAllButtons
+        * @description Resets all buttons to their initial state.
+        * @param {Object} _ex Except these buttons
+        * @return {Boolean}
+        */
+        resetAllButtons: function(_ex) {
+            if (!Lang.isObject(_ex)) {
+                _ex = {};
+            }
+            if (this.get('disabled') || !this._buttonList) {
+                return false;
+            }
+            var len = this._buttonList.length;
+            for (var i = 0; i < len; i++) {
+                var _button = this._buttonList[i];
+                if (_button) {
+                    var disabled = _button._configs.disabled._initialConfig.value;
+                    if (_ex[_button.get('id')]) {
+                        this.enableButton(_button);
+                        this.selectButton(_button);
+                    } else {
+                        if (disabled) {
+                            this.disableButton(_button);
+                        } else {
+                            this.enableButton(_button);
+                        }
+                        this.deselectButton(_button);
+                    }
+                }
+            }
+        },
+        /**
+        * @method destroyButton
+        * @description Destroy a button in the toolbar.
+        * @param {String/Number} id Destroy a button by it's id or index.
+        * @return {Boolean}
+        */
+        destroyButton: function(id) {
+            var button = getButton.call(this, id);
+            if (button) {
+                var thisID = button.get('id'),
+                    new_list = [], i = 0,
+                    len = this._buttonList.length;
+
+                button.destroy();
+                
+                for (i = 0; i < len; i++) {
+                    if (this._buttonList[i].get('id') != thisID) {
+                        new_list[new_list.length]= this._buttonList[i];
+                    }
+                }
+
+                this._buttonList = new_list;
+            } else {
+                return false;
+            }
+        },
+        /**
+        * @method destroy
+        * @description Destroys the toolbar, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            var len = this._configuredButtons.length, j, i, b;
+            for(b = 0; b < len; b++) {
+                this.destroyButton(this._configuredButtons[b]);
+            }
+
+            this._configuredButtons = null;
+        
+            this.get('element').innerHTML = '';
+            this.get('element').className = '';
+            //Brutal Object Destroy
+            for (i in this) {
+                if (Lang.hasOwnProperty(this, i)) {
+                    this[i] = null;
+                }
+            }
+            return true;
+        },
+        /**
+        * @method collapse
+        * @description Programatically collapse the toolbar.
+        * @param {Boolean} collapse True to collapse, false to expand.
+        */
+        collapse: function(collapse) {
+            var el = Dom.getElementsByClassName('collapse', 'span', this._titlebar);
+            if (collapse === false) {
+                Dom.removeClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                if (el[0]) {
+                    Dom.removeClass(el[0], 'collapsed');
+                    el[0].title = this.STR_COLLAPSE;
+                }
+                this.fireEvent('toolbarExpanded', { type: 'toolbarExpanded', target: this });
+            } else {
+                if (el[0]) {
+                    Dom.addClass(el[0], 'collapsed');
+                    el[0].title = this.STR_EXPAND;
+                }
+                Dom.addClass(this.get('cont').parentNode, 'yui-toolbar-container-collapsed');
+                this.fireEvent('toolbarCollapsed', { type: 'toolbarCollapsed', target: this });
+            }
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the toolbar.
+        * @return {String}
+        */
+        toString: function() {
+            return 'Toolbar (#' + this.get('element').id + ') with ' + this._buttonList.length + ' buttons.';
+        }
+    });
+/**
+* @event buttonClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description Fires when any botton receives a click event. Passes back a single object representing the buttons config object. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event valueClick
+* @param {Object} o The object passed to this handler is the button config used to create the button.
+* @description This is a special dynamic event that is created and dispatched based on the value property
+* of the button config. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* Example:
+* <code><pre>
+* buttons : [
+*   { type: 'button', value: 'test', value: 'testButton' }
+* ]</pre>
+* </code>
+* With the valueClick event you could subscribe to this buttons click event with this:
+* tbar.in('testButtonClick', function() { alert('test button clicked'); })
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarExpanded
+* @description Fires when the toolbar is expanded via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event toolbarCollapsed
+* @description Fires when the toolbar is collapsed via the collapse button. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+})();
+/**
+ * @module editor
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, toolbar
+ * @optional animation, container_core, resize, dragdrop
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class SimpleEditor
+     * @extends YAHOO.util.Element
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.SimpleEditor = function(el, attrs) {
+        YAHOO.log('SimpleEditor Initalizing', 'info', 'SimpleEditor');
+        
+        var o = {};
+        if (Lang.isObject(el) && (!el.tagName) && !attrs) {
+            Lang.augmentObject(o, el); //Break the config reference
+            el = document.createElement('textarea');
+            this.DOMReady = true;
+            if (o.container) {
+                var c = Dom.get(o.container);
+                c.appendChild(el);
+            } else {
+                document.body.appendChild(el);
+            }
+        } else {
+            if (attrs) {
+                Lang.augmentObject(o, attrs); //Break the config reference
+            }
+        }
+
+        var oConfig = {
+            element: null,
+            attributes: o
+        }, id = null;
+
+        if (Lang.isString(el)) {
+            id = el;
+        } else {
+            if (oConfig.attributes.id) {
+                id = oConfig.attributes.id;
+            } else {
+                this.DOMReady = true;
+                id = Dom.generateId(el);
+            }
+        }
+        oConfig.element = el;
+
+        var element_cont = document.createElement('DIV');
+        oConfig.attributes.element_cont = new YAHOO.util.Element(element_cont, {
+            id: id + '_container'
+        });
+        var div = document.createElement('div');
+        Dom.addClass(div, 'first-child');
+        oConfig.attributes.element_cont.appendChild(div);
+        
+        if (!oConfig.attributes.toolbar_cont) {
+            oConfig.attributes.toolbar_cont = document.createElement('DIV');
+            oConfig.attributes.toolbar_cont.id = id + '_toolbar';
+            div.appendChild(oConfig.attributes.toolbar_cont);
+        }
+        var editorWrapper = document.createElement('DIV');
+        div.appendChild(editorWrapper);
+        oConfig.attributes.editor_wrapper = editorWrapper;
+
+        YAHOO.widget.SimpleEditor.superclass.constructor.call(this, oConfig.element, oConfig.attributes);
+    };
+
+
+    YAHOO.extend(YAHOO.widget.SimpleEditor, YAHOO.util.Element, {
+        /**
+        * @private
+        * @property _resizeConfig
+        * @description The default config for the Resize Utility
+        */
+        _resizeConfig: {
+            handles: ['br'],
+            autoRatio: true,
+            status: true,
+            proxy: true,
+            useShim: true,
+            setSize: false
+        },
+        /**
+        * @private
+        * @method _setupResize
+        * @description Creates the Resize instance and binds its events.
+        */
+        _setupResize: function() {
+            if (!YAHOO.util.DD || !YAHOO.util.Resize) { return false; }
+            if (this.get('resize')) {
+                var config = {};
+                Lang.augmentObject(config, this._resizeConfig); //Break the config reference
+                this.resize = new YAHOO.util.Resize(this.get('element_cont').get('element'), config);
+                this.resize.on('resize', function(args) {
+                    var anim = this.get('animate');
+                    this.set('animate', false);
+                    this.set('width', args.width + 'px');
+                    var h = args.height,
+                        th = (this.toolbar.get('element').clientHeight + 2),
+                        dh = 0;
+                    if (this.dompath) {
+                        dh = (this.dompath.clientHeight + 1); //It has a 1px top border..
+                    }
+                    var newH = (h - th - dh);
+                    this.set('height', newH + 'px');
+                    this.get('element_cont').setStyle('height', '');
+                    this.set('animate', anim);
+                }, this, true);
+            }
+        },
+        /**
+        * @property resize
+        * @description A reference to the Resize object
+        * @type YAHOO.util.Resize
+        */
+        resize: null,
+        /**
+        * @private
+        * @method _setupDD
+        * @description Sets up the DD instance used from the 'drag' config option.
+        */
+        _setupDD: function() {
+            if (!YAHOO.util.DD) { return false; }
+            if (this.get('drag')) {
+                YAHOO.log('Attaching DD instance to Editor', 'info', 'SimpleEditor');
+                var d = this.get('drag'),
+                    dd = YAHOO.util.DD;
+                if (d === 'proxy') {
+                    dd = YAHOO.util.DDProxy;
+                }
+
+                this.dd = new dd(this.get('element_cont').get('element'));
+                this.toolbar.addClass('draggable'); 
+                this.dd.setHandleElId(this.toolbar._titlebar); 
+            }
+        },
+        /**
+        * @property dd
+        * @description A reference to the DragDrop object.
+        * @type YAHOO.util.DD/YAHOO.util.DDProxy
+        */
+        dd: null,
+        /**
+        * @private
+        * @property _lastCommand
+        * @description A cache of the last execCommand (used for Undo/Redo so they don't mark an undo level)
+        * @type String
+        */
+        _lastCommand: null,
+        _undoNodeChange: function() {},
+        _storeUndo: function() {},
+        /**
+        * @private
+        * @method _checkKey
+        * @description Checks a keyMap entry against a key event
+        * @param {Object} k The _keyMap object
+        * @param {Event} e The Mouse Event
+        * @return {Boolean}
+        */
+        _checkKey: function(k, e) {
+            var ret = false;
+            if ((e.keyCode === k.key)) {
+                if (k.mods && (k.mods.length > 0)) {
+                    var val = 0;
+                    for (var i = 0; i < k.mods.length; i++) {
+                        if (this.browser.mac) {
+                            if (k.mods[i] == 'ctrl') {
+                                k.mods[i] = 'meta';
+                            }
+                        }
+                        if (e[k.mods[i] + 'Key'] === true) {
+                            val++;
+                        }
+                    }
+                    if (val === k.mods.length) {
+                        ret = true;
+                    }
+                } else {
+                    ret = true;
+                }
+            }
+            //YAHOO.log('Shortcut Key Check: (' + k.key + ') return: ' + ret, 'info', 'SimpleEditor');
+            return ret;
+        },
+        /**
+        * @private
+        * @property _keyMap
+        * @description Named key maps for various actions in the Editor. Example: <code>CLOSE_WINDOW: { key: 87, mods: ['shift', 'ctrl'] }</code>. 
+        * This entry shows that when key 87 (W) is found with the modifiers of shift and control, the window will close. You can customize this object to tweak keyboard shortcuts.
+        * @type {Object/Mixed}
+        */
+        _keyMap: {
+            SELECT_ALL: {
+                key: 65, //A key
+                mods: ['ctrl']
+            },
+            CLOSE_WINDOW: {
+                key: 87, //W key
+                mods: ['shift', 'ctrl']
+            },
+            FOCUS_TOOLBAR: {
+                key: 27,
+                mods: ['shift']
+            },
+            FOCUS_AFTER: {
+                key: 27
+            },
+            FONT_SIZE_UP: {
+                key: 38,
+                mods: ['shift', 'ctrl']
+            },
+            FONT_SIZE_DOWN: {
+                key: 40,
+                mods: ['shift', 'ctrl']
+            },
+            CREATE_LINK: {
+                key: 76,
+                mods: ['shift', 'ctrl']
+            },
+            BOLD: {
+                key: 66,
+                mods: ['shift', 'ctrl']
+            },
+            ITALIC: {
+                key: 73,
+                mods: ['shift', 'ctrl']
+            },
+            UNDERLINE: {
+                key: 85,
+                mods: ['shift', 'ctrl']
+            },
+            UNDO: {
+                key: 90,
+                mods: ['ctrl']
+            },
+            REDO: {
+                key: 90,
+                mods: ['shift', 'ctrl']
+            },
+            JUSTIFY_LEFT: {
+                key: 219,
+                mods: ['shift', 'ctrl']
+            },
+            JUSTIFY_CENTER: {
+                key: 220,
+                mods: ['shift', 'ctrl']
+            },
+            JUSTIFY_RIGHT: {
+                key: 221,
+                mods: ['shift', 'ctrl']
+            }
+        },
+        /**
+        * @private
+        * @method _cleanClassName
+        * @description Makes a useable classname from dynamic data, by dropping it to lowercase and replacing spaces with -'s.
+        * @param {String} str The classname to clean up
+        * @return {String}
+        */
+        _cleanClassName: function(str) {
+            return str.replace(/ /g, '-').toLowerCase();
+        },
+        /**
+        * @property _textarea
+        * @description Flag to determine if we are using a textarea or an HTML Node.
+        * @type Boolean
+        */
+        _textarea: null,
+        /**
+        * @property _docType
+        * @description The DOCTYPE to use in the editable container.
+        * @type String
+        */
+        _docType: '<!DOCTYPE HTML PUBLIC "-/'+'/W3C/'+'/DTD HTML 4.01/'+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',
+        /**
+        * @property editorDirty
+        * @description This flag will be set when certain things in the Editor happen. It is to be used by the developer to check to see if content has changed.
+        * @type Boolean
+        */
+        editorDirty: null,
+        /**
+        * @property _defaultCSS
+        * @description The default CSS used in the config for 'css'. This way you can add to the config like this: { css: YAHOO.widget.SimpleEditor.prototype._defaultCSS + 'ADD MYY CSS HERE' }
+        * @type String
+        */
+        _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, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } .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; } body.ptags.webkit div.yui-wk-p { margin: 11px 0; } body.ptags.webkit div.yui-wk-div { margin: 0; }',
+        /**
+        * @property _defaultToolbar
+        * @private
+        * @description Default toolbar config.
+        * @type Object
+        */
+        _defaultToolbar: null,
+        /**
+        * @property _lastButton
+        * @private
+        * @description The last button pressed, so we don't disable it.
+        * @type Object
+        */
+        _lastButton: null,
+        /**
+        * @property _baseHREF
+        * @private
+        * @description The base location of the editable page (this page) so that relative paths for image work.
+        * @type String
+        */
+        _baseHREF: function() {
+            var href = document.location.href;
+            if (href.indexOf('?') !== -1) { //Remove the query string
+                href = href.substring(0, href.indexOf('?'));
+            }
+            href = href.substring(0, href.lastIndexOf('/')) + '/';
+            return href;
+        }(),
+        /**
+        * @property _lastImage
+        * @private
+        * @description Safari reference for the last image selected (for styling as selected).
+        * @type HTMLElement
+        */
+        _lastImage: null,
+        /**
+        * @property _blankImageLoaded
+        * @private
+        * @description Don't load the blank image more than once..
+        * @type Boolean
+        */
+        _blankImageLoaded: null,
+        /**
+        * @property _fixNodesTimer
+        * @private
+        * @description Holder for the fixNodes timer
+        * @type Date
+        */
+        _fixNodesTimer: null,
+        /**
+        * @property _nodeChangeTimer
+        * @private
+        * @description Holds a reference to the nodeChange setTimeout call
+        * @type Number
+        */
+        _nodeChangeTimer: null,
+        /**
+        * @property _nodeChangeDelayTimer
+        * @private
+        * @description Holds a reference to the nodeChangeDelay setTimeout call
+        * @type Number
+        */
+        _nodeChangeDelayTimer: null,
+        /**
+        * @property _lastNodeChangeEvent
+        * @private
+        * @description Flag to determine the last event that fired a node change
+        * @type Event
+        */
+        _lastNodeChangeEvent: null,
+        /**
+        * @property _lastNodeChange
+        * @private
+        * @description Flag to determine when the last node change was fired
+        * @type Date
+        */
+        _lastNodeChange: 0,
+        /**
+        * @property _rendered
+        * @private
+        * @description Flag to determine if editor has been rendered or not
+        * @type Boolean
+        */
+        _rendered: null,
+        /**
+        * @property DOMReady
+        * @private
+        * @description Flag to determine if DOM is ready or not
+        * @type Boolean
+        */
+        DOMReady: null,
+        /**
+        * @property _selection
+        * @private
+        * @description Holder for caching iframe selections
+        * @type Object
+        */
+        _selection: null,
+        /**
+        * @property _mask
+        * @private
+        * @description DOM Element holder for the editor Mask when disabled
+        * @type Object
+        */
+        _mask: null,
+        /**
+        * @property _showingHiddenElements
+        * @private
+        * @description Status of the hidden elements button
+        * @type Boolean
+        */
+        _showingHiddenElements: null,
+        /**
+        * @property currentWindow
+        * @description A reference to the currently open EditorWindow
+        * @type Object
+        */
+        currentWindow: null,
+        /**
+        * @property currentEvent
+        * @description A reference to the current editor event
+        * @type Event
+        */
+        currentEvent: null,
+        /**
+        * @property operaEvent
+        * @private
+        * @description setTimeout holder for Opera and Image DoubleClick event..
+        * @type Object
+        */
+        operaEvent: null,
+        /**
+        * @property currentFont
+        * @description A reference to the last font selected from the Toolbar
+        * @type HTMLElement
+        */
+        currentFont: null,
+        /**
+        * @property currentElement
+        * @description A reference to the current working element in the editor
+        * @type Array
+        */
+        currentElement: null,
+        /**
+        * @property dompath
+        * @description A reference to the dompath container for writing the current working dom path to.
+        * @type HTMLElement
+        */
+        dompath: null,
+        /**
+        * @property beforeElement
+        * @description A reference to the H2 placed before the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        beforeElement: null,
+        /**
+        * @property afterElement
+        * @description A reference to the H2 placed after the editor for Accessibilty.
+        * @type HTMLElement
+        */
+        afterElement: null,
+        /**
+        * @property invalidHTML
+        * @description Contains a list of HTML elements that are invalid inside the editor. They will be removed when they are found. If you set the value of a key to "{ keepContents: true }", then the element will be replaced with a yui-non span to be filtered out when cleanHTML is called. The only tag that is ignored here is the span tag as it will force the Editor into a loop and freeze the browser. However.. all of these tags will be removed in the cleanHTML routine.
+        * @type Object
+        */
+        invalidHTML: {
+            form: true,
+            input: true,
+            button: true,
+            select: true,
+            link: true,
+            html: true,
+            body: true,
+            iframe: true,
+            script: true,
+            style: true,
+            textarea: true
+        },
+        /**
+        * @property toolbar
+        * @description Local property containing the <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a> instance
+        * @type <a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>
+        */
+        toolbar: null,
+        /**
+        * @private
+        * @property _contentTimer
+        * @description setTimeout holder for documentReady check
+        */
+        _contentTimer: null,
+        /**
+        * @private
+        * @property _contentTimerMax
+        * @description The number of times the loaded content should be checked before giving up. Default: 500
+        */
+        _contentTimerMax: 500,
+        /**
+        * @private
+        * @property _contentTimerCounter
+        * @description Counter to check the number of times the body is polled for before giving up
+        * @type Number
+        */
+        _contentTimerCounter: 0,
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'fontname', 'fontsize', 'forecolor', 'backcolor' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { undo: true, redo: true },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { },
+        /**
+        * @private
+        * @property _semantic
+        * @description The Toolbar commands that we should attempt to make tags out of instead of using styles.
+        * @type Object
+        */
+        _semantic: { 'bold': true, 'italic' : true, 'underline' : true },
+        /**
+        * @private
+        * @property _tag2cmd
+        * @description A tag map of HTML tags to convert to the different types of commands so we can select the proper toolbar button.
+        * @type Object
+        */
+        _tag2cmd: {
+            'b': 'bold',
+            'strong': 'bold',
+            'i': 'italic',
+            'em': 'italic',
+            'u': 'underline',
+            'sup': 'superscript',
+            'sub': 'subscript',
+            'img': 'insertimage',
+            'a' : 'createlink',
+            'ul' : 'insertunorderedlist',
+            'ol' : 'insertorderedlist'
+        },
+
+        /**
+        * @private _createIframe
+        * @description Creates the DOM and YUI Element for the iFrame editor area.
+        * @param {String} id The string ID to prefix the iframe with
+        * @return {Object} iFrame object
+        */
+        _createIframe: function() {
+            var ifrmDom = document.createElement('iframe');
+            ifrmDom.id = this.get('id') + '_editor';
+            var config = {
+                border: '0',
+                frameBorder: '0',
+                marginWidth: '0',
+                marginHeight: '0',
+                leftMargin: '0',
+                topMargin: '0',
+                allowTransparency: 'true',
+                width: '100%'
+            };
+            if (this.get('autoHeight')) {
+                config.scrolling = 'no';
+            }
+            for (var i in config) {
+                if (Lang.hasOwnProperty(config, i)) {
+                    ifrmDom.setAttribute(i, config[i]);
+                }
+            }
+            var isrc = 'javascript:;';
+            if (this.browser.ie) {
+                //isrc = 'about:blank';
+                //TODO - Check this, I have changed it before..
+                isrc = 'javascript:false;';
+            }
+            ifrmDom.setAttribute('src', isrc);
+            var ifrm = new YAHOO.util.Element(ifrmDom);
+            ifrm.setStyle('visibility', 'hidden');
+            return ifrm;
+        },
+        /**
+        * @private _isElement
+        * @description Checks to see if an Element reference is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @return {Boolean}
+        */
+        _isElement: function(el, tag) {
+            if (el && el.tagName && (el.tagName.toLowerCase() == tag)) {
+                return true;
+            }
+            if (el && el.getAttribute && (el.getAttribute('tag') == tag)) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private _hasParent
+        * @description Checks to see if an Element reference or one of it's parents is a valid one and has a certain tag type
+        * @param {HTMLElement} el The element to check
+        * @param {String} tag The tag that the element needs to be
+        * @return HTMLElement
+        */
+        _hasParent: function(el, tag) {
+            if (!el || !el.parentNode) {
+                return false;
+            }
+            
+            while (el.parentNode) {
+                if (this._isElement(el, tag)) {
+                    return el;
+                }
+                if (el.parentNode) {
+                    el = el.parentNode;
+                } else {
+                    return false;
+                }
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _getDoc
+        * @description Get the Document of the IFRAME
+        * @return {Object}
+        */
+        _getDoc: function() {
+            var value = false;
+            try {
+                if (this.get('iframe').get('element').contentWindow.document) {
+                    value = this.get('iframe').get('element').contentWindow.document;
+                    return value;
+                }
+            } catch (e) {
+                return false;
+            }
+        },
+        /**
+        * @private
+        * @method _getWindow
+        * @description Get the Window of the IFRAME
+        * @return {Object}
+        */
+        _getWindow: function() {
+            return this.get('iframe').get('element').contentWindow;
+        },
+        /**
+        * @method focus
+        * @description Attempt to set the focus of the iframes window.
+        */
+        focus: function() {
+            this._getWindow().focus();
+        },
+        /**
+        * @private
+        * @depreciated - This should not be used, moved to this.focus();
+        * @method _focusWindow
+        * @description Attempt to set the focus of the iframes window.
+        */
+        _focusWindow: function() {
+            YAHOO.log('_focusWindow: depreciated in favor of this.focus()', 'warn', 'Editor');
+            this.focus();
+        },
+        /**
+        * @private
+        * @method _hasSelection
+        * @description Determines if there is a selection in the editor document.
+        * @return {Boolean}
+        */
+        _hasSelection: function() {
+            var sel = this._getSelection();
+            var range = this._getRange();
+            var hasSel = false;
+
+            if (!sel || !range) {
+                return hasSel;
+            }
+
+            //Internet Explorer
+            if (this.browser.ie) {
+                if (range.text) {
+                    hasSel = true;
+                }
+                if (range.html) {
+                    hasSel = true;
+                }
+            } else {
+                if (this.browser.webkit) {
+                    if (sel+'' !== '') {
+                        hasSel = true;
+                    }
+                } else {
+                    if (sel && (sel.toString() !== '') && (sel !== undefined)) {
+                        hasSel = true;
+                    }
+                }
+            }
+            return hasSel;
+        },
+        /**
+        * @private
+        * @method _getSelection
+        * @description Handles the different selection objects across the A-Grade list.
+        * @return {Object} Selection Object
+        */
+        _getSelection: function() {
+            var _sel = null;
+            if (this._getDoc() && this._getWindow()) {
+                if (this._getDoc().selection &&! this.browser.opera) {
+                    _sel = this._getDoc().selection;
+                } else {
+                    _sel = this._getWindow().getSelection();
+                }
+                //Handle Safari's lack of Selection Object
+                if (this.browser.webkit) {
+                    if (_sel.baseNode) {
+                            this._selection = {};
+                            this._selection.baseNode = _sel.baseNode;
+                            this._selection.baseOffset = _sel.baseOffset;
+                            this._selection.extentNode = _sel.extentNode;
+                            this._selection.extentOffset = _sel.extentOffset;
+                    } else if (this._selection !== null) {
+                        _sel = this._getWindow().getSelection();
+                        _sel.setBaseAndExtent(
+                            this._selection.baseNode,
+                            this._selection.baseOffset,
+                            this._selection.extentNode,
+                            this._selection.extentOffset);
+                        this._selection = null;
+                    }
+                }
+            }
+            return _sel;
+        },
+        /**
+        * @private
+        * @method _selectNode
+        * @description Places the highlight around a given node
+        * @param {HTMLElement} node The node to select
+        */
+        _selectNode: function(node, collapse) {
+            if (!node) {
+                return false;
+            }
+            var sel = this._getSelection(),
+                range = null;
+
+            if (this.browser.ie) {
+                try { //IE freaks out here sometimes..
+                    range = this._getDoc().body.createTextRange();
+                    range.moveToElementText(node);
+                    range.select();
+                } catch (e) {
+                    YAHOO.log('IE failed to select element: ' + node.tagName, 'warn', 'SimpleEditor');
+                }
+            } else if (this.browser.webkit) {
+                if (collapse) {
+				    sel.setBaseAndExtent(node, 1, node, node.innerText.length);
+                } else {
+				    sel.setBaseAndExtent(node, 0, node, node.innerText.length);
+                }
+            } else if (this.browser.opera) {
+                sel = this._getWindow().getSelection();
+                range = this._getDoc().createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            } else {
+                range = this._getDoc().createRange();
+                range.selectNodeContents(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+            }
+            //TODO - Check Performance
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _getRange
+        * @description Handles the different range objects across the A-Grade list.
+        * @return {Object} Range Object
+        */
+        _getRange: function() {
+            var sel = this._getSelection();
+
+            if (sel === null) {
+                return null;
+            }
+
+            if (this.browser.webkit && !sel.getRangeAt) {
+                var _range = this._getDoc().createRange();
+                try {
+                    _range.setStart(sel.anchorNode, sel.anchorOffset);
+                    _range.setEnd(sel.focusNode, sel.focusOffset);
+                } catch (e) {
+                    _range = this._getWindow().getSelection()+'';
+                }
+                return _range;
+            }
+
+            if (this.browser.ie) {
+                try {
+                    return sel.createRange();
+                } catch (e2) {
+                    return null;
+                }
+            }
+
+            if (sel.rangeCount > 0) {
+                return sel.getRangeAt(0);
+            }
+            return null;
+        },
+        /**
+        * @private
+        * @method _setDesignMode
+        * @description Sets the designMode property of the iFrame document's body.
+        * @param {String} state This should be either on or off
+        */
+        _setDesignMode: function(state) {
+            if (this.get('setDesignMode')) {
+                try {
+                    this._getDoc().designMode = ((state.toLowerCase() == 'off') ? 'off' : 'on');
+                } catch(e) { }
+            }
+        },
+        /**
+        * @private
+        * @method _toggleDesignMode
+        * @description Toggles the designMode property of the iFrame document on and off.
+        * @return {String} The state that it was set to.
+        */
+        _toggleDesignMode: function() {
+            YAHOO.log('It is not recommended to use this method and it will be depreciated.', 'warn', 'SimpleEditor');
+            var _dMode = this._getDoc().designMode,
+                _state = ((_dMode.toLowerCase() == 'on') ? 'off' : 'on');
+            this._setDesignMode(_state);
+            return _state;
+        },
+        /**
+        * @private
+        * @property _focused
+        * @description Holder for trapping focus/blur state and prevent double events
+        * @type Boolean
+        */
+        _focused: null,
+        /**
+        * @private
+        * @method _handleFocus
+        * @description Handles the focus of the iframe. Note, this is window focus event, not an Editor focus event.
+        * @param {Event} e The DOM Event
+        */
+        _handleFocus: function(e) {
+            if (!this._focused) {
+                //YAHOO.log('Editor Window Focused', 'info', 'SimpleEditor');
+                this._focused = true;
+                this.fireEvent('editorWindowFocus', { type: 'editorWindowFocus', target: this });
+            }
+        },
+        /**
+        * @private
+        * @method _handleBlur
+        * @description Handles the blur of the iframe. Note, this is window blur event, not an Editor blur event.
+        * @param {Event} e The DOM Event
+        */
+        _handleBlur: function(e) {
+            if (this._focused) {
+                //YAHOO.log('Editor Window Blurred', 'info', 'SimpleEditor');
+                this._focused = false;
+                this.fireEvent('editorWindowBlur', { type: 'editorWindowBlur', target: this });
+            }
+        },
+        /**
+        * @private
+        * @method _initEditorEvents
+        * @description This method sets up the listeners on the Editors document.
+        */
+        _initEditorEvents: function() {
+            //Setup Listeners on iFrame
+            var doc = this._getDoc(),
+                win = this._getWindow();
+
+            Event.on(doc, 'mouseup', this._handleMouseUp, this, true);
+            Event.on(doc, 'mousedown', this._handleMouseDown, this, true);
+            Event.on(doc, 'click', this._handleClick, this, true);
+            Event.on(doc, 'dblclick', this._handleDoubleClick, this, true);
+            Event.on(doc, 'keypress', this._handleKeyPress, this, true);
+            Event.on(doc, 'keyup', this._handleKeyUp, this, true);
+            Event.on(doc, 'keydown', this._handleKeyDown, this, true);
+            /* TODO -- Everyone but Opera works here..
+            Event.on(doc, 'paste', function() {
+                YAHOO.log('PASTE', 'info', 'SimpleEditor');
+            }, this, true);
+            */
+ 
+            //Focus and blur..
+            Event.on(win, 'focus', this._handleFocus, this, true);
+            Event.on(win, 'blur', this._handleBlur, this, true);
+        },
+        /**
+        * @private
+        * @method _removeEditorEvents
+        * @description This method removes the listeners on the Editors document (for disabling).
+        */
+        _removeEditorEvents: function() {
+            //Remove Listeners on iFrame
+            var doc = this._getDoc(),
+                win = this._getWindow();
+
+            Event.removeListener(doc, 'mouseup', this._handleMouseUp, this, true);
+            Event.removeListener(doc, 'mousedown', this._handleMouseDown, this, true);
+            Event.removeListener(doc, 'click', this._handleClick, this, true);
+            Event.removeListener(doc, 'dblclick', this._handleDoubleClick, this, true);
+            Event.removeListener(doc, 'keypress', this._handleKeyPress, this, true);
+            Event.removeListener(doc, 'keyup', this._handleKeyUp, this, true);
+            Event.removeListener(doc, 'keydown', this._handleKeyDown, this, true);
+
+            //Focus and blur..
+            Event.removeListener(win, 'focus', this._handleFocus, this, true);
+            Event.removeListener(win, 'blur', this._handleBlur, this, true);
+        },
+        _fixWebkitDivs: function() {
+            if (this.browser.webkit) {
+                var divs = this._getDoc().body.getElementsByTagName('div');
+                Dom.addClass(divs, 'yui-wk-div');
+            }
+        },
+        /**
+        * @private
+        * @method _initEditor
+        * @param {Boolean} raw Don't add events.
+        * @description This method is fired from _checkLoaded when the document is ready. It turns on designMode and set's up the listeners.
+        */
+        _initEditor: function(raw) {
+            if (this._editorInit) {
+                return;
+            }
+            this._editorInit = true;
+            if (this.browser.ie) {
+                this._getDoc().body.style.margin = '0';
+            }
+            if (!this.get('disabled')) {
+                this._setDesignMode('on');
+                this._contentTimerCounter = 0;
+            }
+            if (!this._getDoc().body) {
+                YAHOO.log('Body is null, check again', 'error', 'SimpleEditor');
+                this._contentTimerCounter = 0;
+                this._editorInit = false;
+                this._checkLoaded();
+                return false;
+            }
+            
+            YAHOO.log('editorLoaded', 'info', 'SimpleEditor');
+            if (!raw) {
+                this.toolbar.on('buttonClick', this._handleToolbarClick, this, true);
+            }
+            if (!this.get('disabled')) {
+                this._initEditorEvents();
+                this.toolbar.set('disabled', false);
+            }
+
+            if (raw) {
+                this.fireEvent('editorContentReloaded', { type: 'editorreloaded', target: this });
+            } else {
+                this.fireEvent('editorContentLoaded', { type: 'editorLoaded', target: this });
+            }
+            this._fixWebkitDivs();
+            if (this.get('dompath')) {
+                YAHOO.log('Delayed DomPath write', 'info', 'SimpleEditor');
+                var self = this;
+                setTimeout(function() {
+                    self._writeDomPath.call(self);
+                    self._setupResize.call(self);
+                }, 150);
+            }
+            var br = [];
+            for (var i in this.browser) {
+                if (this.browser[i]) {
+                    br.push(i);
+                }
+            }
+            if (this.get('ptags')) {
+                br.push('ptags');
+            }
+            Dom.addClass(this._getDoc().body, br.join(' '));
+            this.nodeChange(true);
+        },
+        /**
+        * @private
+        * @method _checkLoaded
+        * @param {Boolean} raw Don't add events.
+        * @description Called from a setTimeout loop to check if the iframes body.onload event has fired, then it will init the editor.
+        */
+        _checkLoaded: function(raw) {
+            this._editorInit = false;
+            this._contentTimerCounter++;
+            if (this._contentTimer) {
+                clearTimeout(this._contentTimer);
+            }
+            if (this._contentTimerCounter > this._contentTimerMax) {
+                YAHOO.log('ERROR: Body Did Not load', 'error', 'SimpleEditor');
+                return false;
+            }
+            var init = false;
+            try {
+                if (this._getDoc() && this._getDoc().body) {
+                    if (this.browser.ie) {
+                        if (this._getDoc().body.readyState == 'complete') {
+                            init = true;
+                        }
+                    } else {
+                        if (this._getDoc().body._rteLoaded === true) {
+                            init = true;
+                        }
+                    }
+                }
+            } catch (e) {
+                init = false;
+                YAHOO.log('checking body (e)' + e, 'error', 'SimpleEditor');
+            }
+
+            if (init === true) {
+                //The onload event has fired, clean up after ourselves and fire the _initEditor method
+                YAHOO.log('Firing _initEditor', 'info', 'SimpleEditor');
+                this._initEditor(raw);
+            } else {
+                var self = this;
+                this._contentTimer = setTimeout(function() {
+                    self._checkLoaded.call(self, raw);
+                }, 20);
+            }
+        },
+        /**
+        * @private
+        * @method _setInitialContent
+        * @param {Boolean} raw Don't add events.
+        * @description This method will open the iframes content document and write the textareas value into it, then start the body.onload checking.
+        */
+        _setInitialContent: function(raw) {
+            YAHOO.log('Populating editor body with contents of the text area', 'info', 'SimpleEditor');
+
+            var value = ((this._textarea) ? this.get('element').value : this.get('element').innerHTML),
+                doc = null;
+
+            if (value === '') {
+                value = '<br>';
+            }
+
+            var html = Lang.substitute(this.get('html'), {
+                TITLE: this.STR_TITLE,
+                CONTENT: this._cleanIncomingHTML(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 */')
+            }),
+            check = true;
+
+            html = html.replace(/RIGHT_BRACKET/gi, '{');
+            html = html.replace(/LEFT_BRACKET/gi, '}');
+
+            if (document.compatMode != 'BackCompat') {
+                YAHOO.log('Adding Doctype to editable area', 'info', 'SimpleEditor');
+                html = this._docType + "\n" + html;
+            } else {
+                YAHOO.log('DocType skipped because we are in BackCompat Mode.', 'warn', 'SimpleEditor');
+            }
+
+            if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {
+                //Firefox 1.5 doesn't like setting designMode on an document created with a data url
+                try {
+                    //Adobe AIR Code
+                    if (this.browser.air) {
+                        doc = this._getDoc().implementation.createHTMLDocument();
+                        var origDoc = this._getDoc();
+                        origDoc.open();
+                        origDoc.close();
+                        doc.open();
+                        doc.write(html);
+                        doc.close();
+                        var node = origDoc.importNode(doc.getElementsByTagName("html")[0], true);
+                        origDoc.replaceChild(node, origDoc.getElementsByTagName("html")[0]);
+                        origDoc.body._rteLoaded = true;
+                    } else {
+                        doc = this._getDoc();
+                        doc.open();
+                        doc.write(html);
+                        doc.close();
+                    }
+                } catch (e) {
+                    YAHOO.log('Setting doc failed.. (_setInitialContent)', 'error', 'SimpleEditor');
+                    //Safari will only be here if we are hidden
+                    check = false;
+                }
+            } else {
+                //This keeps Firefox 2 from writing the iframe to history preserving the back buttons functionality
+                this.get('iframe').get('element').src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
+            }
+            this.get('iframe').setStyle('visibility', '');
+            if (check) {
+                this._checkLoaded(raw);
+            }            
+        },
+        /**
+        * @private
+        * @method _setMarkupType
+        * @param {String} action The action to take. Possible values are: css, default or semantic
+        * @description This method will turn on/off the useCSS execCommand.
+        */
+        _setMarkupType: function(action) {
+            switch (this.get('markup')) {
+                case 'css':
+                    this._setEditorStyle(true);
+                    break;
+                case 'default':
+                    this._setEditorStyle(false);
+                    break;
+                case 'semantic':
+                case 'xhtml':
+                    if (this._semantic[action]) {
+                        this._setEditorStyle(false);
+                    } else {
+                        this._setEditorStyle(true);
+                    }
+                    break;
+            }
+        },
+        /**
+        * Set the editor to use CSS instead of HTML
+        * @param {Booleen} stat True/False
+        */
+        _setEditorStyle: function(stat) {
+            try {
+                this._getDoc().execCommand('useCSS', false, !stat);
+            } catch (ex) {
+            }
+        },
+        /**
+        * @private
+        * @method _getSelectedElement
+        * @description This method will attempt to locate the element that was last interacted with, either via selection, location or event.
+        * @return {HTMLElement} The currently selected element.
+        */
+        _getSelectedElement: function() {
+            var doc = this._getDoc(),
+                range = null,
+                sel = null,
+                elm = null,
+                check = true;
+
+            if (this.browser.ie) {
+                this.currentEvent = this._getWindow().event; //Event utility assumes window.event, so we need to reset it to this._getWindow().event;
+                range = this._getRange();
+                if (range) {
+                    elm = range.item ? range.item(0) : range.parentElement();
+                    if (this._hasSelection()) {
+                        //TODO
+                        //WTF.. Why can't I get an element reference here?!??!
+                    }
+                    if (elm === doc.body) {
+                        elm = null;
+                    }
+                }
+                if ((this.currentEvent !== null) && (this.currentEvent.keyCode === 0)) {
+                    elm = Event.getTarget(this.currentEvent);
+                }
+            } else {
+                sel = this._getSelection();
+                range = this._getRange();
+
+                if (!sel || !range) {
+                    return null;
+                }
+                //TODO
+                if (!this._hasSelection() && this.browser.webkit3) {
+                    //check = false;
+                }
+                if (this.browser.gecko) {
+                    //Added in 2.6.0
+                    if (range.startContainer) {
+                        if (range.startContainer.nodeType === 3) {
+                            elm = range.startContainer.parentNode;
+                        } else if (range.startContainer.nodeType === 1) {
+                            elm = range.startContainer;
+                        }
+                        //Added in 2.7.0
+                        if (this.currentEvent) {
+                            var tar = Event.getTarget(this.currentEvent);
+                            if (!this._isElement(tar, 'html')) {
+                                if (elm !== tar) {
+                                    elm = tar;
+                                }
+                            }
+                        }
+                    }
+                }
+                
+                if (check) {
+                    if (sel.anchorNode && (sel.anchorNode.nodeType == 3)) {
+                        if (sel.anchorNode.parentNode) { //next check parentNode
+                            elm = sel.anchorNode.parentNode;
+                        }
+                        if (sel.anchorNode.nextSibling != sel.focusNode.nextSibling) {
+                            elm = sel.anchorNode.nextSibling;
+                        }
+                    }
+                    if (this._isElement(elm, 'br')) {
+                        elm = null;
+                    }
+                    if (!elm) {
+                        elm = range.commonAncestorContainer;
+                        if (!range.collapsed) {
+                            if (range.startContainer == range.endContainer) {
+                                if (range.startOffset - range.endOffset < 2) {
+                                    if (range.startContainer.hasChildNodes()) {
+                                        elm = range.startContainer.childNodes[range.startOffset];
+                                    }
+                                }
+                            }
+                        }
+                    }
+               }
+            }
+            
+            if (this.currentEvent !== null) {
+                try {
+                    switch (this.currentEvent.type) {
+                        case 'click':
+                        case 'mousedown':
+                        case 'mouseup':
+                            if (this.browser.webkit) {
+                                elm = Event.getTarget(this.currentEvent);
+                            }
+                            break;
+                        default:
+                            //Do nothing
+                            break;
+                    }
+                } catch (e) {
+                    YAHOO.log('Firefox 1.5 errors here: ' + e, 'error', 'SimpleEditor');
+                }
+            } else if ((this.currentElement && this.currentElement[0]) && (!this.browser.ie)) {
+                //TODO is this still needed?
+                //elm = this.currentElement[0];
+            }
+
+
+            if (this.browser.opera || this.browser.webkit) {
+                if (this.currentEvent && !elm) {
+                    elm = YAHOO.util.Event.getTarget(this.currentEvent);
+                }
+            }
+            if (!elm || !elm.tagName) {
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'html')) {
+                //Safari sometimes gives us the HTML node back..
+                elm = doc.body;
+            }
+            if (this._isElement(elm, 'body')) {
+                //make sure that body means this body not the parent..
+                elm = doc.body;
+            }
+            if (elm && !elm.parentNode) { //Not in document
+                elm = doc.body;
+            }
+            if (elm === undefined) {
+                elm = null;
+            }
+            return elm;
+        },
+        /**
+        * @private
+        * @method _getDomPath
+        * @description This method will attempt to build the DOM path from the currently selected element.
+        * @param HTMLElement el The element to start with, if not provided _getSelectedElement is used
+        * @return {Array} An array of node references that will create the DOM Path.
+        */
+        _getDomPath: function(el) {
+            if (!el) {
+			    el = this._getSelectedElement();
+            }
+			var domPath = [];
+            while (el !== null) {
+                if (el.ownerDocument != this._getDoc()) {
+                    el = null;
+                    break;
+                }
+                //Check to see if we get el.nodeName and nodeType
+                if (el.nodeName && el.nodeType && (el.nodeType == 1)) {
+                    domPath[domPath.length] = el;
+                }
+
+                if (this._isElement(el, 'body')) {
+                    break;
+                }
+
+                el = el.parentNode;
+            }
+            if (domPath.length === 0) {
+                if (this._getDoc() && this._getDoc().body) {
+                    domPath[0] = this._getDoc().body;
+                }
+            }
+            return domPath.reverse();
+        },
+        /**
+        * @private
+        * @method _writeDomPath
+        * @description Write the current DOM path out to the dompath container below the editor.
+        */
+        _writeDomPath: function() { 
+            var path = this._getDomPath(),
+                pathArr = [],
+                classPath = '',
+                pathStr = '';
+
+            for (var i = 0; i < path.length; i++) {
+                var tag = path[i].tagName.toLowerCase();
+                if ((tag == 'ol') && (path[i].type)) {
+                    tag += ':' + path[i].type;
+                }
+                if (Dom.hasClass(path[i], 'yui-tag')) {
+                    tag = path[i].getAttribute('tag');
+                }
+                if ((this.get('markup') == 'semantic') || (this.get('markup') == 'xhtml')) {
+                    switch (tag) {
+                        case 'b': tag = 'strong'; break;
+                        case 'i': tag = 'em'; break;
+                    }
+                }
+                if (!Dom.hasClass(path[i], 'yui-non')) {
+                    if (Dom.hasClass(path[i], 'yui-tag')) {
+                        pathStr = tag;
+                    } else {
+                        classPath = ((path[i].className !== '') ? '.' + path[i].className.replace(/ /g, '.') : '');
+                        if ((classPath.indexOf('yui') != -1) || (classPath.toLowerCase().indexOf('apple-style-span') != -1)) {
+                            classPath = '';
+                        }
+                        pathStr = tag + ((path[i].id) ? '#' + path[i].id : '') + classPath;
+                    }
+                    switch (tag) {
+                        case 'body':
+                            pathStr = 'body';
+                            break;
+                        case 'a':
+                            if (path[i].getAttribute('href', 2)) {
+                                pathStr += ':' + path[i].getAttribute('href', 2).replace('mailto:', '').replace('http:/'+'/', '').replace('https:/'+'/', ''); //May need to add others here ftp
+                            }
+                            break;
+                        case 'img':
+                            var h = path[i].height;
+                            var w = path[i].width;
+                            if (path[i].style.height) {
+                                h = parseInt(path[i].style.height, 10);
+                            }
+                            if (path[i].style.width) {
+                                w = parseInt(path[i].style.width, 10);
+                            }
+                            pathStr += '(' + w + 'x' + h + ')';
+                        break;
+                    }
+
+                    if (pathStr.length > 10) {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr.substring(0, 10) + '...' + '</span>';
+                    } else {
+                        pathStr = '<span title="' + pathStr + '">' + pathStr + '</span>';
+                    }
+                    pathArr[pathArr.length] = pathStr;
+                }
+            }
+            var str = pathArr.join(' ' + this.SEP_DOMPATH + ' ');
+            //Prevent flickering
+            if (this.dompath.innerHTML != str) {
+                this.dompath.innerHTML = str;
+            }
+        },
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            try {
+                var doc = this._getDoc(),
+                    els = [];
+
+                for (var v in this.invalidHTML) {
+                    if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                        if (v.toLowerCase() != 'span') {
+                            var tags = doc.body.getElementsByTagName(v);
+                            if (tags.length) {
+                                for (var i = 0; i < tags.length; i++) {
+                                    els.push(tags[i]);
+                                }
+                            }
+                        }
+                    }
+                }
+                for (var h = 0; h < els.length; h++) {
+                    if (els[h].parentNode) {
+                        if (Lang.isObject(this.invalidHTML[els[h].tagName.toLowerCase()]) && this.invalidHTML[els[h].tagName.toLowerCase()].keepContents) {
+                            this._swapEl(els[h], 'span', function(el) {
+                                el.className = 'yui-non';
+                            });
+                        } else {
+                            els[h].parentNode.removeChild(els[h]);
+                        }
+                    }
+                }
+                var imgs = this._getDoc().getElementsByTagName('img');
+                Dom.addClass(imgs, 'yui-img');
+            } catch(e) {}
+        },
+        /**
+        * @private
+        * @method _isNonEditable
+        * @param Event ev The Dom event being checked
+        * @description Method is called at the beginning of all event handlers to check if this element or a parent element has the class yui-noedit (this.CLASS_NOEDIT) applied.
+        * If it does, then this method will stop the event and return true. The event handlers will then return false and stop the nodeChange from occuring. This method will also
+        * disable and enable the Editor's toolbar based on the noedit state.
+        * @return Boolean
+        */
+        _isNonEditable: function(ev) {
+            if (this.get('allowNoEdit')) {
+                var el = Event.getTarget(ev);
+                if (this._isElement(el, 'html')) {
+                    el = null;
+                }
+                var path = this._getDomPath(el);
+                for (var i = (path.length - 1); i > -1; i--) {
+                    if (Dom.hasClass(path[i], this.CLASS_NOEDIT)) {
+                        //if (this.toolbar.get('disabled') === false) {
+                        //    this.toolbar.set('disabled', true);
+                        //}
+                        try {
+                             this._getDoc().execCommand('enableObjectResizing', false, 'false');
+                        } catch (e) {}
+                        this.nodeChange();
+                        Event.stopEvent(ev);
+                        YAHOO.log('CLASS_NOEDIT found in DOM Path, stopping event', 'info', 'SimpleEditor');
+                        return true;
+                    }
+                }
+                //if (this.toolbar.get('disabled') === true) {
+                    //Should only happen once..
+                    //this.toolbar.set('disabled', false);
+                    try {
+                         this._getDoc().execCommand('enableObjectResizing', false, 'true');
+                    } catch (e2) {}
+                //}
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _setCurrentEvent
+        * @param {Event} ev The event to cache
+        * @description Sets the current event property
+        */
+        _setCurrentEvent: function(ev) {
+            this.currentEvent = ev;
+        },
+        /**
+        * @private
+        * @method _handleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all click events inside the iFrame document.
+        */
+        _handleClick: function(ev) {
+            var ret = this.fireEvent('beforeEditorClick', { type: 'beforeEditorClick', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (this.browser.webkit) {
+                var tar =Event.getTarget(ev);
+                if (this._isElement(tar, 'a') || this._isElement(tar.parentNode, 'a')) {
+                    Event.stopEvent(ev);
+                    this.nodeChange();
+                }
+            } else {
+                this.nodeChange();
+            }
+            this.fireEvent('editorClick', { type: 'editorClick', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleMouseUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mouseup events inside the iFrame document.
+        */
+        _handleMouseUp: function(ev) {
+            var ret = this.fireEvent('beforeEditorMouseUp', { type: 'beforeEditorMouseUp', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            //Don't set current event for mouseup.
+            //It get's fired after a menu is closed and gives up a bogus event to work with
+            //this._setCurrentEvent(ev);
+            var self = this;
+            if (this.browser.opera) {
+                /*
+                * @knownissue Opera appears to stop the MouseDown, Click and DoubleClick events on an image inside of a document with designMode on..
+                * @browser Opera
+                * @description This work around traps the MouseUp event and sets a timer to check if another MouseUp event fires in so many seconds. If another event is fired, they we internally fire the DoubleClick event.
+                */
+                var sel = Event.getTarget(ev);
+                if (this._isElement(sel, 'img')) {
+                    this.nodeChange();
+                    if (this.operaEvent) {
+                        clearTimeout(this.operaEvent);
+                        this.operaEvent = null;
+                        this._handleDoubleClick(ev);
+                    } else {
+                        this.operaEvent = window.setTimeout(function() {
+                            self.operaEvent = false;
+                        }, 700);
+                    }
+                }
+            }
+            //This will stop Safari from selecting the entire document if you select all the text in the editor
+            if (this.browser.webkit || this.browser.opera) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+            }
+            this.nodeChange();
+            this.fireEvent('editorMouseUp', { type: 'editorMouseUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleMouseDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all mousedown events inside the iFrame document.
+        */
+        _handleMouseDown: function(ev) {
+            var ret = this.fireEvent('beforeEditorMouseDown', { type: 'beforeEditorMouseDown', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this.browser.webkit && this._hasSelection()) {
+                var _sel = this._getSelection();
+                if (!this.browser.webkit3) {
+                    _sel.collapse(true);
+                } else {
+                    _sel.collapseToStart();
+                }
+            }
+            if (this.browser.webkit && this._lastImage) {
+                Dom.removeClass(this._lastImage, 'selected');
+                this._lastImage = null;
+            }
+            if (this._isElement(sel, 'img') || this._isElement(sel, 'a')) {
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                    if (this._isElement(sel, 'img')) {
+                        Dom.addClass(sel, 'selected');
+                        this._lastImage = sel;
+                    }
+                }
+                if (this.currentWindow) {
+                    this.closeWindow();
+                }
+                this.nodeChange();
+            }
+            this.fireEvent('editorMouseDown', { type: 'editorMouseDown', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleDoubleClick
+        * @param {Event} ev The event we are working on.
+        * @description Handles all doubleclick events inside the iFrame document.
+        */
+        _handleDoubleClick: function(ev) {
+            var ret = this.fireEvent('beforeEditorDoubleClick', { type: 'beforeEditorDoubleClick', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            var sel = Event.getTarget(ev);
+            if (this._isElement(sel, 'img')) {
+                this.currentElement[0] = sel;
+                this.toolbar.fireEvent('insertimageClick', { type: 'insertimageClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            } else if (this._hasParent(sel, 'a')) { //Handle elements inside an a
+                this.currentElement[0] = this._hasParent(sel, 'a');
+                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            }
+            this.nodeChange();
+            this.fireEvent('editorDoubleClick', { type: 'editorDoubleClick', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyUp
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keyup events inside the iFrame document.
+        */
+        _handleKeyUp: function(ev) {
+            var ret = this.fireEvent('beforeEditorKeyUp', { type: 'beforeEditorKeyUp', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._storeUndo();
+            this._setCurrentEvent(ev);
+            switch (ev.keyCode) {
+                case this._keyMap.SELECT_ALL.key:
+                    if (this._checkKey(this._keyMap.SELECT_ALL, ev)) {
+                        this.nodeChange();
+                    }
+                    break;
+                case 32: //Space Bar
+                case 35: //End
+                case 36: //Home
+                case 37: //Left Arrow
+                case 38: //Up Arrow
+                case 39: //Right Arrow
+                case 40: //Down Arrow
+                case 46: //Forward Delete
+                case 8: //Delete
+                case this._keyMap.CLOSE_WINDOW.key: //W key if window is open
+                    if ((ev.keyCode == this._keyMap.CLOSE_WINDOW.key) && this.currentWindow) {
+                        if (this._checkKey(this._keyMap.CLOSE_WINDOW, ev)) {
+                            this.closeWindow();
+                        }
+                    } else {
+                        if (!this.browser.ie) {
+                            if (this._nodeChangeTimer) {
+                                clearTimeout(this._nodeChangeTimer);
+                            }
+                            var self = this;
+                            this._nodeChangeTimer = setTimeout(function() {
+                                self._nodeChangeTimer = null;
+                                self.nodeChange.call(self);
+                            }, 100);
+                        } else {
+                            this.nodeChange();
+                        }
+                        this.editorDirty = true;
+                    }
+                    break;
+            }
+            this.fireEvent('editorKeyUp', { type: 'editorKeyUp', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyPress
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keypress events inside the iFrame document.
+        */
+        _handleKeyPress: function(ev) {
+            var ret = this.fireEvent('beforeEditorKeyPress', { type: 'beforeEditorKeyPress', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+
+            if (this.get('allowNoEdit')) {
+                //if (ev && ev.keyCode && ((ev.keyCode == 46) || ev.keyCode == 63272)) {
+                if (ev && ev.keyCode && (ev.keyCode == 63272)) {
+                    //Forward delete key
+                    YAHOO.log('allowNoEdit is set, forward delete key has been disabled', 'warn', 'SimpleEditor');
+                    Event.stopEvent(ev);
+                }
+            }
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            this._storeUndo();
+            if (this.browser.opera) {
+                if (ev.keyCode === 13) {
+                    var tar = this._getSelectedElement();
+                    if (!this._isElement(tar, 'li')) {
+                        this.execCommand('inserthtml', '<br>');
+                        Event.stopEvent(ev);
+                    }
+                }
+            }
+            if (this.browser.webkit) {
+                if (!this.browser.webkit3) {
+                    if (ev.keyCode && (ev.keyCode == 122) && (ev.metaKey)) {
+                        //This is CMD + z (for undo)
+                        if (this._hasParent(this._getSelectedElement(), 'li')) {
+                            YAHOO.log('We are in an LI and we found CMD + z, stopping the event', 'warn', 'SimpleEditor');
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+                this._listFix(ev);
+            }
+            this._fixListDupIds();
+            this.fireEvent('editorKeyPress', { type: 'editorKeyPress', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Handles all keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            var ret = this.fireEvent('beforeEditorKeyDown', { type: 'beforeEditorKeyDown', target: this, ev: ev });
+            if (ret === false) {
+                return false;
+            }
+            var tar = null, _range = null;
+            if (this._isNonEditable(ev)) {
+                return false;
+            }
+            this._setCurrentEvent(ev);
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            var doExec = false,
+                action = null,
+                value = null,
+                exec = false;
+
+            //YAHOO.log('keyCode: ' + ev.keyCode, 'info', 'SimpleEditor');
+
+            switch (ev.keyCode) {
+                case this._keyMap.FOCUS_TOOLBAR.key:
+                    if (this._checkKey(this._keyMap.FOCUS_TOOLBAR, ev)) {
+                        var h = this.toolbar.getElementsByTagName('h2')[0];
+                        if (h && h.firstChild) {
+                            h.firstChild.focus();
+                        }
+                    } else if (this._checkKey(this._keyMap.FOCUS_AFTER, ev)) {
+                        //Focus After Element - Esc
+                        this.afterElement.focus();
+                    }
+                    Event.stopEvent(ev);
+                    doExec = false;
+                    break;
+                //case 76: //L
+                case this._keyMap.CREATE_LINK.key: //L
+                    if (this._hasSelection()) {
+                        if (this._checkKey(this._keyMap.CREATE_LINK, ev)) {
+                            var makeLink = true;
+                            if (this.get('limitCommands')) {
+                                if (!this.toolbar.getButtonByValue('createlink')) {
+                                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                                    makeLink = false;
+                                }
+                            }
+                            if (makeLink) {
+                                this.execCommand('createlink', '');
+                                this.toolbar.fireEvent('createlinkClick', { type: 'createlinkClick', target: this.toolbar });
+                                this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+                                doExec = false;
+                            }
+                        }
+                    }
+                    break;
+                //case 90: //Z
+                case this._keyMap.UNDO.key:
+                case this._keyMap.REDO.key:
+                    if (this._checkKey(this._keyMap.REDO, ev)) {
+                        action = 'redo';
+                        doExec = true;
+                    } else if (this._checkKey(this._keyMap.UNDO, ev)) {
+                        action = 'undo';
+                        doExec = true;
+                    }
+                    break;
+                //case 66: //B
+                case this._keyMap.BOLD.key:
+                    if (this._checkKey(this._keyMap.BOLD, ev)) {
+                        action = 'bold';
+                        doExec = true;
+                    }
+                    break;
+                case this._keyMap.FONT_SIZE_UP.key:
+                case this._keyMap.FONT_SIZE_DOWN.key:
+                    var uk = false, dk = false;
+                    if (this._checkKey(this._keyMap.FONT_SIZE_UP, ev)) {
+                        uk = true;
+                    }
+                    if (this._checkKey(this._keyMap.FONT_SIZE_DOWN, ev)) {
+                        dk = true;
+                    }
+                    if (uk || dk) {
+                        var fs_button = this.toolbar.getButtonByValue('fontsize'),
+                            label = parseInt(fs_button.get('label'), 10),
+                            newValue = (label + 1);
+
+                        if (dk) {
+                            newValue = (label - 1);
+                        }
+
+                        action = 'fontsize';
+                        value = newValue + 'px';
+                        doExec = true;
+                    }
+                    break;
+                //case 73: //I
+                case this._keyMap.ITALIC.key:
+                    if (this._checkKey(this._keyMap.ITALIC, ev)) {
+                        action = 'italic';
+                        doExec = true;
+                    }
+                    break;
+                //case 85: //U
+                case this._keyMap.UNDERLINE.key:
+                    if (this._checkKey(this._keyMap.UNDERLINE, ev)) {
+                        action = 'underline';
+                        doExec = true;
+                    }
+                    break;
+                case 9:
+                    if (this.browser.ie) {
+                        //Insert a tab in Internet Explorer
+                        _range = this._getRange();
+                        tar = this._getSelectedElement();
+                        if (!this._isElement(tar, 'li')) {
+                            if (_range) {
+                                _range.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
+                                _range.collapse(false);
+                                _range.select();
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                    //Firefox 3 code
+                    if (this.browser.gecko > 1.8) {
+                        tar = this._getSelectedElement();
+                        if (this._isElement(tar, 'li')) {
+                            if (ev.shiftKey) {
+                                this._getDoc().execCommand('outdent', null, '');
+                            } else {
+                                this._getDoc().execCommand('indent', null, '');
+                            }
+                            
+                        } else if (!this._hasSelection()) {
+                            this.execCommand('inserthtml', '&nbsp;&nbsp;&nbsp;&nbsp;');
+                        }
+                        Event.stopEvent(ev);
+                    }
+                    break;
+                case 13:
+                    var p = null, i = 0;
+                    if (this.get('ptags') && !ev.shiftKey) {
+                        if (this.browser.gecko) {
+                            tar = this._getSelectedElement();
+                            if (!this._hasParent(tar, 'li')) {
+                                if (this._hasParent(tar, 'p')) {
+                                    p = this._getDoc().createElement('p');
+                                    p.innerHTML = '&nbsp;';
+                                    Dom.insertAfter(p, tar);
+                                    this._selectNode(p.firstChild);
+                                } else if (this._isElement(tar, 'body')) {
+                                    this.execCommand('insertparagraph', null);
+                                    var ps = this._getDoc().body.getElementsByTagName('p');
+                                    for (i = 0; i < ps.length; i++) {
+                                        if (ps[i].getAttribute('_moz_dirty') !== null) {
+                                            p = this._getDoc().createElement('p');
+                                            p.innerHTML = '&nbsp;';
+                                            Dom.insertAfter(p, ps[i]);
+                                            this._selectNode(p.firstChild);
+                                            ps[i].removeAttribute('_moz_dirty');
+                                        }
+                                    }
+                                } else {
+                                    YAHOO.log('Something went wrong with paragraphs, please file a bug!!', 'error', 'SimpleEditor');
+                                    doExec = true;
+                                    action = 'insertparagraph';
+                                }
+                                Event.stopEvent(ev);
+                            }
+                        }
+                        if (this.browser.webkit) {
+                            tar = this._getSelectedElement();
+                            if (!this._hasParent(tar, 'li')) {
+                                this.execCommand('insertparagraph', null);
+                                var divs = this._getDoc().body.getElementsByTagName('div');
+                                for (i = 0; i < divs.length; i++) {
+                                    if (!Dom.hasClass(divs[i], 'yui-wk-div')) {
+                                        Dom.addClass(divs[i], 'yui-wk-p');
+                                    }
+                                }
+                                Event.stopEvent(ev);
+                            }
+                        }
+                    } else {
+                        if (this.browser.webkit) {
+                            tar = this._getSelectedElement();
+                            if (!this._hasParent(tar, 'li')) {
+                                if (this.browser.webkit4) {
+                                    this.execCommand('insertlinebreak');
+                                } else {
+                                    this.execCommand('inserthtml', '<var id="yui-br"></var>');
+                                    var holder = this._getDoc().getElementById('yui-br'),
+                                        br = this._getDoc().createElement('br'),
+                                        caret = this._getDoc().createElement('span');
+
+                                    holder.parentNode.replaceChild(br, holder);
+                                    caret.className = 'yui-non';
+                                    caret.innerHTML = '&nbsp;';
+                                    Dom.insertAfter(caret, br);
+                                    this._selectNode(caret);
+                                }
+                                Event.stopEvent(ev);
+                            }
+                        }
+                        if (this.browser.ie) {
+                            YAHOO.log('Stopping P tags', 'info', 'SimpleEditor');
+                            //Insert a <br> instead of a <p></p> in Internet Explorer
+                            _range = this._getRange();
+                            tar = this._getSelectedElement();
+                            if (!this._isElement(tar, 'li')) {
+                                if (_range) {
+                                    _range.pasteHTML('<br>');
+                                    _range.collapse(false);
+                                    _range.select();
+                                }
+                                Event.stopEvent(ev);
+                            }
+                        }
+                    }
+                    break;
+            }
+            if (this.browser.ie) {
+                this._listFix(ev);
+            }
+            if (doExec && action) {
+                this.execCommand(action, value);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+            this._storeUndo();
+            this.fireEvent('editorKeyDown', { type: 'editorKeyDown', target: this, ev: ev });
+        },
+        /**
+        * @private
+        * @property _fixListRunning
+        * @type Boolean
+        * @description Keeps more than one _fixListDupIds from running at the same time.
+        */
+        _fixListRunning: null,
+        /**
+        * @private
+        * @method _fixListDupIds
+        * @description Some browsers will duplicate the id of an LI when created in designMode.
+        * This method will fix the duplicate id issue. However it will only preserve the first element 
+        * in the document list with the unique id. 
+        */
+        _fixListDupIds: function() {
+            if (this._fixListRunning) {
+                return false;
+            }
+            if (this._getDoc()) {
+                this._fixListRunning = true;
+                var lis = this._getDoc().body.getElementsByTagName('li'),
+                    i = 0, ids = {};
+                for (i = 0; i < lis.length; i++) {
+                    if (lis[i].id) {
+                        if (ids[lis[i].id]) {
+                            lis[i].id = '';
+                        }
+                        ids[lis[i].id] = true;
+                    }
+                }
+                this._fixListRunning = false;
+            }
+        },
+        /**
+        * @private
+        * @method _listFix
+        * @param {Event} ev The event we are working on.
+        * @description Handles the Enter key, Tab Key and Shift + Tab keys for List Items.
+        */
+        _listFix: function(ev) {
+            //YAHOO.log('Lists Fix (' + ev.keyCode + ')', 'info', 'SimpleEditor');
+            var testLi = null, par = null, preContent = false, range = null;
+            //Enter Key
+            if (this.browser.webkit) {
+                if (ev.keyCode && (ev.keyCode == 13)) {
+                    if (this._hasParent(this._getSelectedElement(), 'li')) {
+                        var tar = this._hasParent(this._getSelectedElement(), 'li');
+                        if (tar.previousSibling) {
+                            if (tar.firstChild && (tar.firstChild.length == 1)) {
+                                this._selectNode(tar);
+                            }
+                        }
+                    }
+                }
+            }
+            //Shift + Tab Key
+            if (ev.keyCode && ((!this.browser.webkit3 && (ev.keyCode == 25)) || ((this.browser.webkit3 || !this.browser.webkit) && ((ev.keyCode == 9) && ev.shiftKey)))) {
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    testLi = this._hasParent(testLi, 'li');
+                    YAHOO.log('We have a SHIFT tab in an LI, reverse it..', 'info', 'SimpleEditor');
+                    if (this._hasParent(testLi, 'ul') || this._hasParent(testLi, 'ol')) {
+                        YAHOO.log('We have a double parent, move up a level', 'info', 'SimpleEditor');
+                        par = this._hasParent(testLi, 'ul');
+                        if (!par) {
+                            par = this._hasParent(testLi, 'ol');
+                        }
+                        //YAHOO.log(par.previousSibling + ' :: ' + par.previousSibling.innerHTML);
+                        if (this._isElement(par.previousSibling, 'li')) {
+                            par.removeChild(testLi);
+                            par.parentNode.insertBefore(testLi, par.nextSibling);
+                            if (this.browser.ie) {
+                                range = this._getDoc().body.createTextRange();
+                                range.moveToElementText(testLi);
+                                range.collapse(false);
+                                range.select();
+                            }
+                            if (this.browser.webkit) {
+                                this._selectNode(testLi.firstChild);
+                            }
+                            Event.stopEvent(ev);
+                        }
+                    }
+                }
+            }
+            //Tab Key
+            if (ev.keyCode && ((ev.keyCode == 9) && (!ev.shiftKey))) {
+                YAHOO.log('List Fix - Tab', 'info', 'SimpleEditor');
+                var preLi = this._getSelectedElement();
+                if (this._hasParent(preLi, 'li')) {
+                    preContent = this._hasParent(preLi, 'li').innerHTML;
+                }
+                //YAHOO.log('preLI: ' + preLi.tagName + ' :: ' + preLi.innerHTML);
+                if (this.browser.webkit) {
+                    this._getDoc().execCommand('inserttext', false, '\t');
+                }
+                testLi = this._getSelectedElement();
+                if (this._hasParent(testLi, 'li')) {
+                    YAHOO.log('We have a tab in an LI', 'info', 'SimpleEditor');
+                    par = this._hasParent(testLi, 'li');
+                    YAHOO.log('parLI: ' + par.tagName + ' :: ' + par.innerHTML);
+                    var newUl = this._getDoc().createElement(par.parentNode.tagName.toLowerCase());
+                    if (this.browser.webkit) {
+                        var span = Dom.getElementsByClassName('Apple-tab-span', 'span', par);
+                        //Remove the span element that Safari puts in
+                        if (span[0]) {
+                            par.removeChild(span[0]);
+                            par.innerHTML = Lang.trim(par.innerHTML);
+                            //Put the HTML from the LI into this new LI
+                            if (preContent) {
+                                par.innerHTML = '<span class="yui-non">' + preContent + '</span>&nbsp;';
+                            } else {
+                                par.innerHTML = '<span class="yui-non">&nbsp;</span>&nbsp;';
+                            }
+                        }
+                    } else {
+                        if (preContent) {
+                            par.innerHTML = preContent + '&nbsp;';
+                        } else {
+                            par.innerHTML = '&nbsp;';
+                        }
+                    }
+
+                    par.parentNode.replaceChild(newUl, par);
+                    newUl.appendChild(par);
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(par.firstChild, 1, par.firstChild, par.firstChild.innerText.length);
+                        if (!this.browser.webkit3) {
+                            par.parentNode.parentNode.style.display = 'list-item';
+                            setTimeout(function() {
+                                par.parentNode.parentNode.style.display = 'block';
+                            }, 1);
+                        }
+                    } else if (this.browser.ie) {
+                        range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(par);
+                        range.collapse(false);
+                        range.select();
+                    } else {
+                        this._selectNode(par);
+                    }
+                    Event.stopEvent(ev);
+                }
+                if (this.browser.webkit) {
+                    Event.stopEvent(ev);
+                }
+                this.nodeChange();
+            }
+        },
+        /**
+        * @method nodeChange
+        * @param {Boolean} force Optional paramenter to skip the threshold counter
+        * @description Handles setting up the toolbar buttons, getting the Dom path, fixing nodes.
+        */
+        nodeChange: function(force) {
+            var NCself = this;
+            this._storeUndo();
+            if (this.get('nodeChangeDelay')) {
+                this._nodeChangeDelayTimer = window.setTimeout(function() {
+                    NCself._nodeChangeDelayTimer = null;
+                    NCself._nodeChange.apply(NCself, arguments);
+                }, 0);
+            } else {
+                this._nodeChange();
+            }
+        },
+        /**
+        * @private
+        * @method _nodeChange
+        * @param {Boolean} force Optional paramenter to skip the threshold counter
+        * @description Fired from nodeChange in a setTimeout.
+        */
+        _nodeChange: function(force) {
+            var threshold = parseInt(this.get('nodeChangeThreshold'), 10),
+                thisNodeChange = Math.round(new Date().getTime() / 1000),
+                self = this;
+
+            if (force === true) {
+                this._lastNodeChange = 0;
+            }
+            
+            if ((this._lastNodeChange + threshold) < thisNodeChange) {
+                if (this._fixNodesTimer === null) {
+                    this._fixNodesTimer = window.setTimeout(function() {
+                        self._fixNodes.call(self);
+                        self._fixNodesTimer = null;
+                    }, 0);
+                }
+            }
+            this._lastNodeChange = thisNodeChange;
+            if (this.currentEvent) {
+                try {
+                    this._lastNodeChangeEvent = this.currentEvent.type;
+                } catch (e) {}
+            }
+
+            var beforeNodeChange = this.fireEvent('beforeNodeChange', { type: 'beforeNodeChange', target: this });
+            if (beforeNodeChange === false) {
+                return false;
+            }
+            if (this.get('dompath')) {
+                window.setTimeout(function() {
+                    self._writeDomPath.call(self);
+                }, 0);
+            }
+            //Check to see if we are disabled before continuing
+            if (!this.get('disabled')) {
+                if (this.STOP_NODE_CHANGE) {
+                    //Reset this var for next action
+                    this.STOP_NODE_CHANGE = false;
+                    return false;
+                } else {
+                    var sel = this._getSelection(),
+                        range = this._getRange(),
+                        el = this._getSelectedElement(),
+                        fn_button = this.toolbar.getButtonByValue('fontname'),
+                        fs_button = this.toolbar.getButtonByValue('fontsize'),
+                        undo_button = this.toolbar.getButtonByValue('undo'),
+                        redo_button = this.toolbar.getButtonByValue('redo');
+
+                    //Handle updating the toolbar with active buttons
+                    var _ex = {};
+                    if (this._lastButton) {
+                        _ex[this._lastButton.id] = true;
+                        //this._lastButton = null;
+                    }
+                    if (!this._isElement(el, 'body')) {
+                        if (fn_button) {
+                            _ex[fn_button.get('id')] = true;
+                        }
+                        if (fs_button) {
+                            _ex[fs_button.get('id')] = true;
+                        }
+                    }
+                    if (redo_button) {
+                        delete _ex[redo_button.get('id')];
+                    }
+                    this.toolbar.resetAllButtons(_ex);
+
+                    //Handle disabled buttons
+                    for (var d = 0; d < this._disabled.length; d++) {
+                        var _button = this.toolbar.getButtonByValue(this._disabled[d]);
+                        if (_button && _button.get) {
+                            if (this._lastButton && (_button.get('id') === this._lastButton.id)) {
+                                //Skip
+                            } else {
+                                if (!this._hasSelection() && !this.get('insert')) {
+                                    switch (this._disabled[d]) {
+                                        case 'fontname':
+                                        case 'fontsize':
+                                            break;
+                                        default:
+                                            //No Selection - disable
+                                            this.toolbar.disableButton(_button);
+                                    }
+                                } else {
+                                    if (!this._alwaysDisabled[this._disabled[d]]) {
+                                        this.toolbar.enableButton(_button);
+                                    }
+                                }
+                                if (!this._alwaysEnabled[this._disabled[d]]) {
+                                    this.toolbar.deselectButton(_button);
+                                }
+                            }
+                        }
+                    }
+                    var path = this._getDomPath();
+                    var tag = null, cmd = null;
+                    for (var i = 0; i < path.length; i++) {
+                        tag = path[i].tagName.toLowerCase();
+                        if (path[i].getAttribute('tag')) {
+                            tag = path[i].getAttribute('tag').toLowerCase();
+                        }
+                        cmd = this._tag2cmd[tag];
+                        if (cmd === undefined) {
+                            cmd = [];
+                        }
+                        if (!Lang.isArray(cmd)) {
+                            cmd = [cmd];
+                        }
+
+                        //Bold and Italic styles
+                        if (path[i].style.fontWeight.toLowerCase() == 'bold') {
+                            cmd[cmd.length] = 'bold';
+                        }
+                        if (path[i].style.fontStyle.toLowerCase() == 'italic') {
+                            cmd[cmd.length] = 'italic';
+                        }
+                        if (path[i].style.textDecoration.toLowerCase() == 'underline') {
+                            cmd[cmd.length] = 'underline';
+                        }
+                        if (path[i].style.textDecoration.toLowerCase() == 'line-through') {
+                            cmd[cmd.length] = 'strikethrough';
+                        }
+                        if (cmd.length > 0) {
+                            for (var j = 0; j < cmd.length; j++) {
+                                this.toolbar.selectButton(cmd[j]);
+                                this.toolbar.enableButton(cmd[j]);
+                            }
+                        }
+                        //Handle Alignment
+                        switch (path[i].style.textAlign.toLowerCase()) {
+                            case 'left':
+                            case 'right':
+                            case 'center':
+                            case 'justify':
+                                var alignType = path[i].style.textAlign.toLowerCase();
+                                if (path[i].style.textAlign.toLowerCase() == 'justify') {
+                                    alignType = 'full';
+                                }
+                                this.toolbar.selectButton('justify' + alignType);
+                                this.toolbar.enableButton('justify' + alignType);
+                                break;
+                        }
+                    }
+                    //After for loop
+
+                    //Reset Font Family and Size to the inital configs
+                    if (fn_button) {
+                        var family = fn_button._configs.label._initialConfig.value;
+                        fn_button.set('label', '<span class="yui-toolbar-fontname-' + this._cleanClassName(family) + '">' + family + '</span>');
+                        this._updateMenuChecked('fontname', family);
+                    }
+
+                    if (fs_button) {
+                        fs_button.set('label', fs_button._configs.label._initialConfig.value);
+                    }
+
+                    var hd_button = this.toolbar.getButtonByValue('heading');
+                    if (hd_button) {
+                        hd_button.set('label', hd_button._configs.label._initialConfig.value);
+                        this._updateMenuChecked('heading', 'none');
+                    }
+                    var img_button = this.toolbar.getButtonByValue('insertimage');
+                    if (img_button && this.currentWindow && (this.currentWindow.name == 'insertimage')) {
+                        this.toolbar.disableButton(img_button);
+                    }
+                    if (this._lastButton && this._lastButton.isSelected) {
+                        this.toolbar.deselectButton(this._lastButton.id);
+                    }
+                    this._undoNodeChange();
+                }
+            }
+
+            this.fireEvent('afterNodeChange', { type: 'afterNodeChange', target: this });
+        },
+        /**
+        * @private
+        * @method _updateMenuChecked
+        * @param {Object} button The command identifier of the button you want to check
+        * @param {String} value The value of the menu item you want to check
+        * @param {<a href="YAHOO.widget.Toolbar.html">YAHOO.widget.Toolbar</a>} The Toolbar instance the button belongs to (defaults to this.toolbar) 
+        * @description Gets the menu from a button instance, if the menu is not rendered it will render it. It will then search the menu for the specified value, unchecking all other items and checking the specified on.
+        */
+        _updateMenuChecked: function(button, value, tbar) {
+            if (!tbar) {
+                tbar = this.toolbar;
+            }
+            var _button = tbar.getButtonByValue(button);
+            _button.checkValue(value);
+        },
+        /**
+        * @private
+        * @method _handleToolbarClick
+        * @param {Event} ev The event that triggered the button click
+        * @description This is an event handler attached to the Toolbar's buttonClick event. It will fire execCommand with the command identifier from the Toolbar Button.
+        */
+        _handleToolbarClick: function(ev) {
+            var value = '';
+            var str = '';
+            var cmd = ev.button.value;
+            if (ev.button.menucmd) {
+                value = cmd;
+                cmd = ev.button.menucmd;
+            }
+            this._lastButton = ev.button;
+            if (this.STOP_EXEC_COMMAND) {
+                YAHOO.log('execCommand skipped because we found the STOP_EXEC_COMMAND flag set to true', 'warn', 'SimpleEditor');
+                YAHOO.log('NOEXEC::execCommand::(' + cmd + '), (' + value + ')', 'warn', 'SimpleEditor');
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            } else {
+                this.execCommand(cmd, value);
+                if (!this.browser.webkit) {
+                     var Fself = this;
+                     setTimeout(function() {
+                         Fself.focus.call(Fself);
+                     }, 5);
+                 }
+            }
+            Event.stopEvent(ev);
+        },
+        /**
+        * @private
+        * @method _setupAfterElement
+        * @description Creates the accessibility h2 header and places it after the iframe in the Dom for navigation.
+        */
+        _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);
+            }
+        },
+        /**
+        * @private
+        * @method _disableEditor
+        * @param {Boolean} disabled Pass true to disable, false to enable
+        * @description Creates a mask to place over the Editor.
+        */
+        _disableEditor: function(disabled) {
+            var iframe, par, html, height;
+            if (!this.get('disabled_iframe')) {
+                iframe = this._createIframe();
+                iframe.set('id', 'disabled_' + this.get('iframe').get('id'));
+                iframe.setStyle('height', '100%');
+                iframe.setStyle('display', 'none');
+                iframe.setStyle('visibility', 'visible');
+                this.set('disabled_iframe', iframe);
+                par = this.get('iframe').get('parentNode');
+                par.appendChild(iframe.get('element'));
+            }
+            if (!iframe) {
+                iframe = this.get('disabled_iframe');
+            }
+            if (disabled) {
+                this._orgIframe = this.get('iframe');
+
+                if (this.toolbar) {
+                    this.toolbar.set('disabled', true);
+                }
+
+                html = this.getEditorHTML();
+                height = this.get('iframe').get('offsetHeight');
+                iframe.setStyle('visibility', '');
+                iframe.setStyle('position', '');
+                iframe.setStyle('top', '');
+                iframe.setStyle('left', '');
+                this._orgIframe.setStyle('visibility', 'hidden');
+                this._orgIframe.setStyle('position', 'absolute');
+                this._orgIframe.setStyle('top', '-99999px');
+                this._orgIframe.setStyle('left', '-99999px');
+                this.set('iframe', iframe);
+                this._setInitialContent(true);
+                
+                if (!this._mask) {
+                    this._mask = document.createElement('DIV');
+                    Dom.addClass(this._mask, 'yui-editor-masked');
+                    if (this.browser.ie) {
+                        this._mask.style.height = height + 'px';
+                    }
+                    this.get('iframe').get('parentNode').appendChild(this._mask);
+                }
+                this.on('editorContentReloaded', function() {
+                    this._getDoc().body._rteLoaded = false;
+                    this.setEditorHTML(html);
+                    iframe.setStyle('display', 'block');
+                    this.unsubscribeAll('editorContentReloaded');
+                });
+            } else {
+                if (this._mask) {
+                    this._mask.parentNode.removeChild(this._mask);
+                    this._mask = null;
+                    if (this.toolbar) {
+                        this.toolbar.set('disabled', false);
+                    }
+                    iframe.setStyle('visibility', 'hidden');
+                    iframe.setStyle('position', 'absolute');
+                    iframe.setStyle('top', '-99999px');
+                    iframe.setStyle('left', '-99999px');
+                    this._orgIframe.setStyle('visibility', '');
+                    this._orgIframe.setStyle('position', '');
+                    this._orgIframe.setStyle('top', '');
+                    this._orgIframe.setStyle('left', '');
+                    this.set('iframe', this._orgIframe);
+
+                    this.focus();
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.nodeChange.call(self);
+                    }, 100);
+                }
+            }
+        },
+        /**
+        * @property SEP_DOMPATH
+        * @description The value to place in between the Dom path items
+        * @type String
+        */
+        SEP_DOMPATH: '<',
+        /**
+        * @property STR_LEAVE_EDITOR
+        * @description The accessibility string for the element after the iFrame
+        * @type String
+        */
+        STR_LEAVE_EDITOR: 'You have left the Rich Text Editor.',
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        STR_BEFORE_EDITOR: 'This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Shift + Escape to place focus on the toolbar and navigate between options with your arrow keys. To exit this text editor use the Escape key and continue tabbing. <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></ul>',
+        /**
+        * @property STR_TITLE
+        * @description The Title of the HTML document that is created in the iFrame
+        * @type String
+        */
+        STR_TITLE: 'Rich Text Area.',
+        /**
+        * @property STR_IMAGE_HERE
+        * @description The text to place in the URL textbox when using the blankimage.
+        * @type String
+        */
+        STR_IMAGE_HERE: 'Image URL Here',
+        /**
+        * @property STR_IMAGE_URL
+        * @description The label string for Image URL
+        * @type String
+        */
+        STR_IMAGE_URL: 'Image URL',        
+        /**
+        * @property STR_LINK_URL
+        * @description The label string for the Link URL.
+        * @type String
+        */
+        STR_LINK_URL: 'Link URL',
+        /**
+        * @protected
+        * @property STOP_EXEC_COMMAND
+        * @description Set to true when you want the default execCommand function to not process anything
+        * @type Boolean
+        */
+        STOP_EXEC_COMMAND: false,
+        /**
+        * @protected
+        * @property STOP_NODE_CHANGE
+        * @description Set to true when you want the default nodeChange function to not process anything
+        * @type Boolean
+        */
+        STOP_NODE_CHANGE: false,
+        /**
+        * @protected
+        * @property CLASS_NOEDIT
+        * @description CSS class applied to elements that are not editable.
+        * @type String
+        */
+        CLASS_NOEDIT: 'yui-noedit',
+        /**
+        * @protected
+        * @property CLASS_CONTAINER
+        * @description Default CSS class to apply to the editors container element
+        * @type String
+        */
+        CLASS_CONTAINER: 'yui-editor-container',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE
+        * @description Default CSS class to apply to the editors iframe element
+        * @type String
+        */
+        CLASS_EDITABLE: 'yui-editor-editable',
+        /**
+        * @protected
+        * @property CLASS_EDITABLE_CONT
+        * @description Default CSS class to apply to the editors iframe's parent element
+        * @type String
+        */
+        CLASS_EDITABLE_CONT: 'yui-editor-editable-container',
+        /**
+        * @protected
+        * @property CLASS_PREFIX
+        * @description Default prefix for dynamically created class names
+        * @type String
+        */
+        CLASS_PREFIX: 'yui-editor',
+        /** 
+        * @property browser
+        * @description Standard browser detection
+        * @type Object
+        */
+        browser: function() {
+            var br = YAHOO.env.ua;
+            //Check for webkit3
+            if (br.webkit >= 420) {
+                br.webkit3 = br.webkit;
+            } else {
+                br.webkit3 = 0;
+            }
+            if (br.webkit >= 530) {
+                br.webkit4 = br.webkit;
+            } else {
+                br.webkit4 = 0;
+            }
+            br.mac = false;
+            //Check for Mac
+            if (navigator.userAgent.indexOf('Macintosh') !== -1) {
+                br.mac = true;
+            }
+
+            return br;
+        }(),
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.log('init', 'info', 'SimpleEditor');
+
+            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: 'push', label: 'Strike Through', value: 'strikethrough' },
+                                { 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, p_oElement, p_oAttributes);
+            YAHOO.widget.EditorInfo._instances[this.get('id')] = this;
+
+
+            this.currentElement = [];
+            this.on('contentReady', function() {
+                this.DOMReady = true;
+                this.fireQueue();
+            }, this, true);
+
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this, attr);
+            var self = this;
+
+            /**
+            * @config setDesignMode
+            * @description Should the Editor set designMode on the document. Default: true.
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig('setDesignMode', {
+                value: ((attr.setDesignMode === false) ? false : true)
+            });
+            /**
+            * @config nodeChangeDelay
+            * @description Do we wrap the nodeChange method in a timeout for performance. Default: true.
+            * @default true
+            * @type Boolean
+            */
+            this.setAttributeConfig('nodeChangeDelay', {
+                value: ((attr.nodeChangeDelay === false) ? false : true)
+            });
+            /**
+            * @config maxUndo
+            * @description The max number of undo levels to store.
+            * @default 30
+            * @type Number
+            */
+            this.setAttributeConfig('maxUndo', {
+                writeOnce: true,
+                value: attr.maxUndo || 30
+            });
+
+            /**
+            * @config ptags
+            * @description If true, the editor uses &lt;P&gt; tags instead of &lt;br&gt; tags. (Use Shift + Enter to get a &lt;br&gt;)
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('ptags', {
+                writeOnce: true,
+                value: attr.ptags || false
+            });
+            /**
+            * @config insert
+            * @description If true, selection is not required for: fontname, fontsize, forecolor, backcolor.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('insert', {
+                writeOnce: true,
+                value: attr.insert || false,
+                method: function(insert) {
+                    if (insert) {
+                        var buttons = {
+                            fontname: true,
+                            fontsize: true,
+                            forecolor: true,
+                            backcolor: true
+                        };
+                        var tmp = this._defaultToolbar.buttons;
+                        for (var i = 0; i < tmp.length; i++) {
+                            if (tmp[i].buttons) {
+                                for (var a = 0; a < tmp[i].buttons.length; a++) {
+                                    if (tmp[i].buttons[a].value) {
+                                        if (buttons[tmp[i].buttons[a].value]) {
+                                            delete tmp[i].buttons[a].disabled;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            });
+            /**
+            * @config container
+            * @description Used when dynamically creating the Editor from Javascript with no default textarea.
+            * We will create one and place it in this container. If no container is passed we will append to document.body.
+            * @default false
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('container', {
+                writeOnce: true,
+                value: attr.container || false
+            });
+            /**
+            * @config plainText
+            * @description Process the inital textarea data as if it was plain text. Accounting for spaces, tabs and line feeds.
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('plainText', {
+                writeOnce: true,
+                value: attr.plainText || false
+            });
+            /**
+            * @private
+            * @config iframe
+            * @description Internal config for holding the iframe element.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('iframe', {
+                value: null
+            });
+            /**
+            * @private
+            * @config disabled_iframe
+            * @description Internal config for holding the iframe element used when disabling the Editor.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('disabled_iframe', {
+                value: null
+            });
+            /**
+            * @private
+            * @depreciated - No longer used, should use this.get('element')
+            * @config textarea
+            * @description Internal config for holding the textarea element (replaced with element).
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('textarea', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @config nodeChangeThreshold
+            * @description The number of seconds that need to be in between nodeChange processing
+            * @default 3
+            * @type Number
+            */            
+            this.setAttributeConfig('nodeChangeThreshold', {
+                value: attr.nodeChangeThreshold || 3,
+                validator: YAHOO.lang.isNumber
+            });
+            /**
+            * @config allowNoEdit
+            * @description Should the editor check for non-edit fields. It should be noted that this technique is not perfect. If the user does the right things, they will still be able to make changes.
+            * Such as highlighting an element below and above the content and hitting a toolbar button or a shortcut key.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('allowNoEdit', {
+                value: attr.allowNoEdit || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config limitCommands
+            * @description Should the Editor limit the allowed execCommands to the ones available in the toolbar. If true, then execCommand and keyboard shortcuts will fail if they are not defined in the toolbar.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('limitCommands', {
+                value: attr.limitCommands || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            /**
+            * @config element_cont
+            * @description Internal config for the editors container
+            * @default false
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('element_cont', {
+                value: attr.element_cont
+            });
+            /**
+            * @private
+            * @config editor_wrapper
+            * @description The outter wrapper for the entire editor.
+            * @default null
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('editor_wrapper', {
+                value: attr.editor_wrapper || null,
+                writeOnce: true
+            });
+            /**
+            * @attribute height
+            * @description The height of the editor iframe container, not including the toolbar..
+            * @default Best guessed size of the textarea, for best results use CSS to style the height of the textarea or pass it in as an argument
+            * @type String
+            */
+            this.setAttributeConfig('height', {
+                value: attr.height || Dom.getStyle(self.get('element'), 'height'),
+                method: function(height) {
+                    if (this._rendered) {
+                        //We have been rendered, change the height
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('iframe').get('parentNode'), {
+                                height: {
+                                    to: parseInt(height, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', height);
+                        }
+                    }
+                }
+            });
+            /**
+            * @config autoHeight
+            * @description Remove the scrollbars from the edit area and resize it to fit the content. It will not go any lower than the current config height.
+            * @default false
+            * @type Boolean || Number
+            */
+            this.setAttributeConfig('autoHeight', {
+                value: attr.autoHeight || false,
+                method: function(a) {
+                    if (a) {
+                        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);
+                    }
+                }
+            });
+            /**
+            * @attribute width
+            * @description The width of the editor container.
+            * @default Best guessed size of the textarea, for best results use CSS to style the width of the textarea or pass it in as an argument
+            * @type String
+            */            
+            this.setAttributeConfig('width', {
+                value: attr.width || Dom.getStyle(this.get('element'), 'width'),
+                method: function(width) {
+                    if (this._rendered) {
+                        //We have been rendered, change the width
+                        if (this.get('animate')) {
+                            var anim = new YAHOO.util.Anim(this.get('element_cont').get('element'), {
+                                width: {
+                                    to: parseInt(width, 10)
+                                }
+                            }, 0.5);
+                            anim.animate();
+                        } else {
+                            this.get('element_cont').setStyle('width', width);
+                        }
+                    }
+                }
+            });
+                        
+            /**
+            * @attribute blankimage
+            * @description The URL for the image placeholder to put in when inserting an image.
+            * @default The yahooapis.com address for the current release + 'assets/blankimage.png'
+            * @type String
+            */            
+            this.setAttributeConfig('blankimage', {
+                value: attr.blankimage || this._getBlankImage()
+            });
+            /**
+            * @attribute css
+            * @description The Base CSS used to format the content of the editor
+            * @default <code><pre>html {
+                height: 95%;
+            }
+            body {
+                height: 100%;
+                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: pointer;
+            }
+            .warning-localfile {
+                border-bottom: 1px dashed red !important;
+            }
+            .yui-busy {
+                cursor: wait !important;
+            }
+            img.selected { //Safari image selection
+                border: 2px dotted #808080;
+            }
+            img {
+                cursor: pointer !important;
+                border: none;
+            }
+            </pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('css', {
+                value: attr.css || this._defaultCSS,
+                writeOnce: true
+            });
+            /**
+            * @attribute html
+            * @description The default HTML to be written to the iframe document before the contents are loaded (Note that the DOCTYPE attr will be added at render item)
+            * @default This HTML requires a few things if you are to override:
+                <p><code>{TITLE}, {CSS}, {HIDDEN_CSS}, {EXTRA_CSS}</code> and <code>{CONTENT}</code> need to be there, they are passed to YAHOO.lang.substitute to be replace with other strings.<p>
+                <p><code>onload="document.body._rteLoaded = true;"</code> : the onload statement must be there or the editor will not finish loading.</p>
+                <code>
+                <pre>
+                &lt;html&gt;
+                    &lt;head&gt;
+                        &lt;title&gt;{TITLE}&lt;/title&gt;
+                        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
+                        &lt;style&gt;
+                        {CSS}
+                        &lt;/style&gt;
+                        &lt;style&gt;
+                        {HIDDEN_CSS}
+                        &lt;/style&gt;
+                        &lt;style&gt;
+                        {EXTRA_CSS}
+                        &lt;/style&gt;
+                    &lt;/head&gt;
+                &lt;body onload="document.body._rteLoaded = true;"&gt;
+                {CONTENT}
+                &lt;/body&gt;
+                &lt;/html&gt;
+                </pre>
+                </code>
+            * @type String
+            */            
+            this.setAttributeConfig('html', {
+                value: attr.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
+            });
+
+            /**
+            * @attribute extracss
+            * @description Extra user defined css to load after the default SimpleEditor CSS
+            * @default ''
+            * @type String
+            */            
+            this.setAttributeConfig('extracss', {
+                value: attr.extracss || '',
+                writeOnce: true
+            });
+
+            /**
+            * @attribute handleSubmit
+            * @description Config handles if the editor will attach itself to the textareas parent form's submit handler.
+            If it is set to true, the editor will attempt to attach a submit listener to the textareas parent form.
+            Then it will trigger the editors save handler and place the new content back into the text area before the form is submitted.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('handleSubmit', {
+                value: attr.handleSubmit || false,
+                method: function(exec) {
+                    if (this.get('element').form) {
+                        if (!this._formButtons) {
+                            this._formButtons = [];
+                        }
+                        if (exec) {
+                            Event.on(this.get('element').form, 'submit', this._handleFormSubmit, this, true);
+                            var i = this.get('element').form.getElementsByTagName('input');
+                            for (var s = 0; s < i.length; s++) {
+                                var type = i[s].getAttribute('type');
+                                if (type && (type.toLowerCase() == 'submit')) {
+                                    Event.on(i[s], 'click', this._handleFormButtonClick, this, true);
+                                    this._formButtons[this._formButtons.length] = i[s];
+                                }
+                            }
+                        } else {
+                            Event.removeListener(this.get('element').form, 'submit', this._handleFormSubmit);
+                            if (this._formButtons) {
+                                Event.removeListener(this._formButtons, 'click', this._handleFormButtonClick);
+                            }
+                        }
+                    }
+                }
+            });
+            /**
+            * @attribute disabled
+            * @description This will toggle the editor's disabled state. When the editor is disabled, designMode is turned off and a mask is placed over the iframe so no interaction can take place.
+            All Toolbar buttons are also disabled so they cannot be used.
+            * @default false
+            * @type Boolean
+            */
+
+            this.setAttributeConfig('disabled', {
+                value: false,
+                method: function(disabled) {
+                    if (this._rendered) {
+                        this._disableEditor(disabled);
+                    }
+                }
+            });
+            /**
+            * @config saveEl
+            * @description When save HTML is called, this element will be updated as well as the source of data.
+            * @default element
+            * @type HTMLElement
+            */
+            this.setAttributeConfig('saveEl', {
+                value: this.get('element')
+            });
+            /**
+            * @config toolbar_cont
+            * @description Internal config for the toolbars container
+            * @default false
+            * @type Boolean
+            */
+            this.setAttributeConfig('toolbar_cont', {
+                value: null,
+                writeOnce: true
+            });
+            /**
+            * @attribute toolbar
+            * @description The default toolbar config.
+            * @type Object
+            */            
+            this.setAttributeConfig('toolbar', {
+                value: attr.toolbar || this._defaultToolbar,
+                writeOnce: true,
+                method: function(toolbar) {
+                    if (!toolbar.buttonType) {
+                        toolbar.buttonType = this._defaultToolbar.buttonType;
+                    }
+                    this._defaultToolbar = toolbar;
+                }
+            });
+            /**
+            * @attribute animate
+            * @description Should the editor animate window movements
+            * @default false unless Animation is found, then true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('animate', {
+                value: ((attr.animate) ? ((YAHOO.util.Anim) ? true : false) : false),
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.util.Anim) {
+                        ret = false;
+                    }
+                    return ret;
+                }
+            });
+            /**
+            * @config panel
+            * @description A reference to the panel we are using for windows.
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('panel', {
+                value: null,
+                writeOnce: true,
+                validator: function(value) {
+                    var ret = true;
+                    if (!YAHOO.widget.Overlay) {
+                        ret = false;
+                    }
+                    return ret;
+                }               
+            });
+            /**
+            * @attribute focusAtStart
+            * @description Should we focus the window when the content is ready?
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('focusAtStart', {
+                value: attr.focusAtStart || false,
+                writeOnce: true,
+                method: function(fs) {
+                    if (fs) {
+                        this.on('editorContentLoaded', function() {
+                            var self = this;
+                            setTimeout(function() {
+                                self.focus.call(self);
+                                self.editorDirty = false;
+                            }, 400);
+                        }, this, true);
+                    }
+                }
+            });
+            /**
+            * @attribute dompath
+            * @description Toggle the display of the current Dom path below the editor
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('dompath', {
+                value: attr.dompath || false,
+                method: function(dompath) {
+                    if (dompath && !this.dompath) {
+                        this.dompath = document.createElement('DIV');
+                        this.dompath.id = this.get('id') + '_dompath';
+                        Dom.addClass(this.dompath, 'dompath');
+                        this.get('element_cont').get('firstChild').appendChild(this.dompath);
+                        if (this.get('iframe')) {
+                            this._writeDomPath();
+                        }
+                    } else if (!dompath && this.dompath) {
+                        this.dompath.parentNode.removeChild(this.dompath);
+                        this.dompath = null;
+                    }
+                }
+            });
+            /**
+            * @attribute markup
+            * @description Should we try to adjust the markup for the following types: semantic, css, default or xhtml
+            * @default "semantic"
+            * @type String
+            */            
+            this.setAttributeConfig('markup', {
+                value: attr.markup || 'semantic',
+                validator: function(markup) {
+                    switch (markup.toLowerCase()) {
+                        case 'semantic':
+                        case 'css':
+                        case 'default':
+                        case 'xhtml':
+                        return true;
+                    }
+                    return false;
+                }
+            });
+            /**
+            * @attribute removeLineBreaks
+            * @description Should we remove linebreaks and extra spaces on cleanup
+            * @default false
+            * @type Boolean
+            */            
+            this.setAttributeConfig('removeLineBreaks', {
+                value: attr.removeLineBreaks || false,
+                validator: YAHOO.lang.isBoolean
+            });
+            
+            /**
+            * @config drag
+            * @description Set this config to make the Editor draggable, pass 'proxy' to make use YAHOO.util.DDProxy.
+            * @type {Boolean/String}
+            */
+            this.setAttributeConfig('drag', {
+                writeOnce: true,
+                value: attr.drag || false
+            });
+
+            /**
+            * @config resize
+            * @description Set this to true to make the Editor Resizable with YAHOO.util.Resize. The default config is available: myEditor._resizeConfig
+            * Animation will be ignored while performing this resize to allow for the dynamic change in size of the toolbar.
+            * @type Boolean
+            */
+            this.setAttributeConfig('resize', {
+                writeOnce: true,
+                value: attr.resize || false
+            });
+
+            /**
+            * @config filterWord
+            * @description Attempt to filter out MS Word HTML from the Editor's output.
+            * @type Boolean
+            */
+            this.setAttributeConfig('filterWord', {
+                value: attr.filterWord || false,
+                validator: YAHOO.lang.isBoolean
+            });
+
+        },
+        /**
+        * @private
+        * @method _getBlankImage
+        * @description Retrieves the full url of the image to use as the blank image.
+        * @return {String} The URL to the blank image
+        */
+        _getBlankImage: function() {
+            if (!this.DOMReady) {
+                this._queue[this._queue.length] = ['_getBlankImage', arguments];
+                return '';
+            }
+            var img = '';
+            if (!this._blankImageLoaded) {
+                if (YAHOO.widget.EditorInfo.blankImage) {
+                    this.set('blankimage', YAHOO.widget.EditorInfo.blankImage);
+                    this._blankImageLoaded = true;
+                } else {
+                    var div = document.createElement('div');
+                    div.style.position = 'absolute';
+                    div.style.top = '-9999px';
+                    div.style.left = '-9999px';
+                    div.className = this.CLASS_PREFIX + '-blankimage';
+                    document.body.appendChild(div);
+                    img = YAHOO.util.Dom.getStyle(div, 'background-image');
+                    img = img.replace('url(', '').replace(')', '').replace(/"/g, '');
+                    //Adobe AIR Code
+                    img = img.replace('app:/', '');             
+                    this.set('blankimage', img);
+                    this._blankImageLoaded = true;
+                    div.parentNode.removeChild(div);
+                    YAHOO.widget.EditorInfo.blankImage = img;
+                }
+            } else {
+                img = this.get('blankimage');
+            }
+            return img;
+        },
+        /**
+        * @private
+        * @method _handleAutoHeight
+        * @description Handles resizing the editor's height based on the content
+        */
+        _handleAutoHeight: function() {
+            var doc = this._getDoc(),
+                body = doc.body,
+                docEl = doc.documentElement;
+
+            var height = parseInt(Dom.getStyle(this.get('editor_wrapper'), 'height'), 10);
+            var newHeight = body.scrollHeight;
+            if (this.browser.webkit) {
+                newHeight = docEl.scrollHeight;
+            }
+            if (newHeight < parseInt(this.get('height'), 10)) {
+                newHeight = parseInt(this.get('height'), 10);
+            }
+            if ((height != newHeight) && (newHeight >= parseInt(this.get('height'), 10))) {   
+                var anim = this.get('animate');
+                this.set('animate', false);
+                this.set('height', newHeight + 'px');
+                this.set('animate', anim);
+                if (this.browser.ie) {
+                    //Internet Explorer needs this
+                    this.get('iframe').setStyle('height', '99%');
+                    this.get('iframe').setStyle('zoom', '1');
+                    var self = this;
+                    window.setTimeout(function() {
+                        self.get('iframe').setStyle('height', '100%');
+                    }, 1);
+                }
+            }
+        },
+        /**
+        * @private
+        * @property _formButtons
+        * @description Array of buttons that are in the Editor's parent form (for handleSubmit)
+        * @type Array
+        */
+        _formButtons: null,
+        /**
+        * @private
+        * @property _formButtonClicked
+        * @description The form button that was clicked to submit the form.
+        * @type HTMLElement
+        */
+        _formButtonClicked: null,
+        /**
+        * @private
+        * @method _handleFormButtonClick
+        * @description The click listener assigned to each submit button in the Editor's parent form.
+        * @param {Event} ev The click event
+        */
+        _handleFormButtonClick: function(ev) {
+            var tar = Event.getTarget(ev);
+            this._formButtonClicked = tar;
+        },
+        /**
+        * @private
+        * @method _handleFormSubmit
+        * @description Handles the form submission.
+        * @param {Object} ev The Form Submit Event
+        */
+        _handleFormSubmit: function(ev) {
+            this.saveHTML();
+
+            var form = this.get('element').form,
+                tar = this._formButtonClicked || false;
+
+            Event.removeListener(form, 'submit', this._handleFormSubmit);
+            if (YAHOO.env.ua.ie) {
+                //form.fireEvent("onsubmit");
+                if (tar && !tar.disabled) {
+                    tar.click();
+                }
+            } else {  // Gecko, Opera, and Safari
+                if (tar && !tar.disabled) {
+                    tar.click();
+                }
+                var oEvent = document.createEvent("HTMLEvents");
+                oEvent.initEvent("submit", true, true);
+                form.dispatchEvent(oEvent);
+                if (YAHOO.env.ua.webkit) {
+                    if (YAHOO.lang.isFunction(form.submit)) {
+                        form.submit();
+                    }
+                }
+            }
+            //2.6.0
+            //Removed this, not need since removing Safari 2.x
+            //Event.stopEvent(ev);
+        },
+        /**
+        * @private
+        * @method _handleFontSize
+        * @description Handles the font size button in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleFontSize: function(o) {
+            var button = this.toolbar.getButtonById(o.button.id);
+            var value = button.get('label') + 'px';
+            this.execCommand('fontsize', value);
+            return false;
+        },
+        /**
+        * @private
+        * @description Handles the colorpicker buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleColorPicker: function(o) {
+            var cmd = o.button;
+            var value = '#' + o.color;
+            if ((cmd == 'forecolor') || (cmd == 'backcolor')) {
+                this.execCommand(cmd, value);
+            }
+        },
+        /**
+        * @private
+        * @method _handleAlign
+        * @description Handles the alignment buttons in the toolbar.
+        * @param {Object} o Object returned from Toolbar's buttonClick Event
+        */
+        _handleAlign: function(o) {
+            var cmd = null;
+            for (var i = 0; i < o.button.menu.length; i++) {
+                if (o.button.menu[i].value == o.button.value) {
+                    cmd = o.button.menu[i].value;
+                }
+            }
+            var value = this._getSelection();
+
+            this.execCommand(cmd, value);
+            return false;
+        },
+        /**
+        * @private
+        * @method _handleAfterNodeChange
+        * @description Fires after a nodeChange happens to setup the things that where reset on the node change (button state).
+        */
+        _handleAfterNodeChange: function() {
+            var path = this._getDomPath(),
+                elm = null,
+                family = null,
+                fontsize = null,
+                validFont = false,
+                fn_button = this.toolbar.getButtonByValue('fontname'),
+                fs_button = this.toolbar.getButtonByValue('fontsize'),
+                hd_button = this.toolbar.getButtonByValue('heading');
+
+            for (var i = 0; i < path.length; i++) {
+                elm = path[i];
+
+                var tag = elm.tagName.toLowerCase();
+
+
+                if (elm.getAttribute('tag')) {
+                    tag = elm.getAttribute('tag');
+                }
+
+                family = elm.getAttribute('face');
+                if (Dom.getStyle(elm, 'font-family')) {
+                    family = Dom.getStyle(elm, 'font-family');
+                    //Adobe AIR Code
+                    family = family.replace(/'/g, '');                    
+                }
+
+                if (tag.substring(0, 1) == 'h') {
+                    if (hd_button) {
+                        for (var h = 0; h < hd_button._configs.menu.value.length; h++) {
+                            if (hd_button._configs.menu.value[h].value.toLowerCase() == tag) {
+                                hd_button.set('label', hd_button._configs.menu.value[h].text);
+                            }
+                        }
+                        this._updateMenuChecked('heading', tag);
+                    }
+                }
+            }
+
+            if (fn_button) {
+                for (var b = 0; b < fn_button._configs.menu.value.length; b++) {
+                    if (family && fn_button._configs.menu.value[b].text.toLowerCase() == family.toLowerCase()) {
+                        validFont = true;
+                        family = fn_button._configs.menu.value[b].text; //Put the proper menu name in the button
+                    }
+                }
+                if (!validFont) {
+                    family = fn_button._configs.label._initialConfig.value;
+                }
+                var familyLabel = '<span class="yui-toolbar-fontname-' + this._cleanClassName(family) + '">' + family + '</span>';
+                if (fn_button.get('label') != familyLabel) {
+                    fn_button.set('label', familyLabel);
+                    this._updateMenuChecked('fontname', family);
+                }
+            }
+
+            if (fs_button) {
+                fontsize = parseInt(Dom.getStyle(elm, 'fontSize'), 10);
+                if ((fontsize === null) || isNaN(fontsize)) {
+                    fontsize = fs_button._configs.label._initialConfig.value;
+                }
+                fs_button.set('label', ''+fontsize);
+            }
+            
+            if (!this._isElement(elm, 'body') && !this._isElement(elm, 'img')) {
+                this.toolbar.enableButton(fn_button);
+                this.toolbar.enableButton(fs_button);
+                this.toolbar.enableButton('forecolor');
+                this.toolbar.enableButton('backcolor');
+            }
+            if (this._isElement(elm, 'img')) {
+                if (YAHOO.widget.Overlay) {
+                    this.toolbar.enableButton('createlink');
+                }
+            }
+            if (this._hasParent(elm, 'blockquote')) {
+                this.toolbar.selectButton('indent');
+                this.toolbar.disableButton('indent');
+                this.toolbar.enableButton('outdent');
+            }
+            if (this._hasParent(elm, 'ol') || this._hasParent(elm, 'ul')) {
+                this.toolbar.disableButton('indent');
+            }
+            this._lastButton = null;
+            
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    YAHOO.log('Toolbar Button for (insertimage) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+            var _handleAEC = function() {
+                var el = this.currentElement[0],
+                    src = 'http://';
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                        }
+                    }
+                }
+                var str = prompt(this.STR_IMAGE_URL + ': ', src);
+                if ((str !== '') && (str !== null)) {
+                    el.setAttribute('src', str);
+                } else if (str === '') {
+                    el.parentNode.removeChild(el);
+                    this.currentElement = [];
+                    this.nodeChange();
+                } else if ((str === null)) {
+                    src = el.getAttribute('src', 2);
+                    if (src.indexOf(this.get('blankimage')) != -1) {
+                        el.parentNode.removeChild(el);
+                        this.currentElement = [];
+                        this.nodeChange();
+                    }
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+                this.unsubscribe('afterExecCommand', _handleAEC, this, true);
+            };
+            this.on('afterExecCommand', _handleAEC, this, true);
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            this.nodeChange();
+        },
+        /**
+        * @private
+        * @method _isLocalFile
+        * @param {String} url THe url/string to check
+        * @description Checks to see if a string (href or img src) is possibly a local file reference..
+        */
+        _isLocalFile: function(url) {
+            if ((url) && (url !== '') && ((url.indexOf('file:/') != -1) || (url.indexOf(':\\') != -1))) {
+                return true;
+            }
+            return false;
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkClick
+        * @description Handles the opening of the Link Properties Window when the Create Link button is clicked or an href is doubleclicked.
+        */
+        _handleCreateLinkClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('createlink')) {
+                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'SimpleEditor');
+                    return false;
+                }
+            }
+        
+            this.toolbar.set('disabled', true); //Disable the toolbar when the prompt is showing
+
+            var _handleAEC = function() {
+                var el = this.currentElement[0],
+                    url = '';
+
+                if (el) {
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                    }
+                }
+                var str = prompt(this.STR_LINK_URL + ': ', url);
+                if ((str !== '') && (str !== null)) {
+                    var urlValue = str;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            /* :// not found adding */
+                            if (urlValue.substring(0, 1) != '#') {
+                                //urlValue = 'http:/'+'/' + urlValue;
+                            }
+                        }
+                    }
+                    el.setAttribute('href', urlValue);
+                } else if (str !== null) {
+                    var _span = this._getDoc().createElement('span');
+                    _span.innerHTML = el.innerHTML;
+                    Dom.addClass(_span, 'yui-non');
+                    el.parentNode.replaceChild(_span, el);
+                }
+                this.closeWindow();
+                this.toolbar.set('disabled', false);
+                this.unsubscribe('afterExecCommand', _handleAEC, this, true);
+            };
+            this.on('afterExecCommand', _handleAEC, this);
+
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            this.nodeChange();
+            this.currentElement = [];
+        },
+        /**
+        * @method render
+        * @description Calls the private method _render in a setTimeout to allow for other things on the page to continue to load.
+        */
+        render: function() {
+            if (this._rendered) {
+                return false;
+            }
+            YAHOO.log('Render', 'info', 'SimpleEditor');
+            if (!this.DOMReady) {
+                YAHOO.log('!DOMReady', 'info', 'SimpleEditor');
+                this._queue[this._queue.length] = ['render', arguments];
+                return false;
+            }
+            if (this.get('element')) {
+                if (this.get('element').tagName) {
+                    this._textarea = true;
+                    if (this.get('element').tagName.toLowerCase() !== 'textarea') {
+                        this._textarea = false;
+                    }
+                } else {
+                    YAHOO.log('No Valid Element', 'error', 'SimpleEditor');
+                    return false;
+                }
+            } else {
+                YAHOO.log('No Element', 'error', 'SimpleEditor');
+                return false;
+            }
+            this._rendered = true;
+            var self = this;
+            window.setTimeout(function() {
+                self._render.call(self);
+            }, 4);
+        },
+        /**
+        * @private
+        * @method _render
+        * @description Causes the toolbar and the editor to render and replace the textarea.
+        */
+        _render: function() {
+            var self = 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() {
+                self._setInitialContent.call(self);
+            }, 10);
+
+            this.get('editor_wrapper').appendChild(this.get('iframe').get('element'));
+
+            if (this.get('disabled')) {
+                this._disableEditor(true);
+            }
+
+            var tbarConf = this.get('toolbar');
+            //Create Toolbar instance
+            if (tbarConf instanceof Toolbar) {
+                this.toolbar = tbarConf;
+                //Set the toolbar to disabled until content is loaded
+                this.toolbar.set('disabled', true);
+            } else {
+                //Set the toolbar to disabled until content is loaded
+                tbarConf.disabled = true;
+                this.toolbar = new Toolbar(this.get('toolbar_cont'), tbarConf);
+            }
+
+            YAHOO.log('fireEvent::toolbarLoaded', 'info', 'SimpleEditor');
+            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', this._handleFontSize, this, true);
+            
+            this.toolbar.on('colorPickerClicked', function(o) {
+                this._handleColorPicker(o);
+                return false; //Stop the buttonClick event
+            }, this, true);
+
+            this.toolbar.on('alignClick', this._handleAlign, this, true);
+            this.on('afterNodeChange', this._handleAfterNodeChange, this, true);
+            this.toolbar.on('insertimageClick', this._handleInsertImageClick, this, true);
+            this.on('windowinsertimageClose', this._handleInsertImageWindowClose, this, true);
+            this.toolbar.on('createlinkClick', this._handleCreateLinkClick, this, true);
+            this.on('windowcreatelinkClose', this._handleCreateLinkWindowClose, this, true);
+            
+
+            //Replace Textarea with editable area
+            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');
+
+
+            Dom.addClass(this.get('iframe').get('parentNode'), this.CLASS_EDITABLE_CONT);
+            this.get('iframe').addClass(this.CLASS_EDITABLE);
+
+            //Set height and width of editor container
+            this.get('element_cont').setStyle('width', this.get('width'));
+            Dom.setStyle(this.get('iframe').get('parentNode'), 'height', this.get('height'));
+
+            this.get('iframe').setStyle('width', '100%'); //WIDTH
+            this.get('iframe').setStyle('height', '100%');
+
+            this._setupDD();
+
+            window.setTimeout(function() {
+                self._setupAfterElement.call(self);
+            }, 0);
+            this.fireEvent('afterRender', { type: 'afterRender', target: this });
+        },
+        /**
+        * @method execCommand
+        * @param {String} action The "execCommand" action to try to execute (Example: bold, insertimage, inserthtml)
+        * @param {String} value (optional) The value for a given action such as action: fontname value: 'Verdana'
+        * @description This method attempts to try and level the differences in the various browsers and their support for execCommand actions
+        */
+        execCommand: function(action, value) {
+            var beforeExec = this.fireEvent('beforeExecCommand', { type: 'beforeExecCommand', target: this, args: arguments });
+            if ((beforeExec === false) || (this.STOP_EXEC_COMMAND)) {
+                this.STOP_EXEC_COMMAND = false;
+                return false;
+            }
+            this._lastCommand = action;
+            this._setMarkupType(action);
+            if (this.browser.ie) {
+                this._getWindow().focus();
+            }
+            var exec = true;
+            
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue(action)) {
+                    YAHOO.log('Toolbar Button for (' + action + ') was not found, skipping exec.', 'info', 'SimpleEditor');
+                    exec = false;
+                }
+            }
+
+            this.editorDirty = true;
+            
+            if ((typeof this['cmd_' + action.toLowerCase()] == 'function') && exec) {
+                YAHOO.log('Found execCommand override method: (cmd_' + action.toLowerCase() + ')', 'info', 'SimpleEditor');
+                var retValue = this['cmd_' + action.toLowerCase()](value);
+                exec = retValue[0];
+                if (retValue[1]) {
+                    action = retValue[1];
+                }
+                if (retValue[2]) {
+                    value = retValue[2];
+                }
+            }
+            if (exec) {
+                YAHOO.log('execCommand::(' + action + '), (' + value + ')', 'info', 'SimpleEditor');
+                try {
+                    this._getDoc().execCommand(action, false, value);
+                } catch(e) {
+                    YAHOO.log('execCommand Failed', 'error', 'SimpleEditor');
+                }
+            } else {
+                YAHOO.log('OVERRIDE::execCommand::(' + action + '),(' + value + ') skipped', 'warn', 'SimpleEditor');
+            }
+            this.on('afterExecCommand', function() {
+                this.unsubscribeAll('afterExecCommand');
+                this.nodeChange();
+            }, this, true);
+            this.fireEvent('afterExecCommand', { type: 'afterExecCommand', target: this });
+            
+        },
+    /* {{{  Command Overrides */
+
+        /**
+        * @method cmd_bold
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('bold') is used.
+        */
+        cmd_bold: function(value) {
+            if (!this.browser.webkit) {
+                var el = this._getSelectedElement();
+                if (el && this._isElement(el, 'span') && this._hasSelection()) {
+                    if (el.style.fontWeight == 'bold') {
+                        el.style.fontWeight = '';
+                        var b = this._getDoc().createElement('b'),
+                        par = el.parentNode;
+                        par.replaceChild(b, el);
+                        b.appendChild(el);
+                    }
+                }
+            }
+            return [true];
+        },
+        /**
+        * @method cmd_italic
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('italic') is used.
+        */
+
+        cmd_italic: function(value) {
+            if (!this.browser.webkit) {
+                var el = this._getSelectedElement();
+                if (el && this._isElement(el, 'span') && this._hasSelection()) {
+                    if (el.style.fontStyle == 'italic') {
+                        el.style.fontStyle = '';
+                        var i = this._getDoc().createElement('i'),
+                        par = el.parentNode;
+                        par.replaceChild(i, el);
+                        i.appendChild(el);
+                    }
+                }
+            }
+            return [true];
+        },
+
+
+        /**
+        * @method cmd_underline
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('underline') is used.
+        */
+        cmd_underline: function(value) {
+            if (!this.browser.webkit) {
+                var el = this._getSelectedElement();
+                if (el && this._isElement(el, 'span')) {
+                    if (el.style.textDecoration == 'underline') {
+                        el.style.textDecoration = 'none';
+                    } else {
+                        el.style.textDecoration = 'underline';
+                    }
+                    return [false];
+                }
+            }
+            return [true];
+        },
+        /**
+        * @method cmd_backcolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('backcolor') is used.
+        */
+        cmd_backcolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement(),
+                action = 'backcolor';
+
+            if (this.browser.gecko || this.browser.opera) {
+                this._setEditorStyle(true);
+                action = 'hilitecolor';
+            }
+
+            if (!this._isElement(el, 'body') && !this._hasSelection()) {
+                el.style.backgroundColor = value;
+                this._selectNode(el);
+                exec = false;
+            } else {
+                if (this.get('insert')) {
+                    el = this._createInsertElement({ backgroundColor: value });
+                } else {
+                    this._createCurrentElement('span', { backgroundColor: value, color: el.style.color, fontSize: el.style.fontSize, fontFamily: el.style.fontFamily });
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
+            }
+
+            return [exec, action];
+        },
+        /**
+        * @method cmd_forecolor
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('forecolor') is used.
+        */
+        cmd_forecolor: function(value) {
+            var exec = true,
+                el = this._getSelectedElement();
+                
+                if (!this._isElement(el, 'body') && !this._hasSelection()) {
+                    Dom.setStyle(el, 'color', value);
+                    this._selectNode(el);
+                    exec = false;
+                } else {
+                    if (this.get('insert')) {
+                        el = this._createInsertElement({ color: value });
+                    } else {
+                        this._createCurrentElement('span', { color: value, fontSize: el.style.fontSize, fontFamily: el.style.fontFamily, backgroundColor: el.style.backgroundColor });
+                        this._selectNode(this.currentElement[0]);
+                    }
+                    exec = false;
+                }
+                return [exec];
+        },
+        /**
+        * @method cmd_unlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('unlink') is used.
+        */
+        cmd_unlink: function(value) {
+            this._swapEl(this.currentElement[0], 'span', function(el) {
+                el.className = 'yui-non';
+            });
+            return [false];
+        },
+        /**
+        * @method cmd_createlink
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('createlink') is used.
+        */
+        cmd_createlink: function(value) {
+            var el = this._getSelectedElement(), _a = null;
+            if (this._hasParent(el, 'a')) {
+                this.currentElement[0] = this._hasParent(el, 'a');
+            } else if (this._isElement(el, 'li')) {
+                _a = this._getDoc().createElement('a');
+                _a.innerHTML = el.innerHTML;
+                el.innerHTML = '';
+                el.appendChild(_a);
+                this.currentElement[0] = _a;
+            } else if (!this._isElement(el, 'a')) {
+                this._createCurrentElement('a');
+                _a = this._swapEl(this.currentElement[0], 'a');
+                this.currentElement[0] = _a;
+            } else {
+                this.currentElement[0] = el;
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_insertimage
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertimage') is used.
+        */
+        cmd_insertimage: function(value) {
+            var exec = true, _img = null, action = 'insertimage',
+                el = this._getSelectedElement();
+
+            if (value === '') {
+                value = this.get('blankimage');
+            }
+
+            /*
+            * @knownissue Safari Cursor Position
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            
+            YAHOO.log('InsertImage: ' + el.tagName, 'info', 'SimpleEditor');
+            if (this._isElement(el, 'img')) {
+                this.currentElement[0] = el;
+                exec = false;
+            } else {
+                if (this._getDoc().queryCommandEnabled(action)) {
+                    this._getDoc().execCommand(action, false, value);
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var i = 0; i < imgs.length; i++) {
+                        if (!YAHOO.util.Dom.hasClass(imgs[i], 'yui-img')) {
+                            YAHOO.util.Dom.addClass(imgs[i], 'yui-img');
+                            this.currentElement[0] = imgs[i];
+                        }
+                    }
+                    exec = false;
+                } else {
+                    if (el == this._getDoc().body) {
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this._getDoc().body.appendChild(_img);
+                    } else {
+                        this._createCurrentElement('img');
+                        _img = this._getDoc().createElement('img');
+                        _img.setAttribute('src', value);
+                        YAHOO.util.Dom.addClass(_img, 'yui-img');
+                        this.currentElement[0].parentNode.replaceChild(_img, this.currentElement[0]);
+                    }
+                    this.currentElement[0] = _img;
+                    exec = false;
+                }
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_inserthtml
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('inserthtml') is used.
+        */
+        cmd_inserthtml: function(value) {
+            var exec = true, action = 'inserthtml', _span = null, _range = null;
+            /*
+            * @knownissue Safari cursor position
+            * @browser Safari 2.x
+            * @description The issue here is that we have no way of knowing where the cursor position is
+            * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled(action)) {
+                YAHOO.log('More Safari DOM tricks (inserthtml)', 'info', 'EditorSafari');
+                this._createCurrentElement('img');
+                _span = this._getDoc().createElement('span');
+                _span.innerHTML = value;
+                this.currentElement[0].parentNode.replaceChild(_span, this.currentElement[0]);
+                exec = false;
+            } else if (this.browser.ie) {
+                _range = this._getRange();
+                if (_range.item) {
+                    _range.item(0).outerHTML = value;
+                } else {
+                    _range.pasteHTML(value);
+                }
+                exec = false;                    
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_list
+        * @param tag The tag of the list you want to create (eg, ul or ol)
+        * @description This is a combined execCommand override method. It is called from the cmd_insertorderedlist and cmd_insertunorderedlist methods.
+        */
+        cmd_list: function(tag) {
+            var exec = true, list = null, li = 0, el = null, str = '',
+                selEl = this._getSelectedElement(), action = 'insertorderedlist';
+                if (tag == 'ul') {
+                    action = 'insertunorderedlist';
+                }
+            /*
+            * @knownissue Safari 2.+ doesn't support ordered and unordered lists
+            * @browser Safari 2.x
+            * The issue with this workaround is that when applied to a set of text
+            * that has BR's in it, Safari may or may not pick up the individual items as
+            * list items. This is fixed in WebKit (Safari 3)
+            * 2.6.0: Seems there are still some issues with List Creation and Safari 3, reverting to previously working Safari 2.x code
+            */
+            //if ((this.browser.webkit && !this._getDoc().queryCommandEnabled(action))) {
+            if ((this.browser.webkit && !this.browser.webkit4) || (this.browser.opera)) {
+                if (this._isElement(selEl, 'li') && this._isElement(selEl.parentNode, tag)) {
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    el = selEl.parentNode;
+                    list = this._getDoc().createElement('span');
+                    YAHOO.util.Dom.addClass(list, 'yui-non');
+                    str = '';
+                    var lis = el.getElementsByTagName('li'), p_tag = ((this.browser.opera && this.get('ptags')) ? 'p' : 'div');
+                    for (li = 0; li < lis.length; li++) {
+                        str += '<' + p_tag + '>' + lis[li].innerHTML + '</' + p_tag + '>';
+                    }
+                    list.innerHTML = str;
+                    this.currentElement[0] = el;
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                } else {
+                    YAHOO.log('Create list item', 'info', 'SimpleEditor');
+                    this._createCurrentElement(tag.toLowerCase());
+                    list = this._getDoc().createElement(tag);
+                    for (li = 0; li < this.currentElement.length; li++) {
+                        var newli = this._getDoc().createElement('li');
+                        newli.innerHTML = this.currentElement[li].innerHTML + '<span class="yui-non">&nbsp;</span>&nbsp;';
+                        list.appendChild(newli);
+                        if (li > 0) {
+                            this.currentElement[li].parentNode.removeChild(this.currentElement[li]);
+                        }
+                    }
+                    var b_tag = ((this.browser.opera) ? '<BR>' : '<br>'),
+                    items = list.firstChild.innerHTML.split(b_tag), i, item;
+                    if (items.length > 0) {
+                        list.innerHTML = '';
+                        for (i = 0; i < items.length; i++) {
+                            item = this._getDoc().createElement('li');
+                            item.innerHTML = items[i];
+                            list.appendChild(item);
+                        }
+                    }
+
+                    this.currentElement[0].parentNode.replaceChild(list, this.currentElement[0]);
+                    this.currentElement[0] = list;
+                    var _h = this.currentElement[0].firstChild;
+                    _h = Dom.getElementsByClassName('yui-non', 'span', _h)[0];
+                    if (this.browser.webkit) {
+                        this._getSelection().setBaseAndExtent(_h, 1, _h, _h.innerText.length);
+                    }
+                }
+                exec = false;
+            } else {
+                el = this._getSelectedElement();
+                YAHOO.log(el.tagName);
+                if (this._isElement(el, 'li') && this._isElement(el.parentNode, tag) || (this.browser.ie && this._isElement(this._getRange().parentElement, 'li')) || (this.browser.ie && this._isElement(el, 'ul')) || (this.browser.ie && this._isElement(el, 'ol'))) { //we are in a list..
+                    YAHOO.log('We already have a list, undo it', 'info', 'SimpleEditor');
+                    if (this.browser.ie) {
+                        if ((this.browser.ie && this._isElement(el, 'ul')) || (this.browser.ie && this._isElement(el, 'ol'))) {
+                            el = el.getElementsByTagName('li')[0];
+                        }
+                        YAHOO.log('Undo IE', 'info', 'SimpleEditor');
+                        str = '';
+                        var lis2 = el.parentNode.getElementsByTagName('li');
+                        for (var j = 0; j < lis2.length; j++) {
+                            str += lis2[j].innerHTML + '<br>';
+                        }
+                        var newEl = this._getDoc().createElement('span');
+                        newEl.innerHTML = str;
+                        el.parentNode.parentNode.replaceChild(newEl, el.parentNode);
+                    } else {
+                        this.nodeChange();
+                        this._getDoc().execCommand(action, '', el.parentNode);
+                        this.nodeChange();
+                    }
+                    exec = false;
+                }
+                if (this.browser.opera) {
+                    var self = this;
+                    window.setTimeout(function() {
+                        var liso = self._getDoc().getElementsByTagName('li');
+                        for (var i = 0; i < liso.length; i++) {
+                            if (liso[i].innerHTML.toLowerCase() == '<br>') {
+                                liso[i].parentNode.parentNode.removeChild(liso[i].parentNode);
+                            }
+                        }
+                    },30);
+                }
+                if (this.browser.ie && exec) {
+                    var html = '';
+                    if (this._getRange().html) {
+                        html = '<li>' + this._getRange().html+ '</li>';
+                    } else {
+                        var t = this._getRange().text.split('\n');
+                        if (t.length > 1) {
+                            html = '';
+                            for (var ie = 0; ie < t.length; ie++) {
+                                html += '<li>' + t[ie] + '</li>';
+                            }
+                        } else {
+                            var txt = this._getRange().text;
+                            if (txt === '') {
+                                html = '<li id="new_list_item">' + txt + '</li>';
+                            } else {
+                                html = '<li>' + txt + '</li>';
+                            }
+                        }
+                    }
+                    this._getRange().pasteHTML('<' + tag + '>' + html + '</' + tag + '>');
+                    var new_item = this._getDoc().getElementById('new_list_item');
+                    if (new_item) {
+                        var range = this._getDoc().body.createTextRange();
+                        range.moveToElementText(new_item);
+                        range.collapse(false);
+                        range.select();                       
+                        new_item.id = '';
+                    }
+                    exec = false;
+                }
+            }
+            return exec;
+        },
+        /**
+        * @method cmd_insertorderedlist
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertorderedlist ') is used.
+        */
+        cmd_insertorderedlist: function(value) {
+            return [this.cmd_list('ol')];
+        },
+        /**
+        * @method cmd_insertunorderedlist 
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('insertunorderedlist') is used.
+        */
+        cmd_insertunorderedlist: function(value) {
+            return [this.cmd_list('ul')];
+        },
+        /**
+        * @method cmd_fontname
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontname') is used.
+        */
+        cmd_fontname: function(value) {
+            var exec = true,
+                selEl = this._getSelectedElement();
+
+            this.currentFont = value;
+            if (selEl && selEl.tagName && !this._hasSelection() && !this._isElement(selEl, 'body') && !this.get('insert')) {
+                YAHOO.util.Dom.setStyle(selEl, 'font-family', value);
+                exec = false;
+            } else if (this.get('insert') && !this._hasSelection()) {
+                YAHOO.log('No selection and no selected element and we are in insert mode', 'info', 'SimpleEditor');
+                var el = this._createInsertElement({ fontFamily: value });
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_fontsize
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('fontsize') is used.
+        */
+        cmd_fontsize: function(value) {
+            var el = null, go = true;
+            el = this._getSelectedElement();
+            if (this.browser.webkit) {
+                if (this.currentElement[0]) {
+                    if (el == this.currentElement[0]) {
+                        go = false;
+                        YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                        this._selectNode(el);
+                        this.currentElement[0] = el;
+                    }
+                }
+            }
+            if (go) {
+                if (!this._isElement(this._getSelectedElement(), 'body') && (!this._hasSelection())) {
+                    el = this._getSelectedElement();
+                    YAHOO.util.Dom.setStyle(el, 'fontSize', value);
+                    if (this.get('insert') && this.browser.ie) {
+                        var r = this._getRange();
+                        r.collapse(false);
+                        r.select();
+                    } else {
+                        this._selectNode(el);
+                    }
+                } else if (this.currentElement && (this.currentElement.length > 0) && (!this._hasSelection()) && (!this.get('insert'))) {
+                    YAHOO.util.Dom.setStyle(this.currentElement, 'fontSize', value);
+                } else {
+                    if (this.get('insert') && !this._hasSelection()) {
+                        el = this._createInsertElement({ fontSize: value });
+                        this.currentElement[0] = el;
+                        this._selectNode(this.currentElement[0]);
+                    } else {
+                        this._createCurrentElement('span', {'fontSize': value, fontFamily: el.style.fontFamily, color: el.style.color, backgroundColor: el.style.backgroundColor });
+                        this._selectNode(this.currentElement[0]);
+                    }
+                }
+            }
+            return [false];
+        },
+    /* }}} */
+        /**
+        * @private
+        * @method _swapEl
+        * @param {HTMLElement} el The element to swap with
+        * @param {String} tagName The tagname of the element that you wish to create
+        * @param {Function} callback (optional) A function to run on the element after it is created, but before it is replaced. An element reference is passed to this function.
+        * @description This function will create a new element in the DOM and populate it with the contents of another element. Then it will assume it's place.
+        */
+        _swapEl: function(el, tagName, callback) {
+            var _el = this._getDoc().createElement(tagName);
+            if (el) {
+                _el.innerHTML = el.innerHTML;
+            }
+            if (typeof callback == 'function') {
+                callback.call(this, _el);
+            }
+            if (el) {
+                el.parentNode.replaceChild(_el, el);
+            }
+            return _el;
+        },
+        /**
+        * @private
+        * @method _createInsertElement
+        * @description Creates a new "currentElement" then adds some text (and other things) to make it selectable and stylable. Then the user can continue typing.
+        * @param {Object} css (optional) Object literal containing styles to apply to the new element.
+        * @return {HTMLElement}
+        */
+        _createInsertElement: function(css) {
+            this._createCurrentElement('span', css);
+            var el = this.currentElement[0];
+            if (this.browser.webkit) {
+                //Little Safari Hackery here..
+                el.innerHTML = '<span class="yui-non">&nbsp;</span>';
+                el = el.firstChild;
+                this._getSelection().setBaseAndExtent(el, 1, el, el.innerText.length);                    
+            } else if (this.browser.ie || this.browser.opera) {
+                el.innerHTML = '&nbsp;';
+            }
+            this.focus();
+            this._selectNode(el, true);
+            return el;
+        },
+        /**
+        * @private
+        * @method _createCurrentElement
+        * @param {String} tagName (optional defaults to a) The tagname of the element that you wish to create
+        * @param {Object} tagStyle (optional) Object literal containing styles to apply to the new element.
+        * @description This is a work around for the various browser issues with execCommand. This method will run <code>execCommand('fontname', false, 'yui-tmp')</code> on the given selection.
+        * It will then search the document for an element with the font-family set to <strong>yui-tmp</strong> and replace that with another span that has other information in it, then assign the new span to the 
+        * <code>this.currentElement</code> array, so we now have element references to the elements that were just modified. At this point we can use standard DOM manipulation to change them as we see fit.
+        */
+        _createCurrentElement: function(tagName, tagStyle) {
+            tagName = ((tagName) ? tagName : 'a');
+            var tar = null,
+                el = [],
+                _doc = this._getDoc();
+            
+            if (this.currentFont) {
+                if (!tagStyle) {
+                    tagStyle = {};
+                }
+                tagStyle.fontFamily = this.currentFont;
+                this.currentFont = null;
+            }
+            this.currentElement = [];
+
+            var _elCreate = function(tagName, tagStyle) {
+                var el = null;
+                tagName = ((tagName) ? tagName : 'span');
+                tagName = tagName.toLowerCase();
+                switch (tagName) {
+                    case 'h1':
+                    case 'h2':
+                    case 'h3':
+                    case 'h4':
+                    case 'h5':
+                    case 'h6':
+                        el = _doc.createElement(tagName);
+                        break;
+                    default:
+                        el = _doc.createElement(tagName);
+                        if (tagName === 'span') {
+                            YAHOO.util.Dom.addClass(el, 'yui-tag-' + tagName);
+                            YAHOO.util.Dom.addClass(el, 'yui-tag');
+                            el.setAttribute('tag', tagName);
+                        }
+
+                        for (var k in tagStyle) {
+                            if (YAHOO.lang.hasOwnProperty(tagStyle, k)) {
+                                el.style[k] = tagStyle[k];
+                            }
+                        }
+                        break;
+                }
+                return el;
+            };
+
+            if (!this._hasSelection()) {
+                if (this._getDoc().queryCommandEnabled('insertimage')) {
+                    this._getDoc().execCommand('insertimage', false, 'yui-tmp-img');
+                    var imgs = this._getDoc().getElementsByTagName('img');
+                    for (var j = 0; j < imgs.length; j++) {
+                        if (imgs[j].getAttribute('src', 2) == 'yui-tmp-img') {
+                            el = _elCreate(tagName, tagStyle);
+                            imgs[j].parentNode.replaceChild(el, imgs[j]);
+                            this.currentElement[this.currentElement.length] = el;
+                        }
+                    }
+                } else {
+                    if (this.currentEvent) {
+                        tar = YAHOO.util.Event.getTarget(this.currentEvent);
+                    } else {
+                        //For Safari..
+                        tar = this._getDoc().body;                        
+                    }
+                }
+                if (tar) {
+                    /*
+                    * @knownissue Safari Cursor Position
+                    * @browser Safari 2.x
+                    * @description The issue here is that we have no way of knowing where the cursor position is
+                    * inside of the iframe, so we have to place the newly inserted data in the best place that we can.
+                    */
+                    el = _elCreate(tagName, tagStyle);
+                    if (this._isElement(tar, 'body') || this._isElement(tar, 'html')) {
+                        if (this._isElement(tar, 'html')) {
+                            tar = this._getDoc().body;
+                        }
+                        tar.appendChild(el);
+                    } else if (tar.nextSibling) {
+                        tar.parentNode.insertBefore(el, tar.nextSibling);
+                    } else {
+                        tar.parentNode.appendChild(el);
+                    }
+                    //this.currentElement = el;
+                    this.currentElement[this.currentElement.length] = el;
+                    this.currentEvent = null;
+                    if (this.browser.webkit) {
+                        //Force Safari to focus the new element
+                        this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                        if (this.browser.webkit3) {
+                            this._getSelection().collapseToStart();
+                        } else {
+                            this._getSelection().collapse(true);
+                        }
+                    }
+                }
+            } else {
+                //Force CSS Styling for this action...
+                this._setEditorStyle(true);
+                this._getDoc().execCommand('fontname', false, 'yui-tmp');
+                var _tmp = [], __tmp, __els = ['font', 'span', 'i', 'b', 'u'];
+
+                if (!this._isElement(this._getSelectedElement(), 'body')) {
+                    __els[__els.length] = this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);
+                    __els[__els.length] = this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);
+                }
+                for (var _els = 0; _els < __els.length; _els++) {
+                    var _tmp1 = this._getDoc().getElementsByTagName(__els[_els]);
+                    for (var e = 0; e < _tmp1.length; e++) {
+                        _tmp[_tmp.length] = _tmp1[e];
+                    }
+                }
+
+                
+                for (var i = 0; i < _tmp.length; i++) {
+                    if ((YAHOO.util.Dom.getStyle(_tmp[i], 'font-family') == 'yui-tmp') || (_tmp[i].face && (_tmp[i].face == 'yui-tmp'))) {
+                        if (tagName !== 'span') {
+                            el = _elCreate(tagName, tagStyle);
+                        } else {
+                            el = _elCreate(_tmp[i].tagName, tagStyle);
+                        }
+                        el.innerHTML = _tmp[i].innerHTML;
+                        if (this._isElement(_tmp[i], 'ol') || (this._isElement(_tmp[i], 'ul'))) {
+                            var fc = _tmp[i].getElementsByTagName('li')[0];
+                            _tmp[i].style.fontFamily = 'inherit';
+                            fc.style.fontFamily = 'inherit';
+                            el.innerHTML = fc.innerHTML;
+                            fc.innerHTML = '';
+                            fc.appendChild(el);
+                            this.currentElement[this.currentElement.length] = el;
+                        } else if (this._isElement(_tmp[i], 'li')) {
+                            _tmp[i].innerHTML = '';
+                            _tmp[i].appendChild(el);
+                            _tmp[i].style.fontFamily = 'inherit';
+                            this.currentElement[this.currentElement.length] = el;
+                        } else {
+                            if (_tmp[i].parentNode) {
+                                _tmp[i].parentNode.replaceChild(el, _tmp[i]);
+                                this.currentElement[this.currentElement.length] = el;
+                                this.currentEvent = null;
+                                if (this.browser.webkit) {
+                                    //Force Safari to focus the new element
+                                    this._getSelection().setBaseAndExtent(el, 0, el, 0);
+                                    if (this.browser.webkit3) {
+                                        this._getSelection().collapseToStart();
+                                    } else {
+                                        this._getSelection().collapse(true);
+                                    }
+                                }
+                                if (this.browser.ie && tagStyle && tagStyle.fontSize) {
+                                    this._getSelection().empty();
+                                }
+                                if (this.browser.gecko) {
+                                    this._getSelection().collapseToStart();
+                                }
+                            }
+                        }
+                    }
+                }
+                var len = this.currentElement.length;
+                for (var o = 0; o < len; o++) {
+                    if ((o + 1) != len) { //Skip the last one in the list
+                        if (this.currentElement[o] && this.currentElement[o].nextSibling) {
+                            if (this._isElement(this.currentElement[o], 'br')) {
+                                this.currentElement[this.currentElement.length] = this.currentElement[o].nextSibling;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+        * @method saveHTML
+        * @description Cleans the HTML with the cleanHTML method then places that string back into the textarea.
+        * @return String
+        */
+        saveHTML: function() {
+            var html = this.cleanHTML();
+            if (this._textarea) {
+                this.get('element').value = html;
+            } else {
+                this.get('element').innerHTML = html;
+            }
+            if (this.get('saveEl') !== this.get('element')) {
+                var out = this.get('saveEl');
+                if (Lang.isString(out)) {
+                    out = Dom.get(out);
+                }
+                if (out) {
+                    if (out.tagName.toLowerCase() === 'textarea') {
+                        out.value = html;
+                    } else {
+                        out.innerHTML = html;
+                    }
+                }
+            }
+            return html;
+        },
+        /**
+        * @method setEditorHTML
+        * @param {String} incomingHTML The html content to load into the editor
+        * @description Loads HTML into the editors body
+        */
+        setEditorHTML: function(incomingHTML) {
+            var html = this._cleanIncomingHTML(incomingHTML);
+            html = html.replace(/RIGHT_BRACKET/gi, '{');
+            html = html.replace(/LEFT_BRACKET/gi, '}');
+            this._getDoc().body.innerHTML = html;
+            this.nodeChange();
+        },
+        /**
+        * @method getEditorHTML
+        * @description Gets the unprocessed/unfiltered HTML from the editor
+        */
+        getEditorHTML: function() {
+            try {
+                var b = this._getDoc().body;
+                if (b === null) {
+                    YAHOO.log('Body is null, returning null.', 'error', 'SimpleEditor');
+                    return null;
+                }
+                return this._getDoc().body.innerHTML;
+            } catch (e) {
+                return '';
+            }
+        },
+        /**
+        * @method show
+        * @description This method needs to be called if the Editor was hidden (like in a TabView or Panel). It is used to reset the editor after being in a container that was set to display none.
+        */
+        show: function() {
+            if (this.browser.gecko) {
+                this._setDesignMode('on');
+                this.focus();
+            }
+            if (this.browser.webkit) {
+                var self = this;
+                window.setTimeout(function() {
+                    self._setInitialContent.call(self);
+                }, 10);
+            }
+            //Adding this will close all other Editor window's when showing this one.
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            //Put the iframe back in place
+            this.get('iframe').setStyle('position', 'static');
+            this.get('iframe').setStyle('left', '');
+        },
+        /**
+        * @method hide
+        * @description This method needs to be called if the Editor is to be hidden (like in a TabView or Panel). It should be called to clear timeouts and close open editor windows.
+        */
+        hide: function() {
+            //Adding this will close all other Editor window's.
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            if (this._fixNodesTimer) {
+                clearTimeout(this._fixNodesTimer);
+                this._fixNodesTimer = null;
+            }
+            if (this._nodeChangeTimer) {
+                clearTimeout(this._nodeChangeTimer);
+                this._nodeChangeTimer = null;
+            }
+            this._lastNodeChange = 0;
+            //Move the iframe off of the screen, so that in containers with visiblity hidden, IE will not cover other elements.
+            this.get('iframe').setStyle('position', 'absolute');
+            this.get('iframe').setStyle('left', '-9999px');
+        },
+        /**
+        * @method _cleanIncomingHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the input
+        * @return {String} The filtered HTML
+        */
+        _cleanIncomingHTML: function(html) {
+            html = html.replace(/{/gi, 'RIGHT_BRACKET');
+            html = html.replace(/}/gi, 'LEFT_BRACKET');
+
+            html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+            html = html.replace(/<\/strong>/gi, '</b>');   
+
+            //replace embed before em check
+            html = html.replace(/<embed([^>]*)>/gi, '<YUI_EMBED$1>');
+            html = html.replace(/<\/embed>/gi, '</YUI_EMBED>');
+
+            html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+            html = html.replace(/<\/em>/gi, '</i>');
+            html = html.replace(/_moz_dirty=""/gi, '');
+            
+            //Put embed tags back in..
+            html = html.replace(/<YUI_EMBED([^>]*)>/gi, '<embed$1>');
+            html = html.replace(/<\/YUI_EMBED>/gi, '</embed>');
+            if (this.get('plainText')) {
+                YAHOO.log('Filtering as plain text', 'info', 'SimpleEditor');
+                html = html.replace(/\n/g, '<br>').replace(/\r/g, '<br>');
+                html = html.replace(/  /gi, '&nbsp;&nbsp;'); //Replace all double spaces
+                html = html.replace(/\t/gi, '&nbsp;&nbsp;&nbsp;&nbsp;'); //Replace all tabs
+            }
+            //Removing Script Tags from the Editor
+            html = html.replace(/<script([^>]*)>/gi, '<bad>');
+            html = html.replace(/<\/script([^>]*)>/gi, '</bad>');
+            html = html.replace(/&lt;script([^>]*)&gt;/gi, '<bad>');
+            html = html.replace(/&lt;\/script([^>]*)&gt;/gi, '</bad>');
+            //Replace the line feeds
+            html = html.replace(/\r\n/g, '<YUI_LF>').replace(/\n/g, '<YUI_LF>').replace(/\r/g, '<YUI_LF>');
+            
+            //Remove Bad HTML elements (used to be script nodes)
+            html = html.replace(new RegExp('<bad([^>]*)>(.*?)<\/bad>', 'gi'), '');
+            //Replace the lines feeds
+            html = html.replace(/<YUI_LF>/g, '\n');
+            return html;
+        },
+        /**
+        * @method cleanHTML
+        * @param {String} html The unfiltered HTML
+        * @description Process the HTML with a few regexes to clean it up and stabilize the output
+        * @return {String} The filtered HTML
+        */
+        cleanHTML: function(html) {
+            //Start Filtering Output
+            //Begin RegExs..
+            if (!html) { 
+                html = this.getEditorHTML();
+            }
+            var markup = this.get('markup');
+            //Make some backups...
+            html = this.pre_filter_linebreaks(html, markup);
+
+            //Filter MS Word
+            html = this.filter_msword(html);
+
+		    html = html.replace(/<img([^>]*)\/>/gi, '<YUI_IMG$1>');
+		    html = html.replace(/<img([^>]*)>/gi, '<YUI_IMG$1>');
+
+		    html = html.replace(/<input([^>]*)\/>/gi, '<YUI_INPUT$1>');
+		    html = html.replace(/<input([^>]*)>/gi, '<YUI_INPUT$1>');
+
+		    html = html.replace(/<ul([^>]*)>/gi, '<YUI_UL$1>');
+		    html = html.replace(/<\/ul>/gi, '<\/YUI_UL>');
+		    html = html.replace(/<blockquote([^>]*)>/gi, '<YUI_BQ$1>');
+		    html = html.replace(/<\/blockquote>/gi, '<\/YUI_BQ>');
+
+		    html = html.replace(/<embed([^>]*)>/gi, '<YUI_EMBED$1>');
+		    html = html.replace(/<\/embed>/gi, '<\/YUI_EMBED>');
+
+            //Convert b and i tags to strong and em tags
+            if ((markup == 'semantic') || (markup == 'xhtml')) {
+                //html = html.replace(/<i(\s+[^>]*)?>/gi, "<em$1>");
+                html = html.replace(/<i([^>]*)>/gi, "<em$1>");
+                html = html.replace(/<\/i>/gi, '</em>');
+                //html = html.replace(/<b(\s+[^>]*)?>/gi, "<strong$1>");
+                html = html.replace(/<b([^>]*)>/gi, "<strong$1>");
+                html = html.replace(/<\/b>/gi, '</strong>');
+            }
+
+            html = html.replace(/_moz_dirty=""/gi, '');
+
+            //normalize strikethrough
+            html = html.replace(/<strike/gi, '<span style="text-decoration: line-through;"');
+            html = html.replace(/\/strike>/gi, '/span>');
+            
+            
+            //Case Changing
+            if (this.browser.ie) {
+                html = html.replace(/text-decoration/gi, 'text-decoration');
+                html = html.replace(/font-weight/gi, 'font-weight');
+                html = html.replace(/_width="([^>]*)"/gi, '');
+                html = html.replace(/_height="([^>]*)"/gi, '');
+                //Cleanup Image URL's
+                var url = this._baseHREF.replace(/\//gi, '\\/'),
+                    re = new RegExp('src="' + url, 'gi');
+                html = html.replace(re, 'src="');
+            }
+		    html = html.replace(/<font/gi, '<font');
+		    html = html.replace(/<\/font>/gi, '</font>');
+		    html = html.replace(/<span/gi, '<span');
+		    html = html.replace(/<\/span>/gi, '</span>');
+            if ((markup == 'semantic') || (markup == 'xhtml') || (markup == 'css')) {
+                html = html.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)<\/font>', 'gi'), '<span $1 style="font-family: $2;">$3</span>');
+                html = html.replace(/<u/gi, '<span style="text-decoration: underline;"');
+                if (this.browser.webkit) {
+                    html = html.replace(new RegExp('<span class="Apple-style-span" style="font-weight: bold;">([^>]*)<\/span>', 'gi'), '<strong>$1</strong>');
+                    html = html.replace(new RegExp('<span class="Apple-style-span" style="font-style: italic;">([^>]*)<\/span>', 'gi'), '<em>$1</em>');
+                }
+                html = html.replace(/\/u>/gi, '/span>');
+                if (markup == 'css') {
+                    html = html.replace(/<em([^>]*)>/gi, '<i$1>');
+                    html = html.replace(/<\/em>/gi, '</i>');
+                    html = html.replace(/<strong([^>]*)>/gi, '<b$1>');
+                    html = html.replace(/<\/strong>/gi, '</b>');
+                    html = html.replace(/<b/gi, '<span style="font-weight: bold;"');
+                    html = html.replace(/\/b>/gi, '/span>');
+                    html = html.replace(/<i/gi, '<span style="font-style: italic;"');
+                    html = html.replace(/\/i>/gi, '/span>');
+                }
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            } else {
+		        html = html.replace(/<u/gi, '<u');
+		        html = html.replace(/\/u>/gi, '/u>');
+            }
+		    html = html.replace(/<ol([^>]*)>/gi, '<ol$1>');
+		    html = html.replace(/\/ol>/gi, '/ol>');
+		    html = html.replace(/<li/gi, '<li');
+		    html = html.replace(/\/li>/gi, '/li>');
+            html = this.filter_safari(html);
+
+            html = this.filter_internals(html);
+
+            html = this.filter_all_rgb(html);
+
+            //Replace our backups with the real thing
+            html = this.post_filter_linebreaks(html, markup);
+
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1 />');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1 />');
+            } else {
+		        html = html.replace(/<YUI_IMG([^>]*)>/g, '<img $1>');
+		        html = html.replace(/<YUI_INPUT([^>]*)>/g, '<input $1>');
+            }
+		    html = html.replace(/<YUI_UL([^>]*)>/g, '<ul$1>');
+		    html = html.replace(/<\/YUI_UL>/g, '<\/ul>');
+
+            html = this.filter_invalid_lists(html);
+
+		    html = html.replace(/<YUI_BQ([^>]*)>/g, '<blockquote$1>');
+		    html = html.replace(/<\/YUI_BQ>/g, '<\/blockquote>');
+
+		    html = html.replace(/<YUI_EMBED([^>]*)>/g, '<embed$1>');
+		    html = html.replace(/<\/YUI_EMBED>/g, '<\/embed>');
+            
+            //This should fix &amp;'s in URL's
+            html = html.replace(/ &amp; /gi, ' YUI_AMP ');
+            html = html.replace(/ &amp;/gi, ' YUI_AMP_F ');
+            html = html.replace(/&amp; /gi, ' YUI_AMP_R ');
+            html = html.replace(/&amp;/gi, '&');
+            html = html.replace(/ YUI_AMP /gi, ' &amp; ');
+            html = html.replace(/ YUI_AMP_F /gi, ' &amp;');
+            html = html.replace(/ YUI_AMP_R /gi, '&amp; ');
+
+            //Trim the output, removing whitespace from the beginning and end
+            html = YAHOO.lang.trim(html);
+
+            if (this.get('removeLineBreaks')) {
+                html = html.replace(/\n/g, '').replace(/\r/g, '');
+                html = html.replace(/  /gi, ' '); //Replace all double spaces and replace with a single
+            }
+            
+            for (var v in this.invalidHTML) {
+                if (YAHOO.lang.hasOwnProperty(this.invalidHTML, v)) {
+                    if (Lang.isObject(v) && v.keepContents) {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '$1');
+                    } else {
+                        html = html.replace(new RegExp('<' + v + '([^>]*)>(.*?)<\/' + v + '>', 'gi'), '');
+                    }
+                }
+            }
+
+            /* LATER -- Add DOM manipulation
+            console.log(html);
+            var frag = document.createDocumentFragment();
+            frag.innerHTML = html;
+
+            var ps = frag.getElementsByTagName('p'),
+                len = ps.length;
+            for (var i = 0; i < len; i++) {
+                var ps2 = ps[i].getElementsByTagName('p');
+                if (ps2.length) {
+                    
+                }
+                
+            }
+            html = frag.innerHTML;
+            console.log(html);
+            */
+
+            this.fireEvent('cleanHTML', { type: 'cleanHTML', target: this, html: html });
+
+            return html;
+        },
+        /**
+        * @method filter_msword
+        * @param String html The HTML string to filter
+        * @description Filters out msword html attributes and other junk. Activate with filterWord: true in config
+        */
+        filter_msword: function(html) {
+            if (!this.get('filterWord')) {
+                return html;
+            }
+            //Remove the ms o: tags
+            html = html.replace(/<o:p>\s*<\/o:p>/g, '');
+            html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, '&nbsp;');
+
+            //Remove the ms w: tags
+            html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '');
+
+            //Remove mso-? styles.
+            html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '');
+
+            //Remove more bogus MS styles.
+            html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, '');
+            html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"");
+            html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, '');
+            html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"");
+            html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"");
+            html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" );
+            html = html.replace( /\s*tab-stops:[^;"]*;?/gi, '');
+            html = html.replace( /\s*tab-stops:[^"]*/gi, '');
+
+            //Remove XML declarations
+            html = html.replace(/<\\?\?xml[^>]*>/gi, '');
+
+            //Remove lang
+            html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
+
+            //Remove language tags
+            html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3");
+
+            //Remove onmouseover and onmouseout events (from MS Word comments effect)
+            html = html.replace( /<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi, "<$1$3");
+            html = html.replace( /<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi, "<$1$3");
+            
+            return html;
+        },
+        /**
+        * @method filter_invalid_lists
+        * @param String html The HTML string to filter
+        * @description Filters invalid ol and ul list markup, converts this: <li></li><ol>..</ol> to this: <li></li><li><ol>..</ol></li>
+        */
+        filter_invalid_lists: function(html) {
+            html = html.replace(/<\/li>\n/gi, '</li>');
+
+            html = html.replace(/<\/li><ol>/gi, '</li><li><ol>');
+            html = html.replace(/<\/ol>/gi, '</ol></li>');
+            html = html.replace(/<\/ol><\/li>\n/gi, "</ol>");
+
+            html = html.replace(/<\/li><ul>/gi, '</li><li><ul>');
+            html = html.replace(/<\/ul>/gi, '</ul></li>');
+            html = html.replace(/<\/ul><\/li>\n?/gi, "</ul>");
+
+            html = html.replace(/<\/li>/gi, "</li>");
+            html = html.replace(/<\/ol>/gi, "</ol>");
+            html = html.replace(/<ol>/gi, "<ol>");
+            html = html.replace(/<ul>/gi, "<ul>");
+            return html;
+        },
+        /**
+        * @method filter_safari
+        * @param String html The HTML string to filter
+        * @description Filters strings specific to Safari
+        * @return String
+        */
+        filter_safari: function(html) {
+            if (this.browser.webkit) {
+                //<span class="Apple-tab-span" style="white-space:pre">	</span>
+                html = html.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi, '&nbsp;&nbsp;&nbsp;&nbsp;');
+                html = html.replace(/Apple-style-span/gi, '');
+                html = html.replace(/style="line-height: normal;"/gi, '');
+                html = html.replace(/yui-wk-div/gi, '');
+                html = html.replace(/yui-wk-p/gi, '');
+
+
+                //Remove bogus LI's
+                html = html.replace(/<li><\/li>/gi, '');
+                html = html.replace(/<li> <\/li>/gi, '');
+                html = html.replace(/<li>  <\/li>/gi, '');
+                //Remove bogus DIV's - updated from just removing the div's to replacing /div with a break
+                if (this.get('ptags')) {
+		            html = html.replace(/<div([^>]*)>/g, '<p$1>');
+				    html = html.replace(/<\/div>/gi, '</p>');
+                } else {
+                    //html = html.replace(/<div>/gi, '<br>');
+                    html = html.replace(/<div([^>]*)>([ tnr]*)<\/div>/gi, '<br>');
+				    html = html.replace(/<\/div>/gi, '');
+                }
+            }
+            return html;
+        },
+        /**
+        * @method filter_internals
+        * @param String html The HTML string to filter
+        * @description Filters internal RTE strings and bogus attrs we don't want
+        * @return String
+        */
+        filter_internals: function(html) {
+		    html = html.replace(/\r/g, '');
+            //Fix stuff we don't want
+	        html = html.replace(/<\/?(body|head|html)[^>]*>/gi, '');
+            //Fix last BR in LI
+		    html = html.replace(/<YUI_BR><\/li>/gi, '</li>');
+
+		    html = html.replace(/yui-tag-span/gi, '');
+		    html = html.replace(/yui-tag/gi, '');
+		    html = html.replace(/yui-non/gi, '');
+		    html = html.replace(/yui-img/gi, '');
+		    html = html.replace(/ tag="span"/gi, '');
+		    html = html.replace(/ class=""/gi, '');
+		    html = html.replace(/ style=""/gi, '');
+		    html = html.replace(/ class=" "/gi, '');
+		    html = html.replace(/ class="  "/gi, '');
+		    html = html.replace(/ target=""/gi, '');
+		    html = html.replace(/ title=""/gi, '');
+
+            if (this.browser.ie) {
+		        html = html.replace(/ class= /gi, '');
+		        html = html.replace(/ class= >/gi, '');
+            }
+            
+            return html;
+        },
+        /**
+        * @method filter_all_rgb
+        * @param String str The HTML string to filter
+        * @description Converts all RGB color strings found in passed string to a hex color, example: style="color: rgb(0, 255, 0)" converts to style="color: #00ff00"
+        * @return String
+        */
+        filter_all_rgb: function(str) {
+            var exp = new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)", "gi");
+            var arr = str.match(exp);
+            if (Lang.isArray(arr)) {
+                for (var i = 0; i < arr.length; i++) {
+                    var color = this.filter_rgb(arr[i]);
+                    str = str.replace(arr[i].toString(), color);
+                }
+            }
+            
+            return str;
+        },
+        /**
+        * @method filter_rgb
+        * @param String css The CSS string containing rgb(#,#,#);
+        * @description Converts an RGB color string to a hex color, example: rgb(0, 255, 0) converts to #00ff00
+        * @return String
+        */
+        filter_rgb: function(css) {
+            if (css.toLowerCase().indexOf('rgb') != -1) {
+                var exp = new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)", "gi");
+                var rgb = css.replace(exp, "$1,$2,$3,$4,$5").split(',');
+            
+                if (rgb.length == 5) {
+                    var r = parseInt(rgb[1], 10).toString(16);
+                    var g = parseInt(rgb[2], 10).toString(16);
+                    var b = parseInt(rgb[3], 10).toString(16);
+
+                    r = r.length == 1 ? '0' + r : r;
+                    g = g.length == 1 ? '0' + g : g;
+                    b = b.length == 1 ? '0' + b : b;
+
+                    css = "#" + r + g + b;
+                }
+            }
+            return css;
+        },
+        /**
+        * @method pre_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @return String
+        */
+        pre_filter_linebreaks: function(html, markup) {
+            if (this.browser.webkit) {
+		        html = html.replace(/<br class="khtml-block-placeholder">/gi, '<YUI_BR>');
+		        html = html.replace(/<br class="webkit-block-placeholder">/gi, '<YUI_BR>');
+            }
+		    html = html.replace(/<br>/gi, '<YUI_BR>');
+		    html = html.replace(/<br (.*?)>/gi, '<YUI_BR>');
+		    html = html.replace(/<br\/>/gi, '<YUI_BR>');
+		    html = html.replace(/<br \/>/gi, '<YUI_BR>');
+		    html = html.replace(/<div><YUI_BR><\/div>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>(&nbsp;|&#160;)<\/p>/g, '<YUI_BR>');            
+		    html = html.replace(/<p><br>&nbsp;<\/p>/gi, '<YUI_BR>');
+		    html = html.replace(/<p>&nbsp;<\/p>/gi, '<YUI_BR>');
+            //Fix last BR
+	        html = html.replace(/<YUI_BR>$/, '');
+            //Fix last BR in P
+	        html = html.replace(/<YUI_BR><\/p>/g, '</p>');
+            if (this.browser.ie) {
+	            html = html.replace(/&nbsp;&nbsp;&nbsp;&nbsp;/g, '\t');
+            }
+            return html;
+        },
+        /**
+        * @method post_filter_linebreaks
+        * @param String html The HTML to filter
+        * @param String markup The markup type to filter to
+        * @description HTML Pre Filter
+        * @return String
+        */
+        post_filter_linebreaks: function(html, markup) {
+            if (markup == 'xhtml') {
+		        html = html.replace(/<YUI_BR>/g, '<br />');
+            } else {
+		        html = html.replace(/<YUI_BR>/g, '<br>');
+            }
+            return html;
+        },
+        /**
+        * @method clearEditorDoc
+        * @description Clear the doc of the Editor
+        */
+        clearEditorDoc: function() {
+            this._getDoc().body.innerHTML = '&nbsp;';
+        },
+        /**
+        * @method openWindow
+        * @description Override Method for Advanced Editor
+        */
+        openWindow: function(win) {
+        },
+        /**
+        * @method moveWindow
+        * @description Override Method for Advanced Editor
+        */
+        moveWindow: function() {
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        _closeWindow: function() {
+        },
+        /**
+        * @method closeWindow
+        * @description Override Method for Advanced Editor
+        */
+        closeWindow: function() {
+            //this.unsubscribeAll('afterExecCommand');
+            this.toolbar.resetAllButtons();
+            this.focus();        
+        },
+        /**
+        * @method destroy
+        * @description Destroys the editor, all of it's elements and objects.
+        * @return {Boolean}
+        */
+        destroy: function() {
+            if (this._nodeChangeDelayTimer) {
+                clearTimeout(this._nodeChangeDelayTimer);
+            }
+            this.hide();
+        
+            YAHOO.log('Destroying Editor', 'warn', 'SimpleEditor');
+            if (this.resize) {
+                YAHOO.log('Destroying Resize', 'warn', 'SimpleEditor');
+                this.resize.destroy();
+            }
+            if (this.dd) {
+                YAHOO.log('Unreg DragDrop Instance', 'warn', 'SimpleEditor');
+                this.dd.unreg();
+            }
+            if (this.get('panel')) {
+                YAHOO.log('Destroying Editor Panel', 'warn', 'SimpleEditor');
+                this.get('panel').destroy();
+            }
+            this.saveHTML();
+            this.toolbar.destroy();
+            YAHOO.log('Restoring TextArea', 'info', 'SimpleEditor');
+            this.setStyle('visibility', 'visible');
+            this.setStyle('position', 'static');
+            this.setStyle('top', '');
+            this.setStyle('left', '');
+            var textArea = this.get('element');
+            this.get('element_cont').get('parentNode').replaceChild(textArea, this.get('element_cont').get('element'));
+            this.get('element_cont').get('element').innerHTML = '';
+            this.set('handleSubmit', false); //Remove the submit handler
+            return true;
+        },        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'SimpleEditor';
+            if (this.get && this.get('element_cont')) {
+                str = 'SimpleEditor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+
+/**
+* @event toolbarLoaded
+* @description Event is fired during the render process directly after the Toolbar is loaded. Allowing you to attach events to the toolbar. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event cleanHTML
+* @description Event is fired after the cleanHTML method is called.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterRender
+* @description Event is fired after the render process finishes. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorContentLoaded
+* @description Event is fired after the editor iframe's document fully loads and fires it's onload event. From here you can start injecting your own things into the document. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeNodeChange
+* @description Event fires at the beginning of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterNodeChange
+* @description Event fires at the end of the nodeChange process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeExecCommand
+* @description Event fires at the beginning of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterExecCommand
+* @description Event fires at the end of the execCommand process. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorClick
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Passed through HTML Event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorMouseUp
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorMouseDown
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorDoubleClick
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorClick
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorKeyUp
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorKeyPress
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event beforeEditorKeyDown
+* @param {Event} ev The DOM Event that occured
+* @description Fires before editor event, returning false will stop the internal processing.
+* @type YAHOO.util.CustomEvent
+*/
+
+/**
+* @event editorWindowFocus
+* @description Fires when the iframe is focused. Note, this is window focus event, not an Editor focus event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event editorWindowBlur
+* @description Fires when the iframe is blurred. Note, this is window blur event, not an Editor blur event.
+* @type YAHOO.util.CustomEvent
+*/
+
+
+/**
+ * @description Singleton object used to track the open window objects and panels across the various open editors
+ * @class EditorInfo
+ * @static
+*/
+YAHOO.widget.EditorInfo = {
+    /**
+    * @private
+    * @property _instances
+    * @description A reference to all editors on the page.
+    * @type Object
+    */
+    _instances: {},
+    /**
+    * @private
+    * @property blankImage
+    * @description A reference to the blankImage url
+    * @type String 
+    */
+    blankImage: '',
+    /**
+    * @private
+    * @property window
+    * @description A reference to the currently open window object in any editor on the page.
+    * @type Object <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>
+    */
+    window: {},
+    /**
+    * @private
+    * @property panel
+    * @description A reference to the currently open panel in any editor on the page.
+    * @type Object <a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>
+    */
+    panel: null,
+    /**
+    * @method getEditorById
+    * @description Returns a reference to the Editor object associated with the given textarea
+    * @param {String/HTMLElement} id The id or reference of the textarea to return the Editor instance of
+    * @return Object <a href="YAHOO.widget.Editor.html">YAHOO.widget.Editor</a>
+    */
+    getEditorById: function(id) {
+        if (!YAHOO.lang.isString(id)) {
+            //Not a string, assume a node Reference
+            id = id.id;
+        }
+        if (this._instances[id]) {
+            return this._instances[id];
+        }
+        return false;
+    },
+    /**
+    * @method saveAll
+    * @description Saves all Editor instances on the page. If a form reference is passed, only Editor's bound to this form will be saved.
+    * @param {HTMLElement} form The form to check if this Editor instance belongs to
+    */
+    saveAll: function(form) {
+        var i, e, items = YAHOO.widget.EditorInfo._instances;
+        if (form) {
+            for (i in items) {
+                if (Lang.hasOwnProperty(items, i)) {
+                    e = items[i];
+                    if (e.get('element').form && (e.get('element').form == form)) {
+                        e.saveHTML();
+                    }
+                }
+            }
+        } else {
+            for (i in items) {
+                if (Lang.hasOwnProperty(items, i)) {
+                    items[i].saveHTML();
+                }
+            }
+        }
+    },
+    /**
+    * @method toString
+    * @description Returns a string representing the EditorInfo.
+    * @return {String}
+    */
+    toString: function() {
+        var len = 0;
+        for (var i in this._instances) {
+            if (Lang.hasOwnProperty(this._instances, i)) {
+                len++;
+            }
+        }
+        return 'Editor Info (' + len + ' registered intance' + ((len > 1) ? 's' : '') + ')';
+    }
+};
+
+
+
+    
+})();
+/**
+ * @module editor
+ * @description <p>The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.</p>
+ * @namespace YAHOO.widget
+ * @requires yahoo, dom, element, event, container_core, simpleeditor
+ * @optional dragdrop, animation, menu, button, resize
+ */
+
+(function() {
+var Dom = YAHOO.util.Dom,
+    Event = YAHOO.util.Event,
+    Lang = YAHOO.lang,
+    Toolbar = YAHOO.widget.Toolbar;
+
+    /**
+     * The Rich Text Editor is a UI control that replaces a standard HTML textarea; it allows for the rich formatting of text content, including common structural treatments like lists, formatting treatments like bold and italic text, and drag-and-drop inclusion and sizing of images. The Rich Text Editor's toolbar is extensible via a plugin architecture so that advanced implementations can achieve a high degree of customization.
+     * @constructor
+     * @class Editor
+     * @extends YAHOO.widget.SimpleEditor
+     * @param {String/HTMLElement} el The textarea element to turn into an editor.
+     * @param {Object} attrs Object liternal containing configuration parameters.
+    */
+    
+    YAHOO.widget.Editor = function(el, attrs) {
+        YAHOO.log('Editor Initalizing', 'info', 'Editor');
+        YAHOO.widget.Editor.superclass.constructor.call(this, el, attrs);
+    };
+
+    YAHOO.extend(YAHOO.widget.Editor, YAHOO.widget.SimpleEditor, {
+        /**
+        * @private
+        * @property _undoCache
+        * @description An Array hash of the Undo Levels.
+        * @type Array
+        */
+        _undoCache: null,
+        /**
+        * @private
+        * @property _undoLevel
+        * @description The index of the current undo state.
+        * @type Number
+        */
+        _undoLevel: null,    
+        /**
+        * @private
+        * @method _hasUndoLevel
+        * @description Checks to see if we have an undo level available
+        * @return Boolean
+        */
+        _hasUndoLevel: function() {
+            return ((this._undoCache.length > 1) && this._undoLevel);
+        },
+        /**
+        * @private
+        * @method _undoNodeChange
+        * @description nodeChange listener for undo processing
+        */
+        _undoNodeChange: function() {
+            var undo_button = this.toolbar.getButtonByValue('undo'),
+                redo_button = this.toolbar.getButtonByValue('redo');
+            if (undo_button && redo_button) {
+                if (this._hasUndoLevel()) {
+                    this.toolbar.enableButton(undo_button);
+                }
+                if (this._undoLevel < this._undoCache.length) {
+                    this.toolbar.enableButton(redo_button);
+                }
+            }
+            this._lastCommand = null;
+        },
+        /**
+        * @private
+        * @method _checkUndo
+        * @description Prunes the undo cache when it reaches the maxUndo config
+        */
+        _checkUndo: function() {
+            var len = this._undoCache.length,
+            tmp = [];
+            if (len >= this.get('maxUndo')) {
+                //YAHOO.log('Undo cache too large (' + len + '), pruning..', 'info', 'SimpleEditor');
+                for (var i = (len - this.get('maxUndo')); i < len; i++) {
+                    tmp.push(this._undoCache[i]);
+                }
+                this._undoCache = tmp;
+                this._undoLevel = this._undoCache.length;
+            }
+        },
+        /**
+        * @private
+        * @method _putUndo
+        * @description Puts the content of the Editor into the _undoCache.
+        * //TODO Convert the hash to a series of TEXTAREAS to store state in.
+        * @param {String} str The content of the Editor
+        */
+        _putUndo: function(str) {
+            if (this._undoLevel === this._undoCache.length) {
+                this._undoCache.push(str);
+                this._undoLevel = this._undoCache.length;
+            } else {
+                var str = this.getEditorHTML();
+                var last = this._undoCache[this._undoLevel];
+                if (last) {
+                    if (str !== last) {
+                        this._undoCache = [];
+                        this._undoLevel = 0;
+                    }
+                }
+            }
+        },
+        /**
+        * @private
+        * @method _getUndo
+        * @description Get's a level from the undo cache.
+        * @param {Number} index The index of the undo level we want to get.
+        * @return {String}
+        */
+        _getUndo: function(index) {
+            this._undoLevel = index;
+            return this._undoCache[index];
+        },
+        /**
+        * @private
+        * @method _storeUndo
+        * @description Method to call when you want to store an undo state. Currently called from nodeChange and _handleKeyUp
+        */
+        _storeUndo: function() {
+            if (this._lastCommand === 'undo' || this._lastCommand === 'redo') {
+                return false;
+            }
+            if (!this._undoCache) {
+                this._undoCache = [];
+                this._undoLevel = 0;
+            }
+            this._checkUndo();
+            var str = this.getEditorHTML();
+            //var last = this._undoCache[this._undoCache.length - 1];
+            var last = this._undoCache[this._undoLevel - 1];
+            if (last) {
+                if (str !== last) {
+                    //YAHOO.log('Storing Undo', 'info', 'SimpleEditor');
+                    this._putUndo(str);
+                }
+            } else {
+                //YAHOO.log('Storing Undo', 'info', 'SimpleEditor');
+                this._putUndo(str);
+            }
+            this._undoNodeChange();
+        },    
+        /**
+        * @property STR_BEFORE_EDITOR
+        * @description The accessibility string for the element before the iFrame
+        * @type String
+        */
+        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>',    
+        /**
+        * @property STR_CLOSE_WINDOW
+        * @description The Title of the close button in the Editor Window
+        * @type String
+        */
+        STR_CLOSE_WINDOW: 'Close Window',
+        /**
+        * @property STR_CLOSE_WINDOW_NOTE
+        * @description A note appearing in the Editor Window to tell the user that the Escape key will close the window
+        * @type String
+        */
+        STR_CLOSE_WINDOW_NOTE: 'To close this window use the Control + Shift + W key',
+        /**
+        * @property STR_IMAGE_PROP_TITLE
+        * @description The title for the Image Property Editor Window
+        * @type String
+        */
+        STR_IMAGE_PROP_TITLE: 'Image Options',
+        /**
+        * @property STR_IMAGE_TITLE
+        * @description The label string for Image Description
+        * @type String
+        */
+        STR_IMAGE_TITLE: 'Description',
+        /**
+        * @property STR_IMAGE_SIZE
+        * @description The label string for Image Size
+        * @type String
+        */
+        STR_IMAGE_SIZE: 'Size',
+        /**
+        * @property STR_IMAGE_ORIG_SIZE
+        * @description The label string for Original Image Size
+        * @type String
+        */
+        STR_IMAGE_ORIG_SIZE: 'Original Size',
+        /**
+        * @property STR_IMAGE_COPY
+        * @description The label string for the image copy and paste message for Opera and Safari
+        * @type String
+        */
+        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>',
+        /**
+        * @property STR_IMAGE_PADDING
+        * @description The label string for the image padding.
+        * @type String
+        */
+        STR_IMAGE_PADDING: 'Padding',
+        /**
+        * @property STR_IMAGE_BORDER
+        * @description The label string for the image border.
+        * @type String
+        */
+        STR_IMAGE_BORDER: 'Border',
+        /**
+        * @property STR_IMAGE_BORDER_SIZE
+        * @description The label string for the image border size.
+        * @type String
+        */
+        STR_IMAGE_BORDER_SIZE: 'Border Size',
+        /**
+        * @property STR_IMAGE_BORDER_TYPE
+        * @description The label string for the image border type.
+        * @type String
+        */
+        STR_IMAGE_BORDER_TYPE: 'Border Type',
+        /**
+        * @property STR_IMAGE_TEXTFLOW
+        * @description The label string for the image text flow.
+        * @type String
+        */
+        STR_IMAGE_TEXTFLOW: 'Text Flow',
+        /**
+        * @property STR_LOCAL_FILE_WARNING
+        * @description The label string for the local file warning.
+        * @type String
+        */
+        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>',
+        /**
+        * @property STR_LINK_PROP_TITLE
+        * @description The label string for the Link Property Editor Window.
+        * @type String
+        */
+        STR_LINK_PROP_TITLE: 'Link Options',
+        /**
+        * @property STR_LINK_PROP_REMOVE
+        * @description The label string for the Remove link from text link inside the property editor.
+        * @type String
+        */
+        STR_LINK_PROP_REMOVE: 'Remove link from text',
+        /**
+        * @property STR_LINK_NEW_WINDOW
+        * @description The string for the open in a new window label.
+        * @type String
+        */
+        STR_LINK_NEW_WINDOW: 'Open in a new window.',
+        /**
+        * @property STR_LINK_TITLE
+        * @description The string for the link description.
+        * @type String
+        */
+        STR_LINK_TITLE: 'Description',
+        /**
+        * @property STR_NONE
+        * @description The string for the word none.
+        * @type String
+        */
+        STR_NONE: 'none',
+        /**
+        * @protected
+        * @property CLASS_LOCAL_FILE
+        * @description CSS class applied to an element when it's found to have a local url.
+        * @type String
+        */
+        CLASS_LOCAL_FILE: 'warning-localfile',
+        /**
+        * @protected
+        * @property CLASS_HIDDEN
+        * @description CSS class applied to the body when the hiddenelements button is pressed.
+        * @type String
+        */
+        CLASS_HIDDEN: 'yui-hidden',
+        /** 
+        * @method init
+        * @description The Editor class' initialization method
+        */
+        init: function(p_oElement, p_oAttributes) {
+            YAHOO.log('init', 'info', 'Editor');
+            
+            this._windows = {};
+            if (!this._defaultToolbar) {            
+                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' },
+                        { group: 'textstyle2', label: '&nbsp;',
+                            buttons: [
+                                { 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: 'undoredo', label: 'Undo/Redo',
+                            buttons: [
+                                { type: 'push', label: 'Undo', value: 'undo', disabled: true },
+                                { type: 'push', label: 'Redo', value: 'redo', disabled: true }
+                                
+                            ]
+                        },
+                        { 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: 'indentlist2', 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' }
+                            ]
+                        }
+                    ]
+                };
+            }
+
+            if (!this._defaultImageToolbarConfig) {
+                this._defaultImageToolbarConfig = {
+                    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: '0', value: 'padding', range: [0, 50] }
+                            ]
+                        },
+                        { type: 'separator' },
+                        { group: 'border', label: this.STR_IMAGE_BORDER + ':',
+                            buttons: [
+                                { type: 'select', label: this.STR_IMAGE_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: this.STR_IMAGE_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 }
+                            ]
+                        }
+                    ]
+                };
+            }
+
+            YAHOO.widget.Editor.superclass.init.call(this, p_oElement, p_oAttributes);
+        },
+        _render: function() {
+            YAHOO.widget.Editor.superclass._render.apply(this, arguments);
+            var self = this;
+            //Render the panel in another thread and delay it a little..
+            window.setTimeout(function() {
+                self._renderPanel.call(self);
+            }, 800);
+        },
+        /**
+        * @method initAttributes
+        * @description Initializes all of the configuration attributes used to create 
+        * the editor.
+        * @param {Object} attr Object literal specifying a set of 
+        * configuration attributes used to create the editor.
+        */
+        initAttributes: function(attr) {
+            YAHOO.widget.Editor.superclass.initAttributes.call(this, attr);
+
+            /**
+            * @attribute localFileWarning
+            * @description Should we throw the warning if we detect a file that is local to their machine?
+            * @default true
+            * @type Boolean
+            */            
+            this.setAttributeConfig('localFileWarning', {
+                value: attr.locaFileWarning || true
+            });
+
+            /**
+            * @attribute hiddencss
+            * @description The CSS used to show/hide hidden elements on the page, these rules must be prefixed with the class provided in <code>this.CLASS_HIDDEN</code>
+            * @default <code><pre>
+            .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;
+            }</pre></code>
+            * @type String
+            */            
+            this.setAttributeConfig('hiddencss', {
+                value: attr.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
+            });
+           
+        },
+        /**
+        * @private
+        * @method _windows
+        * @description A reference to the HTML elements used for the body of Editor Windows.
+        */
+        _windows: null,
+        /**
+        * @private
+        * @method _defaultImageToolbar
+        * @description A reference to the Toolbar Object inside Image Editor Window.
+        */
+        _defaultImageToolbar: null,
+        /**
+        * @private
+        * @method _defaultImageToolbarConfig
+        * @description Config to be used for the default Image Editor Window.
+        */
+        _defaultImageToolbarConfig: null,
+        /**
+        * @private
+        * @method _fixNodes
+        * @description Fix href and imgs as well as remove invalid HTML.
+        */
+        _fixNodes: function() {
+            YAHOO.widget.Editor.superclass._fixNodes.call(this);
+            try {
+                var url = '';
+
+                var imgs = this._getDoc().getElementsByTagName('img');
+                for (var im = 0; im < imgs.length; im++) {
+                    if (imgs[im].getAttribute('href', 2)) {
+                        url = imgs[im].getAttribute('src', 2);
+                        if (this._isLocalFile(url)) {
+                            Dom.addClass(imgs[im], this.CLASS_LOCAL_FILE);
+                        } else {
+                            Dom.removeClass(imgs[im], this.CLASS_LOCAL_FILE);
+                        }
+                    }
+                }
+                var fakeAs = this._getDoc().body.getElementsByTagName('a');
+                for (var a = 0; a < fakeAs.length; a++) {
+                    if (fakeAs[a].getAttribute('href', 2)) {
+                        url = fakeAs[a].getAttribute('href', 2);
+                        if (this._isLocalFile(url)) {
+                            Dom.addClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                        } else {
+                            Dom.removeClass(fakeAs[a], this.CLASS_LOCAL_FILE);
+                        }
+                    }
+                }
+            } catch(e) {}
+        },
+        /**
+        * @private
+        * @property _disabled
+        * @description The Toolbar items that should be disabled if there is no selection present in the editor.
+        * @type Array
+        */
+        _disabled: [ 'createlink', 'forecolor', 'backcolor', 'fontname', 'fontsize', 'superscript', 'subscript', 'removeformat', 'heading', 'indent' ],
+        /**
+        * @private
+        * @property _alwaysDisabled
+        * @description The Toolbar items that should ALWAYS be disabled event if there is a selection present in the editor.
+        * @type Object
+        */
+        _alwaysDisabled: { 'outdent': true },
+        /**
+        * @private
+        * @property _alwaysEnabled
+        * @description The Toolbar items that should ALWAYS be enabled event if there isn't a selection present in the editor.
+        * @type Object
+        */
+        _alwaysEnabled: { hiddenelements: true },
+        /**
+        * @private
+        * @method _handleKeyDown
+        * @param {Event} ev The event we are working on.
+        * @description Override method that handles some new keydown events inside the iFrame document.
+        */
+        _handleKeyDown: function(ev) {
+            YAHOO.widget.Editor.superclass._handleKeyDown.call(this, ev);
+            var doExec = false,
+                action = null,
+                exec = false;
+
+            switch (ev.keyCode) {
+                //case 219: //Left
+                case this._keyMap.JUSTIFY_LEFT.key: //Left
+                    if (this._checkKey(this._keyMap.JUSTIFY_LEFT, ev)) {
+                        action = 'justifyleft';
+                        doExec = true;
+                    }
+                    break;
+                //case 220: //Center
+                case this._keyMap.JUSTIFY_CENTER.key:
+                    if (this._checkKey(this._keyMap.JUSTIFY_CENTER, ev)) {
+                        action = 'justifycenter';
+                        doExec = true;
+                    }
+                    break;
+                case 221: //Right
+                case this._keyMap.JUSTIFY_RIGHT.key:
+                    if (this._checkKey(this._keyMap.JUSTIFY_RIGHT, ev)) {
+                        action = 'justifyright';
+                        doExec = true;
+                    }
+                    break;
+            }
+            if (doExec && action) {
+                this.execCommand(action, null);
+                Event.stopEvent(ev);
+                this.nodeChange();
+            }
+        },        
+        /**
+        * @private
+        * @method _renderCreateLinkWindow
+        * @description Pre renders the CreateLink window so we get faster window opening.
+        */
+        _renderCreateLinkWindow: function() {
+                var str = '<label for="' + this.get('id') + '_createlink_url"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="' + this.get('id') + '_createlink_url" id="' + this.get('id') + '_createlink_url" value=""></label>';
+                str += '<label for="' + this.get('id') + '_createlink_target"><strong>&nbsp;</strong><input type="checkbox" name="' + this.get('id') + '_createlink_target" id="' + this.get('id') + '_createlink_target" value="_blank" class="createlink_target"> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                str += '<label for="' + this.get('id') + '_createlink_title"><strong>' + this.STR_LINK_TITLE + ':</strong> <input type="text" name="' + this.get('id') + '_createlink_title" id="' + this.get('id') + '_createlink_title" value=""></label>';
+                
+                var body = document.createElement('div');
+                body.innerHTML = str;
+
+                var unlinkCont = document.createElement('div');
+                unlinkCont.className = 'removeLink';
+                var unlink = document.createElement('a');
+                unlink.href = '#';
+                unlink.innerHTML = this.STR_LINK_PROP_REMOVE;
+                unlink.title = this.STR_LINK_PROP_REMOVE;
+                Event.on(unlink, 'click', function(ev) {
+                    Event.stopEvent(ev);
+                    this.unsubscribeAll('afterExecCommand');
+                    this.execCommand('unlink');
+                    this.closeWindow();
+                }, this, true);
+                unlinkCont.appendChild(unlink);
+                body.appendChild(unlinkCont);
+                
+                this._windows.createlink = {};
+                this._windows.createlink.body = body;
+                //body.style.display = 'none';
+                Event.on(body, 'keyup', function(e) {
+                    Event.stopPropagation(e);
+                });
+                this.get('panel').editor_form.appendChild(body);
+                this.fireEvent('windowCreateLinkRender', { type: 'windowCreateLinkRender', panel: this.get('panel'), body: body });
+                return body;
+        },
+        _handleCreateLinkClick: function() {
+            var el = this._getSelectedElement();
+            if (this._isElement(el, 'img')) {
+                this.STOP_EXEC_COMMAND = true;
+                this.currentElement[0] = el;
+                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')) {
+                    YAHOO.log('Toolbar Button for (createlink) was not found, skipping exec.', 'info', 'Editor');
+                    return false;
+                }
+            }
+            
+            this.on('afterExecCommand', function() {
+                var win = new YAHOO.widget.EditorWindow('createlink', {
+                    width: '350px'
+                });
+                
+                var el = this.currentElement[0],
+                    url = '',
+                    title = '',
+                    target = '',
+                    localFile = false;
+                if (el) {
+                    win.el = el;
+                    if (el.getAttribute('href', 2) !== null) {
+                        url = el.getAttribute('href', 2);
+                        if (this._isLocalFile(url)) {
+                            //Local File throw Warning
+                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                            win.setFooter(this.STR_LOCAL_FILE_WARNING);
+                            localFile = true;
+                        } else {
+                            win.setFooter(' ');
+                        }
+                    }
+                    if (el.getAttribute('title') !== null) {
+                        title = el.getAttribute('title');
+                    }
+                    if (el.getAttribute('target') !== null) {
+                        target = el.getAttribute('target');
+                    }
+                }
+                var body = null;
+                if (this._windows.createlink && this._windows.createlink.body) {
+                    body = this._windows.createlink.body;
+                } else {
+                    body = this._renderCreateLinkWindow();
+                }
+
+                win.setHeader(this.STR_LINK_PROP_TITLE);
+                win.setBody(body);
+
+                Event.purgeElement(this.get('id') + '_createlink_url');
+
+                Dom.get(this.get('id') + '_createlink_url').value = url;
+                Dom.get(this.get('id') + '_createlink_title').value = title;
+                Dom.get(this.get('id') + '_createlink_target').checked = ((target) ? true : false);
+                
+
+                Event.onAvailable(this.get('id') + '_createlink_url', function() {
+                    var id = this.get('id');
+                    window.setTimeout(function() {
+                        try {
+                            YAHOO.util.Dom.get(id + '_createlink_url').focus();
+                        } catch (e) {}
+                    }, 50);
+
+                    if (this._isLocalFile(url)) {
+                        //Local File throw Warning
+                        Dom.addClass(this.get('id') + '_createlink_url', 'warning');
+                        YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                        this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                    } else {
+                        Dom.removeClass(this.get('id') + '_createlink_url', 'warning');
+                        this.get('panel').setFooter(' ');
+                    }
+                    Event.on(this.get('id') + '_createlink_url', 'blur', function() {
+                        var url = Dom.get(this.get('id') + '_createlink_url');
+                        if (this._isLocalFile(url.value)) {
+                            //Local File throw Warning
+                            Dom.addClass(url, 'warning');
+                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                        } else {
+                            Dom.removeClass(url, 'warning');
+                            this.get('panel').setFooter(' ');
+                        }
+                    }, this, true);
+                }, this, true);
+                
+                this.openWindow(win);
+
+            });
+        },
+        /**
+        * @private
+        * @method _handleCreateLinkWindowClose
+        * @description Handles the closing of the Link Properties Window.
+        */
+        _handleCreateLinkWindowClose: function() {
+            
+            var url = Dom.get(this.get('id') + '_createlink_url'),
+                target = Dom.get(this.get('id') + '_createlink_target'),
+                title = Dom.get(this.get('id') + '_createlink_title'),
+                el = arguments[0].win.el,
+                a = el;
+
+            if (url && url.value) {
+                var urlValue = url.value;
+                if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                    if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        //Found an @ sign, prefix with mailto:
+                        urlValue = 'mailto:' + urlValue;
+                    } else {
+                        // :// not found adding
+                        if (urlValue.substring(0, 1) != '#') {
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                        
+                    }
+                }
+                el.setAttribute('href', urlValue);
+                if (target.checked) {
+                    el.setAttribute('target', target.value);
+                } else {
+                    el.setAttribute('target', '');
+                }
+                el.setAttribute('title', ((title.value) ? title.value : ''));
+
+            } else {
+                var _span = this._getDoc().createElement('span');
+                _span.innerHTML = el.innerHTML;
+                Dom.addClass(_span, 'yui-non');
+                el.parentNode.replaceChild(_span, el);
+            }
+            Dom.removeClass(url, 'warning');
+            Dom.get(this.get('id') + '_createlink_url').value = '';
+            Dom.get(this.get('id') + '_createlink_title').value = '';
+            Dom.get(this.get('id') + '_createlink_target').checked = false;
+            this.nodeChange();
+            this.currentElement = [];
+            
+        },
+        /**
+        * @private
+        * @method _renderInsertImageWindow
+        * @description Pre renders the InsertImage window so we get faster window opening.
+        */
+        _renderInsertImageWindow: function() {
+                var el = this.currentElement[0];
+                var str = '<label for="' + this.get('id') + '_insertimage_url"><strong>' + this.STR_IMAGE_URL + ':</strong> <input type="text" id="' + this.get('id') + '_insertimage_url" value="" size="40"></label>';
+                var body = document.createElement('div');
+                body.innerHTML = str;
+
+                var tbarCont = document.createElement('div');
+                tbarCont.id = this.get('id') + '_img_toolbar';
+                body.appendChild(tbarCont);
+
+                var str2 = '<label for="' + this.get('id') + '_insertimage_title"><strong>' + this.STR_IMAGE_TITLE + ':</strong> <input type="text" id="' + this.get('id') + '_insertimage_title" value="" size="40"></label>';
+                str2 += '<label for="' + this.get('id') + '_insertimage_link"><strong>' + this.STR_LINK_URL + ':</strong> <input type="text" name="' + this.get('id') + '_insertimage_link" id="' + this.get('id') + '_insertimage_link" value=""></label>';
+                str2 += '<label for="' + this.get('id') + '_insertimage_target"><strong>&nbsp;</strong><input type="checkbox" name="' + this.get('id') + '_insertimage_target_" id="' + this.get('id') + '_insertimage_target" value="_blank" class="insertimage_target"> ' + this.STR_LINK_NEW_WINDOW + '</label>';
+                var div = document.createElement('div');
+                div.innerHTML = str2;
+                body.appendChild(div);
+
+                var o = {};
+                Lang.augmentObject(o, this._defaultImageToolbarConfig); //Break the config reference
+
+                var tbar = new YAHOO.widget.Toolbar(tbarCont, o);
+                tbar.editor_el = el;
+                this._defaultImageToolbar = tbar;
+                
+                var cont = tbar.get('cont');
+                var hw = document.createElement('div');
+                hw.className = 'yui-toolbar-group yui-toolbar-group-height-width height-width';
+                hw.innerHTML = '<h3>' + this.STR_IMAGE_SIZE + ':</h3>';
+                hw.innerHTML += '<span tabIndex="-1"><input type="text" size="3" value="" id="' + this.get('id') + '_insertimage_width"> x <input type="text" size="3" value="" id="' + this.get('id') + '_insertimage_height"></span>';
+                cont.insertBefore(hw, cont.firstChild);
+
+                Event.onAvailable(this.get('id') + '_insertimage_width', function() {
+                    Event.on(this.get('id') + '_insertimage_width', 'blur', function() {
+                        var value = parseInt(Dom.get(this.get('id') + '_insertimage_width').value, 10);
+                        if (value > 5) {
+                           this._defaultImageToolbar.editor_el.style.width = value + 'px';
+                            //Removed moveWindow call so the window doesn't jump
+                            //this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+                Event.onAvailable(this.get('id') + '_insertimage_height', function() {
+                    Event.on(this.get('id') + '_insertimage_height', 'blur', function() {
+                        var value = parseInt(Dom.get(this.get('id') + '_insertimage_height').value, 10);
+                        if (value > 5) {
+                            this._defaultImageToolbar.editor_el.style.height = value + 'px';
+                            //Removed moveWindow call so the window doesn't jump
+                            //this.moveWindow();
+                        }
+                    }, this, true);
+                }, this, true);
+
+
+                tbar.on('colorPickerClicked', function(o) {
+                    var size = '1', type = 'solid', color = 'black', el = this._defaultImageToolbar.editor_el;
+
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    var borderString = size + 'px ' + type + ' #' + o.color;
+                    el.style.border = borderString;
+                }, this, true);
+
+                tbar.on('buttonClick', function(o) {
+                    var value = o.button.value,
+                        el = this._defaultImageToolbar.editor_el,
+                        borderString = '';
+                    if (o.button.menucmd) {
+                        value = o.button.menucmd;
+                    }
+                    var size = '1', type = 'solid', color = 'black';
+
+                    /* All border calcs are done on the left border
+                        since our default interface only supports
+                        one border size/type and color */
+                    if (el.style.borderLeftWidth) {
+                        size = parseInt(el.style.borderLeftWidth, 10);
+                    }
+                    if (el.style.borderLeftStyle) {
+                        type = el.style.borderLeftStyle;
+                    }
+                    if (el.style.borderLeftColor) {
+                        color = el.style.borderLeftColor;
+                    }
+                    switch(value) {
+                        case 'bordersize':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+
+                            borderString = parseInt(o.button.value, 10) + 'px ' + type + ' ' + color;
+                            el.style.border = borderString;
+                            if (parseInt(o.button.value, 10) > 0) {
+                                tbar.enableButton('bordertype');
+                                tbar.enableButton('bordercolor');
+                            } else {
+                                tbar.disableButton('bordertype');
+                                tbar.disableButton('bordercolor');
+                            }
+                            break;
+                        case 'bordertype':
+                            if (this.browser.webkit && this._lastImage) {
+                                Dom.removeClass(this._lastImage, 'selected');
+                                this._lastImage = null;
+                            }
+                            borderString = size + 'px ' + o.button.value + ' ' + color;
+                            el.style.border = borderString;
+                            break;
+                        case 'right':
+                        case 'left':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = o.button.value;
+                            break;
+                        case 'inline':
+                            tbar.deselectAllButtons();
+                            el.style.display = '';
+                            el.align = '';
+                            break;
+                        case 'block':
+                            tbar.deselectAllButtons();
+                            el.style.display = 'block';
+                            el.align = 'center';
+                            break;
+                        case 'padding':
+                            var _button = tbar.getButtonById(o.button.id);
+                            el.style.margin = _button.get('label') + 'px';
+                            break;
+                    }
+                    tbar.selectButton(o.button.value);
+                    if (value !== 'padding') {
+                        this.moveWindow();
+                    }
+                }, this, true);
+
+
+
+                if (this.get('localFileWarning')) {
+                    Event.on(this.get('id') + '_insertimage_link', 'blur', function() {
+                        var url = Dom.get(this.get('id') + '_insertimage_link');
+                        if (this._isLocalFile(url.value)) {
+                            //Local File throw Warning
+                            Dom.addClass(url, 'warning');
+                            YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                            this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                        } else {
+                            Dom.removeClass(url, 'warning');
+                            this.get('panel').setFooter(' ');
+                            //Adobe AIR Code
+                            if ((this.browser.webkit && !this.browser.webkit3 || this.browser.air) || this.browser.opera) {                
+                                this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                            }
+                        }
+                    }, this, true);
+                }
+
+                Event.on(this.get('id') + '_insertimage_url', 'blur', function() {
+                    var url = Dom.get(this.get('id') + '_insertimage_url'),
+                        el = this.currentElement[0];
+
+                    if (url.value && el) {
+                        if (url.value == el.getAttribute('src', 2)) {
+                            YAHOO.log('Images are the same, bail on blur handler', 'info', 'Editor');
+                            return false;
+                        }
+                    }
+                    YAHOO.log('Images are different, process blur handler', 'info', 'Editor');
+                    if (this._isLocalFile(url.value)) {
+                        //Local File throw Warning
+                        Dom.addClass(url, 'warning');
+                        YAHOO.log('Local file reference found, show local warning', 'warn', 'Editor');
+                        this.get('panel').setFooter(this.STR_LOCAL_FILE_WARNING);
+                    } else if (this.currentElement[0]) {
+                        Dom.removeClass(url, 'warning');
+                        this.get('panel').setFooter(' ');
+                        //Adobe AIR Code
+                        if ((this.browser.webkit && !this.browser.webkit3 || this.browser.air) || this.browser.opera) {                
+                            this.get('panel').setFooter(this.STR_IMAGE_COPY);
+                        }
+                        
+                        if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                            this.currentElement[0].setAttribute('src', url.value);
+                            var self = this,
+                                img = new Image();
+
+                            img.onerror = function() {
+                                url.value = self.STR_IMAGE_HERE;
+                                img.setAttribute('src', self.get('blankimage'));
+                                self.currentElement[0].setAttribute('src', self.get('blankimage'));
+                                YAHOO.util.Dom.get(self.get('id') + '_insertimage_height').value = img.height;
+                                YAHOO.util.Dom.get(self.get('id') + '_insertimage_width').value = img.width;
+                            };
+                            var id = this.get('id');
+                            window.setTimeout(function() {
+                                YAHOO.util.Dom.get(id + '_insertimage_height').value = img.height;
+                                YAHOO.util.Dom.get(id + '_insertimage_width').value = img.width;
+                                if (self.currentElement && self.currentElement[0]) {
+                                    if (!self.currentElement[0]._height) {
+                                        self.currentElement[0]._height = img.height;
+                                    }
+                                    if (!self.currentElement[0]._width) {
+                                        self.currentElement[0]._width = img.width;
+                                    }
+                                }
+                                //Removed moveWindow call so the window doesn't jump
+                                //self.moveWindow();
+                            }, 800); //Bumped the timeout up to account for larger images..
+
+                            if (url.value != this.STR_IMAGE_HERE) {
+                                img.src = url.value;
+                            }
+                        }
+                    }
+                    }, this, true);
+
+
+
+                this._windows.insertimage = {};
+                this._windows.insertimage.body = body;
+                //body.style.display = 'none';
+                this.get('panel').editor_form.appendChild(body);
+                this.fireEvent('windowInsertImageRender', { type: 'windowInsertImageRender', panel: this.get('panel'), body: body, toolbar: tbar });
+                return body;
+        },
+        /**
+        * @private
+        * @method _handleInsertImageClick
+        * @description Opens the Image Properties Window when the insert Image button is clicked or an Image is Double Clicked.
+        */
+        _handleInsertImageClick: function() {
+            if (this.get('limitCommands')) {
+                if (!this.toolbar.getButtonByValue('insertimage')) {
+                    YAHOO.log('Toolbar Button for (insertimage) was not found, skipping exec.', 'info', 'Editor');
+                    return false;
+                }
+            }
+            this.on('afterExecCommand', function() {
+                YAHOO.log('afterExecCommand :: _handleInsertImageClick', 'info', 'Editor');
+                var el = this.currentElement[0],
+                    body = null,
+                    link = '',
+                    target = '',
+                    tbar = null,
+                    title = '',
+                    src = '',
+                    align = '',
+                    height = 75,
+                    width = 75,
+                    padding = 0,
+                    oheight = 0,
+                    owidth = 0,
+                    blankimage = false,
+                    win = new YAHOO.widget.EditorWindow('insertimage', {
+                        width: '415px'
+                    });
+
+                if (!el) {
+                    el = this._getSelectedElement();
+                }
+                if (el) {
+                    win.el = el;
+                    if (el.getAttribute('src')) {
+                        src = el.getAttribute('src', 2);
+                        if (src.indexOf(this.get('blankimage')) != -1) {
+                            src = this.STR_IMAGE_HERE;
+                            blankimage = true;
+                        }
+                    }
+                    if (el.getAttribute('alt', 2)) {
+                        title = el.getAttribute('alt', 2);
+                    }
+                    if (el.getAttribute('title', 2)) {
+                        title = el.getAttribute('title', 2);
+                    }
+
+                    if (el.parentNode && this._isElement(el.parentNode, 'a')) {
+                        link = el.parentNode.getAttribute('href', 2);
+                        if (el.parentNode.getAttribute('target') !== null) {
+                            target = el.parentNode.getAttribute('target');
+                        }
+                    }
+                    height = parseInt(el.height, 10);
+                    width = parseInt(el.width, 10);
+                    if (el.style.height) {
+                        height = parseInt(el.style.height, 10);
+                    }
+                    if (el.style.width) {
+                        width = parseInt(el.style.width, 10);
+                    }
+                    if (el.style.margin) {
+                        padding = parseInt(el.style.margin, 10);
+                    }
+                    if (!blankimage) {
+                        if (!el._height) {
+                            el._height = height;
+                        }
+                        if (!el._width) {
+                            el._width = width;
+                        }
+                        oheight = el._height;
+                        owidth = el._width;
+                    }
+                }
+                if (this._windows.insertimage && this._windows.insertimage.body) {
+                    body = this._windows.insertimage.body;
+                    this._defaultImageToolbar.resetAllButtons();
+                } else {
+                    body = this._renderInsertImageWindow();
+                }
+
+                tbar = this._defaultImageToolbar;
+                tbar.editor_el = el;
+                
+
+                var bsize = '0',
+                    btype = 'solid';
+
+                if (el.style.borderLeftWidth) {
+                    bsize = parseInt(el.style.borderLeftWidth, 10);
+                }
+                if (el.style.borderLeftStyle) {
+                    btype = el.style.borderLeftStyle;
+                }
+                var bs_button = tbar.getButtonByValue('bordersize'),
+                    bSizeStr = ((parseInt(bsize, 10) > 0) ? '' : this.STR_NONE);
+                bs_button.set('label', '<span class="yui-toolbar-bordersize-' + bsize + '">' + bSizeStr + '</span>');
+                this._updateMenuChecked('bordersize', bsize, tbar);
+
+                var bt_button = tbar.getButtonByValue('bordertype');
+                bt_button.set('label', '<span class="yui-toolbar-bordertype-' + btype + '">asdfa</span>');
+                this._updateMenuChecked('bordertype', btype, tbar);
+                if (parseInt(bsize, 10) > 0) {
+                    tbar.enableButton(bt_button);
+                    tbar.enableButton(bs_button);
+                    tbar.enableButton('bordercolor');
+                }
+
+                if ((el.align == 'right') || (el.align == 'left')) {
+                    tbar.selectButton(el.align);
+                } else if (el.style.display == 'block') {
+                    tbar.selectButton('block');
+                } else {
+                    tbar.selectButton('inline');
+                }
+                if (parseInt(el.style.marginLeft, 10) > 0) {
+                    tbar.getButtonByValue('padding').set('label', ''+parseInt(el.style.marginLeft, 10));
+                }
+                if (el.style.borderSize) {
+                    tbar.selectButton('bordersize');
+                    tbar.selectButton(parseInt(el.style.borderSize, 10));
+                }
+                tbar.getButtonByValue('padding').set('label', ''+padding);
+
+
+
+                win.setHeader(this.STR_IMAGE_PROP_TITLE);
+                win.setBody(body);
+                //Adobe AIR Code
+                if ((this.browser.webkit && !this.browser.webkit3 || this.browser.air) || this.browser.opera) {                
+                    win.setFooter(this.STR_IMAGE_COPY);
+                }
+                this.openWindow(win);
+                Dom.get(this.get('id') + '_insertimage_url').value = src;
+                Dom.get(this.get('id') + '_insertimage_title').value = title;
+                Dom.get(this.get('id') + '_insertimage_link').value = link;
+                Dom.get(this.get('id') + '_insertimage_target').checked = ((target) ? true : false);
+                Dom.get(this.get('id') + '_insertimage_width').value = width;
+                Dom.get(this.get('id') + '_insertimage_height').value = height;
+
+
+                if (((height != oheight) || (width != owidth)) && (!blankimage)) {
+                    var s = document.createElement('span');
+                    s.className = 'info';
+                    s.innerHTML = this.STR_IMAGE_ORIG_SIZE + ': ('+ owidth +' x ' + oheight + ')';
+                    if (Dom.get(this.get('id') + '_insertimage_height').nextSibling) {
+                        var old = Dom.get(this.get('id') + '_insertimage_height').nextSibling;
+                        old.parentNode.removeChild(old);
+                    }
+                    Dom.get(this.get('id') + '_insertimage_height').parentNode.appendChild(s);
+                }
+
+                this.toolbar.selectButton('insertimage');
+                var id = this.get('id');
+                window.setTimeout(function() {
+                    try {
+                        YAHOO.util.Dom.get(id + '_insertimage_url').focus();
+                        if (blankimage) {
+                            YAHOO.util.Dom.get(id + '_insertimage_url').select();
+                        }
+                    } catch (e) {}
+                }, 50);
+
+            });
+        },
+        /**
+        * @private
+        * @method _handleInsertImageWindowClose
+        * @description Handles the closing of the Image Properties Window.
+        */
+        _handleInsertImageWindowClose: function() {
+            var url = Dom.get(this.get('id') + '_insertimage_url'),
+                title = Dom.get(this.get('id') + '_insertimage_title'),
+                link = Dom.get(this.get('id') + '_insertimage_link'),
+                target = Dom.get(this.get('id') + '_insertimage_target'),
+                el = arguments[0].win.el;
+
+            if (url && url.value && (url.value != this.STR_IMAGE_HERE)) {
+                el.setAttribute('src', url.value);
+                el.setAttribute('title', title.value);
+                el.setAttribute('alt', title.value);
+                var par = el.parentNode;
+                if (link.value) {
+                    var urlValue = link.value;
+                    if ((urlValue.indexOf(':/'+'/') == -1) && (urlValue.substring(0,1) != '/') && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                        if ((urlValue.indexOf('@') != -1) && (urlValue.substring(0, 6).toLowerCase() != 'mailto')) {
+                            //Found an @ sign, prefix with mailto:
+                            urlValue = 'mailto:' + urlValue;
+                        } else {
+                            // :// not found adding
+                            urlValue = 'http:/'+'/' + urlValue;
+                        }
+                    }
+                    if (par && this._isElement(par, 'a')) {
+                        par.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            par.setAttribute('target', target.value);
+                        } else {
+                            par.setAttribute('target', '');
+                        }
+                    } else {
+                        var _a = this._getDoc().createElement('a');
+                        _a.setAttribute('href', urlValue);
+                        if (target.checked) {
+                            _a.setAttribute('target', target.value);
+                        } else {
+                            _a.setAttribute('target', '');
+                        }
+                        el.parentNode.replaceChild(_a, el);
+                        _a.appendChild(el);
+                    }
+                } else {
+                    if (par && this._isElement(par, 'a')) {
+                        par.parentNode.replaceChild(el, par);
+                    }
+                }
+            } else {
+                //No url/src given, remove the node from the document
+                el.parentNode.removeChild(el);
+            }
+            Dom.get(this.get('id') + '_insertimage_url').value = '';
+            Dom.get(this.get('id') + '_insertimage_title').value = '';
+            Dom.get(this.get('id') + '_insertimage_link').value = '';
+            Dom.get(this.get('id') + '_insertimage_target').checked = false;
+            Dom.get(this.get('id') + '_insertimage_width').value = 0;
+            Dom.get(this.get('id') + '_insertimage_height').value = 0;
+            this._defaultImageToolbar.resetAllButtons();
+            this.currentElement = [];
+            this.nodeChange();
+        },
+        /**
+        * @property EDITOR_PANEL_ID
+        * @description HTML id to give the properties window in the DOM.
+        * @type String
+        */
+        EDITOR_PANEL_ID: '-panel',
+        /**
+        * @private
+        * @method _renderPanel
+        * @description Renders the panel used for Editor Windows to the document so we can start using it..
+        * @return {<a href="YAHOO.widget.Overlay.html">YAHOO.widget.Overlay</a>}
+        */
+        _renderPanel: function() {
+            var panelEl = document.createElement('div');
+            Dom.addClass(panelEl, 'yui-editor-panel');
+            panelEl.id = this.get('id') + this.EDITOR_PANEL_ID;
+            panelEl.style.position = 'absolute';
+            panelEl.style.top = '-9999px';
+            panelEl.style.left = '-9999px';
+            document.body.appendChild(panelEl);
+            this.get('element_cont').insertBefore(panelEl, this.get('element_cont').get('firstChild'));
+
+                
+
+            var panel = new YAHOO.widget.Overlay(this.get('id') + this.EDITOR_PANEL_ID, {
+                    width: '300px',
+                    iframe: true,
+                    visible: false,
+                    underlay: 'none',
+                    draggable: false,
+                    close: false
+                });
+            this.set('panel', panel);
+
+            panel.setBody('---');
+            panel.setHeader(' ');
+            panel.setFooter(' ');
+
+
+            var body = document.createElement('div');
+            body.className = this.CLASS_PREFIX + '-body-cont';
+            for (var b in this.browser) {
+                if (this.browser[b]) {
+                    Dom.addClass(body, b);
+                    break;
+                }
+            }
+            Dom.addClass(body, ((YAHOO.widget.Button && (this._defaultToolbar.buttonType == 'advanced')) ? 'good-button' : 'no-button'));
+
+            var _note = document.createElement('h3');
+            _note.className = 'yui-editor-skipheader';
+            _note.innerHTML = this.STR_CLOSE_WINDOW_NOTE;
+            body.appendChild(_note);
+            var form = document.createElement('fieldset');
+            panel.editor_form = form;
+
+            body.appendChild(form);
+            var _close = document.createElement('span');
+            _close.innerHTML = 'X';
+            _close.title = this.STR_CLOSE_WINDOW;
+            _close.className = 'close';
+            
+            Event.on(_close, 'click', this.closeWindow, this, true);
+
+            var _knob = document.createElement('span');
+            _knob.innerHTML = '^';
+            _knob.className = 'knob';
+            panel.editor_knob = _knob;
+
+            var _header = document.createElement('h3');
+            panel.editor_header = _header;
+            _header.innerHTML = '<span></span>';
+
+            panel.setHeader(' '); //Clear the current header
+            panel.appendToHeader(_header);
+            _header.appendChild(_close);
+            _header.appendChild(_knob);
+            panel.setBody(' '); //Clear the current body
+            panel.setFooter(' '); //Clear the current footer
+            panel.appendToBody(body); //Append the new DOM node to it
+
+            Event.on(panel.element, 'click', function(ev) {
+                Event.stopPropagation(ev);
+            });
+
+            var fireShowEvent = function() {
+                panel.bringToTop();
+                YAHOO.util.Dom.setStyle(this.element, 'display', 'block');
+                this._handleWindowInputs(false);
+            };
+            panel.showEvent.subscribe(fireShowEvent, this, true);
+            panel.hideEvent.subscribe(function() {
+                this._handleWindowInputs(true);
+            }, this, true);
+            panel.renderEvent.subscribe(function() {
+                this._renderInsertImageWindow();
+                this._renderCreateLinkWindow();
+                this.fireEvent('windowRender', { type: 'windowRender', panel: panel });
+                this._handleWindowInputs(true);
+            }, this, true);
+
+            if (this.DOMReady) {
+                this.get('panel').render();
+            } else {
+                Event.onDOMReady(function() {
+                    this.get('panel').render();
+                }, this, true);
+            }
+            return this.get('panel');
+        },
+        /**
+        * @method _handleWindowInputs
+        * @param {Boolean} disable The state to set all inputs in all Editor windows to. Defaults to: false.
+        * @description Disables/Enables all fields inside Editor windows. Used in show/hide events to keep window fields from submitting when the parent form is submitted.
+        */
+        _handleWindowInputs: function(disable) {
+            if (!Lang.isBoolean(disable)) {
+                disable = false;
+            }
+            var inputs = this.get('panel').element.getElementsByTagName('input');
+            for (var i = 0; i < inputs.length; i++) {
+                try {
+                    inputs[i].disabled = disable;
+                } catch (e) {}
+            }
+        },
+        /**
+        * @method openWindow
+        * @param {<a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a>} win A <a href="YAHOO.widget.EditorWindow.html">YAHOO.widget.EditorWindow</a> instance
+        * @description Opens a new "window/panel"
+        */
+        openWindow: function(win) {
+            
+            YAHOO.log('openWindow: ' + win.name, 'info', 'Editor');
+            var self = this;
+            window.setTimeout(function() {
+                self.toolbar.set('disabled', true); //Disable the toolbar when an editor window is open..
+            }, 10);
+            Event.on(document, 'keydown', this._closeWindow, this, true);
+            
+            if (this.currentWindow) {
+                this.closeWindow();
+            }
+            
+            var xy = Dom.getXY(this.currentElement[0]),
+            elXY = Dom.getXY(this.get('iframe').get('element')),
+            panel = this.get('panel'),
+            newXY = [(xy[0] + elXY[0] - 20), (xy[1] + elXY[1] + 10)],
+            wWidth = (parseInt(win.attrs.width, 10) / 2),
+            align = 'center',
+            body = null;
+
+            this.fireEvent('beforeOpenWindow', { type: 'beforeOpenWindow', win: win, panel: panel });
+
+            var form = panel.editor_form;
+            
+            var wins = this._windows;
+            for (var b in wins) {
+                if (Lang.hasOwnProperty(wins, b)) {
+                    if (wins[b] && wins[b].body) {
+                        if (b == win.name) {
+                            Dom.setStyle(wins[b].body, 'display', 'block');
+                        } else {
+                            Dom.setStyle(wins[b].body, 'display', 'none');
+                        }
+                    }
+                }
+            }
+            
+            if (this._windows[win.name].body) {
+                Dom.setStyle(this._windows[win.name].body, 'display', 'block');
+                form.appendChild(this._windows[win.name].body);
+            } else {
+                if (Lang.isObject(win.body)) { //Assume it's a reference
+                    form.appendChild(win.body);
+                } else { //Assume it's a string
+                    var _tmp = document.createElement('div');
+                    _tmp.innerHTML = win.body;
+                    form.appendChild(_tmp);
+                }
+            }
+            panel.editor_header.firstChild.innerHTML = win.header;
+            if (win.footer !== null) {
+                panel.setFooter(win.footer);
+            }
+            panel.cfg.setProperty('width', win.attrs.width);
+
+            this.currentWindow = win;
+            this.moveWindow(true);
+            panel.show();
+            this.fireEvent('afterOpenWindow', { type: 'afterOpenWindow', win: win, panel: panel });
+        },
+        /**
+        * @method moveWindow
+        * @param {Boolean} force Boolean to tell it to move but not use any animation (Usually done the first time the window is loaded.)
+        * @description Realign the window with the currentElement and reposition the knob above the panel.
+        */
+        moveWindow: function(force) {
+            if (!this.currentWindow) {
+                return false;
+            }
+            var win = this.currentWindow,
+                xy = Dom.getXY(this.currentElement[0]),
+                elXY = Dom.getXY(this.get('iframe').get('element')),
+                panel = this.get('panel'),
+                //newXY = [(xy[0] + elXY[0] - 20), (xy[1] + elXY[1] + 10)],
+                newXY = [(xy[0] + elXY[0]), (xy[1] + elXY[1])],
+                wWidth = (parseInt(win.attrs.width, 10) / 2),
+                align = 'center',
+                orgXY = panel.cfg.getProperty('xy') || [0,0],
+                _knob = panel.editor_knob,
+                xDiff = 0,
+                yDiff = 0,
+                anim = false;
+
+
+            newXY[0] = ((newXY[0] - wWidth) + 20);
+            //Account for the Scroll bars in a scrolled editor window.
+            newXY[0] = newXY[0] - Dom.getDocumentScrollLeft(this._getDoc());
+            newXY[1] = newXY[1] - Dom.getDocumentScrollTop(this._getDoc());
+            
+            if (this._isElement(this.currentElement[0], 'img')) {
+                if (this.currentElement[0].src.indexOf(this.get('blankimage')) != -1) {
+                    newXY[0] = (newXY[0] + (75 / 2)); //Placeholder size
+                    newXY[1] = (newXY[1] + 75); //Placeholder sizea
+                } else {
+                    var w = parseInt(this.currentElement[0].width, 10);
+                    var h = parseInt(this.currentElement[0].height, 10);
+                    newXY[0] = (newXY[0] + (w / 2));
+                    newXY[1] = (newXY[1] + h);
+                }
+                newXY[1] = newXY[1] + 15;
+            } else {
+                var fs = Dom.getStyle(this.currentElement[0], 'fontSize');
+                if (fs && fs.indexOf && fs.indexOf('px') != -1) {
+                    newXY[1] = newXY[1] + parseInt(Dom.getStyle(this.currentElement[0], 'fontSize'), 10) + 5;
+                } else {
+                    newXY[1] = newXY[1] + 20;
+                }
+            }
+            if (newXY[0] < elXY[0]) {
+                newXY[0] = elXY[0] + 5;
+                align = 'left';
+            }
+
+            if ((newXY[0] + (wWidth * 2)) > (elXY[0] + parseInt(this.get('iframe').get('element').clientWidth, 10))) {
+                newXY[0] = ((elXY[0] + parseInt(this.get('iframe').get('element').clientWidth, 10)) - (wWidth * 2) - 5);
+                align = 'right';
+            }
+            
+            try {
+                xDiff = (newXY[0] - orgXY[0]);
+                yDiff = (newXY[1] - orgXY[1]);
+            } catch (e) {}
+
+
+            var iTop = elXY[1] + parseInt(this.get('height'), 10);
+            var iLeft = elXY[0] + parseInt(this.get('width'), 10);
+            if (newXY[1] > iTop) {
+                newXY[1] = iTop;
+            }
+            if (newXY[0] > iLeft) {
+                newXY[0] = (iLeft / 2);
+            }
+            
+            //Convert negative numbers to positive so we can get the difference in distance
+            xDiff = ((xDiff < 0) ? (xDiff * -1) : xDiff);
+            yDiff = ((yDiff < 0) ? (yDiff * -1) : yDiff);
+
+            if (((xDiff > 10) || (yDiff > 10)) || force) { //Only move the window if it's supposed to move more than 10px or force was passed (new window)
+                var _knobLeft = 0,
+                    elW = 0;
+
+                if (this.currentElement[0].width) {
+                    elW = (parseInt(this.currentElement[0].width, 10) / 2);
+                }
+
+                var leftOffset = xy[0] + elXY[0] + elW;
+                _knobLeft = leftOffset - newXY[0];
+                //Check to see if the knob will go off either side & reposition it
+                if (_knobLeft > (parseInt(win.attrs.width, 10) - 1)) {
+                    _knobLeft = ((parseInt(win.attrs.width, 10) - 30) - 1);
+                } else if (_knobLeft < 40) {
+                    _knobLeft = 1;
+                }
+                if (isNaN(_knobLeft)) {
+                    _knobLeft = 1;
+                }
+                if (force) {
+                    if (_knob) {
+                        _knob.style.left = _knobLeft + 'px';
+                    }
+                    //Removed Animation from a forced move..
+                    panel.cfg.setProperty('xy', newXY);
+                } else {
+                    if (this.get('animate')) {
+                        anim = new YAHOO.util.Anim(panel.element, {}, 0.5, YAHOO.util.Easing.easeOut);
+                        anim.attributes = {
+                            top: {
+                                to: newXY[1]
+                            },
+                            left: {
+                                to: newXY[0]
+                            }
+                        };
+                        anim.onComplete.subscribe(function() {
+                            panel.cfg.setProperty('xy', newXY);
+                        });
+                        //We have to animate the iframe shim at the same time as the panel or we get scrollbar bleed ..
+                        var iframeAnim = new YAHOO.util.Anim(panel.iframe, anim.attributes, 0.5, YAHOO.util.Easing.easeOut);
+
+                        var _knobAnim = new YAHOO.util.Anim(_knob, {
+                            left: {
+                                to: _knobLeft
+                            }
+                        }, 0.6, YAHOO.util.Easing.easeOut);
+                        anim.animate();
+                        iframeAnim.animate();
+                        _knobAnim.animate();
+                    } else {
+                        _knob.style.left = _knobLeft + 'px';
+                        panel.cfg.setProperty('xy', newXY);
+                    }
+                }
+            }
+        },
+        /**
+        * @private
+        * @method _closeWindow
+        * @description Close the currently open EditorWindow with the Escape key.
+        * @param {Event} ev The keypress Event that we are trapping
+        */
+        _closeWindow: function(ev) {
+            //if ((ev.charCode == 87) && ev.shiftKey && ev.ctrlKey) {
+            if (this._checkKey(this._keyMap.CLOSE_WINDOW, ev)) {            
+                if (this.currentWindow) {
+                    this.closeWindow();
+                }
+            }
+        },
+        /**
+        * @method closeWindow
+        * @description Close the currently open EditorWindow.
+        */
+        closeWindow: function(keepOpen) {
+            YAHOO.log('closeWindow: ' + this.currentWindow.name, 'info', 'Editor');
+            this.fireEvent('window' + this.currentWindow.name + 'Close', { type: 'window' + this.currentWindow.name + 'Close', win: this.currentWindow, el: this.currentElement[0] });
+            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(); //Needed to move the iframe with the hidden panel
+            this.unsubscribeAll('afterExecCommand');
+            this.toolbar.set('disabled', false); //enable the toolbar now that the window is closed
+            this.toolbar.resetAllButtons();
+            this.focus();
+            Event.removeListener(document, 'keydown', this._closeWindow);
+        },
+
+        /* {{{  Command Overrides - These commands are only over written when we are using the advanced version */
+        
+        /**
+        * @method cmd_undo
+        * @description Pulls an item from the Undo stack and updates the Editor
+        * @param value Value passed from the execCommand method
+        */
+        cmd_undo: function(value) {
+            if (this._hasUndoLevel()) {
+                var c_html = this.getEditorHTML(), html;
+                if (!this._undoLevel) {
+                    this._undoLevel = this._undoCache.length;
+                }
+                this._undoLevel = (this._undoLevel - 1);
+                if (this._undoCache[this._undoLevel]) {
+                    html = this._getUndo(this._undoLevel);
+                    if (html != c_html) {
+                        this.setEditorHTML(html);
+                    } else {
+                        this._undoLevel = (this._undoLevel - 1);
+                        html = this._getUndo(this._undoLevel);
+                        if (html != c_html) {
+                            this.setEditorHTML(html);
+                        }
+                    }
+                } else {
+                    this._undoLevel = 0;
+                    this.toolbar.disableButton('undo');
+                }
+            }
+            return [false];
+        },
+
+        /**
+        * @method cmd_redo
+        * @description Pulls an item from the Undo stack and updates the Editor
+        * @param value Value passed from the execCommand method
+        */
+        cmd_redo: function(value) {
+            this._undoLevel = this._undoLevel + 1;
+            if (this._undoLevel >= this._undoCache.length) {
+                this._undoLevel = this._undoCache.length;
+            }
+            YAHOO.log(this._undoLevel + ' :: ' + this._undoCache.length, 'warn', 'SimpleEditor');
+            if (this._undoCache[this._undoLevel]) {
+                var html = this._getUndo(this._undoLevel);
+                this.setEditorHTML(html);
+            } else {
+                this.toolbar.disableButton('redo');
+            }
+            return [false];
+        },       
+        
+        /**
+        * @method cmd_heading
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('heading') is used.
+        */
+        cmd_heading: function(value) {
+            var exec = true,
+                el = null,
+                action = 'heading',
+                _sel = this._getSelection(),
+                _selEl = this._getSelectedElement();
+
+            if (_selEl) {
+                _sel = _selEl;
+            }
+            
+            if (this.browser.ie) {
+                action = 'formatblock';
+            }
+            if (value == this.STR_NONE) {
+                if ((_sel && _sel.tagName && (_sel.tagName.toLowerCase().substring(0,1) == 'h')) || (_sel && _sel.parentNode && _sel.parentNode.tagName && (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h'))) {
+                    if (_sel.parentNode.tagName.toLowerCase().substring(0,1) == 'h') {
+                        _sel = _sel.parentNode;
+                    }
+                    if (this._isElement(_sel, 'html')) {
+                        return [false];
+                    }
+                    el = this._swapEl(_selEl, 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
+                }
+                exec = false;
+            } else {
+                if (this._isElement(_selEl, 'h1') || this._isElement(_selEl, 'h2') || this._isElement(_selEl, 'h3') || this._isElement(_selEl, 'h4') || this._isElement(_selEl, 'h5') || this._isElement(_selEl, 'h6')) {
+                    el = this._swapEl(_selEl, value);
+                    this._selectNode(el);
+                    this.currentElement[0] = el;
+                } else {
+                    this._createCurrentElement(value);
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
+            }
+            return [exec, action];
+        },
+        /**
+        * @method cmd_hiddenelements
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('hiddenelements') is used.
+        */
+        cmd_hiddenelements: function(value) {
+            if (this._showingHiddenElements) {
+                //Don't auto highlight the hidden button
+                this._lastButton = null;
+                YAHOO.log('Enabling hidden CSS File', 'info', 'SimpleEditor');
+                this._showingHiddenElements = false;
+                this.toolbar.deselectButton('hiddenelements');
+                Dom.removeClass(this._getDoc().body, this.CLASS_HIDDEN);
+            } else {
+                YAHOO.log('Disabling hidden CSS File', 'info', 'SimpleEditor');
+                this._showingHiddenElements = true;
+                Dom.addClass(this._getDoc().body, this.CLASS_HIDDEN);
+                this.toolbar.selectButton('hiddenelements');
+            }
+            return [false];
+        },
+        /**
+        * @method cmd_removeformat
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('removeformat') is used.
+        */
+        cmd_removeformat: function(value) {
+            var exec = true;
+            /*
+            * @knownissue Remove Format issue
+            * @browser Safari 2.x
+            * @description There is an issue here with Safari, that it may not always remove the format of the item that is selected.
+            * Due to the way that Safari 2.x handles ranges, it is very difficult to determine what the selection holds.
+            * So here we are making the best possible guess and acting on it.
+            */
+            if (this.browser.webkit && !this._getDoc().queryCommandEnabled('removeformat')) {
+                var _txt = this._getSelection()+'';
+                this._createCurrentElement('span');
+                this.currentElement[0].className = 'yui-non';
+                this.currentElement[0].innerHTML = _txt;
+                for (var i = 1; i < this.currentElement.length; i++) {
+                    this.currentElement[i].parentNode.removeChild(this.currentElement[i]);
+                }
+                
+                exec = false;
+            }
+            return [exec];
+        },
+        /**
+        * @method cmd_script
+        * @param action action passed from the execCommand method
+        * @param value Value passed from the execCommand method
+        * @description This is a combined execCommand override method. It is called from the cmd_superscript and cmd_subscript methods.
+        */
+        cmd_script: function(action, value) {
+            var exec = true, tag = action.toLowerCase().substring(0, 3),
+                _span = null, _selEl = this._getSelectedElement();
+
+            if (this.browser.webkit) {
+                YAHOO.log('Safari dom fun again (' + action + ')..', 'info', 'EditorSafari');
+                if (this._isElement(_selEl, tag)) {
+                    YAHOO.log('we are a child of tag (' + tag + '), reverse process', 'info', 'EditorSafari');
+                    _span = this._swapEl(this.currentElement[0], 'span', function(el) {
+                        el.className = 'yui-non';
+                    });
+                    this._selectNode(_span);
+                } else {
+                    this._createCurrentElement(tag);
+                    var _sub = this._swapEl(this.currentElement[0], tag);
+                    this._selectNode(_sub);
+                    this.currentElement[0] = _sub;
+                }
+                exec = false;
+            }
+            return exec;
+        },
+        /**
+        * @method cmd_superscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('superscript') is used.
+        */
+        cmd_superscript: function(value) {
+            return [this.cmd_script('superscript', value)];
+        },
+        /**
+        * @method cmd_subscript
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('subscript') is used.
+        */
+        cmd_subscript: function(value) {
+            return [this.cmd_script('subscript', value)];
+        },
+        /**
+        * @method cmd_indent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('indent') is used.
+        */
+        cmd_indent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null;
+
+            //if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+            //if (this.browser.webkit || this.browser.ie) {
+            if (this.browser.ie) {
+                if (this._isElement(selEl, 'blockquote')) {
+                    _bq = this._getDoc().createElement('blockquote');
+                    _bq.innerHTML = selEl.innerHTML;
+                    selEl.innerHTML = '';
+                    selEl.appendChild(_bq);
+                    this._selectNode(_bq);
+                } else {
+                    _bq = this._getDoc().createElement('blockquote');
+                    var html = this._getRange().htmlText;
+                    _bq.innerHTML = html;
+                    this._createCurrentElement('blockquote');
+                    /*
+                    for (var i = 0; i < this.currentElement.length; i++) {
+                        _bq = this._getDoc().createElement('blockquote');
+                        _bq.innerHTML = this.currentElement[i].innerHTML;
+                        this.currentElement[i].parentNode.replaceChild(_bq, this.currentElement[i]);
+                        this.currentElement[i] = _bq;
+                    }
+                    */
+                    this.currentElement[0].parentNode.replaceChild(_bq, this.currentElement[0]);
+                    this.currentElement[0] = _bq;
+                    this._selectNode(this.currentElement[0]);
+                }
+                exec = false;
+            } else {
+                value = 'blockquote';
+            }
+            return [exec, 'formatblock', value];
+        },
+        /**
+        * @method cmd_outdent
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('outdent') is used.
+        */
+        cmd_outdent: function(value) {
+            var exec = true, selEl = this._getSelectedElement(), _bq = null, _span = null;
+            //if (this.browser.webkit || this.browser.ie || this.browser.gecko) {
+            if (this.browser.webkit || this.browser.ie) {
+            //if (this.browser.ie) {
+                selEl = this._getSelectedElement();
+                if (this._isElement(selEl, 'blockquote')) {
+                    var par = selEl.parentNode;
+                    if (this._isElement(selEl.parentNode, 'blockquote')) {
+                        par.innerHTML = selEl.innerHTML;
+                        this._selectNode(par);
+                    } else {
+                        _span = this._getDoc().createElement('span');
+                        _span.innerHTML = selEl.innerHTML;
+                        YAHOO.util.Dom.addClass(_span, 'yui-non');
+                        par.replaceChild(_span, selEl);
+                        this._selectNode(_span);
+                    }
+                } else {
+                    YAHOO.log('Can not outdent, we are not inside a blockquote', 'warn', 'Editor');
+                }
+                exec = false;
+            } else {
+                value = false;
+            }
+            return [exec, 'outdent', value];
+        },
+        /**
+        * @method cmd_justify
+        * @param dir The direction to justify
+        * @description This is a factory method for the justify family of commands.
+        */
+        cmd_justify: function(dir) {
+            if (this.browser.ie) {
+                if (this._hasSelection()) {
+                    this._createCurrentElement('span');
+                    this._swapEl(this.currentElement[0], 'div', function(el) {
+                        el.style.textAlign = dir;
+                    });
+                    
+                    return [false];
+                }
+            }
+            return [true, 'justify' + dir, ''];
+        },
+        /**
+        * @method cmd_justifycenter
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('justifycenter') is used.
+        */
+        cmd_justifycenter: function() {
+            return [this.cmd_justify('center')];
+        },
+        /**
+        * @method cmd_justifyleft
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('justifyleft') is used.
+        */
+        cmd_justifyleft: function() {
+            return [this.cmd_justify('left')];
+        },
+        /**
+        * @method cmd_justifyright
+        * @param value Value passed from the execCommand method
+        * @description This is an execCommand override method. It is called from execCommand when the execCommand('justifyright') is used.
+        */
+        cmd_justifyright: function() {
+            return [this.cmd_justify('right')];
+        },
+        /* }}}*/        
+        /**
+        * @method toString
+        * @description Returns a string representing the editor.
+        * @return {String}
+        */
+        toString: function() {
+            var str = 'Editor';
+            if (this.get && this.get('element_cont')) {
+                str = 'Editor (#' + this.get('element_cont').get('id') + ')' + ((this.get('disabled') ? ' Disabled' : ''));
+            }
+            return str;
+        }
+    });
+/**
+* @event beforeOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires before an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event afterOpenWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fires after an Editor Window is opened. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event closeWindow
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @description Event fires after an Editor Window is closed. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDOpen
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCMDClose
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Dynamic event fired when an <a href="YAHOO.widget.EditorWindow.html">EditorWindow</a> is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> for more information on listening for this event.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowRender
+* @param {<a href="YAHOO.widget.EditorWindow.html">EditorWindow</a>} win The EditorWindow object
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @description Event fired when the initial Overlay is rendered. Can be used to manipulate the content of the panel.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowInsertImageRender
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @param {HTMLElement} body The HTML element used as the body of the window..
+* @param {Toolbar} toolbar A reference to the toolbar object used inside this window.
+* @description Event fired when the pre render of the Insert Image window has finished.
+* @type YAHOO.util.CustomEvent
+*/
+/**
+* @event windowCreateLinkRender
+* @param {Overlay} panel The Overlay object that is used to create the window.
+* @param {HTMLElement} body The HTML element used as the body of the window..
+* @description Event fired when the pre render of the Create Link window has finished.
+* @type YAHOO.util.CustomEvent
+*/
+
+
+
+    /**
+     * @description Class to hold Window information between uses. We use the same panel to show the windows, so using this will allow you to configure a window before it is shown.
+     * This is what you pass to Editor.openWindow();. These parameters will not take effect until the openWindow() is called in the editor.
+     * @class EditorWindow
+     * @param {String} name The name of the window.
+     * @param {Object} attrs Attributes for the window. Current attributes used are : height and width
+    */
+    YAHOO.widget.EditorWindow = function(name, attrs) {
+        /**
+        * @private
+        * @property name
+        * @description A unique name for the window
+        */
+        this.name = name.replace(' ', '_');
+        /**
+        * @private
+        * @property attrs
+        * @description The window attributes
+        */
+        this.attrs = attrs;
+    };
+
+    YAHOO.widget.EditorWindow.prototype = {
+        /**
+        * @private
+        * @property header
+        * @description Holder for the header of the window, used in Editor.openWindow
+        */
+        header: null,
+        /**
+        * @private
+        * @property body
+        * @description Holder for the body of the window, used in Editor.openWindow
+        */
+        body: null,
+        /**
+        * @private
+        * @property footer
+        * @description Holder for the footer of the window, used in Editor.openWindow
+        */
+        footer: null,
+        /**
+        * @method setHeader
+        * @description Sets the header for the window.
+        * @param {String/HTMLElement} str The string or DOM reference to be used as the windows header.
+        */
+        setHeader: function(str) {
+            this.header = str;
+        },
+        /**
+        * @method setBody
+        * @description Sets the body for the window.
+        * @param {String/HTMLElement} str The string or DOM reference to be used as the windows body.
+        */
+        setBody: function(str) {
+            this.body = str;
+        },
+        /**
+        * @method setFooter
+        * @description Sets the footer for the window.
+        * @param {String/HTMLElement} str The string or DOM reference to be used as the windows footer.
+        */
+        setFooter: function(str) {
+            this.footer = str;
+        },
+        /**
+        * @method toString
+        * @description Returns a string representing the EditorWindow.
+        * @return {String}
+        */
+        toString: function() {
+            return 'Editor Window (' + this.name + ')';
+        }
+    };
+})();
+YAHOO.register("editor", YAHOO.widget.Editor, {version: "2.9.0", build: "2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/editor-min.js	(revision 24510)
@@ -0,0 +1,30 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(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=(F.attributes.id||B.generateId());F.element.id=F.attributes.id;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;if(E){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);this.on("click",function(F){A.stopEvent(F);return false;},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");G.id=this.get("id");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");}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled");}if((this.get("type")=="menu")||(this.get("type")=="select")){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")){A.stopEvent(D);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,D=YAHOO.lang;var B=function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){return E;}return false;};YAHOO.widget.Toolbar=function(I,H){if(D.isObject(arguments[0])&&!C.get(I).nodeType){H=I;}var K={};if(H){D.augmentObject(K,H);}var J={element:null,attributes:K};if(D.isString(I)&&C.get(I)){J.element=C.get(I);}else{if(D.isObject(I)&&C.get(I)&&C.get(I).nodeType){J.element=C.get(I);}}if(!J.element){J.element=document.createElement("DIV");J.element.id=C.generateId();if(K.container&&C.get(K.container)){C.get(K.container).appendChild(J.element);}}if(!J.element.id){J.element.id=((D.isString(I))?I:C.generateId());}var F=document.createElement("fieldset");var G=document.createElement("legend");G.innerHTML="Toolbar";F.appendChild(G);var E=document.createElement("DIV");J.attributes.cont=E;C.addClass(E,"yui-toolbar-subcont");F.appendChild(E);J.element.appendChild(F);J.element.tabIndex=-1;J.attributes.element=J.element;J.attributes.id=J.element.id;this._configuredButtons=[];YAHOO.widget.Toolbar.superclass.constructor.call(this,J.element,J.attributes);};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_configuredButtons:null,_addMenuClasses:function(H,E,I){C.addClass(this.element,"yui-toolbar-"+I.get("value")+"-menu");if(C.hasClass(I._button.parentNode.parentNode,"yui-toolbar-select")){C.addClass(this.element,"yui-toolbar-select-menu");}var F=this.getItems();for(var G=0;G<F.length;G++){C.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-").toLowerCase():F[G]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));C.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-"):F[G]._oText.nodeValue.replace(/ /g,"-")));
+}},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_EXPAND:"Expand 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(F,E){YAHOO.widget.Toolbar.superclass.init.call(this,F,E);},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="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(K){var I,H,J,G,F;for(I in K){if(D.hasOwnProperty(K,I)){if(K[I].type=="separator"){this.addSeparator();}else{if(K[I].group!==undefined){J=this.addButtonGroup(K[I]);if(J){G=J.length;for(F=0;F<G;F++){if(J[F]){this._configuredButtons[this._configuredButtons.length]=J[F].id;}}}}else{H=this.addButton(K[I]);if(H){this._configuredButtons[this._configuredButtons.length]=H.id;}}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){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:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((E.grouplabels===false)?false:true),method:function(F){if(F){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(G){if(G){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(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML='<a href="#" tabIndex="0">'+G+"</a>";
+this._titlebar.appendChild(F);A.on(F.firstChild,"click",function(H){A.stopEvent(H);});A.on([F,F.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(H){if(this._titlebar){var G=null;var F=C.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;C.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=C.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!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(F){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(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},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 L=document.createElement("DIV");C.addClass(L,this.CLASS_PREFIX+"-group");C.addClass(L,this.CLASS_PREFIX+"-group-"+J.group);if(J.label){var F=document.createElement("h3");F.innerHTML=J.label;L.appendChild(F);}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(L);var I=document.createElement("ul");L.appendChild(I);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[J.group]=I;var K=[],H;for(var G=0;G<J.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";I.appendChild(E);if((J.buttons[G].type!==undefined)&&J.buttons[G].type=="separator"){this.addSeparator(E);}else{J.buttons[G].container=E;H=this.addButton(J.buttons[G]);if(H){K[K.length]=H.id;}}}return K;},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H],E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push";}if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);T.get("element").tabIndex="-1";T.get("element").setAttribute("role","button");T._selected=true;if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";U.tabIndex="-1";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button,R=T.get("element");R.parentNode.replaceChild(G,R);T._configs.element.value=G;}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){if(this._colorPicker){this._colorPicker._button=J.value;
+}var X=T.getMenu().element;if(C.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._buttonClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){});T.on("click",function(W){});T.on("change",function(W){if(!W.target){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);}},this,true);var K=this;T.on("appendTo",function(){var W=this;if(W.getMenu()&&W.getMenu().mouseDownEvent){W.getMenu().mouseDownEvent.subscribe(function(Z,Y){var X=Y[1];YAHOO.util.Event.stopEvent(Y[0]);W._onMenuClick(Y[0],W);if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);K._buttonClick.call(K,Y[1],J);W._hideMenu();return false;});W.getMenu().clickEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});W.getMenu().mouseUpEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});}});}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E&&E.renderEvent){E.renderEvent.subscribe(this._addMenuClasses,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E: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 G=this._sep.cloneNode(true);this._sepCount++;C.addClass(G,this.CLASS_SEPARATOR+"-"+this._sepCount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(H){if(C.get(H+"_colors")){C.get(H+"_colors").parentNode.removeChild(C.get(H+"_colors"));}var E=document.createElement("div");E.className="yui-toolbar-colors";E.id=H+"_colors";E.style.display="none";A.on(window,"load",function(){document.body.appendChild(E);},this,true);this._colorPicker=E;var G="";for(var F in this._colorData){if(D.hasOwnProperty(this._colorData,F)){G+='<a style="background-color: '+F+'" href="#">'+F.replace("#","")+"</a>";}}G+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){E.innerHTML=G;},0);A.on(E,"mouseover",function(M){var K=this._colorPicker;var L=K.getElementsByTagName("em")[0];var J=K.getElementsByTagName("strong")[0];var I=A.getTarget(M);if(I.tagName.toLowerCase()=="a"){L.style.backgroundColor=I.style.backgroundColor;J.innerHTML=this._colorData["#"+I.innerHTML]+"<br>"+I.innerHTML;}},this,true);A.on(E,"focus",function(I){A.stopEvent(I);});A.on(E,"click",function(I){A.stopEvent(I);});A.on(E,"mousedown",function(J){A.stopEvent(J);var I=A.getTarget(J);if(I.tagName.toLowerCase()=="a"){var L=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML]});if(L!==false){var K={color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:K});}this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";E.innerHTML="";},_makeColorButton:function(E){if(!this._colorPicker){this._createColorPicker(this.get("id"));}E.type="color";E.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+E.value+"_menu",{visible:false,position:"absolute",iframe:true});E.menu.setBody("");E.menu.render(this.get("cont"));C.addClass(E.menu.element,"yui-button-menu");C.addClass(E.menu.element,"yui-color-button-menu");E.menu.beforeShowEvent.subscribe(function(){E.menu.cfg.setProperty("zindex",5);E.menu.cfg.setProperty("context",[this.getButtonById(E.id).get("element"),"tl","bl"]);this._resetColorPicker();var F=this._colorPicker;if(F.parentNode){F.parentNode.removeChild(F);}E.menu.setBody("");E.menu.appendToBody(F);this._colorPicker.style.display="block";},this,true);return E;},_makeSpinButton:function(R,L){R.addClass(this.CLASS_PREFIX+"-spinbutton");var S=this,N=R._button.parentNode.parentNode,I=L.range,H=document.createElement("a"),G=document.createElement("a");H.href="#";G.href="#";H.tabIndex="-1";G.tabIndex="-1";H.className="up";H.title=this.STR_SPIN_UP;H.innerHTML=this.STR_SPIN_UP;G.className="down";G.title=this.STR_SPIN_DOWN;G.innerHTML=this.STR_SPIN_DOWN;N.appendChild(H);N.appendChild(G);var M=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:R.get("label")});R.set("title",M);var Q=function(T){T=((T<I[0])?I[0]:T);T=((T>I[1])?I[1]:T);return T;};var P=this.browser;var F=false;var K=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){F=this._titlebar.firstChild;}var E=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V++;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var O=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V--;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});
+R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var J=function(T){if(T.keyCode==38){E(T);}else{if(T.keyCode==40){O(T);}else{if(T.keyCode==107&&T.shiftKey){E(T);}else{if(T.keyCode==109&&T.shiftKey){O(T);}}}}};R.on("keydown",J,this,true);A.on(H,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(G,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(H,"click",E,this,true);A.on(G,"click",O,this,true);},_buttonClick:function(L,F){var E=true;if(L&&L.type=="keypress"){if(L.keyCode==9){E=false;}else{if((L.keyCode===13)||(L.keyCode===0)||(L.keyCode===32)){}else{E=false;}}}if(E){var N=true,H=false;F.isSelected=this.isSelected(F.id);if(F.value){H=this.fireEvent(F.value+"Click",{type:F.value+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(F.menucmd&&N){H=this.fireEvent(F.menucmd+"Click",{type:F.menucmd+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(N){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:F});}if(F.type=="select"){var K=this.getButtonById(F.id);if(K.buttonType=="rich"){var J=F.value;for(var I=0;I<F.menu.length;I++){if(F.menu[I].value==F.value){J=F.menu[I].text;break;}}K.set("label",'<span class="yui-toolbar-'+F.menucmd+"-"+(F.value).replace(/ /g,"-").toLowerCase()+'">'+J+"</span>");var M=K.getMenu().getItems();for(var G=0;G<M.length;G++){if(M[G].value.toLowerCase()==F.value.toLowerCase()){M[G].cfg.setProperty("checked",true);}else{M[G].cfg.setProperty("checked",false);}}}}if(L){A.stopEvent(L);}}},_keyNav:null,_navCounter:null,_navigateButtons:function(F){switch(F.keyCode){case 37:case 39:if(F.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);}if(this._buttonList[this._navCounter]){var E=this._buttonList[this._navCounter].get("element");if(this.browser.ie){E=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0];}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(F);}else{E.focus();}}break;}},_handleFocus:function(){if(!this._keyNav){var E="keypress";if(this.browser.ie){E="keydown";}A.on(this.get("element"),E,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1;}},getButtonById:function(G){var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F]&&this._buttonList[F].get("id")==G){return this._buttonList[F];}}return false;},getButtonByValue:function(K){var H=this.get("buttons");if(!H){return false;}var F=H.length;for(var I=0;I<F;I++){if(H[I].group!==undefined){for(var E=0;E<H[I].buttons.length;E++){if((H[I].buttons[E].value==K)||(H[I].buttons[E].menucmd==K)){return this.getButtonById(H[I].buttons[E].id);}if(H[I].buttons[E].menu){for(var J=0;J<H[I].buttons[E].menu.length;J++){if(H[I].buttons[E].menu[J].value==K){return this.getButtonById(H[I].buttons[E].id);}}}}}else{if((H[I].value==K)||(H[I].menucmd==K)){return this.getButtonById(H[I].id);}if(H[I].menu){for(var G=0;G<H[I].menu.length;G++){if(H[I].menu[G].value==K){return this.getButtonById(H[I].id);}}}}}return false;},getButtonByIndex:function(E){if(this._buttonList[E]){return this._buttonList[E];}else{return false;}},getButtons:function(){return this._buttonList;},disableButton:function(F){var E=B.call(this,F);if(E){E.set("disabled",true);}else{return false;}},enableButton:function(F){if(this.get("disabled")){return false;}var E=B.call(this,F);if(E){if(E.get("disabled")){E.set("disabled",false);}}else{return false;}},isSelected:function(F){var E=B.call(this,F);if(E){return E._selected;}return false;},selectButton:function(I,G){var F=B.call(this,I);if(F){F.addClass("yui-button-selected");F.addClass("yui-button-"+F.get("value")+"-selected");F._selected=true;if(G){if(F.buttonType=="rich"){var H=F.getMenu().getItems();for(var E=0;E<H.length;E++){if(H[E].value==G){H[E].cfg.setProperty("checked",true);F.set("label",'<span class="yui-toolbar-'+F.get("value")+"-"+(G).replace(/ /g,"-").toLowerCase()+'">'+H[E]._oText.nodeValue+"</span>");}else{H[E].cfg.setProperty("checked",false);}}}}}else{return false;}},deselectButton:function(F){var E=B.call(this,F);if(E){E.removeClass("yui-button-selected");E.removeClass("yui-button-"+E.get("value")+"-selected");E.removeClass("yui-button-hover");E._selected=false;}else{return false;}},deselectAllButtons:function(){var E=this._buttonList.length;for(var F=0;F<E;F++){this.deselectButton(this._buttonList[F]);}},disableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.disableButton(this._buttonList[F]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.enableButton(this._buttonList[F]);}},resetAllButtons:function(I){if(!D.isObject(I)){I={};}if(this.get("disabled")||!this._buttonList){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){var H=this._buttonList[F];if(H){var G=H._configs.disabled._initialConfig.value;if(I[H.get("id")]){this.enableButton(H);this.selectButton(H);}else{if(G){this.disableButton(H);}else{this.enableButton(H);}this.deselectButton(H);}}}},destroyButton:function(J){var H=B.call(this,J);if(H){var I=H.get("id"),F=[],G=0,E=this._buttonList.length;H.destroy();for(G=0;G<E;G++){if(this._buttonList[G].get("id")!=I){F[F.length]=this._buttonList[G];}}this._buttonList=F;}else{return false;}},destroy:function(){var F=this._configuredButtons.length,G,H,E;for(E=0;E<F;E++){this.destroyButton(this._configuredButtons[E]);}this._configuredButtons=null;this.get("element").innerHTML="";this.get("element").className="";for(H in this){if(D.hasOwnProperty(this,H)){this[H]=null;}}return true;},collapse:function(F){var E=C.getElementsByClassName("collapse","span",this._titlebar);if(F===false){C.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(E[0]){C.removeClass(E[0],"collapsed");E[0].title=this.STR_COLLAPSE;}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this});
+}else{if(E[0]){C.addClass(E[0],"collapsed");E[0].title=this.STR_EXPAND;}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(H,M){var G={};if(D.isObject(H)&&(!H.tagName)&&!M){D.augmentObject(G,H);H=document.createElement("textarea");this.DOMReady=true;if(G.container){var K=C.get(G.container);K.appendChild(H);}else{document.body.appendChild(H);}}else{if(M){D.augmentObject(G,M);}}var I={element:null,attributes:G},F=null;if(D.isString(H)){F=H;}else{if(I.attributes.id){F=I.attributes.id;}else{this.DOMReady=true;F=C.generateId(H);}}I.element=H;var J=document.createElement("DIV");I.attributes.element_cont=new YAHOO.util.Element(J,{id:F+"_container"});var E=document.createElement("div");C.addClass(E,"first-child");I.attributes.element_cont.appendChild(E);if(!I.attributes.toolbar_cont){I.attributes.toolbar_cont=document.createElement("DIV");I.attributes.toolbar_cont.id=F+"_toolbar";E.appendChild(I.attributes.toolbar_cont);}var L=document.createElement("DIV");E.appendChild(L);I.attributes.editor_wrapper=L;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,I.element,I.attributes);};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false;}if(this.get("resize")){var E={};D.augmentObject(E,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),E);this.resize.on("resize",function(G){var K=this.get("animate");this.set("animate",false);this.set("width",G.width+"px");var H=G.height,I=(this.toolbar.get("element").clientHeight+2),J=0;if(this.dompath){J=(this.dompath.clientHeight+1);}var F=(H-I-J);this.set("height",F+"px");this.get("element_cont").setStyle("height","");this.set("animate",K);},this,true);}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false;}if(this.get("drag")){var F=this.get("drag"),E=YAHOO.util.DD;if(F==="proxy"){E=YAHOO.util.DDProxy;}this.dd=new E(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar);}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(E,H){var F=false;if((H.keyCode===E.key)){if(E.mods&&(E.mods.length>0)){var I=0;for(var G=0;G<E.mods.length;G++){if(this.browser.mac){if(E.mods[G]=="ctrl"){E.mods[G]="meta";}}if(H[E.mods[G]+"Key"]===true){I++;}}if(I===E.mods.length){F=true;}}else{F=true;}}return F;},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},FONT_SIZE_UP:{key:38,mods:["shift","ctrl"]},FONT_SIZE_DOWN:{key:40,mods:["shift","ctrl"]},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(E){return E.replace(/ /g,"-").toLowerCase();},_textarea:null,_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, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } .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; } body.ptags.webkit div.yui-wk-p { margin: 11px 0; } body.ptags.webkit div.yui-wk-div { margin: 0; }",_defaultToolbar:null,_lastButton:null,_baseHREF:function(){var E=document.location.href;if(E.indexOf("?")!==-1){E=E.substring(0,E.indexOf("?"));}E=E.substring(0,E.lastIndexOf("/"))+"/";return E;}(),_lastImage:null,_blankImageLoaded:null,_fixNodesTimer:null,_nodeChangeTimer:null,_nodeChangeDelayTimer: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,_contentTimerMax:500,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{undo:true,redo:true},_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 I=document.createElement("iframe");I.id=this.get("id")+"_editor";var G={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};if(this.get("autoHeight")){G.scrolling="no";}for(var H in G){if(D.hasOwnProperty(G,H)){I.setAttribute(H,G[H]);}}var F="javascript:;";if(this.browser.ie){F="javascript:false;";}I.setAttribute("src",F);var E=new YAHOO.util.Element(I);E.setStyle("visibility","hidden");return E;},_isElement:function(F,E){if(F&&F.tagName&&(F.tagName.toLowerCase()==E)){return true;}if(F&&F.getAttribute&&(F.getAttribute("tag")==E)){return true;
+}return false;},_hasParent:function(F,E){if(!F||!F.parentNode){return false;}while(F.parentNode){if(this._isElement(F,E)){return F;}if(F.parentNode){F=F.parentNode;}else{return false;}}return false;},_getDoc:function(){var E=false;try{if(this.get("iframe").get("element").contentWindow.document){E=this.get("iframe").get("element").contentWindow.document;return E;}}catch(F){return false;}},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},focus:function(){this._getWindow().focus();},_focusWindow:function(){this.focus();},_hasSelection:function(){var G=this._getSelection();var E=this._getRange();var F=false;if(!G||!E){return F;}if(this.browser.ie){if(E.text){F=true;}if(E.html){F=true;}}else{if(this.browser.webkit){if(G+""!==""){F=true;}}else{if(G&&(G.toString()!=="")&&(G!==undefined)){F=true;}}}return F;},_getSelection:function(){var E=null;if(this._getDoc()&&this._getWindow()){if(this._getDoc().selection&&!this.browser.opera){E=this._getDoc().selection;}else{E=this._getWindow().getSelection();}if(this.browser.webkit){if(E.baseNode){this._selection={};this._selection.baseNode=E.baseNode;this._selection.baseOffset=E.baseOffset;this._selection.extentNode=E.extentNode;this._selection.extentOffset=E.extentOffset;}else{if(this._selection!==null){E=this._getWindow().getSelection();E.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return E;},_selectNode:function(F,I){if(!F){return false;}var G=this._getSelection(),E=null;if(this.browser.ie){try{E=this._getDoc().body.createTextRange();E.moveToElementText(F);E.select();}catch(H){}}else{if(this.browser.webkit){if(I){G.setBaseAndExtent(F,1,F,F.innerText.length);}else{G.setBaseAndExtent(F,0,F,F.innerText.length);}}else{if(this.browser.opera){G=this._getWindow().getSelection();E=this._getDoc().createRange();E.selectNode(F);G.removeAllRanges();G.addRange(E);}else{E=this._getDoc().createRange();E.selectNodeContents(F);G.removeAllRanges();G.addRange(E);}}}this.nodeChange();},_getRange:function(){var E=this._getSelection();if(E===null){return null;}if(this.browser.webkit&&!E.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(E.anchorNode,E.anchorOffset);H.setEnd(E.focusNode,E.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(this.browser.ie){try{return E.createRange();}catch(F){return null;}}if(E.rangeCount>0){return E.getRangeAt(0);}return null;},_setDesignMode:function(E){if(this.get("setDesignMode")){try{this._getDoc().designMode=((E.toLowerCase()=="off")?"off":"on");}catch(F){}}},_toggleDesignMode:function(){var F=this._getDoc().designMode,E=((F.toLowerCase()=="on")?"off":"on");this._setDesignMode(E);return E;},_focused:null,_handleFocus:function(E){if(!this._focused){this._focused=true;this.fireEvent("editorWindowFocus",{type:"editorWindowFocus",target:this});}},_handleBlur:function(E){if(this._focused){this._focused=false;this.fireEvent("editorWindowBlur",{type:"editorWindowBlur",target:this});}},_initEditorEvents:function(){var F=this._getDoc(),E=this._getWindow();A.on(F,"mouseup",this._handleMouseUp,this,true);A.on(F,"mousedown",this._handleMouseDown,this,true);A.on(F,"click",this._handleClick,this,true);A.on(F,"dblclick",this._handleDoubleClick,this,true);A.on(F,"keypress",this._handleKeyPress,this,true);A.on(F,"keyup",this._handleKeyUp,this,true);A.on(F,"keydown",this._handleKeyDown,this,true);A.on(E,"focus",this._handleFocus,this,true);A.on(E,"blur",this._handleBlur,this,true);},_removeEditorEvents:function(){var F=this._getDoc(),E=this._getWindow();A.removeListener(F,"mouseup",this._handleMouseUp,this,true);A.removeListener(F,"mousedown",this._handleMouseDown,this,true);A.removeListener(F,"click",this._handleClick,this,true);A.removeListener(F,"dblclick",this._handleDoubleClick,this,true);A.removeListener(F,"keypress",this._handleKeyPress,this,true);A.removeListener(F,"keyup",this._handleKeyUp,this,true);A.removeListener(F,"keydown",this._handleKeyDown,this,true);A.removeListener(E,"focus",this._handleFocus,this,true);A.removeListener(E,"blur",this._handleBlur,this,true);},_fixWebkitDivs:function(){if(this.browser.webkit){var E=this._getDoc().body.getElementsByTagName("div");C.addClass(E,"yui-wk-div");}},_initEditor:function(F){if(this._editorInit){return;}this._editorInit=true;if(this.browser.ie){this._getDoc().body.style.margin="0";}if(!this.get("disabled")){this._setDesignMode("on");this._contentTimerCounter=0;}if(!this._getDoc().body){this._contentTimerCounter=0;this._editorInit=false;this._checkLoaded();return false;}if(!F){this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);}if(!this.get("disabled")){this._initEditorEvents();this.toolbar.set("disabled",false);}if(F){this.fireEvent("editorContentReloaded",{type:"editorreloaded",target:this});}else{this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});}this._fixWebkitDivs();if(this.get("dompath")){var E=this;setTimeout(function(){E._writeDomPath.call(E);E._setupResize.call(E);},150);}var H=[];for(var G in this.browser){if(this.browser[G]){H.push(G);}}if(this.get("ptags")){H.push("ptags");}C.addClass(this._getDoc().body,H.join(" "));this.nodeChange(true);},_checkLoaded:function(F){this._editorInit=false;this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>this._contentTimerMax){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(F);}else{var E=this;this._contentTimer=setTimeout(function(){E._checkLoaded.call(E,F);},20);}},_setInitialContent:function(F){var I=((this._textarea)?this.get("element").value:this.get("element").innerHTML),K=null;if(I===""){I="<br>";}var G=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(I),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 */")}),E=true;
+G=G.replace(/RIGHT_BRACKET/gi,"{");G=G.replace(/LEFT_BRACKET/gi,"}");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){K=this._getDoc().implementation.createHTMLDocument();var L=this._getDoc();L.open();L.close();K.open();K.write(G);K.close();var H=L.importNode(K.getElementsByTagName("html")[0],true);L.replaceChild(H,L.getElementsByTagName("html")[0]);L.body._rteLoaded=true;}else{K=this._getDoc();K.open();K.write(G);K.close();}}catch(J){E=false;}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(G);}this.get("iframe").setStyle("visibility","");if(E){this._checkLoaded(F);}},_setMarkupType:function(E){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[E]){this._setEditorStyle(false);}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(F){try{this._getDoc().execCommand("useCSS",false,!F);}catch(E){}},_getSelectedElement:function(){var J=this._getDoc(),G=null,H=null,K=null,F=true;if(this.browser.ie){this.currentEvent=this._getWindow().event;G=this._getRange();if(G){K=G.item?G.item(0):G.parentElement();if(this._hasSelection()){}if(K===J.body){K=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){K=A.getTarget(this.currentEvent);}}else{H=this._getSelection();G=this._getRange();if(!H||!G){return null;}if(!this._hasSelection()&&this.browser.webkit3){}if(this.browser.gecko){if(G.startContainer){if(G.startContainer.nodeType===3){K=G.startContainer.parentNode;}else{if(G.startContainer.nodeType===1){K=G.startContainer;}}if(this.currentEvent){var E=A.getTarget(this.currentEvent);if(!this._isElement(E,"html")){if(K!==E){K=E;}}}}}if(F){if(H.anchorNode&&(H.anchorNode.nodeType==3)){if(H.anchorNode.parentNode){K=H.anchorNode.parentNode;}if(H.anchorNode.nextSibling!=H.focusNode.nextSibling){K=H.anchorNode.nextSibling;}}if(this._isElement(K,"br")){K=null;}if(!K){K=G.commonAncestorContainer;if(!G.collapsed){if(G.startContainer==G.endContainer){if(G.startOffset-G.endOffset<2){if(G.startContainer.hasChildNodes()){K=G.startContainer.childNodes[G.startOffset];}}}}}}}if(this.currentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":if(this.browser.webkit){K=A.getTarget(this.currentEvent);}break;default:break;}}catch(I){}}else{if((this.currentElement&&this.currentElement[0])&&(!this.browser.ie)){}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!K){K=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!K||!K.tagName){K=J.body;}if(this._isElement(K,"html")){K=J.body;}if(this._isElement(K,"body")){K=J.body;}if(K&&!K.parentNode){K=J.body;}if(K===undefined){K=null;}return K;},_getDomPath:function(E){if(!E){E=this._getSelectedElement();}var F=[];while(E!==null){if(E.ownerDocument!=this._getDoc()){E=null;break;}if(E.nodeName&&E.nodeType&&(E.nodeType==1)){F[F.length]=E;}if(this._isElement(E,"body")){break;}E=E.parentNode;}if(F.length===0){if(this._getDoc()&&this._getDoc().body){F[0]=this._getDoc().body;}}return F.reverse();},_writeDomPath:function(){var K=this._getDomPath(),I=[],G="",L="";for(var E=0;E<K.length;E++){var M=K[E].tagName.toLowerCase();if((M=="ol")&&(K[E].type)){M+=":"+K[E].type;}if(C.hasClass(K[E],"yui-tag")){M=K[E].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(M){case"b":M="strong";break;case"i":M="em";break;}}if(!C.hasClass(K[E],"yui-non")){if(C.hasClass(K[E],"yui-tag")){L=M;}else{G=((K[E].className!=="")?"."+K[E].className.replace(/ /g,"."):"");if((G.indexOf("yui")!=-1)||(G.toLowerCase().indexOf("apple-style-span")!=-1)){G="";}L=M+((K[E].id)?"#"+K[E].id:"")+G;}switch(M){case"body":L="body";break;case"a":if(K[E].getAttribute("href",2)){L+=":"+K[E].getAttribute("href",2).replace("mailto:","").replace("http:/"+"/","").replace("https:/"+"/","");}break;case"img":var F=K[E].height;var J=K[E].width;if(K[E].style.height){F=parseInt(K[E].style.height,10);}if(K[E].style.width){J=parseInt(K[E].style.width,10);}L+="("+J+"x"+F+")";break;}if(L.length>10){L='<span title="'+L+'">'+L.substring(0,10)+"..."+"</span>";}else{L='<span title="'+L+'">'+L+"</span>";}I[I.length]=L;}}var H=I.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!=H){this.dompath.innerHTML=H;}},_fixNodes:function(){try{var K=this._getDoc(),H=[];for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(E.toLowerCase()!="span"){var F=K.body.getElementsByTagName(E);if(F.length){for(var G=0;G<F.length;G++){H.push(F[G]);}}}}}for(var I=0;I<H.length;I++){if(H[I].parentNode){if(D.isObject(this.invalidHTML[H[I].tagName.toLowerCase()])&&this.invalidHTML[H[I].tagName.toLowerCase()].keepContents){this._swapEl(H[I],"span",function(M){M.className="yui-non";});}else{H[I].parentNode.removeChild(H[I]);}}}var L=this._getDoc().getElementsByTagName("img");C.addClass(L,"yui-img");}catch(J){}},_isNonEditable:function(G){if(this.get("allowNoEdit")){var F=A.getTarget(G);if(this._isElement(F,"html")){F=null;}var J=this._getDomPath(F);for(var E=(J.length-1);E>-1;E--){if(C.hasClass(J[E],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false");}catch(I){}this.nodeChange();A.stopEvent(G);return true;}}try{this._getDoc().execCommand("enableObjectResizing",false,"true");}catch(H){}}return false;},_setCurrentEvent:function(E){this.currentEvent=E;},_handleClick:function(G){var F=this.fireEvent("beforeEditorClick",{type:"beforeEditorClick",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(this.currentWindow){this.closeWindow();}if(this.browser.webkit){var E=A.getTarget(G);if(this._isElement(E,"a")||this._isElement(E.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();
+}this.fireEvent("editorClick",{type:"editorClick",target:this,ev:G});},_handleMouseUp:function(G){var F=this.fireEvent("beforeEditorMouseUp",{type:"beforeEditorMouseUp",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}var E=this;if(this.browser.opera){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(){E.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){var E=this.fireEvent("beforeEditorMouseDown",{type:"beforeEditorMouseDown",target:this,ev:F});if(E===false){return false;}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;}}if(this.currentWindow){this.closeWindow();}this.nodeChange();}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){var E=this.fireEvent("beforeEditorDoubleClick",{type:"beforeEditorDoubleClick",target:this,ev:F});if(E===false){return false;}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(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.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){var F=this.fireEvent("beforeEditorKeyUp",{type:"beforeEditorKeyUp",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}this._storeUndo();this._setCurrentEvent(G);switch(G.keyCode){case this._keyMap.SELECT_ALL.key:if(this._checkKey(this._keyMap.SELECT_ALL,G)){this.nodeChange();}break;case 32:case 35:case 36:case 37:case 38:case 39:case 40:case 46:case 8:case this._keyMap.CLOSE_WINDOW.key:if((G.keyCode==this._keyMap.CLOSE_WINDOW.key)&&this.currentWindow){if(this._checkKey(this._keyMap.CLOSE_WINDOW,G)){this.closeWindow();}}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var E=this;this._nodeChangeTimer=setTimeout(function(){E._nodeChangeTimer=null;E.nodeChange.call(E);},100);}else{this.nodeChange();}this.editorDirty=true;}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",target:this,ev:G});},_handleKeyPress:function(G){var F=this.fireEvent("beforeEditorKeyPress",{type:"beforeEditorKeyPress",target:this,ev:G});if(F===false){return false;}if(this.get("allowNoEdit")){if(G&&G.keyCode&&(G.keyCode==63272)){A.stopEvent(G);}}if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);this._storeUndo();if(this.browser.opera){if(G.keyCode===13){var E=this._getSelectedElement();if(!this._isElement(E,"li")){this.execCommand("inserthtml","<br>");A.stopEvent(G);}}}if(this.browser.webkit){if(!this.browser.webkit3){if(G.keyCode&&(G.keyCode==122)&&(G.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(G);}}}this._listFix(G);}this._fixListDupIds();this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:G});},_handleKeyDown:function(X){var Z=this.fireEvent("beforeEditorKeyDown",{type:"beforeEditorKeyDown",target:this,ev:X});if(Z===false){return false;}var U=null,E=null;if(this._isNonEditable(X)){return false;}this._setCurrentEvent(X);if(this.currentWindow){this.closeWindow();}if(this.currentWindow){this.closeWindow();}var N=false,S=null,P=null,R=false;switch(X.keyCode){case this._keyMap.FOCUS_TOOLBAR.key:if(this._checkKey(this._keyMap.FOCUS_TOOLBAR,X)){var W=this.toolbar.getElementsByTagName("h2")[0];if(W&&W.firstChild){W.firstChild.focus();}}else{if(this._checkKey(this._keyMap.FOCUS_AFTER,X)){this.afterElement.focus();}}A.stopEvent(X);N=false;break;case this._keyMap.CREATE_LINK.key:if(this._hasSelection()){if(this._checkKey(this._keyMap.CREATE_LINK,X)){var F=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){F=false;}}if(F){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});N=false;}}}break;case this._keyMap.UNDO.key:case this._keyMap.REDO.key:if(this._checkKey(this._keyMap.REDO,X)){S="redo";N=true;}else{if(this._checkKey(this._keyMap.UNDO,X)){S="undo";N=true;}}break;case this._keyMap.BOLD.key:if(this._checkKey(this._keyMap.BOLD,X)){S="bold";N=true;}break;case this._keyMap.FONT_SIZE_UP.key:case this._keyMap.FONT_SIZE_DOWN.key:var K=false,T=false;if(this._checkKey(this._keyMap.FONT_SIZE_UP,X)){K=true;}if(this._checkKey(this._keyMap.FONT_SIZE_DOWN,X)){T=true;}if(K||T){var H=this.toolbar.getButtonByValue("fontsize"),G=parseInt(H.get("label"),10),I=(G+1);if(T){I=(G-1);}S="fontsize";P=I+"px";N=true;}break;case this._keyMap.ITALIC.key:if(this._checkKey(this._keyMap.ITALIC,X)){S="italic";N=true;}break;case this._keyMap.UNDERLINE.key:if(this._checkKey(this._keyMap.UNDERLINE,X)){S="underline";N=true;}break;case 9:if(this.browser.ie){E=this._getRange();U=this._getSelectedElement();if(!this._isElement(U,"li")){if(E){E.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");
+E.collapse(false);E.select();}A.stopEvent(X);}}if(this.browser.gecko>1.8){U=this._getSelectedElement();if(this._isElement(U,"li")){if(X.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(X);}break;case 13:var M=null,V=0;if(this.get("ptags")&&!X.shiftKey){if(this.browser.gecko){U=this._getSelectedElement();if(!this._hasParent(U,"li")){if(this._hasParent(U,"p")){M=this._getDoc().createElement("p");M.innerHTML="&nbsp;";C.insertAfter(M,U);this._selectNode(M.firstChild);}else{if(this._isElement(U,"body")){this.execCommand("insertparagraph",null);var O=this._getDoc().body.getElementsByTagName("p");for(V=0;V<O.length;V++){if(O[V].getAttribute("_moz_dirty")!==null){M=this._getDoc().createElement("p");M.innerHTML="&nbsp;";C.insertAfter(M,O[V]);this._selectNode(M.firstChild);O[V].removeAttribute("_moz_dirty");}}}else{N=true;S="insertparagraph";}}A.stopEvent(X);}}if(this.browser.webkit){U=this._getSelectedElement();if(!this._hasParent(U,"li")){this.execCommand("insertparagraph",null);var Q=this._getDoc().body.getElementsByTagName("div");for(V=0;V<Q.length;V++){if(!C.hasClass(Q[V],"yui-wk-div")){C.addClass(Q[V],"yui-wk-p");}}A.stopEvent(X);}}}else{if(this.browser.webkit){U=this._getSelectedElement();if(!this._hasParent(U,"li")){if(this.browser.webkit4){this.execCommand("insertlinebreak");}else{this.execCommand("inserthtml",'<var id="yui-br"></var>');var L=this._getDoc().getElementById("yui-br"),Y=this._getDoc().createElement("br"),J=this._getDoc().createElement("span");L.parentNode.replaceChild(Y,L);J.className="yui-non";J.innerHTML="&nbsp;";C.insertAfter(J,Y);this._selectNode(J);}A.stopEvent(X);}}if(this.browser.ie){E=this._getRange();U=this._getSelectedElement();if(!this._isElement(U,"li")){if(E){E.pasteHTML("<br>");E.collapse(false);E.select();}A.stopEvent(X);}}}break;}if(this.browser.ie){this._listFix(X);}if(N&&S){this.execCommand(S,P);A.stopEvent(X);this.nodeChange();}this._storeUndo();this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:X});},_fixListRunning:null,_fixListDupIds:function(){if(this._fixListRunning){return false;}if(this._getDoc()){this._fixListRunning=true;var E=this._getDoc().body.getElementsByTagName("li"),F=0,G={};for(F=0;F<E.length;F++){if(E[F].id){if(G[E[F].id]){E[F].id="";}G[E[F].id]=true;}}this._fixListRunning=false;}},_listFix:function(K){var M=null,I=null,E=false,G=null;if(this.browser.webkit){if(K.keyCode&&(K.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var H=this._hasParent(this._getSelectedElement(),"li");if(H.previousSibling){if(H.firstChild&&(H.firstChild.length==1)){this._selectNode(H);}}}}}if(K.keyCode&&((!this.browser.webkit3&&(K.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((K.keyCode==9)&&K.shiftKey)))){M=this._getSelectedElement();if(this._hasParent(M,"li")){M=this._hasParent(M,"li");if(this._hasParent(M,"ul")||this._hasParent(M,"ol")){I=this._hasParent(M,"ul");if(!I){I=this._hasParent(M,"ol");}if(this._isElement(I.previousSibling,"li")){I.removeChild(M);I.parentNode.insertBefore(M,I.nextSibling);if(this.browser.ie){G=this._getDoc().body.createTextRange();G.moveToElementText(M);G.collapse(false);G.select();}if(this.browser.webkit){this._selectNode(M.firstChild);}A.stopEvent(K);}}}}if(K.keyCode&&((K.keyCode==9)&&(!K.shiftKey))){var F=this._getSelectedElement();if(this._hasParent(F,"li")){E=this._hasParent(F,"li").innerHTML;}if(this.browser.webkit){this._getDoc().execCommand("inserttext",false,"\t");}M=this._getSelectedElement();if(this._hasParent(M,"li")){I=this._hasParent(M,"li");var J=this._getDoc().createElement(I.parentNode.tagName.toLowerCase());if(this.browser.webkit){var L=C.getElementsByClassName("Apple-tab-span","span",I);if(L[0]){I.removeChild(L[0]);I.innerHTML=D.trim(I.innerHTML);if(E){I.innerHTML='<span class="yui-non">'+E+"</span>&nbsp;";}else{I.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;';}}}else{if(E){I.innerHTML=E+"&nbsp;";}else{I.innerHTML="&nbsp;";}}I.parentNode.replaceChild(J,I);J.appendChild(I);if(this.browser.webkit){this._getSelection().setBaseAndExtent(I.firstChild,1,I.firstChild,I.firstChild.innerText.length);if(!this.browser.webkit3){I.parentNode.parentNode.style.display="list-item";setTimeout(function(){I.parentNode.parentNode.style.display="block";},1);}}else{if(this.browser.ie){G=this._getDoc().body.createTextRange();G.moveToElementText(I);G.collapse(false);G.select();}else{this._selectNode(I);}}A.stopEvent(K);}if(this.browser.webkit){A.stopEvent(K);}this.nodeChange();}},nodeChange:function(E){var F=this;this._storeUndo();if(this.get("nodeChangeDelay")){this._nodeChangeDelayTimer=window.setTimeout(function(){F._nodeChangeDelayTimer=null;F._nodeChange.apply(F,arguments);},0);}else{this._nodeChange();}},_nodeChange:function(F){var H=parseInt(this.get("nodeChangeThreshold"),10),O=Math.round(new Date().getTime()/1000),R=this;if(F===true){this._lastNodeChange=0;}if((this._lastNodeChange+H)<O){if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){R._fixNodes.call(R);R._fixNodesTimer=null;},0);}}this._lastNodeChange=O;if(this.currentEvent){try{this._lastNodeChangeEvent=this.currentEvent.type;}catch(a){}}var Z=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Z===false){return false;}if(this.get("dompath")){window.setTimeout(function(){R._writeDomPath.call(R);},0);}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var T=this._getSelection(),Q=this._getRange(),E=this._getSelectedElement(),M=this.toolbar.getButtonByValue("fontname"),L=this.toolbar.getButtonByValue("fontsize"),J=this.toolbar.getButtonByValue("undo"),G=this.toolbar.getButtonByValue("redo");var N={};if(this._lastButton){N[this._lastButton.id]=true;}if(!this._isElement(E,"body")){if(M){N[M.get("id")]=true;}if(L){N[L.get("id")]=true;}}if(G){delete N[G.get("id")];
+}this.toolbar.resetAllButtons(N);for(var b=0;b<this._disabled.length;b++){var P=this.toolbar.getButtonByValue(this._disabled[b]);if(P&&P.get){if(this._lastButton&&(P.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()&&!this.get("insert")){switch(this._disabled[b]){case"fontname":case"fontsize":break;default:this.toolbar.disableButton(P);}}else{if(!this._alwaysDisabled[this._disabled[b]]){this.toolbar.enableButton(P);}}if(!this._alwaysEnabled[this._disabled[b]]){this.toolbar.deselectButton(P);}}}}var S=this._getDomPath();var c=null,W=null;for(var X=0;X<S.length;X++){c=S[X].tagName.toLowerCase();if(S[X].getAttribute("tag")){c=S[X].getAttribute("tag").toLowerCase();}W=this._tag2cmd[c];if(W===undefined){W=[];}if(!D.isArray(W)){W=[W];}if(S[X].style.fontWeight.toLowerCase()=="bold"){W[W.length]="bold";}if(S[X].style.fontStyle.toLowerCase()=="italic"){W[W.length]="italic";}if(S[X].style.textDecoration.toLowerCase()=="underline"){W[W.length]="underline";}if(S[X].style.textDecoration.toLowerCase()=="line-through"){W[W.length]="strikethrough";}if(W.length>0){for(var V=0;V<W.length;V++){this.toolbar.selectButton(W[V]);this.toolbar.enableButton(W[V]);}}switch(S[X].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var U=S[X].style.textAlign.toLowerCase();if(S[X].style.textAlign.toLowerCase()=="justify"){U="full";}this.toolbar.selectButton("justify"+U);this.toolbar.enableButton("justify"+U);break;}}if(M){var Y=M._configs.label._initialConfig.value;M.set("label",'<span class="yui-toolbar-fontname-'+this._cleanClassName(Y)+'">'+Y+"</span>");this._updateMenuChecked("fontname",Y);}if(L){L.set("label",L._configs.label._initialConfig.value);}var K=this.toolbar.getButtonByValue("heading");if(K){K.set("label",K._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);}if(this._lastButton&&this._lastButton.isSelected){this.toolbar.deselectButton(this._lastButton.id);}this._undoNodeChange();}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(E,F,H){if(!H){H=this.toolbar;}var G=H.getButtonByValue(E);G.checkValue(F);},_handleToolbarClick:function(F){var H="";var I="";var G=F.button.value;if(F.button.menucmd){H=G;G=F.button.menucmd;}this._lastButton=F.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(G,H);if(!this.browser.webkit){var E=this;setTimeout(function(){E.focus.call(E);},5);}}A.stopEvent(F);},_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(J){var I,H,G,E;if(!this.get("disabled_iframe")){I=this._createIframe();I.set("id","disabled_"+this.get("iframe").get("id"));I.setStyle("height","100%");I.setStyle("display","none");I.setStyle("visibility","visible");this.set("disabled_iframe",I);H=this.get("iframe").get("parentNode");H.appendChild(I.get("element"));}if(!I){I=this.get("disabled_iframe");}if(J){this._orgIframe=this.get("iframe");if(this.toolbar){this.toolbar.set("disabled",true);}G=this.getEditorHTML();E=this.get("iframe").get("offsetHeight");I.setStyle("visibility","");I.setStyle("position","");I.setStyle("top","");I.setStyle("left","");this._orgIframe.setStyle("visibility","hidden");this._orgIframe.setStyle("position","absolute");this._orgIframe.setStyle("top","-99999px");this._orgIframe.setStyle("left","-99999px");this.set("iframe",I);this._setInitialContent(true);if(!this._mask){this._mask=document.createElement("DIV");C.addClass(this._mask,"yui-editor-masked");if(this.browser.ie){this._mask.style.height=E+"px";}this.get("iframe").get("parentNode").appendChild(this._mask);}this.on("editorContentReloaded",function(){this._getDoc().body._rteLoaded=false;this.setEditorHTML(G);I.setStyle("display","block");this.unsubscribeAll("editorContentReloaded");});}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}I.setStyle("visibility","hidden");I.setStyle("position","absolute");I.setStyle("top","-99999px");I.setStyle("left","-99999px");this._orgIframe.setStyle("visibility","");this._orgIframe.setStyle("position","");this._orgIframe.setStyle("top","");this._orgIframe.setStyle("left","");this.set("iframe",this._orgIframe);this.focus();var F=this;window.setTimeout(function(){F.nodeChange.call(F);},100);}}},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 Shift + Escape to place focus on the toolbar and navigate between options with your arrow keys. To exit this text editor use the Escape key and continue tabbing. <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></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image URL Here",STR_IMAGE_URL:"Image URL",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 E=YAHOO.env.ua;
+if(E.webkit>=420){E.webkit3=E.webkit;}else{E.webkit3=0;}if(E.webkit>=530){E.webkit4=E.webkit;}else{E.webkit4=0;}E.mac=false;if(navigator.userAgent.indexOf("Macintosh")!==-1){E.mac=true;}return E;}(),init:function(F,E){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:"push",label:"Strike Through",value:"strikethrough"},{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,F,E);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.currentElement=[];this.on("contentReady",function(){this.DOMReady=true;this.fireQueue();},this,true);},initAttributes:function(E){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,E);var F=this;this.setAttributeConfig("setDesignMode",{value:((E.setDesignMode===false)?false:true)});this.setAttributeConfig("nodeChangeDelay",{value:((E.nodeChangeDelay===false)?false:true)});this.setAttributeConfig("maxUndo",{writeOnce:true,value:E.maxUndo||30});this.setAttributeConfig("ptags",{writeOnce:true,value:E.ptags||false});this.setAttributeConfig("insert",{writeOnce:true,value:E.insert||false,method:function(K){if(K){var J={fontname:true,fontsize:true,forecolor:true,backcolor:true};var I=this._defaultToolbar.buttons;for(var H=0;H<I.length;H++){if(I[H].buttons){for(var G=0;G<I[H].buttons.length;G++){if(I[H].buttons[G].value){if(J[I[H].buttons[G].value]){delete I[H].buttons[G].disabled;}}}}}}}});this.setAttributeConfig("container",{writeOnce:true,value:E.container||false});this.setAttributeConfig("plainText",{writeOnce:true,value:E.plainText||false});this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("disabled_iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("nodeChangeThreshold",{value:E.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:E.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:E.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:E.element_cont});this.setAttributeConfig("editor_wrapper",{value:E.editor_wrapper||null,writeOnce:true});this.setAttributeConfig("height",{value:E.height||C.getStyle(F.get("element"),"height"),method:function(G){if(this._rendered){if(this.get("animate")){var H=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(G,10)}},0.5);H.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",G);}}}});this.setAttributeConfig("autoHeight",{value:E.autoHeight||false,method:function(G){if(G){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:E.width||C.getStyle(this.get("element"),"width"),method:function(G){if(this._rendered){if(this.get("animate")){var H=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(G,10)}},0.5);H.animate();}else{this.get("element_cont").setStyle("width",G);}}}});this.setAttributeConfig("blankimage",{value:E.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:E.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:E.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:E.extracss||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:E.handleSubmit||false,method:function(G){if(this.get("element").form){if(!this._formButtons){this._formButtons=[];}if(G){A.on(this.get("element").form,"submit",this._handleFormSubmit,this,true);var H=this.get("element").form.getElementsByTagName("input");for(var J=0;J<H.length;J++){var I=H[J].getAttribute("type");if(I&&(I.toLowerCase()=="submit")){A.on(H[J],"click",this._handleFormButtonClick,this,true);this._formButtons[this._formButtons.length]=H[J];}}}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(G){if(this._rendered){this._disableEditor(G);
+}}});this.setAttributeConfig("saveEl",{value:this.get("element")});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:E.toolbar||this._defaultToolbar,writeOnce:true,method:function(G){if(!G.buttonType){G.buttonType=this._defaultToolbar.buttonType;}this._defaultToolbar=G;}});this.setAttributeConfig("animate",{value:((E.animate)?((YAHOO.util.Anim)?true:false):false),validator:function(H){var G=true;if(!YAHOO.util.Anim){G=false;}return G;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(H){var G=true;if(!YAHOO.widget.Overlay){G=false;}return G;}});this.setAttributeConfig("focusAtStart",{value:E.focusAtStart||false,writeOnce:true,method:function(G){if(G){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H.focus.call(H);H.editorDirty=false;},400);},this,true);}}});this.setAttributeConfig("dompath",{value:E.dompath||false,method:function(G){if(G&&!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(!G&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}}});this.setAttributeConfig("markup",{value:E.markup||"semantic",validator:function(G){switch(G.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:E.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("drag",{writeOnce:true,value:E.drag||false});this.setAttributeConfig("resize",{writeOnce:true,value:E.resize||false});this.setAttributeConfig("filterWord",{value:E.filterWord||false,validator:YAHOO.lang.isBoolean});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var E="";if(!this._blankImageLoaded){if(YAHOO.widget.EditorInfo.blankImage){this.set("blankimage",YAHOO.widget.EditorInfo.blankImage);this._blankImageLoaded=true;}else{var F=document.createElement("div");F.style.position="absolute";F.style.top="-9999px";F.style.left="-9999px";F.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(F);E=YAHOO.util.Dom.getStyle(F,"background-image");E=E.replace("url(","").replace(")","").replace(/"/g,"");E=E.replace("app:/","");this.set("blankimage",E);this._blankImageLoaded=true;F.parentNode.removeChild(F);YAHOO.widget.EditorInfo.blankImage=E;}}else{E=this.get("blankimage");}return E;},_handleAutoHeight:function(){var J=this._getDoc(),F=J.body,K=J.documentElement;var E=parseInt(C.getStyle(this.get("editor_wrapper"),"height"),10);var G=F.scrollHeight;if(this.browser.webkit){G=K.scrollHeight;}if(G<parseInt(this.get("height"),10)){G=parseInt(this.get("height"),10);}if((E!=G)&&(G>=parseInt(this.get("height"),10))){var I=this.get("animate");this.set("animate",false);this.set("height",G+"px");this.set("animate",I);if(this.browser.ie){this.get("iframe").setStyle("height","99%");this.get("iframe").setStyle("zoom","1");var H=this;window.setTimeout(function(){H.get("iframe").setStyle("height","100%");},1);}}},_formButtons:null,_formButtonClicked:null,_handleFormButtonClick:function(F){var E=A.getTarget(F);this._formButtonClicked=E;},_handleFormSubmit:function(H){this.saveHTML();var G=this.get("element").form,E=this._formButtonClicked||false;A.removeListener(G,"submit",this._handleFormSubmit);if(YAHOO.env.ua.ie){if(E&&!E.disabled){E.click();}}else{if(E&&!E.disabled){E.click();}var F=document.createEvent("HTMLEvents");F.initEvent("submit",true,true);G.dispatchEvent(F);if(YAHOO.env.ua.webkit){if(YAHOO.lang.isFunction(G.submit)){G.submit();}}}},_handleFontSize:function(G){var E=this.toolbar.getButtonById(G.button.id);var F=E.get("label")+"px";this.execCommand("fontsize",F);return false;},_handleColorPicker:function(G){var F=G.button;var E="#"+G.color;if((F=="forecolor")||(F=="backcolor")){this.execCommand(F,E);}},_handleAlign:function(H){var G=null;for(var E=0;E<H.button.menu.length;E++){if(H.button.menu[E].value==H.button.value){G=H.button.menu[E].value;}}var F=this._getSelection();this.execCommand(G,F);return false;},_handleAfterNodeChange:function(){var Q=this._getDomPath(),L=null,H=null,M=null,F=false,J=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize"),E=this.toolbar.getButtonByValue("heading");for(var G=0;G<Q.length;G++){L=Q[G];var P=L.tagName.toLowerCase();if(L.getAttribute("tag")){P=L.getAttribute("tag");}H=L.getAttribute("face");if(C.getStyle(L,"font-family")){H=C.getStyle(L,"font-family");H=H.replace(/'/g,"");}if(P.substring(0,1)=="h"){if(E){for(var I=0;I<E._configs.menu.value.length;I++){if(E._configs.menu.value[I].value.toLowerCase()==P){E.set("label",E._configs.menu.value[I].text);}}this._updateMenuChecked("heading",P);}}}if(J){for(var O=0;O<J._configs.menu.value.length;O++){if(H&&J._configs.menu.value[O].text.toLowerCase()==H.toLowerCase()){F=true;H=J._configs.menu.value[O].text;}}if(!F){H=J._configs.label._initialConfig.value;}var N='<span class="yui-toolbar-fontname-'+this._cleanClassName(H)+'">'+H+"</span>";if(J.get("label")!=N){J.set("label",N);this._updateMenuChecked("fontname",H);}}if(K){M=parseInt(C.getStyle(L,"fontSize"),10);if((M===null)||isNaN(M)){M=K._configs.label._initialConfig.value;}K.set("label",""+M);}if(!this._isElement(L,"body")&&!this._isElement(L,"img")){this.toolbar.enableButton(J);this.toolbar.enableButton(K);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(L,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink");}}if(this._hasParent(L,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent");}if(this._hasParent(L,"ol")||this._hasParent(L,"ul")){this.toolbar.disableButton("indent");}this._lastButton=null;},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;
+}}this.toolbar.set("disabled",true);var E=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_IMAGE_URL+": ",H);if((G!=="")&&(G!==null)){F.setAttribute("src",G);}else{if(G===""){F.parentNode.removeChild(F);this.currentElement=[];this.nodeChange();}else{if((G===null)){H=F.getAttribute("src",2);if(H.indexOf(this.get("blankimage"))!=-1){F.parentNode.removeChild(F);this.currentElement=[];this.nodeChange();}}}}this.closeWindow();this.toolbar.set("disabled",false);this.unsubscribe("afterExecCommand",E,this,true);};this.on("afterExecCommand",E,this,true);},_handleInsertImageWindowClose:function(){this.nodeChange();},_isLocalFile:function(E){if((E)&&(E!=="")&&((E.indexOf("file:/")!=-1)||(E.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.toolbar.set("disabled",true);var E=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)!="#"){}}}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);this.unsubscribe("afterExecCommand",E,this,true);};this.on("afterExecCommand",E,this);},_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;}if(this.get("element")){if(this.get("element").tagName){this._textarea=true;if(this.get("element").tagName.toLowerCase()!=="textarea"){this._textarea=false;}}else{return false;}}else{return false;}this._rendered=true;var E=this;window.setTimeout(function(){E._render.call(E);},4);},_render:function(){var E=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(){E._setInitialContent.call(E);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var F=this.get("toolbar");if(F instanceof B){this.toolbar=F;this.toolbar.set("disabled",true);}else{F.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),F);}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",this._handleFontSize,this,true);this.toolbar.on("colorPickerClicked",function(G){this._handleColorPicker(G);return false;},this,true);this.toolbar.on("alignClick",this._handleAlign,this,true);this.on("afterNodeChange",this._handleAfterNodeChange,this,true);this.toolbar.on("insertimageClick",this._handleInsertImageClick,this,true);this.on("windowinsertimageClose",this._handleInsertImageWindowClose,this,true);this.toolbar.on("createlinkClick",this._handleCreateLinkClick,this,true);this.on("windowcreatelinkClose",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%");this._setupDD();window.setTimeout(function(){E._setupAfterElement.call(E);},0);this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(G,F){var J=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((J===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._lastCommand=G;this._setMarkupType(G);if(this.browser.ie){this._getWindow().focus();}var E=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(G)){E=false;}}this.editorDirty=true;if((typeof this["cmd_"+G.toLowerCase()]=="function")&&E){var I=this["cmd_"+G.toLowerCase()](F);E=I[0];if(I[1]){G=I[1];}if(I[2]){F=I[2];}}if(E){try{this._getDoc().execCommand(G,false,F);}catch(H){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();},this,true);this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_bold:function(H){if(!this.browser.webkit){var G=this._getSelectedElement();if(G&&this._isElement(G,"span")&&this._hasSelection()){if(G.style.fontWeight=="bold"){G.style.fontWeight="";var E=this._getDoc().createElement("b"),F=G.parentNode;F.replaceChild(E,G);E.appendChild(G);}}}return[true];},cmd_italic:function(H){if(!this.browser.webkit){var G=this._getSelectedElement();if(G&&this._isElement(G,"span")&&this._hasSelection()){if(G.style.fontStyle=="italic"){G.style.fontStyle="";var E=this._getDoc().createElement("i"),F=G.parentNode;F.replaceChild(E,G);E.appendChild(G);}}}return[true];},cmd_underline:function(F){if(!this.browser.webkit){var E=this._getSelectedElement();
+if(E&&this._isElement(E,"span")){if(E.style.textDecoration=="underline"){E.style.textDecoration="none";}else{E.style.textDecoration="underline";}return[false];}}return[true];},cmd_backcolor:function(H){var E=true,F=this._getSelectedElement(),G="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);G="hilitecolor";}if(!this._isElement(F,"body")&&!this._hasSelection()){F.style.backgroundColor=H;this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({backgroundColor:H});}else{this._createCurrentElement("span",{backgroundColor:H,color:F.style.color,fontSize:F.style.fontSize,fontFamily:F.style.fontFamily});this._selectNode(this.currentElement[0]);}E=false;}return[E,G];},cmd_forecolor:function(G){var E=true,F=this._getSelectedElement();if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({color:G});}else{this._createCurrentElement("span",{color:G,fontSize:F.style.fontSize,fontFamily:F.style.fontFamily,backgroundColor:F.style.backgroundColor});this._selectNode(this.currentElement[0]);}E=false;}return[E];},cmd_unlink:function(E){this._swapEl(this.currentElement[0],"span",function(F){F.className="yui-non";});return[false];},cmd_createlink:function(G){var F=this._getSelectedElement(),E=null;if(this._hasParent(F,"a")){this.currentElement[0]=this._hasParent(F,"a");}else{if(this._isElement(F,"li")){E=this._getDoc().createElement("a");E.innerHTML=F.innerHTML;F.innerHTML="";F.appendChild(E);this.currentElement[0]=E;}else{if(!this._isElement(F,"a")){this._createCurrentElement("a");E=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=E;}else{this.currentElement[0]=F;}}}return[false];},cmd_insertimage:function(J){var E=true,F=null,I="insertimage",H=this._getSelectedElement();if(J===""){J=this.get("blankimage");}if(this._isElement(H,"img")){this.currentElement[0]=H;E=false;}else{if(this._getDoc().queryCommandEnabled(I)){this._getDoc().execCommand(I,false,J);var K=this._getDoc().getElementsByTagName("img");for(var G=0;G<K.length;G++){if(!YAHOO.util.Dom.hasClass(K[G],"yui-img")){YAHOO.util.Dom.addClass(K[G],"yui-img");this.currentElement[0]=K[G];}}E=false;}else{if(H==this._getDoc().body){F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this._getDoc().body.appendChild(F);}else{this._createCurrentElement("img");F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);}this.currentElement[0]=F;E=false;}}return[E];},cmd_inserthtml:function(H){var E=true,G="inserthtml",F=null,I=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(G)){this._createCurrentElement("img");F=this._getDoc().createElement("span");F.innerHTML=H;this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);E=false;}else{if(this.browser.ie){I=this._getRange();if(I.item){I.item(0).outerHTML=H;}else{I.pasteHTML(H);}E=false;}}return[E];},cmd_list:function(d){var V=true,Z=null,N=0,G=null,U="",c=this._getSelectedElement(),W="insertorderedlist";if(d=="ul"){W="insertunorderedlist";}if((this.browser.webkit&&!this.browser.webkit4)||(this.browser.opera)){if(this._isElement(c,"li")&&this._isElement(c.parentNode,d)){G=c.parentNode;Z=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(Z,"yui-non");U="";var F=G.getElementsByTagName("li"),I=((this.browser.opera&&this.get("ptags"))?"p":"div");for(N=0;N<F.length;N++){U+="<"+I+">"+F[N].innerHTML+"</"+I+">";}Z.innerHTML=U;this.currentElement[0]=G;this.currentElement[0].parentNode.replaceChild(Z,this.currentElement[0]);}else{this._createCurrentElement(d.toLowerCase());Z=this._getDoc().createElement(d);for(N=0;N<this.currentElement.length;N++){var K=this._getDoc().createElement("li");K.innerHTML=this.currentElement[N].innerHTML+'<span class="yui-non">&nbsp;</span>&nbsp;';Z.appendChild(K);if(N>0){this.currentElement[N].parentNode.removeChild(this.currentElement[N]);}}var T=((this.browser.opera)?"<BR>":"<br>"),S=Z.firstChild.innerHTML.split(T),Y,a;if(S.length>0){Z.innerHTML="";for(Y=0;Y<S.length;Y++){a=this._getDoc().createElement("li");a.innerHTML=S[Y];Z.appendChild(a);}}this.currentElement[0].parentNode.replaceChild(Z,this.currentElement[0]);this.currentElement[0]=Z;var H=this.currentElement[0].firstChild;H=C.getElementsByClassName("yui-non","span",H)[0];if(this.browser.webkit){this._getSelection().setBaseAndExtent(H,1,H,H.innerText.length);}}V=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,d)||(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];}U="";var J=G.parentNode.getElementsByTagName("li");for(var X=0;X<J.length;X++){U+=J[X].innerHTML+"<br>";}var b=this._getDoc().createElement("span");b.innerHTML=U;G.parentNode.parentNode.replaceChild(b,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(W,"",G.parentNode);this.nodeChange();}V=false;}if(this.browser.opera){var R=this;window.setTimeout(function(){var e=R._getDoc().getElementsByTagName("li");for(var f=0;f<e.length;f++){if(e[f].innerHTML.toLowerCase()=="<br>"){e[f].parentNode.parentNode.removeChild(e[f].parentNode);}}},30);}if(this.browser.ie&&V){var L="";if(this._getRange().html){L="<li>"+this._getRange().html+"</li>";}else{var M=this._getRange().text.split("\n");if(M.length>1){L="";for(var Q=0;Q<M.length;Q++){L+="<li>"+M[Q]+"</li>";}}else{var P=this._getRange().text;if(P===""){L='<li id="new_list_item">'+P+"</li>";}else{L="<li>"+P+"</li>";}}}this._getRange().pasteHTML("<"+d+">"+L+"</"+d+">");var E=this._getDoc().getElementById("new_list_item");if(E){var O=this._getDoc().body.createTextRange();
+O.moveToElementText(E);O.collapse(false);O.select();E.id="";}V=false;}}return V;},cmd_insertorderedlist:function(E){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(E){return[this.cmd_list("ul")];},cmd_fontname:function(H){var E=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()&&!this._isElement(G,"body")&&!this.get("insert")){YAHOO.util.Dom.setStyle(G,"font-family",H);E=false;}else{if(this.get("insert")&&!this._hasSelection()){var F=this._createInsertElement({fontFamily:H});E=false;}}return[E];},cmd_fontsize:function(H){var E=null,G=true;E=this._getSelectedElement();if(this.browser.webkit){if(this.currentElement[0]){if(E==this.currentElement[0]){G=false;YAHOO.util.Dom.setStyle(E,"fontSize",H);this._selectNode(E);this.currentElement[0]=E;}}}if(G){if(!this._isElement(this._getSelectedElement(),"body")&&(!this._hasSelection())){E=this._getSelectedElement();YAHOO.util.Dom.setStyle(E,"fontSize",H);if(this.get("insert")&&this.browser.ie){var F=this._getRange();F.collapse(false);F.select();}else{this._selectNode(E);}}else{if(this.currentElement&&(this.currentElement.length>0)&&(!this._hasSelection())&&(!this.get("insert"))){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",H);}else{if(this.get("insert")&&!this._hasSelection()){E=this._createInsertElement({fontSize:H});this.currentElement[0]=E;this._selectNode(this.currentElement[0]);}else{this._createCurrentElement("span",{"fontSize":H,fontFamily:E.style.fontFamily,color:E.style.color,backgroundColor:E.style.backgroundColor});this._selectNode(this.currentElement[0]);}}}}return[false];},_swapEl:function(F,E,H){var G=this._getDoc().createElement(E);if(F){G.innerHTML=F.innerHTML;}if(typeof H=="function"){H.call(this,G);}if(F){F.parentNode.replaceChild(G,F);}return G;},_createInsertElement:function(E){this._createCurrentElement("span",E);var F=this.currentElement[0];if(this.browser.webkit){F.innerHTML='<span class="yui-non">&nbsp;</span>';F=F.firstChild;this._getSelection().setBaseAndExtent(F,1,F,F.innerText.length);}else{if(this.browser.ie||this.browser.opera){F.innerHTML="&nbsp;";}}this.focus();this._selectNode(F,true);return F;},_createCurrentElement:function(G,J){G=((G)?G:"a");var R=null,F=[],H=this._getDoc();if(this.currentFont){if(!J){J={};}J.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var M=function(X,Z){var Y=null;X=((X)?X:"span");X=X.toLowerCase();switch(X){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":Y=H.createElement(X);break;default:Y=H.createElement(X);if(X==="span"){YAHOO.util.Dom.addClass(Y,"yui-tag-"+X);YAHOO.util.Dom.addClass(Y,"yui-tag");Y.setAttribute("tag",X);}for(var W in Z){if(YAHOO.lang.hasOwnProperty(Z,W)){Y.style[W]=Z[W];}}break;}return Y;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var L=this._getDoc().getElementsByTagName("img");for(var Q=0;Q<L.length;Q++){if(L[Q].getAttribute("src",2)=="yui-tmp-img"){F=M(G,J);L[Q].parentNode.replaceChild(F,L[Q]);this.currentElement[this.currentElement.length]=F;}}}else{if(this.currentEvent){R=YAHOO.util.Event.getTarget(this.currentEvent);}else{R=this._getDoc().body;}}if(R){F=M(G,J);if(this._isElement(R,"body")||this._isElement(R,"html")){if(this._isElement(R,"html")){R=this._getDoc().body;}R.appendChild(F);}else{if(R.nextSibling){R.parentNode.insertBefore(F,R.nextSibling);}else{R.parentNode.appendChild(F);}}this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,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 E=[],P,V=["font","span","i","b","u"];if(!this._isElement(this._getSelectedElement(),"body")){V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);}for(var K=0;K<V.length;K++){var I=this._getDoc().getElementsByTagName(V[K]);for(var U=0;U<I.length;U++){E[E.length]=I[U];}}for(var S=0;S<E.length;S++){if((YAHOO.util.Dom.getStyle(E[S],"font-family")=="yui-tmp")||(E[S].face&&(E[S].face=="yui-tmp"))){if(G!=="span"){F=M(G,J);}else{F=M(E[S].tagName,J);}F.innerHTML=E[S].innerHTML;if(this._isElement(E[S],"ol")||(this._isElement(E[S],"ul"))){var N=E[S].getElementsByTagName("li")[0];E[S].style.fontFamily="inherit";N.style.fontFamily="inherit";F.innerHTML=N.innerHTML;N.innerHTML="";N.appendChild(F);this.currentElement[this.currentElement.length]=F;}else{if(this._isElement(E[S],"li")){E[S].innerHTML="";E[S].appendChild(F);E[S].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=F;}else{if(E[S].parentNode){E[S].parentNode.replaceChild(F,E[S]);this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&J&&J.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var T=this.currentElement.length;for(var O=0;O<T;O++){if((O+1)!=T){if(this.currentElement[O]&&this.currentElement[O].nextSibling){if(this._isElement(this.currentElement[O],"br")){this.currentElement[this.currentElement.length]=this.currentElement[O].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();if(this._textarea){this.get("element").value=F;}else{this.get("element").innerHTML=F;}if(this.get("saveEl")!==this.get("element")){var E=this.get("saveEl");if(D.isString(E)){E=C.get(E);}if(E){if(E.tagName.toLowerCase()==="textarea"){E.value=F;}else{E.innerHTML=F;}}}return F;},setEditorHTML:function(F){var E=this._cleanIncomingHTML(F);E=E.replace(/RIGHT_BRACKET/gi,"{");E=E.replace(/LEFT_BRACKET/gi,"}");
+this._getDoc().body.innerHTML=E;this.nodeChange();},getEditorHTML:function(){try{var E=this._getDoc().body;if(E===null){return null;}return this._getDoc().body.innerHTML;}catch(F){return"";}},show:function(){if(this.browser.gecko){this._setDesignMode("on");this.focus();}if(this.browser.webkit){var E=this;window.setTimeout(function(){E._setInitialContent.call(E);},10);}if(this.currentWindow){this.closeWindow();}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(this.currentWindow){this.closeWindow();}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(E){E=E.replace(/{/gi,"RIGHT_BRACKET");E=E.replace(/}/gi,"LEFT_BRACKET");E=E.replace(/<strong([^>]*)>/gi,"<b$1>");E=E.replace(/<\/strong>/gi,"</b>");E=E.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");E=E.replace(/<\/embed>/gi,"</YUI_EMBED>");E=E.replace(/<em([^>]*)>/gi,"<i$1>");E=E.replace(/<\/em>/gi,"</i>");E=E.replace(/_moz_dirty=""/gi,"");E=E.replace(/<YUI_EMBED([^>]*)>/gi,"<embed$1>");E=E.replace(/<\/YUI_EMBED>/gi,"</embed>");if(this.get("plainText")){E=E.replace(/\n/g,"<br>").replace(/\r/g,"<br>");E=E.replace(/  /gi,"&nbsp;&nbsp;");E=E.replace(/\t/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");}E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/&lt;script([^>]*)&gt;/gi,"<bad>");E=E.replace(/&lt;\/script([^>]*)&gt;/gi,"</bad>");E=E.replace(/\r\n/g,"<YUI_LF>").replace(/\n/g,"<YUI_LF>").replace(/\r/g,"<YUI_LF>");E=E.replace(new RegExp("<bad([^>]*)>(.*?)</bad>","gi"),"");E=E.replace(/<YUI_LF>/g,"\n");return E;},cleanHTML:function(H){if(!H){H=this.getEditorHTML();}var F=this.get("markup");H=this.pre_filter_linebreaks(H,F);H=this.filter_msword(H);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((F=="semantic")||(F=="xhtml")){H=H.replace(/<i([^>]*)>/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(/_moz_dirty=""/gi,"");H=H.replace(/<strike/gi,'<span style="text-decoration: line-through;"');H=H.replace(/\/strike>/gi,"/span>");if(this.browser.ie){H=H.replace(/text-decoration/gi,"text-decoration");H=H.replace(/font-weight/gi,"font-weight");H=H.replace(/_width="([^>]*)"/gi,"");H=H.replace(/_height="([^>]*)"/gi,"");var G=this._baseHREF.replace(/\//gi,"\\/"),I=new RegExp('src="'+G,"gi");H=H.replace(I,'src="');}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((F=="semantic")||(F=="xhtml")||(F=="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(F=="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,F);if(F=="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=H.replace(/ &amp; /gi," YUI_AMP ");H=H.replace(/ &amp;/gi," YUI_AMP_F ");H=H.replace(/&amp; /gi," YUI_AMP_R ");H=H.replace(/&amp;/gi,"&");H=H.replace(/ YUI_AMP /gi," &amp; ");H=H.replace(/ YUI_AMP_F /gi," &amp;");H=H.replace(/ YUI_AMP_R /gi,"&amp; ");H=YAHOO.lang.trim(H);if(this.get("removeLineBreaks")){H=H.replace(/\n/g,"").replace(/\r/g,"");H=H.replace(/  /gi," ");}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){H=H.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{H=H.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:H});return H;},filter_msword:function(E){if(!this.get("filterWord")){return E;}E=E.replace(/<o:p>\s*<\/o:p>/g,"");E=E.replace(/<o:p>[\s\S]*?<\/o:p>/g,"&nbsp;");E=E.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,"");E=E.replace(/\s*mso-[^:]+:[^;"]+;?/gi,"");E=E.replace(/\s*MARGIN: 0cm 0cm 0pt\s*;/gi,"");E=E.replace(/\s*MARGIN: 0cm 0cm 0pt\s*"/gi,'"');E=E.replace(/\s*TEXT-INDENT: 0cm\s*;/gi,"");E=E.replace(/\s*TEXT-INDENT: 0cm\s*"/gi,'"');E=E.replace(/\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi,'"');
+E=E.replace(/\s*FONT-VARIANT: [^\s;]+;?"/gi,'"');E=E.replace(/\s*tab-stops:[^;"]*;?/gi,"");E=E.replace(/\s*tab-stops:[^"]*/gi,"");E=E.replace(/<\\?\?xml[^>]*>/gi,"");E=E.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");E=E.replace(/<(\w[^>]*) language=([^ |>]*)([^>]*)/gi,"<$1$3");E=E.replace(/<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi,"<$1$3");E=E.replace(/<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi,"<$1$3");return E;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>");E=E.replace(/<\/li>/gi,"</li>");E=E.replace(/<\/ol>/gi,"</ol>");E=E.replace(/<ol>/gi,"<ol>");E=E.replace(/<ul>/gi,"<ul>");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/yui-wk-div/gi,"");E=E.replace(/yui-wk-p/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li>  <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div([^>]*)>([ tnr]*)<\/div>/gi,"<br>");E=E.replace(/<\/div>/gi,"");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class="  "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br>&nbsp;<\/p>/gi,"<YUI_BR>");F=F.replace(/<p>&nbsp;<\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/&nbsp;&nbsp;&nbsp;&nbsp;/g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML="&nbsp;";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this.focus();},destroy:function(){if(this._nodeChangeDelayTimer){clearTimeout(this._nodeChangeDelayTimer);}this.hide();if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},saveAll:function(G){var F,H,E=YAHOO.widget.EditorInfo._instances;if(G){for(F in E){if(D.hasOwnProperty(E,F)){H=E[F];if(H.get("element").form&&(H.get("element").form==G)){H.saveHTML();}}}}else{for(F in E){if(D.hasOwnProperty(E,F)){E[F].saveHTML();}}}},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";}};})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.Editor=function(F,E){YAHOO.widget.Editor.superclass.constructor.call(this,F,E);};YAHOO.extend(YAHOO.widget.Editor,YAHOO.widget.SimpleEditor,{_undoCache:null,_undoLevel:null,_hasUndoLevel:function(){return((this._undoCache.length>1)&&this._undoLevel);},_undoNodeChange:function(){var E=this.toolbar.getButtonByValue("undo"),F=this.toolbar.getButtonByValue("redo");if(E&&F){if(this._hasUndoLevel()){this.toolbar.enableButton(E);}if(this._undoLevel<this._undoCache.length){this.toolbar.enableButton(F);}}this._lastCommand=null;},_checkUndo:function(){var E=this._undoCache.length,G=[];if(E>=this.get("maxUndo")){for(var F=(E-this.get("maxUndo"));F<E;F++){G.push(this._undoCache[F]);}this._undoCache=G;this._undoLevel=this._undoCache.length;}},_putUndo:function(F){if(this._undoLevel===this._undoCache.length){this._undoCache.push(F);
+this._undoLevel=this._undoCache.length;}else{var F=this.getEditorHTML();var E=this._undoCache[this._undoLevel];if(E){if(F!==E){this._undoCache=[];this._undoLevel=0;}}}},_getUndo:function(E){this._undoLevel=E;return this._undoCache[E];},_storeUndo:function(){if(this._lastCommand==="undo"||this._lastCommand==="redo"){return false;}if(!this._undoCache){this._undoCache=[];this._undoLevel=0;}this._checkUndo();var F=this.getEditorHTML();var E=this._undoCache[this._undoLevel-1];if(E){if(F!==E){this._putUndo(F);}}else{this._putUndo(F);}this._undoNodeChange();},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_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_BORDER_SIZE:"Border Size",STR_IMAGE_BORDER_TYPE:"Border Type",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",STR_NONE:"none",CLASS_LOCAL_FILE:"warning-localfile",CLASS_HIDDEN:"yui-hidden",init:function(F,E){this._windows={};if(!this._defaultToolbar){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"},{group:"textstyle2",label:"&nbsp;",buttons:[{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:"undoredo",label:"Undo/Redo",buttons:[{type:"push",label:"Undo",value:"undo",disabled:true},{type:"push",label:"Redo",value:"redo",disabled:true}]},{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:"indentlist2",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"}]}]};}if(!this._defaultImageToolbarConfig){this._defaultImageToolbarConfig={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:"0",value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:this.STR_IMAGE_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:this.STR_IMAGE_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}]}]};
+}YAHOO.widget.Editor.superclass.init.call(this,F,E);},_render:function(){YAHOO.widget.Editor.superclass._render.apply(this,arguments);var E=this;window.setTimeout(function(){E._renderPanel.call(E);},800);},initAttributes:function(E){YAHOO.widget.Editor.superclass.initAttributes.call(this,E);this.setAttributeConfig("localFileWarning",{value:E.locaFileWarning||true});this.setAttributeConfig("hiddencss",{value:E.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});},_windows:null,_defaultImageToolbar:null,_defaultImageToolbarConfig:null,_fixNodes:function(){YAHOO.widget.Editor.superclass._fixNodes.call(this);try{var H="";var J=this._getDoc().getElementsByTagName("img");for(var F=0;F<J.length;F++){if(J[F].getAttribute("href",2)){H=J[F].getAttribute("src",2);if(this._isLocalFile(H)){C.addClass(J[F],this.CLASS_LOCAL_FILE);}else{C.removeClass(J[F],this.CLASS_LOCAL_FILE);}}}var G=this._getDoc().body.getElementsByTagName("a");for(var E=0;E<G.length;E++){if(G[E].getAttribute("href",2)){H=G[E].getAttribute("href",2);if(this._isLocalFile(H)){C.addClass(G[E],this.CLASS_LOCAL_FILE);}else{C.removeClass(G[E],this.CLASS_LOCAL_FILE);}}}}catch(I){}},_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{"outdent":true},_alwaysEnabled:{hiddenelements:true},_handleKeyDown:function(G){YAHOO.widget.Editor.superclass._handleKeyDown.call(this,G);var F=false,H=null,E=false;switch(G.keyCode){case this._keyMap.JUSTIFY_LEFT.key:if(this._checkKey(this._keyMap.JUSTIFY_LEFT,G)){H="justifyleft";F=true;}break;case this._keyMap.JUSTIFY_CENTER.key:if(this._checkKey(this._keyMap.JUSTIFY_CENTER,G)){H="justifycenter";F=true;}break;case 221:case this._keyMap.JUSTIFY_RIGHT.key:if(this._checkKey(this._keyMap.JUSTIFY_RIGHT,G)){H="justifyright";F=true;}break;}if(F&&H){this.execCommand(H,null);A.stopEvent(G);this.nodeChange();}},_renderCreateLinkWindow:function(){var H='<label for="'+this.get("id")+'_createlink_url"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="'+this.get("id")+'_createlink_url" id="'+this.get("id")+'_createlink_url" value=""></label>';H+='<label for="'+this.get("id")+'_createlink_target"><strong>&nbsp;</strong><input type="checkbox" name="'+this.get("id")+'_createlink_target" id="'+this.get("id")+'_createlink_target" value="_blank" class="createlink_target"> '+this.STR_LINK_NEW_WINDOW+"</label>";H+='<label for="'+this.get("id")+'_createlink_title"><strong>'+this.STR_LINK_TITLE+':</strong> <input type="text" name="'+this.get("id")+'_createlink_title" id="'+this.get("id")+'_createlink_title" value=""></label>';var E=document.createElement("div");E.innerHTML=H;var G=document.createElement("div");G.className="removeLink";var F=document.createElement("a");F.href="#";F.innerHTML=this.STR_LINK_PROP_REMOVE;F.title=this.STR_LINK_PROP_REMOVE;A.on(F,"click",function(I){A.stopEvent(I);this.unsubscribeAll("afterExecCommand");this.execCommand("unlink");this.closeWindow();},this,true);G.appendChild(F);E.appendChild(G);this._windows.createlink={};this._windows.createlink.body=E;A.on(E,"keyup",function(I){A.stopPropagation(I);});this.get("panel").editor_form.appendChild(E);this.fireEvent("windowCreateLinkRender",{type:"windowCreateLinkRender",panel:this.get("panel"),body:E});return E;},_handleCreateLinkClick:function(){var E=this._getSelectedElement();if(this._isElement(E,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=E;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 K=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var I=this.currentElement[0],H="",L="",J="",G=false;if(I){K.el=I;if(I.getAttribute("href",2)!==null){H=I.getAttribute("href",2);if(this._isLocalFile(H)){K.setFooter(this.STR_LOCAL_FILE_WARNING);G=true;}else{K.setFooter(" ");}}if(I.getAttribute("title")!==null){L=I.getAttribute("title");}if(I.getAttribute("target")!==null){J=I.getAttribute("target");}}var F=null;if(this._windows.createlink&&this._windows.createlink.body){F=this._windows.createlink.body;}else{F=this._renderCreateLinkWindow();}K.setHeader(this.STR_LINK_PROP_TITLE);K.setBody(F);A.purgeElement(this.get("id")+"_createlink_url");C.get(this.get("id")+"_createlink_url").value=H;C.get(this.get("id")+"_createlink_title").value=L;C.get(this.get("id")+"_createlink_target").checked=((J)?true:false);A.onAvailable(this.get("id")+"_createlink_url",function(){var M=this.get("id");window.setTimeout(function(){try{YAHOO.util.Dom.get(M+"_createlink_url").focus();}catch(N){}},50);if(this._isLocalFile(H)){C.addClass(this.get("id")+"_createlink_url","warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(this.get("id")+"_createlink_url","warning");this.get("panel").setFooter(" ");}A.on(this.get("id")+"_createlink_url","blur",function(){var N=C.get(this.get("id")+"_createlink_url");if(this._isLocalFile(N.value)){C.addClass(N,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(N,"warning");this.get("panel").setFooter(" ");}},this,true);},this,true);this.openWindow(K);});},_handleCreateLinkWindowClose:function(){var G=C.get(this.get("id")+"_createlink_url"),I=C.get(this.get("id")+"_createlink_target"),K=C.get(this.get("id")+"_createlink_title"),H=arguments[0].win.el,E=H;if(G&&G.value){var J=G.value;if((J.indexOf(":/"+"/")==-1)&&(J.substring(0,1)!="/")&&(J.substring(0,6).toLowerCase()!="mailto")){if((J.indexOf("@")!=-1)&&(J.substring(0,6).toLowerCase()!="mailto")){J="mailto:"+J;
+}else{if(J.substring(0,1)!="#"){J="http:/"+"/"+J;}}}H.setAttribute("href",J);if(I.checked){H.setAttribute("target",I.value);}else{H.setAttribute("target","");}H.setAttribute("title",((K.value)?K.value:""));}else{var F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;C.addClass(F,"yui-non");H.parentNode.replaceChild(F,H);}C.removeClass(G,"warning");C.get(this.get("id")+"_createlink_url").value="";C.get(this.get("id")+"_createlink_title").value="";C.get(this.get("id")+"_createlink_target").checked=false;this.nodeChange();this.currentElement=[];},_renderInsertImageWindow:function(){var G=this.currentElement[0];var M='<label for="'+this.get("id")+'_insertimage_url"><strong>'+this.STR_IMAGE_URL+':</strong> <input type="text" id="'+this.get("id")+'_insertimage_url" value="" size="40"></label>';var K=document.createElement("div");K.innerHTML=M;var J=document.createElement("div");J.id=this.get("id")+"_img_toolbar";K.appendChild(J);var I='<label for="'+this.get("id")+'_insertimage_title"><strong>'+this.STR_IMAGE_TITLE+':</strong> <input type="text" id="'+this.get("id")+'_insertimage_title" value="" size="40"></label>';I+='<label for="'+this.get("id")+'_insertimage_link"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="'+this.get("id")+'_insertimage_link" id="'+this.get("id")+'_insertimage_link" value=""></label>';I+='<label for="'+this.get("id")+'_insertimage_target"><strong>&nbsp;</strong><input type="checkbox" name="'+this.get("id")+'_insertimage_target_" id="'+this.get("id")+'_insertimage_target" value="_blank" class="insertimage_target"> '+this.STR_LINK_NEW_WINDOW+"</label>";var E=document.createElement("div");E.innerHTML=I;K.appendChild(E);var F={};D.augmentObject(F,this._defaultImageToolbarConfig);var H=new YAHOO.widget.Toolbar(J,F);H.editor_el=G;this._defaultImageToolbar=H;var N=H.get("cont");var L=document.createElement("div");L.className="yui-toolbar-group yui-toolbar-group-height-width height-width";L.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";L.innerHTML+='<span tabIndex="-1"><input type="text" size="3" value="" id="'+this.get("id")+'_insertimage_width"> x <input type="text" size="3" value="" id="'+this.get("id")+'_insertimage_height"></span>';N.insertBefore(L,N.firstChild);A.onAvailable(this.get("id")+"_insertimage_width",function(){A.on(this.get("id")+"_insertimage_width","blur",function(){var O=parseInt(C.get(this.get("id")+"_insertimage_width").value,10);if(O>5){this._defaultImageToolbar.editor_el.style.width=O+"px";}},this,true);},this,true);A.onAvailable(this.get("id")+"_insertimage_height",function(){A.on(this.get("id")+"_insertimage_height","blur",function(){var O=parseInt(C.get(this.get("id")+"_insertimage_height").value,10);if(O>5){this._defaultImageToolbar.editor_el.style.height=O+"px";}},this,true);},this,true);H.on("colorPickerClicked",function(T){var P="1",S="solid",O="black",R=this._defaultImageToolbar.editor_el;if(R.style.borderLeftWidth){P=parseInt(R.style.borderLeftWidth,10);}if(R.style.borderLeftStyle){S=R.style.borderLeftStyle;}if(R.style.borderLeftColor){O=R.style.borderLeftColor;}var Q=P+"px "+S+" #"+T.color;R.style.border=Q;},this,true);H.on("buttonClick",function(V){var T=V.button.value,S=this._defaultImageToolbar.editor_el,R="";if(V.button.menucmd){T=V.button.menucmd;}var P="1",Q="solid",O="black";if(S.style.borderLeftWidth){P=parseInt(S.style.borderLeftWidth,10);}if(S.style.borderLeftStyle){Q=S.style.borderLeftStyle;}if(S.style.borderLeftColor){O=S.style.borderLeftColor;}switch(T){case"bordersize":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}R=parseInt(V.button.value,10)+"px "+Q+" "+O;S.style.border=R;if(parseInt(V.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;}R=P+"px "+V.button.value+" "+O;S.style.border=R;break;case"right":case"left":H.deselectAllButtons();S.style.display="";S.align=V.button.value;break;case"inline":H.deselectAllButtons();S.style.display="";S.align="";break;case"block":H.deselectAllButtons();S.style.display="block";S.align="center";break;case"padding":var U=H.getButtonById(V.button.id);S.style.margin=U.get("label")+"px";break;}H.selectButton(V.button.value);if(T!=="padding"){this.moveWindow();}},this,true);if(this.get("localFileWarning")){A.on(this.get("id")+"_insertimage_link","blur",function(){var O=C.get(this.get("id")+"_insertimage_link");if(this._isLocalFile(O.value)){C.addClass(O,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(O,"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(this.get("id")+"_insertimage_url","blur",function(){var Q=C.get(this.get("id")+"_insertimage_url"),R=this.currentElement[0];if(Q.value&&R){if(Q.value==R.getAttribute("src",2)){return false;}}if(this._isLocalFile(Q.value)){C.addClass(Q,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{if(this.currentElement[0]){C.removeClass(Q,"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(Q&&Q.value&&(Q.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",Q.value);var P=this,O=new Image();O.onerror=function(){Q.value=P.STR_IMAGE_HERE;O.setAttribute("src",P.get("blankimage"));P.currentElement[0].setAttribute("src",P.get("blankimage"));YAHOO.util.Dom.get(P.get("id")+"_insertimage_height").value=O.height;YAHOO.util.Dom.get(P.get("id")+"_insertimage_width").value=O.width;};var S=this.get("id");window.setTimeout(function(){YAHOO.util.Dom.get(S+"_insertimage_height").value=O.height;YAHOO.util.Dom.get(S+"_insertimage_width").value=O.width;
+if(P.currentElement&&P.currentElement[0]){if(!P.currentElement[0]._height){P.currentElement[0]._height=O.height;}if(!P.currentElement[0]._width){P.currentElement[0]._width=O.width;}}},800);if(Q.value!=this.STR_IMAGE_HERE){O.src=Q.value;}}}}},this,true);this._windows.insertimage={};this._windows.insertimage.body=K;this.get("panel").editor_form.appendChild(K);this.fireEvent("windowInsertImageRender",{type:"windowInsertImageRender",panel:this.get("panel"),body:K,toolbar:H});return K;},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.on("afterExecCommand",function(){var H=this.currentElement[0],O=null,L="",Z="",G=null,a="",K="",X="",R=75,V=75,Q=0,M=0,J=0,S=false,I=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!H){H=this._getSelectedElement();}if(H){I.el=H;if(H.getAttribute("src")){K=H.getAttribute("src",2);if(K.indexOf(this.get("blankimage"))!=-1){K=this.STR_IMAGE_HERE;S=true;}}if(H.getAttribute("alt",2)){a=H.getAttribute("alt",2);}if(H.getAttribute("title",2)){a=H.getAttribute("title",2);}if(H.parentNode&&this._isElement(H.parentNode,"a")){L=H.parentNode.getAttribute("href",2);if(H.parentNode.getAttribute("target")!==null){Z=H.parentNode.getAttribute("target");}}R=parseInt(H.height,10);V=parseInt(H.width,10);if(H.style.height){R=parseInt(H.style.height,10);}if(H.style.width){V=parseInt(H.style.width,10);}if(H.style.margin){Q=parseInt(H.style.margin,10);}if(!S){if(!H._height){H._height=R;}if(!H._width){H._width=V;}M=H._height;J=H._width;}}if(this._windows.insertimage&&this._windows.insertimage.body){O=this._windows.insertimage.body;this._defaultImageToolbar.resetAllButtons();}else{O=this._renderInsertImageWindow();}G=this._defaultImageToolbar;G.editor_el=H;var F="0",U="solid";if(H.style.borderLeftWidth){F=parseInt(H.style.borderLeftWidth,10);}if(H.style.borderLeftStyle){U=H.style.borderLeftStyle;}var Y=G.getButtonByValue("bordersize"),W=((parseInt(F,10)>0)?"":this.STR_NONE);Y.set("label",'<span class="yui-toolbar-bordersize-'+F+'">'+W+"</span>");this._updateMenuChecked("bordersize",F,G);var N=G.getButtonByValue("bordertype");N.set("label",'<span class="yui-toolbar-bordertype-'+U+'">asdfa</span>');this._updateMenuChecked("bordertype",U,G);if(parseInt(F,10)>0){G.enableButton(N);G.enableButton(Y);G.enableButton("bordercolor");}if((H.align=="right")||(H.align=="left")){G.selectButton(H.align);}else{if(H.style.display=="block"){G.selectButton("block");}else{G.selectButton("inline");}}if(parseInt(H.style.marginLeft,10)>0){G.getButtonByValue("padding").set("label",""+parseInt(H.style.marginLeft,10));}if(H.style.borderSize){G.selectButton("bordersize");G.selectButton(parseInt(H.style.borderSize,10));}G.getButtonByValue("padding").set("label",""+Q);I.setHeader(this.STR_IMAGE_PROP_TITLE);I.setBody(O);if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){I.setFooter(this.STR_IMAGE_COPY);}this.openWindow(I);C.get(this.get("id")+"_insertimage_url").value=K;C.get(this.get("id")+"_insertimage_title").value=a;C.get(this.get("id")+"_insertimage_link").value=L;C.get(this.get("id")+"_insertimage_target").checked=((Z)?true:false);C.get(this.get("id")+"_insertimage_width").value=V;C.get(this.get("id")+"_insertimage_height").value=R;if(((R!=M)||(V!=J))&&(!S)){var P=document.createElement("span");P.className="info";P.innerHTML=this.STR_IMAGE_ORIG_SIZE+": ("+J+" x "+M+")";if(C.get(this.get("id")+"_insertimage_height").nextSibling){var E=C.get(this.get("id")+"_insertimage_height").nextSibling;E.parentNode.removeChild(E);}C.get(this.get("id")+"_insertimage_height").parentNode.appendChild(P);}this.toolbar.selectButton("insertimage");var T=this.get("id");window.setTimeout(function(){try{YAHOO.util.Dom.get(T+"_insertimage_url").focus();if(S){YAHOO.util.Dom.get(T+"_insertimage_url").select();}}catch(b){}},50);});},_handleInsertImageWindowClose:function(){var E=C.get(this.get("id")+"_insertimage_url"),L=C.get(this.get("id")+"_insertimage_title"),I=C.get(this.get("id")+"_insertimage_link"),J=C.get(this.get("id")+"_insertimage_target"),H=arguments[0].win.el;if(E&&E.value&&(E.value!=this.STR_IMAGE_HERE)){H.setAttribute("src",E.value);H.setAttribute("title",L.value);H.setAttribute("alt",L.value);var G=H.parentNode;if(I.value){var K=I.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{K="http:/"+"/"+K;}}if(G&&this._isElement(G,"a")){G.setAttribute("href",K);if(J.checked){G.setAttribute("target",J.value);}else{G.setAttribute("target","");}}else{var F=this._getDoc().createElement("a");F.setAttribute("href",K);if(J.checked){F.setAttribute("target",J.value);}else{F.setAttribute("target","");}H.parentNode.replaceChild(F,H);F.appendChild(H);}}else{if(G&&this._isElement(G,"a")){G.parentNode.replaceChild(H,G);}}}else{H.parentNode.removeChild(H);}C.get(this.get("id")+"_insertimage_url").value="";C.get(this.get("id")+"_insertimage_title").value="";C.get(this.get("id")+"_insertimage_link").value="";C.get(this.get("id")+"_insertimage_target").checked=false;C.get(this.get("id")+"_insertimage_width").value=0;C.get(this.get("id")+"_insertimage_height").value=0;this._defaultImageToolbar.resetAllButtons();this.currentElement=[];this.nodeChange();},EDITOR_PANEL_ID:"-panel",_renderPanel:function(){var H=document.createElement("div");C.addClass(H,"yui-editor-panel");H.id=this.get("id")+this.EDITOR_PANEL_ID;H.style.position="absolute";H.style.top="-9999px";H.style.left="-9999px";document.body.appendChild(H);this.get("element_cont").insertBefore(H,this.get("element_cont").get("firstChild"));var E=new YAHOO.widget.Overlay(this.get("id")+this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});this.set("panel",E);E.setBody("---");E.setHeader(" ");E.setFooter(" ");var K=document.createElement("div");K.className=this.CLASS_PREFIX+"-body-cont";
+for(var L in this.browser){if(this.browser[L]){C.addClass(K,L);break;}}C.addClass(K,((YAHOO.widget.Button&&(this._defaultToolbar.buttonType=="advanced"))?"good-button":"no-button"));var I=document.createElement("h3");I.className="yui-editor-skipheader";I.innerHTML=this.STR_CLOSE_WINDOW_NOTE;K.appendChild(I);var F=document.createElement("fieldset");E.editor_form=F;K.appendChild(F);var G=document.createElement("span");G.innerHTML="X";G.title=this.STR_CLOSE_WINDOW;G.className="close";A.on(G,"click",this.closeWindow,this,true);var M=document.createElement("span");M.innerHTML="^";M.className="knob";E.editor_knob=M;var N=document.createElement("h3");E.editor_header=N;N.innerHTML="<span></span>";E.setHeader(" ");E.appendToHeader(N);N.appendChild(G);N.appendChild(M);E.setBody(" ");E.setFooter(" ");E.appendToBody(K);A.on(E.element,"click",function(O){A.stopPropagation(O);});var J=function(){E.bringToTop();YAHOO.util.Dom.setStyle(this.element,"display","block");this._handleWindowInputs(false);};E.showEvent.subscribe(J,this,true);E.hideEvent.subscribe(function(){this._handleWindowInputs(true);},this,true);E.renderEvent.subscribe(function(){this._renderInsertImageWindow();this._renderCreateLinkWindow();this.fireEvent("windowRender",{type:"windowRender",panel:E});this._handleWindowInputs(true);},this,true);if(this.DOMReady){this.get("panel").render();}else{A.onDOMReady(function(){this.get("panel").render();},this,true);}return this.get("panel");},_handleWindowInputs:function(F){if(!D.isBoolean(F)){F=false;}var E=this.get("panel").element.getElementsByTagName("input");for(var G=0;G<E.length;G++){try{E[G].disabled=F;}catch(H){}}},openWindow:function(K){var P=this;window.setTimeout(function(){P.toolbar.set("disabled",true);},10);A.on(document,"keydown",this._closeWindow,this,true);if(this.currentWindow){this.closeWindow();}var Q=C.getXY(this.currentElement[0]),N=C.getXY(this.get("iframe").get("element")),E=this.get("panel"),H=[(Q[0]+N[0]-20),(Q[1]+N[1]+10)],G=(parseInt(K.attrs.width,10)/2),L="center",J=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:E});var F=E.editor_form;var I=this._windows;for(var O in I){if(D.hasOwnProperty(I,O)){if(I[O]&&I[O].body){if(O==K.name){C.setStyle(I[O].body,"display","block");}else{C.setStyle(I[O].body,"display","none");}}}}if(this._windows[K.name].body){C.setStyle(this._windows[K.name].body,"display","block");F.appendChild(this._windows[K.name].body);}else{if(D.isObject(K.body)){F.appendChild(K.body);}else{var M=document.createElement("div");M.innerHTML=K.body;F.appendChild(M);}}E.editor_header.firstChild.innerHTML=K.header;if(K.footer!==null){E.setFooter(K.footer);}E.cfg.setProperty("width",K.attrs.width);this.currentWindow=K;this.moveWindow(true);E.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:E});},moveWindow:function(F){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),a=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),Y=[(J[0]+a[0]),(J[1]+a[1])],R=(parseInt(I.attrs.width,10)/2),U="center",Q=O.cfg.getProperty("xy")||[0,0],G=O.editor_knob,X=0,L=0,T=false;Y[0]=((Y[0]-R)+20);Y[0]=Y[0]-C.getDocumentScrollLeft(this._getDoc());Y[1]=Y[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){Y[0]=(Y[0]+(75/2));Y[1]=(Y[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var W=parseInt(this.currentElement[0].height,10);Y[0]=(Y[0]+(N/2));Y[1]=(Y[1]+W);}Y[1]=Y[1]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize");if(K&&K.indexOf&&K.indexOf("px")!=-1){Y[1]=Y[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{Y[1]=Y[1]+20;}}if(Y[0]<a[0]){Y[0]=a[0]+5;U="left";}if((Y[0]+(R*2))>(a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){Y[0]=((a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(R*2)-5);U="right";}try{X=(Y[0]-Q[0]);L=(Y[1]-Q[1]);}catch(b){}var P=a[1]+parseInt(this.get("height"),10);var H=a[0]+parseInt(this.get("width"),10);if(Y[1]>P){Y[1]=P;}if(Y[0]>H){Y[0]=(H/2);}X=((X<0)?(X*-1):X);L=((L<0)?(L*-1):L);if(((X>10)||(L>10))||F){var S=0,V=0;if(this.currentElement[0].width){V=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+a[0]+V;S=M-Y[0];if(S>(parseInt(I.attrs.width,10)-1)){S=((parseInt(I.attrs.width,10)-30)-1);}else{if(S<40){S=1;}}if(isNaN(S)){S=1;}if(F){if(G){G.style.left=S+"px";}O.cfg.setProperty("xy",Y);}else{if(this.get("animate")){T=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);T.attributes={top:{to:Y[1]},left:{to:Y[0]}};T.onComplete.subscribe(function(){O.cfg.setProperty("xy",Y);});var Z=new YAHOO.util.Anim(O.iframe,T.attributes,0.5,YAHOO.util.Easing.easeOut);var E=new YAHOO.util.Anim(G,{left:{to:S}},0.6,YAHOO.util.Easing.easeOut);T.animate();Z.animate();E.animate();}else{G.style.left=S+"px";O.cfg.setProperty("xy",Y);}}}},_closeWindow:function(E){if(this._checkKey(this._keyMap.CLOSE_WINDOW,E)){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(E){this.fireEvent("window"+this.currentWindow.name+"Close",{type:"window"+this.currentWindow.name+"Close",win:this.currentWindow,el:this.currentElement[0]});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.focus();A.removeListener(document,"keydown",this._closeWindow);},cmd_undo:function(G){if(this._hasUndoLevel()){var F=this.getEditorHTML(),E;if(!this._undoLevel){this._undoLevel=this._undoCache.length;}this._undoLevel=(this._undoLevel-1);if(this._undoCache[this._undoLevel]){E=this._getUndo(this._undoLevel);if(E!=F){this.setEditorHTML(E);}else{this._undoLevel=(this._undoLevel-1);E=this._getUndo(this._undoLevel);if(E!=F){this.setEditorHTML(E);}}}else{this._undoLevel=0;
+this.toolbar.disableButton("undo");}}return[false];},cmd_redo:function(F){this._undoLevel=this._undoLevel+1;if(this._undoLevel>=this._undoCache.length){this._undoLevel=this._undoCache.length;}if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this.toolbar.disableButton("redo");}return[false];},cmd_heading:function(I){var F=true,G=null,H="heading",J=this._getSelection(),E=this._getSelectedElement();if(E){J=E;}if(this.browser.ie){H="formatblock";}if(I==this.STR_NONE){if((J&&J.tagName&&(J.tagName.toLowerCase().substring(0,1)=="h"))||(J&&J.parentNode&&J.parentNode.tagName&&(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"){J=J.parentNode;}if(this._isElement(J,"html")){return[false];}G=this._swapEl(E,"span",function(K){K.className="yui-non";});this._selectNode(G);this.currentElement[0]=G;}F=false;}else{if(this._isElement(E,"h1")||this._isElement(E,"h2")||this._isElement(E,"h3")||this._isElement(E,"h4")||this._isElement(E,"h5")||this._isElement(E,"h6")){G=this._swapEl(E,I);this._selectNode(G);this.currentElement[0]=G;}else{this._createCurrentElement(I);this._selectNode(this.currentElement[0]);}F=false;}return[F,H];},cmd_hiddenelements:function(E){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(H){var F=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var E=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=E;for(var G=1;G<this.currentElement.length;G++){this.currentElement[G].parentNode.removeChild(this.currentElement[G]);}F=false;}return[F];},cmd_script:function(K,J){var G=true,E=K.toLowerCase().substring(0,3),H=null,F=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(F,E)){H=this._swapEl(this.currentElement[0],"span",function(L){L.className="yui-non";});this._selectNode(H);}else{this._createCurrentElement(E);var I=this._swapEl(this.currentElement[0],E);this._selectNode(I);this.currentElement[0]=I;}G=false;}return G;},cmd_superscript:function(E){return[this.cmd_script("superscript",E)];},cmd_subscript:function(E){return[this.cmd_script("subscript",E)];},cmd_indent:function(H){var E=true,G=this._getSelectedElement(),I=null;if(this.browser.ie){if(this._isElement(G,"blockquote")){I=this._getDoc().createElement("blockquote");I.innerHTML=G.innerHTML;G.innerHTML="";G.appendChild(I);this._selectNode(I);}else{I=this._getDoc().createElement("blockquote");var F=this._getRange().htmlText;I.innerHTML=F;this._createCurrentElement("blockquote");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);this.currentElement[0]=I;this._selectNode(this.currentElement[0]);}E=false;}else{H="blockquote";}return[E,"formatblock",H];},cmd_outdent:function(I){var E=true,H=this._getSelectedElement(),J=null,F=null;if(this.browser.webkit||this.browser.ie){H=this._getSelectedElement();if(this._isElement(H,"blockquote")){var G=H.parentNode;if(this._isElement(H.parentNode,"blockquote")){G.innerHTML=H.innerHTML;this._selectNode(G);}else{F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;YAHOO.util.Dom.addClass(F,"yui-non");G.replaceChild(F,H);this._selectNode(F);}}else{}E=false;}else{I=false;}return[E,"outdent",I];},cmd_justify:function(E){if(this.browser.ie){if(this._hasSelection()){this._createCurrentElement("span");this._swapEl(this.currentElement[0],"div",function(F){F.style.textAlign=E;});return[false];}}return[true,"justify"+E,""];},cmd_justifycenter:function(){return[this.cmd_justify("center")];},cmd_justifyleft:function(){return[this.cmd_justify("left")];},cmd_justifyright:function(){return[this.cmd_justify("right")];},toString:function(){var E="Editor";if(this.get&&this.get("element_cont")){E="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorWindow=function(F,E){this.name=F.replace(" ","_");this.attrs=E;};YAHOO.widget.EditorWindow.prototype={header:null,body:null,footer:null,setHeader:function(E){this.header=E;},setBody:function(E){this.body=E;},setFooter:function(E){this.footer=E;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/element-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/element-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/element-min.js	(revision 24510)
@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;this.configure(b,true);}};YAHOO.util.Attribute.INVALID_VALUE={};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var a=this.value;if(this.getter){a=this.getter.call(this.owner,this.name,a);}return a;},setValue:function(f,b){var e,a=this.owner,c=this.name,g=YAHOO.util.Attribute.INVALID_VALUE,d={type:c,prevValue:this.getValue(),newValue:f};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(a,f)){return false;}if(!b){e=a.fireBeforeChangeEvent(d);if(e===false){return false;}}if(this.setter){f=this.setter.call(a,f,this.name);if(f===undefined){}if(f===g){return false;}}if(this.method){if(this.method.call(a,f,this.name)===g){return false;}}this.value=f;this._written=true;d.type=c;if(!b){this.owner.fireChangeEvent(d);}return true;},configure:function(b,c){b=b||{};if(c){this._written=false;}this._initialConfig=this._initialConfig||{};for(var a in b){if(b.hasOwnProperty(a)){this[a]=b[a];if(c){this._initialConfig[a]=b[a];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(a){this.setValue(this.value,a);}};(function(){var a=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(c){this._configs=this._configs||{};var b=this._configs[c];if(!b||!this._configs.hasOwnProperty(c)){return null;}return b.getValue();},set:function(d,e,b){this._configs=this._configs||{};var c=this._configs[d];if(!c){return false;}return c.setValue(e,b);},getAttributeKeys:function(){this._configs=this._configs;var c=[],b;for(b in this._configs){if(a.hasOwnProperty(this._configs,b)&&!a.isUndefined(this._configs[b])){c[c.length]=b;}}return c;},setAttributes:function(d,b){for(var c in d){if(a.hasOwnProperty(d,c)){this.set(c,d[c],b);}}},resetValue:function(c,b){this._configs=this._configs||{};if(this._configs[c]){this.set(c,this._configs[c]._initialConfig.value,b);return true;}return false;},refresh:function(e,c){this._configs=this._configs||{};var f=this._configs;e=((a.isString(e))?[e]:e)||this.getAttributeKeys();for(var d=0,b=e.length;d<b;++d){if(f.hasOwnProperty(e[d])){this._configs[e[d]].refresh(c);}}},register:function(b,c){this.setAttributeConfig(b,c);},getAttributeConfig:function(c){this._configs=this._configs||{};var b=this._configs[c]||{};var d={};for(c in b){if(a.hasOwnProperty(b,c)){d[c]=b[c];}}return d;},setAttributeConfig:function(b,c,d){this._configs=this._configs||{};c=c||{};if(!this._configs[b]){c.name=b;this._configs[b]=this.createAttribute(c);}else{this._configs[b].configure(c,d);}},configureAttribute:function(b,c,d){this.setAttributeConfig(b,c,d);},resetAttributeConfig:function(b){this._configs=this._configs||{};this._configs[b].resetConfig();},subscribe:function(b,c){this._events=this._events||{};if(!(b in this._events)){this._events[b]=this.createEvent(b);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(c){var b="before";b+=c.type.charAt(0).toUpperCase()+c.type.substr(1)+"Change";c.type=b;return this.fireEvent(c.type,c);},fireChangeEvent:function(b){b.type+="Change";return this.fireEvent(b.type,b);},createAttribute:function(b){return new YAHOO.util.Attribute(b,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var b=YAHOO.util.Dom,d=YAHOO.util.AttributeProvider,c={mouseenter:true,mouseleave:true};var a=function(e,f){this.init.apply(this,arguments);};a.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"mouseenter":true,"mouseleave":true,"focus":true,"blur":true,"submit":true,"change":true};a.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(g,e){var f=this.get("element");if(f){f[e]=g;}return g;},DEFAULT_HTML_GETTER:function(e){var f=this.get("element"),g;if(f){g=f[e];}return g;},appendChild:function(e){e=e.get?e.get("element"):e;return this.get("element").appendChild(e);},getElementsByTagName:function(e){return this.get("element").getElementsByTagName(e);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(e,f){e=e.get?e.get("element"):e;f=(f&&f.get)?f.get("element"):f;return this.get("element").insertBefore(e,f);},removeChild:function(e){e=e.get?e.get("element"):e;return this.get("element").removeChild(e);},replaceChild:function(e,f){e=e.get?e.get("element"):e;f=f.get?f.get("element"):f;return this.get("element").replaceChild(e,f);},initAttributes:function(e){},addListener:function(j,i,k,h){h=h||this;var e=YAHOO.util.Event,g=this.get("element")||this.get("id"),f=this;if(c[j]&&!e._createMouseDelegate){return false;}if(!this._events[j]){if(g&&this.DOM_EVENTS[j]){e.on(g,j,function(m,l){if(m.srcElement&&!m.target){m.target=m.srcElement;}if((m.toElement&&!m.relatedTarget)||(m.fromElement&&!m.relatedTarget)){m.relatedTarget=e.getRelatedTarget(m);}if(!m.currentTarget){m.currentTarget=g;}f.fireEvent(j,m,l);},k,h);}this.createEvent(j,{scope:this});}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(f,e){return this.unsubscribe.apply(this,arguments);},addClass:function(e){b.addClass(this.get("element"),e);},getElementsByClassName:function(f,e){return b.getElementsByClassName(f,e,this.get("element"));},hasClass:function(e){return b.hasClass(this.get("element"),e);},removeClass:function(e){return b.removeClass(this.get("element"),e);},replaceClass:function(f,e){return b.replaceClass(this.get("element"),f,e);
+},setStyle:function(f,e){return b.setStyle(this.get("element"),f,e);},getStyle:function(e){return b.getStyle(this.get("element"),e);},fireQueue:function(){var f=this._queue;for(var g=0,e=f.length;g<e;++g){this[f[g][0]].apply(this,f[g][1]);}},appendTo:function(f,g){f=(f.get)?f.get("element"):b.get(f);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:f});g=(g&&g.get)?g.get("element"):b.get(g);var e=this.get("element");if(!e){return false;}if(!f){return false;}if(e.parent!=f){if(g){f.insertBefore(e,g);}else{f.appendChild(e);}}this.fireEvent("appendTo",{type:"appendTo",target:f});return e;},get:function(e){var g=this._configs||{},f=g.element;if(f&&!g[e]&&!YAHOO.lang.isUndefined(f.value[e])){this._setHTMLAttrConfig(e);}return d.prototype.get.call(this,e);},setAttributes:function(l,h){var f={},j=this._configOrder;for(var k=0,e=j.length;k<e;++k){if(l[j[k]]!==undefined){f[j[k]]=true;this.set(j[k],l[j[k]],h);}}for(var g in l){if(l.hasOwnProperty(g)&&!f[g]){this.set(g,l[g],h);}}},set:function(f,h,e){var g=this.get("element");if(!g){this._queue[this._queue.length]=["set",arguments];if(this._configs[f]){this._configs[f].value=h;}return;}if(!this._configs[f]&&!YAHOO.lang.isUndefined(g[f])){this._setHTMLAttrConfig(f);}return d.prototype.set.apply(this,arguments);},setAttributeConfig:function(e,f,g){this._configOrder.push(e);d.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(f,e){this._events[f]=true;return d.prototype.createEvent.apply(this,arguments);},init:function(f,e){this._initElement(f,e);},destroy:function(){var e=this.get("element");YAHOO.util.Event.purgeElement(e,true);this.unsubscribeAll();if(e&&e.parentNode){e.parentNode.removeChild(e);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(g,f){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];f=f||{};f.element=f.element||g||null;var i=false;var e=a.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var h in e){if(e.hasOwnProperty(h)){this.DOM_EVENTS[h]=e[h];}}if(typeof f.element==="string"){this._setHTMLAttrConfig("id",{value:f.element});}if(b.get(f.element)){i=true;this._initHTMLElement(f);this._initContent(f);}YAHOO.util.Event.onAvailable(f.element,function(){if(!i){this._initHTMLElement(f);}this.fireEvent("available",{type:"available",target:b.get(f.element)});},this,true);YAHOO.util.Event.onContentReady(f.element,function(){if(!i){this._initContent(f);}this.fireEvent("contentReady",{type:"contentReady",target:b.get(f.element)});},this,true);},_initHTMLElement:function(e){this.setAttributeConfig("element",{value:b.get(e.element),readOnly:true});},_initContent:function(e){this.initAttributes(e);this.setAttributes(e,true);this.fireQueue();},_setHTMLAttrConfig:function(e,g){var f=this.get("element");g=g||{};g.name=e;g.setter=g.setter||this.DEFAULT_HTML_SETTER;g.getter=g.getter||this.DEFAULT_HTML_GETTER;g.value=g.value||f[e];this._configs[e]=new YAHOO.util.Attribute(g,this);}};YAHOO.augment(a,d);YAHOO.util.Element=a;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/featuredimagezoomer.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/featuredimagezoomer.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/featuredimagezoomer.js	(revision 24510)
@@ -0,0 +1,230 @@
+/*Featured Image Zoomer (May 8th, 2010)
+* This notice must stay intact for usage 
+* Author: Dynamic Drive at http://www.dynamicdrive.com/
+* Visit http://www.dynamicdrive.com/ for full source code
+*/
+
+// Feb 21st, 2011: Script updated to v1.5, which now includes new feature by jscheuer1 (http://www.dynamicdrive.com/forums/member.php?u=2033) to show optional "magnifying lens" while over thumbnail image.
+// March 1st, 2011: Script updated to v1.51. Minor improvements to inner workings of script.
+
+jQuery.noConflict()
+
+jQuery('head').append('<style type="text/css">.featuredimagezoomerhidden {visibility: hidden!important;}</style>');
+
+var featuredimagezoomer={
+	loadinggif: 'spinningred.gif', //full path or URL to "loading" gif
+	magnifycursor: 'crosshair', //Value for CSS's 'cursor' attribute, added to original image
+
+	/////NO NEED TO EDIT BEYOND HERE////////////////
+	dsetting: { //default settings
+			magnifierpos: 'right',
+			magnifiersize:[200, 200],
+			cursorshadecolor: '#fff',
+			cursorshadeopacity: 0.3,
+			cursorshadeborder: '1px solid black',
+			cursorshade: false,
+			leftoffset: 15, //offsets here are used (added to) the width of the magnifyarea when
+			rightoffset: 10 //calculating space requirements and to position it visa vis any drop shadow
+		},
+	isie: (function(){/*@cc_on @*//*@if(@_jscript_version >= 5)return true;@end @*/return false;})(), //is this IE?
+
+	showimage: function($, $tracker, $mag, showstatus){
+		var specs=$tracker.data('specs'), d=specs.magpos, fiz=this;
+		var coords=$tracker.data('specs').coords //get coords of tracker (from upper corner of document)
+		specs.windimensions={w:$(window).width(), h:$(window).height()}; //remember window dimensions
+		var magcoords={} //object to store coords magnifier DIV should move to
+		magcoords.left = coords.left + (d === 'left'? -specs.magsize.w - specs.lo : $tracker.width() + specs.ro);
+		//switch sides for magnifiers that don't have enough room to display on the right if there's room on the left:
+		if(d!=='left' && magcoords.left + specs.magsize.w + specs.lo >= specs.windimensions.w && coords.left - specs.magsize.w >= specs.lo){
+			magcoords.left = coords.left - specs.magsize.w - specs.lo;
+		} else if(d==='left' && magcoords.left < specs.ro) { //if there's no room on the left, move to the right
+			magcoords.left = coords.left + $tracker.width() + specs.ro;
+		}
+		$mag.css({left: magcoords.left, top:coords.top}).show(); //position magnifier DIV on page
+		specs.$statusdiv.html('Current Zoom: '+specs.curpower+'<div style="font-size:80%">Use Mouse Wheel to Zoom In/Out</div>');
+		if (showstatus) //show status DIV? (only when a range of zoom is defined)
+			fiz.showstatusdiv(specs, 400, 2000);
+	},
+
+	hideimage: function($tracker, $mag, showstatus){
+		var specs=$tracker.data('specs');
+		$mag.hide();
+		if (showstatus)
+			this.hidestatusdiv(specs);
+	},
+
+	showstatusdiv: function(specs, fadedur, showdur){
+		clearTimeout(specs.statustimer)
+		specs.$statusdiv.fadeIn(fadedur) //show status div
+		specs.statustimer=setTimeout(function(){featuredimagezoomer.hidestatusdiv(specs)}, showdur) //hide status div after delay
+	},
+
+	hidestatusdiv: function(specs){
+		specs.$statusdiv.stop(true, true).hide()
+	},
+
+	getboundary: function(b, val, specs){ //function to set x and y boundaries magnified image can move to (moved outside moveimage for efficiency)
+		if (b=="left"){
+			var rb=-specs.imagesize.w*specs.curpower+specs.magsize.w
+			return (val>0)? 0 : (val<rb)? rb : val
+		}
+		else{
+			var tb=-specs.imagesize.h*specs.curpower+specs.magsize.h
+			return (val>0)? 0 : (val<tb)? tb : val
+		}
+	},
+
+	moveimage: function($tracker, $maginner, $cursorshade, e){
+		var specs=$tracker.data('specs'), csw = Math.round(specs.magsize.w/specs.curpower), csh = Math.round(specs.magsize.h/specs.curpower),
+		csb = specs.csborder, fiz = this, imgcoords=specs.coords, pagex=(e.pageX || specs.lastpagex), pagey=(e.pageY || specs.lastpagey),
+		x=pagex-imgcoords.left, y=pagey-imgcoords.top;
+		$cursorshade.css({ // keep shaded area sized and positioned proportionately to area being magnified
+			visibility: '',
+			width: csw,
+			height: csh,
+			top: Math.min(specs.imagesize.h-csh-csb, Math.max(0, y-(csb+csh)/2)) + imgcoords.top,
+			left: Math.min(specs.imagesize.w-csw-csb, Math.max(0, x-(csb+csw)/2)) + imgcoords.left
+		});
+		var newx=-x*specs.curpower+specs.magsize.w/2 //calculate x coord to move enlarged image
+		var newy=-y*specs.curpower+specs.magsize.h/2
+		$maginner.css({left:fiz.getboundary('left', newx, specs), top:fiz.getboundary('top', newy, specs)})
+		specs.$statusdiv.css({left:pagex-10, top:pagey+20})
+		specs.lastpagex=pagex //cache last pagex value (either e.pageX or lastpagex), as FF1.5 returns undefined for e.pageX for "DOMMouseScroll" event
+		specs.lastpagey=pagey
+	},
+
+	magnifyimage: function($tracker, e, zoomrange){
+		var delta=e.detail? e.detail*(-120) : e.wheelDelta //delta returns +120 when wheel is scrolled up, -120 when scrolled down
+		var zoomdir=(delta<=-120)? "out" : "in"
+		var specs=$tracker.data('specs')
+		var magnifier=specs.magnifier, od=specs.imagesize, power=specs.curpower
+		var newpower=(zoomdir=="in")? Math.min(power+1, zoomrange[1]) : Math.max(power-1, zoomrange[0]) //get new power
+		var nd=[od.w*newpower, od.h*newpower] //calculate dimensions of new enlarged image within magnifier
+		magnifier.$image.css({width:nd[0], height:nd[1]})
+		specs.curpower=newpower //set current power to new power after magnification
+		specs.$statusdiv.html('Current Zoom: '+specs.curpower)
+		this.showstatusdiv(specs, 0, 500)
+		$tracker.trigger('mousemove')
+	},
+
+	init: function($, $img, options){
+		var setting=$.extend({}, this.dsetting, options), w = $img.width(), h = $img.height(), o = $img.offset(),
+		fiz = this, $tracker, $cursorshade, $statusdiv, $magnifier, lastpage = {pageX: 0, pageY: 0};
+		setting.largeimage = setting.largeimage || $img.get(0).src;
+		$magnifier=$('<div class="magnifyarea" style="position:absolute;width:'+setting.magnifiersize[0]+'px;height:'+setting.magnifiersize[1]+'px;left:-10000px;top:-10000px;visibility:hidden;overflow:hidden;border:1px solid black;" />')
+			.append('<div style="position:relative;left:0;top:0;" />')
+			.appendTo(document.body) //create magnifier container
+		//following lines - create featured image zoomer divs, and absolutely positioned them for placement over the thumbnail and each other:
+		if(setting.cursorshade){
+			$cursorshade = $('<div class="cursorshade" style="visibility:hidden;position:absolute;left:0;top:0;" />')
+				.css({border: setting.cursorshadeborder, opacity: setting.cursorshadeopacity, backgroundColor: setting.cursorshadecolor})
+				.appendTo(document.body);
+		} else { 
+			$cursorshade = $('<div />'); //dummy shade div to satisfy $tracker.data('specs')
+		}
+		$statusdiv = $('<div class="zoomstatus preloadevt" style="position:absolute;visibility:hidden;left:0;top:0;" />')
+			.html('<img src="'+this.loadinggif+'" />')
+			.appendTo(document.body); //create DIV to show "loading" gif/ "Current Zoom" info
+		$tracker = $('<div class="zoomtracker" style="cursor:progress;position:absolute;left:'+o.left+'px;top:'+o.top+'px;height:'+h+'px;width:'+w+'px;" />')
+			.css({backgroundImage: (this.isie? 'url(cannotbe)' : 'none')})
+			.appendTo(document.body);
+		$(window).resize(function(){ //in case resizing the window repostions the image
+				var o = $img.offset();
+				$tracker.css({left: o.left, top: o.top});
+			});
+
+		function getspecs($maginner, $bigimage){ //get specs function
+			var magsize={w:$magnifier.width(), h:$magnifier.height()}
+			var imagesize={w:w, h:h}
+			var power=(setting.zoomrange)? setting.zoomrange[0] : ($bigimage.width()/w).toFixed(5)
+			$tracker.data('specs', {
+				$statusdiv: $statusdiv,
+				statustimer: null,
+				magnifier: {$outer:$magnifier, $inner:$maginner, $image:$bigimage},
+				magsize: magsize,
+				magpos: setting.magnifierpos,
+				imagesize: imagesize,
+				curpower: power,
+				coords: getcoords(),
+				csborder: $cursorshade.outerWidth(),
+				lo: setting.leftoffset,
+				ro: setting.rightoffset
+			})
+		}
+
+		function getcoords(){ //get coords of thumb image function
+			var offset=$tracker.offset() //get image's tracker div's offset from document
+			return {left:offset.left, top:offset.top}
+		}
+
+		$tracker.mouseover(function(e){
+					$cursorshade.add($magnifier).add($statusdiv).removeClass('featuredimagezoomerhidden');
+					$tracker.data('premouseout', false);
+			}).mouseout(function(e){
+					$cursorshade.add($magnifier).add($statusdiv.not('.preloadevt')).addClass('featuredimagezoomerhidden');
+					$tracker.data('premouseout', true);
+			}).mousemove(function(e){ //save tracker mouse position for initial magnifier appearance, if needed
+				lastpage.pageX = e.pageX;
+				lastpage.pageY = e.pageY;
+			});
+
+		$tracker.one('mouseover', function(e){
+			var $maginner=$magnifier.find('div:eq(0)')
+			var $bigimage=$('<img src="'+setting.largeimage+'"/>').appendTo($maginner)
+			var showstatus=setting.zoomrange && setting.zoomrange[1]>setting.zoomrange[0]
+			$img.css({opacity:0.1}) //"dim" image while large image is loading
+			var imgcoords=getcoords()
+			$statusdiv.css({left:imgcoords.left+w/2-$statusdiv.width()/2, top:imgcoords.top+h/2-$statusdiv.height()/2, visibility:'visible'})
+			$bigimage.bind('loadevt', function(){ //magnified image ONLOAD event function (to be triggered later)
+				$img.css({opacity:1}) //restore thumb image opacity
+				$statusdiv.empty().css({border:'1px solid black', background:'#C0C0C0', padding:'4px', font:'bold 13px Arial', opacity:0.8}).hide().removeClass('preloadevt');
+				if($tracker.data('premouseout')){
+					$statusdiv.addClass('featuredimagezoomerhidden');
+				}
+				if (setting.zoomrange){ //if set large image to a specific power
+					var nd=[w*setting.zoomrange[0], h*setting.zoomrange[0]] //calculate dimensions of new enlarged image
+					$bigimage.css({width:nd[0], height:nd[1]})
+				}
+				getspecs($maginner, $bigimage) //remember various info about thumbnail and magnifier
+				$magnifier.css({display:'none', visibility:'visible'})
+				$tracker.mouseover(function(e){ //image onmouseover
+					$tracker.data('specs').coords=getcoords() //refresh image coords (from upper left edge of document)
+					fiz.showimage($, $tracker, $magnifier, showstatus)
+				})
+				$tracker.mousemove(function(e){ //image onmousemove
+					fiz.moveimage($tracker, $maginner, $cursorshade, e)
+				})
+				if (!$tracker.data('premouseout')){
+					fiz.showimage($, $tracker, $magnifier, showstatus);
+					fiz.moveimage($tracker, $maginner, $cursorshade, lastpage);
+				}
+				$tracker.mouseout(function(e){ //image onmouseout
+					fiz.hideimage($tracker, $magnifier, showstatus)
+				}).css({cursor: fiz.magnifycursor});
+				if (setting.zoomrange && setting.zoomrange[1]>setting.zoomrange[0]){ //if zoom range enabled
+					$tracker.bind('DOMMouseScroll mousewheel', function(e){
+						fiz.magnifyimage($tracker, e, setting.zoomrange);
+						e.preventDefault();
+					});
+				}
+			})	//end $bigimage onload
+			if ($bigimage.get(0).complete){ //if image has already loaded (account for IE, Opera not firing onload event if so)
+				$bigimage.trigger('loadevt')
+			}
+			else{
+				$bigimage.bind('load', function(){$bigimage.trigger('loadevt')})
+			}
+		})
+	},
+
+	iname: (function(){var itag = jQuery('<img />'), iname = itag.get(0).tagName; itag.remove(); return iname;})()
+};
+
+jQuery.fn.addimagezoom=function(options){
+	var $=jQuery;
+	return this.each(function(){ //return jQuery obj
+		if (this.tagName !== featuredimagezoomer.iname)
+			return true; //skip to next matched element
+		featuredimagezoomer.init($, $(this), options);
+	});
+}
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/menu-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/menu-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/menu-min.js	(revision 24510)
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){var K=YAHOO.env.ua,C=YAHOO.util.Dom,Z=YAHOO.util.Event,H=YAHOO.lang,T="DIV",P="hd",M="bd",O="ft",X="LI",A="disabled",D="mouseover",F="mouseout",U="mousedown",G="mouseup",V="click",B="keydown",N="keyup",I="keypress",L="clicktohide",S="position",Q="dynamic",Y="showdelay",J="selected",E="visible",W="UL",R="MenuManager";YAHOO.widget.MenuManager=function(){var l=false,d={},o={},h={},c={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent","focus":"focusEvent","focusin":"focusEvent","blur":"blurEvent","focusout":"blurEvent"},i=null;function b(r){var p,q;if(r&&r.tagName){switch(r.tagName.toUpperCase()){case T:p=r.parentNode;if((C.hasClass(r,P)||C.hasClass(r,M)||C.hasClass(r,O))&&p&&p.tagName&&p.tagName.toUpperCase()==T){q=p;}else{q=r;}break;case X:q=r;break;default:p=r.parentNode;if(p){q=b(p);}break;}}return q;}function e(t){var p=Z.getTarget(t),q=b(p),u=true,w=t.type,x,r,s,z,y;if(q){r=q.tagName.toUpperCase();if(r==X){s=q.id;if(s&&h[s]){z=h[s];y=z.parent;}}else{if(r==T){if(q.id){y=d[q.id];}}}}if(y){x=c[w];if(w=="click"&&(K.gecko&&y.platform!="mac")&&t.button>0){u=false;}if(u&&z&&!z.cfg.getProperty(A)){z[x].fire(t);}if(u){y[x].fire(t,z);}}else{if(w==U){for(var v in o){if(H.hasOwnProperty(o,v)){y=o[v];if(y.cfg.getProperty(L)&&!(y instanceof YAHOO.widget.MenuBar)&&y.cfg.getProperty(S)==Q){y.hide();if(K.ie&&p.focus&&(K.ie<9)){p.setActive();}}else{if(y.cfg.getProperty(Y)>0){y._cancelShowDelay();}if(y.activeItem){y.activeItem.blur();y.activeItem.cfg.setProperty(J,false);y.activeItem=null;}}}}}}}function n(q,p,r){if(d[r.id]){this.removeMenu(r);}}function k(q,p){var r=p[1];if(r){i=r;}}function f(q,p){i=null;}function a(r,q){var p=q[0],s=this.id;if(p){o[s]=this;}else{if(o[s]){delete o[s];}}}function j(q,p){m(this);}function m(q){var p=q.id;if(p&&h[p]){if(i==q){i=null;}delete h[p];q.destroyEvent.unsubscribe(j);}}function g(q,p){var s=p[0],r;if(s instanceof YAHOO.widget.MenuItem){r=s.id;if(!h[r]){h[r]=s;s.destroyEvent.subscribe(j);}}}return{addMenu:function(q){var p;if(q instanceof YAHOO.widget.Menu&&q.id&&!d[q.id]){d[q.id]=q;if(!l){p=document;Z.on(p,D,e,this,true);Z.on(p,F,e,this,true);Z.on(p,U,e,this,true);Z.on(p,G,e,this,true);Z.on(p,V,e,this,true);Z.on(p,B,e,this,true);Z.on(p,N,e,this,true);Z.on(p,I,e,this,true);Z.onFocus(p,e,this,true);Z.onBlur(p,e,this,true);l=true;}q.cfg.subscribeToConfigEvent(E,a);q.destroyEvent.subscribe(n,q,this);q.itemAddedEvent.subscribe(g);q.focusEvent.subscribe(k);q.blurEvent.subscribe(f);}},removeMenu:function(s){var q,p,r;if(s){q=s.id;if((q in d)&&(d[q]==s)){p=s.getItems();if(p&&p.length>0){r=p.length-1;do{m(p[r]);}while(r--);}delete d[q];if((q in o)&&(o[q]==s)){delete o[q];}if(s.cfg){s.cfg.unsubscribeFromConfigEvent(E,a);}s.destroyEvent.unsubscribe(n,s);s.itemAddedEvent.unsubscribe(g);s.focusEvent.unsubscribe(k);s.blurEvent.unsubscribe(f);}}},hideVisible:function(){var p;for(var q in o){if(H.hasOwnProperty(o,q)){p=o[q];if(!(p instanceof YAHOO.widget.MenuBar)&&p.cfg.getProperty(S)==Q){p.hide();}}}},getVisible:function(){return o;},getMenus:function(){return d;},getMenu:function(q){var p;if(q in d){p=d[q];}return p;},getMenuItem:function(q){var p;if(q in h){p=h[q];}return p;},getMenuItemGroup:function(t){var q=C.get(t),p,v,u,r,s;if(q&&q.tagName&&q.tagName.toUpperCase()==W){v=q.firstChild;if(v){p=[];do{r=v.id;if(r){u=this.getMenuItem(r);if(u){p[p.length]=u;}}}while((v=v.nextSibling));if(p.length>0){s=p;}}}return s;},getFocusedMenuItem:function(){return i;},getFocusedMenu:function(){var p;if(i){p=i.parent.getRoot();}return p;},toString:function(){return R;}};}();})();(function(){var AM=YAHOO.lang,Aq="Menu",G="DIV",K="div",Am="id",AH="SELECT",e="xy",R="y",Ax="UL",L="ul",AJ="first-of-type",k="LI",h="OPTGROUP",Az="OPTION",Ah="disabled",AY="none",y="selected",At="groupindex",i="index",O="submenu",Au="visible",AX="hidedelay",Ac="position",AD="dynamic",C="static",An=AD+","+C,Q="url",M="#",V="target",AU="maxheight",T="topscrollbar",x="bottomscrollbar",d="_",P=T+d+Ah,E=x+d+Ah,b="mousemove",Av="showdelay",c="submenuhidedelay",AF="iframe",w="constraintoviewport",A4="preventcontextoverlap",AO="submenualignment",Z="autosubmenudisplay",AC="clicktohide",g="container",j="scrollincrement",Aj="minscrollheight",A2="classname",Ag="shadow",Ar="keepopen",A0="hd",D="hastitle",p="context",u="",Ak="mousedown",Ae="keydown",Ao="height",U="width",AQ="px",Ay="effect",AE="monitorresize",AW="display",AV="block",J="visibility",z="absolute",AS="zindex",l="yui-menu-body-scrolled",AK="&#32;",A1=" ",Ai="mouseover",H="mouseout",AR="itemAdded",n="itemRemoved",AL="hidden",s="yui-menu-shadow",AG=s+"-visible",m=s+A1+AG;YAHOO.widget.Menu=function(A6,A5){if(A5){this.parent=A5.parent;this.lazyLoad=A5.lazyLoad||A5.lazyload;this.itemData=A5.itemData||A5.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,A6,A5);};function B(A6){var A5=false;if(AM.isString(A6)){A5=(An.indexOf((A6.toLowerCase()))!=-1);}return A5;}var f=YAHOO.util.Dom,AA=YAHOO.util.Event,Aw=YAHOO.widget.Module,AB=YAHOO.widget.Overlay,r=YAHOO.widget.Menu,A3=YAHOO.widget.MenuManager,F=YAHOO.util.CustomEvent,As=YAHOO.env.ua,Ap,AT=false,Ad,Ab=[["mouseOverEvent",Ai],["mouseOutEvent",H],["mouseDownEvent",Ak],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",Ae],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",AR],["itemRemovedEvent",n]],AZ={key:Au,value:false,validator:AM.isBoolean},AP={key:w,value:true,validator:AM.isBoolean,supercedes:[AF,"x",R,e]},AI={key:A4,value:true,validator:AM.isBoolean,supercedes:[w]},S={key:Ac,value:AD,validator:B,supercedes:[Au,AF]},A={key:AO,value:["tl","tr"]},t={key:Z,value:true,validator:AM.isBoolean,suppressEvent:true},Y={key:Av,value:250,validator:AM.isNumber,suppressEvent:true},q={key:AX,value:0,validator:AM.isNumber,suppressEvent:true},v={key:c,value:250,validator:AM.isNumber,suppressEvent:true},o={key:AC,value:true,validator:AM.isBoolean,suppressEvent:true},AN={key:g,suppressEvent:true},Af={key:j,value:1,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},N={key:Aj,value:90,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},X={key:AU,value:0,validator:AM.isNumber,supercedes:[AF],suppressEvent:true},W={key:A2,value:null,validator:AM.isString,suppressEvent:true},a={key:Ah,value:false,validator:AM.isBoolean,suppressEvent:true},I={key:Ag,value:true,validator:AM.isBoolean,suppressEvent:true,supercedes:[Au]},Al={key:Ar,value:false,validator:AM.isBoolean};
+function Aa(A5){Ad=AA.getTarget(A5);}YAHOO.lang.extend(r,AB,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_useHideDelay:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(A7,A6){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var A5;if(AM.isString(A7)){A5=f.get(A7);}else{if(A7.tagName){A5=A7;}}if(A5&&A5.tagName){switch(A5.tagName.toUpperCase()){case G:this.srcElement=A5;if(!A5.id){A5.setAttribute(Am,f.generateId());}r.superclass.init.call(this,A5);this.beforeInitEvent.fire(r);break;case AH:this.srcElement=A5;r.superclass.init.call(this,f.generateId());this.beforeInitEvent.fire(r);break;}}else{r.superclass.init.call(this,A7);this.beforeInitEvent.fire(r);}if(this.element){f.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if(!AT){AA.onFocus(document,Aa);AT=true;}if((As.gecko&&As.gecko<1.9)||(As.webkit&&As.webkit<523)){this.cfg.subscribeToConfigEvent(R,this._onYChange);}if(A6){this.cfg.applyConfig(A6,true);}A3.addMenu(this);this.initEvent.fire(r);}},_initSubTree:function(){var A6=this.srcElement,A5,A8,BB,BC,BA,A9,A7;if(A6){A5=(A6.tagName&&A6.tagName.toUpperCase());if(A5==G){BC=this.body.firstChild;if(BC){A8=0;BB=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case BB:this._aGroupTitleElements[A8]=BC;break;case Ax:this._aListElements[A8]=BC;this._aItemGroups[A8]=[];A8++;break;}}}while((BC=BC.nextSibling));if(this._aListElements[0]){f.addClass(this._aListElements[0],AJ);}}}BC=null;if(A5){switch(A5){case G:BA=this._aListElements;A9=BA.length;if(A9>0){A7=A9-1;do{BC=BA[A7].firstChild;if(BC){do{if(BC&&BC.tagName&&BC.tagName.toUpperCase()==k){this.addItem(new this.ITEM_TYPE(BC,{parent:this}),A7);}}while((BC=BC.nextSibling));}}while(A7--);}break;case AH:BC=A6.firstChild;do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case h:case Az:this.addItem(new this.ITEM_TYPE(BC,{parent:this}));break;}}}while((BC=BC.nextSibling));break;}}}},_getFirstEnabledItem:function(){var A5=this.getItems(),A9=A5.length,A8,A7;for(var A6=0;A6<A9;A6++){A8=A5[A6];if(A8&&!A8.cfg.getProperty(Ah)&&A8.element.style.display!=AY){A7=A8;break;}}return A7;},_addItemToGroup:function(BA,BB,BF){var BD,BG,A8,BE,A9,A6,A7,BC;function A5(BH,BI){return(BH[BI]||A5(BH,(BI+1)));}if(BB instanceof this.ITEM_TYPE){BD=BB;BD.parent=this;}else{if(AM.isString(BB)){BD=new this.ITEM_TYPE(BB,{parent:this});}else{if(AM.isObject(BB)){BB.parent=this;BD=new this.ITEM_TYPE(BB.text,BB);}}}if(BD){if(BD.cfg.getProperty(y)){this.activeItem=BD;}BG=AM.isNumber(BA)?BA:0;A8=this._getItemGroup(BG);if(!A8){A8=this._createItemGroup(BG);}if(AM.isNumber(BF)){A9=(BF>=A8.length);if(A8[BF]){A8.splice(BF,0,BD);}else{A8[BF]=BD;}BE=A8[BF];if(BE){if(A9&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].appendChild(BE.element);}else{A6=A5(A8,(BF+1));if(A6&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].insertBefore(BE.element,A6.element);}}BE.parent=this;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);this._updateItemProperties(BG);this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}else{A7=A8.length;A8[A7]=BD;BE=A8[A7];if(BE){if(!f.isAncestor(this._aListElements[BG],BE.element)){this._aListElements[BG].appendChild(BE.element);}BE.element.setAttribute(At,BG);BE.element.setAttribute(i,A7);BE.parent=this;BE.index=A7;BE.groupIndex=BG;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);if(A7===0){f.addClass(BE.element,AJ);}this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}}return BC;},_removeItemFromGroupByIndex:function(A8,A6){var A7=AM.isNumber(A8)?A8:0,A9=this._getItemGroup(A7),BB,BA,A5;if(A9){BB=A9.splice(A6,1);BA=BB[0];if(BA){this._updateItemProperties(A7);if(A9.length===0){A5=this._aListElements[A7];if(A5&&A5.parentNode){A5.parentNode.removeChild(A5);}this._aItemGroups.splice(A7,1);this._aListElements.splice(A7,1);A5=this._aListElements[0];if(A5){f.addClass(A5,AJ);}}this.itemRemovedEvent.fire(BA);this.changeContentEvent.fire();}}return BA;},_removeItemFromGroupByValue:function(A8,A5){var BA=this._getItemGroup(A8),BB,A9,A7,A6;if(BA){BB=BA.length;A9=-1;if(BB>0){A6=BB-1;do{if(BA[A6]==A5){A9=A6;break;}}while(A6--);if(A9>-1){A7=this._removeItemFromGroupByIndex(A8,A9);}}}return A7;},_updateItemProperties:function(A6){var A7=this._getItemGroup(A6),BA=A7.length,A9,A8,A5;if(BA>0){A5=BA-1;do{A9=A7[A5];if(A9){A8=A9.element;A9.index=A5;A9.groupIndex=A6;A8.setAttribute(At,A6);A8.setAttribute(i,A5);f.removeClass(A8,AJ);}}while(A5--);if(A8){f.addClass(A8,AJ);}}},_createItemGroup:function(A7){var A5,A6;if(!this._aItemGroups[A7]){this._aItemGroups[A7]=[];A5=document.createElement(L);this._aListElements[A7]=A5;A6=this._aItemGroups[A7];}return A6;},_getItemGroup:function(A7){var A5=AM.isNumber(A7)?A7:0,A8=this._aItemGroups,A6;if(A5 in A8){A6=A8[A5];}return A6;},_configureSubmenu:function(A5){var A6=A5.cfg.getProperty(O);if(A6){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,A6,true);this.renderEvent.subscribe(this._onParentMenuRender,A6,true);}},_subscribeToItemEvents:function(A5){A5.destroyEvent.subscribe(this._onMenuItemDestroy,A5,this);
+A5.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,A5,this);},_onVisibleChange:function(A7,A6){var A5=A6[0];if(A5){f.addClass(this.element,Au);}else{f.removeClass(this.element,Au);}},_cancelHideDelay:function(){var A5=this.getRoot()._hideDelayTimer;if(A5){A5.cancel();}},_execHideDelay:function(){this._cancelHideDelay();var A5=this.getRoot();A5._hideDelayTimer=AM.later(A5.cfg.getProperty(AX),this,function(){if(A5.activeItem){if(A5.hasFocus()){A5.activeItem.focus();}A5.clearActiveItem();}if(A5==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(Ac)==AD){this.hide();}});},_cancelShowDelay:function(){var A5=this.getRoot()._showDelayTimer;if(A5){A5.cancel();}},_execSubmenuHideDelay:function(A7,A6,A5){A7._submenuHideDelayTimer=AM.later(50,this,function(){if(this._nCurrentMouseX>(A6+10)){A7._submenuHideDelayTimer=AM.later(A5,A7,function(){this.hide();});}else{A7.hide();}});},_disableScrollHeader:function(){if(!this._bHeaderDisabled){f.addClass(this.header,P);this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){f.addClass(this.footer,E);this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){f.removeClass(this.header,P);this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){f.removeClass(this.footer,E);this._bFooterDisabled=false;}},_onMouseOver:function(BH,BA){var BI=BA[0],BE=BA[1],A5=AA.getTarget(BI),A9=this.getRoot(),BG=this._submenuHideDelayTimer,A6,A8,BD,A7,BC,BB;var BF=function(){if(this.parent.cfg.getProperty(y)){this.show();}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(A5==this.element||f.isAncestor(this.element,A5))){if(this._useHideDelay){this._cancelHideDelay();}this._nCurrentMouseX=0;AA.on(this.element,b,this._onMouseMove,this,true);if(!(BE&&f.isAncestor(BE.element,AA.getRelatedTarget(BI)))){this.clearActiveItem();}if(this.parent&&BG){BG.cancel();this.parent.cfg.setProperty(y,true);A6=this.parent.parent;A6._bHandledMouseOutEvent=true;A6._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(BE&&!BE.handledMouseOverEvent&&!BE.cfg.getProperty(Ah)&&(A5==BE.element||f.isAncestor(BE.element,A5))){A8=this.cfg.getProperty(Av);BD=(A8>0);if(BD){this._cancelShowDelay();}A7=this.activeItem;if(A7){A7.cfg.setProperty(y,false);}BC=BE.cfg;BC.setProperty(y,true);if(this.hasFocus()||A9._hasFocus){BE.focus();A9._hasFocus=false;}if(this.cfg.getProperty(Z)){BB=BC.getProperty(O);if(BB){if(BD){A9._showDelayTimer=AM.later(A9.cfg.getProperty(Av),BB,BF);}else{BB.show();}}}BE.handledMouseOverEvent=true;BE.handledMouseOutEvent=false;}}},_onMouseOut:function(BD,A7){var BE=A7[0],BB=A7[1],A8=AA.getRelatedTarget(BE),BC=false,BA,A9,A5,A6;if(!this._bStopMouseEventHandlers){if(BB&&!BB.cfg.getProperty(Ah)){BA=BB.cfg;A9=BA.getProperty(O);if(A9&&(A8==A9.element||f.isAncestor(A9.element,A8))){BC=true;}if(!BB.handledMouseOutEvent&&((A8!=BB.element&&!f.isAncestor(BB.element,A8))||BC)){if(!BC){BB.cfg.setProperty(y,false);if(A9){A5=this.cfg.getProperty(c);A6=this.cfg.getProperty(Av);if(!(this instanceof YAHOO.widget.MenuBar)&&A5>0&&A5>=A6){this._execSubmenuHideDelay(A9,AA.getPageX(BE),A5);}else{A9.hide();}}}BB.handledMouseOutEvent=true;BB.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent){if(this._didMouseLeave(A8)||BC){if(this._useHideDelay){this._execHideDelay();}AA.removeListener(this.element,b,this._onMouseMove);this._nCurrentMouseX=AA.getPageX(BE);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}}}},_didMouseLeave:function(A5){return(A5===this._shadow||(A5!=this.element&&!f.isAncestor(this.element,A5)));},_onMouseMove:function(A6,A5){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=AA.getPageX(A6);}},_onClick:function(BG,A7){var BH=A7[0],BB=A7[1],BD=false,A9,BE,A6,A5,BA,BC,BF;var A8=function(){A6=this.getRoot();if(A6 instanceof YAHOO.widget.MenuBar||A6.cfg.getProperty(Ac)==C){A6.clearActiveItem();}else{A6.hide();}};if(BB){if(BB.cfg.getProperty(Ah)){AA.preventDefault(BH);A8.call(this);}else{A9=BB.cfg.getProperty(O);BA=BB.cfg.getProperty(Q);if(BA){BC=BA.indexOf(M);BF=BA.length;if(BC!=-1){BA=BA.substr(BC,BF);BF=BA.length;if(BF>1){A5=BA.substr(1,BF);BE=YAHOO.widget.MenuManager.getMenu(A5);if(BE){BD=(this.getRoot()===BE.getRoot());}}else{if(BF===1){BD=true;}}}}if(BD&&!BB.cfg.getProperty(V)){AA.preventDefault(BH);if(As.webkit){BB.focus();}else{BB.focusEvent.fire();}}if(!A9&&!this.cfg.getProperty(Ar)){A8.call(this);}}}},_stopMouseEventHandlers:function(){this._bStopMouseEventHandlers=true;AM.later(10,this,function(){this._bStopMouseEventHandlers=false;});},_onKeyDown:function(BJ,BD){var BG=BD[0],BF=BD[1],BC,BH,A6,A9,BK,A5,BN,A8,BI,A7,BE,BM,BA,BB;if(this._useHideDelay){this._cancelHideDelay();}if(BF&&!BF.cfg.getProperty(Ah)){BH=BF.cfg;A6=this.parent;switch(BG.keyCode){case 38:case 40:BK=(BG.keyCode==38)?BF.getPreviousEnabledSibling():BF.getNextEnabledSibling();if(BK){this.clearActiveItem();BK.cfg.setProperty(y,true);BK.focus();if(this.cfg.getProperty(AU)>0||f.hasClass(this.body,l)){A5=this.body;BN=A5.scrollTop;A8=A5.offsetHeight;BI=this.getItems();A7=BI.length-1;BE=BK.element.offsetTop;if(BG.keyCode==40){if(BE>=(A8+BN)){A5.scrollTop=BE-A8;}else{if(BE<=BN){A5.scrollTop=0;}}if(BK==BI[A7]){A5.scrollTop=BK.element.offsetTop;}}else{if(BE<=BN){A5.scrollTop=BE-BK.element.offsetHeight;}else{if(BE>=(BN+A8)){A5.scrollTop=BE;}}if(BK==BI[0]){A5.scrollTop=0;}}BN=A5.scrollTop;BM=A5.scrollHeight-A5.offsetHeight;if(BN===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(BN==BM){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 39:BC=BH.getProperty(O);if(BC){if(!BH.getProperty(y)){BH.setProperty(y,true);}BC.show();BC.setInitialFocus();BC.setInitialSelection();}else{A9=this.getRoot();if(A9 instanceof YAHOO.widget.MenuBar){BK=A9.activeItem.getNextEnabledSibling();
+if(BK){A9.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 37:if(A6){BA=A6.parent;if(BA instanceof YAHOO.widget.MenuBar){BK=BA.activeItem.getPreviousEnabledSibling();if(BK){BA.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}else{this.hide();A6.focus();}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;}}if(BG.keyCode==27){if(this.cfg.getProperty(Ac)==AD){this.hide();if(this.parent){this.parent.focus();}else{BB=this._focusedElement;if(BB&&BB.focus){try{BB.focus();}catch(BL){}}}}else{if(this.activeItem){BC=this.activeItem.cfg.getProperty(O);if(BC&&BC.cfg.getProperty(Au)){BC.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty(y,false);}}}AA.preventDefault(BG);}},_onKeyPress:function(A7,A6){var A5=A6[0];if(A5.keyCode==40||A5.keyCode==38){AA.preventDefault(A5);}},_onBlur:function(A6,A5){if(this._hasFocus){this._hasFocus=false;}},_onYChange:function(A6,A5){var A8=this.parent,BA,A7,A9;if(A8){BA=A8.parent.body.scrollTop;if(BA>0){A9=(this.cfg.getProperty(R)-BA);f.setY(this.element,A9);A7=this.iframe;if(A7){f.setY(A7,A9);}this.cfg.setProperty(R,A9,true);}}},_onScrollTargetMouseOver:function(BB,BE){var BD=this._bodyScrollTimer;if(BD){BD.cancel();}this._cancelHideDelay();var A7=AA.getTarget(BB),A9=this.body,A8=this.cfg.getProperty(j),A5,A6;function BC(){var BF=A9.scrollTop;if(BF<A5){A9.scrollTop=(BF+A8);this._enableScrollHeader();}else{A9.scrollTop=A5;this._bodyScrollTimer.cancel();this._disableScrollFooter();}}function BA(){var BF=A9.scrollTop;if(BF>0){A9.scrollTop=(BF-A8);this._enableScrollFooter();}else{A9.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader();}}if(f.hasClass(A7,A0)){A6=BA;}else{A5=A9.scrollHeight-A9.offsetHeight;A6=BC;}this._bodyScrollTimer=AM.later(10,this,A6,null,true);},_onScrollTargetMouseOut:function(A7,A5){var A6=this._bodyScrollTimer;if(A6){A6.cancel();}this._cancelHideDelay();},_onInit:function(A6,A5){this.cfg.subscribeToConfigEvent(Au,this._onVisibleChange);var A7=!this.parent,A8=this.lazyLoad;if(((A7&&!A8)||(A7&&(this.cfg.getProperty(Au)||this.cfg.getProperty(Ac)==C))||(!A7&&!A8))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(A8){this.cfg.fireQueue();}}},_onBeforeRender:function(A8,A7){var A9=this.element,BC=this._aListElements.length,A6=true,BB=0,A5,BA;if(BC>0){do{A5=this._aListElements[BB];if(A5){if(A6){f.addClass(A5,AJ);A6=false;}if(!f.isAncestor(A9,A5)){this.appendToBody(A5);}BA=this._aGroupTitleElements[BB];if(BA){if(!f.isAncestor(A9,BA)){A5.parentNode.insertBefore(BA,A5);}f.addClass(A5,D);}}BB++;}while(BB<BC);}},_onRender:function(A6,A5){if(this.cfg.getProperty(Ac)==AD){if(!this.cfg.getProperty(Au)){this.positionOffScreen();}}},_onBeforeShow:function(A7,A6){var A9,BC,A8,BA=this.cfg.getProperty(g);if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()==AH){A9=this.itemData.length;for(BC=0;BC<A9;BC++){if(this.itemData[BC].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[BC])));}}}else{this.addItems(this.itemData);}}A8=this.srcElement;if(A8){if(A8.tagName.toUpperCase()==AH){if(f.inDocument(A8)){this.render(A8.parentNode);}else{this.render(BA);}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(BA);}}}var BB=this.parent,A5;if(!BB&&this.cfg.getProperty(Ac)==AD){this.cfg.refireEvent(e);}if(BB){A5=BB.parent.cfg.getProperty(AO);this.cfg.setProperty(p,[BB.element,A5[0],A5[1]]);this.align();}},getConstrainedY:function(BH){var BS=this,BO=BS.cfg.getProperty(p),BV=BS.cfg.getProperty(AU),BR,BG={"trbr":true,"tlbl":true,"bltl":true,"brtr":true},BA=(BO&&BG[BO[1]+BO[2]]),BC=BS.element,BW=BC.offsetHeight,BQ=AB.VIEWPORT_OFFSET,BL=f.getViewportHeight(),BP=f.getDocumentScrollTop(),BM=(BS.cfg.getProperty(Aj)+BQ<BL),BU,BD,BJ,BK,BF=false,BE,A7,BI=BP+BQ,A9=BP+BL-BW-BQ,A5=BH;var BB=function(){var BX;if((BS.cfg.getProperty(R)-BP)>BJ){BX=(BJ-BW);}else{BX=(BJ+BK);}BS.cfg.setProperty(R,(BX+BP),true);return BX;};var A8=function(){if((BS.cfg.getProperty(R)-BP)>BJ){return(A7-BQ);}else{return(BE-BQ);}};var BN=function(){var BX;if((BS.cfg.getProperty(R)-BP)>BJ){BX=(BJ+BK);}else{BX=(BJ-BC.offsetHeight);}BS.cfg.setProperty(R,(BX+BP),true);};var A6=function(){BS._setScrollHeight(this.cfg.getProperty(AU));BS.hideEvent.unsubscribe(A6);};var BT=function(){var Ba=A8(),BX=(BS.getItems().length>0),BZ,BY;if(BW>Ba){BZ=BX?BS.cfg.getProperty(Aj):BW;if((Ba>BZ)&&BX){BR=Ba;}else{BR=BV;}BS._setScrollHeight(BR);BS.hideEvent.subscribe(A6);BN();if(Ba<BZ){if(BF){BB();}else{BB();BF=true;BY=BT();}}}else{if(BR&&(BR!==BV)){BS._setScrollHeight(BV);BS.hideEvent.subscribe(A6);BN();}}return BY;};if(BH<BI||BH>A9){if(BM){if(BS.cfg.getProperty(A4)&&BA){BD=BO[0];BK=BD.offsetHeight;BJ=(f.getY(BD)-BP);BE=BJ;A7=(BL-(BJ+BK));BT();A5=BS.cfg.getProperty(R);}else{if(!(BS instanceof YAHOO.widget.MenuBar)&&BW>=BL){BU=(BL-(BQ*2));if(BU>BS.cfg.getProperty(Aj)){BS._setScrollHeight(BU);BS.hideEvent.subscribe(A6);BN();A5=BS.cfg.getProperty(R);}}else{if(BH<BI){A5=BI;}else{if(BH>A9){A5=A9;}}}}}else{A5=BQ+BP;}}return A5;},_onHide:function(A6,A5){if(this.cfg.getProperty(Ac)===AD){this.positionOffScreen();}},_onShow:function(BD,BB){var A5=this.parent,A7,A8,BA,A6;function A9(BF){var BE;if(BF.type==Ak||(BF.type==Ae&&BF.keyCode==27)){BE=AA.getTarget(BF);if(BE!=A7.element||!f.isAncestor(A7.element,BE)){A7.cfg.setProperty(Z,false);AA.removeListener(document,Ak,A9);AA.removeListener(document,Ae,A9);}}}function BC(BF,BE,BG){this.cfg.setProperty(U,u);this.hideEvent.unsubscribe(BC,BG);}if(A5){A7=A5.parent;if(!A7.cfg.getProperty(Z)&&(A7 instanceof YAHOO.widget.MenuBar||A7.cfg.getProperty(Ac)==C)){A7.cfg.setProperty(Z,true);
+AA.on(document,Ak,A9);AA.on(document,Ae,A9);}if((this.cfg.getProperty("x")<A7.cfg.getProperty("x"))&&(As.gecko&&As.gecko<1.9)&&!this.cfg.getProperty(U)){A8=this.element;BA=A8.offsetWidth;A8.style.width=BA+AQ;A6=(BA-(A8.offsetWidth-BA))+AQ;this.cfg.setProperty(U,A6);this.hideEvent.subscribe(BC,A6);}}if(this===this.getRoot()&&this.cfg.getProperty(Ac)===AD){this._focusedElement=Ad;this.focus();}},_onBeforeHide:function(A7,A6){var A5=this.activeItem,A9=this.getRoot(),BA,A8;if(A5){BA=A5.cfg;BA.setProperty(y,false);A8=BA.getProperty(O);if(A8){A8.hide();}}if(As.ie&&this.cfg.getProperty(Ac)===AD&&this.parent){A9._hasFocus=this.hasFocus();}if(A9==this){A9.blur();}},_onParentMenuConfigChange:function(A6,A5,A9){var A7=A5[0][0],A8=A5[0][1];switch(A7){case AF:case w:case AX:case Av:case c:case AC:case Ay:case A2:case j:case AU:case Aj:case AE:case Ag:case A4:case Ar:A9.cfg.setProperty(A7,A8);break;case AO:if(!(this.parent.parent instanceof YAHOO.widget.MenuBar)){A9.cfg.setProperty(A7,A8);}break;}},_onParentMenuRender:function(A6,A5,BB){var A8=BB.parent.parent,A7=A8.cfg,A9={constraintoviewport:A7.getProperty(w),xy:[0,0],clicktohide:A7.getProperty(AC),effect:A7.getProperty(Ay),showdelay:A7.getProperty(Av),hidedelay:A7.getProperty(AX),submenuhidedelay:A7.getProperty(c),classname:A7.getProperty(A2),scrollincrement:A7.getProperty(j),maxheight:A7.getProperty(AU),minscrollheight:A7.getProperty(Aj),iframe:A7.getProperty(AF),shadow:A7.getProperty(Ag),preventcontextoverlap:A7.getProperty(A4),monitorresize:A7.getProperty(AE),keepopen:A7.getProperty(Ar)},BA;if(!(A8 instanceof YAHOO.widget.MenuBar)){A9[AO]=A7.getProperty(AO);}BB.cfg.applyConfig(A9);if(!this.lazyLoad){BA=this.parent.element;if(this.element.parentNode==BA){this.render();}else{this.render(BA);}}},_onMenuItemDestroy:function(A7,A6,A5){this._removeItemFromGroupByValue(A5.groupIndex,A5);},_onMenuItemConfigChange:function(A7,A6,A5){var A9=A6[0][0],BA=A6[0][1],A8;switch(A9){case y:if(BA===true){this.activeItem=A5;}break;case O:A8=A6[0][1];if(A8){this._configureSubmenu(A5);}break;}},configVisible:function(A7,A6,A8){var A5,A9;if(this.cfg.getProperty(Ac)==AD){r.superclass.configVisible.call(this,A7,A6,A8);}else{A5=A6[0];A9=f.getStyle(this.element,AW);f.setStyle(this.element,J,Au);if(A5){if(A9!=AV){this.beforeShowEvent.fire();f.setStyle(this.element,AW,AV);this.showEvent.fire();}}else{if(A9==AV){this.beforeHideEvent.fire();f.setStyle(this.element,AW,AY);this.hideEvent.fire();}}}},configPosition:function(A7,A6,BA){var A9=this.element,A8=A6[0]==C?C:z,BB=this.cfg,A5;f.setStyle(A9,Ac,A8);if(A8==C){f.setStyle(A9,AW,AV);BB.setProperty(Au,true);}else{f.setStyle(A9,J,AL);}if(A8==z){A5=BB.getProperty(AS);if(!A5||A5===0){BB.setProperty(AS,1);}}},configIframe:function(A6,A5,A7){if(this.cfg.getProperty(Ac)==AD){r.superclass.configIframe.call(this,A6,A5,A7);}},configHideDelay:function(A6,A5,A7){var A8=A5[0];this._useHideDelay=(A8>0);},configContainer:function(A6,A5,A8){var A7=A5[0];if(AM.isString(A7)){this.cfg.setProperty(g,f.get(A7),true);}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);},_subscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.on(A6,Ai,A8,this,true);AA.on(A6,H,A7,this,true);AA.on(A5,Ai,A8,this,true);AA.on(A5,H,A7,this,true);},_unsubscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.removeListener(A6,Ai,A8);AA.removeListener(A6,H,A7);AA.removeListener(A5,Ai,A8);AA.removeListener(A5,H,A7);},_setScrollHeight:function(BF){var BC=BF,BB=false,BG=false,A8,A9,BE,A6,A5,BD,BA,A7;if(this.getItems().length>0){A8=this.element;A9=this.body;BE=this.header;A6=this.footer;A5=this.cfg.getProperty(Aj);if(BC>0&&BC<A5){BC=A5;}f.setStyle(A9,Ao,u);f.removeClass(A9,l);A9.scrollTop=0;BG=((As.gecko&&As.gecko<1.9)||As.ie);if(BC>0&&BG&&!this.cfg.getProperty(U)){BA=A8.offsetWidth;A8.style.width=BA+AQ;A7=(BA-(A8.offsetWidth-BA))+AQ;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,A7);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(U,this._clearSetWidthFlag);}if(BC>0&&(!BE&&!A6)){this.setHeader(AK);this.setFooter(AK);BE=this.header;A6=this.footer;f.addClass(BE,T);f.addClass(A6,x);A8.insertBefore(BE,A9);A8.appendChild(A6);}BD=BC;if(BE&&A6){BD=(BD-(BE.offsetHeight+A6.offsetHeight));}if((BD>0)&&(A9.offsetHeight>BC)){f.addClass(A9,l);f.setStyle(A9,Ao,(BD+AQ));if(!this._hasScrollEventHandlers){this._subscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=true;}this._disableScrollHeader();this._enableScrollFooter();BB=true;}else{if(BE&&A6){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,u);}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){this._unsubscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=false;}A8.removeChild(BE);A8.removeChild(A6);this.header=null;this.footer=null;BB=true;}}if(BB){this.cfg.refireEvent(AF);this.cfg.refireEvent(Ag);}}},_setMaxHeight:function(A6,A5,A7){this._setScrollHeight(A7);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(A6,A5,A7){var A8=A5[0];if(this.lazyLoad&&!this.body&&A8>0){this.renderEvent.subscribe(this._setMaxHeight,A8,this);}else{this._setScrollHeight(A8);}},configClassName:function(A7,A6,A8){var A5=A6[0];if(this._sClassName){f.removeClass(this.element,this._sClassName);}f.addClass(this.element,A5);this._sClassName=A5;},_onItemAdded:function(A6,A5){var A7=A5[0];if(A7){A7.cfg.setProperty(Ah,true);}},configDisabled:function(A7,A6,BA){var A9=A6[0],A5=this.getItems(),BB,A8;if(AM.isArray(A5)){BB=A5.length;if(BB>0){A8=BB-1;do{A5[A8].cfg.setProperty(Ah,A9);}while(A8--);}if(A9){this.clearActiveItem(true);f.addClass(this.element,Ah);this.itemAddedEvent.subscribe(this._onItemAdded);}else{f.removeClass(this.element,Ah);this.itemAddedEvent.unsubscribe(this._onItemAdded);
+}}},_sizeShadow:function(){var A6=this.element,A5=this._shadow;if(A5&&A6){if(A5.style.width&&A5.style.height){A5.style.width=u;A5.style.height=u;}A5.style.width=(A6.offsetWidth+6)+AQ;A5.style.height=(A6.offsetHeight+1)+AQ;}},_replaceShadow:function(){this.element.appendChild(this._shadow);},_addShadowVisibleClass:function(){f.addClass(this._shadow,AG);},_removeShadowVisibleClass:function(){f.removeClass(this._shadow,AG);},_removeShadow:function(){var A5=(this._shadow&&this._shadow.parentNode);if(A5){A5.removeChild(this._shadow);}this.beforeShowEvent.unsubscribe(this._addShadowVisibleClass);this.beforeHideEvent.unsubscribe(this._removeShadowVisibleClass);this.cfg.unsubscribeFromConfigEvent(U,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(Ao,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._replaceShadow);this.changeContentEvent.unsubscribe(this._sizeShadow);Aw.textResizeEvent.unsubscribe(this._sizeShadow);},_createShadow:function(){var A6=this._shadow,A5;if(!A6){A5=this.element;if(!Ap){Ap=document.createElement(K);Ap.className=m;}A6=Ap.cloneNode(false);A5.appendChild(A6);this._shadow=A6;this.beforeShowEvent.subscribe(this._addShadowVisibleClass);this.beforeHideEvent.subscribe(this._removeShadowVisibleClass);if(As.ie){AM.later(0,this,function(){this._sizeShadow();this.syncIframe();});this.cfg.subscribeToConfigEvent(U,this._sizeShadow);this.cfg.subscribeToConfigEvent(Ao,this._sizeShadow);this.cfg.subscribeToConfigEvent(AU,this._sizeShadow);this.changeContentEvent.subscribe(this._sizeShadow);Aw.textResizeEvent.subscribe(this._sizeShadow,this,true);this.destroyEvent.subscribe(function(){Aw.textResizeEvent.unsubscribe(this._sizeShadow,this);});}this.cfg.subscribeToConfigEvent(AU,this._replaceShadow);}},_shadowBeforeShow:function(){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);},configShadow:function(A6,A5,A7){var A8=A5[0];if(A8&&this.cfg.getProperty(Ac)==AD){if(this.cfg.getProperty(Au)){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}}else{this.beforeShowEvent.subscribe(this._shadowBeforeShow);}}else{if(!A8){this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);this._removeShadow();}}},initEvents:function(){r.superclass.initEvents.call(this);var A6=Ab.length-1,A7,A5;do{A7=Ab[A6];A5=this.createEvent(A7[1]);A5.signature=F.LIST;this[A7[0]]=A5;}while(A6--);},positionOffScreen:function(){var A6=this.iframe,A7=this.element,A5=this.OFF_SCREEN_POSITION;A7.style.top=u;A7.style.left=u;if(A6){A6.style.top=A5;A6.style.left=A5;}},getRoot:function(){var A7=this.parent,A6,A5;if(A7){A6=A7.parent;A5=A6?A6.getRoot():this;}else{A5=this;}return A5;},toString:function(){var A6=Aq,A5=this.id;if(A5){A6+=(A1+A5);}return A6;},setItemGroupTitle:function(BA,A9){var A8,A7,A6,A5;if(AM.isString(BA)&&BA.length>0){A8=AM.isNumber(A9)?A9:0;A7=this._aGroupTitleElements[A8];if(A7){A7.innerHTML=BA;}else{A7=document.createElement(this.GROUP_TITLE_TAG_NAME);A7.innerHTML=BA;this._aGroupTitleElements[A8]=A7;}A6=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[A6]){f.removeClass(this._aGroupTitleElements[A6],AJ);A5=A6;}}while(A6--);if(A5!==null){f.addClass(this._aGroupTitleElements[A5],AJ);}this.changeContentEvent.fire();}},addItem:function(A5,A6){return this._addItemToGroup(A6,A5);},addItems:function(A9,A8){var BB,A5,BA,A6,A7;if(AM.isArray(A9)){BB=A9.length;A5=[];for(A6=0;A6<BB;A6++){BA=A9[A6];if(BA){if(AM.isArray(BA)){A5[A5.length]=this.addItems(BA,A6);}else{A5[A5.length]=this._addItemToGroup(A8,BA);}}}if(A5.length){A7=A5;}}return A7;},insertItem:function(A5,A6,A7){return this._addItemToGroup(A7,A5,A6);},removeItem:function(A5,A7){var A8,A6;if(!AM.isUndefined(A5)){if(A5 instanceof YAHOO.widget.MenuItem){A8=this._removeItemFromGroupByValue(A7,A5);}else{if(AM.isNumber(A5)){A8=this._removeItemFromGroupByIndex(A7,A5);}}if(A8){A8.destroy();A6=A8;}}return A6;},getItems:function(){var A8=this._aItemGroups,A6,A7,A5=[];if(AM.isArray(A8)){A6=A8.length;A7=((A6==1)?A8[0]:(Array.prototype.concat.apply(A5,A8)));}return A7;},getItemGroups:function(){return this._aItemGroups;},getItem:function(A6,A7){var A8,A5;if(AM.isNumber(A6)){A8=this._getItemGroup(A7);if(A8){A5=A8[A6];}}return A5;},getSubmenus:function(){var A6=this.getItems(),BA=A6.length,A5,A7,A9,A8;if(BA>0){A5=[];for(A8=0;A8<BA;A8++){A9=A6[A8];if(A9){A7=A9.cfg.getProperty(O);if(A7){A5[A5.length]=A7;}}}}return A5;},clearContent:function(){var A9=this.getItems(),A6=A9.length,A7=this.element,A8=this.body,BD=this.header,A5=this.footer,BC,BB,BA;if(A6>0){BA=A6-1;do{BC=A9[BA];if(BC){BB=BC.cfg.getProperty(O);if(BB){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,BB);this.renderEvent.unsubscribe(this._onParentMenuRender,BB);}this.removeItem(BC,BC.groupIndex);}}while(BA--);}if(BD){AA.purgeElement(BD);A7.removeChild(BD);}if(A5){AA.purgeElement(A5);A7.removeChild(A5);}if(A8){AA.purgeElement(A8);A8.innerHTML=u;}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(U,null);},destroy:function(A5){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;r.superclass.destroy.call(this,A5);},setInitialFocus:function(){var A5=this._getFirstEnabledItem();if(A5){A5.focus();}},setInitialSelection:function(){var A5=this._getFirstEnabledItem();if(A5){A5.cfg.setProperty(y,true);}},clearActiveItem:function(A7){if(this.cfg.getProperty(Av)>0){this._cancelShowDelay();}var A5=this.activeItem,A8,A6;if(A5){A8=A5.cfg;if(A7){A5.blur();this.getRoot()._hasFocus=true;}A8.setProperty(y,false);A6=A8.getProperty(O);if(A6){A6.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var A5;if(this.hasFocus()){A5=A3.getFocusedMenuItem();if(A5){A5.blur();}}},hasFocus:function(){return(A3.getFocusedMenu()==this.getRoot());
+},_doItemSubmenuSubscribe:function(A6,A5,A8){var A9=A5[0],A7=A9.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},_doSubmenuSubscribe:function(A6,A5,A8){var A7=this.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},subscribe:function(){r.superclass.subscribe.apply(this,arguments);r.superclass.subscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.subscribe.apply(A6,arguments);}else{A8.cfg.subscribeToConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},unsubscribe:function(){r.superclass.unsubscribe.apply(this,arguments);r.superclass.unsubscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.unsubscribe.apply(A6,arguments);}else{A8.cfg.unsubscribeFromConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},initDefaultConfig:function(){r.superclass.initDefaultConfig.call(this);var A5=this.cfg;A5.addProperty(AZ.key,{handler:this.configVisible,value:AZ.value,validator:AZ.validator});A5.addProperty(AP.key,{handler:this.configConstrainToViewport,value:AP.value,validator:AP.validator,supercedes:AP.supercedes});A5.addProperty(AI.key,{value:AI.value,validator:AI.validator,supercedes:AI.supercedes});A5.addProperty(S.key,{handler:this.configPosition,value:S.value,validator:S.validator,supercedes:S.supercedes});A5.addProperty(A.key,{value:A.value,suppressEvent:A.suppressEvent});A5.addProperty(t.key,{value:t.value,validator:t.validator,suppressEvent:t.suppressEvent});A5.addProperty(Y.key,{value:Y.value,validator:Y.validator,suppressEvent:Y.suppressEvent});A5.addProperty(q.key,{handler:this.configHideDelay,value:q.value,validator:q.validator,suppressEvent:q.suppressEvent});A5.addProperty(v.key,{value:v.value,validator:v.validator,suppressEvent:v.suppressEvent});A5.addProperty(o.key,{value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});A5.addProperty(AN.key,{handler:this.configContainer,value:document.body,suppressEvent:AN.suppressEvent});A5.addProperty(Af.key,{value:Af.value,validator:Af.validator,supercedes:Af.supercedes,suppressEvent:Af.suppressEvent});A5.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A5.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A5.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A5.addProperty(a.key,{handler:this.configDisabled,value:a.value,validator:a.validator,suppressEvent:a.suppressEvent});A5.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A5.addProperty(Al.key,{value:Al.value,validator:Al.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='<em class="helptext">',a="<em>",I="</em>",W="<strong>",y="</strong>",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='<a href="#"></a>',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();
+AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW<AS;AW++){AR.addItem((new AR.ITEM_TYPE(AU[AW])));}}}}},configText:function(Aa,AT,AV){var AS=AT[0],AU=this.cfg,AY=this._oAnchor,AR=AU.getProperty(L),AZ=AJ,AW=AJ,AX=AJ;if(AS){if(AR){AZ=AN+AR+I;}if(AU.getProperty(A)){AW=a;AX=I;}if(AU.getProperty(N)){AW=W;AX=y;}AY.innerHTML=(AW+AS+AX+AZ);}},configHelpText:function(AT,AS,AR){this.cfg.refireEvent(AL);},configURL:function(AT,AS,AR){var AV=AS[0];if(!AV){AV=O;}var AU=this._oAnchor;if(k.opera){AU.removeAttribute(AE);}AU.setAttribute(AE,AV);},configTarget:function(AU,AT,AS){var AR=AT[0],AV=this._oAnchor;if(AR&&AR.length>0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AS=this,AR;if(!AS.cfg.getProperty(H)){AR=x.getFirstChild(AS.element);this._dispatchDOMClick(AR);}},_dispatchDOMClick:function(AS){var AR;if(k.ie&&k.ie<9){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;
+AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getNextSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getNextSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getFirstChildBy(AT.parentNode,AR);}AU=x.getFirstChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getNextEnabledSibling:function(){var AR=this.getNextSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;},getPreviousSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getPreviousSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getPreviousSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getLastChildBy(AT.parentNode,AR);}AU=x.getLastChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getPreviousEnabledSibling:function(){var AR=this.getPreviousSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getPreviousEnabledSibling():AR;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(K){this._removeEventHandlers();G.superclass.destroy.call(this,K);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);
+}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/mojomagnify.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/mojomagnify.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/mojomagnify.js	(revision 24510)
@@ -0,0 +1,400 @@
+/*
+ * MojoMagnify 0.1.10 - JavaScript Image Magnifier
+ * Copyright (c) 2008-2010 Jacob Seidelin, cupboy@gmail.com, http://blog.nihilogic.dk/
+ * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]
+ */
+
+
+var MojoMagnify = (function() {
+
+	var $ = function(id) {return document.getElementById(id);};
+	var dc = function(tag) {return document.createElement(tag);};
+
+	var isIE = !!document.all && !!window.attachEvent && !window.opera;
+
+	function addEvent(element, ev, handler) 
+	{
+		if (element.addEventListener) { 
+			element.addEventListener(ev, handler, false); 
+		} else if (element.attachEvent) { 
+			element.attachEvent("on" + ev, handler); 
+		}
+	}
+
+	function removeEvent(element, ev, handler) {
+		if (element.removeEventListener) { 
+			element.removeEventListener(ev, handler, false); 
+		} else if (element.detachEvent) { 
+			element.detachEvent("on" + ev, handler); 
+		}
+	}
+
+
+	function getElementPos(element)
+	{
+		var x = element.offsetLeft;
+		var y = element.offsetTop;
+		var parent = element.offsetParent;
+		while (parent) {
+			x += parent.offsetLeft - parent.scrollLeft;
+			y += parent.offsetTop - parent.scrollTop;
+			parent = parent.offsetParent;
+		}
+		return {
+			x : x,
+			y : y
+		}
+	}
+
+	function getEventMousePos(element, e) {
+		var scrollX = document.body.scrollLeft || document.documentElement.scrollLeft;
+		var scrollY = document.body.scrollTop || document.documentElement.scrollTop;
+
+		if (e.currentTarget) {
+			var pos = getElementPos(element);
+			return {
+				x : e.clientX - pos.x + scrollX,
+				y : e.clientY - pos.y + scrollY
+			}
+		}
+		return {
+			x : e.offsetX,
+			y : e.offsetY
+		}
+	}
+
+	function setZoomPos(img, x, y, pos) {
+		var zoomImg = img.__mojoMagnifyImage;
+		if (!zoomImg) return;
+
+		var full = img.__mojoMagnifyOptions.full;
+
+		img.__mojoMagnifyX = x;
+		img.__mojoMagnifyY = y;
+		img.__mojoMagnifyPos = pos;
+
+		var zoom = img.__mojoMagnifyZoomer;
+
+		var maskWidth = zoom.offsetWidth;
+		var maskHeight = zoom.offsetHeight;
+
+		var imgLeft = img.offsetLeft;
+		var imgTop = img.offsetTop;
+		
+		var w = img.offsetWidth ? img.offsetWidth : img.naturalWidth;
+		var h = img.offsetHeight ? img.offsetHeight : img.naturalHeight;
+
+		if (full) {
+			var fx = x / w;
+			var fy = y / h;
+
+			var dw = maskWidth - w;
+			var dh = maskHeight - h;
+
+			var left = -dw * fx; 
+			var top = -dh * fy;
+		} else {
+			var left = pos.x - maskWidth/2;
+			var top = pos.y - maskHeight/2;
+
+			if (!isIE) {
+				left -= imgLeft;
+				top -= imgTop;
+			}
+		}
+
+		zoom.style.left = left + "px";
+		zoom.style.top = top + "px";
+
+		var zoomWidth = zoomImg.offsetWidth ? zoomImg.offsetWidth : zoomImg.naturalWidth;
+		var zoomHeight = zoomImg.offsetHeight ? zoomImg.offsetHeight : zoomImg.naturalHeight;
+
+		if (full) {
+			var zx = 0;
+			var zy = 0;
+		} else {
+			var zoomXRatio = zoomWidth / w;
+			var zoomYRatio = zoomHeight / h;
+
+			var zoomX = Math.round(x * zoomXRatio);
+			var zoomY = Math.round(y * zoomYRatio);
+
+			var zx = -zoomX + maskWidth/2;
+			var zy = -zoomY + maskHeight/2;
+		}
+
+		zoomImg.style.left = zx + "px";
+		zoomImg.style.top = zy + "px";
+	}
+
+	function startAnimation(img) {
+		var options = img.__mojoMagnifyOptions;
+
+		if (img.__mojoMagnifyAnimTimer)
+			clearTimeout(img.__mojoMagnifyAnimTimer);
+		var step = 1;
+
+		var zoom = img.__mojoMagnifyZoomer;
+		var zoomImg = img.__mojoMagnifyImage;
+		var zoomBorder = img.__mojoMagnifyBorder;
+
+		var imgWidth = img.offsetWidth ? img.offsetWidth : img.naturalWidth;
+		var imgHeight = img.offsetHeight ? img.offsetHeight : img.naturalHeight;
+
+		var dw = img.__mojoMagnifyWidth - imgWidth;
+		var dh = img.__mojoMagnifyHeight - imgHeight;
+
+		var next = function() {
+			var w = imgWidth + dw * (step/10);
+			var h = imgHeight + dh * (step/10);
+
+			zoomBorder.style.width = w + "px";
+			zoomBorder.style.height = h + "px";
+			zoom.style.width = w + "px";
+			zoom.style.height = h + "px";
+			zoomImg.style.width = w + "px";
+			zoomImg.style.height = h + "px";
+
+			if (img.__mojoMagnifyPos) {
+				setZoomPos(img, img.__mojoMagnifyX, img.__mojoMagnifyY, img.__mojoMagnifyPos);
+			}
+
+			if (step < 10) {
+
+				step += 1;
+				img.__mojoMagnifyAnimTimer = setTimeout(next, 60);
+			} else {
+				img.__mojoMagnifyAnimTimer = 0;
+			}
+		}
+		next();
+	}
+
+
+	function makeMagnifiable(img, zoomSrc, opt) {
+		// just set the new zoom src if this img already has the Mojo structure setup
+		if (img.__mojoMagnifyImage) {
+			img.__mojoMagnifyImage.src = zoomSrc;
+			return;
+		}
+
+		var options = opt || {};
+
+		img.__mojoMagnifyOptions = options;
+
+		// make sure the image is loaded, if not then add an onload event and return
+		if (!img.complete && !img.__mojoMagnifyQueued) {
+			addEvent(img, "load", function() {
+				img.__mojoMagnifyQueued = true;
+				setTimeout(function() {
+					makeMagnifiable(img, zoomSrc);
+				}, 1);
+			});
+			return;
+		}
+
+		var w = img.offsetWidth ? img.offsetWidth : img.naturalWidth;
+		var h = img.offsetHeight ? img.offsetHeight : img.naturalHeight;
+		
+		var oldParent = img.parentNode;
+		if (oldParent.nodeName.toLowerCase() != "a") {
+			var linkParent = dc("a");
+			linkParent.setAttribute("href", zoomSrc);
+			oldParent.replaceChild(linkParent, img);
+			linkParent.appendChild(img);
+		} else {
+			var linkParent = oldParent;
+		}
+
+		linkParent.style.position = "relative";
+		linkParent.style.display = "block";
+		linkParent.style.width = w+"px";
+		linkParent.style.height = h+"px";
+
+		var imgLeft = img.offsetLeft;
+		var imgTop = img.offsetTop;
+
+		var zoom = dc("div");
+		zoom.className = "mojomagnify_zoom";
+		zoom.style.left = "-9999px";
+
+		var parent = img.parentNode;
+		var zoomImg = dc("img");
+		zoomImg.className = "mojomagnify_img";
+		zoomImg.style.position = "absolute";
+		zoomImg.style.maxWidth = "none";
+		zoomImg.style.maxHeight = "none";
+
+		if (isIE) { 
+			// IE won't let the mouse click pass through properly to the link,
+			// so we clone the link and use it for the zoom image as well. Do for all browsers, perhaps?
+			var zoomLink = dc("a");
+			zoomLink.setAttribute("href", linkParent.getAttribute("href"));
+			zoomLink.setAttribute("onclick", linkParent.getAttribute("onclick"));
+			zoomLink.style.position = "absolute";
+			zoomLink.style.left = "0px";
+			zoomLink.style.top = "0px";
+			zoomLink.appendChild(zoomImg);
+			zoom.appendChild(zoomLink);
+		} else {
+			zoom.appendChild(zoomImg);
+		}
+
+		var ctr = dc("div");
+		with (ctr.style) {
+			position = "absolute";
+			left = imgLeft+"px";
+			top = imgTop+"px";
+			width = w+"px";
+			height = h+"px";
+			overflow = "hidden";
+			display = "block";
+		}
+
+
+		ctr.appendChild(zoom);
+		parent.appendChild(ctr);
+
+		var zoomBorder = dc("div");
+		zoomBorder.className = "mojomagnify_border";
+		zoom.appendChild(zoomBorder);
+
+		var zoomInput = parent;
+
+		// clear old overlay
+		if (img.__mojoMagnifyOverlay)
+			parent.removeChild(img.__mojoMagnifyOverlay);
+		img.__mojoMagnifyOverlay = ctr;
+
+		// clear old high-res image
+		if (img.__mojoMagnifyImage && img.__mojoMagnifyImage.parentNode)
+			img.__mojoMagnifyImage.parentNode.removeChild(img.__mojoMagnifyImage);
+
+		img.__mojoMagnifyImage = zoomImg;
+		img.__mojoMagnifyZoomer = zoom;
+		img.__mojoMagnifyBorder = zoomBorder;
+
+		var isInImage = false;
+
+		function onMouseOut(e) {
+			e = e || window.event;
+
+			var target = e.target || e.srcElement;
+			if (!target) return;
+			if (target.nodeName != "DIV") return;
+			var relTarget = e.relatedTarget || e.toElement;
+			if (!relTarget) return;
+			while (relTarget != target && relTarget.nodeName != "BODY" && relTarget.parentNode) {
+				relTarget = relTarget.parentNode;
+			}
+			if (relTarget != target) {
+				isInImage = false;
+				ctr.style.display = "none";
+			}
+		};
+
+		function onMouseMove(e) {
+			e = e || window.event;
+			if (!isInImage) {
+				if (options.animate) {
+					startAnimation(img);
+				}
+			}
+			isInImage = true;
+	
+			ctr.style.display = "block";
+	
+			var pos = getEventMousePos(zoomInput, e);
+	
+			if (e.srcElement && isIE) {
+				if (e.srcElement == zoom) return;
+				if (e.srcElement != zoomInput) {
+					var zoomImgPos = getElementPos(e.srcElement);
+					var imgPos = getElementPos(img);
+					pos.x -= (imgPos.x - zoomImgPos.x);
+					pos.y -= (imgPos.y - zoomImgPos.y);
+				}
+			}
+	
+			var x = e.clientX - (getElementPos(img).x - (document.body.scrollLeft||document.documentElement.scrollLeft));
+			var y = e.clientY - (getElementPos(img).y - (document.body.scrollTop||document.documentElement.scrollTop));
+	
+			setZoomPos(img, x, y, pos);
+		}
+
+		addEvent(zoomImg, "load", function() {
+
+			addEvent(ctr, "mouseout", onMouseOut);
+			addEvent(ctr, "mouseleave", onMouseOut);
+			if (isIE) {
+				addEvent(document.body, "mouseover",
+					function(e) {
+						e = e || window.event;
+
+						if (isInImage && e.toElement != zoomImg) {
+							ctr.style.display = "none";
+						}
+					}
+				);
+			}
+
+			// try removing the event first so we don't get multiple handlers firing
+			removeEvent(zoomInput, "mousemove", onMouseMove);
+			addEvent(zoomInput, "mousemove", onMouseMove);
+
+			if (options.full) {
+				var maskWidth = zoomImg.offsetWidth;
+				var maskHeight = zoomImg.offsetHeight;
+				img.__mojoMagnifyWidth = maskWidth;
+				img.__mojoMagnifyHeight = maskHeight;
+				zoomBorder.style.width = maskWidth + "px";
+				zoomBorder.style.height = maskHeight + "px";
+				zoom.style.width = maskWidth + "px";
+				zoom.style.height = maskHeight + "px";
+			}
+
+			ctr.style.display = "none";
+		});
+
+		// I've no idea. Simply setting the src will make IE screw it self into a 100% CPU fest. In a timeout, it's ok.
+		setTimeout(function() { 
+			zoomImg.src = zoomSrc;
+		}, 1);
+	}
+
+	function setCoords(img, x, y) {
+		if (!img.__mojoMagnifyOverlay) return;
+		isInImage = true;
+		img.__mojoMagnifyOverlay.style.display = "block";
+		setZoomPos(img, x, y, { x : x, y : y });
+	}
+
+	function init() {
+		var images = document.getElementsByTagName("img");
+		var imgList = [];
+		for (var i=0;i<images.length;i++) {
+			imgList.push(images[i]);
+		}
+		for (var i=0;i<imgList.length;i++) {
+			var img = imgList[i];
+			var zoomSrc = img.getAttribute("data-magnifysrc");
+			if (zoomSrc) {
+				var opt = {
+					full : img.getAttribute("data-magnifyfull") === "true",
+					animate : img.getAttribute("data-magnifyanimate") === "true"
+				};
+				makeMagnifiable(img, zoomSrc, opt);
+			}
+		}
+	}
+
+	return {
+		addEvent : addEvent,
+		init : init,
+		makeMagnifiable : makeMagnifiable,
+		setCoords : setCoords
+	};
+
+})();
+
+MojoMagnify.addEvent(window, "load", MojoMagnify.init);
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yahoo-dom-event.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yahoo-dom-event.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yahoo-dom-event.js	(revision 24510)
@@ -0,0 +1,14 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
+}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
+if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
+if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
+if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
+/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
+if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
+}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yuiloader-min.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yuiloader-min.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/yuiloader-min.js	(revision 24510)
@@ -0,0 +1,11 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
+}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});YAHOO.util.Get=function(){var m={},k=0,r=0,l=false,n=YAHOO.env.ua,s=YAHOO.lang,q,d,e,i=function(x,t,y){var u=y||window,z=u.document,A=z.createElement(x),v;for(v in t){if(t.hasOwnProperty(v)){A.setAttribute(v,t[v]);}}return A;},h=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/css",rel:"stylesheet",href:u};if(t){s.augmentObject(w,t);}return i("link",w,v);},p=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/javascript",src:u};if(t){s.augmentObject(w,t);}return i("script",w,v);},a=function(t,u){return{tId:t.tId,win:t.win,data:t.data,nodes:t.nodes,msg:u,purge:function(){d(this.tId);}};},b=function(t,w){var u=m[w],v=(s.isString(t))?u.win.document.getElementById(t):t;if(!v){q(w,"target node not found: "+t);}return v;},c=function(w){YAHOO.log("Finishing transaction "+w);var u=m[w],v,t;u.finished=true;if(u.aborted){v="transaction "+w+" was aborted";q(w,v);return;}if(u.onSuccess){t=u.scope||u.win;u.onSuccess.call(t,a(u));}},o=function(v){YAHOO.log("Timeout "+v,"info","get");var u=m[v],t;if(u.onTimeout){t=u.scope||u;u.onTimeout.call(t,a(u));}},f=function(v,A){YAHOO.log("_next: "+v+", loaded: "+A,"info","Get");var u=m[v],D=u.win,C=D.document,B=C.getElementsByTagName("head")[0],x,y,t,E,z;if(u.timer){u.timer.cancel();}if(u.aborted){y="transaction "+v+" was aborted";q(v,y);return;}if(A){u.url.shift();if(u.varName){u.varName.shift();}}else{u.url=(s.isString(u.url))?[u.url]:u.url;if(u.varName){u.varName=(s.isString(u.varName))?[u.varName]:u.varName;}}if(u.url.length===0){if(u.type==="script"&&n.webkit&&n.webkit<420&&!u.finalpass&&!u.varName){z=p(null,u.win,u.attributes);z.innerHTML='YAHOO.util.Get._finalize("'+v+'");';u.nodes.push(z);B.appendChild(z);}else{c(v);}return;}t=u.url[0];if(!t){u.url.shift();YAHOO.log("skipping empty url");return f(v);}YAHOO.log("attempting to load "+t,"info","Get");if(u.timeout){u.timer=s.later(u.timeout,u,o,v);}if(u.type==="script"){x=p(t,D,u.attributes);}else{x=h(t,D,u.attributes);}e(u.type,x,v,t,D,u.url.length);u.nodes.push(x);if(u.insertBefore){E=b(u.insertBefore,v);if(E){E.parentNode.insertBefore(x,E);}}else{B.appendChild(x);}YAHOO.log("Appending node: "+t,"info","Get");if((n.webkit||n.gecko)&&u.type==="css"){f(v,t);}},j=function(){if(l){return;}l=true;var t,u;for(t in m){if(m.hasOwnProperty(t)){u=m[t];if(u.autopurge&&u.finished){d(u.tId);delete m[t];}}}l=false;},g=function(u,t,v){var x="q"+(k++),w;v=v||{};if(k%YAHOO.util.Get.PURGE_THRESH===0){j();}m[x]=s.merge(v,{tId:x,type:u,url:t,finished:false,aborted:false,nodes:[]});w=m[x];w.win=w.win||window;w.scope=w.scope||w.win;w.autopurge=("autopurge" in w)?w.autopurge:(u==="script")?true:false;w.attributes=w.attributes||{};w.attributes.charset=v.charset||w.attributes.charset||"utf-8";s.later(0,w,f,x);return{tId:x};};e=function(H,z,x,u,D,E,G){var F=G||f,B,t,I,v,J,A,C,y;if(n.ie){z.onreadystatechange=function(){B=this.readyState;if("loaded"===B||"complete"===B){YAHOO.log(x+" onload "+u,"info","Get");z.onreadystatechange=null;F(x,u);}};}else{if(n.webkit){if(H==="script"){if(n.webkit>=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onload "+u,"info","Get");F(x,u);});}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;C<A;C=C+1){J=J[I[C]];if(!J){this.attempts++;if(this.attempts++>this.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y);}else{YAHOO.log(I[C]+" failed, retrying");}return;}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u);},null,true);}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u]);}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u);};}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v));}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode;}}for(y=0;y<x;y=y+1){w=u[y];if(w.clearAttributes){w.clearAttributes();}else{for(B in w){if(w.hasOwnProperty(B)){delete w[B];}}}A.removeChild(w);}t.nodes=[];}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(t){YAHOO.log(t+" finalized ","info","Get");s.later(0,null,c,t);},abort:function(u){var v=(s.isString(u))?u:u.tId,t=m[v];if(t){YAHOO.log("Aborting "+v,"info","Get");t.aborted=true;}},script:function(t,u){return g("script",t,u);},css:function(t,u){return g("css",t,u);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.9.0",build:"2800"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after",VERSION="2.9.0";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":VERSION+"/build/","base":"http://yui.yahooapis.com/"+VERSION+"/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemath"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;
+i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}if(YUI.ArrayUtil.indexOf(m.requires,smod)==-1){m.requires.push(smod);}}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");
+var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}else{this.loadNext();}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[idx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data});}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data});}else{self._onFailure.call(self.varName+" reference failure");}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data});};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};self.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.insertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js");},scope:self},"js");return;}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=self.moduleInfo[s[i]];if(!m){self._onFailure("undefined module "+m);for(var j=0;j<self._xhr.length;j=j+1){self._xhr[j].abort();}return;}if(m.type!=="js"){self._loadCount++;continue;}url=m.fullpath;url=(url)?self._filter(url):self._url(m.path);var xhrData={success:success,failure:failure,scope:self,argument:[i,url,s[i]]};self._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}var self=this,donext=function(o){self.loadNext(o.data);},successfn,s=this.sorted,len=s.length,i,fn,m,url;if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){successfn=donext;this._loading=s[i];fn=(m.type==="css")?util.Get.css:util.Get.script;url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){successfn=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:successfn,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;
+},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.9.0",build:"2800"});
Index: main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/zoomer.jquery.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/zoomer.jquery.js	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/zoomer.jquery.js	(revision 24510)
@@ -0,0 +1,157 @@
+
+(function($) {
+  
+    $.anythingZoomer = {
+    
+        defaults: {
+            smallArea: "#small",
+            largeArea: "#large",
+            zoomPort: "#overlay",
+            mover: "#mover",
+            expansionSize: 30,
+            speedMultiplier: 1.5
+            
+        }
+            
+    }
+    
+    $.fn.extend({
+        anythingZoomer:function(config) {
+        
+            var config = $.extend({}, $.anythingZoomer.defaults, config); 
+            
+            var wrap = $(this);
+        
+            var smallArea = $(config.smallArea);
+            var largeArea = $(config.largeArea);
+            var zoomPort = $(config.zoomPort);
+            var mover = $(config.mover);
+            
+            var expansionSize = config.expansionSize;
+            var speedMultiplier = config.speedMultiplier;
+			
+			var over = false;
+            
+            function setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier) {
+            
+                smallArea
+                    .show();
+                    
+                zoomPort
+                    .fadeIn();
+                    
+                mover
+                    .css({
+                        width: mover.data("origWidth"),
+                        height: mover.data("origHeight"),
+                        overflow: "hidden",
+                        position: "absolute"
+                    })
+
+                wrap
+                    .css({
+                        //width: "auto"
+                    })
+            		.mousemove(function(e){
+            			var x = e.pageX - smallArea.offset().left;
+            			var y = e.pageY - smallArea.offset().top;
+            			
+            			if ( (x < -expansionSize) || (x > smallArea.width() + expansionSize) || (y < -expansionSize) || (y > smallArea.height() + expansionSize) ) {
+							if(over)
+							{
+								mover.fadeOut(50);
+								over = false;
+							}
+							return;
+            			}
+						else
+						{
+							if(!over)
+							{
+								mover.fadeIn();
+								over = true;
+							}
+						}
+            							
+            			mover.css({
+            				top: y - 50,
+            				left: x - 50
+            			});
+            			
+            			largeArea.css({
+            			
+            			    left: (-(e.pageX - smallArea.offset().left)*speedMultiplier)+expansionSize,
+            			    top: (-(e.pageY - smallArea.offset().top)*speedMultiplier)+expansionSize
+            			
+            			});
+            			
+            		})
+            		.dblclick(function() {
+            		
+                        expand(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+            
+            		});
+            
+            };
+            
+            function expand(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier) {
+            
+                  smallArea
+        		      .hide(); 
+        		      
+        		  zoomPort
+        		      .hide();       		      
+        		  
+        		  mover
+        		      .fadeIn()
+        		      .data("origWidth", mover.width())
+        		      .data("origHeight", mover.height())
+        		      .css({
+        		          position: "static",
+        		          height: "auto",
+        		          width: "auto",
+        			      overflow: "visible"
+        		      });
+        		      
+        		  wrap
+        		      .css({
+        		          width: "100%"
+        		      })
+        		      .unbind()
+        		      .dblclick(function(){
+        		          setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+        		      });
+        		      
+        		      
+        		  largeArea   
+        		      .css({
+        		          left: 0,
+        		          top: 0,
+        		          width: largeArea.data("origWidth")
+        		      });
+        		              
+            };
+            
+            mover
+		      .data("origWidth", mover.width())
+		      .data("origHeight", mover.height());
+		    
+		    // Because the largeArea is often hidden, the width() function returns zero, take width from CSS instead  
+		    largeArea
+		      .data("origWidth", largeArea.css("width"));
+
+            setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+        
+            return this;
+        
+        }
+        
+    });
+  
+})(jQuery);
+
+
+
+
+
+
Index: main/trunk/greenstone3/web/interfaces/oran/style/documentbasket.css
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/style/documentbasket.css	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/style/documentbasket.css	(revision 24510)
@@ -0,0 +1,110 @@
+#documentbasket {
+	min-height: 22px;
+	padding: 5px;
+	background: transparent url("../images/kete2.png") scroll repeat 0 0;
+	z-index:10;
+	font-size: 80%;
+	min-height: 2em;
+}
+
+#documenthandle {
+	cursor: move;
+	padding: 0;
+	margin: 0;
+	height: 30px;
+	width: auto;
+	background-color: #7f7;
+	display: none;
+}
+
+#documentpages {
+	text-align: left;
+	height: auto;
+	margin: 0;
+	padding: 0;
+	overflow: hidden;   
+}
+#trashbin {
+	float:right;
+}
+#documentpages img {
+	margin: 3px 2px;
+}
+
+#documentpagesFullViewLink {
+	display:block;
+	cursor: pointer;
+	text-align: left;
+
+	#doclist {
+
+	margin-bottom:0;
+}
+li.documentitem {
+   padding: 0;
+   margin: 0 ;
+   color: black;
+   font-size: 90%;
+}
+#urlcheck{
+ float: left;
+ padding: 0;
+ margin: 0;
+ 
+}
+
+.pick {
+  visibility:hidden;
+}
+.content{
+ font-family:sans-serif;
+ text-align:left;
+}
+.mailinput {
+  border:1px solid #2E8B57; 
+  width: 20em;
+  height: 1.5em;
+  font-size: 90%
+}
+
+.mailitem{
+   text-align: left;
+ }
+ 
+textarea#pretextarea {
+  font-family:sans-serif;
+  border:1px solid #2E8B57; 
+  width: 100%;
+  height: 25em;
+  font-size: 90%;
+  margin: 0.5em 0 0 0;
+  padding:0;
+}
+
+div#trashbin{
+   float: right;
+   height: 60px;
+   width:  55px;
+   padding: 0;
+   background: url("../images/trash-empty.png") 0 0 no-repeat;
+   margin:0;
+   z-index:10;
+}
+
+div#binhandle{
+ height: 60px;
+ width:  55px;
+ cursor: move;
+}
+
+span.extralink {
+  cursor:pointer;
+  font-size:80%;
+  font-weight:bold;
+  margin:0 2em 0 0;
+  color:black;
+}
+
+span.extralink:hover {
+   color: #2E8B57;
+}
Index: main/trunk/greenstone3/web/interfaces/oran/style/skin.css
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/style/skin.css	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/style/skin.css	(revision 24510)
@@ -0,0 +1,35 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+.yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%}.yui-skin-sam .yui-ac-input{position:absolute;width:100%}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#b3d4ff}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426fd9;color:#FFF}
+.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/split-button-arrow-disabled.png);}
+.yui-calcontainer{position:relative;float:left;_overflow:hidden}.yui-calcontainer iframe{position:absolute;border:0;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative}.yui-calcontainer .title{position:relative;z-index:1}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar{position:relative}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calheader{position:relative;width:100%;text-align:center}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:0;background-color:transparent;cursor:pointer}.yui-calendar .calbody a:hover{background:inherit}p#clear{clear:left;padding-top:10px}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:0;padding:10px 5px 10px 5px;margin:0}.yui-skin-sam .yui-calcontainer .title{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0}.yui-skin-sam .yui-calcontainer .calclose{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:0;vertical-align:middle;padding:0}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center}.yui-skin-sam .yui-calendar .calheader img{border:0}.yui-skin-sam .yui-calendar .calnavleft{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calnavright{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:0}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:0}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#ccc;color:#a6a6a6;cursor:default}.yui-skin-sam .yui-calendar td.calcell.oom a{color:#a6a6a6}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#a0a0a0;cursor:pointer}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#edf5ff;border-top:1px solid black;display:none}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold}
+.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#ffee69;border:1px solid #000}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1400px}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff}
+.yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;}
+.yui-picker-panel{background:#e3e3e3;border-color:#888}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px}.yui-picker{position:relative}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute}.yui-picker-hue-bg{-moz-outline:0;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/hue_bg.png) no-repeat;top:4px}.yui-picker-bg{-moz-outline:0;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/picker_mask.png)}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/picker_mask.png',sizingMethod='scale')}.yui-picker-mask{position:absolute;z-index:1;top:0;left:0}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace}.yui-picker-controls .hd{background:transparent;border-width:0!important}.yui-picker-controls .bd{height:100px;border-width:0!important}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:.85em;width:2.4em}.yui-picker-hex-controls{clear:both;padding:2px}.yui-picker-hex-controls input{width:4.6em}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000}
+.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2}.yui-panel{position:relative}.yui-panel-container form{margin:0}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0}.mask.block-scrollbars{overflow:auto}.masked select,.drag select,.hide-select select{_visibility:hidden}.yui-panel-container select{_visibility:inherit}.hide-scrollbars,.hide-scrollbars *{overflow:hidden}.hide-scrollbars select{display:none}.show-scrollbars{overflow:auto}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none}.yui-tt-shadow{position:absolute}.yui-override-padding{padding:0!important}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#f2f2f2}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px}.yui-skin-sam .yui-panel .bd{padding:10px}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12)}.yui-skin-sam .yui-dialog .ft{border-top:0;padding:0 10px 10px 10px;font-size:100%}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#d4c237 #A6982b #a6982b #A6982B;border-width:1px;border-style:solid;background-color:#ffee69}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12)}
+.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500}.yui-dt-tmp{position:absolute;left:-9000px}.yui-dt-scrollable .yui-dt-bd{overflow:auto}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px}.yui-dt-scrollable tbody{-moz-outline:0}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer}.yui-skin-sam thead .yui-dt-draggable{cursor:move}.yui-dt-coltarget{position:absolute;z-index:999}.yui-dt-hd{zoom:1}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none}.yui-dt-editor,.yui-dt-editor-shim{position:absolute;z-index:9000}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7f7f7f}.yui-skin-sam .yui-dt thead{border-spacing:0}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center}.yui-skin-sam .yui-dt th{background:#d8d8da url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb}.yui-skin-sam .yui-dt tr.yui-dt-first td{border-top:1px solid #7f7f7f}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb;text-align:left}.yui-skin-sam .yui-dt-list td{border-right:0}.yui-skin-sam .yui-dt-resizer{width:6px}.yui-skin-sam .yui-dt-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-dt-message{background-color:#FFF}.yui-skin-sam .yui-dt-scrollable table{border:0}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7f7f7f;border-top:1px solid #7f7f7f;border-right:1px solid #7f7f7f}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7f7f7f;border-bottom:1px solid #7f7f7f;border-right:1px solid #7f7f7f;background-color:#FFF}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7f7f7f}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -100px}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/dt-arrow-up.png) no-repeat right}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/dt-arrow-dn.png) no-repeat right}tbody .yui-dt-editable{cursor:pointer}.yui-dt-editor{text-align:left;background-color:#f2f2f2;border:1px solid #808080;padding:6px}.yui-dt-editor label{padding-left:4px;padding-right:6px}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right}.yui-dt-editor .yui-dt-button button{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1400px;background-color:#5584e0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1300px;color:#000}.yui-dt-editor .yui-dt-button button:active{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1700px;color:#000}.yui-skin-sam tr.yui-dt-even{background-color:#FFF}.yui-skin-sam tr.yui-dt-odd{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#dbeaff}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#edf5ff}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#b2d2ff}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#b2d2ff}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446cd7}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446cd7}
+.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426fd9;color:#FFF}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446cd7;color:#FFF}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none}.yui-skin-sam a.yui-dt-page{border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff}
+.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;}
+.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}
+.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;}
+.yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;border:0;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;}
+.yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{text-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{display:none;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize .yui-resize-handle-active{zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-right .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;margin:0;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0;display:block;background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px 0;zoom:1;}
+.yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto}.yui-skin-sam .yui-log p{margin:1px;padding:.1em}.yui-skin-sam .yui-log pre{margin:0;padding:0}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em}.yui-skin-sam .yui-log .info{background-color:#a7cc25}.yui-skin-sam .yui-log .warn{background-color:#f58516}.yui-skin-sam .yui-log .error{background-color:#e32f0b}.yui-skin-sam .yui-log .time{background-color:#a6c9d7}.yui-skin-sam .yui-log .window{background-color:#f2e886}
+.yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubaritemlabel:visited{color:#000;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel:visited{color:#000;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled,.yui-skin-sam .yuimenuitemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/menuitem_checkbox_disabled.png);}
+.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1}.yui-skin-sam .yui-pg-pages{padding:0}.yui-skin-sam .yui-pg-current{padding:3px 0}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:0;font-weight:bold;padding:3px 6px}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em}
+.yui-skin-sam .yui-pv{background-color:#4a4a4a;font-family:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;}
+.yui-pb-bar,.yui-pb-mask{width:100%;height:100%}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:0;margin:0;text-align:left}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute}.yui-pb-tl{background-position:top left}.yui-pb-tr{background-position:top right;left:50%}.yui-pb-bl{background-position:bottom left;top:50%}.yui-pb-br{background-position:bottom right;left:50%;top:50%}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1}.yui-pb-ltr .yui-pb-bar{_position:static}.yui-pb-rtl .yui-pb-bar{background-position:right}.yui-pb-btt .yui-pb-bar{background-position:left bottom}.yui-pb-bar{background-color:blue}.yui-pb{border:thin solid #808080}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/back-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/back-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-bar{background-color:transparent}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bar-h.png);background-repeat:repeat-x}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bar-v.png);background-repeat:repeat-y}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto}.yui-skin-sam .yui-pb-range{color:#a6a6a6}
+.yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png);background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png);background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png);background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout_sprite.png);background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;}
+.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;font-size:0;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block;right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:.25em 0 .25em .25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;}
+.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;_top:-5px;width:24px;text-indent:52px;font-size:0;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0;text-indent:0;font-size:75%;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px!important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -350px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}
+.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}
+.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;position:absolute;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;_width:198px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-sprite.gif) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/editor-knob.gif) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#fff;}.yui-editor-blankimage{background-image:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;}.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;}
+.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em}.yui-navset-right{padding:0 6em 0 0}.yui-navset-top,.yui-navset-bottom{padding:auto}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none}.yui-navset li em{font-style:normal}.yui-navset{position:relative;zoom:1}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1}.yui-navset .yui-content:after{content:'';display:block;clear:both}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block}.yui-navset .yui-nav a{position:relative}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block}.yui-navset-bottom .yui-nav li a{vertical-align:text-top}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px}
+.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356}
+table.ygtvtable{margin-bottom:0;border:0;border-collapse:collapse}td.ygtvcell{border:0;padding:0}a.ygtvspacer{text-decoration:none;outline-style:none;display:block}.ygtvtn{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -4000px no-repeat}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -4800px no-repeat}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -6400px no-repeat}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -7200px no-repeat}.ygtvln{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 0 no-repeat}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -800px no-repeat}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -2400px no-repeat}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer}.ygtvloading{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-loading.gif) 0 0 no-repeat}.ygtvdepthcell{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8000px no-repeat}.ygtvblankdepthcell{width:18px;height:22px}* html .ygtvchildren{height:2%}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer}.ygtvcontent{cursor:default}.ygtvspacer{height:22px;width:18px}.ygtvfocus{background-color:#c0e0e0;border:0}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0}.ygtvfocus a{outline-style:none}.ygtvok{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8800px no-repeat}.ygtvok:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8844px no-repeat}.ygtvcancel{width:18px;height:22px;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8822px no-repeat}.ygtvcancel:hover{background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/treeview-sprite.gif) 0 -8866px no-repeat}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000}.ygtv-edit-TextNode{width:190px}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:0}.ygtv-edit-TextNode .ygtv-button-container{float:right}.ygtv-edit-TextNode .ygtv-input input{width:140px}.ygtv-edit-DateNode .ygtvcancel{border:0}.ygtv-edit-DateNode .ygtvok{display:none}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0}.ygtv-highlight .ygtvcontent{padding-right:1em}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check0.gif) no-repeat}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check1.gif) no-repeat}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/check2.gif) no-repeat}
+
Index: main/trunk/greenstone3/web/interfaces/oran/transform/config_format.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/config_format.xsl	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/config_format.xsl	(revision 24510)
@@ -104,18 +104,18 @@
 							<xslt:attribute name="href">
 								<xslt:value-of select='$library_name'/>
-								<xsl:text>?a=d&amp;ed=1&amp;book=off&amp;c=</xsl:text>
+								<xsl:text disable-output-escaping="yes">?a=d&amp;ed=1&amp;book=off&amp;c=</xsl:text>
 								<xslt:value-of select='/page/pageResponse/collection/@name'/>
-								<xsl:text>&amp;d=</xsl:text>
+								<xsl:text disable-output-escaping="yes">&amp;d=</xsl:text>
 								<xslt:value-of select='@nodeID'/>
-								<xsl:text>&amp;dt=</xsl:text>
+								<xsl:text disable-output-escaping="yes">&amp;dt=</xsl:text>
 								<xslt:value-of select='@docType'/>
 								<xslt:if test="@nodeType='leaf'">
-									<xsl:text>&amp;sib=1</xsl:text>
+									<xsl:text disable-output-escaping="yes">&amp;sib=1</xsl:text>
 								</xslt:if>
-								<xsl:text>&amp;p.a=</xsl:text>
+								<xsl:text disable-output-escaping="yes">&amp;p.a=</xsl:text>
 								<xslt:value-of select="/page/pageRequest/@action"/>
-								<xsl:text>&amp;p.sa=</xsl:text>
+								<xsl:text disable-output-escaping="yes">&amp;p.sa=</xsl:text>
 								<xsl:value-of select="/page/pageRequest/@subaction"/>
-								<xsl:text>&amp;p.s=</xsl:text>
+								<xsl:text disable-output-escaping="yes">&amp;p.s=</xsl:text>
 								<xslt:value-of select="/page/pageResponse/service/@name"/>
 							</xslt:attribute>
@@ -134,5 +134,5 @@
 			</xsl:when>
 			<xsl:when test="@type='document'">
-				<img style="border:0px"><xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_icon_image')"/></xsl:attribute></img> 
+				<img style="border:0px"><xslt:attribute name="id">documentBasketBook<xslt:value-of select="/page/pageResponse/collection/@name"/>:<xslt:value-of select="@nodeID"/></xslt:attribute><xslt:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_icon_image')"/></xslt:attribute></img> 
 			</xsl:when>
 		</xsl:choose>
Index: main/trunk/greenstone3/web/interfaces/oran/transform/javascript-global-setup.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/javascript-global-setup.xsl	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/javascript-global-setup.xsl	(revision 24510)
@@ -94,4 +94,5 @@
 			<xsl:text disable-output-escaping="yes">gs.imageURLs.loading = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'loading_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text>
 			<xsl:text disable-output-escaping="yes">gs.imageURLs.pageIcon = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_icon_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text>
+			<xsl:text disable-output-escaping="yes">gs.imageURLs.trashFull = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'trash_full_image')"/><xsl:text disable-output-escaping="yes">";</xsl:text>
 		</script>
 	</xsl:template>
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 24510)
@@ -21,12 +21,19 @@
 	<xsl:template match="/page/pageResponse">
 		<xsl:call-template name="classifierLoadScript"/>
-		<!-- this right sidebar -->
-		<xsl:if test="$berryBasketOn">
-			<div id="rightSidebar">
-				<!-- show the berry basket if it's turned on -->
-				<gslib:berryBasket/>
-				<xsl:text> </xsl:text>
-			</div>
-		</xsl:if>
+			<!-- this right sidebar -->
+			<xsl:if test="$berryBasketOn or $documentBasketOn">
+				<div id="rightSidebar">
+					<xsl:if test="$berryBasketOn">
+						<!-- show the berry basket if it's turned on -->
+						<gslib:berryBasket/>
+						<xsl:text> </xsl:text>
+					</xsl:if>
+
+					<xsl:if test="$documentBasketOn">
+						<gslib:documentBasket/>
+						<xsl:text> </xsl:text>
+					</xsl:if>
+	            </div>
+			</xsl:if>
 	
 		<!--
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 24510)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl	(revision 24510)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:java="http://xml.apache.org/xslt/java"
+	xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util gsf">
+
+	<!-- use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+	
+	<!-- set page title -->
+	<xsl:template name="pageTitle">Document Basket</xsl:template>
+	
+	<!-- set page breadcrumbs -->
+	<xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> 
+	<gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
+
+	<!-- the page content -->
+	<xsl:template match="/page">
+		<xsl:for-each select="//item">
+			<input type="checkbox" align="center">
+				<xsl:attribute name="id">
+					<xsl:text>doc</xsl:text>
+					<xsl:value-of select="position()"/>
+				</xsl:attribute>
+				
+				<xsl:attribute name="value">
+					<xsl:value-of select="@name"/>
+				</xsl:attribute>
+			</input>
+			<xsl:value-of select="position()"/><xsl:text>. </xsl:text>
+			
+			<a>  
+				<xsl:attribute name="href">   
+					<xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@name"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1
+				</xsl:attribute>
+				<xsl:value-of select="@title"/>
+			</a>
+			<br />
+		</xsl:for-each>
+	</xsl:template>
+
+</xsl:stylesheet>  
+
+
+
Index: main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl	(revision 24510)
@@ -178,4 +178,17 @@
 					<br class="clear"/>
 				</div>
+				
+				<!-- document maker -->
+				<div id="documentmakerprefs">
+					<xsl:variable name="documentbasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='documentbasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='documentbasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+					<div class="paramLabel">Document Maker</div>
+					<div class="paramValue">
+						<select name="documentbasket">
+							<option value="on"><xsl:if test="$documentbasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
+							<option value="off"><xsl:if test="$documentbasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
+						</select>
+					</div>
+					<br class="clear"/>
+				</div>
 
 				<!-- tidy (?) -->
Index: main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 24473)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 24510)
@@ -28,4 +28,5 @@
   
   <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
+  <xsl:variable name="documentBasketOn" select="/page/pageRequest/paramList/param[@name='documentbasket' and @value='on']"/>
   
   <!-- template to get the name of the current collection -->
@@ -540,4 +541,27 @@
   </xsl:template>
   
+  <!-- put the drag&drop document basket on the page -->
+  <xsl:template name="documentBasket">
+    <xsl:if test="$documentBasketOn">
+      <div id="documentbasket" class="hide">
+        <span>Document Basket</span>
+		<span id="documentBasketExpandCollapseLinks" style="display: none;">
+          <a id="documentBasketExpandLink" href="javascript:showDocumentBox()">Expand</a>
+          <a id="documentBasketCollapseLink" style="display: none;" href="javascript:hideDocumentBox()">Collapse</a>
+        </span>
+        <div id="documenthandle">
+          <span>
+            <xsl:text> </xsl:text>
+          </span>
+        </div>
+        <div id="documentpages">
+          <span>
+            <xsl:text> </xsl:text>
+          </span>
+        </div>
+      </div>
+    </xsl:if>
+  </xsl:template>
+  
   <!-- include the required javascript and css for berry baskets -->
   <xsl:template name="berryBasketHeadTags">
@@ -552,4 +576,21 @@
     <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
     <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
+	
+	<!-- Combo-handled YUI CSS files: --> 
+	<link rel="stylesheet" type="text/css" href="interfaces/{$interface_name}/style/skin.css"/>
+
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentbasket.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentBasketDragDrop.js"><xsl:text> </xsl:text></script>
+	<!-- Combo-handled YUI JS files: --> 
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yahoo-dom-event.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/container_core-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/element-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/menu-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/button-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-min.js"><xsl:text> </xsl:text></script> 
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yuiloader-min.js"><xsl:text> </xsl:text></script>
+	<!--<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-dialog.js"><xsl:text> </xsl:text></script>-->
+	
+    <link rel="stylesheet" href="interfaces/{$interface_name}/style/documentbasket.css" type="text/css"/>
   </xsl:template>
   
