/*
	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(!dojo._hasResource["dijit._editor.selection"]){dojo._hasResource["dijit._editor.selection"]=true;dojo.provide("dijit._editor.selection");dojo.mixin(dijit._editor.selection,{getType:function(){if(dojo.isIE){return dojo.doc.selection.type.toLowerCase();}else{var _1="text";var _2;try{_2=dojo.global.getSelection();}catch(e){}if(_2&&_2.rangeCount==1){var _3=_2.getRangeAt(0);if((_3.startContainer==_3.endContainer)&&((_3.endOffset-_3.startOffset)==1)&&(_3.startContainer.nodeType!=3)){_1="control";}}return _1;}},getSelectedText:function(){if(dojo.isIE){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().text;}else{var _4=dojo.global.getSelection();if(_4){return _4.toString();}}return "";},getSelectedHtml:function(){if(dojo.isIE){if(dijit._editor.selection.getType()=="control"){return null;}return dojo.doc.selection.createRange().htmlText;}else{var _5=dojo.global.getSelection();if(_5&&_5.rangeCount){var i;var _6="";for(i=0;i<_5.rangeCount;i++){var _7=_5.getRangeAt(i).cloneContents();var _8=dojo.doc.createElement("div");_8.appendChild(_7);_6+=_8.innerHTML;}return _6;}return null;}},getSelectedElement:function(){if(dijit._editor.selection.getType()=="control"){if(dojo.isIE){var _9=dojo.doc.selection.createRange();if(_9&&_9.item){return dojo.doc.selection.createRange().item(0);}}else{var _a=dojo.global.getSelection();return _a.anchorNode.childNodes[_a.anchorOffset];}}return null;},getParentElement:function(){if(dijit._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(dojo.isIE){var r=dojo.doc.selection.createRange();r.collapse(true);return r.parentElement();}else{var _b=dojo.global.getSelection();if(_b){var _c=_b.anchorNode;while(_c&&(_c.nodeType!=1)){_c=_c.parentNode;}return _c;}}}return null;},hasAncestorElement:function(_d){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_e){var _f=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(_f,arguments);},isTag:function(_10,_11){if(_10&&_10.tagName){var _12=_10.tagName.toLowerCase();for(var i=0;i<_11.length;i++){var _13=String(_11[i]).toLowerCase();if(_12==_13){return _13;}}}return "";},getParentOfType:function(_14,_15){while(_14){if(this.isTag(_14,_15).length){return _14;}_14=_14.parentNode;}return null;},collapse:function(_16){if(window.getSelection){var _17=dojo.global.getSelection();if(_17.removeAllRanges){if(_16){_17.collapseToStart();}else{_17.collapseToEnd();}}else{_17.collapse(_16);}}else{if(dojo.isIE){var _18=dojo.doc.selection.createRange();_18.collapse(_16);_18.select();}}},remove:function(){var sel=dojo.doc.selection;if(dojo.isIE){if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}else{sel=dojo.global.getSelection();sel.deleteFromDocument();return sel;}},selectElementChildren:function(_19,_1a){var win=dojo.global;var doc=dojo.doc;var _1b;_19=dojo.byId(_19);if(doc.selection&&dojo.isIE&&dojo.body().createTextRange){_1b=_19.ownerDocument.body.createTextRange();_1b.moveToElementText(_19);if(!_1a){try{_1b.select();}catch(e){}}}else{if(win.getSelection){var _1c=dojo.global.getSelection();if(_1c.setBaseAndExtent){_1c.setBaseAndExtent(_19,0,_19,_19.innerText.length-1);}else{if(dojo.isOpera){if(_1c.rangeCount){_1b=_1c.getRangeAt(0);}else{_1b=doc.createRange();}_1b.setStart(_19,0);_1b.setEnd(_19,(_19.nodeType==3)?_19.length:_19.childNodes.length);_1c.addRange(_1b);}else{if(_1c.selectAllChildren){_1c.selectAllChildren(_19);}}}}}},selectElement:function(_1d,_1e){var _1f;var doc=dojo.doc;var win=dojo.global;_1d=dojo.byId(_1d);if(dojo.isIE&&dojo.body().createTextRange){try{_1f=dojo.body().createControlRange();_1f.addElement(_1d);if(!_1e){_1f.select();}}catch(e){this.selectElementChildren(_1d,_1e);}}else{if(dojo.global.getSelection){var _20=win.getSelection();_1f=doc.createRange();if(_20.removeAllRanges){if(dojo.isOpera){if(_20.getRangeAt(0)){_1f=_20.getRangeAt(0);}}_1f.selectNode(_1d);_20.removeAllRanges();_20.addRange(_1f);}}}}});}if(!dojo._hasResource["dijit._editor.range"]){dojo._hasResource["dijit._editor.range"]=true;dojo.provide("dijit._editor.range");dijit.range={};dijit.range.getIndex=function(_21,_22){var ret=[],_23=[];var _24=_22;var _25=_21;var _26,n;while(_21!=_24){var i=0;_26=_21.parentNode;while((n=_26.childNodes[i++])){if(n===_21){--i;break;}}if(i>=_26.childNodes.length){dojo.debug("Error finding index of a node in dijit.range.getIndex");}ret.unshift(i);_23.unshift(i-_26.childNodes.length);_21=_26;}if(ret.length>0&&_25.nodeType==3){n=_25.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=_25.nextSibling;while(n&&n.nodeType==3){_23[_23.length-1]++;n=n.nextSibling;}}return {o:ret,r:_23};};dijit.range.getNode=function(_27,_28){if(!dojo.isArray(_27)||_27.length==0){return _28;}var _29=_28;dojo.every(_27,function(i){if(i>=0&&i<_29.childNodes.length){_29=_29.childNodes[i];}else{_29=null;console.debug("Error: can not find node with index",_27,"under parent node",_28);return false;}return true;});return _29;};dijit.range.getCommonAncestor=function(n1,n2){var _2a=function(n){var as=[];while(n){as.unshift(n);if(n.nodeName!="BODY"){n=n.parentNode;}else{break;}}return as;};var _2b=_2a(n1);var _2c=_2a(n2);var m=Math.min(_2b.length,_2c.length);var com=_2b[0];for(var i=1;i<m;i++){if(_2b[i]===_2c[i]){com=_2b[i];}else{break;}}return com;};dijit.range.getAncestor=function(_2d,_2e,_2f){_2f=_2f||_2d.ownerDocument.body;while(_2d&&_2d!==_2f){var _30=_2d.nodeName.toUpperCase();if(_2e.test(_30)){return _2d;}_2d=_2d.parentNode;}return null;};dijit.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;dijit.range.getBlockAncestor=function(_31,_32,_33){_33=_33||_31.ownerDocument.body;_32=_32||dijit.range.BlockTagNames;var _34=null,_35;while(_31&&_31!==_33){var _36=_31.nodeName.toUpperCase();if(!_34&&_32.test(_36)){_34=_31;}if(!_35&&(/^(?:BODY|TD|TH|CAPTION)$/).test(_36)){_35=_31;}_31=_31.parentNode;}return {blockNode:_34,blockContainer:_35||_31.ownerDocument.body};};dijit.range.atBeginningOfContainer=function(_37,_38,_39){var _3a=false;var _3b=(_39==0);if(!_3b&&_38.nodeType==3){if(/^[\s\xA0]+$/.test(_38.nodeValue.substr(0,_39))){_3b=true;}}if(_3b){var _3c=_38;_3a=true;while(_3c&&_3c!==_37){if(_3c.previousSibling){_3a=false;break;}_3c=_3c.parentNode;}}return _3a;};dijit.range.atEndOfContainer=function(_3d,_3e,_3f){var _40=false;var _41=(_3f==(_3e.length||_3e.childNodes.length));if(!_41&&_3e.nodeType==3){if(/^[\s\xA0]+$/.test(_3e.nodeValue.substr(_3f))){_41=true;}}if(_41){var _42=_3e;_40=true;while(_42&&_42!==_3d){if(_42.nextSibling){_40=false;break;}_42=_42.parentNode;}}return _40;};dijit.range.adjacentNoneTextNode=function(_43,_44){var _45=_43;var len=(0-_43.length)||0;var _46=_44?"nextSibling":"previousSibling";while(_45){if(_45.nodeType!=3){break;}len+=_45.length;_45=_45[_46];}return [_45,len];};dijit.range._w3c=Boolean(window["getSelection"]);dijit.range.create=function(win){if(dijit.range._w3c){return (win||dojo.global).document.createRange();}else{return new dijit.range.W3CRange;}};dijit.range.getSelection=function(win,_47){if(dijit.range._w3c){return win.getSelection();}else{var s=new dijit.range.ie.selection(win);if(!_47){s._getCurrentSelection();}return s;}};if(!dijit.range._w3c){dijit.range.ie={cachedSelection:{},selection:function(win){this._ranges=[];this.addRange=function(r,_48){this._ranges.push(r);if(!_48){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _49=function(){var r=win.document.selection.createRange();var _4a=win.document.selection.type.toUpperCase();if(_4a=="CONTROL"){return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));}else{return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_49();if(r){this.addRange(r,true);}};},decomposeControlRange:function(_4b){var _4c=_4b.item(0),_4d=_4b.item(_4b.length-1);var _4e=_4c.parentNode,_4f=_4d.parentNode;var _50=dijit.range.getIndex(_4c,_4e).o;var _51=dijit.range.getIndex(_4d,_4f).o+1;return [_4e,_50,_4f,_51];},getEndPoint:function(_52,end){var _53=_52.duplicate();_53.collapse(!end);var _54="EndTo"+(end?"End":"Start");var _55=_53.parentElement();var _56,_57,_58;if(_55.childNodes.length>0){dojo.every(_55.childNodes,function(_59,i){var _5a;if(_59.nodeType!=3){_53.moveToElementText(_59);if(_53.compareEndPoints(_54,_52)>0){if(_58&&_58.nodeType==3){_56=_58;_5a=true;}else{_56=_55;_57=i;return false;}}else{if(i==_55.childNodes.length-1){_56=_55;_57=_55.childNodes.length;return false;}}}else{if(i==_55.childNodes.length-1){_56=_59;_5a=true;}}if(_5a&&_56){var _5b=dijit.range.adjacentNoneTextNode(_56)[0];if(_5b){_56=_5b.nextSibling;}else{_56=_55.firstChild;}var _5c=dijit.range.adjacentNoneTextNode(_56);_5b=_5c[0];var _5d=_5c[1];if(_5b){_53.moveToElementText(_5b);_53.collapse(false);}else{_53.moveToElementText(_55);}_53.setEndPoint(_54,_52);_57=_53.text.length-_5d;return false;}_58=_59;return true;});}else{_56=_55;_57=0;}if(!end&&_56.nodeType==1&&_57==_56.childNodes.length){var _5e=_56.nextSibling;if(_5e&&_5e.nodeType==3){_56=_5e;_57=0;}}return [_56,_57];},setEndPoint:function(_5f,_60,_61){var _62=_5f.duplicate(),_63,len;if(_60.nodeType!=3){if(_61>0){_63=_60.childNodes[_61-1];if(_63.nodeType==3){_60=_63;_61=_63.length;}else{if(_63.nextSibling&&_63.nextSibling.nodeType==3){_60=_63.nextSibling;_61=0;}else{_62.moveToElementText(_63.nextSibling?_63:_60);var _64=_63.parentNode;var _65=_64.insertBefore(_63.ownerDocument.createTextNode(" "),_63.nextSibling);_62.collapse(false);_64.removeChild(_65);}}}else{_62.moveToElementText(_60);_62.collapse(true);}}if(_60.nodeType==3){var _66=dijit.range.adjacentNoneTextNode(_60);var _67=_66[0];len=_66[1];if(_67){_62.moveToElementText(_67);_62.collapse(false);if(_67.contentEditable!="inherit"){len++;}}else{_62.moveToElementText(_60.parentNode);_62.collapse(true);}_61+=len;if(_61>0){if(_62.move("character",_61)!=_61){console.error("Error when moving!");}}}return _62;},decomposeTextRange:function(_68){var _69=dijit.range.ie.getEndPoint(_68);var _6a=_69[0],_6b=_69[1];var _6c=_69[0],_6d=_69[1];if(_68.htmlText.length){if(_68.htmlText==_68.text){_6d=_6b+_68.text.length;}else{_69=dijit.range.ie.getEndPoint(_68,true);_6c=_69[0],_6d=_69[1];}}return [_6a,_6b,_6c,_6d];},setRange:function(_6e,_6f,_70,_71,_72,_73){var _74=dijit.range.ie.setEndPoint(_6e,_6f,_70);_6e.setEndPoint("StartToStart",_74);if(!_73){var end=dijit.range.ie.setEndPoint(_6e,_71,_72);}_6e.setEndPoint("EndToEnd",end||_74);return _6e;}};dojo.declare("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=dijit.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(_75,_76){_76=parseInt(_76);if(this.startContainer===_75&&this.startOffset==_76){return;}delete this._cachedBookmark;this.startContainer=_75;this.startOffset=_76;if(!this.endContainer){this.setEnd(_75,_76);}else{this._updateInternal();}},setEnd:function(_77,_78){_78=parseInt(_78);if(this.endContainer===_77&&this.endOffset==_78){return;}delete this._cachedBookmark;this.endContainer=_77;this.endOffset=_78;if(!this.startContainer){this.setStart(_77,_78);}else{this._updateInternal();}},setStartAfter:function(_79,_7a){this._setPoint("setStart",_79,_7a,1);},setStartBefore:function(_7b,_7c){this._setPoint("setStart",_7b,_7c,0);},setEndAfter:function(_7d,_7e){this._setPoint("setEnd",_7d,_7e,1);},setEndBefore:function(_7f,_80){this._setPoint("setEnd",_7f,_80,0);},_setPoint:function(_81,_82,_83,ext){var _84=dijit.range.getIndex(_82,_82.parentNode).o;this[_81](_82.parentNode,_84.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();dijit.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(_85){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var r=this._getIERange();r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new dijit.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}}if(!dojo._hasResource["dijit._editor.html"]){dojo._hasResource["dijit._editor.html"]=true;dojo.provide("dijit._editor.html");dijit._editor.escapeXml=function(str,_86){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_86){str=str.replace(/'/gm,"&#39;");}return str;};dijit._editor.getNodeHtml=function(_87){var _88;switch(_87.nodeType){case 1:var _89=_87.nodeName.toLowerCase();if(_89.charAt(0)=="/"){return "";}_88="<"+_89;var _8a=[];var _8b;if(dojo.isIE&&_87.outerHTML){var s=_87.outerHTML;s=s.substr(0,s.indexOf(">")).replace(/(['"])[^"']*\1/g,"");var reg=/(\b\w+)\s?=/g;var m,key;while((m=reg.exec(s))){key=m[1];if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(_87.getAttribute("_djrealurl")){_8a.push([key,_87.getAttribute("_djrealurl")]);continue;}}var val,_8c;switch(key){case "style":val=_87.style.cssText.toLowerCase();break;case "class":val=_87.className;break;case "width":if(_89==="img"){_8c=/width=(\S+)/i.exec(s);if(_8c){val=_8c[1];}break;}case "height":if(_89==="img"){_8c=/height=(\S+)/i.exec(s);if(_8c){val=_8c[1];}break;}default:val=_87.getAttribute(key);}if(val!=null){_8a.push([key,val.toString()]);}}}}else{var i=0;while((_8b=_87.attributes[i++])){var n=_8b.name;if(n.substr(0,3)!="_dj"){var v=_8b.value;if(n=="src"||n=="href"){if(_87.getAttribute("_djrealurl")){v=_87.getAttribute("_djrealurl");}}_8a.push([n,v]);}}}_8a.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((_8b=_8a[j++])){_88+=" "+_8b[0]+"=\""+(dojo.isString(_8b[1])?dijit._editor.escapeXml(_8b[1],true):_8b[1])+"\"";}if(_89==="script"){_88+=">"+_87.innerHTML+"</"+_89+">";}else{if(_87.childNodes.length){_88+=">"+dijit._editor.getChildrenHtml(_87)+"</"+_89+">";}else{switch(_89){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_88+=" />";break;default:_88+="></"+_89+">";}}}break;case 4:case 3:_88=dijit._editor.escapeXml(_87.nodeValue,true);break;case 8:_88="<!--"+dijit._editor.escapeXml(_87.nodeValue,true)+"-->";break;default:_88="<!-- Element not recognized - Type: "+_87.nodeType+" Name: "+_87.nodeName+"-->";}return _88;};dijit._editor.getChildrenHtml=function(dom){var out="";if(!dom){return out;}var _8d=dom["childNodes"]||dom;var _8e=!dojo.isIE||_8d!==dom;var _8f,i=0;while((_8f=_8d[i++])){if(!_8e||_8f.parentNode==dom){out+=dijit._editor.getNodeHtml(_8f);}}return out;};}if(!dojo._hasResource["dijit._editor.RichText"]){dojo._hasResource["dijit._editor.RichText"]=true;dojo.provide("dijit._editor.RichText");if(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"]){if(dojo._postLoad){(function(){var _90=dojo.doc.createElement("textarea");_90.id=dijit._scopeName+"._editor.RichText.savedContent";dojo.style(_90,{display:"none",position:"absolute",top:"-100px",height:"3px",width:"3px"});dojo.body().appendChild(_90);})();}else{try{dojo.doc.write("<textarea id=\""+dijit._scopeName+"._editor.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");}catch(e){}}}dojo.declare("dijit._editor.RichText",dijit._Widget,{constructor:function(_91){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};this.contentPreFilters.push(dojo.hitch(this,"_preFixUrlAttributes"));if(dojo.isMoz){this.contentPreFilters.push(this._normalizeFontStyle);this.contentPostFilters.push(this._removeMozBogus);}if(dojo.isWebKit){this.contentPreFilters.push(this._removeWebkitBogus);this.contentPostFilters.push(this._removeWebkitBogus);}if(dojo.isIE){this.contentPostFilters.push(this._normalizeFontStyle);}this.onLoadDeferred=new dojo.Deferred();},inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",_content:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"==this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");}dojo.publish(dijit._scopeName+"._editor.RichText::init",[this]);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var _92=dojo.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _93={b:_92("bold"),i:_92("italic"),u:_92("underline"),a:_92("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":_92("formatblock","h1"),"2":_92("formatblock","h2"),"3":_92("formatblock","h3"),"4":_92("formatblock","h4"),"\\":_92("insertunorderedlist")};if(!dojo.isIE){_93.Z=_92("redo");}for(var key in _93){this.addKeyHandler(key,true,false,_93[key]);}},events:["onKeyPress","onKeyDown","onKeyUp","onClick"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(this._editorCommandsLocalized){return;}this._editorCommandsLocalized=true;var _94=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _95="",_96,i=0;while((_96=_94[i++])){if(_96.charAt(1)!="l"){_95+="<"+_96+"><span>content</span></"+_96+"><br/>";}else{_95+="<"+_96+"><li>content</li></"+_96+"><br/>";}}var div=dojo.doc.createElement("div");dojo.style(div,{position:"absolute",top:"-2000px"});dojo.doc.body.appendChild(div);div.innerHTML=_95;var _97=div.firstChild;while(_97){dijit._editor.selection.selectElement(_97.firstChild);dojo.withGlobal(this.window,"selectElement",dijit._editor.selection,[_97.firstChild]);var _98=_97.tagName.toLowerCase();this._local2NativeFormatNames[_98]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_98]]=_98;_97=_97.nextSibling.nextSibling;}dojo.body().removeChild(div);},open:function(_99){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new dojo.Deferred();}if(!this.isClosed){this.close();}dojo.publish(dijit._scopeName+"._editor.RichText::open",[this]);this._content="";if(arguments.length==1&&_99.nodeName){this.domNode=_99;}var dn=this.domNode;var _9a;if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;_9a=ta.value;dn=this.domNode=dojo.doc.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;dojo.place(dn,ta,"before");var _9b=dojo.hitch(this,function(){dojo.style(ta,{display:"block",position:"absolute",top:"-1000px"});if(dojo.isIE){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(dojo.isIE){setTimeout(_9b,10);}else{_9b();}if(ta.form){dojo.connect(ta.form,"onsubmit",this,function(){ta.value=this.getValue();});}}else{_9a=dijit._editor.getChildrenHtml(dn);dn.innerHTML="";}var _9c=dojo.contentBox(dn);this._oldHeight=_9c.h;this._oldWidth=_9c.w;this.savedContent=_9a;if(dn.nodeName&&dn.nodeName=="LI"){dn.innerHTML=" <br>";}this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);if(this.name!==""&&(!dojo.config["useXDomain"]||dojo.config["allowXdRichTextSave"])){var _9d=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");if(_9d.value!==""){var _9e=_9d.value.split(this._SEPARATOR),i=0,dat;while((dat=_9e[i++])){var _9f=dat.split(":");if(_9f[0]==this.name){_9a=_9f[1];_9e.splice(i,1);break;}}}dojo.addOnUnload(dojo.hitch(this,"_saveContent"));}this.isClosed=false;var ifr=(this.editorObject=this.iframe=dojo.doc.createElement("iframe"));ifr.id=this.id+"_iframe";this._iframeSrc=this._getIframeDocTxt();ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(dojo.isIE>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=dojo.hitch(this,function(win){this.window=win;this.document=this.window.document;if(dojo.isIE){this._localizeEditorCommands();}this.onLoad(_9a);this.savedContent=this.getValue(true);});var s="javascript:parent."+dijit._scopeName+".byId(\""+this.id+"\")._iframeSrc";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(dojo.isSafari){setTimeout(function(){ifr.setAttribute("src",s);},0);}if(dn.nodeName=="LI"){dn.lastChild.style.marginTop="-1.2em";}dojo.addClass(this.domNode,"RichTextEditable");},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _a0=dojo.getComputedStyle(this.domNode);var _a1="";if(dojo.isIE||(!this.height&&!dojo.isMoz)){_a1="<div></div>";}else{if(dojo.isMoz){this._cursorToStart=true;_a1="&nbsp;";}}var _a2=[_a0.fontWeight,_a0.fontSize,_a0.fontFamily].join(" ");var _a3=_a0.lineHeight;if(_a3.indexOf("px")>=0){_a3=parseFloat(_a3)/parseFloat(_a0.fontSize);}else{if(_a3.indexOf("em")>=0){_a3=parseFloat(_a3);}else{_a3="normal";}}var _a4="";this.style.replace(/(^|;)(line-|font-?)[^;]+/g,function(_a5){_a4+=_a5.replace(/^;/g,"")+";";});var _a6=dojo.query("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html><head>":"<html dir='rtl'><head>",(dojo.isMoz&&_a6.length?"<title>"+_a6[0].innerHTML+"</title>":""),"<meta http-equiv='Content-Type' content='text/html'>","<style>","body,html {","\tbackground:transparent;","\tpadding: 1px 0 0 0;","\tmargin: -1px 0 0 0;",(dojo.isWebKit?"\twidth: 100%;":""),(dojo.isWebKit?"\theight: 100%;":""),"}","body{","\ttop:0px; left:0px; right:0px;","\tfont:",_a2,";",((this.height||dojo.isOpera)?"":"position: fixed;"),"\tmin-height:",this.minHeight,";","\tline-height:",_a3,"}","p{ margin: 1em 0; }",(this.height?"":"body,html{overflow-y:hidden;/*for IE*/} body > div {overflow-x:auto;/*FF:horizontal scrollbar*/ overflow-y:hidden;/*safari*/ min-height:"+this.minHeight+";/*safari*/}"),"li > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; } ","li{ min-height:1.2em; }","</style>",this._applyEditingAreaStyleSheets(),"</head><body onload='frameElement._loadFunc(window,document)' style='"+_a4+"'>",_a1,"</body></html>"].join("");},_applyEditingAreaStyleSheets:function(){var _a7=[];if(this.styleSheets){_a7=this.styleSheets.split(";");this.styleSheets="";}_a7=_a7.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var _a8="",i=0,url;while((url=_a7[i++])){var _a9=(new dojo._Url(dojo.global.location,url)).toString();this.editingAreaStyleSheets.push(_a9);_a8+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_a9+"\"/>";}return _a8;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}if(dojo.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.addCallback(dojo.hitch(function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var _aa=this.document.getElementsByTagName("head")[0];var _ab=this.document.createElement("link");_ab.rel="stylesheet";_ab.type="text/css";_ab.href=url;_aa.appendChild(_ab);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new dojo._Url(dojo.global.location,url)).toString();}var _ac=dojo.indexOf(this.editingAreaStyleSheets,url);if(_ac==-1){return;}delete this.editingAreaStyleSheets[_ac];dojo.withGlobal(this.window,"query",dojo,["link:[href=\""+url+"\"]"]).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_ad){this.disabled=_ad;if(!this.isLoaded){return;}_ad=!!_ad;if(dojo.isIE||dojo.isWebKit||dojo.isOpera){var _ae=dojo.isIE&&(this.isLoaded||!this.focusOnLoad);if(_ae){this.editNode.unselectable="on";}this.editNode.contentEditable=!_ad;if(_ae){var _af=this;setTimeout(function(){_af.editNode.unselectable="off";},0);}}else{try{this.document.designMode=(_ad?"off":"on");}catch(e){return;}if(!_ad&&this._mozSettingProps){var ps=this._mozSettingProps;for(var n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(_b0){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=dijit.registerIframe(this.iframe);}if(!dojo.isIE&&(this.height||dojo.isMoz)){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _b1=this;if(dojo.isIE){var _b2=(this.tabStop=dojo.doc.createElement("<div tabIndex=-1>"));this.editingArea.appendChild(_b2);this.iframe.onfocus=function(){_b1.editNode.setActive();};}}this.focusNode=this.editNode;var _b3=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;dojo.forEach(_b3,function(_b4){this.connect(ap,_b4.toLowerCase(),_b4);},this);if(dojo.isIE){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}if(dojo.isWebKit){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");}if(dojo.isIE){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.attr("disabled",this.disabled);this.setValue(_b0);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}this.onDisplayChanged();if(this.focusOnLoad){dojo.addOnLoad(dojo.hitch(this,function(){setTimeout(dojo.hitch(this,"focus"),this.updateInterval);}));}},onKeyDown:function(e){if(e.keyCode===dojo.keys.TAB&&this.isTabIndent){dojo.stopEvent(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(dojo.isIE){if(e.keyCode==dojo.keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===dojo.keys.BACKSPACE&&this.document.selection.type==="Control"){dojo.stopEvent(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}return true;},onKeyUp:function(e){return;},setDisabled:function(_b5){dojo.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.attr("disabled",_b5);},_setValueAttr:function(_b6){this.setValue(_b6);},_setDisableSpellCheckAttr:function(_b7){if(this.document){dojo.attr(this.document.body,"spellcheck",!_b7);}else{this.onLoadDeferred.addCallback(dojo.hitch(this,function(){dojo.attr(this.document.body,"spellcheck",!_b7);}));}this.disableSpellCheck=_b7;},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_b8=this._keyHandlers[c],_b9=arguments;if(_b8&&!e.altKey){dojo.some(_b8,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^e.ctrlKey)){if(!h.handler.apply(this,_b9)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=dojo.hitch(this,"onKeyPressed");}setTimeout(this._onKeyHitch,1);return true;},addKeyHandler:function(key,_ba,_bb,_bc){if(!dojo.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_bb||false,ctrl:_ba||false,handler:_bc});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(e){if(!this._focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _bd=this.getValue(true);if(_bd!=this.savedContent){this.onChange(_bd);this.savedContent=_bd;}},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.attr("disabled",false);}this.inherited(arguments);}},blur:function(){if(!dojo.isIE&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(dojo.doc.body.focus){dojo.doc.body.focus();}}},focus:function(){if(!dojo.isIE){dijit.focus(this.iframe);if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes&&this.editNode.childNodes.length===1&&this.editNode.innerHTML==="&nbsp;"){this.placeCursorAtStart();}}}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){if(this._updateTimer){clearTimeout(this._updateTimer);}if(!this._updateHandler){this._updateHandler=dojo.hitch(this,"onNormalizedDisplayChanged");}this._updateTimer=setTimeout(this._updateHandler,this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(_be){},_normalizeCommand:function(cmd,_bf){var _c0=cmd.toLowerCase();if(_c0=="formatblock"){if(dojo.isSafari&&_bf===undefined){_c0="heading";}}else{if(_c0=="hilitecolor"&&!dojo.isMoz){_c0="backcolor";}}return _c0;},_qcaCache:{},queryCommandAvailable:function(_c1){var ca=this._qcaCache[_c1];if(ca!==undefined){return ca;}return (this._qcaCache[_c1]=this._queryCommandAvailable(_c1));},_queryCommandAvailable:function(_c2){var ie=1;var _c3=1<<1;var _c4=1<<2;var _c5=1<<3;var _c6=1<<4;function _c7(_c8){return {ie:Boolean(_c8&ie),mozilla:Boolean(_c8&_c3),webkit:Boolean(_c8&_c4),webkit420:Boolean(_c8&_c6),opera:Boolean(_c8&_c5)};};var _c9=null;switch(_c2.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":_c9=_c7(_c3|ie|_c4|_c5);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":_c9=_c7(_c3|ie|_c5|_c6);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_c9=_c7(ie);break;case "cut":case "copy":case "paste":_c9=_c7(ie|_c3|_c6);break;case "inserttable":_c9=_c7(_c3|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_c9=_c7(ie|_c3);break;default:return false;}return (dojo.isIE&&_c9.ie)||(dojo.isMoz&&_c9.mozilla)||(dojo.isWebKit&&_c9.webkit)||(dojo.isWebKit>420&&_c9.webkit420)||(dojo.isOpera&&_c9.opera);},execCommand:function(_ca,_cb){var _cc;this.focus();_ca=this._normalizeCommand(_ca,_cb);if(_cb!==undefined){if(_ca=="heading"){throw new Error("unimplemented");}else{if((_ca=="formatblock")&&dojo.isIE){_cb="<"+_cb+">";}}}var _cd="_"+_ca+"Impl";if(this[_cd]){_cc=this[_cd](_cb);}else{_cb=arguments.length>1?_cb:null;if(_cb||_ca!="createlink"){_cc=this.document.execCommand(_ca,false,_cb);}}this.onDisplayChanged();return _cc;},queryCommandEnabled:function(_ce){if(this.disabled||!this._disabledOK){return false;}_ce=this._normalizeCommand(_ce);if(dojo.isMoz||dojo.isWebKit){if(_ce=="unlink"){return this._sCall("hasAncestorElement",["a"]);}else{if(_ce=="inserttable"){return true;}}}if(dojo.isWebKit){if(_ce=="copy"){_ce="cut";}else{if(_ce=="paste"){return true;}}}var _cf=dojo.isIE?this.document.selection.createRange():this.document;try{return _cf.queryCommandEnabled(_ce);}catch(e){return false;}},queryCommandState:function(_d0){if(this.disabled||!this._disabledOK){return false;}_d0=this._normalizeCommand(_d0);try{return this.document.queryCommandState(_d0);}catch(e){return false;}},queryCommandValue:function(_d1){if(this.disabled||!this._disabledOK){return false;}var r;_d1=this._normalizeCommand(_d1);if(dojo.isIE&&_d1=="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_d1)];}else{if(dojo.isMoz&&_d1==="hilitecolor"){var _d2;try{_d2=this.document.queryCommandValue("styleWithCSS");}catch(e){_d2=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_d1);this.document.execCommand("styleWithCSS",false,_d2);}else{r=this.document.queryCommandValue(_d1);}}return r;},_sCall:function(_d3,_d4){return dojo.withGlobal(this.window,_d3,dijit._editor.selection,_d4);},placeCursorAtStart:function(){this.focus();var _d5=false;if(dojo.isMoz){var _d6=this.editNode.firstChild;while(_d6){if(_d6.nodeType==3){if(_d6.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_d5=true;this._sCall("selectElement",[_d6]);break;}}else{if(_d6.nodeType==1){_d5=true;var tg=_d6.tagName?_d6.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_d6]);}else{this._sCall("selectElementChildren",[_d6]);}break;}}_d6=_d6.nextSibling;}}else{_d5=true;this._sCall("selectElementChildren",[this.editNode]);}if(_d5){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _d7=false;if(dojo.isMoz){var _d8=this.editNode.lastChild;while(_d8){if(_d8.nodeType==3){if(_d8.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_d7=true;this._sCall("selectElement",[_d8]);break;}}else{if(_d8.nodeType==1){_d7=true;if(_d8.lastChild){this._sCall("selectElement",[_d8.lastChild]);}else{this._sCall("selectElement",[_d8]);}break;}}_d8=_d8.previousSibling;}}else{_d7=true;this._sCall("selectElementChildren",[this.editNode]);}if(_d7){this._sCall("collapse",[false]);}},getValue:function(_d9){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_d9);},_getValueAttr:function(){return this.getValue(true);},setValue:function(_da){if(!this.isLoaded){this.onLoadDeferred.addCallback(dojo.hitch(this,function(){this.setValue(_da);}));return;}if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=_da;}else{_da=this._preFilterContent(_da);var _db=this.isClosed?this.domNode:this.editNode;if(!_da&&dojo.isWebKit){this._cursorToStart=true;_da="&nbsp;";}_db.innerHTML=_da;this._preDomFilterContent(_db);}this.onDisplayChanged();},replaceValue:function(_dc){if(this.isClosed){this.setValue(_dc);}else{if(this.window&&this.window.getSelection&&!dojo.isMoz){this.setValue(_dc);}else{if(this.window&&this.window.getSelection){_dc=this._preFilterContent(_dc);this.execCommand("selectall");if(!_dc){this._cursorToStart=true;_dc="&nbsp;";}this.execCommand("inserthtml",_dc);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(_dc);}}}}},_preFilterContent:function(_dd){var ec=_dd;dojo.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;dojo.forEach(this.contentDomPreFilters,function(ef){if(ef&&dojo.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_de){var ec;if(!dojo.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_de){dom=dojo.clone(dom);}dojo.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=dijit._editor.getChildrenHtml(dom);}else{ec=dom;}if(!dojo.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}dojo.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(e){var _df=dojo.byId(dijit._scopeName+"._editor.RichText.savedContent");if(_df.value){_df.value+=this._SEPARATOR;}_df.value+=this.name+":"+this.getValue(true);},escapeXml:function(str,_e0){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_e0){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(_e1){dojo.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit._editor.getNodeHtml instead",2);return dijit._editor.getNodeHtml(_e1);},getNodeChildrenHtml:function(dom){dojo.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit._editor.getChildrenHtml instead",2);return dijit._editor.getChildrenHtml(dom);},close:function(_e2){if(this.isClosed){return false;}if(!arguments.length){_e2=true;}this._content=this.getValue();var _e3=(this.savedContent!=this._content);if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(dojo.isIE){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){dijit.unregisterIframe(this._iframeRegHandle);delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(dojo.isIE){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=_e2?this._content:this.savedContent;dojo.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=_e2?this._content:this.savedContent;}delete this.iframe;dojo.removeClass(this.domNode,"RichTextEditable");this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;return _e3;},destroy:function(){if(!this.isClosed){this.close(false);}this.inherited(arguments);},_removeMozBogus:function(_e4){return _e4.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(_e5){_e5=_e5.replace(/\sclass="webkit-block-placeholder"/gi,"");_e5=_e5.replace(/\sclass="apple-style-span"/gi,"");return _e5;},_normalizeFontStyle:function(_e6){return _e6.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(_e7){return _e7.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_inserthorizontalruleImpl:function(_e8){if(dojo.isIE){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_e8);},_unlinkImpl:function(_e9){if((this.queryCommandEnabled("unlink"))&&(dojo.isMoz||dojo.isWebKit)){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_e9);},_hilitecolorImpl:function(_ea){var _eb;if(dojo.isMoz){this.document.execCommand("styleWithCSS",false,true);_eb=this.document.execCommand("hilitecolor",false,_ea);this.document.execCommand("styleWithCSS",false,false);}else{_eb=this.document.execCommand("hilitecolor",false,_ea);}return _eb;},_backcolorImpl:function(_ec){if(dojo.isIE){_ec=_ec?_ec:null;}return this.document.execCommand("backcolor",false,_ec);},_forecolorImpl:function(_ed){if(dojo.isIE){_ed=_ed?_ed:null;}return this.document.execCommand("forecolor",false,_ed);},_inserthtmlImpl:function(_ee){_ee=this._preFilterContent(_ee);var rv=true;if(dojo.isIE){var _ef=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()=="CONTROL"){var n=_ef.item(0);while(_ef.length){_ef.remove(_ef.item(0));}n.outerHTML=_ee;}else{_ef.pasteHTML(_ee);}_ef.select();}else{if(dojo.isMoz&&!_ee.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_ee);}}return rv;}});}if(!dojo._hasResource["dijit._KeyNavContainer"]){dojo._hasResource["dijit._KeyNavContainer"]=true;dojo.provide("dijit._KeyNavContainer");dojo.declare("dijit._KeyNavContainer",dijit._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_f0,_f1){var _f2=(this._keyNavCodes={});var _f3=dojo.hitch(this,this.focusPrev);var _f4=dojo.hitch(this,this.focusNext);dojo.forEach(_f0,function(_f5){_f2[_f5]=_f3;});dojo.forEach(_f1,function(_f6){_f2[_f6]=_f4;});this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild"));},addChild:function(_f7,_f8){dijit._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_f7);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _f9=this._getFirstFocusableChild();if(_f9){this.focusChild(_f9);}},focusNext:function(){var _fa=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_fa);},focusPrev:function(){var _fb=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_fb,true);},focusChild:function(_fc,_fd){if(this.focusedChild&&_fc!==this.focusedChild){this._onChildBlur(this.focusedChild);}_fc.focus(_fd?"end":"start");this.focusedChild=_fc;},_startupChild:function(_fe){_fe.attr("tabIndex","-1");this.connect(_fe,"_onFocus",function(){_fe.attr("tabIndex",this.tabIndex);});this.connect(_fe,"_onBlur",function(){_fe.attr("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();dojo.attr(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){dojo.attr(this.domNode,"tabIndex",this.tabIndex);}this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var _ff=this._keyNavCodes[evt.charOrCode];if(_ff){_ff();dojo.stopEvent(evt);}},_onChildBlur:function(_100){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getNextFocusableChild:function(_101,dir){if(_101){_101=this._getSiblingOfChild(_101,dir);}var _102=this.getChildren();for(var i=0;i<_102.length;i++){if(!_101){_101=_102[(dir>0)?0:(_102.length-1)];}if(_101.isFocusable()){return _101;}_101=this._getSiblingOfChild(_101,dir);}return null;}});}if(!dojo._hasResource["dijit.ToolbarSeparator"]){dojo._hasResource["dijit.ToolbarSeparator"]=true;dojo.provide("dijit.ToolbarSeparator");dojo.declare("dijit.ToolbarSeparator",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\"></div>",postCreate:function(){dojo.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!dojo._hasResource["dijit.Toolbar"]){dojo._hasResource["dijit.Toolbar"]=true;dojo.provide("dijit.Toolbar");dojo.declare("dijit.Toolbar",[dijit._Widget,dijit._Templated,dijit._KeyNavContainer],{templateString:"<div class=\"dijit dijitToolbar\" waiRole=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",postCreate:function(){this.connectKeyNavHandlers(this.isLeftToRight()?[dojo.keys.LEFT_ARROW]:[dojo.keys.RIGHT_ARROW],this.isLeftToRight()?[dojo.keys.RIGHT_ARROW]:[dojo.keys.LEFT_ARROW]);},startup:function(){if(this._started){return;}this.startupKeyNavChildren();this.inherited(arguments);}});}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments);},_setDisabledAttr:function(_103){this.disabled=_103;dojo.attr(this.focusNode,"disabled",_103);if(this.valueNode){dojo.attr(this.valueNode,"disabled",_103);}dijit.setWaiState(this.focusNode,"disabled",_103);if(_103){this._hovering=false;this._active=false;this.focusNode.setAttribute("tabIndex","-1");}else{this.focusNode.setAttribute("tabIndex",this.tabIndex);}this._setStateClass();},setDisabled:function(_104){dojo.deprecated("setDisabled("+_104+") is deprecated. Use attr('disabled',"+_104+") instead.","","2.0");this.attr("disabled",_104);},_onFocus:function(e){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode);}this.inherited(arguments);},_onMouse:function(_105){var _106=_105.currentTarget;if(_106&&_106.getAttribute){this.stateModifier=_106.getAttribute("stateModifier")||"";}if(!this.disabled){switch(_105.type){case "mouseenter":case "mouseover":this._hovering=true;this._active=this._mouseDown;break;case "mouseout":case "mouseleave":this._hovering=false;this._active=false;break;case "mousedown":this._active=true;this._mouseDown=true;var _107=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus();}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(_107);});break;}this._setStateClass();}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none");},focus:function(){dijit.focus(this.focusNode);},_setStateClass:function(){var _108=this.baseClass.split(" ");function _109(_10a){_108=_108.concat(dojo.map(_108,function(c){return c+_10a;}),"dijit"+_10a);};if(this.checked){_109("Checked");}if(this.state){_109(this.state);}if(this.selected){_109("Selected");}if(this.disabled){_109("Disabled");}else{if(this.readOnly){_109("ReadOnly");}else{if(this._active){_109(this.stateModifier+"Active");}else{if(this._focused){_109("Focused");}if(this._hovering){_109(this.stateModifier+"Hover");}}}}var tn=this.stateNode||this.domNode,_10b={};dojo.forEach(tn.className.split(" "),function(c){_10b[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _10b[c];});}dojo.forEach(_108,function(c){_10b[c]=true;});var _10c=[];for(var c in _10b){_10c.push(c);}tn.className=_10c.join(" ");this._stateClasses=_108;},compare:function(val1,val2){if(typeof val1=="number"&&typeof val2=="number"){return (isNaN(val1)&&isNaN(val2))?0:val1-val2;}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_10d){},_onChangeActive:false,_handleOnChange:function(_10e,_10f){this._lastValue=_10e;if(this._lastValueReported==undefined&&(_10f===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_10e;}if((this.intermediateChanges||_10f||_10f===undefined)&&((typeof _10e!=typeof this._lastValueReported)||this.compare(_10e,this._lastValueReported)!=0)){this._lastValueReported=_10e;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(dojo.hitch(this,function(){this._onChangeHandle=null;this.onChange(_10e);}),0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass();},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported);}this.inherited(arguments);},setValue:function(_110){dojo.deprecated("dijit.form._FormWidget:setValue("+_110+") is deprecated.  Use attr('value',"+_110+") instead.","","2.0");this.attr("value",_110);},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value");}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{readOnly:false,attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_111){this.readOnly=_111;dojo.attr(this.focusNode,"readOnly",_111);dijit.setWaiState(this.focusNode,"readonly",_111);this._setStateClass();},postCreate:function(){if(dojo.isIE){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._resetValue=this.value;}},_setValueAttr:function(_112,_113){this.value=_112;this._handleOnChange(_112,_113);},_getValueAttr:function(){return this._lastValue;},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==dojo.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(dojo.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=dojo.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}}},_layoutHackIE7:function(){if(dojo.isIE==7){var _114=this.domNode;var _115=_114.parentNode;var _116=_114.firstChild||_114;var _117=_116.style.filter;while(_115&&_115.clientHeight==0){_115._disconnectHandle=this.connect(_115,"onscroll",dojo.hitch(this,function(e){this.disconnect(_115._disconnectHandle);_115.removeAttribute("_disconnectHandle");_116.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_116.style.filter=_117;},0);}));_115=_115.parentNode;}}}});}if(!dojo._hasResource["dijit._HasDropDown"]){dojo._hasResource["dijit._HasDropDown"]=true;dojo.provide("dijit._HasDropDown");dojo.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouse:function(e){if(e.type=="click"&&!this._seenKeydown){return;}this._seenKeydown=false;if(e.type=="mousedown"){this._docHandler=this.connect(dojo.doc,"onmouseup","_onDropDownMouseup");}if(this.disabled||this.readOnly){return;}if(this._stopClickEvents){dojo.stopEvent(e);}this.toggleDropDown();if(e.type=="click"||e.type=="keypress"){this._onDropDownMouseup();}},_onDropDownMouseup:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _118=this.dropDown,_119=false;if(e&&this._opened){var c=dojo.position(this._buttonNode,true);if(!(e.pageX>=c.x&&e.pageX<=c.x+c.w)||!(e.pageY>=c.y&&e.pageY<=c.y+c.h)){var t=e.target;while(t&&!_119){if(dojo.hasClass(t,"dijitPopup")){_119=true;}else{t=t.parentNode;}}if(_119){t=e.target;if(_118.onItemClick){var _11a;while(t&&!(_11a=dijit.byNode(t))){t=t.parentNode;}if(_11a&&_11a.onClick&&_11a.getParent){_11a.getParent().onItemClick(_11a,e);}}return;}}}if(this._opened&&_118.focus){window.setTimeout(dojo.hitch(_118,"focus"),1);}},_setupDropdown:function(){this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;this._aroundNode=this._aroundNode||this.domNode;this.connect(this._buttonNode,"onmousedown","_onDropDownMouse");this.connect(this._buttonNode,"onclick","_onDropDownMouse");this.connect(this._buttonNode,"onkeydown","_onDropDownKeydown");this.connect(this._buttonNode,"onblur","_onDropDownBlur");this.connect(this._buttonNode,"onkeypress","_onKey");if(this._setStateClass){this.connect(this,"openDropDown","_setStateClass");this.connect(this,"closeDropDown","_setStateClass");}var _11b={"after":this.isLeftToRight()?"Right":"Left","before":this.isLeftToRight()?"Left":"Right","above":"Up","below":"Down","left":"Left","right":"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";dojo.addClass(this._arrowWrapperNode||this._buttonNode,"dijit"+_11b+"ArrowButton");},postCreate:function(){this._setupDropdown();this.inherited(arguments);},destroyDescendants:function(){if(this.dropDown){if(!this.dropDown._destroyed){this.dropDown.destroyRecursive();}delete this.dropDown;}this.inherited(arguments);},_onDropDownKeydown:function(e){this._seenKeydown=true;},_onKeyPress:function(e){if(this._opened&&e.charOrCode==dojo.keys.ESCAPE&&!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.toggleDropDown();dojo.stopEvent(e);return;}this.inherited(arguments);},_onDropDownBlur:function(e){this._seenKeydown=false;},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){return;}}if(d&&this._opened&&e.keyCode==dojo.keys.ESCAPE){this.toggleDropDown();return;}if(e.keyCode==dojo.keys.DOWN_ARROW||e.keyCode==dojo.keys.ENTER||e.charOrCode==" "){this._onDropDownMouse(e);}},_onBlur:function(){this.closeDropDown();this.inherited(arguments);},isLoaded:function(){return true;},loadDropDown:function(_11c){_11c();},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}this.focus();var _11d=this.dropDown;if(!_11d){return;}if(!this._opened){if(!this.isLoaded()){this.loadDropDown(dojo.hitch(this,"openDropDown"));return;}else{this.openDropDown();}}else{this.closeDropDown();}},openDropDown:function(){var _11e=this.dropDown;var _11f=_11e.domNode;var self=this;if(!this._preparedNode){dijit.popup.moveOffScreen(_11f);this._preparedNode=true;if(_11f.style.width){this._explicitDDWidth=true;}if(_11f.style.height){this._explicitDDHeight=true;}}if(this.maxHeight||this.forceWidth||this.autoWidth){var _120={display:"",visibility:"hidden"};if(!this._explicitDDWidth){_120.width="";}if(!this._explicitDDHeight){_120.height="";}dojo.style(_11f,_120);var mb=dojo.marginBox(_11f);var _121=(this.maxHeight&&mb.h>this.maxHeight);dojo.style(_11f,{overflow:_121?"auto":"hidden"});if(this.forceWidth){mb.w=this.domNode.offsetWidth;}else{if(this.autoWidth){mb.w=Math.max(mb.w,this.domNode.offsetWidth);}else{delete mb.w;}}if(_121){mb.h=this.maxHeight;if("w" in mb){mb.w+=16;}}else{delete mb.h;}delete mb.t;delete mb.l;if(dojo.isFunction(_11e.resize)){_11e.resize(mb);}else{dojo.marginBox(_11f,mb);}}var _122=dijit.popup.open({parent:this,popup:_11e,around:this._aroundNode,orient:dijit.getPopupAroundAlignment((this.dropDownPosition&&this.dropDownPosition.length)?this.dropDownPosition:["below"],this.isLeftToRight()),onExecute:function(){self.closeDropDown(true);},onCancel:function(){self.closeDropDown(true);},onClose:function(){dojo.attr(self._popupStateNode,"popupActive",false);dojo.removeClass(self._popupStateNode,"dijitHasDropDownOpen");self._opened=false;self.state="";}});dojo.attr(this._popupStateNode,"popupActive","true");dojo.addClass(self._popupStateNode,"dijitHasDropDownOpen");this._opened=true;this.state="Opened";return _122;},closeDropDown:function(_123){if(this._opened){dijit.popup.close(this.dropDown);if(_123){this.focus();}this._opened=false;this.state="";}}});}if(!dojo._hasResource["dijit.form.Button"]){dojo._hasResource["dijit.form.Button"]=true;dojo.provide("dijit.form.Button");dojo.declare("dijit.form.Button",dijit.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:dojo.cache("dijit.form","templates/Button.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class=\"dijitReset dijitRight dijitInline\"\n\t\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\" waiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\"\n\t\t\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#10003;</span\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode\"\n\t\t\t\t></span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){if(this._onClick(e)===false){e.preventDefault();}else{if(this.type=="submit"&&!this.focusNode.form){for(var node=this.domNode;node.parentNode;node=node.parentNode){var _124=dijit.byNode(node);if(_124&&typeof _124._onSubmit=="function"){_124._onSubmit(e);break;}}}}},_setValueAttr:function(_125){var attr=this.attributeMap.value||"";if(this[attr.node||attr||"domNode"].tagName=="BUTTON"){if(_125!=this.value){console.debug("Cannot change the value attribute on a Button widget.");}}},_fillContent:function(_126){if(_126&&(!this.params||!("label" in this.params))){this.attr("label",_126.innerHTML);}},postCreate:function(){dojo.setSelectable(this.focusNode,false);this.inherited(arguments);},_setShowLabelAttr:function(val){if(this.containerNode){dojo.toggleClass(this.containerNode,"dijitDisplayNone",!val);}this.showLabel=val;},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_127){dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use attr('label', ...) instead.","","2.0");this.attr("label",_127);},_setLabelAttr:function(_128){this.containerNode.innerHTML=this.label=_128;if(this.showLabel==false&&!this.params.title){this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||"");}}});dojo.declare("dijit.form.DropDownButton",[dijit.form.Button,dijit._Container,dijit._HasDropDown],{baseClass:"dijitDropDownButton",templateString:dojo.cache("dijit.form","templates/DropDownButton.html","<span class=\"dijit dijitReset dijitLeft dijitInline\"\n\tdojoAttachPoint=\"_buttonNode\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><span class='dijitReset dijitRight dijitInline'\n\t\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\t\t><button class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\t\t${nameAttrSetting} type=\"${type}\" value=\"${value}\"\n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t\t><span class=\"dijitReset dijitInline\"\n\t\t\t\t\tdojoAttachPoint=\"iconNode\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\n\t\t\t\t\tid=\"${id}_label\"\n\t\t\t\t></span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\">&thinsp;</span\n\t\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t\t></button\n\t\t></span\n\t></span\n></span>\n"),_fillContent:function(){if(this.srcNodeRef){var _129=dojo.query("*",this.srcNodeRef);dijit.form.DropDownButton.superclass._fillContent.call(this,_129[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown){var _12a=dojo.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=dijit.byNode(_12a);delete this.dropDownContainer;}dijit.popup.moveOffScreen(this.dropDown.domNode);this.inherited(arguments);},isLoaded:function(){var _12b=this.dropDown;return (!_12b.href||_12b.isLoaded);},loadDropDown:function(){var _12c=this.dropDown;if(!_12c){return;}if(!this.isLoaded()){var _12d=dojo.connect(_12c,"onLoad",this,function(){dojo.disconnect(_12d);this.openDropDown();});_12c.refresh();}else{this.openDropDown();}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown;}});dojo.declare("dijit.form.ComboButton",dijit.form.DropDownButton,{templateString:dojo.cache("dijit.form","templates/ComboButton.html","<table class='dijit dijitReset dijitInline dijitLeft'\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\"><button id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdojoAttachEvent=\"onclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse,onkeypress:_onButtonKeyPress\"  dojoAttachPoint=\"titleNode\"\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\n\t\t></button></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onkeypress:_onArrowKeyPress\"\n\t\t\tstateModifier=\"DownArrow\"\n\t\t\ttitle=\"${optionsTitle}\" ${nameAttrSetting}\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\">&thinsp;</div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\n\t\t></td\n\t></tr></tbody\n></table>\n"),attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",_focusedNode:null,postCreate:function(){this.inherited(arguments);this._focalNodes=[this.titleNode,this._popupStateNode];var isIE=dojo.isIE;dojo.forEach(this._focalNodes,dojo.hitch(this,function(node){this.connect(node,isIE?"onactivate":"onfocus",this._onNodeFocus);this.connect(node,isIE?"ondeactivate":"onblur",this._onNodeBlur);}));if(isIE&&(isIE<8||dojo.isQuirks)){with(this.titleNode){style.width=scrollWidth+"px";this.connect(this.titleNode,"onresize",function(){setTimeout(function(){style.width=scrollWidth+"px";},0);});}}},_onNodeFocus:function(evt){this._focusedNode=evt.currentTarget;var fnc=this._focusedNode==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.addClass(this._focusedNode,fnc);},_onNodeBlur:function(evt){var fnc=evt.currentTarget==this.focusNode?"dijitDownArrowButtonFocused":"dijitButtonContentsFocused";dojo.removeClass(evt.currentTarget,fnc);},_onBlur:function(){this.inherited(arguments);this._focusedNode=null;},_onButtonKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){dijit.focus(this._popupStateNode);dojo.stopEvent(evt);}},_onArrowKeyPress:function(evt){if(evt.charOrCode==dojo.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){dijit.focus(this.titleNode);dojo.stopEvent(evt);}},focus:function(_12e){dijit.focus(_12e=="start"?this.titleNode:this._popupStateNode);}});dojo.declare("dijit.form.ToggleButton",dijit.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){this.attr("checked",!this.checked);},_setCheckedAttr:function(_12f){this.checked=_12f;dojo.attr(this.focusNode||this.domNode,"checked",_12f);dijit.setWaiState(this.focusNode||this.domNode,"pressed",_12f);this._setStateClass();this._handleOnChange(_12f,true);},setChecked:function(_130){dojo.deprecated("setChecked("+_130+") is deprecated. Use attr('checked',"+_130+") instead.","","2.0");this.attr("checked",_130);},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);}});}if(!dojo._hasResource["dijit._editor._Plugin"]){dojo._hasResource["dijit._editor._Plugin"]=true;dojo.provide("dijit._editor._Plugin");dojo.declare("dijit._editor._Plugin",null,{constructor:function(args,node){this.params=args||{};dojo.mixin(this,this.params);this._connects=[];},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:dijit.form.Button,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _131=this.getLabel(this.command);var _132=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _133=dojo.mixin({label:_131,showLabel:false,iconClass:_132,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_133);}}},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(dojo.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_134,_135;if(!e||!e.isLoaded||!c.length){return;}if(this.button){try{_135=e.queryCommandEnabled(c);if(this.enabled!==_135){this.enabled=_135;this.button.attr("disabled",!_135);}if(typeof this.button.checked=="boolean"){_134=e.queryCommandState(c);if(this.checked!==_134){this.checked=_134;this.button.attr("checked",e.queryCommandState(c));}}}catch(e){console.log(e);}}},setEditor:function(_136){this.editor=_136;this._initButton();if(this.command.length&&!this.editor.queryCommandAvailable(this.command)){if(this.button){this.button.domNode.style.display="none";}}if(this.button&&this.useDefaultCommand){this.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_137){if(this.button){_137.addChild(this.button);}}});}if(!dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]){dojo._hasResource["dijit._editor.plugins.EnterKeyHandling"]=true;dojo.provide("dijit._editor.plugins.EnterKeyHandling");dojo.declare("dijit._editor.plugins.EnterKeyHandling",dijit._editor._Plugin,{blockNodeForEnter:"BR",constructor:function(args){if(args){dojo.mixin(this,args);}},setEditor:function(_138){this.editor=_138;if(this.blockNodeForEnter=="BR"){if(dojo.isIE){_138.contentDomPreFilters.push(dojo.hitch(this,"regularPsToSingleLinePs"));_138.contentDomPostFilters.push(dojo.hitch(this,"singleLinePsToRegularPs"));_138.onLoadDeferred.addCallback(dojo.hitch(this,"_fixNewLineBehaviorForIE"));}else{_138.onLoadDeferred.addCallback(dojo.hitch(this,function(d){try{this.editor.document.execCommand("insertBrOnReturn",false,true);}catch(e){}return d;}));}}else{if(this.blockNodeForEnter){dojo["require"]("dijit._editor.range");var h=dojo.hitch(this,this.handleEnterKey);_138.addKeyHandler(13,0,0,h);_138.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(e){if(this._checkListLater){if(dojo.withGlobal(this.editor.window,"isCollapsed",dijit)){var _139=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,["LI"]);if(!_139){dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _13a=dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]);if(_13a){_13a.innerHTML=this.bogusHtmlContent;if(dojo.isIE){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(dojo.isMoz){if(_139.parentNode.parentNode.nodeName=="LI"){_139=_139.parentNode.parentNode;}}var fc=_139.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_139.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _13b=dijit.range.create(this.editor.window);_13b.setStart(_139.firstChild,0);var _13c=dijit.range.getSelection(this.editor.window,true);_13c.removeAllRanges();_13c.addRange(_13b);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&nbsp;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _13d,_13e,_13f,doc=this.editor.document,br;if(e.shiftKey){var _140=dojo.withGlobal(this.editor.window,"getParentElement",dijit._editor.selection);var _141=dijit.range.getAncestor(_140,this.blockNodes);if(_141){if(!e.shiftKey&&_141.tagName=="LI"){return true;}_13d=dijit.range.getSelection(this.editor.window);_13e=_13d.getRangeAt(0);if(!_13e.collapsed){_13e.deleteContents();_13d=dijit.range.getSelection(this.editor.window);_13e=_13d.getRangeAt(0);}if(dijit.range.atBeginningOfContainer(_141,_13e.startContainer,_13e.startOffset)){if(e.shiftKey){br=doc.createElement("br");_13f=dijit.range.create(this.editor.window);_141.insertBefore(br,_141.firstChild);_13f.setStartBefore(br.nextSibling);_13d.removeAllRanges();_13d.addRange(_13f);}else{dojo.place(br,_141,"before");}}else{if(dijit.range.atEndOfContainer(_141,_13e.startContainer,_13e.startOffset)){_13f=dijit.range.create(this.editor.window);br=doc.createElement("br");if(e.shiftKey){_141.appendChild(br);_141.appendChild(doc.createTextNode(" "));_13f.setStart(_141.lastChild,0);}else{dojo.place(br,_141,"after");_13f.setStartAfter(_141);}_13d.removeAllRanges();_13d.addRange(_13f);}else{return true;}}}else{dijit._editor.RichText.prototype.execCommand.call(this.editor,"inserthtml","<br>");}return false;}var _142=true;_13d=dijit.range.getSelection(this.editor.window);_13e=_13d.getRangeAt(0);if(!_13e.collapsed){_13e.deleteContents();_13d=dijit.range.getSelection(this.editor.window);_13e=_13d.getRangeAt(0);}var _143=dijit.range.getBlockAncestor(_13e.endContainer,null,this.editor.editNode);var _144=_143.blockNode;if((this._checkListLater=(_144&&(_144.nodeName=="LI"||_144.parentNode.nodeName=="LI")))){if(dojo.isMoz){this._pressedEnterInBlock=_144;}if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(_144.innerHTML)){_144.innerHTML="";if(dojo.isWebKit){_13f=dijit.range.create(this.editor.window);_13f.setStart(_144,0);_13d.removeAllRanges();_13d.addRange(_13f);}this._checkListLater=false;}return true;}if(!_143.blockNode||_143.blockNode===this.editor.editNode){try{dijit._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_143={blockNode:dojo.withGlobal(this.editor.window,"getAncestorElement",dijit._editor.selection,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_143.blockNode){if(_143.blockNode!=this.editor.editNode&&(!(_143.blockNode.textContent||_143.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_143.blockNode);return false;}}else{_143.blockNode=this.editor.editNode;}_13d=dijit.range.getSelection(this.editor.window);_13e=_13d.getRangeAt(0);}var _145=doc.createElement(this.blockNodeForEnter);_145.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_143.blockNode);if(dijit.range.atEndOfContainer(_143.blockNode,_13e.endContainer,_13e.endOffset)){if(_143.blockNode===_143.blockContainer){_143.blockNode.appendChild(_145);}else{dojo.place(_145,_143.blockNode,"after");}_142=false;_13f=dijit.range.create(this.editor.window);_13f.setStart(_145,0);_13d.removeAllRanges();_13d.addRange(_13f);if(this.editor.height){dijit.scrollIntoView(_145);}}else{if(dijit.range.atBeginningOfContainer(_143.blockNode,_13e.startContainer,_13e.startOffset)){dojo.place(_145,_143.blockNode,_143.blockNode===_143.blockContainer?"first":"before");if(_145.nextSibling&&this.editor.height){_13f=dijit.range.create(this.editor.window);_13f.setStart(_145.nextSibling,0);_13d.removeAllRanges();_13d.addRange(_13f);dijit.scrollIntoView(_145.nextSibling);}_142=false;}else{if(dojo.isMoz){this._pressedEnterInBlock=_143.blockNode;}}}return _142;},removeTrailingBr:function(_146){var para=/P|DIV|LI/i.test(_146.tagName)?_146:dijit._editor.selection.getParentOfType(_146,["P","DIV","LI"]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){dojo.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}},_fixNewLineBehaviorForIE:function(d){var doc=this.editor.document;if(doc.__INSERTED_EDITIOR_NEWLINE_CSS===undefined){var _147=dojo.create("style",{type:"text/css"},doc.getElementsByTagName("head")[0]);_147.styleSheet.cssText="p{margin:0;}";this.editor.document.__INSERTED_EDITIOR_NEWLINE_CSS=true;}return d;},regularPsToSingleLinePs:function(_148,_149){function _14a(el){function _14b(_14c){var newP=_14c[0].ownerDocument.createElement("p");_14c[0].parentNode.insertBefore(newP,_14c[0]);dojo.forEach(_14c,function(node){newP.appendChild(node);});};var _14d=0;var _14e=[];var _14f;while(_14d<el.childNodes.length){_14f=el.childNodes[_14d];if(_14f.nodeType==3||(_14f.nodeType==1&&_14f.nodeName!="BR"&&dojo.style(_14f,"display")!="block")){_14e.push(_14f);}else{var _150=_14f.nextSibling;if(_14e.length){_14b(_14e);_14d=(_14d+1)-_14e.length;if(_14f.nodeName=="BR"){dojo.destroy(_14f);}}_14e=[];}_14d++;}if(_14e.length){_14b(_14e);}};function _151(el){var _152=null;var _153=[];var _154=el.childNodes.length-1;for(var i=_154;i>=0;i--){_152=el.childNodes[i];if(_152.nodeName=="BR"){var newP=_152.ownerDocument.createElement("p");dojo.place(newP,el,"after");if(_153.length==0&&i!=_154){newP.innerHTML="&nbsp;";}dojo.forEach(_153,function(node){newP.appendChild(node);});dojo.destroy(_152);_153=[];}else{_153.unshift(_152);}}};var _155=[];var ps=_148.getElementsByTagName("p");dojo.forEach(ps,function(p){_155.push(p);});dojo.forEach(_155,function(p){var _156=p.previousSibling;if((_156)&&(_156.nodeType==1)&&(_156.nodeName=="P"||dojo.style(_156,"display")!="block")){var newP=p.parentNode.insertBefore(this.document.createElement("p"),p);newP.innerHTML=_149?"":"&nbsp;";}_151(p);},this.editor);_14a(_148);return _148;},singleLinePsToRegularPs:function(_157){function _158(node){var ps=node.getElementsByTagName("p");var _159=[];for(var i=0;i<ps.length;i++){var p=ps[i];var _15a=false;for(var k=0;k<_159.length;k++){if(_159[k]===p.parentNode){_15a=true;break;}}if(!_15a){_159.push(p.parentNode);}}return _159;};function _15b(node){return (!node.childNodes.length||node.innerHTML=="&nbsp;");};var _15c=_158(_157);for(var i=0;i<_15c.length;i++){var _15d=_15c[i];var _15e=null;var node=_15d.firstChild;var _15f=null;while(node){if(node.nodeType!=1||node.tagName!="P"||(node.getAttributeNode("style")||{}).specified){_15e=null;}else{if(_15b(node)){_15f=node;_15e=null;}else{if(_15e==null){_15e=node;}else{if((!_15e.lastChild||_15e.lastChild.nodeName!="BR")&&(node.firstChild)&&(node.firstChild.nodeName!="BR")){_15e.appendChild(this.editor.document.createElement("br"));}while(node.firstChild){_15e.appendChild(node.firstChild);}_15f=node;}}}node=node.nextSibling;if(_15f){dojo.destroy(_15f);_15f=null;}}}return _157;}});}if(!dojo._hasResource["dijit.Editor"]){dojo._hasResource["dijit.Editor"]=true;dojo.provide("dijit.Editor");dojo.declare("dijit.Editor",dijit._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){if(!dojo.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","dijit._editor.plugins.EnterKeyHandling"];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(dojo.isIE){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postCreate:function(){if(this.customUndo){dojo["require"]("dijit._editor.range");this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);}if(dojo.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=dojo.i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new dijit.Toolbar({});dojo.place(this.toolbar.domNode,this.editingArea,"before");}dojo.forEach(this.plugins,this.addPlugin,this);this.onNormalizedDisplayChanged();this.toolbar.startup();},destroy:function(){dojo.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_160,_161){var args=dojo.isString(_160)?{name:_160}:_160;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};dojo.publish(dijit._scopeName+".Editor.getPlugin",[o]);if(!o.plugin){var pc=dojo.getObject(args.name);if(pc){o.plugin=new pc(args);}}if(!o.plugin){console.warn("Cannot find plugin",_160);return;}_160=o.plugin;}if(arguments.length>1){this._plugins[_161]=_160;}else{this._plugins.push(_160);}_160.setEditor(this);if(dojo.isFunction(_160.setToolbar)){_160.setToolbar(this.toolbar);}},startup:function(){},resize:function(size){if(size){dijit.layout._LayoutWidget.prototype.resize.apply(this,arguments);}},layout:function(){this.editingArea.style.height=(this._contentBox.h-dojo.marginBox(this.toolbar.domNode).h)+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _162=this.document.body.componentFromPoint(e.x,e.y);if(!_162){delete this._savedSelection;if(e.target.tagName=="BODY"){setTimeout(dojo.hitch(this,"placeCursorAtEnd"),0);}this.inherited(arguments);}},onBeforeActivate:function(e){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:dojo.isIE,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){clearTimeout(this._editTimer);}this._editTimer=setTimeout(dojo.hitch(this,this.endEditing),this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r;try{r=this.inherited("execCommand",arguments);if(dojo.isWebKit&&cmd=="paste"&&!r){throw {code:1011};}}catch(e){if(e.code==1011&&/copy|cut|paste/.test(cmd)){var sub=dojo.string.substitute,_163={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[dojo.isMac?"appleKey":"ctrlKey"],[_163[cmd]])]));}r=false;}if(this.customUndo){this._endEditing();}return r;}},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited("queryCommandEnabled",arguments);}},_moveToBookmark:function(b){var _164=b.mark;var mark=b.mark;var col=b.isCollapsed;if(dojo.isIE){if(dojo.isArray(mark)){_164=[];dojo.forEach(mark,function(n){_164.push(dijit.range.getNode(n,this.editNode));},this);}}else{var r=dijit.range.create(this.window);r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);_164=r;}dojo.withGlobal(this.window,"moveToBookmark",dijit,[{mark:_164,isCollapsed:col}]);},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){this.endEditing(true);var s=this._steps.pop();if(this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();return true;}return false;},redo:function(){this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();return true;}return false;},endEditing:function(_165){if(this._editTimer){clearTimeout(this._editTimer);}if(this._inEditing){this._endEditing(_165);this._inEditing=false;}},_getBookmark:function(){var b=dojo.withGlobal(this.window,dijit.getBookmark);var tmp=[];if(b.mark){var mark=b.mark;if(dojo.isIE){if(dojo.isArray(mark)){dojo.forEach(mark,function(n){tmp.push(dijit.range.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}else{tmp=dijit.range.getIndex(mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:mark.startOffset,endContainer:mark.endContainer===mark.startContainer?tmp:dijit.range.getIndex(mark.endContainer,this.editNode).o,endOffset:mark.endOffset};}}return b;},_beginEditing:function(cmd){if(this._steps.length===0){this._steps.push({"text":this.savedContent,"bookmark":this._getBookmark()});}},_endEditing:function(_166){var v=this.getValue(true);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!dojo.isIE&&!this.iframe&&e.keyCode==dojo.keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode,ks=dojo.keys;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){dojo.stopEvent(e);this.undo();return;}else{if(k==89||k==121){dojo.stopEvent(e);this.redo();return;}}}this.inherited(arguments);switch(k){case ks.ENTER:case ks.BACKSPACE:case ks.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");setTimeout(dojo.hitch(this,this.endEditing),1);}else{this.beginEditing("paste");setTimeout(dojo.hitch(this,this.endEditing),1);}break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<dojo.keys.F1||e.keyCode>dojo.keys.F15)){this.beginEditing();break;}case ks.ALT:this.endEditing();break;case ks.UP_ARROW:case ks.DOWN_ARROW:case ks.LEFT_ARROW:case ks.RIGHT_ARROW:case ks.HOME:case ks.END:case ks.PAGE_UP:case ks.PAGE_DOWN:this.endEditing(true);break;case ks.CTRL:case ks.SHIFT:case ks.TAB:break;}},_onBlur:function(){this.inherited("_onBlur",arguments);this.endEditing(true);},_saveSelection:function(){this._savedSelection=this._getBookmark();},_restoreSelection:function(){if(this._savedSelection){if(dojo.withGlobal(this.window,"isCollapsed",dijit)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);}});dojo.subscribe(dijit._scopeName+".Editor.getPlugin",null,function(o){if(o.plugin){return;}var args=o.args,p;var _167=dijit._editor._Plugin;var name=args.name;switch(name){case "undo":case "redo":case "cut":case "copy":case "paste":case "insertOrderedList":case "insertUnorderedList":case "indent":case "outdent":case "justifyCenter":case "justifyFull":case "justifyLeft":case "justifyRight":case "delete":case "selectAll":case "removeFormat":case "unlink":case "insertHorizontalRule":p=new _167({command:name});break;case "bold":case "italic":case "underline":case "strikethrough":case "subscript":case "superscript":p=new _167({buttonClass:dijit.form.ToggleButton,command:name});break;case "|":p=new _167({button:new dijit.ToolbarSeparator()});}o.plugin=p;});}dojo.i18n._preloadLocalizations("dojo.nls.pb_dojo_editor",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
