Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Utils={setElementClassName:function(_1,_2){
if(!_1){
return "";
}
if(!_2){
_1.className="";
_1.removeAttribute("class",0);
_1.removeAttribute("classname",0);
}else{
var _3=_1.className;
_1.className=_2;
return _3;
}
},addElementsToSelection:function(_4,_5){
if($telerik.isIE){
Telerik.Web.UI.Editor.Utils.selectElement(_4,_5[0]);
return 1;
}
var _6=_4.getSelection();
var _7=new Telerik.Web.UI.Editor.Selection(_4);
var _8=_7.getRange();
if(!_8||!_8.selectNodeContents){
return -1;
}
if(_6.removeAllRanges){
_6.removeAllRanges();
}
for(var i=0;i<_5.length;i++){
_8.selectNodeContents(_5[i]);
_6.addRange(_8);
}
return _5.length;
},getFullySelectedElement:function(_a){
return $telerik.isIE?Telerik.Web.UI.Editor.Utils._getFullySelectedElementIE(_a):Telerik.Web.UI.Editor.Utils._getFullySelectedElementMoz(_a);
},_isListFullySelected:function(_b,_c){
if(_b.tagName=="UL"||_b.tagName=="OL"){
var _d=_c.match(/<LI\/?>/gi);
if(_d.length==_b.getElementsByTagName("LI").length){
return true;
}
}
return false;
},_getFullySelectedElementIE:function(_e){
var _f=new Telerik.Web.UI.Editor.Selection(_e);
var _10=_f.getRange();
var _11=(_10.length>0?_10(0):_10.parentElement());
if(_10.length>0){
return _11;
}else{
if(Telerik.Web.UI.Editor.Utils._isListFullySelected(_11,_f.getHtml())){
return _11;
}else{
if(!_10.htmlText){
return null;
}
}
}
var _12=_10.duplicate();
var _13=_10.duplicate();
_12.collapse(true);
_13.collapse(false);
var _14=_12.parentElement();
if(_14.parentNode==_11){
_14=_11;
}
var _15=_13.parentElement();
if(_14==_15){
var doc=_e.document;
var _17=doc.body.createTextRange();
_17.moveToElementText(_14);
var _18=_10.htmlText;
var _19=false;
var _1a=_14.outerHTML.replace(/[\r\n\t]/ig,"");
var _1b=_14.innerHTML.replace(/[\r\n\t]/ig,"");
var _18=_18.replace(/[\r\n\t]/ig,"");
if(_1a==_18||_1b==_18){
_19=true;
}
if(_19||(0==_17.compareEndPoints("StartToStart",_10)&&0==_17.compareEndPoints("EndToEnd",_10))){
if("BODY"!=_11.tagName){
return _11;
}
}
}
},_getFullySelectedElementMoz:function(_1c){
var doc=_1c.document;
var _1e=_1c.getSelection();
if(_1e.rangeCount<1){
return null;
}
var _1f=_1e.getRangeAt(0);
var _20=_1f.commonAncestorContainer;
var _21=_20.parentNode;
var _22=new Telerik.Web.UI.Editor.Selection(_1c);
if($telerik.isFirefox){
var _23=_22.getHtml();
var div=document.createElement("DIV");
div.innerHTML=_23;
if(div.childNodes.length==1&&div.firstChild.nodeType==1){
var _25=div.firstChild.tagName;
var _26=_1f.startContainer;
if(_26.nodeType==1){
if(_26.tagName==_25){
return _26;
}else{
if(_26.getElementsByTagName){
var _26=_26.getElementsByTagName(_25)[0];
if(_26){
return _26;
}
}
}
}else{
while(_26){
if(_25==_26.tagName){
return _26;
}
_26=_26.nextSibling;
}
}
}
}
if(_20.tagName=="BODY"){
var _27=_22.getParentElement();
if(_27&&_27.tagName!="BODY"){
return _27;
}
}else{
var _28=doc.createElement("SPAN");
_28.appendChild(_1f.cloneContents());
if(_28.innerHTML==_21.innerHTML&&_21.tagName!="BODY"){
return _21;
}
}
if(Telerik.Web.UI.Editor.Utils._isListFullySelected(_20,_22.getHtml())){
return _20;
}
},getInvisibleParent:function(_29){
while(_29!=document){
if("none"==$telerik.getCurrentStyle(_29,"display","")){
return _29;
}
_29=_29.parentNode;
}
return null;
},evalScriptCode:function(_2a){
var _2b=$telerik.isSafari;
if(_2b){
_2a=_2a.replace(/^\s*<!--((.|\n)*)-->\s*$/mi,"$1");
}
var _2c=document.createElement("script");
_2c.setAttribute("type","text/javascript");
if(_2b){
_2c.appendChild(document.createTextNode(_2a));
}else{
_2c.text=_2a;
}
var _2d=document.getElementsByTagName("head")[0];
_2d.appendChild(_2c);
if(_2b){
_2c.innerHTML="";
}else{
_2c.parentNode.removeChild(_2c);
}
},cleanPastedContent:function(_2e,_2f,_30,_31){
var _32=_2e;
if(_2f==Telerik.Web.UI.StripFormattingOptions.None){
if((_2e.match(/style="[^"]*?mso[^"]*?"/ig)||_2e.match(/class="?[^"]*?mso[^"]*?"?/ig))&&confirm(_30)){
_32=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"WORD");
}
}else{
if(_2f&Telerik.Web.UI.StripFormattingOptions.All){
_32=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"ALL");
}else{
if(_2f&Telerik.Web.UI.StripFormattingOptions.AllExceptNewLines){
_32=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"ALL_NO_BRAKES");
}else{
if(_2f&Telerik.Web.UI.StripFormattingOptions.MSWordRemoveAll){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"WORD_ALL");
}
if(_2f&Telerik.Web.UI.StripFormattingOptions.MSWordNoFonts){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"WORD_NO_FONTS");
}
if(_2f&Telerik.Web.UI.StripFormattingOptions.MSWord){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"WORD");
}
if(_2f&Telerik.Web.UI.StripFormattingOptions.Css){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"CSS");
}
if(_2f&Telerik.Web.UI.StripFormattingOptions.Font){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"FONT");
}
if(_2f&Telerik.Web.UI.StripFormattingOptions.Span){
_2e=Telerik.Web.UI.Editor.Utils.stripFormatting(_2e,"SPAN");
}
_32=_2e;
}
}
}
if(null!=_31&&false==_31){
_32=Telerik.Web.UI.Editor.Utils.stripFormatting(_32,"SCRIPT");
}
return _32;
},isCursorMovingKey:function(_33){
if(_33>=33&&_33<=40){
return true;
}
return false;
},isSystemKey:function(_34){
if(_34>=112&&_34<=123){
return true;
}
if(_34>=8&&_34<=27){
return true;
}
if(_34>=32&&_34<=46){
return true;
}
if(_34==93){
return true;
}
return false;
},storeBrowserPosition:function(){
var _35=document.body;
var _36=document.documentElement;
this._browserTop=_35.scrollTop>_36.scrollTop?_35.scrollTop:_36.scrollTop;
this._browserLeft=_35.scrollLeft>_36.scrollLeft?_35.scrollTop:_36.scrollLeft;
return {x:this._browserLeft,y:this._browserTop};
},restoreBrowserPosition:function(_37,top){
try{
if(null==_37){
_37=this._browserLeft;
}
if(null==top){
top=this._browserTop;
}
var _39=document.body;
var _3a=document.documentElement;
_39.scrollTop=top;
_39.scrollLeft=_37;
_3a.scrollTop=top;
_3a.scrollLeft=_37;
}
catch(ex){
}
},_getPasteIframe:function(){
if(!this._pasteIframe){
this._pasteIframe=document.createElement("IFRAME");
var _3b=this._pasteIframe.style;
_3b.width="1px";
_3b.height="1px";
_3b.border="0px solid red";
_3b.overflow="hidden";
_3b.position="absolute";
document.body.appendChild(this._pasteIframe);
try{
var doc=this._pasteIframe.contentWindow.document;
var _3d=doc.open("text/html","replace");
var _3e="<html><head><title>New Document</title></head>"+"<body contentEditable='true' style='overflow:hidden;margin:0px;padding:0px;height:100%'>"+"</html>";
_3d.write(_3e);
_3d.close();
}
catch(e){
}
}
return this._pasteIframe;
},getPasteContainer:function(){
var _3f=this._getPasteIframe();
return _3f.contentWindow.document.body;
},getClipboardAsHtml:function(){
var div=this.getPasteContainer();
div.innerHTML="";
if(div.setActive){
div.setActive();
}
document.execCommand("Paste",null);
var _41=div.innerHTML;
div.innerHTML="";
return _41;
},stripFormatting:function(_42,_43){
switch(_43){
case "ALL":
_42=_42.replace(/<\/?[^>]*>/ig,"");
break;
case "ALL_NO_BRAKES":
_42=_42.replace(/<BR(\s[^>]*)?\/?>/ig,"~RADEDITORBRAKE~");
_42=_42.replace(/<\/?[^>]*>/ig,"");
_42=_42.replace(/~RADEDITORBRAKE~/ig,"<br/>");
_42=_42.replace(/\n/ig,"<br/>");
_42=_42.replace(/\r/ig,"");
break;
case "WORD":
case "WORD_ALL":
case "WORD_NO_FONTS":
_42=this.stripWordFormatting(_42,_43);
break;
case "CSS":
_42=_42.replace(new RegExp("(<[^>]+) class=[^ |^>]*([^>]*>)","ig"),"$1 $2");
_42=_42.replace(/(<[^>]+) style="[^"]*"([^>]*>)/ig,"$1 $2");
break;
case "FONT":
_42=_42.replace(/<\/?font[^>]*>/ig,"");
break;
case "SPAN":
_42=_42.replace(/<\/?span[^>]*>/ig,"");
break;
case "SCRIPT":
_42=_42.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_42=_42.replace(new RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
break;
default:
break;
}
return _42;
},replaceNewLineWithBr:function(_44){
try{
_44=_44.replace(/\n/g,"<br>");
return _44;
}
catch(exc){
}
},convertText2Html:function(_45){
try{
_45=_45.replace(/</g,"&lt;");
_45=_45.replace(/>/g,"&gt;");
_45=_45.replace(/\n/g,"<br>");
return _45;
}
catch(exc){
}
},clearWordAttributesInElement:function(_46,_47){
var _48=$telerik.isIE?_46.all:_46.getElementsByTagName("*");
for(var i=0;i<_48.length;i++){
var _4a=_48[i];
var _4b=new RegExp("mso","gi");
if(_4a.nodeType==1){
if(_4b.exec(_4a.className)){
_4a.className="";
}
_4a.removeAttribute("lang","",0);
_4a.removeAttribute("stylw","",0);
_4a.style.cssText=_4a.style.cssText.replace(/(([\w-]*?mso[\w-]*?):(.+?)([;^$]|$))/gi,"");
if($telerik.isIE){
_4a.style.removeAttribute("tab-stops",0);
_4a.style.removeAttribute("textIndent",0);
}
if($telerik.isIE&&(_47=="WORD_NO_FONTS"||_47=="WORD_ALL")){
_4a.style.removeAttribute("fontFamily",0);
_4a.removeAttribute("face",0);
}
for(j=_4a.attributes.length-1;j>=0;j--){
var _4c=_4a.attributes[j];
if("null"!=_4c.value&&""!=_4c.value){
if(_4b.exec(_4c.name)||_4b.exec(_4c.value)){
_4a.removeAttribute(_4c.name);
}
}
}
}
}
},stripWordFormatting:function(_4d,_4e){
if(_4e=="WORD_ALL"){
var _4f=/<SPAN[^>]*?>([\s\S]*?)<\/SPAN[^>]*?>/ig;
while(_4d.match(_4f)){
_4d=_4d.replace(_4f,"$1");
}
var _50=/<FONT[^>]*?>([\s\S]*?)<\/FONT[^>]*?>/ig;
while(_4d.match(_50)){
_4d=_4d.replace(_50,"$1");
}
}
_4d=_4d.replace(/<span>([^<>]+)<\/span>/gi,"<span EditorSaved='true'>$1</span>");
_4d=_4d.replace(/<font>([^<>]+)<\/font>/gi,"<font EditorSaved='true'>$1</font>");
var _51=document.createElement("DIV");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_51,_4d);
this.clearWordAttributesInElement(_51,_4e);
var _52=_51.innerHTML;
if($telerik.isFirefox){
_52=_52.replace(/<link [^>]+>/ig,"");
_52=_52.replace(/<meta [^>]+>/ig,"");
_52=_52.replace(/<!--\[if [^\]]+]>[\s\S]+?<!\[endif\]-->/ig,"");
}
_52=_52.replace(/\t/g," ");
_52=_52.replace(/<\/?\w+:[^>]*>/gi,"");
_52=_52.replace(/<\\?\??xml[^>]>/gi,"");
_52=_52.replace(/<p>&nbsp;<\/p>/gi,"<BR><BR>");
_52=_52.replace(/[ ]+/g," ");
_52=_52.replace(/<(\/)?strong>/ig,"<$1B>");
_52=_52.replace(/<(\/)?em>/ig,"<$1I>");
_52=_52.replace(/^\s/i,"");
_52=_52.replace(/\s$/i,"");
_52=_52.replace(/<o:[pP]>&nbsp;<\/o:[pP]>/gi,"");
_52=_52.replace(/<st1:.*?>/gi,"");
_52=_52.replace(/<font>([^<>]+)<\/font>/gi,"$1");
_52=_52.replace(/<span>([^<>]+)<\/span>/gi,"$1");
_52=_52.replace(/[\s]+EditorSaved=[\'\"]true[\'\"]/gi,"");
_52=_52.replace(/<\?xml[^>]*>/ig,"");
_52=_52.replace(/<\/?[a-z]+:[^>]*>/ig,"");
_52=_52.replace(/style=(""|'')/ig,"");
_52=_52.replace(/class=(""|'')/ig,"");
_52=_52.replace(/v:shape="[^"]+"/ig,"");
_52=_52.replace(/<span[^>]*>\s*<\/span[^>]*>/ig," ");
_52=_52.replace(/<font[^>]*>\s*<\/font[^>]*>/ig," ");
_52=_52.replace(/\s+/ig," ");
_52=_52.replace(/<span><span>/ig,"<span>");
_52=_52.replace(/<\/span><\/span>/ig,"</span>");
return _52;
},createTable:function(_53,_54,_55){
if(!_55){
_55=document;
}
var _56=_55.createElement("TABLE");
for(var r=0;r<_53;r++){
oRow=_56.insertRow(-1);
for(var c=0;c<_54;c++){
oCell=oRow.insertCell(-1);
oCell.innerHTML="&nbsp;";
}
}
return _56;
},mergeElementAttributes:function(_59,_5a,_5b){
if(!_59||!_5a){
return;
}
if(_59.mergeAttributes){
_5a.mergeAttributes(_59,_5b);
}else{
for(var ac=0;ac<_59.attributes.length;ac++){
var _5d=_59.attributes[ac].nodeValue;
_5a.setAttribute(_59.attributes[ac].nodeName,_5d);
}
if(""==_5a.getAttribute("style")){
_5a.removeAttribute("style");
}
}
},getElementParentByTag:function(_5e,_5f){
if(null==_5e){
return null;
}
if(null==_5f){
return _5e;
}
try{
while(_5e&&null!=_5e.tagName&&_5e.tagName!=_5f){
_5e=_5e.parentNode;
}
return ((_5e.tagName==_5f)?_5e:null);
}
catch(e){
return null;
}
},selectElement:function(_60,_61){
if(!_61){
return;
}
var _62=_60.document;
if($telerik.isIE){
var _63;
switch(_61.tagName){
case "TABLE":
case "IMG":
case "HR":
case "INPUT":
_63=_62.body.createControlRange();
_63.add(_61);
break;
case "UL":
case "OL":
_63=_62.body.createTextRange();
_63.moveToElementText(_61);
var _64=_63.parentElement();
if(_64.tagName!="UL"||_64.tagName!="OL"){
_63.moveEnd("character",-1);
}
break;
default:
_63=_62.body.createTextRange();
_63.moveToElementText(_61);
break;
}
if(_63){
_63.select();
return true;
}
}else{
if(_60.getSelection){
var _63=_62.createRange();
_63.selectNode(_61);
if(window.opera){
_63.selectNodeContents(_61);
}
var _65=_60.getSelection();
if($telerik.isSafari){
_65.setBaseAndExtent(_63.startContainer,_63.startOffset,_63.endContainer,_63.endOffset);
}else{
_65.removeAllRanges();
_65.addRange(_63);
}
return true;
}
}
return false;
},getOuterHtml:function(_66){
return $telerik.getOuterHtml(_66);
},setElementInnerHtml:function(_67,_68){
var _69=$telerik.isIE?this.getStoredOriginalPathsAndAttributes(_68):_68;
_67.innerHTML="<span>&nbsp;</span>"+_69;
_67.removeChild(_67.firstChild);
if($telerik.isIE){
this.restoreOriginalPathsAndAttributes(_67);
}
},removeNode:function(_6a){
var _6b=_6a.parentNode;
if(_6b!=null){
while(_6a.childNodes&&_6a.childNodes.length>0){
_6b.insertBefore(_6a.childNodes[0],_6a);
}
_6b.removeChild(_6a);
return _6b;
}
return true;
},getStoredOriginalPathsAndAttributes:function(_6c){
var _6d=function(_6e,g1,g2,g3,g4,g5,g6,_75,_76){
if(!g3){
g3="";
g4=g4+g6;
var _77=g4.search(/(\s|>)/gi);
if(_77>0){
g6=g4.substring(_77,g4.length);
g4=g4.substring(0,_77);
}else{
return _6e;
}
}
return g1+" "+g2+"="+g3+g4+g3+" originalAttribute=\""+g2+"\" originalPath=\""+g4+"\""+g6;
};
var _78=new RegExp("(<[^>]*?)\\s(href|src)\\s*=\\s*('|\")?(.+?)(\\3)([^<]*?>)","ig");
_6c=_6c.replace(_78,_6d);
var _79=new RegExp("(<!--[\\s\\S]*?) originalAttribute=\"(href|src)\" originalPath=\"[^\"]+\"([\\s\\S]*?-->)","ig");
var _7a=_6c.length+1;
while(_6c.length<_7a){
_7a=_6c.length;
_6c=_6c.replace(_79,"$1$3");
}
return _6c;
},restoreOriginalPathsAndAttributes:function(_7b){
var _7c=_7b.getElementsByTagName("*");
for(var i=0;i<_7c.length;i++){
var _7e=_7c[i];
var _7f=_7e.getAttribute("originalPath");
var _80=_7e.getAttribute("originalAttribute");
if(_7f!=null&&_80!=null){
_7e.removeAttribute("originalPath");
_7e.removeAttribute("originalAttribute");
if(_7f.toLowerCase().indexOf("mailto:")==0){
continue;
}
_7f=_7f.replace(window.location.href+"#","#");
_7e.removeAttribute(_80);
var _81=_7e.innerHTML;
_7e.setAttribute(_80,_7f);
if(_81!=_7e.innerHTML){
_7e.innerHTML=_81;
}
}
}
},_encodeHtmlContent:function(_82,_83){
var _84=new Array("%","<",">","!","\"","#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+");
var _85=_82;
if(_83){
for(var i=0;i<_84.length;i++){
_85=_85.replace(new RegExp("\\x"+_84[i].charCodeAt(0).toString(16),"ig"),"%"+_84[i].charCodeAt(0).toString(16));
}
}else{
for(var i=_84.length-1;i>=0;i--){
_85=_85.replace(new RegExp("%"+_84[i].charCodeAt(0).toString(16),"ig"),_84[i]);
}
}
return _85;
},encodePostbackContent:function(_87){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_87,true);
},decodePostbackContent:function(_88){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_88,false);
},addStyleSheet:function(url,doc,id){
doc=doc||document;
var _8c=doc.createElement("link");
_8c.setAttribute("href",url,0);
_8c.setAttribute("type","text/css");
if(id){
_8c.setAttribute("id",id);
}else{
id="";
}
_8c.setAttribute("rel","stylesheet",0);
var _8d=doc.getElementsByTagName("head")[0];
if($telerik.isSafari){
var _8e=function(){
_8d.appendChild(_8c);
};
window.setTimeout(_8e,200);
}else{
_8d.appendChild(_8c);
}
},_copyElementsBetweenNodes:function(_8f,_90,_91){
var _92=_8f.getElementsByTagName(_91);
var _93=_90.getElementsByTagName(_91);
for(var i=0;i<_92.length;i++){
switch(_91){
case "script":
case "title":
_93[i].text=_92[i].text;
break;
case "style":
if(_93[i].innerHTML!=_92[i].innerHTML){
_93[i].styleSheet.cssText=_92[i].styleSheet.cssText;
}
break;
default:
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_93[i],_92[i].innerHTML);
break;
}
}
},cloneNodeWithChildren:function(_95){
if(!_95){
return null;
}
if($telerik.isIE&&_95.getElementsByTagName){
var _96=_95.cloneNode(true);
if(typeof (_96.innerHTML)!="string"){
this.setElementInnerHtml(_96,_95.innerHTML);
}
this._copyElementsBetweenNodes(_95,_96,"script");
this._copyElementsBetweenNodes(_95,_96,"map");
this._copyElementsBetweenNodes(_95,_96,"style");
this._copyElementsBetweenNodes(_95,_96,"title");
return _96;
}else{
return _95.cloneNode(true);
}
},getUniqueID:function(){
if(!window["RadEditor_uniqueSeed"]){
window["RadEditor_uniqueSeed"]=new Date()-101;
}
if(!window["RadEditor_uniqueIdCounter"]){
window["RadEditor_uniqueIdCounter"]=1;
}else{
window["RadEditor_uniqueIdCounter"]++;
}
var _97=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_97;
}};
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorCommandEventArgs=function(_98,_99,_9a){
Telerik.Web.UI.EditorCommandEventArgs.initializeBase(this);
this._name=this._commandName=_98;
this._tool=_99;
this._value=_9a;
this.value=_9a;
};
Telerik.Web.UI.EditorCommandEventArgs.prototype={get_name:function(){
return this._name;
},get_commandName:function(){
return this._commandName;
},get_tool:function(){
return this._tool;
},get_value:function(){
return this._value;
},set_value:function(val){
this.value=val;
this._value=val;
}};
Telerik.Web.UI.EditorCommandEventArgs.registerClass("Telerik.Web.UI.EditorCommandEventArgs",Sys.CancelEventArgs);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandStates=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.Editor.CommandStates.prototype={Disabled:-1,Off:0,On:1};
Telerik.Web.UI.Editor.CommandStates.registerEnum("Telerik.Web.UI.Editor.CommandStates",false);
Telerik.Web.UI.Editor.CommandBase=function(_9c,_9d,_9e){
this.isSafari=$telerik.isSafari;
this.isIE=$telerik.isIE;
this.isOpera=$telerik.isOpera;
this.isFirefox=$telerik.isFirefox;
this._title=_9c;
this._window=_9d;
this._isExecuted=false;
this._canUnexecute=(_9e!=false);
};
Telerik.Web.UI.Editor.CommandBase.prototype={get_argument:function(){
return null;
},getState:function(_9f){
return Telerik.Web.UI.Editor.CommandStates.Off;
},getValue:function(_a0){
return null;
},set_window:function(_a1){
this._window=_a1;
},get_window:function(){
return this._window;
},get_title:function(){
return this._title;
},set_title:function(_a2){
this._title=_a2;
},execute:function(){
this._isExecuted=false;
if(null==this.onExecute||null==this.get_window()){
return false;
}
try{
if(!this.RestorePoint1){
this.RestorePoint1=new Telerik.Web.UI.Editor.RestorePoint(this.get_window());
}else{
this.RestorePoint1.select();
}
return (this._isExecuted=this.onExecute());
}
catch(ex){
}
return false;
},onExecute:function(){
if(this.isIE&&null!=this.OnExecuteIE){
return this.OnExecuteIE();
}else{
if(null!=window.getSelection&&null!=this.OnExecuteMoz){
return this.OnExecuteMoz();
}
}
return false;
},unexecute:function(){
try{
if(this._canUnexecute&&this._isExecuted){
this.RestorePoint1.restore();
}
}
catch(ex){
}
}};
Telerik.Web.UI.Editor.CommandBase.registerClass("Telerik.Web.UI.Editor.CommandBase",null);
Telerik.Web.UI.Editor.PasteHtmlCommand=function(_a3,_a4,_a5,_a6){
Telerik.Web.UI.Editor.PasteHtmlCommand.initializeBase(this,[(_a3||"Insert Html"),_a4,true]);
this.HtmlText=_a5;
this.SelectText=(true==_a6);
};
Telerik.Web.UI.Editor.PasteHtmlCommand.prototype={clone:function(){
return new Telerik.Web.UI.Editor.PasteHtmlCommand(this.get_title(),this.get_window(),this.HtmlText);
},onExecute:function(){
var sel=new Telerik.Web.UI.Editor.Selection(this.get_window());
sel.pasteHtml(this.HtmlText,this.SelectText);
return true;
}};
Telerik.Web.UI.Editor.PasteHtmlCommand.registerClass("Telerik.Web.UI.Editor.PasteHtmlCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.GenericCommand=function(_a8,_a9){
Telerik.Web.UI.Editor.GenericCommand.initializeBase(this,[_a8,_a9,true]);
this.RestorePoint1=new Telerik.Web.UI.Editor.RestorePoint(this.get_window());
};
Telerik.Web.UI.Editor.GenericCommand.prototype={execute:function(){
if(null==this.RestorePoint2){
this.RestorePoint2=new Telerik.Web.UI.Editor.RestorePoint(this.get_window());
}else{
this.RestorePoint2.restore();
}
return true;
},unexecute:function(){
this.RestorePoint1.restore(true);
}};
Telerik.Web.UI.Editor.GenericCommand.registerClass("Telerik.Web.UI.Editor.GenericCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TextTypeCommand=function(_aa,_ab){
Telerik.Web.UI.Editor.TextTypeCommand.initializeBase(this,[(_aa||"Typing"),_ab]);
};
Telerik.Web.UI.Editor.TextTypeCommand.prototype={update:function(){
if(this.RestorePoint2){
this.RestorePoint2.update();
}
}};
Telerik.Web.UI.Editor.TextTypeCommand.registerClass("Telerik.Web.UI.Editor.TextTypeCommand",Telerik.Web.UI.Editor.GenericCommand);
Telerik.Web.UI.Editor.BrowserCommand=function(_ac,_ad,_ae,_af){
var _b0=true;
switch(this.CommandID){
case "Copy":
case "SelectAll":
case "Print":
_b0=false;
break;
}
Telerik.Web.UI.Editor.BrowserCommand.initializeBase(this,[(_ac||_ae),_ad,_b0]);
this.CommandID=_ae;
this.Value=_af;
};
Telerik.Web.UI.Editor.BrowserCommand.prototype={get_argument:function(){
return this.Value;
},clone:function(){
return new Telerik.Web.UI.Editor.BrowserCommand(this._title,this.get_window(),this.CommandID,this.Value);
},getState:function(_b1){
try{
_b1=_b1||this.get_window();
var _b2=_b1.document;
if(null==_b2){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
var _b3=true;
if("Paste"!=this.CommandID){
_b3=_b2.queryCommandEnabled(this.CommandID);
}else{
if(!$telerik.isIE7){
_b3=_b2.queryCommandEnabled(this.CommandID);
}
}
if(!this.isOpera&&!_b3){
if(!this.isSafari||!this.CommandID=="RealFontSize"){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
}
var _b4=null;
if("Paste"!=this.CommandID){
_b4=_b2.queryCommandState(this.CommandID);
}else{
if(!$telerik.isIE7){
_b4=_b2.queryCommandState(this.CommandID);
}
}
return _b4?Telerik.Web.UI.Editor.CommandStates.On:Telerik.Web.UI.Editor.CommandStates.Off;
}
catch(ex){
return Telerik.Web.UI.Editor.CommandStates.Off;
}
},getValue:function(_b5){
try{
_b5=_b5||this.get_window();
return _b5.document.queryCommandValue(this.CommandID);
}
catch(ex){
}
return null;
},onExecute:function(){
var _b6=this.get_window();
if(!_b6){
return false;
}
var _b7=_b6.document;
if("AbsolutePosition"==this.CommandID){
_b7.execCommand("2D-Position",false,true);
}
var _b8=true;
if(this.CommandID=="BackColor"&&(this.isOpera||this.isFirefox)){
this.CommandID="HiliteColor";
_b8=false;
}
if(this.CommandID=="FontSize"&&this.isSafari&&!$telerik.isSafari3){
var _b9=parseInt(this.Value);
switch(_b9){
case 1:
this.Value="8pt";
break;
case 2:
this.Value="10pt";
break;
case 3:
this.Value="12pt";
break;
case 4:
this.Value="14pt";
break;
case 5:
this.Value="18pt";
break;
case 6:
this.Value="24pt";
break;
case 7:
this.Value="36pt";
break;
}
}
try{
_b7.execCommand("UseCSS",false,(false!=_b8));
_b7.execCommand("styleWithCSS",false,(false==_b8));
}
catch(e){
}
var _ba=_b7.execCommand(this.CommandID,false,this.Value);
try{
_b7.execCommand("UseCSS",false,true);
_b7.execCommand("styleWithCSS",false,false);
}
catch(e){
}
return _ba;
}};
Telerik.Web.UI.Editor.BrowserCommand.registerClass("Telerik.Web.UI.Editor.BrowserCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.StyleRuleCommand=function(_bb,_bc,_bd,_be,_bf){
Telerik.Web.UI.Editor.StyleRuleCommand.initializeBase(this,[(_bb||sCmdID),_bc,true]);
if(!_bd){
var _c0=new Telerik.Web.UI.Editor.Selection(this._window);
_bd=_c0.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_bd);
this._styleAttributeName=_be;
this._newValue=_bf;
};
Telerik.Web.UI.Editor.StyleRuleCommand.prototype={get_argument:function(){
return this._newValue;
},clone:function(){
return new Telerik.Web.UI.Editor.StyleRuleCommand(this._title,this._window,null,this._styleAttributeName,this._newValue);
},execute:function(){
var _c1=this._nodeBookmark.select();
if(!_c1){
return false;
}
if(!this._isExecuted){
this._oldValue=_c1.style[this._styleAttributeName];
}
_c1.style[this._styleAttributeName]=this._newValue;
this._isExecuted=true;
return true;
},unexecute:function(){
var _c2=this._nodeBookmark.select();
_c2.style[this._styleAttributeName]=this._oldValue;
}};
Telerik.Web.UI.Editor.StyleRuleCommand.registerClass("Telerik.Web.UI.Editor.StyleRuleCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.AttributeCommand=function(_c3,_c4,_c5,_c6,_c7){
Telerik.Web.UI.Editor.AttributeCommand.initializeBase(this,[(_c3||sCmdID),_c4,true]);
if(!_c5){
var _c8=new Telerik.Web.UI.Editor.Selection(this._window);
_c5=_c8.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_c5);
this._attribName=_c6;
this._newValue=_c7;
};
Telerik.Web.UI.Editor.AttributeCommand.prototype={get_argument:function(){
return this._newValue;
},clone:function(){
return new Telerik.Web.UI.Editor.AttributeCommand(this._title,this._window,null,this._attribName,this._newValue);
},execute:function(){
var _c9=this._nodeBookmark.select();
if(!_c9){
return false;
}
if(!this._isExecuted){
if(this._attribName=="style"){
this._oldValue=_c9.style.cssText;
}else{
this._oldValue=_c9.getAttribute(this._attribName);
}
}
if(this._attribName&&this._attribName.toLowerCase()=="name"&&document.all){
_c9.name=this._newValue;
_c9.removeAttribute("name");
_c9.removeAttribute("NAME");
}
var _ca=this._newValue.trim();
if(""==_ca){
_c9.removeAttribute(this._attribName,0);
if("className"==this._attribName){
_c9.removeAttribute("class",0);
}
}else{
if(this._attribName=="style"){
_c9.style.cssText=this._newValue;
}else{
_c9[this._attribName]=this._newValue;
if(this._attribName.toLowerCase()=="nowrap"){
_c9.setAttribute(this._attribName,this._newValue);
}
}
}
this._isExecuted=true;
return true;
},unexecute:function(){
var _cb=this._nodeBookmark.select();
if(this._attribName=="style"){
_cb.style.cssText=this._oldValue;
}else{
_cb[this._attribName]=this._oldValue;
}
}};
Telerik.Web.UI.Editor.AttributeCommand.registerClass("Telerik.Web.UI.Editor.AttributeCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.ClassNameCommand=function(_cc,_cd,_ce){
Telerik.Web.UI.Editor.ClassNameCommand.initializeBase(this,[(_cc||"Classname"),_cd,true]);
};
Telerik.Web.UI.Editor.ClassNameCommand.prototype={getValue:function(_cf){
_cf=_cf||this._window;
if($telerik.isIE){
return this._getValueIE(_cf);
}else{
return this._getValueMoz(_cf);
}
},_getValueIE:function(_d0){
var _d1=new Telerik.Web.UI.Editor.Selection(_d0);
var _d2=_d1.getParentElement();
if("BODY"==_d2.tagName){
return "";
}else{
return (""==_d2.className?"":_d2.className);
}
},_getValueMoz:function(_d3){
if(!_d3){
return "";
}
var _d4=_d3.getSelection();
if(!_d4){
return "";
}
if(_d4.rangeCount!=1){
return "";
}
var _d5=(_d4.focusNode.nodeType!=3?_d4.focusNode:_d4.focusNode.parentNode);
var _d6=(_d4.anchorNode.nodeType!=3?_d4.anchorNode:_d4.anchorNode.parentNode);
if(_d5!=_d6){
return "";
}
var _d7=new Telerik.Web.UI.Editor.Selection(_d3);
var _d8="",_d9;
if(null!=_d7&&null!=(_d9=_d7.getParentElement())){
_d8=_d9.className;
}
return (""==_d8?"":_d8);
}};
Telerik.Web.UI.Editor.ClassNameCommand.registerClass("Telerik.Web.UI.Editor.ClassNameCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.FormatBlockCommand=function(_da,_db,_dc){
Telerik.Web.UI.Editor.FormatBlockCommand.initializeBase(this,[(_da||"Format Block"),_db,true]);
this.FormatValue=_dc;
};
Telerik.Web.UI.Editor.FormatBlockCommand.prototype={get_argument:function(){
try{
return this.FormatValue.substring(1,this.FormatValue.length-1).toUpperCase();
}
catch(ex){
}
},clone:function(){
return new Telerik.Web.UI.Editor.FormatBlockCommand(this.Title,this._window,this.FormatValue);
},getValue:function(_dd){
try{
_dd=_dd||this._window;
var _de=_dd.document.queryCommandValue("FormatBlock");
if(!document.all){
switch(_de){
case "x":
case "":
_de="Normal";
break;
}
}
return _de;
}
catch(ex){
}
return null;
},_isFormatBlockElement:function(_df){
if(!_df||!_df.tagName){
return false;
}
var _e0=_df.tagName;
if(_e0=="H1"||_e0=="H2"||_e0=="H3"||_e0=="H4"||_e0=="H5"||_e0=="H6"||_e0=="H7"||_e0=="ADDRESS"||_e0=="PRE"){
return true;
}
},OnExecuteIE:function(){
var _e1=this._window.document;
if("<p>"==this.FormatValue.toLowerCase()){
return _e1.execCommand("FormatBlock",false,"<p>")&&_e1.execCommand("RemoveFormat");
}
var _e2=_e1.selection.createRange();
var _e3=false;
var _e4=_e2.htmlText.trim();
if(_e4&&_e4.length>2&&_e4.substr(0,2).toLowerCase()=="<p"){
_e3=true;
}
if(!_e3&&""!=_e2.text){
var _e5=this.FormatValue.substring(1,this.FormatValue.length-1);
_e1.execCommand("FormatBlock",false,"<p>");
_e1.execCommand("RemoveFormat");
var _e6=_e1.createElement(_e5);
_e6.innerHTML=_e2.htmlText;
_e2.pasteHTML(_e6.outerHTML);
return true;
}else{
return _e1.execCommand("FormatBlock",false,this.FormatValue);
}
},OnExecuteMoz:function(){
var _e7=this.FormatValue.substring(1,this.FormatValue.length-1);
var _e8=this._window.document;
var _e9=("body"==this.FormatValue.toLowerCase()||"normal"==this.FormatValue.toLowerCase());
var _ea=null;
var _eb=_e7.indexOf(" ");
if(_eb!=-1){
_ea=_e7.substring(_eb+1);
_e7=_e7.substring(0,_eb);
}
if(this.isSafari){
if(_e9){
}else{
var _ec=_e8.createElement(_e7);
if(_ea){
var _ed="";
_ed=_ea.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_ed.length>0){
_ec.className=_ed;
}
}
var _ee=new Telerik.Web.UI.Editor.Selection(this._window);
_ec.innerHTML=_ee.getHtml();
var _ef=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_ec.outerHTML,true);
_ef.execute();
}
return;
}
if(_e9){
return _e8.execCommand("FormatBlock",false,"Normal");
}
var _f0=this._window.getSelection();
if(_f0.rangeCount<1){
return false;
}
var _f1=_f0.getRangeAt(0);
var _f2=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
if(_f1.toString()!=""&&!this._isFormatBlockElement(_f2)){
try{
var _ec=_e8.createElement(_e7);
if(_ea){
var _ed="";
_ed=_ea.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_ed.length>0){
_ec.className=_ed;
}
}
_ec.appendChild(_f1.extractContents());
_f1.insertNode(_ec);
return true;
}
catch(ex){
return false;
}
}else{
return _e8.execCommand("FormatBlock",false,this.FormatValue);
}
return false;
}};
Telerik.Web.UI.Editor.FormatBlockCommand.registerClass("Telerik.Web.UI.Editor.FormatBlockCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.InsertListCommand=function(_f3,_f4,_f5,_f6,_f7){
Telerik.Web.UI.Editor.InsertListCommand.initializeBase(this,[(_f3||"Insert List"),_f4,true]);
this._newLineBr=(_f5==true);
this._commandName=_f6;
this._listType=(_f6=="InsertOrderedList")?"OL":"UL";
this._listStyle=_f7;
this._document=this._window.document;
};
Telerik.Web.UI.Editor.InsertListCommand.prototype={_insertList:function(){
return this._document.execCommand(this._commandName,false,false);
},_pasteHtml:function(_f8){
var _f9=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_f8);
_f9.execute();
},_expandSelection:function(_fa,_fb,_fc){
var _fd=_fa.duplicate();
var _fe=null;
var _ff=null;
for(var i=_fb.length-1;i>=0;i--){
_fd.moveToElementText(_fb[i]);
var _101=_fa.compareEndPoints("StartToStart",_fd);
if(-1==_101||0==_101){
if(_fc[_fb[i].tagName]!=null){
_ff=_fb[i];
}
}else{
if(_fc[_fb[i].tagName]!=null){
_fe=_fb[i];
break;
}
}
}
if(_fe){
_fd.moveToElementText(_fe);
_fa.setEndPoint("StartToEnd",_fd);
}else{
var _102=_fa.parentElement();
_fd.moveToElementText(_102);
_fa.setEndPoint("StartToStart",_fd);
}
if(_ff){
_fd.moveToElementText(_ff);
if("BR"==_ff.tagName){
_fa.setEndPoint("EndToEnd",_fd);
}else{
_fa.setEndPoint("EndToStart",_fd);
}
}else{
var _102=_fa.parentElement();
_fd.moveToElementText(_102);
_fa.setEndPoint("EndToEnd",_fd);
}
_fa.select();
},_handleEmptyListSelection:function(_103,_104){
var _105=_103.parentElement();
var _106=(_105&&"P"==_105.tagName.toUpperCase());
var brs=_105.getElementsByTagName("BR");
if(_106&&brs.length==0){
return this._insertList();
}else{
var _108={};
_108["BR"]="";
_108["TD"]="";
_108["OL"]="";
_108["UL"]="";
_108["TABLE"]="";
_108["DIV"]="";
_108["IMG"]="";
_108["OBJECT"]="";
var _109=_103.parentElement().getElementsByTagName("*");
this._expandSelection(_103,_109,_108);
if(_103.htmlText){
return this.OnExecuteIE();
}
}
},OnExecuteIE:function(){
if(!this._newLineBr){
return this._insertList();
}
var _10a=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
var _10b=this._document.selection.createRange();
if("OL"==_10a.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_10a,"OL")!=null||"UL"==_10a.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_10a,"UL")!=null){
return this._insertList();
}else{
if("TD"==_10a.tagName||"TR"==_10a.tagName||"TBODY"==_10a.tagName||"TABLE"==_10a.tagName){
var _10b=this._document.selection.createRange();
var _10c=_10b.parentElement().getElementsByTagName("TD");
for(var i=_10c.length-1;i>=0;i--){
brRange=_10b.duplicate();
brRange.moveToElementText(_10c[i]);
if(_10b.inRange(brRange)&&_10c[i].innerHTML!=""){
_10b.moveToElementText(_10c[i]);
}
}
}
}
var oSel=this._document.selection;
var _10f=this._listType;
if(oSel.type=="Control"){
var _110=this._document.body.createTextRange();
_110.moveToElementText(_10b(0));
var _111=_110.parentElement();
var _112=_111.tagName.toLowerCase();
if(_112=="table"||_112=="tbody"){
var _113=_111.parentNode.outerHTML;
_111.parentNode.outerHTML="<"+_10f+"><LI>"+_113+"</LI></"+_10f+">";
}else{
var _113=_110.htmlText;
this._pasteHtml("<"+_10f+"><LI>"+_113+"</LI></"+_10f+">");
}
}else{
if(_10b.htmlText==""){
return this._handleEmptyListSelection(_10b,this._commandName);
}
var _114=this._document.createElement("SPAN");
_114.innerHTML=_10b.htmlText;
if(_114.getElementsByTagName("P").length>0){
return this._insertList();
}else{
var _115;
if(_10b.parentElement().tagName.toUpperCase()=="LI"){
_115=_10b.parentElement().parentNode;
}else{
_115=_10b.parentElement();
}
if(_115.tagName.toUpperCase()=="OL"||_115.tagName.toUpperCase()=="UL"){
var _116=_115.tagName.toUpperCase();
if(_10f==_116){
if(this._newLineBr){
var _117=_10b.duplicate();
var _118=_10b.duplicate();
_118.moveToElementText(_115);
var _119=_10b.duplicate();
var _11a=_115.getElementsByTagName("LI");
var _11b=0;
var _11c=_11a.length-1;
var _11d=_10b.duplicate();
_11d.moveToElementText(_11a[0]);
var _11e=_10b.duplicate();
_11e.moveToElementText(_11a[_11a.length-1]);
_119.setEndPoint("EndToEnd",_11e);
_119.setEndPoint("StartToStart",_11d);
while((_11b<_11a.length)&&(_119.compareEndPoints("StartToStart",_117)<=0)){
_119.moveToElementText(_11a[_11b]);
_119.setEndPoint("EndToEnd",_11e);
_11b++;
}
_11b-=2;
while((_11c>0)&&(_119.compareEndPoints("EndToEnd",_117)>=0)){
_119.moveToElementText(_11a[_11c]);
_119.setEndPoint("StartToStart",_11d);
_11c--;
}
_11c+=2;
var _11f=_10b.duplicate();
var _120=_10b.duplicate();
_11f.moveToElementText(_11a[_11b]);
_11f.collapse(true);
_11f.setEndPoint("StartToStart",_118);
_120.moveToElementText(_11a[_11c]);
_120.collapse(false);
_120.setEndPoint("EndToEnd",_118);
_10b.setEndPoint("StartToEnd",_11f);
_10b.setEndPoint("EndToStart",_120);
var _121="";
var _122=false;
var _123=false;
if(_11f.htmlText.replace(/<(.*?)>/)!=""){
_121+="<"+_116+">"+_11f.htmlText+"</"+_116+">";
}else{
_122=true;
}
_121+=_10b.htmlText.replace(/<LI\/?>/gi,"<BR>").replace(/<\/LI>/gi,"").replace(/^\s*<BR\/?>/gi,"").replace(/<BR\/?>\s*$/gi,"");
if(_120.htmlText.replace(/<(.*?)>/)!=""){
_121+="<"+_116+">"+_120.htmlText+"</"+_116+">";
}else{
_123=true;
_121+="<BR>";
}
if(_122&&_123){
_121=_121.replace(new RegExp("</?"+_116+"/?>","gi"),"").replace(/^\s*<BR\/?>/gi,"");
}
if(_115.parentNode.childNodes[0]==_115){
_118.collapse();
_115.parentNode.removeChild(_115,_121);
}else{
_118.moveStart("character",-1);
}
this._pasteHtml(_121);
}else{
return this._insertList();
}
}else{
return this._insertList();
}
}else{
var _124=_10b.duplicate();
_124.collapse(false);
_124.moveEnd("character",1);
if(_124.htmlText.match(/<BR\/?>/gi)){
_10b.moveEnd("character",1);
}
var _125="<"+_10f+"><LI>"+_10b.htmlText.replace(/(<BR\s*>\s*)*$/gi,"").replace(/<BR\/?>$/gi,"").replace(/<BR\/?>/gi,"</LI><LI>")+"</LI></"+_10f+">";
try{
_10b.pasteHTML(_125);
}
catch(e){
}
}
}
}
return true;
},OnExecuteMoz:function(){
return this._insertList();
}};
Telerik.Web.UI.Editor.InsertListCommand.registerClass("Telerik.Web.UI.Editor.InsertListCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TableCommandBase=function(_126,_127){
Telerik.Web.UI.Editor.TableCommandBase.initializeBase(this,[(_126||"Table Command"),_127,true]);
};
Telerik.Web.UI.Editor.TableCommandBase.prototype={getState:function(_128){
return this.getSelectedCell(_128)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
},getSelectedCell:function(_129){
var _12a=new Telerik.Web.UI.Editor.Selection(_129||this._window);
var _12b;
if(_12a){
_12b=_12a.getParentElement();
}
while(null!=_12b&&_12b.tagName!="TD"&&_12b.tagName!="TH"&&_12b.tagName!="BODY"){
_12b=_12b.parentNode;
}
if(!_12b||!_12b.tagName){
return null;
}
return (_12b.tagName=="TD"||_12b.tagName=="TH"?_12b:null);
},getSelectedRow:function(_12c){
var _12d=new Telerik.Web.UI.Editor.Selection(_12c||this._window);
var _12e;
if(_12d){
_12e=_12d.getParentElement();
}
if(!_12e){
return null;
}
while(null!=_12e&&_12e.tagName!="TR"&&_12e.tagName!="BODY"){
_12e=_12e.parentNode;
}
return (_12e&&_12e.tagName=="TR"?_12e:null);
},getParentTable:function(_12f){
if(!_12f){
return null;
}
while(null!=_12f&&_12f.parentNode!=_12f&&"TABLE"!=_12f.tagName){
_12f=_12f.parentNode;
}
return (_12f&&_12f.tagName=="TABLE"?_12f:null);
}};
Telerik.Web.UI.Editor.TableCommandBase.registerClass("Telerik.Web.UI.Editor.TableCommandBase",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TableInsertRow=function(_130,_131,_132){
Telerik.Web.UI.Editor.TableInsertRow.initializeBase(this,[(_130||"Insert row"),_131,true]);
this._direction=_132||"above";
};
Telerik.Web.UI.Editor.TableInsertRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertRow(this._title,this._window,this._direction);
},getState:function(_133){
return (this.getSelectedRow(_133)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var row=cell.parentNode;
var _136=row.rowIndex;
if("below"==this._direction){
_136++;
}
var _137=this.getParentTable(row);
if(!_137){
return false;
}
var _138=_137.insertRow(_136);
if(!_138){
return false;
}
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(row,_138);
var _139;
for(var i=0;i<row.cells.length;i++){
cell=row.cells[i];
_139=_138.insertCell(-1);
_139.colSpan=cell.colSpan;
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_139);
_139.innerHTML=this.isIE?"":"&nbsp;";
}
return true;
}};
Telerik.Web.UI.Editor.TableInsertRow.registerClass("Telerik.Web.UI.Editor.TableInsertRow",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteRow=function(_13b,_13c){
Telerik.Web.UI.Editor.TableDeleteRow.initializeBase(this,[(_13b||"Delete Row"),_13c,true]);
};
Telerik.Web.UI.Editor.TableDeleteRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableDeleteRow(this._title,this._window);
},getState:function(_13d){
return (this.getSelectedRow(_13d)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var row=this.getSelectedRow();
if(!row){
return false;
}
row.parentNode.removeChild(row);
return true;
}};
Telerik.Web.UI.Editor.TableDeleteRow.registerClass("Telerik.Web.UI.Editor.TableDeleteRow",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableInsertColumn=function(_13f,_140,_141){
Telerik.Web.UI.Editor.TableInsertColumn.initializeBase(this,[(_13f||"Insert column"),_140,true]);
this._direction=_141||"left";
};
Telerik.Web.UI.Editor.TableInsertColumn.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertColumn(this._title,this._window,this._direction);
},getState:function(_142){
return (this.getSelectedCell(_142)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _144=cell.cellIndex;
if("right"==this._direction){
_144++;
}
var _145=this.getParentTable(cell);
if(!_145){
return false;
}
var rows=_145.rows;
var _147;
for(var i=0;i<rows.length;i++){
_147=rows[i].insertCell(_144);
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_147);
_147.innerHTML=this.isIE?"":"&nbsp;";
}
return true;
}};
Telerik.Web.UI.Editor.TableInsertColumn.registerClass("Telerik.Web.UI.Editor.TableInsertColumn",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteColumn=function(_149,_14a,_14b){
Telerik.Web.UI.Editor.TableDeleteColumn.initializeBase(this,[(_149||"Delete column"),_14a,true]);
};
Telerik.Web.UI.Editor.TableDeleteColumn.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableDeleteColumn.New(this._title,this._window);
},getState:function(_14c){
return (this.getSelectedCell(_14c)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _14e=cell.cellIndex;
var _14f=this.getParentTable(cell);
if(!_14f){
return false;
}
var rows=_14f.rows;
for(var i=0;i<rows.length;i++){
cell=rows[i].cells[_14e];
if(cell){
cell.parentNode.removeChild(cell);
}
}
return true;
}};
Telerik.Web.UI.Editor.TableDeleteColumn.registerClass("Telerik.Web.UI.Editor.TableDeleteColumn",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeRows=function(_152,_153){
Telerik.Web.UI.Editor.TableMergeRows.initializeBase(this,[(_152||"Merge rows"),_153,true]);
};
Telerik.Web.UI.Editor.TableMergeRows.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeRows.New(this._title,this._window);
},getState:function(_154){
var cell=this.getSelectedCell(_154);
if(null!=cell){
var _156=this.getLowerCell(cell);
if(null!=_156&&cell.colSpan==_156.colSpan){
return Telerik.Web.UI.Editor.CommandStates.Off;
}
}
return Telerik.Web.UI.Editor.CommandStates.Disabled;
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _158=this.getLowerCell(cell);
if(!_158){
return false;
}
if(""!=_158.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_158.innerHTML;
}
cell.rowSpan+=_158.rowSpan;
var row=_158.parentNode;
row.removeChild(_158);
if(!row.cells||row.cells.length==0){
for(var i=cell.parentNode.cells.length-1;i>=0;i--){
var _15b=cell.parentNode.cells[i];
if(_15b.rowSpan>1){
_15b.rowSpan--;
}
}
row.parentNode.removeChild(row);
}
return true;
},getLowerCell:function(cell){
if(!cell){
return null;
}
var _15d=this.getParentTable(cell);
var row=cell.parentNode;
var _15f=_15d.rows[row.rowIndex+cell.rowSpan];
if(!_15f){
return null;
}
var _160=_15f.cells[cell.cellIndex];
if(!_160){
for(var i=_15f.cells.length-1;i>=0;i--){
if(_15f.cells[i].offsetLeft==cell.offsetLeft){
return _15f.cells[i];
}
}
}
return _160;
}};
Telerik.Web.UI.Editor.TableMergeRows.registerClass("Telerik.Web.UI.Editor.TableMergeRows",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeColumns=function(_162,_163){
Telerik.Web.UI.Editor.TableMergeColumns.initializeBase(this,[(_162||"Merge columns"),_163,true]);
};
Telerik.Web.UI.Editor.TableMergeColumns.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeColumns.New(this._title,this._window);
},getState:function(_164){
var cell=this.getSelectedCell(_164);
if(null!=cell&&null!=this.getNextSiblingCell(cell)){
return Telerik.Web.UI.Editor.CommandStates.Off;
}else{
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
},getNextSiblingCell:function(cell){
if(!cell){
return null;
}
var row=cell.parentNode;
var _168=row.cells[cell.cellIndex+1];
if(null!=_168&&cell.rowSpan==_168.rowSpan){
return _168;
}else{
return null;
}
},onExecute:function(){
var cell=this.getSelectedCell();
if(null==cell){
return false;
}
var _16a=this.getNextSiblingCell(cell);
if(!_16a){
return false;
}
cell.colSpan+=_16a.colSpan;
if(""!=_16a.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_16a.innerHTML;
}
_16a.parentNode.removeChild(_16a);
return true;
}};
Telerik.Web.UI.Editor.TableMergeColumns.registerClass("Telerik.Web.UI.Editor.TableMergeColumns",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableSplitCell=function(_16b,_16c){
Telerik.Web.UI.Editor.TableSplitCell.initializeBase(this,[(_16b||"Split cell"),_16c,true]);
};
Telerik.Web.UI.Editor.TableSplitCell.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableSplitCell(this._title,this._window);
},getState:function(_16d){
var cell=this.getSelectedCell(_16d);
if(!cell){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
return ((cell.colSpan>1||cell.rowSpan>1)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _170=this.getParentTable(cell);
if(!_170){
return false;
}
var row=cell.parentNode;
var _172=("THEAD"==row.parentNode.tagName.toUpperCase()?"TH":"TD");
if(cell.colSpan>1){
var _173=this._window.document.createElement(_172);
_173.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_173);
_173.colSpan=1;
cell.colSpan--;
var _174=cell.nextSibling;
if(_174){
row.insertBefore(_173,_174);
}else{
row.appendChild(_173);
}
}
if(cell.rowSpan>1){
var _175=_170.rows[row.rowIndex+cell.rowSpan-1];
if(!_175){
return;
}
var _173=this._window.document.createElement(_172);
_173.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_173);
_173.rowSpan=1;
cell.rowSpan--;
var _174=_175.cells[this.getRealCellIndex(cell)];
if(_174){
_175.insertBefore(_173,_174);
}else{
_175.appendChild(_173);
}
}
return true;
},getRealCellIndex:function(cell){
if(!cell){
return 0;
}
var row=cell.parentNode;
var i=0;
var _179=0;
while(row.cells.length>i&&row.cells[i]!=cell){
var _17a=row.cells[i];
if(_17a.colSpan>1){
_179+=_17a.colSpan;
}else{
_179++;
}
i++;
}
return _179;
}};
Telerik.Web.UI.Editor.TableSplitCell.registerClass("Telerik.Web.UI.Editor.TableSplitCell",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteCell=function(_17b,_17c){
Telerik.Web.UI.Editor.TableDeleteCell.initializeBase(this,[(_17b||"Delete cell"),_17c,true]);
};
Telerik.Web.UI.Editor.TableDeleteCell.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableDeleteCell(this._title,this._window);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
cell.parentNode.removeChild(cell);
return true;
}};
Telerik.Web.UI.Editor.TableDeleteCell.registerClass("Telerik.Web.UI.Editor.TableDeleteCell",Telerik.Web.UI.Editor.TableCommandBase);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorButton=function(_17e){
Telerik.Web.UI.EditorButton.initializeBase(this,[_17e]);
this._attributes={};
this._autoPostBack=false;
this._enabled=true;
this._name="";
this._text="";
this._shortCut="";
this._showIcon=true;
this._showText=false;
this._clientTypeName="Telerik.Web.UI.EditorButton";
this._isOn=false;
this._skin="";
this._addClickHandler=false;
};
Telerik.Web.UI.EditorButton.createToolWrapper=function(_17f,skin){
var ul=document.createElement("UL");
var li=document.createElement("LI");
li.innerHTML="&nbsp;";
li.className="rade_grip grip_first";
ul.appendChild(li);
ul.className="rade_toolbar "+skin;
var _183=_17f.get_element();
ul.appendChild(_183);
li=document.createElement("LI");
li.innerHTML="&nbsp;";
li.className="rade_grip grip_last";
ul.appendChild(li);
return ul;
};
Telerik.Web.UI.EditorButton.getToolRootNode=function(_184){
while(_184&&_184.tagName!="LI"){
_184=_184.parentNode;
}
return _184;
};
Telerik.Web.UI.EditorButton._createButton=function(_185){
var _186=document.createElement("LI");
var a=document.createElement("A");
_186.appendChild(a);
a.className=_185.showText==true?"rade_tool_text":"rade_tool";
var text=_185["text"];
a.title=text?text:_185["name"];
a.href="#";
a.setAttribute("unselectable","on");
if(_185.showIcon!=false){
var span=document.createElement("SPAN");
span.className=_185.name;
span.innerHTML="&nbsp;";
span.setAttribute("unselectable","on");
a.appendChild(span);
}
if(_185.showText==true){
var span=document.createElement("SPAN");
span.className="rade_button_text";
span.innerHTML=_185.text?_185.text:_185.name;
span.setAttribute("unselectable","on");
a.appendChild(span);
}
return _186;
};
Telerik.Web.UI.EditorButton.createTool=function(_18a,_18b,type,_18d,_18e){
if(!type){
type=Telerik.Web.UI.EditorButton;
}
if(!_18d){
_18d=Telerik.Web.UI.EditorButton._createButton(_18a);
if(type==Telerik.Web.UI.EditorSplitButton||type.inheritsFrom(Telerik.Web.UI.EditorSplitButton)){
var a=_18d.getElementsByTagName("A")[0];
if(a){
Sys.UI.DomElement.addCssClass(a,"rad_splitbutton");
var span=document.createElement("SPAN");
span.className="split_arrow";
span.innerHTML="&nbsp;";
a.appendChild(span);
}
}else{
if(type==Telerik.Web.UI.EditorDropDown||type.inheritsFrom(Telerik.Web.UI.EditorDropDown)){
var a=_18d.getElementsByTagName("A")[0];
if(a){
Sys.UI.DomElement.removeCssClass(a,"rade_tool");
Sys.UI.DomElement.addCssClass(a,"rade_dropdown");
a.innerHTML="";
var span=document.createElement("SPAN");
span.innerHTML="&nbsp;";
var _191=_18a["width"]?_18a["width"]:"50px";
span.style.width=_191;
a.appendChild(span);
}
}
}
}
var tool=$create(type,_18a,_18b,null,_18d);
if(_18e&&_18e.appendChild){
_18e.appendChild(_18d);
}
return tool;
};
Telerik.Web.UI.EditorButton.prototype={initialize:function(){
var _193=this.getAnchorElement();
if(_193){
_193.setAttribute("unselectable","on");
}
var span=this.getSpanElement();
if(span){
span.setAttribute("unselectable","on");
}
if(this._addClickHandler){
var _195=this.get_element();
$addHandlers(_195,{"click":this.click},this);
}
},dispose:function(){
var _196=this.get_element();
if(_196){
$clearHandlers(_196);
}
Telerik.Web.UI.EditorButton.callBaseMethod(this,"dispose");
},click:function(e){
this.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(e);
},add_valueSelected:function(_198){
this.get_events().addHandler("valueSelected",_198);
},remove_valueSelected:function(_199){
this.get_events().removeHandler("valueSelected",_199);
},raiseEvent:function(_19a,_19b){
var _19c=this.get_events().getHandler(_19a);
if(_19c){
if(!_19b){
_19b=Sys.EventArgs.Empty;
}
_19c(this,_19b);
}
},set_width:function(_19d){
var span=this.getSpanElement();
if(span){
span.style.width=_19d;
}
},get_width:function(){
return this.get_element().offsetWidth;
},set_height:function(_19f){
var span=this.getSpanElement();
if(span){
span.style.height=_19f;
}
},get_height:function(){
return this.get_element().offsetHeight;
},isTarget:function(e){
return $telerik.isDescendantOrSelf(this.get_element(),e.target);
},setState:function(_1a2){
this.set_enabled(_1a2!=Telerik.Web.UI.Editor.CommandStates.Disabled);
this.setOn(_1a2==Telerik.Web.UI.Editor.CommandStates.On);
},setFocus:function(){
var elem=this.getAnchorElement();
if(elem&&elem.focus){
elem.focus();
}
},get_addClickHandler:function(){
return this._addClickHandler;
},set_addClickHandler:function(_1a4){
this._addClickHandler=_1a4;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_1a5){
this._attributes=_1a5;
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_1a6){
this._autoPostBack=_1a6;
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_1a7){
if(this._enabled!=_1a7){
this._enabled=_1a7;
var _1a8=this.getAnchorElement();
if(!this._enabled){
this._addAnchorCssClass("rade_tool_disabled");
_1a8.setAttribute("disabled","disabled");
}else{
this._removeAnchorCssClass("rade_tool_disabled");
_1a8.removeAttribute("disabled");
}
}
},isOn:function(){
return this._isOn;
},setOn:function(_1a9){
if(this._isOn!=_1a9){
this._isOn=_1a9;
if(this._isOn){
this._addAnchorCssClass("rade_tool_selected");
}else{
this._removeAnchorCssClass("rade_tool_selected");
}
}
},get_name:function(){
return this._name;
},set_name:function(_1aa){
this._name=_1aa;
},get_text:function(){
if(this._text){
return this._text;
}
var _1ab=this.getAnchorElement();
if(_1ab&&_1ab.getAttribute("title")){
return _1ab.getAttribute("title");
}
return this.get_name();
},set_text:function(_1ac){
if(this._text!=_1ac){
this._text=_1ac;
if(this.get_showText()){
this.getSpanElement().innerHTML=_1ac;
}
}
},get_shortCut:function(){
return this._shortCut;
},set_shortCut:function(_1ad){
this._shortCut=_1ad;
},get_showIcon:function(){
return this._showIcon;
},set_showIcon:function(_1ae){
if(this._showIcon!=_1ae){
this._showIcon=_1ae;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_1af){
this._skin=_1af;
},_addAnchorCssClass:function(_1b0){
Sys.UI.DomElement.addCssClass(this.getAnchorElement(),_1b0);
},_removeAnchorCssClass:function(_1b1){
Sys.UI.DomElement.removeCssClass(this.getAnchorElement(),_1b1);
},get_showText:function(){
return this._showText;
},set_showText:function(_1b2){
if(this._showText!=_1b2){
this._showText=_1b2;
}
},get_type:function(){
return this._type;
},set_type:function(_1b3){
this._type=_1b3;
},get_clientTypeName:function(){
return this._clientTypeName;
},set_clientTypeName:function(_1b4){
this._clientTypeName=_1b4;
},getAnchorElement:function(){
var _1b5=this.get_element().firstChild;
while(_1b5!=null&&(_1b5.tagName==null)){
_1b5=_1b5.nextSibling;
}
return _1b5;
},getSpanElement:function(){
var _1b6=this.getAnchorElement();
var _1b7=_1b6.firstChild;
while(_1b7!=null&&(_1b7.tagName==null||_1b7.tagName.toLowerCase()!="span")){
_1b7=_1b7.nextSibling;
}
return _1b7;
}};
Telerik.Web.UI.EditorButton.registerClass("Telerik.Web.UI.EditorButton",Sys.UI.Control);
Telerik.Web.UI.EditorSpinBoxEventArgs=function(_1b8,_1b9){
Telerik.Web.UI.EditorSpinBoxEventArgs.initializeBase(this);
this._newValue=_1b8;
this._oldValue=_1b9;
};
Telerik.Web.UI.EditorSpinBoxEventArgs.prototype={get_oldValue:function(){
return this._oldValue;
},get_newValue:function(){
return this._newValue;
}};
Telerik.Web.UI.EditorSpinBoxEventArgs.registerClass("Telerik.Web.UI.EditorSpinBoxEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.EditorSpinBox=function(_1ba){
Telerik.Web.UI.EditorSpinBox.initializeBase(this,[_1ba]);
this._width="50px";
this._className="rade_SpinBox";
this._selectedItem="";
this._initialValue="";
this._visibleInput=true;
this._enabledIncrease=true;
this._enabledDecrease=true;
this._clientStateFieldID=null;
};
Telerik.Web.UI.EditorSpinBox.prototype={dispose:function(){
this._inputElement.onchange=null;
this._inputElement.onkeypress=null;
this._inputElement.onclick=null;
this._inputElement=null;
this._increaseButton.onclick=null;
this._increaseButton=null;
this._decreaseButton.onclick=null;
this._decreaseButton=null;
Telerik.Web.UI.EditorSpinBox.callBaseMethod(this,"dispose");
},initialize:function(){
this._createControls();
},_createControls:function(){
var _1bb=document.createElement("table");
_1bb.cellSpacing=0;
_1bb.cellPadding=0;
_1bb.className=this.get_visibleInput()?this._className:"rade_TableWizardSpinBox";
_1bb.insertRow(-1);
var _1bc=_1bb.rows[0].insertCell(-1);
var _1bd=document.createElement("INPUT");
_1bd.className="radfd_skipme";
_1bd.type="text";
_1bd.onclick=function(e){
this.focus();
};
_1bd.onkeypress=Function.createDelegate(this,this._onKeyPressHandler);
_1bd.onchange=Function.createDelegate(this,this._onChangeHandler);
this._inputElement=_1bd;
_1bc.appendChild(_1bd);
if(!this.get_visibleInput()){
this.set_visibleInput(false);
}
if(this.get_visibleInput()){
_1bc=_1bb.rows[0].insertCell(-1);
var _1bf=document.createElement("table");
_1bf.cellSpacing=0;
_1bf.cellPadding=0;
_1bf.insertRow(-1);
var _1c0=_1bf.rows[0].insertCell(-1);
var _1c1=this._createAnchorElement("Increase");
this._increaseButton=_1c1;
_1c0.appendChild(_1c1);
_1bf.insertRow(-1);
_1c0=_1bf.rows[1].insertCell(-1);
_1c1=this._createAnchorElement("Decrease");
this._decreaseButton=_1c1;
_1c0.appendChild(_1c1);
_1bc.appendChild(_1bf);
}else{
_1bc=_1bb.rows[0].insertCell(-1);
var _1c1=this._createAnchorElement_noinput("Increase");
this._increaseButton=_1c1;
_1bc.appendChild(_1c1);
_1bc=_1bb.rows[0].insertCell(-1);
_1c1=this._createAnchorElement_noinput("Decrease");
this._decreaseButton=_1c1;
_1bc.appendChild(_1c1);
}
var _1c2=this.get_element();
_1c2.appendChild(_1bb);
_1c2.style.width=this.get_width();
},_createAnchorElement:function(_1c3){
var _1c4=document.createElement("A");
_1c4.title=_1c3;
_1c4.href="javascript:void(0);";
_1c4.innerHTML=_1c3;
_1c4.className="rade_SpinBox"+_1c3;
_1c4.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return _1c4;
},_createAnchorElement_noinput:function(_1c5){
var _1c6=document.createElement("A");
_1c6.title=_1c5;
_1c6.href="javascript:void(0);";
_1c6.innerHTML="<span class='rade_TableWizardSpinBox_"+_1c5+"'>"+_1c5+"</span>";
_1c6.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return _1c6;
},_executeFunction:function(e,elem,_1c9){
if(_1c9){
if(elem.Executed){
elem.Executed=false;
return $telerik.cancelRawEvent(e);
}
}
elem.Executed=true;
var _1ca=(this._selectedItem!="")?this._selectedItem:this._initialValue;
this._selectedItem=elem.value;
var _1cb=new Telerik.Web.UI.EditorSpinBoxEventArgs(elem.value,_1ca);
this.raiseEvent("valueSelected",_1cb);
},_onPlusMinusClickHandler:function(e){
var _1cd=null;
if(!e){
_1cd=window.event.srcElement;
}else{
_1cd=e.target;
}
while(_1cd&&_1cd.tagName.toLowerCase()!="a"){
_1cd=_1cd.parentNode;
}
if(!_1cd){
return;
}
var _1ce=this.get_value();
_1ce=_1ce.replace(/^0+(\d)/ig,"$1");
if(""==_1ce){
_1ce="0";
}
var _1cf=parseInt(_1ce);
var _1d0=_1cf+"";
if(isNaN(_1cf)){
return;
}else{
_1d0=_1ce.substring(_1d0.length);
}
if(_1cd==this._increaseButton){
if(this._enabledIncrease){
_1cf++;
}else{
return;
}
}else{
if(_1cd==this._decreaseButton){
if(this._enabledDecrease){
_1cf--;
}else{
return;
}
}else{
_1cd=null;
}
}
if(_1cd){
this.set_value(_1cf+_1d0);
this._executeFunction(e,this._inputElement);
}
return false;
},_onChangeHandler:function(e){
if(!e){
e=window.event;
}
this._executeFunction(e,this._inputElement);
},_onKeyPressHandler:function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
this._executeFunction(e,this._inputElement);
return $telerik.cancelRawEvent(e);
}
},_onKeyDownHandler:function(e){
if(!e){
var e=window.event;
}
e.returnValue=this._isKeyValid(e);
},_onKeyUpHandler:function(e){
if(!e){
var e=window.event;
}
if(this._isKeyValid(e,true)){
var _1d5=this._selectedItem;
var _1d6=this.get_value();
var _1d7=new Telerik.Web.UI.EditorSpinBoxEventArgs(_1d6,_1d5);
this.raiseEvent("valueSelected",_1d7);
}
},_isKeyValid:function(e,_1d9){
try{
if(!_1d9){
_1d9=false;
}
if(!e){
e=window.event;
}
var _1da=((48<=e.keyCode&&e.keyCode<=57)||(96<=e.keyCode&&e.keyCode<=105)||(13==e.keyCode)||(8==e.keyCode)||(46==e.keyCode)||(9==e.keyCode));
if(!_1d9){
_1da|=((35<=e.keyCode&&e.keyCode<=40));
}
return _1da;
}
catch(ex){
return true;
}
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1db){
if(null==_1db){
_1db="";
}
this._inputElement.value=_1db;
if(this._initialValue==""){
this._initialValue=_1db;
}
},get_width:function(){
return this._width;
},set_width:function(_1dc){
this._width=_1dc;
var _1dd=this.get_element();
_1dd.style.width=this._width;
},get_enabledIncrease:function(){
return this._enabledIncrease;
},set_enabledIncrease:function(_1de){
this._enabledIncrease=_1de;
this._setButtonState(this._increaseButton,_1de);
},get_enabledDecrease:function(){
return this._enabledDecrease;
},set_enabledDecrease:function(_1df){
this._enabledDecrease=_1df;
this._setButtonState(this._decreaseButton,_1df);
},_setButtonState:function(_1e0,_1e1){
if(!_1e1){
Sys.UI.DomElement.addCssClass(_1e0,"disabled-button");
}else{
Sys.UI.DomElement.removeCssClass(_1e0,"disabled-button");
}
},get_visibleInput:function(){
return this._visibleInput;
},set_visibleInput:function(_1e2){
this._visibleInput=_1e2;
if(this._inputElement){
if(!this._visibleInput){
this._inputElement.style.display="none";
}else{
this._inputElement.style.display="";
}
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_1e3){
this._clientStateFieldID=_1e3;
}};
Telerik.Web.UI.EditorSpinBox.registerClass("Telerik.Web.UI.EditorSpinBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorCheckBox=function(_1e4){
Telerik.Web.UI.EditorCheckBox.initializeBase(this,[_1e4]);
this._selectedItem=false;
};
Telerik.Web.UI.EditorCheckBox.prototype={dispose:function(){
this._inputElement.onclick=null;
this._inputElement.Parent=null;
this._inputElement=null;
Telerik.Web.UI.EditorCheckBox.callBaseMethod(this,"dispose");
},get_selectedItem:function(){
return this._selectedItem;
},set_value:function(_1e5){
if(this._inputElement.checked!=_1e5){
this._inputElement.checked=_1e5;
}
},initialize:function(){
var _1e6=document.createElement("INPUT");
_1e6.setAttribute("type","CHECKBOX");
_1e6.Parent=this;
_1e6.onclick=function(e){
var oP=this.Parent;
oP._selectedItem=!oP._selectedItem;
this.checked=oP._selectedItem;
oP._selectedItem=this.checked;
oP.raiseEvent("valueSelected");
};
this._inputElement=_1e6;
this.get_element().appendChild(_1e6);
}};
Telerik.Web.UI.EditorCheckBox.registerClass("Telerik.Web.UI.EditorCheckBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorTextBox=function(_1e9){
Telerik.Web.UI.EditorTextBox.initializeBase(this,[_1e9]);
this._width="110px";
this._selectedItem="";
};
Telerik.Web.UI.EditorTextBox.prototype={dispose:function(){
this._inputElement.onchange=null;
this._inputElement.onkeypress=null;
this._inputElement.onclick=null;
this._inputElement.Parent=null;
this._inputElement=null;
Telerik.Web.UI.EditorTextBox.callBaseMethod(this,"dispose");
},get_width:function(){
return this._width;
},set_width:function(_1ea){
this._width=_1ea;
},initialize:function(){
var _1eb=document.createElement("INPUT");
_1eb.style.width=this.get_width();
_1eb.Parent=this;
var _1ec=this.get_name();
var _1ed=function(e,elem,_1f0){
if(_1f0){
if(elem.Executed){
elem.Executed=false;
return $telerik.cancelRawEvent(e);
}
}
elem.Executed=true;
elem.Parent._selectedItem=elem.value;
elem.Parent.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(e);
};
_1eb.onchange=function(e){
if(!e){
e=window.event;
}
return _1ed(e,this,true);
};
_1eb.onclick=function(e){
this.focus();
};
_1eb.onkeypress=function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
return _1ed(e,this);
}
};
this._inputElement=_1eb;
this.get_element().appendChild(_1eb);
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1f4){
if(null==_1f4){
_1f4="";
}
this._inputElement.value=_1f4;
}};
Telerik.Web.UI.EditorTextBox.registerClass("Telerik.Web.UI.EditorTextBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.ImageDialogCaller=function(_1f5){
Telerik.Web.UI.ImageDialogCaller.initializeBase(this,[_1f5]);
this._width="150px";
this._className="rade_ImageDialogCaller";
this._editor=null;
this._clientStateFieldID=null;
};
Telerik.Web.UI.ImageDialogCaller.prototype={dispose:function(){
this._inputElement=null;
this._pushButton.onclick=null;
this._pushButton=null;
this._editor=null;
Telerik.Web.UI.ImageDialogCaller.callBaseMethod(this,"dispose");
},initialize:function(){
this._createInputElement();
this._createButton();
var _1f6=this.get_element();
_1f6.style.width=parseInt(this._inputElement.style.width)+30+"px";
_1f6.className=(this.get_skin()+" "+this._className);
},_createInputElement:function(){
var _1f7=document.createElement("INPUT");
_1f7.style.width=this.get_width();
this._inputElement=_1f7;
this.get_element().appendChild(_1f7);
},_createButton:function(){
var _1f8=document.createElement("A");
_1f8.title="Call Image Manager";
_1f8.href="javascript:void(0);";
_1f8.onclick=Function.createDelegate(this,this._onButtonClickHandler);
_1f8.innerHTML="<span>...</span>";
this.get_element().appendChild(_1f8);
this._pushButton=_1f8;
},_onButtonClickHandler:function(e){
var _1fa=this;
var _1fb=function(_1fc,args){
var src="";
var img=args.Result;
if(img){
src=img.getAttribute("src",2);
}
if(src){
_1fa._inputElement.value=src;
_1fa.raiseEvent("valueSelected");
}
};
var args={editor:this.get_editor()};
this._editor.showDialog("ImageManager",args,_1fb);
},get_editor:function(){
return this._editor;
},set_editor:function(_201){
this._editor=_201;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_202){
if(null==_202){
_202="";
}
this._inputElement.value=_202;
},get_width:function(){
return this._width;
},set_width:function(_203){
this._width=_203;
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_204){
this._clientStateFieldID=_204;
}};
Telerik.Web.UI.ImageDialogCaller.registerClass("Telerik.Web.UI.ImageDialogCaller",Telerik.Web.UI.EditorButton);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorDropDown=function(_205){
Telerik.Web.UI.EditorDropDown.initializeBase(this,[_205]);
this.isIE=$telerik.isIE;
this._popupVisible=false;
this._rendered=false;
this._childrenRendered=false;
this._popupElement=null;
this._itemRootElement=null;
this._onPopupClickDelegate=null;
this._onPopupMouseDownDelegate=null;
this._onPopupMouseOverDelegate=null;
this._items=[];
this._isArrayCollection=false;
this._selectedIndex=-1;
this._activeIndex=-1;
this._itemsPerRow=1;
this._sizeToFit=false;
this._clearSelectedOnShow=true;
this._rootPopupClassName="rade_dropDownBody";
this._popupClassName="";
this._popupWidth="200px";
this._popupHeight="200px";
};
Telerik.Web.UI.EditorDropDown.prototype={click:function(e){
this.show();
return $telerik.cancelRawEvent(e);
},dispose:function(){
Telerik.Web.UI.EditorDropDown.callBaseMethod(this,"dispose");
this.disposeChildren();
this.detachEventHandlers();
},isExpanded:function(){
return this._popupVisible;
},show:function(){
if(this._popupVisible){
return;
}
if(this.get_clearSelectedOnShow()){
this.set_selectedIndex(-1);
}
var _207=false;
if(!this._rendered){
this.render();
_207=true;
}
this.raiseEvent("show");
if(!this._childrenRendered){
this.renderChildren();
this._childrenRendered=true;
_207=true;
}
if(_207){
this._makeAllItemsUnselectable();
}
this._show();
},configurePopupPropertiesBeforeShow:function(){
this._popupBehavior.set_positioningMode(Telerik.Web.PositioningMode.BottomLeft);
},hide:function(){
if(this._popupBehavior){
this._popupBehavior.hide(true);
}
this._popupVisible=false;
this._getPopupVisibilityController().notifyPopupClosed(this);
this.raiseEvent("hide");
},onPopupMouseOver:function(e){
var _209=this.resolveActiveIndex(e);
if(_209>-1){
this.set_activeIndex(_209,e);
}
this._cancelEvent(e);
},_cancelEvent:function(e){
if(e){
e.preventDefault();
e.stopPropagation();
e.returnValue=false;
e.cancelBubble=true;
}
},_onPopupClick:function(e){
var _20c=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_20c>-1){
this._selectedIndex=_20c;
this.hide();
this.raiseEvent("valueSelected");
}
},get_activeIndex:function(){
return this._activeIndex;
},set_activeIndex:function(_20d,e){
this._activeIndex=_20d;
this.selectUIItem(e);
},selectPreviousItem:function(){
var _20f=this.get_activeIndex();
if(_20f-1>=0){
this.set_activeIndex(_20f-1);
}
},selectNextItem:function(){
var _210=this.get_activeIndex();
if(_210+1<this._items.length){
this.set_activeIndex(_210+1);
}
},selectUIItem:function(e,_212){
if(!this._popupElement){
return;
}
var _213=this._popupElement.getElementsByTagName("TD");
var len=_213.length;
var _215=this.get_activeIndex();
var _216=null;
for(var i=0;i<len;i++){
var _218=_213[i];
if(_218.item_index==_215){
_218.className="rade_itemOver";
_216=_218;
}else{
if(_212&&_218.item_index<=_215){
_218.className="rade_itemOver";
}else{
_218.className="";
}
}
}
if(_216&&!e){
this._scrollIntoView(_216,_216.parentNode.parentNode.parentNode.parentNode);
}
return _216;
},_scrollIntoView:function(_219,_21a){
if($telerik.isIE||!_21a){
var _21b=_21a;
_21b.scrollTop=0;
var _21c=_21b.getClientRects()[0];
var _21d=_21c.top;
var _21e=_21c.bottom;
var _21f=_219.getClientRects()[0].bottom;
if(_21f==0){
return;
}
while(_21f>_21e||_21f<_21d){
var _220="down";
if(_21f<_21d){
_220="up";
}
_21b.doScroll(_220);
_21f=_219.getClientRects()[0].bottom;
}
}else{
if(_219.scrollIntoView){
_219.scrollIntoView(false);
}
}
},attachEventHandlers:function(){
if(!this._popupElement){
return;
}
this.detachEventHandlers();
this._onPopupMouseOverDelegate=Function.createDelegate(this,this.onPopupMouseOver);
$addHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupClickDelegate=Function.createDelegate(this,this._onPopupClick);
$addHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
},detachEventHandlers:function(){
if(null!=this._onPopupMouseOverDelegate){
$removeHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupMouseOverDelegate=null;
}
if(null!=this._onPopupClickDelegate){
$addHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
this._onPopupClickDelegate=null;
}
},disposeChildren:function(){
this._childrenRendered=false;
if(this._itemRootElement&&this._itemRootElement.parentNode){
var _221=this._itemRootElement;
this.renderItemRoot();
_221.parentNode.replaceChild(this._itemRootElement,_221);
}
},render:function(){
this._createUI();
this.renderHeader();
this.renderChildren();
this.renderFooter();
this._rendered=true;
this._childrenRendered=true;
},renderHeader:function(){
},renderFooter:function(){
},renderItemRoot:function(){
this._itemRootElement=this._getTable();
return this._itemRootElement;
},renderNewRow:function(){
return (this._itemRootElement.insertRow(-1));
},renderItemContainer:function(){
var _222=this._itemRootElement.rows[this._itemRootElement.rows.length-1];
var cell=_222.insertCell(-1);
return cell;
},renderChildren:function(){
for(var i=0;i<this._items.length;i++){
if(0==(i%this._itemsPerRow)){
this.renderNewRow();
}
var _225=this.renderItemContainer();
this.markItemContainer(_225,i);
this.renderChild(_225,this._items[i],i);
}
},renderChild:function(_226,_227,_228){
var _229=document.createElement("span");
if(_227){
var _22a=null;
var _22b=null;
if(_227 instanceof Array){
_22a=_227[1];
_22b=_227[2];
}else{
_22a=_227;
}
if(_22b){
var _22c=document.createElement("span");
_22c.innerHTML="&nbsp;";
_22c.className=_22b;
_229.appendChild(_22c);
}
if(_22a){
_229.innerHTML+=_22a;
_229.noWrap=true;
}
}
_226.innerHTML=_229.innerHTML;
},resolveActiveIndex:function(e){
var _22e=e.target;
var _22f=-1;
while(_22e&&_22e!=this._itemRootElement){
if(null!=_22e.item_index){
_22f=_22e.item_index;
break;
}
_22e=_22e.parentNode;
}
return _22f;
},markItemContainer:function(_230,_231){
_230.item_index=_231;
},_makeAllItemsUnselectable:function(){
if(!this._popupElement){
return;
}
this._popupElement.setAttribute("unselectable","on");
var _232=this._popupElement.getElementsByTagName("*");
var len=_232.length;
for(var i=0;i<len;i++){
_232[i].unselectable="on";
}
},_show:function(){
this.configurePopupPropertiesBeforeShow();
var _235=this._popupElement;
var _236=this.get_sizetofit();
var _237=_235.style.overflow;
if(_236){
_235.style.overflowY="hidden";
}
_235.style.width=this.get_popupwidth();
_235.style.height=this.get_popupheight();
this._itemRootElement.style.width="100%";
this._popupBehavior.show();
if(_236){
_235.style.width=this._getPopupChildrenWidth();
var _238=this._getPopupChildrenHeight();
if(_238!="0px"){
_235.style.height=_238;
}
}
this._popupBehavior.show();
this._getPopupVisibilityController().set_activePopup(this);
_235.style.zIndex="100000";
if(_236){
_235.style.overflowY=_237;
}
this._popupVisible=true;
},_getPopupChildrenWidth:function(){
var _239=this.get_popupElement().childNodes;
var _23a=0;
for(var i=0;i<_239.length;i++){
var _23c=_239[i].offsetWidth;
if(_23c&&_23c>_23a){
_23a=_23c;
}
}
return _23a+"px";
},_getPopupChildrenHeight:function(){
var _23d=this.get_popupElement().childNodes;
var _23e=0;
for(var i=0;i<_23d.length;i++){
if(_23d[i].offsetHeight){
_23e+=_23d[i].offsetHeight;
}
}
return _23e+"px";
},_getPopupVisibilityController:function(){
return Telerik.Web.UI.Editor.PopupController;
},getUniqueID:function(){
if(!window["RadEditor_uniqueSeed"]){
window["RadEditor_uniqueSeed"]=new Date()-101;
}
if(!window["RadEditor_uniqueIdCounter"]){
window["RadEditor_uniqueIdCounter"]=1;
}else{
window["RadEditor_uniqueIdCounter"]++;
}
var _240=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_240;
},_createUI:function(){
if(this._popupBehavior){
return;
}
var _241=this.get_element();
if(!this._popupElement){
var _242=document.createElement("DIV");
$telerik.addCssClasses(_242,[this.get_skin(),this._rootPopupClassName,this.get_popupclassname()]);
this._popupElement=_242;
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
document.body.appendChild(this._popupElement);
}
this.renderItemRoot();
this._popupElement.appendChild(this._itemRootElement);
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{"id":this.getUniqueID(),"parentElement":_241},null,null,this._popupElement);
this.attachEventHandlers();
},_getTable:function(){
var _243=document.createElement("table");
_243.border=0;
_243.cellPadding=0;
_243.setAttribute("unselectable","on");
_243.style.cursor="default";
return _243;
},get_clearSelectedOnShow:function(){
return this._clearSelectedOnShow;
},set_clearSelectedOnShow:function(_244){
this._clearSelectedOnShow=_244;
},get_popupElement:function(){
return this._popupElement;
},get_selectedItem:function(){
if(this._items&&this._selectedIndex>-1){
var item=this._items[this._selectedIndex];
var _246=((true==this._isArrayCollection)||(item instanceof Array))?item[0]:item;
return _246;
}
return null;
},get_selectedIndex:function(){
return this._selectedIndex;
},set_selectedIndex:function(_247){
this._selectedIndex=_247;
this.set_activeIndex(_247);
},get_items:function(){
return this._items;
},set_items:function(_248){
this.disposeChildren();
this._items=_248;
},get_itemsperrow:function(){
return this._itemsPerRow;
},set_itemsperrow:function(_249){
this._itemsPerRow=_249;
},get_sizetofit:function(){
return this._sizeToFit;
},set_sizetofit:function(_24a){
this._sizeToFit=_24a;
},get_popupclassname:function(){
return this._popupClassName;
},set_popupclassname:function(_24b){
this._popupClassName=_24b;
},get_rootpopupclassname:function(){
return this._rootPopupClassName;
},set_rootpopupclassname:function(_24c){
this._rootPopupClassName=_24c;
},get_popupwidth:function(){
return this._popupWidth;
},set_popupwidth:function(_24d){
this._popupWidth=_24d;
},get_popupheight:function(){
return this._popupHeight;
},set_popupheight:function(_24e){
this._popupHeight=_24e;
},add_show:function(_24f){
this.get_events().addHandler("show",_24f);
},remove_show:function(_250){
this.get_events().removeHandler("show",_250);
},add_hide:function(_251){
this.get_events().addHandler("hide",_251);
},remove_hide:function(_252){
this.get_events().removeHandler("hide",_252);
}};
Telerik.Web.UI.EditorDropDown.registerClass("Telerik.Web.UI.EditorDropDown",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorUpdateableDropDown=function(_253){
Telerik.Web.UI.EditorUpdateableDropDown.initializeBase(this,[_253]);
};
Telerik.Web.UI.EditorUpdateableDropDown.prototype={updateValue:function(oVal){
if(null==oVal){
return;
}
try{
if(!oVal){
oVal=this.get_text();
}
var _255=this.getSpanElement();
if(_255){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_255.innerHTML=this._value;
}
}
catch(e){
}
},get_value:function(){
if(!this._value||this._value==this.get_text()){
return "";
}
return this._value;
},set_value:function(oVal){
this.updateValue(oVal);
}};
Telerik.Web.UI.EditorUpdateableDropDown.registerClass("Telerik.Web.UI.EditorUpdateableDropDown",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.EditorSelfUpdateableDropDown=function(_257){
Telerik.Web.UI.EditorSelfUpdateableDropDown.initializeBase(this,[_257]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.EditorSelfUpdateableDropDown.prototype={_onPopupClick:function(e){
var _259=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_259>-1){
this._selectedIndex=_259;
this.hide();
var _25a=this.get_selectedItem();
if(_25a){
this.updateValue(_25a);
}
this.raiseEvent("valueSelected");
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_25b){
this._clientStateFieldID=_25b;
}};
Telerik.Web.UI.EditorSelfUpdateableDropDown.registerClass("Telerik.Web.UI.EditorSelfUpdateableDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorSplitButton=function(_25c){
Telerik.Web.UI.EditorSplitButton.initializeBase(this,[_25c]);
this._updateHeader=true;
};
Telerik.Web.UI.EditorSplitButton.prototype={click:function(e){
var _25e=this.isArrowClicked(e.target);
if(_25e||!this._updateHeader){
this.show();
}else{
var _25f=this.get_selectedItem();
if(null==_25f){
this.show();
}else{
this.raiseEvent("valueSelected");
}
}
return $telerik.cancelRawEvent(e);
},initialize:function(){
Telerik.Web.UI.EditorSplitButton.callBaseMethod(this,"initialize");
this.set_clearSelectedOnShow(false);
},isArrowClicked:function(_260){
var _261=this._getArrowElement();
if(_260==_261){
return true;
}
return false;
},_getArrowElement:function(){
var _262=this.getAnchorElement().getElementsByTagName("SPAN");
var _263=_262[_262.length-1];
return _263;
},get_updateHeader:function(){
return this._updateHeader;
},set_updateHeader:function(_264){
this._updateHeader=_264;
}};
Telerik.Web.UI.EditorSplitButton.registerClass("Telerik.Web.UI.EditorSplitButton",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorToolStrip=function(_265){
Telerik.Web.UI.EditorToolStrip.initializeBase(this,[_265]);
this._tools=[];
};
Telerik.Web.UI.EditorToolStrip.prototype={selectUIItem:function(e){
for(var i=0;i<this._items.length;i++){
var tool=this._items[i];
if(i==this._activeIndex&&tool.get_enabled()){
tool.setOn(true);
}else{
tool.setOn(false);
if(this.isIE){
var a=tool.getAnchorElement();
if(a){
var newA=a.cloneNode(true);
a.replaceNode(newA);
}
}
}
}
},set_selectedIndex:function(_26b){
Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"set_selectedIndex",[_26b]);
if(this.get_updateHeader()){
var tool=this.get_selectedItem();
if(!tool||!tool.getSpanElement){
return;
}
var span=tool.getSpanElement();
if(span){
var _26e=span.cloneNode(true);
var _26f=this.getSpanElement();
var _270=_26f.parentNode;
_270.replaceChild(_26e,_26f);
var _271=tool.getAnchorElement();
if(_271){
_270.setAttribute("title",_271.getAttribute("title"));
}
}
}
},show:function(){
var _272=this._items;
for(var i=0,_274=_272.length;i<_274;i++){
var tool=_272[i];
tool.setOn(false);
}
Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"show");
},_onPopupClick:function(e){
var tool=this._resolveSelectedTool(e);
this._cancelEvent(e);
if(tool){
var _278=Array.indexOf(this._items,tool);
if($telerik.isSafari){
this._selectedIndex=_278;
this.set_activeIndex(_278);
}else{
this.set_selectedIndex(_278);
}
this.hide();
this.raiseEvent("valueSelected");
}
},renderItemRoot:function(){
var _279=document.createElement("DIV");
_279.className="rade_tlbVertical";
_279.style.cssFloat="left";
_279.style.width="100%";
this._itemRootElement=_279;
return this._itemRootElement;
},renderChildren:function(){
var _27a=this.get_itemsperrow();
var _27b=this.get_tools();
var ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
for(var i=0;i<_27b.length;i++){
if(_27a>1&&i>1&&(i%this.get_itemsperrow()==0)){
ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
}
var _27e=_27b[i];
if(null==_27e["showText"]){
_27e["showText"]=true;
}
var tool=Telerik.Web.UI.EditorButton.createTool(_27e,null,null,null,ul);
this._items[this._items.length]=tool;
}
},_resolveSelectedTool:function(e){
for(var i=0;i<this._items.length;i++){
var tool=this._items[i];
if(tool.isTarget(e)){
if(tool.get_enabled()){
return tool;
}else{
return null;
}
}
}
},get_tools:function(){
return this._tools;
},set_tools:function(_283){
this._tools=_283;
}};
Telerik.Web.UI.EditorToolStrip.registerClass("Telerik.Web.UI.EditorToolStrip",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.EditorContextMenu=function(_284){
Telerik.Web.UI.EditorContextMenu.initializeBase(this,[_284]);
this._parentElement=null;
this._eventObject=null;
};
Telerik.Web.UI.EditorContextMenu.prototype={initialize:function(){
this.set_updateHeader(false);
this.set_clearSelectedOnShow(true);
},show:function(){
this.set_activeIndex(-1);
Telerik.Web.UI.EditorContextMenu.callBaseMethod(this,"show");
},configurePopupPropertiesBeforeShow:function(){
var _285=this._popupBehavior;
_285.set_positioningMode(Telerik.Web.PositioningMode.Absolute);
var _286=this.get_parentElement();
if(_286){
_285.set_parentElement(_286);
}
var e=this._eventObject;
if(e){
_285.set_x(e.clientX+10);
_285.set_y(e.clientY+10);
}
},set_eventObject:function(_288){
this._eventObject=_288;
},get_tagName:function(){
return this._tagName;
},set_tagName:function(_289){
this._tagName=_289;
},get_parentElement:function(){
return this._parentElement;
},set_parentElement:function(_28a){
this._parentElement=_28a;
}};
Telerik.Web.UI.EditorContextMenu.registerClass("Telerik.Web.UI.EditorContextMenu",Telerik.Web.UI.EditorToolStrip);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.AlignmentSelector=function(_28b){
Telerik.Web.UI.Editor.AlignmentSelector.initializeBase(this,[_28b]);
this._popupWidth="78px";
this._popupHeight="100px";
this._popupClassName="rade_AlignmentSelector";
this._tagName="TD";
this._selectedTuple=null;
this._noAlignmentIndex=0;
this._itemsPerRow=3;
this._onValueSelectedDelegate=null;
this._clientStateFieldID=null;
};
Telerik.Web.UI.Editor.AlignmentSelector.prototype={initialize:function(){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"initialize");
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this.add_valueSelected(this._onValueSelectedDelegate);
this.setTagName(this._tagName);
this._configureAlignmentTable(this._tagName);
},dispose:function(){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"dispose");
this.remove_valueSelected(this._onValueSelectedDelegate);
},_imgAlignment:[["",""],["none",""],["",""],["",""],["top",""],["",""],["left",""],["absmiddle",""],["right",""],["",""],["bottom",""],["",""]],_cellAlignment:[["",""],["none",""],["",""],["left","top"],["center","top"],["right","top"],["left","middle"],["center","middle"],["right","middle"],["left","bottom"],["center","bottom"],["right","bottom"]],_tableAlignment:[["",""],["none",""],["",""],["left",""],["center",""],["right",""],["",""],["",""],["",""],["",""],["",""],["",""]],_captionIEAlignment:[["",""],["none",""],["",""],["left","top"],["center","top"],["right","top"],["",""],["",""],["",""],["left","bottom"],["center","bottom"],["right","bottom"]],_captionNSAlignment:[["",""],["none",""],["",""],["",""],["","top"],["",""],["",""],["",""],["",""],["",""],["","bottom"],["",""]],_alignmentClassName:["rade_NoAlignment","rade_NoAlignment","rade_NoAlignment","rade_TopLeft","rade_TopCenter","rade_TopRight","rade_MiddleLeft","rade_MiddleCenter","rade_MiddleRight","rade_BottomLeft","rade_BottomCenter","rade_BottomRight"],_getLookupTableByTagName:function(_28c){
switch(_28c.toUpperCase()){
case "IMG":
return this._imgAlignment;
case "TABLE":
return this._tableAlignment;
case "TD":
return this._cellAlignment;
case "TH":
return this._cellAlignment;
case "CAPTION":
return ($telerik.isIE?this._captionIEAlignment:this._captionNSAlignment);
default:
return null;
}
},_configureAlignmentTable:function(_28d){
if(!this._rendered){
this.render();
}
var _28e=this._itemRootElement;
var _28f=0;
for(var i=0;i<_28e.rows.length;i++){
var _291=false;
for(var j=0;j<_28e.rows[i].cells.length;j++){
var cell=_28e.rows[i].cells[j];
var _294=this._isAvailable(_28f++);
cell.style.visibility=_294?"visible":"hidden";
_291|=_294;
}
if(null!=document.all){
_28e.rows[i].style.display=_291?"":"none";
}
}
},_isAvailable:function(_295){
var _296=false;
if(this._items){
var _297=this._items[_295];
_296=((null!=_297)&&(""!=_297[0]||""!=_297[1]));
}
return _296;
},renderChild:function(_298,_299,_29a){
var _29b=document.createElement("div");
if(_299){
_29b.innerHTML="&nbsp;";
_29b.className=this._alignmentClassName[_29a];
}
_298.appendChild(_29b);
},_onDropDownValueSelected:function(){
this.set_selectedIndex(this.get_selectedIndex());
},_selectAlignment:function(_29c,_29d){
_29c=(""==_29c||!_29c)?"none":_29c.toUpperCase();
_29d=!_29d?"":_29d.toUpperCase();
if(this._items){
var _29e=-1;
for(i=0;i<this._items.length;i++){
if(this._isAvailable(i)){
var ha=this._items[i][0].toUpperCase();
var va=this._items[i][1].toUpperCase();
if(-1==_29e){
_29e=i;
}
if((_29c==ha||_29c==va)&&(_29d==ha||_29d==va)){
this.set_selectedIndex(i);
return;
}
}
}
this.set_selectedIndex(_29e);
}
},set_selectedIndex:function(_2a1){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"set_selectedIndex",[_2a1]);
var span=this.getSpanElement();
var _2a3=this._alignmentClassName[_2a1];
span.className=_2a3;
},setTagName:function(_2a4){
this._tagName=_2a4;
this._items=this._getLookupTableByTagName(this._tagName);
this.set_selectedIndex(this._noAlignmentIndex);
},updateValue:function(_2a5,_2a6){
this._selectAlignment(_2a5,_2a6);
},getAlign:function(){
var _2a7=this._items[this._selectedIndex];
var _2a8=(_2a7?_2a7[0]:"");
if("none"==_2a8){
_2a8="";
}
return _2a8;
},getVAlign:function(){
var _2a9=this._items[this._selectedIndex];
var _2aa=(_2a9?_2a9[1]:"");
if("none"==_2aa){
_2aa="";
}
return _2aa;
},show:function(){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"show");
this._itemRootElement.cellSpacing=0;
this._configureAlignmentTable(this._tagName);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_2ab){
this._clientStateFieldID=_2ab;
}};
Telerik.Web.UI.Editor.AlignmentSelector.registerClass("Telerik.Web.UI.Editor.AlignmentSelector",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.InsertTableHelper=function(_2ac){
Telerik.Web.UI.Editor.InsertTableHelper.initializeBase(this,[_2ac]);
};
Telerik.Web.UI.Editor.InsertTableHelper.prototype={initialize:function(){
var _2ad=new Array(this.get_itemsperrow()*this.get_itemsperrow());
for(var i=0;i<_2ad.length;i++){
_2ad[i]=i;
}
this._items=_2ad;
},hide:function(){
},renderChild:function(_2af,_2b0,_2b1){
var oDiv=document.createElement("div");
oDiv.innerHTML="&nbsp;";
_2af.appendChild(oDiv);
var dim=this._getDimensionByIndex(_2b1);
_2af.setAttribute("title"," "+dim.rows+" x "+dim.cols+" ");
},_getDimensionByIndex:function(_2b4){
var _2b5=0;
var _2b6=0;
var _2b7=this.get_itemsperrow();
for(var i=0;i<this._items.length;i++){
if(i%_2b7==0){
_2b5++;
_2b6=0;
}
_2b6++;
if(_2b4==i){
break;
}
}
var obj={rows:_2b5,cols:_2b6};
return obj;
},get_selectedItem:function(){
var _2ba=this.get_selectedIndex();
return this._getDimensionByIndex(_2ba);
},selectUIItem:function(e,_2bc){
var _2bd=this._popupElement.getElementsByTagName("TD");
var len=_2bd.length;
var _2bf=this.get_activeIndex();
var dim=this._getDimensionByIndex(_2bf);
var cols=dim.cols;
for(var i=0;i<len;i++){
var _2c3=_2bd[i];
var _2c4=_2c3.item_index;
if(_2c4<=_2bf&&_2c3.cellIndex<cols){
_2c3.className="rade_itemOver";
}else{
_2c3.className="";
}
}
}};
Telerik.Web.UI.Editor.InsertTableHelper.registerClass("Telerik.Web.UI.Editor.InsertTableHelper",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.Editor.InsertTable=function(_2c5){
Telerik.Web.UI.Editor.InsertTable.initializeBase(this,[_2c5]);
};
Telerik.Web.UI.Editor.InsertTable.prototype={initialize:function(){
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"initialize");
this._onTableHelperValueSelectedDelegate=Function.createDelegate(this,this._onTableHelperValueSelected);
this._tableHelper=null;
this._tableHelperItemsPerRow=this.get_itemsperrow();
this.set_itemsperrow(6);
this.set_popupwidth("140px");
this.set_updateHeader(false);
var _2c6=this.get_tools();
this._longTool=_2c6[0];
Array.removeAt(_2c6,0);
for(var i=0;i<_2c6.length;i++){
_2c6[i].showText=false;
}
},show:function(){
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"show");
this._tableHelper.set_selectedIndex(-1);
},_onPopupClick:function(e){
this._tableHelperClicked=false;
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"_onPopupClick",[e]);
},_onTableHelperValueSelected:function(){
this._tableHelperClicked=true;
this.set_selectedIndex(-1);
var span=this.getSpanElement();
span.className="InsertTable";
this.hide();
this.raiseEvent("valueSelected");
},get_selectedItem:function(){
if(this._tableHelperClicked){
return this._tableHelper.get_selectedItem();
}else{
return Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"get_selectedItem");
}
},renderHeader:function(){
var args={"skin":this.get_skin(),"itemsperrow":this._tableHelperItemsPerRow,"sizetofit":true};
var _2cb={"valueSelected":this._onTableHelperValueSelectedDelegate};
var tool=$create(Telerik.Web.UI.Editor.InsertTableHelper,args,_2cb,null,document.createElement("DIV"));
tool.set_rootpopupclassname("");
this._tableHelper=tool;
tool.render();
var _2cd=tool.get_popupElement();
_2cd.style.display="";
_2cd.style.visibility="visible";
_2cd.style.position="";
_2cd.style.cssFloat="left";
var _2ce=this.get_popupElement();
_2ce.insertBefore(_2cd,_2ce.firstChild);
},renderChildren:function(){
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"renderChildren");
var _2cf=this._itemRootElement;
if(this._longTool){
var ul=document.createElement("UL");
_2cf.insertBefore(ul,_2cf.firstChild);
this._longTool["showText"]=true;
var tool=Telerik.Web.UI.EditorButton.createTool(this._longTool,null,null,null,ul);
tool.get_element().style.width="auto";
this._items[this._items.length]=tool;
}
}};
Telerik.Web.UI.Editor.InsertTable.registerClass("Telerik.Web.UI.Editor.InsertTable",Telerik.Web.UI.EditorToolStrip);
Telerik.Web.UI.Editor.ColorPicker=function(_2d2){
Telerik.Web.UI.Editor.ColorPicker.initializeBase(this,[_2d2]);
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this._itemsPerRow=10;
this._popupClassName="rade_ColorPicker";
this._sizeToFit=true;
this._clientStateFieldID=null;
};
Telerik.Web.UI.Editor.ColorPicker.prototype={initialize:function(){
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"initialize");
this.add_valueSelected(this._onValueSelectedDelegate);
},dispose:function(){
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"dispose");
this.remove_valueSelected(this._onValueSelectedDelegate);
},_onDropDownValueSelected:function(){
var _2d3=this.get_selectedItem();
this.set_color(_2d3);
},get_value:function(){
return this.get_color();
},set_value:function(oVal){
this.set_color(oVal);
},set_color:function(_2d5){
if(!_2d5){
_2d5="";
}
var _2d6=this.getSpanElement();
_2d6.style.borderBottom="0px";
_2d6.style.height="";
if(_2d5){
var _2d7=_2d6.offsetHeight;
if(_2d7){
_2d6.style.height=(_2d7-3)+"px";
}
_2d6.style.borderBottom="3px solid "+_2d5;
}
this._color=_2d5;
},get_color:function(){
return this._color;
},onPopupMouseOver:function(e){
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"onPopupMouseOver",[e]);
var _2d9=this.get_activeIndex();
var _2da=this._items[_2d9];
if(null==_2da){
return;
}
if(this._infoSpan1){
this._infoSpan1.innerHTML=_2da;
this._infoSpan1.style.backgroundColor=_2da;
}
if(this._infoSpan2){
this._infoSpan2.innerHTML=_2da;
this._infoSpan2.style.color=_2da;
}
},renderFooter:function(){
var oDiv=document.createElement("div");
oDiv.className="rade_ColorPickerFooter";
var _2dc=document.createElement("span");
_2dc.className="rade_DarkColor";
var _2dd=document.createElement("span");
_2dd.className="rade_LightColor";
_2dc.innerHTML=_2dd.innerHTML="&nbsp";
oDiv.appendChild(_2dc);
oDiv.appendChild(_2dd);
this.get_popupElement().appendChild(oDiv);
this._infoSpan1=_2dc;
this._infoSpan2=_2dd;
},renderChild:function(_2de,_2df,_2e0){
var oDiv=document.createElement("div");
if(null!=_2df){
oDiv.style.backgroundColor=_2df;
oDiv.setAttribute("title",_2df);
oDiv.innerHTML="&nbsp;";
}
_2de.appendChild(oDiv);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_2e2){
this._clientStateFieldID=_2e2;
}};
Telerik.Web.UI.Editor.ColorPicker.registerClass("Telerik.Web.UI.Editor.ColorPicker",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.UndoRedoDropDown=function(_2e3){
Telerik.Web.UI.Editor.UndoRedoDropDown.initializeBase(this,[_2e3]);
};
Telerik.Web.UI.Editor.UndoRedoDropDown.prototype={renderFooter:function(){
},get_selectedItem:function(){
var _2e4=Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"get_selectedItem");
if(!_2e4){
_2e4=1;
}
return _2e4;
},selectUIItem:function(e,_2e6){
return Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"selectUIItem",[e,true]);
}};
Telerik.Web.UI.Editor.UndoRedoDropDown.registerClass("Telerik.Web.UI.Editor.UndoRedoDropDown",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.ApplyClassDropDown=function(_2e7){
Telerik.Web.UI.Editor.ApplyClassDropDown.initializeBase(this,[_2e7]);
this._popupClassName="rade_ApplyClass";
this._onValueSelectedDelegate=null;
this._clientStateFieldID=null;
this._clearclasstext="Clear Class";
this._isArrayCollection=true;
};
Telerik.Web.UI.Editor.ApplyClassDropDown.prototype={initialize:function(){
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"initialize");
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this.add_valueSelected(this._onValueSelectedDelegate);
this._cssClassRegex=/[^\{]*\{([^\}]+)\}/gi;
this._cssClasses={a:"rade_class_a",img:"rade_class_img",table:"rade_class_table",td:"rade_class_td",all:"rade_class_all",unknown:"rade_class_unknown"};
},dispose:function(){
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"dispose");
this.remove_valueSelected(this._onValueSelectedDelegate);
},_onDropDownValueSelected:function(){
this.updateValue(this.get_selectedItem());
},_getClassIcon:function(tag){
var _2e9="";
if(!tag){
_2e9=this._cssClasses["notag"];
}else{
tag=tag.toLowerCase();
var res=this._cssClasses[tag];
_2e9=res?res:this._cssClasses["unknown"];
}
var _2eb=document.createElement("span");
_2eb.innerHTML="&nbsp;"+tag;
_2eb.className=_2e9;
return _2eb;
},_getClassTag:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2ee=str.lastIndexOf(".");
if(_2ee==0){
return "ALL";
}
var _2ef=str.lastIndexOf(" ",_2ee);
return str.substring((_2ef+1),_2ee);
},_getClassCss:function(_2f0){
var re=this._cssClassRegex;
var oCss="";
if(null!=_2f0.cssText){
oCss=_2f0.cssText;
oCss=oCss.replace(re,"$1");
}else{
oCss=_2f0.style.cssText;
}
return oCss;
},_getDisplayName:function(rule){
if(!rule||!rule.selectorText){
return "";
}
var _2f4=rule.selectorText;
var _2f5=_2f4.indexOf(".");
if(-1==_2f5){
_2f5=0;
}else{
_2f5+=1;
}
var _2f6=_2f4.indexOf(":");
if(-1==_2f6){
_2f6=_2f4.length;
}
return _2f4.substring(_2f5,_2f6);
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2f9=str.lastIndexOf(".");
if(_2f9==-1){
return "";
}
var _2fa=str.indexOf(" ",_2f9);
if(-1==_2fa){
_2fa=str.indexOf(":",_2f9);
}
if(-1==_2fa){
_2fa=str.length;
}
return str.substring((_2f9+1),_2fa);
},_getChild:function(_2fb,_2fc,_2fd){
var elem=document.createElement("DIV");
if(_2fc.toLowerCase()=="a"){
elem=document.createElement("A");
elem.href="#";
elem.onmouseover="window.status = ''; return false;";
elem.onclick=new Function("return false;");
elem.style.cursor="default";
}
if(null!=elem.style.cssText){
elem.style.cssText=_2fb;
}
elem.setAttribute("style",_2fb);
elem.innerHTML=_2fd;
elem.style.visibility="visible";
elem.style.marginLeft="0px";
elem.style.overflowX="hidden";
elem.style.position="";
elem.style.cssFloat="";
elem.style.styleFloat="";
return elem;
},set_items:function(_2ff){
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"set_items",[_2ff]);
this._items.splice(0,0,["",{cssText:"",selectorText:this.get_clearclasstext()}]);
},renderChild:function(cell,_301,_302){
var _303=_301[1];
if(_303){
var oTag=this._getClassTag(_303);
var oCss=this._getClassCss(_303);
var _306=_301[2]?_301[2]:this._getDisplayName(_303);
cell.setAttribute("title",_303.selectorText);
var _307=this._getClassIcon(oTag);
cell.appendChild(_307);
var div=this._getChild(oCss,oTag,_306);
cell.appendChild(div);
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_309){
this._clientStateFieldID=_309;
},get_clearclasstext:function(){
return this._clearclasstext;
},set_clearclasstext:function(_30a){
this._clearclasstext=_30a;
}};
Telerik.Web.UI.Editor.ApplyClassDropDown.registerClass("Telerik.Web.UI.Editor.ApplyClassDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontNameDropDown=function(_30b){
Telerik.Web.UI.Editor.FontNameDropDown.initializeBase(this,[_30b]);
};
Telerik.Web.UI.Editor.FontNameDropDown.prototype={updateValue:function(oVal){
try{
if(!oVal){
oVal=this.get_text();
}
if(null==oVal||"AZBY"==oVal){
return;
}
var _30d=this.getSpanElement();
if(_30d){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_30d.innerHTML=this._value;
}
}
catch(e){
}
},renderChildren:function(){
var _30e=this._items;
if(_30e&&_30e[0]&&!(_30e[0] instanceof Array)){
for(var i=0;i<_30e.length;i++){
var item=_30e[i];
_30e[i]=[item,String.format("<span style='font:normal 13px {0};'>",item)+item+"</span>"];
}
}
return Telerik.Web.UI.Editor.FontNameDropDown.callBaseMethod(this,"renderChildren");
}};
Telerik.Web.UI.Editor.FontNameDropDown.registerClass("Telerik.Web.UI.Editor.FontNameDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontSizeDropDown=function(_311){
Telerik.Web.UI.Editor.FontSizeDropDown.initializeBase(this,[_311]);
};
Telerik.Web.UI.Editor.FontSizeDropDown.prototype={renderChildren:function(){
var _312=this._items;
if(_312&&_312[0]&&!(_312[0] instanceof Array)){
for(var i=0;i<_312.length;i++){
var item=_312[i];
_312[i]=[item,String.format("<font size={0}>",item)+item+"</font>"];
}
}
return Telerik.Web.UI.Editor.FontSizeDropDown.callBaseMethod(this,"renderChildren");
}};
Telerik.Web.UI.Editor.FontSizeDropDown.registerClass("Telerik.Web.UI.Editor.FontSizeDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.InsertCustomLinkDropDown=function(_315){
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.initializeBase(this,[_315]);
};
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.prototype={renderItemRoot:function(){
var ul=document.createElement("UL");
ul.className="rade_CustomLinks";
this._itemRootElement=ul;
return this._itemRootElement;
},show:function(){
this._linkCounter=0;
return Telerik.Web.UI.Editor.InsertCustomLinkDropDown.callBaseMethod(this,"show");
},renderChildren:function(){
this.FlatLinksArray=[];
for(var i=0;i<this._items.length;i++){
var link=this._items[i];
this._parseSubtree(link,this._itemRootElement);
}
},get_selectedItem:function(){
var _319=this.FlatLinksArray[this.get_selectedIndex()];
return {innerHTML:_319.name,href:_319.href,target:_319.target,title:_319.toolTip};
},_parseSubtree:function(_31a,t){
var _31c=this._linkCounter;
this.FlatLinksArray[_31c]=_31a;
var li=document.createElement("LI");
t.appendChild(li);
var _31e=_31a.childLinks&&_31a.childLinks.length;
var span=document.createElement("SPAN");
span.innerHTML="&nbsp;";
span.className=_31e?"rade_CustomLinksIcon rade_icon_plus":"rade_CustomLinksIcon rade_icon_empty";
if(_31e){
function onclick(e){
var _321=Sys.UI.DomElement.containsCssClass(this,"rade_icon_plus");
var ul=this.parentNode.getElementsByTagName("UL")[0];
if(ul){
ul.style.display=_321?"":"none";
var _323=_321?"rade_icon_plus":"rade_icon_minus";
var _324=_321?"rade_icon_minus":"rade_icon_plus";
Sys.UI.DomElement.removeCssClass(this,_323);
Sys.UI.DomElement.addCssClass(this,_324);
}
return false;
}
$addHandler(span,"click",onclick);
}
li.appendChild(span);
var _325=null;
if(_31a.href){
_325=document.createElement("A");
_325.href="#";
_325.innerHTML=_31a.name;
li.appendChild(_325);
this.markItemContainer(_325,this._linkCounter);
}else{
_325=document.createElement("SPAN");
_325.innerHTML=_31a.name;
li.appendChild(_325);
}
this._linkCounter++;
if(_31e){
var ul=document.createElement("UL");
li.appendChild(ul);
var _327=_31a.childLinks;
for(var i=0;i<_31a.childLinks.length;i++){
var _329=_327[i];
this._parseSubtree(_329,ul);
}
ul.style.display="none";
}
}};
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.registerClass("Telerik.Web.UI.Editor.InsertCustomLinkDropDown",Telerik.Web.UI.EditorDropDown);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor._PopupController=function(){
this._activePopup=null;
this._registerGlobalBodyEventHandlers();
};
Telerik.Web.UI.Editor._PopupController.prototype={_registerGlobalBodyEventHandlers:function(){
function configureFrameHandlers(_32a,_32b){
var _32c=window.frames;
for(var i=0;i<_32c.length;i++){
var _32e=null;
try{
_32e=_32c[i].window.document;
}
catch(e){
}
if(!_32e){
continue;
}
try{
if(false!=_32a){
_32b.attachToDocument(_32e);
}else{
_32b.detachFromDocument(_32e);
}
}
catch(e){
}
}
}
var _32f=Function.createDelegate(null,function(e){
if(e.keyCode==27){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
});
$addHandler(document.body,"keydown",_32f);
configureFrameHandlers(true,this);
$addHandler(document.body,"mousedown",this._hideHandler);
Sys.Application.add_unload(function(){
configureFrameHandlers(false,Telerik.Web.UI.Editor.PopupController);
$removeHandler(document.body,"mousedown",Telerik.Web.UI.Editor.PopupController._hideHandler);
$removeHandler(document.body,"keydown",_32f);
});
},attachToDocument:function(_331){
$telerik.addExternalHandler(_331,"mousedown",this._hideHandler);
},detachFromDocument:function(_332){
$telerik.removeExternalHandler(_332,"mousedown",this._hideHandler);
},_hideHandler:function(e){
Telerik.Web.UI.Editor.PopupController._hideIfOutsidePopup(e);
},hideActivePopup:function(){
if(this._activePopup!=null){
this._activePopup.hide();
this._activePopup=null;
}
},_hideIfOutsidePopup:function(e){
if(this._activePopup!=null){
if(!this._activePopup.get_popupElement){
return;
}
var _335=this._activePopup.get_popupElement();
if(!this._isMouseOverElement(e,_335)){
this.hideActivePopup();
}
}
},_isMouseOverElement:function(e,_337){
var rect=null;
try{
rect=$telerik.getBounds(_337);
}
catch(e){
return false;
}
if(e&&e.target&&e.target.tagName=="SELECT"&&e.clientX<0){
return true;
}
var body=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
var x=e.clientX-2+body.scrollLeft;
var y=e.clientY-2+body.scrollTop;
return $telerik.containsPoint(rect,x,y);
},notifyPopupClosed:function(_33c){
if(this._activePopup==_33c){
this._activePopup=null;
}
},set_activePopup:function(_33d){
if(this._activePopup&&(_33d!=this._activePopup)){
this._activePopup.hide();
}
this._activePopup=_33d;
},get_activePopup:function(){
return this._activePopup;
}};
Telerik.Web.UI.Editor._PopupController.registerClass("Telerik.Web.UI.Editor._PopupController",null);
if(!Telerik.Web.UI.Editor.PopupController){
Sys.Application.add_load(function(){
window.setTimeout(function(){
Telerik.Web.UI.Editor.PopupController=new Telerik.Web.UI.Editor._PopupController();
},100);
});
}
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.DefaultToolAdapter=function(_33e){
Telerik.Web.UI.Editor.DefaultToolAdapter.initializeBase(this,[_33e]);
this._editor=null;
this._toolJSON=[];
this._tools=[];
this._contextMenusEnabled=true;
this.isIE=$telerik.isIE;
this._editorIEFirstShow=false;
};
Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=null;
Telerik.Web.UI.Editor.DefaultToolAdapter.prototype={initialize:function(){
this._onEditorSelectionChangeDelegate=Function.createDelegate(this,this._onEditorSelectionChange);
this._onEditorModeChangeDelegate=Function.createDelegate(this,this._onEditorModeChange);
this._onToolAdapterClickDelegate=Function.createDelegate(this,this._onToolBarClick);
this._onToolAdapterKeyDownDelegate=Function.createDelegate(this,this._onKeyDownHandler);
this._onDropDownValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this._onDropDownBeforeShowDelegate=Function.createDelegate(this,this._onDropDownBeforeShow);
this._onDropDownHideDelegate=Function.createDelegate(this,this._onDropDownHide);
this._initContextMenus();
this._registerEditorHandlers();
var _33f=Telerik.Web.UI.EditorToolbarMode;
var _340=this.get_editor();
switch(_340.get_toolbarMode()){
case _33f.Default:
_340.add_firstShow(Function.createDelegate(this,function(){
this._hookToolbarJson2Html();
var _341=this.get_editor();
var _342=_341.get_element().style.height;
_341._updateEditorSize(_342);
}));
break;
case _33f.Floating:
this._createFloatingButton();
break;
case _33f.PageTop:
case _33f.ShowOnFocus:
this._hookToolbarModeEventHandlers();
break;
}
},_hookToolbarJson2Html:function(){
if(this._initializedToolbars){
return;
}
this._initializedToolbars=true;
var _343=this.get_toolJSON();
var _344=this._getToolBarElements();
var _345=[];
for(var i=0;i<_343.length;i++){
var json=_343[i];
var _348=_344[i];
this._initializeToolbar(json,_348);
var _349=json["attributes"];
var zone=_349?_349["dockingzone"]:null;
if(zone){
_345[_345.length]=[zone,_348];
}
}
if($telerik.isIE){
var elem=this.get_element();
elem.style.height="";
}
var _34c=this.get_editor();
var _34d=_34c.get_id();
for(var i=0;i<_345.length;i++){
var _34e=_345[i][0];
var zone=_34e.charAt(0).toUpperCase()+_34e.substring(1);
var _34f=$get(_34d+zone);
if(!_34f){
_34f=$get(_34e);
}
if(_34f){
if(_34f.innerHTML=="&nbsp;"){
_34f.innerHTML="";
}
_34f.appendChild(_345[i][1]);
}
}
},_initNonDefaultToolbarMode:function(){
var _350=this.get_editor();
var _351=Telerik.Web.UI.EditorToolbarMode;
var _352=_350.get_toolbarMode();
if(_352==_351.ShowOnFocus){
var wnd=this._toolbarHolder;
var _354=Telerik.Web.UI.WindowBehaviors;
wnd.set_behaviors(_354.Resize);
wnd.set_visibleTitlebar(false);
}else{
if(_352==_351.PageTop){
var wnd=this._toolbarHolder;
wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
wnd.set_visibleTitlebar(false);
}
}
var _355=this.get_element();
_355.style.visibility="visible";
},_showToolbarHolder:function(_356){
if(!_356){
if(this._toolbarHolder){
this._toolbarHolder.hide();
}
return;
}else{
if($telerik.isIE&&!this._editorIEFirstShow){
if(this.get_editor().get_toolbarMode()!=Telerik.Web.UI.EditorToolbarMode.Floating){
this._editorIEFirstShow=true;
return;
}
}
}
if(this.get_editor().isFullScreen()){
return;
}
var _357=Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper;
if(_357==this&&_357._toolbarHolder&&_357._toolbarHolder.isVisible()){
_357.get_toolbarHolder().setActive(true);
return;
}
if(_357&&_357._showToolbarHolder){
_357._showToolbarHolder(false);
}
Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=this;
this.get_window();
this._initNonDefaultToolbarMode();
this._toolbarHolder.show();
},_positionWindow:function(){
var _358=Telerik.Web.UI.EditorToolbarMode;
var _359=this.get_editor();
var _35a=_359.get_toolbarMode();
if(_35a==_358.ShowOnFocus){
this._positionToolbarAboveEditor();
}else{
if(_35a==_358.PageTop){
this._positionOnPageTop();
}else{
if(_35a==_358.Floating){
if(!this._wasShown){
this._positionToolbarAboveEditor();
this._wasShown=true;
}
}
}
}
},get_window:function(){
if(!this._toolbarHolder){
var _35b=this.get_editor();
var _35c=_35b.get_dialogOpener();
if(!_35c){
return;
}
var wnd=_35c.get_container().clone(_35b.get_id()+"_toolbarMode");
wnd.set_visibleStatusbar(false);
var _35e=this.get_element();
var _35f=_35e.offsetWidth;
wnd.setSize(_35f+10,"");
wnd.add_show(Function.createDelegate(this,function(_360,args){
var _362=_360.get_contentElement();
if(!_362){
return;
}
var _363=_360.get_popupElement();
_363.style.zIndex="10000";
this._hookToolbarJson2Html();
_362.style.overflow="";
_362.style.height="";
var _364=_362.offsetWidth;
_362.style.width=_364+"px";
var _365=_35b.get_toolsWidth();
if(!_365){
var _366=_360.getWindowBounds();
_365=_366.width;
}
_360.setSize(_365,null);
_362.style.width="100%";
this._positionWindow();
}));
this._toolbarHolder=wnd;
this._moveToolbarsToEditor(false);
}
return this._toolbarHolder;
},_moveToolbarsToEditor:function(_367){
var _368=this.get_element();
if(!_367){
if(!this._fakeToolbarParentCreated){
var div=_368.ownerDocument.createElement("DIV");
div.control=_368.control;
_368.parentNode.appendChild(div);
this._fakeToolbarParentCreated=true;
_368.control=null;
var _36a=div.style;
_36a.height=_36a.fontSize=_36a.lineHeight="1px";
_36a.border="1px solid red";
_36a.visibility="hidden";
if(!$telerik.isIE){
_36a.display="none";
}
}
var wnd=this.get_toolbarHolder();
wnd.set_contentElement(_368);
_368.style.width="100%";
}else{
_368.style.width="";
var _36c=this.get_editor().get_TopZone();
_36c.appendChild(_368);
}
},_positionToolbarAboveEditor:function(){
var wnd=this._toolbarHolder;
var _36e=this.get_editor();
var _36f=$telerik.getBounds(_36e.get_element());
var x=_36f.x;
var _371=$telerik.getBounds(wnd.get_popupElement()).height;
var y=_36f.y-_371;
wnd.moveTo(x,y);
},_positionOnPageTop:function(){
var wnd=this._toolbarHolder;
var _374=wnd._getViewportBounds();
var x=_374.scrollLeft;
var y=_374.scrollTop;
wnd.moveTo(x,y);
wnd.set_width("");
if(!wnd.isPinned()){
wnd.togglePin();
}
},_createFloatingButton:function(){
this._onToggleFloatingToolbarDelegate=Function.createDelegate(this,this._onToggleFloatingToolbar);
var _377=this.get_editor();
var skin=_377.get_skin();
var _379={name:"ToggleFloatingToolbar",addClickHandler:true,skin:skin};
var _37a={"valueSelected":this._onToggleFloatingToolbarDelegate};
var _37b=Telerik.Web.UI.EditorButton.createTool(_379,_37a);
var _37c=Telerik.Web.UI.EditorButton.createToolWrapper(_37b,skin);
var _37d=$get(_377.get_id()+"Top");
if(_37d){
_37d.appendChild(_37c);
}
},_onToggleFloatingToolbar:function(){
var _37e=!this._toolbarHolder||!this._toolbarHolder.isVisible();
this._showToolbarHolder(_37e);
},_hookToolbarModeEventHandlers:function(){
var _37f=this;
var _380=function(){
_37f._showToolbarHolder(true);
};
var _381=this.get_editor();
if(_381.isIE){
this.get_editor().add_editReady(function(){
_381.attachEventHandler("beforeeditfocus",_380);
});
}else{
_381.add_selectionChange(_380);
}
_381.add_modeChange(function(){
_37f._showToolbarHolder(_37f.get_editor().get_mode()==Telerik.Web.UI.EditModes.Design);
});
_381.add_submit(function(){
_37f._showToolbarHolder(false);
});
_381.add_toggleScreenMode(function(){
var _382=_37f.get_editor().isFullScreen();
_37f._moveToolbarsToEditor(_382);
var wnd=_37f.get_toolbarHolder();
if(_382){
wnd.hide();
}else{
wnd.show();
}
});
this._bodyClickDelegate=Function.createDelegate(this,this._onBodyClick);
$addHandler(document.body,"click",this._bodyClickDelegate);
},_disposeToolbarModeHandlers:function(){
if(this._bodyClickDelegate){
$removeHandler(document.body,"click",this._bodyClickDelegate);
this._bodyClickDelegate=null;
}
},onContextMenu:function(e){
if(!this._contextMenusEnabled){
return;
}
var _385=this.get_editor();
if(_385.get_mode()!=Telerik.Web.UI.EditModes.Design){
return;
}
this.createContextMenus();
var _386=e.srcElement?e.srcElement:e.target;
var _387=_386.tagName;
var _388=this._contextMenus[_387];
if("TH"==_387&&!_388){
_388=this._contextMenus["TD"];
}
var _389="";
if(!_388){
var _38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"A");
if(!_38a){
_38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"TD");
}
if(!_38a){
_38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"TABLE");
}
if(_38a){
_389=_38a.tagName;
_386=_38a;
}else{
_389="*";
}
_388=this._contextMenus[_389];
}
if(_388&&_387=="IMG"&&_386&&"true"==_386.getAttribute("isflash")){
_388=null;
}
if(!this.isIE&&_389=="*"){
return;
}
if(_388){
_388.set_eventObject(e);
_388.show();
}
return $telerik.cancelRawEvent(e);
},enableContextMenus:function(_38b){
this._contextMenusEnabled=_38b;
},_initContextMenus:function(){
var _38c=Function.createDelegate(this,this.onContextMenu);
var _38d=this.get_editor();
_38d.add_editReady(function(){
_38d.attachEventHandler("contextmenu",_38c);
});
},createContextMenus:function(){
if(this._contextMenus){
return;
}
this._contextMenus={};
var _38e=this.get_editor();
var skin=_38e.get_skin();
var _390=_38e.get_contextMenusJSON();
var _391={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
for(var i=0;i<_390.length;i++){
var args=_390[i];
args["sizetofit"]=true;
args["parentElement"]=_38e.get_contentAreaElement();
args["skin"]=skin;
var tool=$create(Telerik.Web.UI.EditorContextMenu,args,_391,null,document.createElement("SPAN"));
this._contextMenus[args.tagName]=tool;
}
},dispose:function(){
var _395=this._getToolBarElements();
for(var i=0;i<_395.length;i++){
$clearHandlers(_395[i]);
}
this._tools=[];
this._disposeToolbarModeHandlers();
var wnd=this._toolbarHolder;
if(wnd&&wnd.dispose){
wnd.dispose();
}
Telerik.Web.UI.Editor.DefaultToolAdapter.callBaseMethod(this,"dispose");
},setFocus:function(){
var tool=this._tools[0];
window.setTimeout(function(){
if(tool){
tool.setFocus();
}
},100);
return false;
},getContextMenuByTagName:function(_399){
this.createContextMenus();
return this._contextMenus[_399];
},getToolByName:function(name){
for(var i=0;i<this._tools.length;i++){
var tool=this._tools[i];
if(tool&&tool.get_name()==name){
return tool;
}
}
return null;
},setToolState:function(_39d,_39e){
if(!_39d){
_39d=this._tools;
}
var _39f=this.get_editor();
for(var i=0;i<_39d.length;i++){
var _3a1=_39d[i];
var _3a2=_3a1.get_name();
if(_3a1.setState){
var _3a3=_39e;
if(null==_3a3){
_3a3=_39f.getToolState(_3a2);
}
if(null!=_3a3){
_3a1.setState(_3a3);
}
}
if(_3a1.updateValue){
_3a1.updateValue(_39f.getToolValue(_3a2));
}
}
},_convertCommandsArray:function(_3a4){
var _3a5=[];
for(var i=0;i<_3a4.length;i++){
var _3a7=_3a4[i];
var _3a8=(i+1)+". "+_3a7.get_title();
if(_3a7.get_argument){
var arg=_3a7.get_argument();
if(arg){
_3a8+=" [\""+arg+"\"]";
}
}
_3a5[i]=[i+1,_3a8];
}
return _3a5;
},_onDropDownHide:function(_3aa,args){
var _3ac=this.get_editor();
_3ac.enableContentArea(true);
},_onDropDownBeforeShow:function(_3ad,args){
var _3af=this.get_editor();
if(Telerik.Web.UI.EditorToolStrip.isInstanceOfType(_3ad)){
this.setToolState(_3ad.get_items());
}
if(!_3af.getSelection().isControl()&&!Telerik.Web.UI.EditorContextMenu.isInstanceOfType(_3ad)){
_3af.enableContentArea(false);
}
var _3b0=_3ad.get_name();
if(_3b0=="Undo"){
var _3b1=_3af.get_commandsManager().getCommandsToUndo();
_3b1=this._convertCommandsArray(_3b1);
_3ad.set_items(_3b1);
}else{
if(_3b0=="Redo"){
var _3b2=_3af.get_commandsManager().getCommandsToRedo();
_3b2=this._convertCommandsArray(_3b2);
_3ad.set_items(_3b2);
}else{
if(_3b0=="ModuleManager"){
var _3b3=_3af.get_modulesManager();
if(!_3b3){
return;
}
var _3b4=_3b3.get_modules();
var _3b5=[];
for(var i=0;i<_3b4.length;i++){
var _3b7=_3b4[i];
var name=_3b7.get_name();
var _3b9=_3b7.get_title();
if(!_3b9){
_3b9=name;
}
cssClass=_3b7.get_visible()?"rade_module_visible_icon":"rade_module_hidden_icon";
_3b5[i]=[name,_3b9,cssClass];
}
_3ad.set_updateHeader(false);
_3ad.set_items(_3b5);
}
}
}
var _3ba=_3ad.get_items();
if(_3ba&&_3ba.length>0){
return;
}
var _3bb=null;
switch(_3b0){
case "ApplyClass":
_3bb=_3af.getCssArray();
break;
case "FontName":
_3bb=_3af.get_fontNames();
break;
case "FontSize":
_3bb=_3af.get_fontSizes();
break;
case "InsertSymbol":
_3bb=_3af.get_symbols();
break;
case "BackColor":
case "ForeColor":
_3bb=_3af.get_colors();
break;
case "RealFontSize":
_3bb=_3af.get_realFontSizes();
break;
case "InsertSnippet":
_3bb=_3af.get_snippets();
break;
case "Zoom":
_3bb=["10%","20%","50%","100%","150%","200%","300%","500%"];
break;
case "FormatBlock":
_3bb=_3af.get_paragraphs();
break;
case "InsertCustomLink":
_3bb=_3af.get_links();
break;
case "AjaxSpellCheck":
case "SpellCheck":
_3bb=_3af.get_languages();
break;
}
if(_3bb){
_3ad.set_items(_3bb);
}
},_initializeToolbar:function(_3bc,_3bd){
var _3be=_3bd.getElementsByTagName("li");
var _3bf=_3bc.tools;
var _3c0=this.get_editor();
var skin=_3c0.get_skin();
var _3c2=0;
if(_3bf){
var _3c3=0;
for(var i=0;i<_3bf.length;i++){
var _3c5=_3be[i+1];
_3c3+=_3c5.offsetWidth;
var _3c6=Telerik.Web.UI.EditorButton;
var _3c7=_3bf[i].type;
var _3c8=_3bf[i].name;
var _3c9=Telerik.Web.UI.EditorToolType;
var args=_3bf[i];
var tool=null;
var _3cc=false;
if(_3c7){
switch(_3c7){
case _3c9.Button:
break;
case _3c9.Separator:
if(!_3c2){
_3c2+=parseInt($telerik.getCurrentStyle(_3c5,"marginLeft"));
_3c2+=parseInt($telerik.getCurrentStyle(_3c5,"marginRight"));
}
_3c3+=_3c2;
_3c6=null;
break;
case _3c9.DropDown:
_3c6=Telerik.Web.UI.EditorDropDown;
_3cc=true;
if(_3c8=="FontName"){
_3c6=Telerik.Web.UI.Editor.FontNameDropDown;
}else{
if(_3c8=="FontSize"){
_3c6=Telerik.Web.UI.Editor.FontSizeDropDown;
}else{
if(_3c8=="FormatBlock"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="RealFontSize"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="Zoom"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="InsertCustomLink"){
_3c6=Telerik.Web.UI.Editor.InsertCustomLinkDropDown;
}else{
if(_3c8=="ApplyClass"){
_3c6=Telerik.Web.UI.Editor.ApplyClassDropDown;
}
}
}
}
}
}
}
break;
case _3c9.SplitButton:
_3c6=Telerik.Web.UI.EditorSplitButton;
if(_3c8=="ForeColor"||_3c8=="BackColor"){
_3c6=Telerik.Web.UI.Editor.ColorPicker;
}else{
if(_3c8=="Undo"||_3c8=="Redo"){
_3c6=Telerik.Web.UI.Editor.UndoRedoDropDown;
}
}
_3cc=true;
break;
case _3c9.ToolStrip:
if(_3c8=="InsertTable"){
_3c6=Telerik.Web.UI.Editor.InsertTable;
}else{
_3c6=Telerik.Web.UI.EditorToolStrip;
}
_3cc=true;
break;
case _3c9.Custom:
break;
}
}
if(args.attributes){
for(var item in args.attributes){
args[item.toLowerCase()]=args.attributes[item];
}
}
if(_3c6){
var _3ce=null;
if(_3cc){
_3ce={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
args["skin"]=skin;
}
tool=$create(_3c6,args,_3ce,null,_3c5);
}
if(tool){
Array.add(this._tools,tool);
var _3cf=tool.get_shortCut();
if(_3cf){
var _3d0=tool.get_name();
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(tool)&&!(Telerik.Web.UI.EditorSplitButton.isInstanceOfType(tool))){
_3d0="RadE_ToolAdapter_"+_3d0;
Telerik.Web.UI.Editor.CommandList[_3d0]=this._toolAdapterDropDownExpander;
}
_3c0.setShortCut(_3d0,_3cf);
}
}
}
var ul=_3bd;
if(this.isIE&&ul&&_3c3){
ul.style.width=(_3c3+(_3be[0].offsetWidth)*2)+"px";
}
if($telerik.isSafari){
ul.setAttribute("onmousedown","return false;");
}
$addHandlers(_3bd,{"click":this._onToolAdapterClickDelegate,"keydown":this._onToolAdapterKeyDownDelegate},this);
}
},_toolAdapterDropDownExpander:function(_3d2,_3d3){
var tool=_3d3.getToolByName(_3d2.replace("RadE_ToolAdapter_",""));
tool.setFocus();
tool.show();
tool.selectNextItem();
return false;
},_onEditorModeChange:function(_3d5,args){
var _3d7=Telerik.Web.UI.EditModes;
var mode=_3d5.get_mode();
this._setEnabled((mode==_3d7.Design));
},_onEditorSelectionChange:function(_3d9,args){
this.setToolState();
},_setEnabled:function(_3db){
var _3dc=this._tools;
for(var i=0;i<_3dc.length;i++){
var tool=_3dc[i];
tool.set_enabled(_3db);
}
},_registerEditorHandlers:function(){
var _3df=this.get_editor();
_3df.add_selectionChange(this._onEditorSelectionChangeDelegate);
_3df.add_modeChange(this._onEditorModeChangeDelegate);
},_onBodyClick:function(){
if(this._preventToolbarFromHiding){
this._preventToolbarFromHiding=false;
return;
}
this._showToolbarHolder(false);
},_onDropDownValueSelected:function(_3e0,args){
this._preventToolbarFromHiding=true;
var _3e2=_3e0.get_selectedItem();
if(Telerik.Web.UI.EditorButton.isInstanceOfType(_3e2)){
this._raiseEditorEvent(_3e2,null);
}else{
this._raiseEditorEvent(_3e0,_3e2);
}
},_onKeyDownHandler:function(e){
var _3e4=e.keyCode;
if(9==_3e4||37==_3e4||39==_3e4||121==_3e4){
if(Telerik.Web.UI.Editor.PopupController){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
}
if(121==_3e4){
var _3e5=this.get_editor();
window.setTimeout(function(){
if(_3e5){
_3e5.setFocus();
}
},100);
if(e.rawEvent){
$telerik.cancelRawEvent(e.rawEvent);
}
return $telerik.cancelRawEvent(e);
}
if(9==_3e4){
return;
}
var _3e6=this._getSelectedTool(e);
if(!Telerik.Web.UI.EditorButton.isInstanceOfType(_3e6)){
return;
}
if(37==_3e4||39==_3e4){
var tool=_3e6;
while(true){
tool=(37==_3e4)?this._getPreviousTool(tool):this._getNextTool(tool);
if(null==tool){
break;
}
if(tool.get_enabled()){
break;
}
}
if(tool&&tool.get_enabled()){
tool.setFocus();
}
}
if(13==_3e4&&_3e6&&!_3e6.get_selectedItem){
this._raiseEditorEvent(_3e6,null);
return;
}
if(!Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3e6)){
return;
}
if(38==_3e4||40==_3e4){
var _3e8=false;
if(!_3e6.isExpanded()){
_3e6.show();
_3e8=true;
}
if(_3e8||40==_3e4){
_3e6.selectNextItem();
}else{
_3e6.selectPreviousItem();
}
}else{
if(13==_3e4){
_3e6.hide();
if(_3e6.get_activeIndex){
_3e6.set_selectedIndex(_3e6.get_activeIndex());
}
this._onDropDownValueSelected(_3e6);
}else{
if(27==_3e4){
_3e6.hide();
}
}
}
},_onToolBarClick:function(e){
var _3ea=this._getSelectedTool(e);
if(_3ea){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3ea)){
_3ea.click(e);
}else{
if(false){
}else{
this._raiseEditorEvent(_3ea);
}
}
}
$telerik.cancelRawEvent(e);
},_raiseEditorEvent:function(tool,_3ec){
var _3ed=this.get_events().getHandler("ToolClick");
if(_3ed){
var _3ee=tool.get_name?tool.get_name():"";
var _3ef=new Telerik.Web.UI.EditorCommandEventArgs(_3ee,tool,_3ec);
_3ed(tool,_3ef);
}
},_getPreviousTool:function(tool){
var _3f1=Array.indexOf(this._tools,tool);
return this._tools[_3f1-1];
},_getNextTool:function(tool){
var _3f3=Array.indexOf(this._tools,tool);
return this._tools[_3f3+1];
},_getSelectedTool:function(e){
var _3f5=Telerik.Web.UI.EditorButton.getToolRootNode(e.target);
if(null==_3f5){
return;
}
var _3f6=_3f5.control;
if(null==_3f6){
return;
}
if(_3f6.get_enabled&&_3f6.get_enabled()==false){
return;
}
if(e&&_3f6){
e.preventDefault();
e.stopPropagation();
}
return _3f6;
},_getToolBarElements:function(){
var _3f7=this.get_element();
var _3f8=_3f7.getElementsByTagName("ul");
return _3f8;
},get_tools:function(){
return this._tools;
},get_toolbarHolder:function(){
return this.get_window();
},get_editor:function(){
return this._editor;
},set_editor:function(_3f9){
if(this._editor!=_3f9){
this._editor=_3f9;
}
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_3fa){
this._toolJSON=_3fa;
},add_toolClick:function(_3fb){
this.get_events().addHandler("ToolClick",_3fb);
},remove_toolClick:function(_3fc){
this.get_events().removeHandler("ToolClick",_3fc);
}};
Telerik.Web.UI.Editor.DefaultToolAdapter.registerClass("Telerik.Web.UI.Editor.DefaultToolAdapter",Sys.UI.Control);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
with(Telerik.Web.UI.Editor){
Telerik.Web.UI.Editor.UpdateCommandsArray={InsertOrderedList:new BrowserCommand(null,null,"InsertOrderedList"),InsertUnorderedList:new BrowserCommand(null,null,"InsertUnorderedList"),Unlink:new BrowserCommand(null,null,"Unlink"),Bold:new BrowserCommand(null,null,"Bold"),Italic:new BrowserCommand(null,null,"Italic"),Underline:new BrowserCommand(null,null,"Underline"),FontName:new BrowserCommand(null,null,"FontName"),FontSize:new BrowserCommand(null,null,"FontSize"),Paste:new BrowserCommand(null,null,"Paste"),Cut:new BrowserCommand(null,null,"Cut"),Copy:new BrowserCommand(null,null,"Copy"),JustifyLeft:new BrowserCommand(null,null,"JustifyLeft"),JustifyRight:new BrowserCommand(null,null,"JustifyRight"),JustifyCenter:new BrowserCommand(null,null,"JustifyCenter"),JustifyNone:new BrowserCommand(null,null,"JustifyNone"),JustifyFull:new BrowserCommand(null,null,"JustifyFull"),Indent:new BrowserCommand(null,null,"Indent"),Outdent:new BrowserCommand(null,null,"Outdent"),Unlink:new BrowserCommand(null,null,"Unlink"),Subscript:new BrowserCommand(null,null,"Subscript"),Superscript:new BrowserCommand(null,null,"Superscript"),StrikeThrough:new BrowserCommand(null,null,"StrikeThrough"),AbsolutePosition:new BrowserCommand(null,null,"AbsolutePosition"),FormatBlock:new FormatBlockCommand(null,null,null),InsertRowAbove:new TableInsertRow(null,null,"above"),InsertRowBelow:new TableInsertRow(null,null,"below"),InsertColumnLeft:new TableInsertColumn(null,null,"left"),InsertColumnRight:new TableInsertColumn(null,null,"right"),DeleteRow:new TableDeleteRow(null,null),DeleteColumn:new TableDeleteColumn(null,null),DeleteCell:new TableDeleteCell(null,null),MergeColumns:new TableMergeColumns(null,null),MergeRows:new TableMergeRows(null,null),SplitCell:new TableSplitCell(null,null),ApplyClass:new ClassNameCommand(null,null)};
}
Telerik.Web.UI.Editor.CommandList=new (function(){
this.AjaxSpellCheck=function(_3fd,_3fe,args){
function createSpellCheckEngine(){
if(!_3fe.get_ajaxSpellCheck()){
var _400={"editor":_3fe};
var _401=document.createElement("DIV");
var _402=$create(Telerik.Web.UI.Editor.AjaxSpellCheck,_400,null,null,_401);
var _403=_402.get_element();
var _404=$get(_3fe.get_id()+"Top");
if(_404){
_404.appendChild(_403);
}
_3fe.set_ajaxSpellCheck(_402);
}
var _405=_3fe.get_ajaxSpellCheck();
if(args&&args.value){
_405.set_language(args.value);
}
_405.spellCheck();
}
if(typeof (Telerik.Web.UI.Editor.AjaxSpellCheck)=="undefined"){
function OnWebRequestCompleted(_406,_407){
var _408=_406.get_responseData();
Telerik.Web.UI.Editor.Utils.evalScriptCode(_408);
createSpellCheckEngine();
}
var _409=_3fe.get_ajaxSpellCheckScriptReference();
var _40a=new Sys.Net.WebRequest();
_40a.set_url(_409);
_40a.set_httpVerb("GET");
_40a.add_completed(OnWebRequestCompleted);
_40a.invoke();
}else{
createSpellCheckEngine();
}
return false;
};
this.ModuleManager=function(_40b,_40c,args){
var _40e=args.value;
var _40f=_40c.get_modulesManager();
if(!_40f){
return false;
}
var _410=_40f.getModuleByName(_40e);
if(_410){
_410.toggleVisibility();
_40c._updateEditorSize(null,true);
}
return false;
};
this.ToggleScreenMode=function(_411,_412,args){
_412.toggleScreenMode();
return false;
};
this.InsertRowAbove=this.InsertRowBelow=function(_414,_415,args){
_415.executeCommand(new Telerik.Web.UI.Editor.TableInsertRow(_415.getLocalizedString(_414),null,_414=="InsertRowAbove"?"above":"below"));
};
this.InsertColumnLeft=this.InsertColumnRight=function(_417,_418,args){
_418.executeCommand(new Telerik.Web.UI.Editor.TableInsertColumn(_418.getLocalizedString(_417),null,_417=="InsertColumnLeft"?"left":"right"));
};
this.DeleteRow=function(_41a,_41b,args){
_41b.executeCommand(new Telerik.Web.UI.Editor.TableDeleteRow(_41b.getLocalizedString(_41a)));
};
this.DeleteColumn=function(_41d,_41e,args){
_41e.executeCommand(new Telerik.Web.UI.Editor.TableDeleteColumn(_41e.getLocalizedString(_41d)));
};
this.DeleteCell=function(_420,_421,args){
_421.executeCommand(new Telerik.Web.UI.Editor.TableDeleteCell(_421.getLocalizedString(_420)));
};
this.MergeColumns=function(_423,_424,args){
_424.executeCommand(new Telerik.Web.UI.Editor.TableMergeColumns(_424.getLocalizedString(_423)));
};
this.MergeRows=function(_426,_427,args){
_427.executeCommand(new Telerik.Web.UI.Editor.TableMergeRows(_427.getLocalizedString(_426)));
};
this.SplitCell=function(_429,_42a,args){
_42a.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(_42a.getLocalizedString(_429)));
};
this.DeleteTable=function(_42c,_42d,args){
var _42f=args.value;
if(!_42f){
_42f=_42d.getSelectedElement();
}
if(_42f&&"TABLE"!=_42f.tagName){
_42f=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_42f,"TABLE");
}
if(_42f){
_42d.selectElement(_42f);
_42d.executeBrowserCommand("Delete");
}
};
this.InsertFormForm=this.InsertFormButton=this.InsertFormCheckbox=this.InsertFormHidden=this.InsertFormImageButton=this.InsertFormPassword=this.InsertFormRadio=this.InsertFormReset=this.InsertFormSelect=this.InsertFormSubmit=this.InsertFormTextarea=this.InsertFormText=function(_430,_431,args){
var _433=_430.substring(10);
var _434=new Telerik.Web.UI.EditorCommandEventArgs(_430,args.get_tool(),_433);
_431.fire("InsertFormElement",_434);
};
this.StripAll=this.StripCss=this.StripFont=this.StripSpan=this.StripWord=function(_435,_436,args){
var _438=_435.substring(5);
var _439=new Telerik.Web.UI.EditorCommandEventArgs(_435,args.get_tool(),_438.toUpperCase());
_436.fire("FormatStripper",_439);
};
this.FormatStripper=function(_43a,_43b,args){
var _43d=args.value;
var _43e="";
try{
_43e=_43b.getSelectionHtml();
}
catch(e){
}
var oSel=_43b.get_document().selection?_43b.get_document().selection:_43b.get_contentWindow().getSelection();
var _440=oSel.type?oSel.type.toLowerCase()=="none":oSel.isCollapsed;
if(_440||_43e==""||_43b.get_html()==_43e){
var _441=Telerik.Web.UI.Editor.Utils.stripFormatting(_43b.get_html(),_43d);
_43b.set_html(_441,_43b.getLocalizedString(_43a)+" "+_43d);
}else{
if(_43e!=null){
var _441=Telerik.Web.UI.Editor.Utils.stripFormatting(_43e,_43d);
_43b.pasteHtml(_441,_43a);
}
}
};
this.InsertTable=function(_442,_443,args){
var _445=args.value;
if(_445){
var _446=Telerik.Web.UI.Editor.Utils.createTable(_445.rows,_445.cols);
var _447=Telerik.Web.UI.Editor.Utils.getOuterHtml(_446);
_443.pasteHtml(_447,_442);
}
};
this.InsertTab=function(_448,_449,_44a){
var _44b=_449.getSelectedElement();
if(_44b.tagName=="LI"){
_449.fire("Indent");
}else{
_449.pasteHtml(" &nbsp;&nbsp;&nbsp;&nbsp;",_448);
}
return false;
};
this.SetToolFocus=function(_44c,_44d,_44e){
var _44f=_44d.get_toolAdapter();
if(_44f){
_44f.setFocus();
}
return false;
};
this.ViewHtml=function(_450,_451,_452){
alert(_451.get_html(true));
return false;
};
this.Undo=this.Redo=function(_453,_454,args){
var _456=args?args.value:1;
if(!_456){
_456=1;
}
if(_453=="Redo"){
_454.redo(_456);
}else{
_454.undo(_456);
}
};
this.PastePlainText=function(_457,_458,_459){
var _45a=function(_45b){
if(_45b){
var _45c=_45b.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
_45c=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(_45c);
if(_45c){
_458.pasteHtml(_45c,_457);
}
}
};
if(_458.isIE){
_45a(window.clipboardData.getData("Text"));
}else{
var _45d=function(_45e,args){
_45a(args.get_content());
};
_458.showDialog("CleanPasteTextContent",{},_45d);
return false;
}
};
this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(_460,_461,_462){
var _463=function(_464,_465){
var _466="";
if(_460=="PasteFromWord"){
_466=Telerik.Web.UI.Editor.Utils.stripFormatting(_464,"WORD");
}else{
if(_460=="PasteFromWordNoFontsNoSizes"){
_466=Telerik.Web.UI.Editor.Utils.stripFormatting(_464,"WORD_ALL");
}else{
_466=Telerik.Web.UI.Editor.Utils.convertText2Html(_464);
}
}
if(_465){
_465.select();
}
if(_466){
_461.pasteHtml(_466,_460);
}
};
if(_461.isIE){
var _467=_461.createRestorePoint();
var _468=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
_463(_468,_467);
}else{
var _469=function(_46a,args){
_463(args.get_content());
};
_461.showDialog("CleanPasteHtmlContent",{},_469);
}
};
this.Copy=function(_46c,_46d,args){
if(null!=args){
var _46f=window.opera?false:true;
if(_46f){
try{
document.queryCommandEnabled(_46c);
}
catch(e){
_46f=false;
}
}
if(_46f){
_46d.get_document().execCommand(_46c,false,null);
}else{
alert(_46d.getLocalizedString("UseCtrlC"));
}
}
};
this.Cut=this.Paste=function(_470,_471,args){
if(null!=args){
var _473=window.opera?false:true;
if(_473){
try{
if(!_471.isIE7){
document.queryCommandEnabled(_470);
}
}
catch(e){
_473=false;
}
}
if(_470=="Paste"&&_473&&_471.isIE7){
_471.get_document().body.fireEvent("onbeforepaste");
}
if(_473){
var oCmd=new Telerik.Web.UI.Editor.GenericCommand(_471.getLocalizedString(_470),_471.get_contentWindow());
_471.get_document().execCommand(_470,false,null);
_471.executeCommand(oCmd);
}else{
var id=(_470=="Cut"?"UseCtrlX":"UseCtrlV");
alert(_471.getLocalizedString(id));
}
}else{
_471._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(_471.getLocalizedString(_470),_471.get_contentWindow());
}
};
this.InsertParagraph=function(_476,_477,_478){
_477.executeBrowserCommand(_476,true,"");
return true;
};
this.FormatBlock=function(_479,_47a,args){
_47a.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(_47a.getLocalizedString(_479),_47a.get_contentWindow(),args.value));
};
this.InsertOrderedList=this.InsertUnorderedList=function(_47c,_47d,args){
_47d.setFocus();
_47d.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(_47d.getLocalizedString(_47c),_47d.get_contentWindow(),_47d.get_newLineBr(),_47c,null));
};
this.Bold=this.Italic=this.Underline=this.JustifyLeft=this.JustifyRight=this.JustifyCenter=this.JustifyNone=this.Indent=this.Outdent=this.SelectAll=this.Unlink=this.JustifyFull=this.StrikeThrough=this.Subscript=this.Superscript=this.AbsolutePosition=function(_47f,_480,_481){
_480.setActive();
var _482="SelectAll"!=_47f;
if(_47f=="Unlink"&&!_480.isIE){
var elem=_480.getSelectedElement();
if(elem&&elem.tagName=="A"){
_480.selectElement(elem,false);
}
}
_480.executeBrowserCommand(_47f,_482,null,null);
return true;
};
this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(_484,_485,args){
var _487=args.value;
_485.executeBrowserCommand(_484,true,_487);
};
this.Zoom=function(_488,_489,args){
var _48b=args.value;
var tool=args.get_tool?args.get_tool():null;
if(_48b&&tool&&tool.updateValue){
tool.updateValue(_48b);
}
_489._contentArea.style.zoom=_48b;
return false;
};
this.Print=function(_48d,_48e,args){
if(_48e.isIE){
_48e.get_document().execCommand(_48d,false,null);
}else{
if(_48e.get_contentWindow().print){
_48e.get_contentWindow().print();
}
}
return false;
};
this.InsertSnippet=function(_490,_491,args){
_491.pasteHtml(args.value,_490);
};
this.InsertFormElement=function(_493,_494,args){
var _496=args.value;
_496=_496.toLowerCase();
var _497=null;
switch(_496){
case "form":
_497=_494.createElement("form","150px","150px");
_497.innerHTML="&nbsp;";
break;
case "textarea":
_497=_494.createElement("textarea");
break;
case "select":
_497=_494.createElement("select","100px","22px");
break;
case "checkbox":
case "radio":
_497=_494.createElement("input");
_497.setAttribute("type",_496);
break;
case "button":
case "reset":
case "submit":
_497=_494.createElement("input","50px","22px");
_497.setAttribute("type",_496);
break;
case "hidden":
case "password":
case "text":
_497=_494.createElement("input","100px","22px");
_497.setAttribute("type",_496);
break;
}
if(_497){
var id=Telerik.Web.UI.Editor.Utils.getUniqueID();
_497.setAttribute("id",id);
var html=Telerik.Web.UI.Editor.Utils.getOuterHtml(_497);
_494.pasteHtml(html,_493);
var _49a=_494.get_document().getElementById(id);
if(_49a){
_49a.removeAttribute("id");
if(_49a.setActive){
_49a.setActive();
}
return false;
}
}
};
this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(_49b,_49c,args){
var _49e="";
switch(_49b){
case "InsertSymbol":
_49e=args.value;
break;
case "InsertHorizontalRule":
_49e="<hr>";
break;
case "InsertDate":
var now=new Date();
_49e="&nbsp;"+now.toLocaleDateString();
break;
case "InsertTime":
var now=new Date();
_49e="&nbsp;"+now.toLocaleTimeString();
break;
default:
_49e="<fieldset style='WIDTH: 200px; HEIGHT: 76px'> <legend>Title</legend>Content... </fieldset> ";
}
_49c.pasteHtml(_49e,_49b);
};
this.ImageManager=function(_4a0,_4a1,_4a2){
var _4a3=function(_4a4,args){
_4a1.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_4a0);
};
var _4a6=_4a1.get_dialogOpener().get_additionalQueryString();
var _4a7=_4a1.getSelectedElement();
if(_4a7&&_4a7.tagName.toLowerCase()=="img"){
_4a1.get_dialogOpener().set_additionalQueryString(_4a6+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4a7.src));
}
var args={editor:_4a1};
_4a1.showDialog("ImageManager",args,_4a3);
_4a1.get_dialogOpener().set_additionalQueryString(_4a6);
return false;
};
this.SilverlightManager=function(_4a9,_4aa,_4ab){
var _4ac=function(_4ad,args){
var html=args.Result;
var _4b0=_4aa._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4b1=_4aa._filtersManager.getFilterByName("MozillaKeepFlashString");
html=(_4b0)?_4b0.getDesignContent(html):html;
html=(_4b1)?_4b1.getDesignContent(html):html;
_4aa.pasteHtml(html,_4a9);
};
var _4b2={};
var _4b3=_4aa.get_dialogOpener().get_additionalQueryString();
var _4b4=_4aa.getSelectedElement();
if(_4b4){
if($telerik.isIE&&_4b4.object&&_4b4.object.Movie){
var _4b5=_4b4.object.Movie;
_4aa.get_dialogOpener().set_additionalQueryString(_4b3+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4b5));
_4b2.selectedItemUrl=_4b5;
_4b2.selectedObject=_4b4;
}
}
_4aa.showDialog("SilverlightManager",_4b2,_4ac);
_4aa.get_dialogOpener().set_additionalQueryString(_4b3);
return false;
};
this.FlashManager=function(_4b6,_4b7,_4b8){
var _4b9=function(_4ba,args){
var _4bc=_4b7._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4bd=_4b7._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4bc)?_4bc.getDesignContent(html):html;
html=(_4bd)?_4bd.getDesignContent(html):html;
_4b7.pasteHtml(html,_4b6);
};
var _4bf={};
var _4c0=_4b7.get_dialogOpener().get_additionalQueryString();
var _4c1=_4b7.getSelectedElement();
if(_4c1){
if($telerik.isIE&&_4c1.object&&_4c1.object.Movie){
var _4c2=_4c1.object.Movie;
_4b7.get_dialogOpener().set_additionalQueryString(_4c0+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4c2));
_4bf.selectedItemUrl=_4c2;
_4bf.selectedObject=_4c1;
}
}
_4b7.showDialog("FlashManager",_4bf,_4b9);
_4b7.get_dialogOpener().set_additionalQueryString(_4c0);
return false;
};
this.MediaManager=function(_4c3,_4c4,_4c5){
var _4c6=function(_4c7,args){
var _4c9=_4c4._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4ca=_4c4._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4c9)?_4c9.getDesignContent(html):html;
html=(_4ca)?_4ca.getDesignContent(html):html;
_4c4.pasteHtml(html,_4c3);
};
var _4cc={};
var _4cd=_4c4.get_dialogOpener().get_additionalQueryString();
var _4ce=_4c4.getSelectedElement();
if(_4ce){
if($telerik.isIE&&_4ce.object&&_4ce.object.FileName){
var _4cf=_4ce.object.FileName;
_4c4.get_dialogOpener().set_additionalQueryString(_4cd+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4cf));
_4cc.selectedItemUrl=_4cf;
_4cc.selectedObject=_4ce;
}
}
_4c4.showDialog("MediaManager",_4cc,_4c6);
_4c4.get_dialogOpener().set_additionalQueryString(_4cd);
return false;
};
this.TemplateManager=function(_4d0,_4d1,_4d2){
var _4d3=function(_4d4,args){
_4d1.pasteHtml(args.Result,_4d0);
};
_4d1.showDialog("TemplateManager",{},_4d3);
return false;
};
this.AboutDialog=function(_4d6,_4d7,_4d8){
_4d7.showDialog("AboutDialog");
return false;
};
this.Help=function(_4d9,_4da,_4db){
_4da.showDialog("Help");
return false;
};
this.PageProperties=function(_4dc,_4dd,_4de){
var _4df=function(_4e0,args){
};
var _4e2={};
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4e2,"BODY",_4dd,_4dc);
_4dd.showDialog("PageProperties",_4e2,_4df);
return false;
};
this.ImageMapDialog=function(_4e3,_4e4,args){
var _4e6=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(_4e4);
var _4e7=function(wnd,_4e9){
Telerik.Web.UI.Editor.CommandList._setImageMapProperties(_4e4,_4e9);
return false;
};
_4e4.showDialog("ImageMapDialog",_4e6,_4e7);
return false;
};
this._setImageMapProperties=function(_4ea,args){
if(!args){
return;
}
var _4ec=_4ea.getSelectedElement();
var _4ed;
if(_4ec&&_4ec.tagName=="IMG"){
_4ed=_4ec;
if(args.ImageSrc!=_4ed.src){
_4ed.src=args.ImageSrc;
}
}else{
if(!args.ImageSrc){
return;
}
_4ea.pasteHtml("<img src=\""+args.ImageSrc+"\" id = \"__tmp__\">");
_4ed=_4ea.get_document().getElementById("__tmp__");
_4ed.removeAttribute("id");
if(document.all){
var oRng=_4ea.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4ed);
oRng.select();
}
}
var _4ef=document.createElement("SPAN");
_4ef.innerHTML=args.MapHtml;
var _4f0=_4ef.getElementsByTagName("map");
if(_4f0.length==0){
return;
}
var _4f1=_4f0[0].innerHTML;
_4ef=null;
if(!_4f1){
_4ed.removeAttribute("useMap");
return;
}
var _4f2="";
var map=null;
var _4f4=_4ed.getAttribute("useMap");
if(_4f4){
_4f2=_4f4.substr(1);
map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4ea,_4f2);
}
if(map==null){
var _4f5=new Date()-100;
var _4f2="rade_img_map_"+_4f5;
map=_4ea.get_document().createElement("map");
map.id=_4f2;
this._setNameAttribute(map,_4f2);
map=_4ea.get_document().body.appendChild(map);
_4ed.setAttribute("useMap","#"+_4f2);
_4ed.setAttribute("border","0");
}
map.innerHTML=_4f1;
};
this._setNameAttribute=function(_4f6,name){
_4f6.removeAttribute("name");
_4f6.removeAttribute("NAME");
_4f6.name=null;
_4f6.name=name;
_4f6["NAME"]=name;
};
this._getImageMapDialogArgument=function(_4f8){
var _4f9={};
_4f9._editor=_4f8;
var _4fa=_4f8.getSelectedElement();
if(_4fa&&_4fa.tagName=="IMG"){
_4f9.ImageSrc=_4fa.getAttribute("src",2);
_4f9.ImageWidth=(_4fa.style.width)?_4fa.style.width:_4fa.width;
_4f9.ImageHeight=(_4fa.style.height)?_4fa.style.height:_4fa.height;
if($telerik.isIE){
var oRng=_4f8.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4fa);
oRng.select();
}
if(_4fa.useMap){
var _4fc=_4fa.getAttribute("useMap").substr(1);
var map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4f8,_4fc);
if(map!=null){
_4f9.ImageMapHTML="<map name = \""+_4fc+"\">"+map.innerHTML+"</map>";
}else{
_4f9.ImageMapHTML="";
}
_4fa.style.width=_4f9.ImageWidth;
_4fa.style.height=_4f9.ImageHeight;
}
}
return _4f9;
};
this._getImageMapByName=function(_4fe,_4ff){
var _500=_4fe.get_document();
var map=_500.getElementById(_4ff);
if(map!=null){
return map;
}
var maps=_500.getElementsByTagName("map");
for(var i=0;i<maps.length;i++){
if(maps[i].getAttribute("name")==_4ff){
return maps[i];
}
}
return null;
};
this.DocumentManager=function(_504,_505,_506){
var _507={};
var _508=function(_509,args){
_505.pasteHyperLink(args.Result,_504);
};
var _50b=_505.get_dialogOpener().get_additionalQueryString();
var _50c=_505.getSelectedElement();
if(_50c&&_50c.tagName.toLowerCase()=="a"){
_505.get_dialogOpener().set_additionalQueryString(_50b+"&PreselectedItemUrl="+encodeURIComponent(_50c.href));
}
_505.showDialog("DocumentManager",_507,_508);
_505.get_dialogOpener().set_additionalQueryString(_50b);
return false;
};
this.TableWizard=function(_50d,_50e,_50f){
var _510=Telerik.Web.UI.Editor.CommandList._getTableArgument(_50e,null,true,false);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_510,"TABLE",_50e,_50d);
var _511=function(_512,args){
_50e.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_50d);
};
_50e.showDialog("TableWizard",_510,_511);
return false;
};
this.SetTableProperties=function(_514,_515,_516){
var _517=Telerik.Web.UI.Editor.CommandList._getTableArgument(_515,1,false,true);
if(!_517){
alert(_515.getLocalizedString("tablewarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_517,"TABLE",_515,_514);
var _518=Telerik.Web.UI.Editor.CommandList._getParentTable(_515);
var _519=function(_51a,args){
_515.selectElement(_518);
_515.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_514);
};
if(_515.get_document().selection&&_515.get_document().selection.empty){
_515.get_document().selection.empty();
}
_515.showDialog("TableWizard",_517,_519);
return false;
};
this.SetCellProperties=function(_51c,_51d,_51e){
var _51f=Telerik.Web.UI.Editor.CommandList._getTableArgument(_51d,2,false,true);
if(!_51f){
alert(_51d.getLocalizedString("cellwarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_51f,"TABLE",_51d,_51c);
var _520=Telerik.Web.UI.Editor.CommandList._getParentTable(_51d);
var _521=function(_522,args){
_51d.selectElement(_520);
_51d.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_51c);
};
_51d.showDialog("TableWizard",_51f,_521);
return false;
};
this.FindAndReplace=function(_524,_525,_526){
var _527={};
_527._editor=_525;
var _528=function(_529,args){
};
_525.showDialog("FindAndReplace",_527,_528);
return false;
};
this.StyleBuilder=function(_52b,_52c,_52d){
var _52e=null;
var _52f=function(_530,args){
var _532=Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result);
if(_52e){
var _533=_532.match(/style=["'](.*)["']/i);
if(_533[1]){
var _534=new Telerik.Web.UI.Editor.AttributeCommand(_52b+"set Style Attribute",_52c.get_contentWindow(),_52e,"style",_533[1]);
_52c.executeCommand(_534);
}
}else{
_52c.pasteHtml(_532,_52b);
}
};
var _535={};
var _536=_52c.getSelection();
var _537=_536.getParentElement();
if(!_536.isControl()){
var _538=_536.getHtml();
if(_538!=""||(_537&&_537.tagName&&_537.tagName.toLowerCase()=="body")){
var _539=_52c.createElement("span");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_539,_538);
_537=_539;
}else{
_52e=_537;
_52c.selectElement(_537,false);
}
}
_535.htmlElement=_537.cloneNode(true);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_535,"*",_52c,_52b);
_535.fontNames=_52c.get_fontNames();
_52c.showDialog("StyleBuilder",_535,_52f);
return false;
};
this.XhtmlValidator=function(_53a,_53b,_53c){
var _53d=_53b;
var _53e=function(_53f,args){
};
_53b.showDialog("XhtmlValidator",_53d,_53e);
return false;
};
this.TrackChangesDialog=function(_541,_542,_543){
var _544=_542;
var _545=function(_546,args){
};
_542.showDialog("TrackChangesDialog",_544,_545);
};
this.InsertCustomLink=function(_548,_549,args){
var link=args.value;
var _54c=String.format("<a href='{1}' title='{3}' target='{2}'>{0}</a>",link.innerHTML,link.href,link.target,link.title);
var _54d=Telerik.Web.UI.Editor.CommandList._getParentLink(_549);
if(_54d){
var _54e=_54d.cloneNode(true);
if(link.href){
_54e.setAttribute("href",link.href);
}
if(link.target){
_54e.setAttribute("target",link.target);
}
if(link.title){
_54e.setAttribute("title",link.title);
}
if(!_54e.innerHTML){
_54e.innerHTML=link.innerHTML;
}
_54c=Telerik.Web.UI.Editor.Utils.getOuterHtml(_54e);
}
_549.pasteHtml(_54c,_548);
};
this._getDialogArguments=function(_54f,_550,_551,_552){
_54f.Colors=_551.get_colors();
if("TD"==_550||"TH"==_550||"TABLE"==_550){
_54f.CssClasses=_551.getCssArray("TABLE");
_54f.CellCssClasses=_551.getCssArray("TD");
}else{
if("A"==_550||"BODY"==_550||"IMG"==_550){
_54f.CssClasses=_551.getCssArray(_550);
}
}
_54f.Editor=_551;
};
this.SetLinkProperties=this.LinkManager=function(_553,_554,_555){
var _556=Telerik.Web.UI.Editor.CommandList._getLinkArgument(_554);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_556,"A",_554,_553);
var _557=function(_558,args){
_554.pasteHyperLink(args.realLink,_553);
};
_554.showDialog("LinkManager",_556,_557);
return false;
};
this.SetImageProperties=function(_55a,_55b,_55c){
var _55d=_55b.getSelectedElement();
if(_55d.nodeName.toLowerCase()!="img"){
return false;
}
var _55e={};
_55e.Element=_55d;
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_55e,"IMG",_55b,_55a);
var _55f=function(_560,args){
if(_55d&&_55d.parentNode){
_55d.parentNode.replaceChild(args.Result,_55d);
}else{
_55b.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_55a);
}
};
_55b.showDialog("ImageProperties",_55e,_55f);
return false;
};
this.FormatCodeBlock=function(_562,_563,_564){
var _565={dirtyCode:_563.getSelectionHtml()};
if(_563.get_document().selection&&_563.get_document().selection){
var _566=_563.get_document().selection.type.toLowerCase();
if(_566=="control"||_566=="none"){
_565.dirtyCode="";
}
}
var _567=function(_568,args){
_563.pasteHtml(args.get_code(),_562);
};
_563.showDialog("FormatCodeBlock",_565,_567);
return false;
};
this._getDocumentAnchors=function(_56a){
var _56b=_56a.getElementsByTagName("A");
var _56c=new Array();
for(var i=0;i<_56b.length;i++){
if(_56b[i].name){
_56c[_56c.length]=_56b[i];
}
}
return _56c;
};
this._getParentLink=function(_56e){
_56e.setFocus();
var _56f=_56e.getSelectedElement();
var _570=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_56f,"A");
if(_570){
_56e.selectElement(_570);
}else{
var _571="";
if(_56f&&_56f.tagName=="IMG"){
_571=Telerik.Web.UI.Editor.Utils.getOuterHtml(_56f);
}else{
_571=_56e.getSelection().getHtml();
}
_570=_56e.get_document().createElement("A");
try{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_570,_571);
}
catch(e){
_570.innerHTML=Telerik.Web.UI.Editor.Utils.stripFormatting(_571,"ALL");
}
}
return _570;
};
this._getLinkArgument=function(_572,_573){
var _574=Telerik.Web.UI.Editor.CommandList._getParentLink(_572);
var _575=_574.innerHTML;
var _576=!_575?false:_575.match(/</);
if($telerik.isIE&&_576){
if(_575.trim().toLowerCase()=="<p>&nbsp;</p>"){
_574.innerHTML=" ";
_576=false;
}
}
return {selectedTabIndex:_573?_573:0,realLink:_574.cloneNode(true),showText:!_576,documentAnchors:Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(_572.get_document())};
};
this._getParentTable=function(_577){
_577.setFocus();
var _578=_577.getSelectedElement();
var _579=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_578,"TABLE");
return _579;
};
this._getParentCell=function(_57a){
_57a.setFocus();
var _57b=_57a.getSelectedElement();
var _57c=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_57b,"TD");
return _57c;
};
this._getTableArgument=function(_57d,_57e,_57f,_580){
var _581;
var _582=null;
if(_57f){
_581=Telerik.Web.UI.Editor.Utils.createTable(2,2,_57d._document);
}else{
_581=Telerik.Web.UI.Editor.CommandList._getParentTable(_57d);
}
if(!_57f&&!_581){
return null;
}
if(_580){
_582=Telerik.Web.UI.Editor.CommandList._getParentCell(_57d);
}
var _583=_581.cloneNode(true);
var _584=_581;
return {selectedTabIndex:_57e?_57e:0,cellToModify:_582,tableToModify:_583,originalTable:_584,tableDocument:(_583.document)?_583.document:_57d.get_document()};
};
this.EnterParagraphMozilla=function(_585,_586,args){
var _588=_586.getSelectedElement();
if("LI"==_588.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_588,"LI")!=null){
_586.bubbleKeyEventToBrowser();
return false;
}else{
if(_588.tagName=="A"){
_586.bubbleKeyEventToBrowser();
return false;
}
}
var _589=_586.get_contentWindow();
var oDoc=_589.document;
function checkParent(_58b,_58c){
_58c[_58c.length]=_58b;
while(_58b!=null&&_58b.tagName!="P"){
if(_58b.tagName=="TD"){
return null;
}
_58b=_58b.parentNode;
_58c[_58c.length]=_58b;
}
return _58b;
}
var _58d=_589.getSelection();
var _58e=_58d.getRangeAt(0);
var _58f=_58e.cloneRange();
_58e.deleteContents();
var _590=_58e.startOffset;
var _591=_58e.startContainer;
var _592="";
var _593=[];
var inP=checkParent(_591,_593);
if(inP){
var _595=(inP.innerHTML=="");
var _596=_58e.cloneRange();
_596.setStart(inP,0);
_596.setEnd(_591,_590);
var _597=_596.cloneContents();
var _598=_58e.cloneRange();
_598.setStart(_591,_590);
if(inP.lastChild){
_598.setEndAfter(inP.lastChild);
}else{
_598.setEnd(inP,0);
}
var _599=_598.cloneContents();
_58e.selectNode(inP);
_58d.removeAllRanges();
_58d.addRange(_58e);
inP=inP.cloneNode(true);
inP.innerHTML="";
var _59a=inP.cloneNode(true);
if(_595){
_59a.innerHTML="&nbsp;";
}else{
_59a.appendChild(_597);
}
endPar=inP.cloneNode(true);
endPar.appendChild(_599);
var newP=inP.cloneNode(true);
var _59c=newP;
if(_593.length>0){
for(var i=_593.length;i>0;i--){
var _59e=_593[i];
var _59f=_59e&&_59e.cloneNode?_59e.cloneNode(false):null;
if(_59f&&_59f.tagName!="P"){
_59c.appendChild(_59f);
_59c=_59f;
}
}
}
_59c.innerHTML="&nbsp;";
_59c.setAttribute("id","radETempNode");
var _5a0=oDoc.createElement("div");
_5a0.appendChild(_59a);
_5a0.appendChild(newP);
if(!_595){
_5a0.appendChild(endPar);
}
_592=_5a0.innerHTML;
}else{
_592="<p id='radETempNode'>&nbsp;</p>";
}
_586.pasteHtml(_592,"Enter",false,false,false);
oP=oDoc.getElementById("radETempNode");
if(oP){
oP.removeAttribute("id",0);
var _58d=_589.getSelection();
var _58e=oDoc.createRange();
_58e.selectNodeContents(oP);
_58d.removeAllRanges();
_58d.addRange(_58e);
}
var ps=oDoc.getElementsByTagName("P");
for(var i=0;i<ps.length;i++){
var _5a2=ps[i].innerHTML;
if(_5a2==""||_5a2.trim().toLowerCase()=="<br>"){
ps[i].parentNode.removeChild(ps[i]);
}
}
return false;
};
this.Enter=function(_5a3,_5a4,args){
var _5a6=_5a4.getSelectedElement();
if("LI"==_5a6.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5a6,"LI")!=null){
_5a4.bubbleKeyEventToBrowser();
return false;
}
try{
var _5a7=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_5a4.get_contentWindow());
var _5a8=_5a4.get_document().selection.createRange();
if(_5a8.pasteHTML){
var tag=_5a6.tagName;
if(tag.charAt(0)=="H"&&parseInt(tag.charAt(1))>0){
var _5aa=_5a8.duplicate();
_5aa.moveToElementText(_5a6);
_5a4.bubbleKeyEventToBrowser();
return false;
}
_5a8.pasteHTML("<br>");
_5a8.select();
_5a8.moveEnd("character",1);
_5a8.moveStart("character",1);
_5a8.collapse(false);
}else{
if(_5a8(0)){
_5a8.execCommand("Delete");
}
}
_5a4.executeCommand(_5a7);
}
catch(exc){
alert(exc.message);
}
return false;
};
this.ShiftEnter=function(_5ab,_5ac,args){
var _5ae=_5ac.getSelectedElement();
if("LI"==_5ae.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5ae,"LI")!=null){
var _5af=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_5ac.get_contentWindow());
var _5b0=_5ac.get_document().selection.createRange();
_5b0.pasteHTML("<br>");
_5b0.select();
_5b0.moveEnd("character",1);
_5b0.moveStart("character",1);
_5b0.collapse(false);
_5ac.executeCommand(_5af);
return false;
}
_5ac.bubbleKeyEventToBrowser();
return false;
};
this.ToggleTableBorder=function(_5b1,_5b2,args){
_5b2.toggleEnhancedEdit();
return false;
};
this.ConvertToUpper=this.ConvertToLower=function(_5b4,_5b5,args){
var _5b7;
var endR;
if($telerik.isIE){
if(_5b5._document.selection.type.toLowerCase()=="control"){
return;
}
var _5b9=_5b5._document.selection.createRange();
_5b7=_5b9.duplicate();
endR=_5b9.duplicate();
_5b7.collapse();
endR.collapse(false);
}
var _5ba=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5b5);
var _5bb=_5ba.markedElements;
var _5bc=_5ba.newElements;
var _5bd=new Telerik.Web.UI.Editor.GenericCommand(_5b5.getLocalizedString(_5b4),_5b5.get_contentWindow());
for(var i=0;i<_5bb.length;i++){
changeChildNodesCase(_5bb[i]);
}
for(var i=0;i<_5bc.length;i++){
if($telerik.isIE){
_5bc[i].removeNode(false);
}else{
var _5bf=document.createRange();
_5bf.selectNodeContents(_5bc[i]);
_5bc[i].parentNode.replaceChild(_5bf.extractContents(),_5bc[i]);
}
}
if($telerik.isIE){
var _5c0=_5b5._document.selection.createRange();
_5c0.setEndPoint("StartToStart",_5b7);
_5c0.setEndPoint("EndToEnd",endR);
_5c0.select();
}else{
var _5c1=_5b5.get_contentWindow().getSelection();
var rng=_5c1.getRangeAt(0);
rng.collapse(true);
}
_5b5.executeCommand(_5bd);
function changeChildNodesCase(_5c3){
var _5c4=_5c3.childNodes;
for(var i=0;i<_5c4.length;i++){
if(_5c4[i].nodeType==3){
_5c4[i].nodeValue=("ConvertToLower"==_5b4)?_5c4[i].nodeValue.toLowerCase():_5c4[i].nodeValue.toUpperCase();
}else{
if(_5c4[i].nodeType==1&&_5c4[i].tagName.toUpperCase()!="FONT"){
changeChildNodesCase(_5c4[i]);
}
}
}
}
};
this.ApplyClass=function(_5c6,_5c7,args){
var _5c9=true;
var _5ca=args.get_value();
var _5cb=_5c7.get_contentWindow();
var _5cc=_5c7.get_document();
var _5cd=_5c7.createRestorePoint();
var _5ce=new Telerik.Web.UI.Editor.GenericCommand(_5c7.getLocalizedString(_5c6)+" [\""+_5ca+"\"]",_5c7.get_contentWindow());
var _5cf=Telerik.Web.UI.Editor.Utils.getFullySelectedElement(_5cb);
if(_5cf){
Telerik.Web.UI.Editor.Utils.setElementClassName(_5cf,_5ca);
_5c9=false;
}else{
if(!_5ca){
_5cc.execCommand("RemoveFormat",false,null);
_5c9=false;
}
}
if(_5c9){
var _5d0=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5c7);
var _5d1=_5d0.markedElements;
if(_5d1.length>0){
for(var i=0;i<_5d1.length;i++){
var _5d3=_5d1[i];
if(_5d3.className){
continue;
}else{
_5d3.className=_5ca;
}
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5c7.get_contentWindow(),_5d1);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5c7,"class='"+_5ca+"'");
}
}
_5c7.executeCommand(_5ce);
},this.RealFontSize=function(_5d4,_5d5,args){
var _5d7=args.get_value();
var _5d8=new Telerik.Web.UI.Editor.GenericCommand(_5d5.getLocalizedString(_5d4)+" [\""+_5d7+"\"]",_5d5.get_contentWindow());
var _5d9=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5d5);
var _5da=_5d9.markedElements;
if(_5da.length>0){
for(var i=0;i<_5da.length;i++){
_5da[i].style.fontSize=_5d7;
_5da[i].removeAttribute("size");
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5d5.get_contentWindow(),_5da);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5d5,"style='font-size:"+_5d7+"'");
}
_5d5.executeCommand(_5d8);
},this._completeEditorSelection=function(_5dc,_5dd){
if(!_5dd){
_5dd="";
}
var _5de=_5dc.get_contentWindow();
var _5df=_5dc.get_document();
var _5e0=_5dc.getSelection().getParentElement().tagName;
if($telerik.isIE&&!_5dc.getSelectionHtml()&&(_5e0=="FONT"||_5e0=="SPAN")){
_5df.execCommand("RemoveFormat",null,false);
}
var _5e1=_5dc.getSelection();
_5e1.pasteHtml("<font "+_5dd+" id='radERealFont'>&nbsp;</font>");
var _5e2=_5dc.get_document().getElementById("radERealFont");
_5e2.removeAttribute("id");
if($telerik.isIE){
_5dc.selectElement(_5e2);
_5dc.getSelection().collapse();
_5e2.innerHTML="";
}else{
if(_5de.getSelection){
var oSel=_5de.getSelection();
var _5e4=_5dc.getSelection().getRange();
oSel.removeAllRanges();
_5e2.innerHTML="";
if(_5e4&&_5e4.selectNodeContents){
_5e4.selectNodeContents(_5e2);
}
oSel.addRange(_5e4);
}
}
},this._markEditorSelection=function(_5e5){
if(_5e5.get_html()==""){
return {markedElements:[],newElements:[]};
}
var _5e6="AZBY";
var _5e7="_cm";
var _5e8=[];
var _5e9=[];
var _5ea=[];
var _5eb=$telerik.isSafari?"span":"font";
var _5ec=_5e5._contentArea;
var _5ed=_5e5.getSelection();
if(_5ed.isControl()){
var _5ee=_5ed.getParentElement();
var _5ef=_5e5._document.createElement(_5eb);
_5ef.appendChild(_5ee.cloneNode(true));
_5ee.parentNode.replaceChild(_5ef,_5ee);
return {markedElements:[_5ef],newElements:[_5ef]};
}
if(!$telerik.isSafari){
keepFontNames();
}
if(!$telerik.isIE){
_5ec.ownerDocument.execCommand("UseCSS",false,true);
_5ec.ownerDocument.execCommand("styleWithCSS",false,false);
}
_5ec.ownerDocument.execCommand("FontName",false,_5e6);
var _5f0=_5ec.getElementsByTagName(_5eb);
for(var i=0;i<_5f0.length;i++){
var _5ef=_5f0[i];
if(_5ef.getAttribute("face")==_5e6||_5ef.style.fontFamily==_5e6){
_5ef.removeAttribute("face");
if(_5ef.style.fontFamily==_5e6){
_5ef.style.fontFamily="";
if(_5ef.className=="Apple-style-span"){
_5ef.className="";
}
}
_5e9.push(_5ef);
var _5f2=_5ef.getElementsByTagName(_5eb);
for(var j=0;j<_5f2.length;j++){
var _o=_5f2[j];
if(_o.getAttribute("face")!=_5e6){
_5e9.push(_o);
}
}
if(!_5ef.getAttribute(_5e7)){
_5ea.push(_5ef);
}
}
_5ef.removeAttribute(_5e7);
}
if(!$telerik.isSafari){
restoreFontNames();
}
if(!$telerik.isIE){
_5ec.ownerDocument.execCommand("UseCSS",false,false);
_5ec.ownerDocument.execCommand("styleWithCSS",false,true);
}
function keepFontNames(){
var _5f5=_5e5._contentArea.getElementsByTagName(_5eb);
for(var i=0;i<_5f5.length;i++){
var _5f7=_5f5[i];
if(_5f5[i].face){
_5f7.setAttribute("_face",_5f7.face);
_5e8.push(_5f7);
}
_5f7.setAttribute(_5e7,1);
}
}
function restoreFontNames(){
for(var i=0;i<_5e8.length;i++){
_5e8[i].face=_5e8[i].getAttribute("_face");
_5e8[i].removeAttribute("_face");
}
_5e8=[];
}
return {markedElements:_5e9,newElements:_5ea};
};
})();
if(typeof (RadEditorCommandList)=="undefined"){
var RadEditorCommandList=Telerik.Web.UI.Editor.CommandList;
}
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandsManager=function(_5f9){
this._commands=[];
this._currentCommandIndex=-1;
};
Telerik.Web.UI.Editor.CommandsManager.prototype={get_commands:function(){
return this._commands;
},execute:function(_5fa,_5fb){
if(_5fa&&_5fa.execute){
var _5fc=_5fa.execute();
if(false==_5fb){
return false;
}
if(_5fc&&_5fa._canUnexecute){
this._clearCommandsToRedo();
Array.add(this._commands,_5fa);
this._currentCommandIndex=this._commands.length-1;
return true;
}
}
return false;
},undo:function(_5fd){
if(_5fd>this._commands.length){
_5fd=this._commands.length;
}
var _5fe=0;
var _5ff=null;
while(0<_5fd--&&0<=this._currentCommandIndex&&this._currentCommandIndex<this._commands.length){
_5ff=this._commands[this._currentCommandIndex--];
if(_5ff){
_5ff.unexecute();
_5fe++;
}
}
},redo:function(_600){
if(_600>this._commands.length){
_600=this._commands.length;
}
var _601=0;
var _602=null;
var _603=this._currentCommandIndex+1;
while(0<_600--&&0<=_603&&_603<this._commands.length){
_602=this._commands[_603];
if(_602){
_602.execute();
this._currentCommandIndex=_603;
_601++;
}
_603++;
}
},removeCommandAt:function(_604){
this._commands.splice(_604,1);
if(this._currentCommandIndex>=_604){
this._currentCommandIndex--;
}
},isUndoAvailable:function(){
return (-1<this._currentCommandIndex);
},isRedoAvailable:function(){
return (this._currentCommandIndex<this._commands.length-1);
},getCommandsToUndo:function(){
if(this.isUndoAvailable()){
return (this._commands.slice(0,this._currentCommandIndex+1)).reverse();
}else{
return [];
}
},getCommandsToRedo:function(){
if(this.isRedoAvailable()){
return this._commands.slice(this._currentCommandIndex+1);
}else{
return [];
}
},canRepeatLastCommand:function(){
return ((this._currentCommandIndex==this._commands.length-1)&&null!=this._commands[this._currentCommandIndex]&&("function"==typeof (this._commands[this._currentCommandIndex].clone)));
},repeatLastCommand:function(){
if(this.canRepeatLastCommand()){
var _605=this._commands[this._currentCommandIndex].clone();
this.execute(_605);
}
},_clearCommandsToRedo:function(){
if(this.isRedoAvailable()){
this._commands.splice(this._currentCommandIndex+1,this._commands.length-this._currentCommandIndex);
}
}};
Telerik.Web.UI.Editor.CommandsManager.registerClass("Telerik.Web.UI.Editor.CommandsManager",null);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditingOptions=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditingOptions.prototype={Typing:1,Tools:2,ContextMenus:4,Tab:8,Modules:16,EditModes:32,All:63};
Telerik.Web.UI.EditingOptions.registerEnum("Telerik.Web.UI.EditingOptions",false);
Telerik.Web.UI.StripFormattingOptions=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.StripFormattingOptions.prototype={None:0,NoneSupressCleanMessage:1,MSWord:2,MSWordNoFonts:4,MSWordRemoveAll:8,Css:16,Font:32,Span:64,AllExceptNewLines:128,All:256};
Telerik.Web.UI.StripFormattingOptions.registerEnum("Telerik.Web.UI.StripFormattingOptions",false);
Telerik.Web.UI.EditModes=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditModes.prototype={Design:1,Html:2,Preview:4,All:7};
Telerik.Web.UI.EditModes.registerEnum("Telerik.Web.UI.EditModes",false);
Telerik.Web.UI.EditorToolbarMode=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorToolbarMode.prototype={Default:1,Floating:2,PageTop:4,ShowOnFocus:8};
Telerik.Web.UI.EditorToolbarMode.registerEnum("Telerik.Web.UI.EditorToolbarMode",false);
Telerik.Web.UI.EditorFilters=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorFilters.prototype={None:0,RemoveScripts:1,MakeUrlsAbsolute:2,FixUlBoldItalic:4,FixEnclosingP:8,IECleanAnchors:16,MozEmStrong:32,ConvertFontToSpan:64,ConvertToXhtml:128,IndentHTMLContent:256,EncodeScripts:512,OptimizeSpans:1024,DefaultFilters:65533};
Telerik.Web.UI.EditorFilters.registerEnum("Telerik.Web.UI.EditorFilters",false);
Telerik.Web.UI.EditorToolType=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorToolType.prototype={Button:1,DropDown:2,SplitButton:4,Separator:8,ToolStrip:16,Custom:32};
Telerik.Web.UI.EditorToolType.registerEnum("Telerik.Web.UI.EditorToolType",false);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Filter=function(){
Telerik.Web.UI.Editor.Filter.initializeBase(this);
this.IsDom=false;
this.Enabled=false;
this.Name="RadEditor filter";
this.Description="RadEditor filter description";
};
Telerik.Web.UI.Editor.Filter.prototype={getHtmlContent:function(_606){
return _606;
},getDesignContent:function(_607){
return _607;
},get_isDom:function(){
return this.IsDom;
},set_isDom:function(_608){
this.IsDom=_608;
},get_enabled:function(){
return this.Enabled;
},set_enabled:function(_609){
this.Enabled=_609;
},get_name:function(){
return this.Name;
},set_name:function(_60a){
this.Name=_60a;
},get_description:function(){
return this.Description;
},set_description:function(_60b){
this.Description=_60b;
}};
Telerik.Web.UI.Editor.Filter.registerClass("Telerik.Web.UI.Editor.Filter",Sys.Component);
Telerik.Web.UI.Editor.StripScriptsFilter=function(){
Telerik.Web.UI.Editor.StripScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="StripScriptsFilter";
this.Description="This filter strips all script tags from the content.";
};
Telerik.Web.UI.Editor.StripScriptsFilter.prototype={getHtmlContent:function(_60c){
return this._performStripping(_60c);
},getDesignContent:function(_60d){
return this._performStripping(_60d);
},_performStripping:function(_60e){
var _60f=_60e.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_60f=_60f.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
return _60f;
}};
Telerik.Web.UI.Editor.StripScriptsFilter.registerClass("Telerik.Web.UI.Editor.StripScriptsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.EncodeScriptsFilter=function(){
Telerik.Web.UI.Editor.EncodeScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="EncodeScriptsFilter";
this.Description="This filter encodes all script tags from the content.";
};
Telerik.Web.UI.Editor.EncodeScriptsFilter.prototype={getHtmlContent:function(_610){
var _611=new RegExp("<!"+"--RADEDITORSAVEDTAG_([\\s\\S]*?)--"+">","ig");
var _612=new RegExp("--RADEDITORSAVEDTAGENDING>","ig");
var _613=_610.replace(_611,"<$1>");
_613=_613.replace(_612,"--"+">");
return _613;
},getDesignContent:function(_614){
var _615=function(_616,_617,_618,_619,_61a){
var _61b=_61a.substring(0,_619).lastIndexOf("<!"+"--");
var _61c=_61a.substring(0,_619).lastIndexOf("--"+">");
if(_61b>_61c){
_61b=_61a.substring(_619,_61a.length).indexOf("<!"+"--");
_61c=_61a.substring(_619,_61a.length).indexOf("--"+">");
if((_61b==-1&&_61c>-1)||(_61c<_61b)){
return _616;
}
}
var _61d=_618.replace("--"+">","--RADEDITORSAVEDTAGENDING>");
var _61e="<!"+"--RADEDITORSAVEDTAG_"+_617+_61d+"--"+">";
return _61e;
};
var _61f=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig");
var _620=_614.replace(_61f,_615);
return _620;
}};
Telerik.Web.UI.Editor.EncodeScriptsFilter.registerClass("Telerik.Web.UI.Editor.EncodeScriptsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.RemoveExtraBrakes=function(){
Telerik.Web.UI.Editor.RemoveExtraBrakes.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="RemoveExtraBrakes";
this.Description="This filter strips all extra brakse inside some tags like p, h1, etc.";
};
Telerik.Web.UI.Editor.RemoveExtraBrakes.prototype={getHtmlContent:function(_621){
return this._performStripping(_621);
},_performStripping:function(_622){
var _623=_622;
_623=_623.replace(/<BR\s?\/?>\s*<\/(H1|H2|H3|H4|H5|H6|LI|P)/ig,"</$1");
_623=_623.replace(/<(H1|H2|H3|H4|H5|H6|LI|P)([^>]*)?><BR\s?\/?>/ig,"<$1 $2>");
return _623;
}};
Telerik.Web.UI.Editor.RemoveExtraBrakes.registerClass("Telerik.Web.UI.Editor.RemoveExtraBrakes",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixNestedLists=function(){
Telerik.Web.UI.Editor.FixNestedLists.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixNestedLists";
this.Description="This filter produces valid XHTML from nested lists";
};
Telerik.Web.UI.Editor.FixNestedLists.prototype={_getElements:function(_624,_625){
var _626=_624.getElementsByTagName(_625);
if(!_626){
_626=_624.ownerDocument.getElementsByTagName(_625);
}
return _626;
},fixLists:function(_627,_628){
var _629=this._getElements(_627,_628);
for(var i=_629.length-1;i>=0;i--){
var list=_629[i];
var _62c=list.previousSibling;
if(_62c&&_62c.nodeType==3){
_62c=_62c.previousSibling;
}
if(_62c&&"li"==list.previousSibling.nodeName.toLowerCase()){
_62c.appendChild(list.cloneNode(true));
var _62d=list.parentNode;
_62d.removeChild(list);
_62d=null;
}
}
},getHtmlContent:function(_62e){
this.fixLists(_62e,"OL");
this.fixLists(_62e,"UL");
return _62e;
}};
Telerik.Web.UI.Editor.FixNestedLists.registerClass("Telerik.Web.UI.Editor.FixNestedLists",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixUlBoldItalic=function(){
Telerik.Web.UI.Editor.FixUlBoldItalic.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixUlBoldItalic";
this.Description="This filter changes u, b, i tags to spans with CSS";
};
Telerik.Web.UI.Editor.FixUlBoldItalic.prototype={_getElements:function(_62f,_630){
var _631=_62f.getElementsByTagName(_630);
if(!_631){
_631=_62f.ownerDocument.getElementsByTagName(_630);
}
return _631;
},_replaceElementWithSpan:function(_632,_633,_634){
var _635=this._getElements(_632,_633);
var _636=[];
for(var j=_635.length-1;j>=0;j--){
Array.add(_636,_635[j]);
}
for(var i=0,len=_636.length;i<len;i++){
var _63a=_632.ownerDocument.createElement("span");
_63a.style.cssText=_634;
var _63b=_636[i];
var _63c=_63b.innerHTML;
if($telerik.isIE&&_63c==" "){
_63a.innerText=_63c;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_63a,_63c);
}
_63b.parentNode.replaceChild(_63a,_63b);
}
},_replaceSpanWithElement:function(_63d,_63e,_63f){
var _640=this._getElements(_63d,"span");
var _641=[];
for(var j=_640.length-1;j>=0;j--){
Array.add(_641,_640[j]);
}
for(var i=0,len=_641.length;i<len;i++){
var _645=[];
var _646=_641[i];
for(var k=0;k<_646.childNodes.length;k++){
Array.add(_645,_646.childNodes[k].cloneNode(true));
}
if(_646.style.cssText.toLowerCase()==_63f||_646.style.cssText.toLowerCase()==(_63f+";")){
var _648=_63d.ownerDocument.createElement(_63e);
for(var l=0;l<_645.length;l++){
_648.appendChild(_645[l]);
}
_646.parentNode.replaceChild(_648,_646);
}
}
},getHtmlContent:function(_64a){
this._replaceElementWithSpan(_64a,"u","text-decoration:underline;");
return _64a;
},getDesignContent:function(_64b){
this._replaceSpanWithElement(_64b,"u","text-decoration: underline");
return _64b;
}};
Telerik.Web.UI.Editor.FixUlBoldItalic.registerClass("Telerik.Web.UI.Editor.FixUlBoldItalic",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.OptimizeSpans=function(){
Telerik.Web.UI.Editor.OptimizeSpans.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="OptimizeSpans";
this.Description="This filter changes removes unneeded span elements";
};
Telerik.Web.UI.Editor.OptimizeSpans.prototype={_getElements:function(_64c,_64d){
var _64e=_64c.getElementsByTagName(_64d);
if(!_64e){
_64e=_64c.ownerDocument.getElementsByTagName(_64d);
}
return _64e;
},_singleChild:function(node){
if(node==null||node.parentNode==null){
return false;
}
var _650=node.parentNode;
var _651=0;
for(var i=0,len=_650.childNodes.length;i<len&&_651<2;i++){
var _654=_650.childNodes[i];
if(_654.nodeType==3&&String(_654.nodeValue).trim()==""){
continue;
}
_651++;
}
return (_651==1);
},_optimizeElement:function(node){
var _656=node.parentNode;
var _657=node.innerHTML;
var _658=["align","dir","lang","title","class","id"];
var _659=true;
for(var i=0,len=_658.length;i<len;i++){
_659|=this._checkAttribute(node,_656,_658[i]);
}
if(!_659){
return;
}
for(var i=0,len=_658.length;i<len;i++){
var _65c=_658[i];
var _65d=node.getAttribute(_65c,2);
if(_65d){
_656.setAttribute(_65c,_65d);
}
}
var _65e=$telerik.isIE?node.style.cssText:node.getAttribute("style",2);
if(_65e){
var _65f=$telerik.isIE?_656.style.cssText:_656.getAttribute("style",2);
_65f=_65f?_65f+";":"";
if($telerik.isIE){
_656.style.cssText=_65f+_65e;
}else{
_656.setAttribute("style",_65f+_65e);
}
}
Telerik.Web.UI.Editor.Utils.removeNode(node);
},_checkAttribute:function(node,_661,_662){
var _663=node.getAttribute(_662,2);
var _664=_661.getAttribute(_662,2);
return (_663==null||_664==null||_663==_664);
},getHtmlContent:function(_665){
var _666=this._getElements(_665,"span");
if(_666){
var i,len=_666.length;
var _669=[];
for(i=0;i<len;i++){
var span=_666[i];
var _66b=span.tagName.toLowerCase();
if(span.parentNode.tagName.toLowerCase()==_66b){
if(this._singleChild(span)){
_669[_669.length]=span;
}else{
var _66c=Telerik.Web.UI.Editor.Utils.getOuterHtml(span).toLowerCase();
if(_66c.indexOf("<"+_66b+">")==0){
_669[_669.length]=span;
}
}
}
}
len=_669.length;
for(i=0;i<len;i++){
this._optimizeElement(_669[i]);
}
}
return _665;
}};
Telerik.Web.UI.Editor.OptimizeSpans.registerClass("Telerik.Web.UI.Editor.OptimizeSpans",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEKeepCommentsFilter=function(){
Telerik.Web.UI.Editor.IEKeepCommentsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEKeepCommentsFilter";
this.Description="This filter keeps the conditional comments in IE.";
};
Telerik.Web.UI.Editor.IEKeepCommentsFilter.prototype={getHtmlContent:function(_66d){
var _66e=new RegExp("<!"+"--RADEDITORSAVEDCOMMENT","ig");
var _66f=_66d.replace(_66e,"<!--");
return _66f;
},getDesignContent:function(_670){
var _671=new RegExp("<!"+"--(\\[[^]]+\\][\\s\\S]*?)-"+"->","ig");
var _672=_670.replace(_671,"<!-"+"-RADEDITORSAVEDCOMMENT$1-"+"->");
return _672;
}};
Telerik.Web.UI.Editor.IEKeepCommentsFilter.registerClass("Telerik.Web.UI.Editor.IEKeepCommentsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter=function(){
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEKeepObjectParamsFilter";
this.Description="This filter keeps the params of object tags when going to html mode and back.";
};
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.prototype={getHtmlContent:function(_673){
var _674=new RegExp("<param([\\s\\S]+?)?>","ig");
var _675=new RegExp("<rade_param([\\s>])","ig");
var _676=_673;
if(_674.test(_673)&&_675.test(_673)){
_676=_676.replace(_674,"");
}
_676=_676.replace(_675,"<param$1");
_676=_676.replace(/<\/rade_param>/gi,"");
return _676;
},getDesignContent:function(_677){
var _678=new RegExp("<param([\\s\\S]+?)/?>","ig");
var _679=_677.replace(_678,"<rade_param$1></rade_param><param$1>");
return _679;
}};
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.registerClass("Telerik.Web.UI.Editor.IEKeepObjectParamsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixEnclosingP=function(){
Telerik.Web.UI.Editor.FixEnclosingP.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixEnclosingP";
this.Description="This filter removes a parent paragraph tag if the whole content is inside it.";
};
Telerik.Web.UI.Editor.FixEnclosingP.prototype={getHtmlContent:function(_67a){
var _67b=null;
if(_67a.tagName.toLowerCase()=="html"){
_67b=_67a.getElementsByTagName("BODY")[0];
}else{
_67b=_67a;
}
if($telerik.isIE){
if(_67b&&(_67b.firstChild)&&("P"==_67b.firstChild.tagName)&&(_67b.childNodes.length==1)&&(_67b.innerHTML.substring(0,3).toLowerCase()=="<p>")){
Telerik.Web.UI.Editor.Utils.removeNode(_67b.firstChild);
}
}else{
if(_67b&&(_67b.childNodes.length==1)&&(_67b.firstChild.tagName)&&("br"==_67b.firstChild.tagName.toLowerCase())){
_67b.innerHTML="";
}
}
return _67a;
}};
Telerik.Web.UI.Editor.FixEnclosingP.registerClass("Telerik.Web.UI.Editor.FixEnclosingP",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEFixEmptyParagraphs=function(){
Telerik.Web.UI.Editor.IEFixEmptyParagraphs.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEFixEmptyParagraphs";
this.Description="This filter inserts a non-braking space in empty paragraph tags so they are rendered correctly in IE.";
};
Telerik.Web.UI.Editor.IEFixEmptyParagraphs.prototype={getHtmlContent:function(_67c){
var re=new RegExp("(<p[^>]*>)(<\\/p>)","ig");
var _67e=_67c.replace(re,"$1&nbsp;$2");
return _67e;
}};
Telerik.Web.UI.Editor.IEFixEmptyParagraphs.registerClass("Telerik.Web.UI.Editor.IEFixEmptyParagraphs",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IECleanAnchorsFilter=function(){
Telerik.Web.UI.Editor.IECleanAnchorsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IECleanAnchorsFilter";
this.Description="This filter removse the current page href from all anchor (#) links .";
};
Telerik.Web.UI.Editor.IECleanAnchorsFilter.prototype={getHtmlContent:function(_67f){
var _680=document.location.href.replace(/\?/gi,"\\?");
var re=new RegExp("(<A[^<>]*?(href)\\s*=\\s*['\"])("+_680+")(\\#[^'\"]*?['\"][^>]*?>)","ig");
var _682=_67f.replace(re,"$1$4");
return _682;
}};
Telerik.Web.UI.Editor.IECleanAnchorsFilter.registerClass("Telerik.Web.UI.Editor.IECleanAnchorsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozEmStrongFilter=function(){
Telerik.Web.UI.Editor.MozEmStrongFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="MozEmStrongFilter";
this.Description="This filter changes b,strong and i,em in Mozilla browsers.";
};
Telerik.Web.UI.Editor.MozEmStrongFilter.prototype={getHtmlContent:function(_683){
var _684=_683.replace(new RegExp("<b(\\s([^>])*?)?>","ig"),"<strong$1>");
_684=_684.replace(new RegExp("</b(\\s([^>])*?)?>","ig"),"</strong$1>");
_684=_684.replace(new RegExp("<i(\\s([^>])*?)?>","ig"),"<em$1>");
_684=_684.replace(new RegExp("</i(\\s([^>])*?)?>","ig"),"</em$1>");
return _684;
},getDesignContent:function(_685){
var _686=_685.replace(new RegExp("<strong(\\s([^>])*?)?>","ig"),"<b$1>");
_686=_686.replace(new RegExp("</strong(\\s([^>])*?)?>","ig"),"</b$1>");
_686=_686.replace(new RegExp("<em(\\s([^>])*?)?>","ig"),"<i$1>");
_686=_686.replace(new RegExp("</em(\\s([^>])*?)?>","ig"),"</i$1>");
return _686;
}};
Telerik.Web.UI.Editor.MozEmStrongFilter.registerClass("Telerik.Web.UI.Editor.MozEmStrongFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepStylesString=function(){
Telerik.Web.UI.Editor.MozillaKeepStylesString.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="MozillaKeepStylesString";
this.Description="This filter remembers the positions of link tags in the html content (part 1).";
this.markerCounter=0;
};
Telerik.Web.UI.Editor.MozillaKeepStylesString.prototype={getDesignContent:function(_687){
var self=this;
var _689=function(_68a,_68b,_68c,_68d,_68e){
var _68f=_68e.indexOf("</head>",_68d);
if(_68f!=-1&&_68e.indexOf("<body",_68f)!=-1){
return _68a;
}else{
self.markerCounter++;
var _690="RadEditorStyleKeeper"+self.markerCounter;
var _691="<div id='"+_690+"' style='display:none;'>&nbsp;</div><"+_68b+" reoriginalpositionmarker='"+_690+"'"+_68c;
return _691;
}
};
var _692=new RegExp("<(link|style)([^>]*>)","gi");
var _693=_687.replace(_692,_689);
return _693;
}};
Telerik.Web.UI.Editor.MozillaKeepStylesString.registerClass("Telerik.Web.UI.Editor.MozillaKeepStylesString",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepStylesDom=function(){
Telerik.Web.UI.Editor.MozillaKeepStylesDom.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="MozillaKeepStylesDom";
this.Description="This filter remembers the positions of link tags in the html content(part 2).";
this._divs=[];
};
Telerik.Web.UI.Editor.MozillaKeepStylesDom.prototype={getHtmlContent:function(_694){
var _695=_694.getElementsByTagName("HEAD")[0];
var _696=true;
if(!_695){
_695=_694.ownerDocument.getElementsByTagName("HEAD")[0];
_696=false;
}
if(!_695){
return _694;
}
this._restoreElements(_695,_694,"STYLE");
this._restoreElements(_695,_694,"LINK");
var divs=_694.getElementsByTagName("DIV");
if(divs){
for(var j=divs.length-1;j>=0;j--){
var _699=divs[j];
if(_699.id.indexOf("RadEditorStyleKeeper")==0){
var _69a=_699.parentNode;
_69a.removeChild(_699);
}
}
}
divs=null;
if(_696){
this._removeElements(_695,"STYLE");
this._removeElements(_695,"LINK");
}
this._removeMarkerAttributes(_694,"STYLE");
this._removeMarkerAttributes(_694,"LINK");
return _694;
},_restoreElements:function(_69b,_69c,_69d){
var _69e;
_69e=_69b.getElementsByTagName(_69d);
this._divs=_69c.getElementsByTagName("DIV");
var i=0;
while(_69e.length>0&&i<_69e.length){
this._restoreStyle(_69e[i++]);
}
},_restoreStyle:function(_6a0){
var _6a1=_6a0.getAttribute("reoriginalpositionmarker");
if(_6a1){
j=0;
var _6a2=null;
while(j<this._divs.length&&!_6a2){
if(this._divs[j].id==_6a1){
_6a2=this._divs[j];
}
j++;
}
if(_6a2){
var _6a3=_6a0.cloneNode(true);
_6a3.removeAttribute("reoriginalpositionmarker");
var _6a4=_6a2.parentNode;
_6a4.replaceChild(_6a3,_6a2);
return true;
}
}
return false;
},_removeElements:function(_6a5,_6a6){
var _6a7=_6a5.getElementsByTagName(_6a6);
if(_6a7){
for(var j=_6a7.length-1;j>=0;j--){
var _6a9=_6a7[j];
if(null!=_6a9.getAttribute("reoriginalpositionmarker")){
var _6aa=_6a9.parentNode;
_6aa.removeChild(_6a9);
}
}
_6a7=null;
}
},_removeMarkerAttributes:function(_6ab,_6ac){
styles=_6ab.getElementsByTagName(_6ac);
if(styles){
for(var j=styles.length-1;j>=0;j--){
styles[j].removeAttribute("reoriginalpositionmarker");
}
}
styles=null;
}};
Telerik.Web.UI.Editor.MozillaKeepStylesDom.registerClass("Telerik.Web.UI.Editor.MozillaKeepStylesDom",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepFlashString=function(_6ae){
Telerik.Web.UI.Editor.MozillaKeepFlashString.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="MozillaKeepFlashString";
this.Description="This filter replaces the flash/media objects with static images in design mode.";
this._flashImageSrc=_6ae?_6ae:"FlashManager.gif";
};
Telerik.Web.UI.Editor.MozillaKeepFlashString.prototype={getDesignContent:function(_6af){
var _6b0=this._flashImageSrc;
var _6b1=function(_6b2,gr1,gr2,gr3,_6b6,str){
var _6b8=new Sys.StringBuilder("<img isflash=\"true\" ");
_6b8.append(gr1.replace(/\ssrc=/gi,String.format(" src=\"{0}\" flashSrc=",_6b0)));
_6b8.append(" />");
return _6b8.toString();
};
var _6b9=new RegExp("<embed([^>]+)>?","ig");
var _6ba=_6af.replace(_6b9,_6b1);
_6ba=_6ba.replace(/<\/embed>/ig,"");
return _6ba;
}};
Telerik.Web.UI.Editor.MozillaKeepFlashString.registerClass("Telerik.Web.UI.Editor.MozillaKeepFlashString",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepFlash=function(){
Telerik.Web.UI.Editor.MozillaKeepFlash.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="MozillaKeepFlash";
this.Description="This filter replaces the flash/media objects with static images in design mode.";
};
Telerik.Web.UI.Editor.MozillaKeepFlash.prototype={getHtmlContent:function(_6bb){
var _6bc=_6bb.getElementsByTagName("IMG");
for(var i=0;i<_6bc.length;i++){
var _6be=_6bc[i];
var _6bf=_6be.getAttribute("isflash");
if(_6bf!=null){
var _6c0=_6be.getAttribute("flashSrc");
var _6c1=Telerik.Web.UI.Editor.Utils.getOuterHtml(_6be);
_6c1=_6c1.replace(/<img/gi,"<embed");
var oDiv=_6be.ownerDocument.createElement("DIV");
oDiv.innerHTML=_6c1;
newNode=oDiv.firstChild;
if(_6c0){
newNode.src=_6c0;
if($telerik.isSafari){
newNode.setAttribute("src",_6c0);
}
}
newNode.removeAttribute("flashSrc");
newNode.removeAttribute("isflash");
var _6c3=_6be.parentNode;
_6c3.insertBefore(newNode,_6be);
_6c3.removeChild(_6be);
i--;
}
}
return _6bb;
}};
Telerik.Web.UI.Editor.MozillaKeepFlash.registerClass("Telerik.Web.UI.Editor.MozillaKeepFlash",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.StripJunkFilter=function(){
Telerik.Web.UI.Editor.StripJunkFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="StripJunkFilter";
this.Description="This filter strips extra content, added by the Safari/Firefox browsers.";
};
Telerik.Web.UI.Editor.StripJunkFilter.prototype={getHtmlContent:function(_6c4){
var html=_6c4;
if($telerik.isSafari){
html=html.replace(new RegExp(" class=\"khtml-block-placeholder\"","ig"),"");
html=html.replace(new RegExp(" class=\"Apple-style-span\"","ig"),"");
html=html.replace(new RegExp(" class=\"webkit-block-placeholder\"","ig"),"");
}
if($telerik.isFirefox){
html=html.replace(new RegExp("\\s?<br type=\"_moz\" \\/>","ig")," ");
html=html.replace(new RegExp(" _moz_[a-z_]*=\"[^\"]*\"","ig"),"");
html=html.replace(new RegExp(" type=\"_moz\"","ig"),"");
}
return html;
}};
Telerik.Web.UI.Editor.StripJunkFilter.registerClass("Telerik.Web.UI.Editor.StripJunkFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.ConvertFontToSpanFilter=function(){
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="ConvertFontToSpanFilter";
this.Description="This filter changes deprecated font tags to compliant span tags.";
this._fontSizesPx=["10px","13px","16px","18px","24px","32px","48px"];
this._fontSizesRevPx=[];
for(var i=0;i<this._fontSizesPx.length;i++){
this._fontSizesRevPx[parseInt(this._fontSizesPx[i])]=i;
}
};
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.prototype={getHtmlContent:function(_6c7){
var _6c8=_6c7.ownerDocument;
var _6c9=_6c8.createElement("SPAN");
var span,font,_6cc;
var _6cd=_6c7.getElementsByTagName("FONT");
while(_6cd.length>0){
font=_6cd[0];
_6cc=font.parentNode;
span=_6c9.cloneNode(false);
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(font,span,false);
if(font.style.cssText&&font.style.cssText!=""){
span.style.cssText=font.style.cssText;
}
if(font.className){
span.className=font.className;
}
if(font.face){
span.style.fontFamily=font.face;
if(span.getAttribute("face")!=null){
span.removeAttribute("face");
}
}
var size=0;
if(font.style.fontSize){
span.style.fontSize=font.style.fontSize;
}else{
if(!isNaN(size=parseInt(font.size))&&font.size!="+0"){
try{
if(size<0){
size=size+4;
}
span.style.fontSize=this._fontSizesPx[size-1];
}
catch(ex){
span.style.fontSize=this._fontSizesPx[3];
}
if(span.getAttribute("size")!=null){
span.removeAttribute("size");
}
}
}
if(font.color){
span.style.color=font.color;
if(span.getAttribute("color")!=null){
span.removeAttribute("color");
}
}
if($telerik.isIE&&font.innerHTML==" "){
span.innerText=font.innerHTML;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(span,font.innerHTML);
}
_6cc.replaceChild(span,font);
_6cd=_6c7.getElementsByTagName("FONT");
}
return _6c7;
},getDesignContent:function(_6cf){
var _6d0=_6cf.ownerDocument;
var _6d1=_6d0.createElement("FONT");
var span,font,_6d4;
var _6d5=_6cf.getElementsByTagName("SPAN");
while(_6d5.length>0){
span=_6d5[0];
_6d4=span.parentNode;
font=_6d1.cloneNode(false);
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(span,font,false);
if(span.style.cssText&&span.style.cssText!=""){
font.style.cssText=span.style.cssText;
}
if(span.className){
font.className=span.className;
}
if(span.style.fontFamily){
font.face=span.style.fontFamily;
this._removeElementStyleAttribute(font,"fontFamily");
}
if(span.style.fontSize){
var size=3;
var _6d7=null;
if(-1!=span.style.fontSize.indexOf("px")){
_6d7=this._fontSizesRevPx[parseInt(span.style.fontSize)];
}
if(typeof (_6d7)!="undefined"&&null!=_6d7){
font.size=_6d7+1;
this._removeElementStyleAttribute(font,"fontSize");
}
}
if(span.style.color){
font.color=this._fixColorValue(span.style.color);
this._removeElementStyleAttribute(font,"color");
}
if($telerik.isIE&&span.innerHTML==" "){
font.innerText=span.innerHTML;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(font,span.innerHTML);
}
_6d4.replaceChild(font,span);
_6d5=_6cf.getElementsByTagName("SPAN");
}
return _6cf;
},_fixColorValue:function(_6d8){
if(_6d8.toLowerCase().indexOf("rgb")!=-1){
var _6d9="#";
var _6da=function(val){
var _6dc=parseInt(val,10).toString(16);
_6d9=_6d9+(_6dc.length==1?"0"+_6dc:_6dc);
return val;
};
_6d8=_6d8.replace(/(\d+)/gi,_6da);
_6da=null;
return _6d9;
}else{
return _6d8;
}
},_removeElementStyleAttribute:function(_6dd,_6de){
if(_6dd.style&&_6dd.style[_6de]){
if(_6dd.style.removeAttribute){
_6dd.style.removeAttribute(_6de);
}else{
if(_6dd.style.removeProperty){
_6de=_6de.replace(/([A-Z])/g,"-$1").toLowerCase();
_6dd.style.removeProperty(_6de);
}
}
if(_6dd.style[_6de]){
_6dd.style[_6de]=null;
}
if(_6dd.style.cssText){
}else{
_6dd.removeAttribute("style");
}
}
}};
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.registerClass("Telerik.Web.UI.Editor.ConvertFontToSpanFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.CleanAttributesFilter=function(){
Telerik.Web.UI.Editor.CleanAttributesFilter.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="CleanAttributesFilter";
this.Description="This filter fixes deprecated attributes to make the content  XHTML compliant.";
};
Telerik.Web.UI.Editor.CleanAttributesFilter.prototype={_getElements:function(_6df,_6e0){
var _6e1=_6df.getElementsByTagName(_6e0);
if(!_6e1){
_6e1=_6df.ownerDocument.getElementsByTagName(_6e0);
}
return _6e1;
},getHtmlContent:function(_6e2){
var _6e3=_6e2;
var tags=_6e3.getElementsByTagName("body");
var _6e5=tags.length;
for(i=0;i<_6e5;i++){
this.convertAttribute(tags[i],"bgColor","backgroundColor");
}
var tags=_6e3.getElementsByTagName("p");
var _6e5=tags.length;
for(i=0;i<_6e5;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
var tags=_6e3.getElementsByTagName("div");
var _6e5=tags.length;
for(i=0;i<_6e5;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
tags=_6e3.getElementsByTagName("table");
_6e5=tags.length;
for(i=0;i<_6e5;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
}
tags=_6e3.getElementsByTagName("td");
_6e5=tags.length;
for(i=0;i<_6e5;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
this.convertAttribute(obj,"width","width");
this.convertAttribute(obj,"height","height");
this.convertAttribute(obj,"noWrap","whiteSpace");
}
tags=_6e3.getElementsByTagName("img");
_6e5=tags.length;
for(i=0;i<_6e5;i++){
var obj=tags[i];
this.convertImgAlignAttribute(obj);
var _6e7=new Array("marginLeft","marginRight");
this.convertAttribute(obj,"hspace",_6e7);
_6e7=new Array("marginTop","marginBottom");
this.convertAttribute(obj,"vspace",_6e7);
this.convertBorderAttribute(obj);
}
tags=_6e3.getElementsByTagName("ul");
_6e5=tags.length;
for(i=0;i<_6e5;i++){
this.convertTypeAttribute(tags[i]);
}
tags=_6e3.getElementsByTagName("ol");
_6e5=tags.length;
for(i=0;i<_6e5;i++){
this.convertTypeAttribute(tags[i]);
}
return _6e3;
},getDesignContent:function(_6e8){
var _6e9=_6e8;
var tags=_6e9.getElementsByTagName("body");
var _6eb=tags.length;
for(i=0;i<_6eb;i++){
this.convertCSSProperty(tags[i],"bgColor","backgroundColor");
}
var tags=_6e9.getElementsByTagName("p");
var _6eb=tags.length;
for(i=0;i<_6eb;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6e9.getElementsByTagName("div");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6e9.getElementsByTagName("table");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
var obj=tags[i];
this.convertCSSProperty(obj,"bgColor","backgroundColor");
this.convertCSSProperty(obj,"background","backgroundImage");
}
tags=_6e9.getElementsByTagName("td");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
var obj=tags[i];
this.convertCSSProperty(obj,"bgColor","backgroundColor");
this.convertCSSProperty(obj,"background","backgroundImage");
this.convertCSSProperty(obj,"width","width");
this.convertCSSProperty(obj,"height","height");
this.convertCSSProperty(obj,"noWrap","whiteSpace");
}
tags=_6e9.getElementsByTagName("img");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
var obj=tags[i];
var _6ed=new Array("marginLeft","marginRight");
this.convertCSSProperty(obj,"hspace",_6ed);
_6ed=new Array("marginTop","marginBottom");
this.convertCSSProperty(obj,"vspace",_6ed);
this.convertBorderCSS(obj);
}
tags=_6e9.getElementsByTagName("ul");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
this.convertListStyleTypeStyle(tags[i]);
}
tags=_6e9.getElementsByTagName("ol");
_6eb=tags.length;
for(i=0;i<_6eb;i++){
this.convertListStyleTypeStyle(tags[i]);
}
return _6e9;
},convertAttribute:function(obj,_6ef,_6f0){
var _6f1=obj.getAttribute(_6ef);
var _6f2=_6f1;
if(_6ef=="background"){
_6f1=obj.getAttribute(_6ef,2);
_6f2="url("+_6f1+")";
}else{
if(_6ef=="width"||_6ef=="height"||_6ef=="vspace"||_6ef=="hspace"){
if(!(typeof (_6f2)=="string"&&_6f2.match("%"))){
_6f2=parseInt(_6f2)+"px";
}
}else{
if(_6ef=="noWrap"){
_6f1=obj.noWrap;
_6f2="nowrap";
}
}
}
if(_6f1){
if(typeof (_6f0)=="object"){
var _6f3=_6f0.length;
for(var i=0;i<_6f3;i++){
pValue=obj.style[_6f0[i]];
if(!pValue){
obj.style[_6f0[i]]=_6f2;
}
}
}else{
pValue=obj.style[_6f0];
if(!pValue){
obj.style[_6f0]=_6f2;
}
}
obj.removeAttribute(_6ef);
}
},convertCSSProperty:function(obj,_6f6,_6f7){
var _6f8=obj.getAttribute(_6f6);
var _6f9=obj.style[_6f7];
var _6fa=_6f9;
if(_6f7=="backgroundImage"){
_6fa=_6f9.slice(4,_6f9.length-1);
}else{
if(_6f7=="width"||_6f7=="height"){
if(_6f9&&!_6f9.match("%")){
_6fa=parseInt(_6f9);
}
}else{
if(_6f7=="whiteSpace"){
_6f8=obj.noWrap;
_6fa="nowrap";
}else{
if(_6f6=="vspace"||_6f6=="hspace"){
var _6fb=_6f7.length;
for(var i=0;i<_6fb;i++){
if(i==0){
_6f9=obj.style[_6f7[i]];
_6fa=parseInt(_6f9);
}else{
if(_6f9!=obj.style[_6f7[i]]){
_6f9=false;
break;
}
}
}
}
}
}
}
if(_6f9&&!_6f8){
obj.setAttribute(_6f6,_6fa);
if(typeof (_6f7)=="object"){
_6fb=_6f7.length;
for(var i=0;i<_6fb;i++){
obj.style[_6f7[i]]="";
}
}else{
obj.style[_6f7]="";
}
}
},convertImgAlignAttribute:function(obj){
var _6fe=obj.getAttribute("align");
var _6ff=($telerik.isIE)?"styleFloat":"cssFloat";
if(_6fe){
_6fe=_6fe.toLowerCase();
obj.style.verticalAlign="";
obj.style[_6ff]="";
switch(_6fe){
case "left":
obj.style[_6ff]="left";
break;
case "right":
obj.style[_6ff]="right";
break;
case "bottom":
case "baseline":
case "absbottom":
obj.style[_6ff]="";
obj.style.verticalAlign="text-bottom";
break;
case "middle":
case "absmiddle":
obj.style[_6ff]="";
obj.style.verticalAlign="middle";
break;
case "top":
case "texttop":
obj.style[_6ff]="";
obj.style.verticalAlign="top";
break;
}
}
obj.removeAttribute("align");
},convertTypeAttribute:function(obj){
var t=obj.getAttribute("type");
if(t){
if(!obj.style.listStyleType){
switch(t){
case "1":
obj.style.listStyleType="decimal";
break;
case "a":
obj.style.listStyleType="lower-alpha";
break;
case "A":
obj.style.listStyleType="upper-alpha";
break;
case "i":
obj.style.listStyleType="lower-roman";
break;
case "I":
obj.style.listStyleType="upper-roman";
break;
case "disc":
obj.style.listStyleType="disc";
break;
case "circle":
obj.style.listStyleType="circle";
break;
case "square":
obj.style.listStyleType="square";
break;
}
}
obj.removeAttribute("type");
}
},convertListStyleTypeStyle:function(obj){
var t=obj.style.listStyleType;
var _704=obj.getAttribute("type");
if(t&&!_704){
switch(t){
case "decimal":
obj.type="1";
break;
case "lower-alpha":
obj.type="a";
break;
case "upper-alpha":
obj.type="A";
break;
case "lower-roman":
obj.type="i";
break;
case "upper-roman":
obj.type="I";
break;
case "disc":
obj.type="disc";
break;
case "circle":
obj.type="circle";
break;
case "square":
obj.type="square";
break;
default:
obj.type=t;
break;
}
obj.style.listStyleType="";
}
},convertBorderAttribute:function(obj){
var b=obj.getAttribute("border");
if(b){
if(!obj.style.borderWidth){
obj.style.borderWidth=b+"px";
}
if(!obj.style.borderStyle){
obj.style.borderStyle="none";
}
obj.removeAttribute("border");
}
},convertBorderCSS:function(obj){
var b=parseInt(obj.style.borderWidth);
var _709=obj.getAttribute("border");
if(b&&obj.style.borderStyle.match("none")&&(!_709||_709==0)){
obj.setAttribute("border",b);
obj.style.borderWidth="";
obj.style.borderStyle="";
}
}};
Telerik.Web.UI.Editor.CleanAttributesFilter.registerClass("Telerik.Web.UI.Editor.CleanAttributesFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.ConvertToXhtmlFilter=function(){
Telerik.Web.UI.Editor.ConvertToXhtmlFilter.initializeBase(this);
this._uniqueIds={};
this.Name="ConvertToXhtmlFilter";
this.Description="This filter converts the HTML from the editor content area to valid XHTML";
this.Enabled=true;
this.IsDom=true;
};
Telerik.Web.UI.Editor.ConvertToXhtmlFilter.prototype={getHtmlContent:function(_70a){
if(!_70a){
return "";
}
var sb=new Sys.StringBuilder("");
this._appendNodeXhtml(_70a,sb);
return sb.toString();
},_convertAttribute:function(s){
return String(s).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
},_getAttributeValue:function(_70d,_70e,sb){
var name=_70d.nodeName;
var _711=_70d.nodeValue;
if(name!="style"){
if($telerik.isIE&&(name=="type"||name=="value"||name=="selected")){
if(!_711){
return;
}
}else{
if(!_70d.specified){
if($telerik.isIE&&_711==""&&typeof (_70e[name])=="string"&&_70e[name]!=""){
_711=_70e[name];
}else{
return;
}
}
}
if(!_711){
return;
}
if(!isNaN(_711)){
_711=_70e.getAttribute(name);
}
if($telerik.isIE&&(name=="href"||name=="src")){
_711=_70e.getAttribute(name,2);
}
sb.append(" "+(_70d.expando?name:name.toLowerCase())+"=\""+this._convertAttribute(_711)+"\"");
}else{
var _712=_70e.style.cssText;
if(_712){
sb.append(" style=\""+this._convertAttribute(_712.toLowerCase())+"\"");
}
}
},_canHaveChildren:function(node){
switch(node.tagName.toUpperCase()){
case "AREA":
case "BASE":
case "BASEFONT":
case "COL":
case "FRAME":
case "HR":
case "IMG":
case "BR":
case "INPUT":
case "ISINDEX":
case "LINK":
case "META":
case "PARAM":
return false;
}
return true;
},_appendElementNode:function(node,sb){
if(node.tagName.charAt(0)=="/"){
return;
}
if(node.nodeName=="!"){
sb.append(node.text);
return;
}
var name=node.nodeName;
if(node.scopeName){
if(node.scopeName=="HTML"){
name=name.toLowerCase();
}else{
name=node.scopeName+":"+name;
}
}else{
name=name.toLowerCase();
}
sb.append("<"+name);
if("img"==name){
if($telerik.isIE){
var oImg=document.createElement("IMG");
oImg.mergeAttributes(node);
if(oImg.width){
sb.append(" width=\""+node.getAttribute("width",2)+"\"");
}
if(oImg.height){
sb.append(" height=\""+node.getAttribute("height",2)+"\"");
}
}
if(node.getAttribute("alt",2)==""){
sb.append(" alt=\"\"");
}
}
if($telerik.isIE&&("area"==name||"a"==name)){
if(node.shape){
sb.append(" shape=\""+node.shape.toLowerCase()+"\"");
}
if(node.coords){
sb.append(" coords=\""+node.getAttribute("coords")+"\"");
}
var _718=node.getAttribute("href",2);
if(_718){
_718=_718.replace("about:blank","");
_718=_718.replace("about:","");
_718=_718.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
sb.append(" href=\""+_718+"\"");
node.removeAttribute("href",0);
}
}
try{
var _719=node.attributes;
var l=_719.length;
for(var i=0;i<l;i++){
this._getAttributeValue(_719[i],node,sb);
}
}
catch(exc){
}
switch(name){
case "script":
sb.append(">"+node.text+"</"+name+">");
break;
case "textarea":
sb.append(">"+node.value+"</"+name+">");
break;
case "iframe":
sb.append("></iframe>");
break;
case "object":
sb.append(">");
var _71c="";
if(node.altHtml){
_71c=node.altHtml;
}else{
_71c=node.innerHTML;
}
if($telerik.isIE){
_71c=_71c.replace(/\soriginalAttribute="[^"]+"/gi,"");
_71c=_71c.replace(/\soriginalPath="[^"]+"/gi,"");
}
sb.append(_71c);
sb.append("</object>");
break;
case "title":
case "style":
case "comment":
case "noscript":
var _71c=node.innerHTML;
if($telerik.isIE&&_71c.length==0){
_71c=node.ownerDocument.title;
}
sb.append(">"+_71c+"</"+name+">");
break;
default:
if(node.hasChildNodes()||(true==node.canHaveChildren||(node.canHaveChildren==null&&this._canHaveChildren(node)))){
sb.append(">");
var cs=node.childNodes;
l=cs.length;
for(var i=0;i<l;i++){
this._appendNodeXhtml(cs[i],sb);
}
sb.append("</"+name+">");
}else{
sb.append(" />");
}
break;
}
},_appendTextNode:function(node,sb){
var _720=String(node.nodeValue);
var _721=node.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(_721=="style"||_721=="script")){
sb.append(_720);
}else{
_720=_720.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if($telerik.isFirefox){
_720=_720.replace(/[\u00a0]/g,"&nbsp;");
}
sb.append(_720);
}
},_appendCDataNode:function(node,sb){
sb.append("<![CDA"+"TA[\n"+node.nodeValue+"\n]"+"]>");
},_appendCommentNode:function(node,sb){
var _726=node.nodeValue;
if(!_726&&node.text){
_726=node.text;
}else{
_726="<!--"+_726+"-->";
}
sb.append(_726);
},_appendNodeXhtml:function(node,sb){
if(node.uniqueID){
if(this._uniqueIds[node.uniqueID]){
return;
}else{
this._uniqueIds[node.uniqueID]=true;
}
}
switch(node.nodeType){
case 1:
this._appendElementNode(node,sb);
break;
case 3:
this._appendTextNode(node,sb);
break;
case 4:
this._appendCDataNode(node,sb);
break;
case 8:
this._appendCommentNode(node,sb);
break;
}
}};
Telerik.Web.UI.Editor.ConvertToXhtmlFilter.registerClass("Telerik.Web.UI.Editor.ConvertToXhtmlFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IndentHTMLContentFilter=function(){
Telerik.Web.UI.Editor.IndentHTMLContentFilter.initializeBase(this);
this.Name="IndentHTMLContentFilter";
this.Description="This filter indents the HTML content so it is more readable when you view the code";
this.Enabled=true;
this.IsDom=false;
this._indentPattern="    ";
this._protectedData=null;
var _729="P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION";
var _72a="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var _72b=_72a+"|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+_729+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+_729+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+_72a+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+_72b+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+_72b+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={getHtmlContent:function(html){
var _72d=html.trim();
if(_72d.indexOf("<body")==0){
_72d=_72d.substring(_72d.indexOf(">")+1,_72d.length-7);
}
this._protectedData=[];
var self=this;
var _72f=function(_730,_731,_732,_733,_734,_735){
Array.add(self._protectedData,_732);
return _731+"RADEDITORFORMATTED_"+self._protectedData.length+_733;
};
_72d=_72d.replace(this._ignoreTags,_72f);
var _736="$&";
if($telerik.isSafari2){
_736="$0";
}
_72d=_72d.replace(this._tagsNLBefore,"\n"+_736);
_72d=_72d.replace(this._tagsNLAfter,_736+"\n");
_72d=_72d.replace(this._tagsNLNoCloseAfter,_736+"\n");
_72d=_72d.replace(this._tagsNLBeforeAndAfter,"\n"+_736+"\n");
var _737=_72d.split(this._shrinkNL);
var _738=new Sys.StringBuilder("");
var _739="";
for(var i=0;i<_737.length;i++){
var line=_737[i];
if(line.length==0){
continue;
}
if(this._tagsDecIndent.test(line)){
if(_739.length>this._indentPattern.length){
_739=_739.substring(this._indentPattern.length);
}else{
_739="";
}
}
_738.append(_739);
_738.append(line);
_738.append("\n");
if(this._tagsIncIndent.test(line)){
_739+=this._indentPattern;
}
}
_72d=_738.toString();
for(var i=0;i<this._protectedData.length;i++){
var _73c=new RegExp("RADEDITORFORMATTED_"+(i+1));
var _73d=this._protectedData[i].replace(/\$/gi,"$$$$");
_72d=_72d.replace(_73c,_73d);
}
return _72d;
}};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.registerClass("Telerik.Web.UI.Editor.IndentHTMLContentFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MakeUrlsAbsolute=function(){
Telerik.Web.UI.Editor.MakeUrlsAbsolute.initializeBase(this);
this.Name="MakeUrlsAbsolute";
this.Description="This filter makes all src and href attributes in the editor content have absolute URLs";
this.Enabled=true;
this.IsDom=true;
};
Telerik.Web.UI.Editor.MakeUrlsAbsolute.prototype={getHtmlContent:function(_73e){
this._updateElements(_73e,"A","href");
this._updateElements(_73e,"AREA","href");
this._updateElements(_73e,"IMG","src");
this._updateElements(_73e,"EMBED","src");
return _73e;
},_getElements:function(_73f,_740){
var _741=_73f.getElementsByTagName(_740);
if(!_741){
_741=_73f.ownerDocument.getElementsByTagName(_740);
}
return _741;
},_updateElements:function(_742,_743,_744){
var _745=_742.ownerDocument.createElement("div");
var _746=this._getElements(_742,_743);
if(_746){
for(var i=0;i<_746.length;i++){
var _748=_746[i].getAttribute(_744,2);
if("href"==_744&&_748){
_745.innerHTML="<a href=\""+_748.replace(/\"/gi,"%22")+"\">test</a>";
if($telerik.isIE){
var _749=_746[i].innerHTML;
}
_746[i].setAttribute("href",_745.childNodes[0].href);
if($telerik.isIE){
if((_749.indexOf("www.")==0&&_746[i].innerHTML.match("[a-z]+://"))||(_749.indexOf("mailto:")==-1&&_746[i].innerHTML.match("mailto:"))){
_746[i].innerHTML=_749;
}
}
}else{
if("src"==_744&&_748){
_745.innerHTML="<img src=\""+_748.replace(/\"/gi,"%22")+"\" />";
_746[i].setAttribute("src",_745.childNodes[0].src);
}
}
}
}
_745.innerHTML="";
_745=null;
}};
Telerik.Web.UI.Editor.MakeUrlsAbsolute.registerClass("Telerik.Web.UI.Editor.MakeUrlsAbsolute",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FiltersManager=function(){
Telerik.Web.UI.Editor.FiltersManager.initializeBase(this);
this._filters=[];
this._enableXhtmlFilter=true;
this._convertToXhtmlFilter=new Telerik.Web.UI.Editor.ConvertToXhtmlFilter();
};
Telerik.Web.UI.Editor.FiltersManager.prototype={clear:function(){
Array.clear(this._filters);
},get_enableXhtmlFilter:function(){
return this._enableXhtmlFilter;
},set_enableXhtmlFilter:function(_74a){
this._enableXhtmlFilter=_74a;
},add:function(_74b){
Array.add(this._filters,_74b);
},addAt:function(_74c,_74d){
Array.insert(this._filters,_74d,_74c);
},remove:function(_74e){
Array.remove(this._filters,_74e);
},removeAt:function(_74f){
Array.removeAt(this._filters,_74f);
},getFilterAt:function(_750){
return this._filters[_750];
},getFilterByName:function(name){
for(var i=0;i<this._filters.length;i++){
var _753=this._filters[i];
if(_753&&name==_753.get_name()){
return _753;
}
}
},getDesignContent:function(_754){
var _755=_754;
for(var i=0;i<this._filters.length;i++){
var _757=this._filters[i];
if((!_757.get_isDom())&&(false!=_757.get_enabled())&&_757.getDesignContent){
try{
_755=_757.getDesignContent(_755);
}
catch(exc){
alert("Error while executing filter "+_757.get_name()+" - "+exc.toString());
}
}
}
return _755;
},getDesignContentDom:function(_758){
for(var i=0;i<this._filters.length;i++){
var _75a=this._filters[i];
if((_75a.get_isDom())&&(false!=_75a.get_enabled())&&_75a.getDesignContent){
try{
_758=_75a.getDesignContent(_758);
}
catch(exc){
alert("Error while executing filter "+_75a.get_name()+" - "+exc.toString());
}
}
}
return _758;
},getHtmlContent:function(_75b){
for(var i=0;i<this._filters.length;i++){
var _75d=this._filters[i];
if((_75d.get_isDom())&&(false!=_75d.get_enabled())&&_75d.getHtmlContent){
try{
_75b=_75d.getHtmlContent(_75b);
}
catch(exc){
alert("Error while executing filter "+_75d.get_name()+" - "+exc.toString());
}
}
}
var _75e;
if(this.get_enableXhtmlFilter()){
try{
_75e=this._convertToXhtmlFilter.getHtmlContent(_75b);
}
catch(exc){
alert("Error while executing filter XHTML - "+exc.toString());
}
}else{
_75e=$telerik.getOuterHtml(_75b);
}
_75e=_75e.replace(/<body\s*\/>/i,"<body></body>").trim();
for(var i=0;i<this._filters.length;i++){
var _75d=this._filters[i];
if((!_75d.get_isDom())&&(false!=_75d.get_enabled())&&_75d.getHtmlContent){
try{
_75e=_75d.getHtmlContent(_75e);
}
catch(exc){
alert("Error while executing filter "+_75d.get_name()+" - "+exc.toString());
}
}
}
return _75e;
}};
Telerik.Web.UI.Editor.FiltersManager.registerClass("Telerik.Web.UI.Editor.FiltersManager",Sys.Component);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.RestorePoint=function(_75f){
this.Window=_75f;
this.Document=_75f.document;
this.update();
this.Update=this.update;
this.Restore=this.restore;
this.Select=this.select;
};
if($telerik.isIE){
Telerik.Web.UI.Editor.RestorePoint.prototype={update:function(){
this.HtmlText=this.Document.body.innerHTML;
var _760=this.Document.selection.createRange();
if(_760.length){
this.SourceIndex=_760.item(0).sourceIndex;
}else{
this.StartBookmark=_760.getBookmark();
}
},restore:function(_761){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.Document.body,this.HtmlText);
this.select(_761);
},select:function(_762){
if(null!=this.SourceIndex){
var _763=this.Document.body.createControlRange();
_763.addElement(this.Document.all(this.SourceIndex));
_763.select();
}else{
if(null!=this.StartBookmark){
var _763=this.Document.body.createTextRange();
_763.moveToBookmark(this.StartBookmark);
_763.select();
if(true==_762&&_763.collapse){
_763.collapse();
}
}
}
}};
}else{
Telerik.Web.UI.Editor.RestorePoint.prototype={restore:function(){
try{
this.Window.document.body.innerHTML=this.HtmlText;
this.select();
}
catch(e){
}
},select:function(){
try{
this.Window.focus();
this._moveToBookmark(this.Window.getSelection(),this.Bookmark);
}
catch(ex){
}
},update:function(){
try{
this.HtmlText=this.Window.document.body.innerHTML;
this.Bookmark=this._bookmarkSelection(this.Window.getSelection());
}
catch(e){
}
},_bookmarkSelection:function(_764){
if(_764){
return {anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_764.anchorNode),anchorOffset:_764.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_764.focusNode),focusOffset:_764.focusOffset,isCollapsed:_764.isCollapsed};
}else{
return {};
}
},_moveToBookmark:function(_765,_766){
var _767=_766.anchorNodeBookmark.select();
var _768=_766.focusNodeBookmark.select();
_765.collapse(_767,_766.anchorOffset);
if(!_766.isCollapsed){
_765.extend(_768,_766.focusOffset);
}
}};
}
Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(_769,node){
this.Window=_769;
this.NodePath=this._findNodePath(this.Window.document.documentElement,node);
};
Telerik.Web.UI.Editor.SelectionBookmark.prototype={select:function(){
var node=this._findNode(this.Window.document.documentElement,this.NodePath);
try{
Telerik.Web.UI.Editor.Utils.selectElement(this.Window,node);
}
catch(ex){
}
return node;
},_findNodePath:function(_76c,node){
var n,res;
for(var i=0;i<_76c.childNodes.length;i++){
n=_76c.childNodes[i];
res=this._findNodePath(n,node);
if(""!=res){
return ""+i+","+res;
}
if(n==node){
return ""+i;
}
}
return "";
},_findNode:function(_771,_772){
var arr=_772.split(",");
for(var i=0;i<arr.length;i++){
_771=_771.childNodes[arr[i]];
}
return _771;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Selection=function(_775){
this._window=_775;
this.isSafari=$telerik.isSafari;
this.isOpera=$telerik.isOpera;
this.GetRange=this.getRange;
this.GetParentElement=this.getParentElement;
this.IsControl=this.isControl;
this.GetText=this.getText;
this.GetHtmlText=this.getHtml;
this.PasteHtml=this.pasteHtml;
this.Collapse=this.collapse;
};
Telerik.Web.UI.Editor.Selection.prototype={pasteHtml:function(_776,_777){
_777=(_777==true);
if($telerik.isIE){
return this._executeIE(_776,_777);
}else{
return this._executeMozilla(_776,_777);
}
},_executeIE:function(_778,_779){
var _77a=this._window.document;
var _77b=_77a.selection;
if(_77b.type.toLowerCase()!="none"){
_77b.createRange().execCommand("Delete");
}
if(_77b.type.toLowerCase()!="none"){
_77a.execCommand("Delete");
}
_77a.body.setActive();
selRange=_77b.createRange();
if(selRange&&selRange.length){
var _77c=selRange.item(0);
if(_77c&&_77c.tagName=="BODY"){
var _77d=_77c.getElementsByTagName("FORM")[0];
if(_77d){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_77d,_77d.innerHTML+_778);
}
}
}else{
var _77e=selRange.duplicate();
_77e.collapse(true);
_778=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(_778);
selRange.pasteHTML(_778);
Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(selRange.parentElement());
if(_779){
_77e.setEndPoint("EndToEnd",selRange);
_77e.select();
}
}
return true;
},_executeMozilla:function(_77f,_780){
var oDoc=this._window.document;
var _782=oDoc.createElement("SPAN");
_782.innerHTML=_77f;
var _783="radetempnode";
if(this.isOpera){
_782.setAttribute("id",_783);
}
this._insertNodeAtSelection(this._window,_782,true);
if(this.isOpera){
var _784=oDoc.createRange();
var _785=this._window.getSelection();
var span=oDoc.getElementById(_783);
_784.selectNodeContents(span);
var _787=_784.extractContents();
_784.selectNode(span);
var _788=_784.extractContents();
_784.insertNode(_787);
_785.addRange(_784);
return true;
}else{
if(!this.isSafari){
var _784=oDoc.createRange();
_784.selectNodeContents(_782);
var _787=_784.extractContents();
_784.selectNode(_782);
_784.deleteContents();
this._insertNodeAtSelection(this._window,_787,_780);
}
}
return true;
},_insertNodeAtSelection:function(win,_78a,_78b){
var _78c=win.getSelection();
if(_78c.rangeCount==0){
win.document.body.appendChild(_78a);
return;
}
var _78d=null;
if(_78c.getRangeAt){
_78d=_78c.getRangeAt(0);
}else{
_78d=win.document.createRange();
_78d.setStart(_78c.anchorNode,_78c.anchorOffset);
_78d.setEnd(_78c.focusNode,_78c.focusOffset);
}
if(_78c.removeAllRanges){
_78c.removeAllRanges();
}
_78d.deleteContents();
var _78e=$telerik.isSafari&&!$telerik.isSafari3?_78c.baseNode:_78d.startContainer;
var _78f=$telerik.isSafari&&!$telerik.isSafari3?_78c.baseOffset:_78d.startOffset;
if($telerik.isSafari&&null==_78e){
_78e=win.document.body;
}
_78d=win.document.createRange();
if((_78a.nodeType==3)&&(_78e.nodeType==3)){
_78e.insertData(_78f,_78a.nodeValue);
_78d.setEnd(_78e,_78f+_78a.length);
if(_78b){
_78d.setStart(_78e,_78f);
}else{
_78d.setStart(_78e,_78f+_78a.length);
}
}else{
var _790;
if(_78e.nodeType==3){
var _791=_78e;
_78e=_791.parentNode;
var _792=_791.nodeValue;
var _793=_792.substr(0,_78f);
var _794=_792.substr(_78f);
var _795=win.document.createTextNode(_793);
var _790=win.document.createTextNode(_794);
_78e.insertBefore(_790,_791);
_78e.insertBefore(_78a,_790);
try{
_78e.insertBefore(_795,_78a);
}
catch(exc){
}
_78e.removeChild(_791);
}else{
if(_78e.childNodes.length>0){
_790=_78e.childNodes[_78f];
_78e.insertBefore(_78a,_790);
}else{
if(_78e.tagName!="BODY"){
_78e=_78e.parentNode;
}
_78e.appendChild(_78a);
}
}
try{
if(_78b){
_78d.setStart(_78a,0);
_78d.setEnd(_790,0);
}else{
_78d.setStartBefore(_790);
_78d.setEndBefore(_790);
}
}
catch(exc){
}
}
try{
_78c.addRange(_78d);
}
catch(exc){
}
},selectRange:function(_796){
if(!_796){
return;
}
var _797=this._window;
if(_796.select){
_796.select();
}else{
if(_797.getSelection){
var _798=_797.getSelection();
if(_798.removeAllRanges){
_798.removeAllRanges();
_798.addRange(_796);
}else{
var base=_796.baseNode;
if(null==base){
base=_797.document.body;
}
var _79a=_796.extentNode;
if(null==_79a){
_79a=_797.document.body;
}
_798.setBaseAndExtent(base,_796.startOffset,_79a,_796.endOffset);
}
}
}
},getBrowserSelection:function(){
if(!this._window){
return null;
}
if(this._window.document.selection&&!window.opera){
return this._window.document.selection;
}else{
if(this._window.getSelection){
return this._window.getSelection();
}
}
return null;
},getRange:function(){
if(!this._window){
return null;
}
if(this._window.document.selection&&!window.opera){
return this._window.document.selection.createRange();
}else{
if(this._window.getSelection){
var _79b=this._window.getSelection();
if(!_79b||_79b.rangeCount<1){
return null;
}
var rng=null;
if(_79b.getRangeAt){
rng=_79b.getRangeAt(0);
}else{
rng=this._window.document.createRange();
rng.setStart(_79b.anchorNode,_79b.anchorOffset);
rng.setEnd(_79b.focusNode,_79b.focusOffset);
}
return rng;
}
}
},getParentElement:function(){
var rng=this.getRange();
if(!rng){
return null;
}
if(rng.commonAncestorContainer){
var _79e=this._window.getSelection();
var _79f=rng.startContainer?rng.startContainer:_79e.baseNode;
var _7a0=rng.endContainer?rng.endContainer:_79e.extentNode;
var _7a1=rng.startOffset!=null?rng.startOffset:_79e.baseOffset;
var _7a2=rng.endOffset!=null?rng.endOffset:_79e.extentOffset;
if(_79f==_7a0&&(_7a2-_7a1)==1){
return _79e.anchorNode.childNodes[_79e.anchorOffset];
}else{
if(!rng.commonAncestorContainer.tagName){
if(this._window.document==rng.commonAncestorContainer&&_79e.baseNode){
return _79e.baseNode.parentNode;
}
return rng.commonAncestorContainer.parentNode;
}else{
return rng.commonAncestorContainer;
}
}
}else{
if(rng.length){
return rng.item(0);
}else{
if(rng.parentElement){
return rng.parentElement();
}else{
return null;
}
}
}
},isControl:function(){
if(this._window.document.selection){
return (this._window.document.selection.type=="Control");
}else{
var oSel=this._window.getSelection();
if(oSel.toString()!=""){
return false;
}
var _7a4=oSel.focusNode;
if(!_7a4||_7a4.nodeType==1){
return false;
}
return (_7a4.tagName=="IMG");
}
},getText:function(){
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.length){
return "";
}else{
if(null!=rng.text){
return rng.text;
}
}
}else{
if(this._window.getSelection){
return this._window.getSelection().toString();
}else{
return "";
}
}
},getHtml:function(){
if(this._window.document.selection&&!window.opera){
var rng=this._window.document.selection.createRange();
if(rng.length){
return rng.item(0).outerHTML;
}else{
if(rng.htmlText){
return rng.htmlText;
}else{
return "";
}
}
}else{
if(this._window.getSelection){
var _7a7=this._window.getSelection();
var rng=null;
if(null==_7a7){
return "";
}
if(_7a7.getRangeAt&&typeof (_7a7.rangeCount)!="undefined"&&_7a7.rangeCount==0){
return "";
}
if(_7a7.getRangeAt){
rng=_7a7.getRangeAt(0);
var _7a8=this._window.document.createElement("div");
var _7a9=rng.cloneContents();
if(_7a9){
_7a8.appendChild(_7a9);
return _7a8.innerHTML;
}else{
return "";
}
}else{
return _7a7;
}
}else{
return "";
}
}
},collapse:function(_7aa){
_7aa=(_7aa==true);
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.collapse){
rng.collapse(_7aa);
rng.select();
}
}else{
if(this._window.getSelection){
var _7ac=this._window.getSelection();
if(!_7ac.isCollapsed){
if(_7aa){
_7ac.collapseToStart();
}else{
_7ac.collapseToEnd();
}
}
}
}
}};
Telerik.Web.UI.Editor.Selection.registerClass("Telerik.Web.UI.Editor.Selection",null);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorShortCutManager=function(){
this._shortcuts=[];
};
Telerik.Web.UI.EditorShortCutManager.prototype={addShortCut:function(_7ad,_7ae){
var rs=new Telerik.Web.UI.EditorShortCut(_7ad,_7ae);
rs.HashValue=this._getShortCutHashValue(rs);
this._shortcuts[rs.HashValue]=rs;
},removeShortCut:function(_7b0){
var _7b1=this._findByName(_7b0);
if(_7b1){
this._shortcuts[_7b1.HashValue]=null;
}
},setShortCut:function(_7b2,_7b3){
this.removeShortCut(_7b2);
this.addShortCut(_7b2,_7b3);
},isShortCutHit:function(e){
return this._hitTest(e.keyCode,e.ctrlKey,(null!=e.ctrlLeft?e.ctrlLeft:e.ctrlKey),e.shiftKey,(null!=e.shiftLeft?e.shiftLeft:e.shiftKey),e.altKey,(null!=e.altLeft?e.altLeft:e.altKey));
},_hitTest:function(_7b5,_7b6,_7b7,_7b8,_7b9,_7ba,_7bb){
var _7bc=this._getHashValue(_7b5,_7b6,_7b7,_7b8,_7b9,_7ba,_7bb);
return this._shortcuts[_7bc];
},_getHashValue:function(_7bd,_7be,_7bf,_7c0,_7c1,_7c2,_7c3){
var _7c4=_7bd&65535;
var _7c5=0;
_7c5|=(_7be?(1<<0):0);
_7c5|=(_7c0?(1<<2):0);
_7c5|=(_7c2?(1<<4):0);
_7c4|=(_7c5<<16);
return _7c4;
},_getShortCutHashValue:function(_7c6){
return this._getHashValue(_7c6.KeyCode,_7c6.CtrlKey,_7c6.LeftCtrlKey,_7c6.ShiftKey,_7c6.LeftShiftKey,_7c6.AltKey,_7c6.LeftAltKey);
},_findByName:function(_7c7){
var _7c8;
for(var _7c9 in this._shortcuts){
_7c8=this._shortcuts[_7c9];
if(null!=_7c8&&_7c8._name==_7c7){
return _7c8;
}
}
return null;
}};
Telerik.Web.UI.EditorShortCut=function(_7ca,_7cb){
this._name=_7ca;
this.setShortCut(_7cb);
};
Telerik.Web.UI.EditorShortCut.prototype={CtrlKey:false,LeftCtrlKey:false,ShiftKey:false,LeftShiftKey:false,AltKey:false,LeftAltKey:false,KeyCode:0,get_name:function(){
return this._name;
},set_name:function(_7cc){
this._name=_7cc;
},setShortCut:function(_7cd){
this._parseShortcutString(_7cd);
},_parseShortcutString:function(_7ce){
if("string"==typeof (_7ce)){
this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
_7ce=_7ce.replace(/\s*/gi,"");
_7ce=_7ce.replace(/\+\+/gi,"+PLUS");
var _7cf=_7ce.split("+");
var _7d0="";
for(var i=0;i<_7cf.length;i++){
_7d0=_7cf[i].toUpperCase();
switch(_7d0){
case "LCTRL":
this.LeftCtrlKey=true;
case "CTRL":
this.CtrlKey=true;
break;
case "LSHIFT":
this.LeftShiftKey=true;
case "SHIFT":
this.ShiftKey=true;
break;
case "LALT":
this.LeftAltKey=true;
case "ALT":
this.AltKey=true;
break;
case "F1":
this.KeyCode=112;
break;
case "F2":
this.KeyCode=113;
break;
case "F3":
this.KeyCode=114;
break;
case "F4":
this.KeyCode=115;
break;
case "F5":
this.KeyCode=116;
break;
case "F6":
this.KeyCode=117;
break;
case "F7":
this.KeyCode=118;
break;
case "F8":
this.KeyCode=119;
break;
case "F9":
this.KeyCode=120;
break;
case "F10":
this.KeyCode=121;
break;
case "F11":
this.KeyCode=122;
break;
case "F12":
this.KeyCode=123;
break;
case "ENTER":
this.KeyCode=13;
break;
case "HOME":
this.KeyCode=36;
break;
case "END":
this.KeyCode=35;
break;
case "LEFT":
this.KeyCode=37;
break;
case "RIGHT":
this.KeyCode=39;
break;
case "UP":
this.KeyCode=38;
break;
case "DOWN":
this.KeyCode=40;
break;
case "PAGEUP":
this.KeyCode=33;
break;
case "PAGEDOWN":
this.KeyCode=34;
break;
case "SPACE":
this.KeyCode=32;
break;
case "TAB":
this.KeyCode=9;
break;
case "BACK":
this.KeyCode=8;
break;
case "CONTEXT":
this.KeyCode=93;
break;
case "ESCAPE":
case "ESC":
this.KeyCode=27;
break;
case "DELETE":
case "DEL":
this.KeyCode=46;
break;
case "INSERT":
case "INS":
this.KeyCode=45;
break;
case "PLUS":
this.KeyCode="+".charCodeAt(0);
break;
default:
this.KeyCode=_7d0.charCodeAt(0);
break;
}
}
}else{
throw {description:"Invalid shortcut string"};
}
}};
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI._localization=function(){
this._controls={};
};
Telerik.Web.UI._localization.prototype={merge:function(_7d2,_7d3,_7d4){
if(typeof (this._controls[_7d2])=="undefined"){
this._controls[_7d2]={};
}
if(typeof (this._controls[_7d2][_7d3])=="undefined"){
this._controls[_7d2][_7d3]={};
}
var _7d5=this._controls[_7d2][_7d3];
for(var _7d6 in _7d4){
if(typeof (_7d4[_7d6])=="string"){
_7d5[_7d6]=_7d4[_7d6];
}
}
return _7d5;
}};
Telerik.Web.UI._localization.registerClass("Telerik.Web.UI._localization");
Telerik.Web.UI.Localization=new Telerik.Web.UI._localization();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadEditor=function(_7d7){
Telerik.Web.UI.RadEditor.initializeBase(this,[_7d7]);
this._rootElement=null;
this._bottomResizer=null;
this._tableElement=null;
this._document=null;
this._contentArea=null;
this._contentAreaElement=null;
this._contentHiddenTextarea=null;
this._contentWindow=null;
this._doctypeString=null;
this._fullPage=null;
this._originalHeight=null;
this._accessKeyTextbox=null;
this._toolJSON=[];
this._contextMenusJSON=[];
this._modulesJSON=[];
this._toolAdapterType="";
this._uniqueID="";
this._skin="";
this._newLineBr=true;
this._autoResizeHeight=false;
this._contentAreaCssFile="";
this._mozillaFlashOverlayImage="FlashManager.gif";
this._stripFormattingOptions=Telerik.Web.UI.StripFormattingOptions.None;
this._editModes=Telerik.Web.UI.EditModes.All;
this._contentFilters=Telerik.Web.UI.EditorFilters.DefaultFilters;
this._mode=Telerik.Web.UI.EditModes.Design;
this._toolbarMode=Telerik.Web.UI.EditorToolbarMode.Default;
this._toolsWidth=null;
this._shortCutManager=new Telerik.Web.UI.EditorShortCutManager();
this._filtersManager=new Telerik.Web.UI.Editor.FiltersManager();
this._commandsManager=new Telerik.Web.UI.Editor.CommandsManager();
if(null!=Telerik.Web.UI.Editor.ModulesManager){
this._modulesManager=new Telerik.Web.UI.Editor.ModulesManager(this);
}
this._resizeExtender=null;
this._toolAdapter=null;
this._localization={};
this._contentAreaEventHandlers={};
this._onToolClickDelegate=Function.createDelegate(this,this._onToolClick);
this._onWindowResizeDelegate=null;
this._dialogOpener=null;
this._saveContentDelegate=null;
this._colors=null;
this._fontNames=null;
this._fontSizes=null;
this._realFontSizes=null;
this._symbols=null;
this._contextMenus=null;
this._snippets=null;
this._cssClasses=null;
this._cssFiles=null;
this._languages=null;
this._paragraphs=null;
this._links=null;
this.isIE=$telerik.isIE;
this.isFirefox=$telerik.isFirefox;
this.isOpera=$telerik.isOpera;
this.isIE7=$telerik.isIE7;
this._spellAllowAddCustom=true;
this._spellCheckJSON={};
this._spellCheckService=null;
this._ajaxSpellCheckScriptReference="";
};
Telerik.Web.UI.RadEditor.prototype={add_spellCheckLoaded:function(_7d8){
this.get_events().addHandler("spellCheckLoaded",_7d8);
},remove_spellCheckLoaded:function(_7d9){
this.get_events().removeHandler("spellCheckLoaded",_7d9);
},get_ajaxSpellCheck:function(){
return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(_7da){
this._ajaxSpellCheck=_7da;
this.raiseEvent("spellCheckLoaded");
},get_ajaxSpellCheckScriptReference:function(){
return this._ajaxSpellCheckScriptReference;
},set_ajaxSpellCheckScriptReference:function(val){
this._ajaxSpellCheckScriptReference=val;
},get_spellAllowAddCustom:function(){
return this._spellAllowAddCustom;
},set_spellAllowAddCustom:function(_7dc){
this._spellAllowAddCustom=_7dc;
},get_spellCheckJSON:function(){
return this._spellCheckJSON;
},set_spellCheckJSON:function(_7dd){
this._spellCheckJSON=_7dd;
},get_spellCheckService:function(){
if(!this._spellCheckService){
this._spellCheckService=$create(Telerik.Web.UI.SpellCheckService,this.get_spellCheckJSON(),null,null);
this._spellCheckService.add_complete(Function.createDelegate(this,this._responseReceived));
}
return this._spellCheckService;
},startSpellCheck:function(){
this.get_spellCheckService().spellCheck(this.get_html());
},addCustomWord:function(word){
this.get_spellCheckService().addCustomWord(word);
},_responseReceived:function(_7df,args){
},raiseEvent:function(_7e1,args){
if(_7e1!="selectionChange"||this.get_mode()==Telerik.Web.UI.EditModes.Design){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"raiseEvent",[_7e1,args]);
}
},_initializeToolProvider:function(){
var _7e3=this;
var _7e4=_7e3.get_toolProviderID();
if(_7e4&&$find(_7e4)){
var _7e5=$find(_7e4);
var _7e6=_7e5.get_dialogOpener();
_7e3.set_dialogOpener(_7e6);
var _7e7=_7e5.get_contextMenusJSON();
if(_7e7&&_7e7.concat){
_7e3.set_contextMenusJSON(_7e7.concat([]));
}
var _7e8=_7e5.get_modulesJSON();
if(_7e8&&_7e8.concat){
_7e3.set_modulesJSON(_7e8.concat([]));
}
var root=this.get_toolContainer();
root.innerHTML="";
this._toolJSON=[];
var html=_7e5.get_toolHTML();
root.innerHTML=html;
var json=_7e5.get_toolJSON().concat([]);
this.set_toolJSON(json);
if(_7e5.get_spellCheckJSON){
_7e3.set_spellCheckJSON(_7e5.get_spellCheckJSON());
}
if(_7e5.get_ajaxSpellCheckScriptReference){
var ref=_7e5.get_ajaxSpellCheckScriptReference();
if(ref){
_7e3.set_ajaxSpellCheckScriptReference(ref);
}
}
}
},get_toolHTML:function(){
var div=this.get_toolContainer().cloneNode(true);
return div.innerHTML;
},get_toolContainer:function(){
return this.get_TopZone().firstChild;
},get_mainTable:function(){
return $get(this.get_id()+"Wrapper");
},_ieHookToClientArea:function(){
var _7ee=this;
window.setTimeout(function(){
if($telerik.isIE){
var area=_7ee.get_contentArea();
if(!area){
return;
}
try{
var _7f0=Telerik.Web.UI.Editor.Utils.storeBrowserPosition();
var r=area.createTextRange();
var _7f2=document.body.createTextRange();
if(_7f0&&_7f0.y>0){
_7f2.moveToElementText(_7ee.get_contentAreaElement());
}else{
_7f2.moveStart("textedit",_7f2.text.length);
}
_7f2.collapse(true);
_7f2.select();
if(_7f0&&_7f0.y>0){
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition();
}
}
catch(e){
}
}
},0);
},initialize:function(){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"initialize");
this.raiseEvent("init",Sys.EventArgs.Empty);
this._initializeToolProvider();
var _7f3=this.get_mainTable();
this._originalHeight=_7f3.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
this._createTools();
this._makeResizeable(true);
var _7f4=$get(this.get_id()+"ContentHiddenTextarea");
if(_7f4){
_7f4.setAttribute("id",this.get_id());
this._contentHiddenTextarea=_7f4;
}
this._setContentAreaHtml(this.get_contentHiddenTextareaValue(),true);
this._registerClientValidation();
this._registerPostBackHandlers();
if(!this._isEditModeEnabled(Telerik.Web.UI.EditModes.Design)){
if(this._isEditModeEnabled(Telerik.Web.UI.EditModes.Html)){
this.set_mode(Telerik.Web.UI.EditModes.Html);
}else{
this.set_mode(Telerik.Web.UI.EditModes.Preview);
}
}
this._ieHookToClientArea();
this._fixIEVisibilityProblems(true);
this._fixMozillaDOMProblems(true);
if(this._modulesManager){
if(!this.isIE){
var _7f5=$get(this.get_id()+"Module");
_7f5.style.display="none";
var _7f6=this;
window.setTimeout(function(){
_7f6._modulesManager.initialize();
_7f5.style.display="";
},0);
}else{
this._modulesManager.initialize();
this._updateEditorSize(this._originalHeight);
}
}
if(this.get_autoResizeHeight()&&this.isVisible()){
this._makeAutoResizeHeight();
}
this.set_initialContent();
this._applyAccessKey();
this.raiseEvent("load",Sys.EventArgs.Empty);
if(!$telerik.isIE&&!$telerik.isFirefox){
if(!this.isVisible()){
this.raiseEvent("firstShow");
}
}
},dispose:function(){
if(typeof (Sys.WebForms)!="undefined"&&typeof (Sys.WebForms.PageRequestManager)!="undefined"&&this._saveContentDelegate){
var prm=Sys.WebForms.PageRequestManager.getInstance();
if(prm){
prm.remove_initializeRequest(this._saveContentDelegate);
}
prm=null;
}
if(this._contentHiddenTextarea&&this._contentHiddenTextarea.form&&this._saveContentDelegate){
$telerik.removeExternalHandler(this._contentHiddenTextarea.form,"submit",this._saveContentDelegate);
}
if(this._contentAreaElement){
$clearHandlers(this._contentAreaElement);
}
this._detachEvents();
this._fixMozillaDOMProblems(false);
this._fixIEVisibilityProblems(false);
this._makeResizeable(false);
this._onToolClickDelegate=null;
this._onWindowResizeDelegate=null;
this._dialogOpener=null;
this._saveContentDelegate=null;
this._registerModeChangeHandler(false);
if(this._accessKeyTextbox){
$clearHandlers(this._accessKeyTextbox);
this._accessKeyTextbox.removeAttribute("accessKey");
this._accessKeyTextbox=null;
}
Telerik.Web.UI.RadEditor.callBaseMethod(this,"dispose");
},_applyAccessKey:function(){
var _7f8=this.get_element().getAttribute("accessKey");
if(_7f8){
this.get_element().removeAttribute("accessKey");
var _7f9=document.createElement("input");
_7f9.setAttribute("name",this.get_id()+"EditorAccessKey");
_7f9.setAttribute("type","text");
_7f9.setAttribute("id",this.get_id()+"EditorAccessKey");
_7f9.setAttribute("accessKey",_7f8);
this._accessKeyTextbox=_7f9;
$addHandlers(this._accessKeyTextbox,{"focus":this.setFocus},this);
var _7fa=document.createElement("div");
_7fa.style.width="0px";
_7fa.style.height="0px";
_7fa.style.overflow="hidden";
_7fa.appendChild(this._accessKeyTextbox);
this.get_element().appendChild(_7fa);
}
},_makeAutoResizeHeight:function(){
if(this._initialContentHeight&&this._initialContentHeight>0){
return;
}
window.setTimeout(Function.createDelegate(this,function(){
this.get_contentArea().style.overflow="hidden";
this._initialContentHeight=this._contentAreaElement.offsetHeight;
var _7fb=this;
this.attachEventHandler("keydown",function(e){
if(!_7fb._isKeyUpButton(e)){
_7fb._resizeContentArea(e);
}
});
this.attachEventHandler("keyup",function(e){
if(_7fb._isKeyUpButton(e)||(e.keyCode==13&&!_7fb.isIE)){
_7fb._resizeContentArea(e);
}
});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
},_isKeyUpButton:function(e){
var _7ff=e.keyCode;
if(_7ff==8||_7ff==46){
return true;
}
return false;
},_getCurrentFontSize:function(){
var o=this.getSelectedElement();
var _801=parseInt($telerik.getCurrentStyle(o,"fontSize"));
return _801;
},_resizeContentArea:function(e){
var body=this.isIE?this._document.body:this._document.documentElement;
var _804=this._contentAreaElement;
var _805=_804.parentNode;
var _806=this._initialContentHeight;
var _807=_804.offsetHeight;
var _808=body.scrollHeight+(e&&e.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(_808==_807){
return;
}
if((_806==_807)&&(_808<=_806)){
return;
}
var _809=(_808>_806)?_808:_806;
_804.style.height=_809+"px";
if(_808>_807){
_805.style.height=parseInt(_808)+"px";
}else{
var _80a=this.get_element();
var _80b=_80a.offsetHeight-(_805.offsetHeight-_804.offsetHeight);
if(_804.style.height!="100%"){
_805.style.height="";
this._updateEditorSize(_80b);
}
return;
}
this._updateEditorSize(null,true);
},_makeResizeable:function(_80c){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_80c){
return;
}
if(!this._tableElement){
return;
}
if(!this._bottomResizer){
this._bottomResizer=$get(this.get_id()+"BottomResizer");
if(this.isIE&&this._bottomResizer){
this._bottomResizer.style.styleFloat="right";
}
}
if(!this._bottomResizer){
return;
}
var _80d={se:this._bottomResizer};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._rootElement,_80d,this._tableElement);
},_getInvisibleParent:function(){
return Telerik.Web.UI.Editor.Utils.getInvisibleParent(this.get_element());
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixIEVisibilityProblems:function(_80e){
if(!this.isIE){
return;
}
if(_80e){
var _80f=this._getInvisibleParent();
if(_80f){
this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=_80f;
$addHandler(this._invisibleParent,"propertychange",this._onIEParentVisibilityChangeDelegate);
}
}else{
if(this._invisibleParent&&this._onIEParentVisibilityChangeDelegate){
$removeHandler(this._invisibleParent,"propertychange",this._onIEParentVisibilityChangeDelegate);
this._onIEParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}
}
},_fixMozillaDOMProblems:function(_810){
if(this.isIE){
return;
}
if(_810){
var _811=this._getInvisibleParent();
if(_811){
this._invisibleParent=_811;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
_811.addEventListener("DOMAttrModified",this._onMozillaParentVisibilityChangeDelegate,false);
}
this._onMozillaParentNodeChangedDelegate=Function.createDelegate(this,this._onMozillaParentNodeChanged);
document.addEventListener("DOMNodeInserted",this._onMozillaParentNodeChangedDelegate,false);
}else{
if(this._invisibleParent&&this._onMozillaParentVisibilityChangeDelegate){
this._invisibleParent.removeEventListener("DOMAttrModified",this._onMozillaParentVisibilityChangeDelegate,false);
this._onMozillaParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}
if(this._onMozillaParentNodeChangedDelegate){
document.removeEventListener("DOMNodeInserted",this._onMozillaParentNodeChangedDelegate,false);
this._onMozillaParentNodeChangedDelegate=null;
}
}
},_onIEParentVisibilityChange:function(e){
var e=e.rawEvent;
if(!e){
return;
}
if(e.propertyName=="style.display"||e.propertyName=="className"){
var _813=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_813!="none"){
this.raiseEvent("firstShow");
if(this.get_autoResizeHeight()){
this._makeAutoResizeHeight();
}
this._updateEditorSize(this.get_element().style.height);
this._fixIEVisibilityProblems(false);
}
}
},_onMozillaParentVisibilityChange:function(e){
if(e.attrName=="style"||e.attrName=="class"){
var _815=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_815,"display")){
window.setTimeout(Function.createDelegate(this,function(){
if(!this._editorFirstVisible){
this._editorFirstVisible=true;
this.raiseEvent("firstShow");
}
if(this.get_autoResizeHeight()){
this._makeAutoResizeHeight();
}
this.set_editable(true);
}),0);
}
}
},_onMozillaParentNodeChanged:function(e){
if(!e.target||!this.get_element()){
return;
}
var _817=$telerik.isDescendantOrSelf(e.target,this.get_element());
if(_817){
this.onParentNodeChanged();
}
},onParentNodeChanged:function(){
if(!$telerik.isIE){
var _818=this.get_html(true);
var _819=this.get_contentAreaElement();
this._contentWindow=_819.contentWindow;
this._setContentAreaHtml(_818,true);
this.set_editable(true);
}
},onResizeStart:function(){
this._resizeSelection=this.getSelection().getRange();
},onResizeEnd:function(){
if(!this.isIE){
return;
}
this.setActive();
if(this._resizeSelection){
var _81a=this._resizeSelection.parentElement();
if(_81a&&(this.get_document()==_81a.ownerDocument)){
this.getSelection().selectRange(this._resizeSelection);
}
this._resizeSelection=null;
}
},_initializeLocalization:function(){
this._localization=Telerik.Web.UI.Localization.merge("RadEditor",this.get_language(),this._localization);
},getSelectedElement:function(){
return this.getSelection().getParentElement();
},getSelection:function(){
return new Telerik.Web.UI.Editor.Selection(this.get_contentWindow());
},getSelectionHtml:function(){
return this.getSelection().getHtml();
},getEditorSelectionRange:function(){
var _81b=this.getSelection().getRange();
var _81c=this.getSelectedElement();
if(_81b!=null&&_81c!=null&&_81c.ownerDocument!=this.get_document()){
_81b=null;
}
return _81b;
},selectElement:function(_81d,_81e){
if(Telerik.Web.UI.Editor.Utils.selectElement(this.get_contentWindow(),_81d)&&false!=_81e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},undo:function(_81f){
this._commandsManager.undo(_81f);
},redo:function(_820){
this._commandsManager.redo(_820);
},executeCommand:function(_821,_822,_823){
if(!_821.get_window()){
_821.set_window(this.get_contentWindow());
}
if(false!=_822&&!this.isOpera){
this.setFocus();
}
this._commandsManager.execute(_821,_823);
},executeBrowserCommand:function(_824,_825,_826,_827){
var _828=this._localization[_824];
this.executeCommand(new Telerik.Web.UI.Editor.BrowserCommand(_828,this._contentWindow,_824,_826));
this.setActive();
this.setFocus();
if(true==_827){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},createElement:function(_829,_82a,_82b,sId,_82d,_82e){
var _82f=this._document.createElement(_829);
if(_82a){
_82f.style.width=_82a;
}
if(_82b){
_82f.style.height=_82b;
}
if(null!=sId){
_82f.id=sId;
}
if(null!=_82d){
_82f.name=_82d;
}
if(null!=_82e){
_82f.value=_82e;
}
return _82f;
},createRestorePoint:function(){
return new Telerik.Web.UI.Editor.RestorePoint(this._contentWindow);
},getToolState:function(_830){
if(_830=="Undo"){
return this.get_commandsManager().isUndoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
if(_830=="Redo"){
return this.get_commandsManager().isRedoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_830];
if(oCmd&&oCmd.getState){
return oCmd.getState(this._contentWindow);
}
}
}
},getToolValue:function(_832){
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_832];
if(oCmd&&oCmd.getValue){
return oCmd.getValue(this._contentWindow);
}else{
if(_832=="RealFontSize"){
var o=this.getSelectedElement();
if(o){
var _835=null;
try{
_835=$telerik.getCurrentStyle(o,"fontSize","");
}
catch(exc){
}
if(_835){
var _836=parseFloat(_835);
if(_836>parseInt(_835)){
if(_835.indexOf("px")>-1){
_835=parseInt(_835)+"px";
}
}
}
return _835;
}
}
}
},_addFilters:function(){
var _837=this.get_filtersManager();
var _838=this.get_contentFilters();
var _839=Telerik.Web.UI.EditorFilters;
_837.clear();
var _83a=_838&_839.ConvertToXhtml;
_837.set_enableXhtmlFilter(_83a);
if(_83a){
_837.add(new Telerik.Web.UI.Editor.CleanAttributesFilter());
}
if(_838&_839.RemoveScripts){
_837.add(new Telerik.Web.UI.Editor.StripScriptsFilter());
}
if(_838&_839.EncodeScripts){
_837.add(new Telerik.Web.UI.Editor.EncodeScriptsFilter());
}
if(_838&_839.FixUlBoldItalic){
_837.add(new Telerik.Web.UI.Editor.FixUlBoldItalic());
}
_837.add(new Telerik.Web.UI.Editor.FixNestedLists());
if(_838&_839.ConvertFontToSpan){
_837.add(new Telerik.Web.UI.Editor.ConvertFontToSpanFilter());
}
if(_838&_839.OptimizeSpans){
_837.add(new Telerik.Web.UI.Editor.OptimizeSpans());
}
if(_838&_839.FixEnclosingP){
_837.add(new Telerik.Web.UI.Editor.FixEnclosingP());
}
if($telerik.isIE){
_837.add(new Telerik.Web.UI.Editor.IEKeepObjectParamsFilter());
_837.add(new Telerik.Web.UI.Editor.IEKeepCommentsFilter());
_837.add(new Telerik.Web.UI.Editor.IEFixEmptyParagraphs());
if(_838&_839.IECleanAnchors){
_837.add(new Telerik.Web.UI.Editor.IECleanAnchorsFilter());
}
}
if(!$telerik.isIE&&!$telerik.isOpera){
if(!$telerik.isSafari){
_837.add(new Telerik.Web.UI.Editor.MozillaKeepFlashString(this.get_mozillaFlashOverlayImage()));
_837.add(new Telerik.Web.UI.Editor.MozillaKeepFlash());
}
_837.add(new Telerik.Web.UI.Editor.MozillaKeepStylesString());
_837.add(new Telerik.Web.UI.Editor.MozillaKeepStylesDom());
if(_838&_839.MozEmStrong){
_837.add(new Telerik.Web.UI.Editor.MozEmStrongFilter());
}
}
_837.add(new Telerik.Web.UI.Editor.StripJunkFilter());
if(_838&_839.MakeUrlsAbsolute){
_837.add(new Telerik.Web.UI.Editor.MakeUrlsAbsolute());
}
_837.add(new Telerik.Web.UI.Editor.RemoveExtraBrakes());
if(_838&_839.IndentHTMLContent){
_837.add(new Telerik.Web.UI.Editor.IndentHTMLContentFilter());
}
},addShortCut:function(_83b,_83c){
if(this._shortCutManager){
this._shortCutManager.addShortCut(_83b,_83c);
}
},removeShortCut:function(_83d){
if(this._shortCutManager){
this._shortCutManager.removeShortCut(_83d);
}
},setShortCut:function(_83e,_83f){
if(this._shortCutManager){
this._shortCutManager.setShortCut(_83e,_83f);
}
},_addDefaultShortCuts:function(){
var _840=[["Undo","CTRL+Z"],["Redo","CTRL+Y"],["SelectAll","CTRL+A"],["Copy","CTRL+C"],["Paste","CTRL+V"],["Cut","CTRL+X"],["Bold","CTRL+B"],["Italic","CTRL+I"],["Underline","CTRL+U"],["Copy","CTRL+INS"],["Paste","SHIFT+INS"],["ToggleScreenMode","F11"],["LinkManager","CTRL+K"],["ImageManager","CTRL+G"],["SetToolFocus","F10"]];
for(var i=0;i<_840.length;i++){
this.addShortCut(_840[i][0],_840[i][1]);
}
if(this.isIE){
this.addShortCut("InsertTab","TAB");
}
if(this._newLineBr&&this.isIE){
this.addShortCut("Enter","ENTER");
this.addShortCut("ShiftEnter","SHIFT+ENTER");
this.addShortCut("InsertParagraph","CTRL+ENTER");
}else{
if(this.isFirefox&&!this._newLineBr){
this.addShortCut("EnterParagraphMozilla","ENTER");
}
}
},bubbleKeyEventToBrowser:function(){
this._shortcutHit=false;
},attachEventHandler:function(_842,_843){
if(_842.startsWith("on")){
_842=_842.replace("on","");
}
$telerik.addExternalHandler(this._document,_842,_843);
var _844=this._contentAreaEventHandlers;
if(!_844[_842]){
_844[_842]=[];
}
var _845=_844[_842];
_845[_845.length]=_843;
},detachEventHandler:function(_846,_847){
if(_846.startsWith("on")){
_846=_846.replace("on","");
}
$telerik.removeExternalHandler(this._document,_846,_847);
},_detachEvents:function(){
var _848=this._contentAreaEventHandlers;
for(var _849 in _848){
var _84a=_848[_849];
if(_84a.length!=null){
for(var i=0;i<_84a.length;i++){
var _84c=_84a[i];
if(typeof (_84c)=="function"){
try{
this.detachEventHandler(_849,_84c);
}
catch(e){
}
}
}
_84a=[];
}
}
this._contentAreaEventHandlers={};
this._attachIEBodyHandlers(false);
},get_TopZone:function(){
return $get(this.get_id()+"Top");
},_createTools:function(){
if(!this._toolAdapter){
var _84d=this.get_toolContainer();
var _84e=eval(this._toolAdapterType);
this._toolAdapter=$create(_84e,{"editor":this,"toolJSON":this.get_toolJSON()},{"toolClick":this._onToolClickDelegate},null,_84d);
if(this.isIE){
if(this.get_toolbarMode()==Telerik.Web.UI.EditorToolbarMode.Default){
_84d.style.overflow="";
}
this._updateEditorSize();
}
}
},_onToolClick:function(tool,args){
this.fire(tool.get_name(),args);
},getContextMenuByTagName:function(_851){
if(this._toolAdapter&&this._toolAdapter.getContextMenuByTagName){
return this._toolAdapter.getContextMenuByTagName(_851);
}
},getToolByName:function(_852){
if(this._toolAdapter){
return this._toolAdapter.getToolByName(_852);
}
return null;
},getLocalizedString:function(name,_854){
if(!name){
return _854;
}
var str=this.get_localization()[name];
if(null==str){
str=this.get_localization()[name.toLowerCase()];
}
return str;
},setFocus:function(){
try{
if(this.get_mode()!=Telerik.Web.UI.EditModes.Html){
this._contentWindow.focus();
}else{
var area=this._getTextArea();
area.focus();
}
}
catch(e){
}
},setActive:function(){
var _857=this.get_contentArea();
if(_857&&_857.setActive){
_857.setActive();
}
},set_visible:function(_858){
var _859=this.get_element();
if(_859){
_859.style.display=_858?"":"none";
}
this.set_editable(_858);
},enableEditing:function(_85a,_85b,_85c){
var _85d=this.get_toolAdapter();
var _85e=Telerik.Web.UI.EditingOptions;
var _85f=function(){
};
if(!_85b){
_85b=Telerik.Web.UI.EditingOptions.All;
}
this._editingOptions=_85b;
this._optionalIgnoredTools=_85c;
if(_85b&_85e.ContextMenus){
if(_85d){
_85d.enableContextMenus(_85a);
}
}
if(_85b&_85e.EditModes){
if(!_85a){
this._originalEditModeRef=this.set_mode;
this.set_mode=_85f;
}else{
if(this._originalEditModeRef){
this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}
}
}
if(_85b&_85e.Tools){
if(_85d){
if(!_85a){
_85d.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Disabled);
if(_85c){
var _860=[];
for(var item in _85c){
var tool=_85d.getToolByName(item);
if(tool){
_860[_860.length]=tool;
}
}
_85d.setToolState(_860);
}
this._originalSetToolStateRef=_85d.setToolState;
_85d.setToolState=_85f;
}else{
_85d.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}
}
}
if(_85b&_85e.Modules){
var _863=this._modulesManager;
if(_863){
_863.setModulesVisible(_85a);
}
}
if(_85b&_85e.Typing){
if(!_85a){
this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{
if(this._disableTypingDelegate){
this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}
}
}
if(_85b&_85b.Tab){
if(!_85a){
this.removeShortCut("InsertTab");
}else{
this.setShortCut("InsertTab","TAB");
}
}
if(_85a){
if(_85d){
_85d.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Off);
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},set_editable:function(_864){
if($telerik.isIE||$telerik.isOpera){
var oEd=this;
window.setTimeout(function(){
try{
oEd._document.body.setAttribute("contentEditable",""+_864);
oEd._document.execCommand("2D-Position",false,true);
}
catch(ev){
}
},0);
}else{
var oEd=this;
window.setTimeout(function(){
try{
oEd._document["designMode"]=_864?"on":"off";
if(_864){
oEd._document.execCommand("UseCSS",false,true);
oEd._document.execCommand("styleWithCSS",false,false);
}
}
catch(e){
}
},0);
}
},get_editable:function(){
if($telerik.isIE||$telerik.isOpera){
return this._document.body.contentEditable;
}else{
return (this._document["designMode"]=="on");
}
},enableContentArea:function(_866){
if(this.isIE){
this.get_document().body.setAttribute("contentEditable",""+_866);
}
},showExternalDialog:function(url,_868,_869,_86a,_86b,_86c,_86d,_86e,_86f,_870,_871,_872){
var _873=this.getEditorSelectionRange();
var _874=this;
var _875=function(_876,args){
window.setTimeout(function(){
if(_873!=null){
_874.getSelection().selectRange(_873);
}
if(_86b){
var _878=_86b(_876,args);
if(false==_878){
return;
}
_874.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_874.setFocus();
},50);
};
this.get_dialogOpener().openUrl(url,_868,_869,_86a,_875,_86c,_86d,_86e,_86f,_870,_871,_872);
},showDialog:function(_879,_87a,_87b){
var _87c=this.getEditorSelectionRange();
var _87d=this;
var _87e=function(_87f,args){
window.setTimeout(function(){
if(_87c!=null){
_87d.getSelection().selectRange(_87c);
}
if(_87b){
var oRes=_87b(_87f,args);
if(false==oRes){
return;
}
_87d.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_87d.setFocus();
},50);
};
this.get_dialogOpener().open(_879,_87a,_87e);
if(this.isIE){
var wnd=this.get_dialogOpener()._getDialogContainer(_879);
if(!wnd||wnd._DRAG_ATTACHED){
return;
}
wnd._DRAG_ATTACHED=true;
wnd.add_dragEnd(function(){
if(_87c!=null){
_87d.getSelection().selectRange(_87c);
}
});
}
},_getModeButtonsWrapper:function(){
return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(_883){
if(_883){
this._onModeButtonClickDelegate=Function.createDelegate(this,this._onModeButtonClick);
$addHandler(this._getModeButtonsWrapper(),"click",this._onModeButtonClickDelegate);
}else{
if(this._onModeButtonClickDelegate){
$removeHandler(this._getModeButtonsWrapper(),"click",this._onModeButtonClickDelegate);
this._onModeButtonClickDelegate=null;
}
}
},_onModeButtonClick:function(e){
var _885=this.get_mode();
var _886=Telerik.Web.UI.Editor.Utils.getElementParentByTag(e.target,"LI");
if(_886){
var _887=Telerik.Web.UI.EditModes;
var _888=Sys.UI.DomElement;
var a=_886.getElementsByTagName("A")[0];
if(_888.containsCssClass(a,"rade_mode_html")){
_885=_887.Html;
}else{
if(_888.containsCssClass(a,"rade_mode_design")){
_885=_887.Design;
}else{
_885=_887.Preview;
}
}
}
if(_885!=this.get_mode()){
this.set_mode(_885);
}
return $telerik.cancelRawEvent(e);
},_changeModeUI:function(mode){
var _88b=Sys.UI.DomElement;
var _88c=Telerik.Web.UI.EditModes;
var _88d="rade_mode_";
switch(mode){
case _88c.Html:
_88d+="html";
break;
case _88c.Design:
_88d+="design";
break;
case _88c.Preview:
_88d+="preview";
break;
}
var _88e=this._getModeButtonsWrapper();
var as=_88e.getElementsByTagName("A");
for(var i=0;i<as.length;i++){
var a=as[i];
_88b.removeCssClass(a,"rade_mode_selected");
if(_88b.containsCssClass(a,_88d)){
_88b.addCssClass(a,"rade_mode_selected");
}
}
},_isEditModeEnabled:function(_892){
return _892&this._editModes?true:false;
},get_mode:function(){
return this._mode;
},set_mode:function(_893){
this._setEditableDelegate=Function.createDelegate(this,function(){
this.remove_editReady(this._setEditableDelegate);
var _894=(this._mode==_895.Design);
this.set_editable(_894);
this.toggleEnhancedEdit(_894);
this._setEditableDelegate=null;
});
this.add_editReady(this._setEditableDelegate);
var _896=this._mode;
var _895=Telerik.Web.UI.EditModes;
if(_896==_895.Html||_893==_895.Html){
var html=this.get_html(true);
this._mode=_893;
this._showTextArea(this._mode==_895.Html);
this.set_html(html);
}else{
this._mode=_893;
this._showTextArea(this._mode==_895.Html);
}
this._changeModeUI(_893);
if(this._mode!=_895.Preview){
this.setFocus();
if(this.isFirefox&&(!this._document||!this._document.body)){
}else{
this.set_editable(true);
}
if(this._mode==_895.Design){
this.toggleEnhancedEdit(true);
}
}else{
this.set_editable(false);
this.toggleEnhancedEdit(false);
}
this.setFocus();
var _898=this.get_id();
var _899=this.get_mainTable();
var _89a=_899.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(_89a);
},_getTextIframe:function(){
if(!this._textIframe){
var _89b=this.get_contentAreaElement();
if(_89b){
this._textIframe=_89b.cloneNode(true);
this._textIframe.style.position="absolute";
var _89c=this._textIframe.style;
_89c.height="2px";
_89c.width="2px";
_89b.parentNode.appendChild(this._textIframe);
var doc=this._textIframe.contentWindow.document;
doc.designMode="off";
var _89e=doc.open("text/html","replace");
var _89f="<html style='height:100%;'><head><title>New Document</title></head>"+"<body style='overflow:hidden;margin:0px;padding:0px;height:100%'>"+"<textarea style='font:normal 11px Tahoma;color: #000080;border:0px;height:100%;width:100%'>"+"</textarea></body></html>";
if(typeof (_89e)=="undefined"){
_89e=doc;
}
_89e.write(_89f);
_89e.close();
}
}
return this._textIframe;
},_getTextArea:function(){
var area=this._getTextIframe();
if(area&&typeof (area.contentWindow)!="unknown"){
return area.contentWindow.document.body.firstChild;
}else{
return null;
}
},get_textArea:function(){
return this._getTextArea();
},_showTextArea:function(_8a1){
var area=this._getTextIframe();
var _8a3=this.get_contentAreaElement();
if(_8a1){
if($telerik.isSafari){
_8a3.style.width="0px";
_8a3.style.height="0px";
}else{
_8a3.style.display="none";
}
area.style.height="";
area.style.display="";
area.style.position="";
if(!$telerik.isFirefox){
window.setTimeout(function(){
area.style.height=area.parentNode.offsetHeight+"px";
},0);
}
area.style.height="100%";
area.style.width="100%";
}else{
if($telerik.isSafari){
_8a3.style.width="100%";
_8a3.style.height="100%";
}else{
_8a3.style.display="";
}
area.style.display="none";
}
},_setContentAsText:function(_8a4){
var area=this._getTextArea();
if(area){
area.value=_8a4;
}
},_getContentAsText:function(){
var area=this._getTextArea();
if(area&&area.value){
var _8a7=area.value;
return _8a7;
}
return "";
},set_html:function(_8a8,_8a9,_8aa){
var _8ab=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_8ab.Html){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(_8a9?_8a9:"Set HTML",this.get_contentWindow());
this._setContentAreaHtml(_8a8);
this.executeCommand(cmd,_8aa);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}else{
this._setContentAsText(_8a8);
}
},get_html:function(_8ad){
var _8ae=null;
var _8af="";
var mode=this.get_mode();
var _8b1=Telerik.Web.UI.EditModes;
if(mode==_8b1.Html){
return this._getContentAsText();
}else{
if(this.get_fullPage()){
if(this._document){
_8ae=this._document.getElementsByTagName("HTML")[0];
_8ae=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(_8ae);
var _8b2=this._getAllSheets(_8ae);
for(var i=0;i<_8b2.length;i++){
var _8b4=_8b2[i];
var _8b5=_8b4.getAttribute("id");
if(_8b5&&_8b5.indexOf("RADEDITORSTYLESHEET")==0){
_8b4.parentNode.removeChild(_8b4);
}
}
if($telerik.isIE||$telerik.isOpera){
_8ae.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}
}
}else{
if(this.get_contentArea()){
if(true==_8ad){
_8ae=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
}else{
_8ae=this.get_contentArea();
}
}
}
}
if(_8ae){
if(true==_8ad){
_8af=this.get_filtersManager().getHtmlContent(_8ae);
}else{
_8af=_8ae.innerHTML;
}
}
var _8b6=_8af.match(/<body[^>]*>/i);
if(_8b6&&_8b6.index==0){
_8af=_8af.trim();
_8af=_8af.substring(_8af.indexOf(">")+1,_8af.length-7);
_8af=_8af.trim();
}
if(this.get_fullPage()&&this._doctypeString){
_8af=this._doctypeString+"\n"+_8af;
}
return _8af;
},set_initialContent:function(_8b7){
if(_8b7!=null){
this._initialContent=_8b7;
}else{
this._initialContent=this.get_html(true);
}
},get_initialContent:function(){
return this._initialContent;
},get_text:function(){
var _8b8=Telerik.Web.UI.EditModes;
var _8b9="";
if(this.get_mode()!=_8b8.Html){
var _8ba=this.get_contentArea();
if(_8ba){
if(_8ba.innerText){
_8b9=_8ba.innerText;
}else{
if(_8ba.textContent!=null){
_8b9=_8ba.textContent;
}else{
_8b9=_8ba.innerHTML.replace(/<\/?[^>]*>/ig,"");
_8b9=_8b9.replace(/&nbsp;/gi,"");
}
}
}
}else{
_8b9=this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}
return _8b9;
},_getUniqueStyleSheetId:function(i){
return "RADEDITORSTYLESHEET"+i;
},_getAllSheets:function(oDoc){
if(!oDoc){
alert("RadEditor._getAllSheets called with no document object provided");
}
var _8bd=oDoc.getElementsByTagName("link");
var _8be=oDoc.getElementsByTagName("style");
var _8bf=[];
for(var x=0;_8bd[x];x++){
var rel=_8bd[x].rel?_8bd[x].rel:_8bd[x].getAttribute("rel");
if(typeof (rel)=="string"&&rel.toLowerCase().indexOf("style")+1){
Array.add(_8bf,_8bd[x]);
}
}
for(var x=0;_8be[x];x++){
Array.add(_8bf,_8be[x]);
}
return _8bf;
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _8c4=str.lastIndexOf(".");
if(_8c4==-1){
return "";
}
var _8c5=str.indexOf(" ",_8c4);
if(-1==_8c5){
_8c5=str.indexOf(":",_8c4);
}
if(-1==_8c5){
_8c5=str.length;
}
return str.substring((_8c4+1),_8c5);
},_createCssFilterObject:function(){
if(this._cssClassesHash){
return;
}
var _8c6=this.get_cssClasses();
if(_8c6&&_8c6.length>0){
var obj={};
var _8c8=_8c6.length;
for(var i=0;i<_8c8;i++){
var oKey=_8c6[i][0];
var oVal=_8c6[i][1];
obj[oKey.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})]=oVal;
}
this._cssClassesHash=obj;
}
},_getFilteredCssClasses:function(_8cd){
this._createCssFilterObject();
if(_8cd&&this._cssClassesHash){
var _8ce=[];
var _8cf=_8cd.length;
for(var _8d0=0;_8d0<_8cf;_8d0++){
var _8d1=_8cd[_8d0];
if(outAlias=this._checkCssFilter(_8d1[1].selectorText)){
_8d1[2]=outAlias;
_8ce[_8ce.length]=_8d1;
}
}
return _8ce;
}else{
return _8cd;
}
},_checkCssFilter:function(_8d2){
if(!_8d2||!this._cssClassesHash){
return null;
}
return this._cssClassesHash[_8d2.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})];
},getCssArray:function(_8d4){
var _8d5=this.get_document();
var _8d6=[];
for(var i=0;i<_8d5.styleSheets.length;i++){
var _8d8=_8d5.styleSheets[i];
try{
this._getStyleSheetRules(_8d6,_8d8,_8d4);
}
catch(e){
}
}
_8d6=this._getFilteredCssClasses(_8d6);
return _8d6;
},_getStyleSheetRules:function(_8d9,_8da,_8db){
var _8dc=_8da.href;
if(_8dc&&_8dc.indexOf("WebResource.axd?")>-1){
return;
}
if(_8dc&&_8dc.indexOf(this.get_contentAreaCssFile())>-1){
return;
}
var _8dd=(_8da.rules)?_8da.rules:_8da.cssRules;
if($telerik.isIE&&_8da.imports){
for(var k=0;k<_8da.imports.length;k++){
this._getStyleSheetRules(_8d9,_8da.imports[k],_8db);
}
}
for(var j=0;j<_8dd.length;j++){
var _8e0=_8dd[j];
if(_8e0&&_8e0.cssText){
var text=_8e0.cssText.toLowerCase();
if(text.indexOf("@import")>=0&&_8e0.parentStyleSheet&&_8e0.styleSheet&&_8e0.parentStyleSheet!=_8e0.styleSheet){
this._getStyleSheetRules(_8d9,_8e0.styleSheet,_8db);
continue;
}
}
var str=_8e0&&_8e0.selectorText?_8e0.selectorText:"";
var _8e3=str.lastIndexOf(".");
if(_8e3<0){
continue;
}
var _8e3=str.lastIndexOf(":");
if(_8e3>0){
continue;
}
var _8e4=this._getClassName(_8e0);
_8d9[_8d9.length]=[_8e4,_8e0];
}
},copyStyleSheets:function(_8e5,_8e6){
if(null==_8e5&&null==_8e6){
return;
}
var _8e7=0;
var _8e8=null;
if(_8e6.styleSheets.length==0){
if(_8e6.createStyleSheet){
_8e6.createStyleSheet();
}else{
css=_8e6.createElement("style");
css.media="all";
css.type="text/css";
var _8e9=_8e6.getElementsByTagName("head")[0];
_8e9.appendChild(css);
_8e8=css;
}
}
if(_8e6.styleSheets[0]){
_8e8=_8e6.styleSheets[0];
}
for(var i=0;i<_8e5.styleSheets.length;i++){
try{
var _8eb=_8e5.styleSheets[i];
var _8ec=_8eb.href;
var _8ed=false;
if($telerik.isFirefox){
if(_8eb.ownerNode&&_8eb.ownerNode.tagName.toLowerCase()=="style"){
_8ed=true;
}
}
if(_8ec&&!_8ed){
continue;
}
var _8ee=(_8eb.rules)?_8eb.rules:_8eb.cssRules;
for(var j=0;j<_8ee.length;j++){
var _8f0=_8ee[j];
if(_8e8.addRule){
var _8f1=_8f0.selectorText;
var oCss=_8f0.style.cssText;
if(oCss&&_8f1){
_8e8.addRule(_8f1,oCss,_8e7);
}
}else{
if(_8e8.insertRule){
_8e8.insertRule(_8f0.cssText,_8e7);
}else{
var oCss=_8f0.selectorText+"{"+_8f0.style.cssText+"}";
var _8f3=_8e6.createTextNode(oCss);
_8e8.appendChild(_8f3);
}
}
_8e7++;
}
}
catch(exc){
}
}
},_setContentAreaHtml:function(_8f4,_8f5){
var _8f6=this.get_filtersManager().getDesignContent(_8f4);
this.set_contentHiddenTextareaValue(_8f6);
var _8f7=null;
if(-1!=_8f6.toLowerCase().indexOf("<html")){
this.set_fullPage(true);
_8f7=_8f6;
var _8f8=new RegExp("(<!DOCTYPE(.|\\n)*?>)(.|\\n)*?","g");
this._doctypeString=(_8f7.match(_8f8))?_8f7.match(_8f8)[0]:"";
}else{
this.set_fullPage(false);
}
if(null!=_8f7||true==_8f5){
var _8f9=this;
var _8fa=function(){
_8fb=false;
try{
_8f9._document=_8f9._contentAreaElement.contentWindow.document;
_8f9._contentWindow=_8f9._contentAreaElement.contentWindow;
_8f9._contentArea=_8f9._document.body;
_8f9.get_filtersManager().getDesignContentDom(_8f9.get_contentArea());
var _8fc=1;
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8f9.get_contentAreaCssFile(),_8f9._document,_8f9._getUniqueStyleSheetId(0));
var _8fd=_8f9.get_cssFiles();
if(_8fd.length>0){
for(var i=0;i<_8fd.length;i++){
var _8ff=_8f9._getUniqueStyleSheetId(_8fc++);
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8fd[i],_8f9._document,_8ff);
}
}else{
if(!_8f9._fullPage){
_8f9.copyStyleSheets(document,_8f9._document);
var _900=_8f9._getAllSheets(document);
for(var i=0;i<_900.length;i++){
var _8ff=_8f9._getUniqueStyleSheetId(_8fc++);
var _901=_900[i];
if(_901.tagName=="LINK"){
var _902=_901.href;
if(_902&&_902.indexOf("WebResource.axd?")>-1){
continue;
}
if(_902){
Telerik.Web.UI.Editor.Utils.addStyleSheet(_901.getAttribute("href"),_8f9._document,_8ff);
}
}else{
if(_901.tagName=="STYLE"){
}
}
}
}
}
var _903=Telerik.Web.UI.Editor.PopupController;
if(_903){
_903.detachFromDocument(_8f9._document);
_903.attachToDocument(_8f9._document);
}
_8f9._initEvents();
if(_8f9.isVisible()){
_8f9.raiseEvent("firstShow");
}
if(_8f9.get_mode()!=Telerik.Web.UI.EditModes.Preview){
_8f9.set_editable(true);
}else{
_8f9.set_editable(false);
}
_8f9.toggleEnhancedEdit(true);
if(_8f9._document&&_8f9._document.body){
_8f9.raiseEvent("editReady",Sys.EventArgs.Empty);
}
}
catch(e){
}
};
if($telerik.isFirefox){
$addHandler(this._contentAreaElement,"load",function(){
if(_8fb){
_8fa();
}
});
}
if(!_8f7){
_8f7="<head><style></style></head><body>"+_8f6+"</body>";
}
try{
var _904=this._contentAreaElement.contentWindow.document;
_904.open();
_904.write(_8f7);
_904.close();
var _8fb=false;
if(_904.body){
_8fa();
}else{
_8fb=true;
}
}
catch(e){
}
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this._contentArea,_8f6);
this.get_filtersManager().getDesignContentDom(this.get_contentArea());
}
},_createUI:function(){
if(this._created){
return;
}
this._registerModeChangeHandler(true);
var id=this.get_id();
this._rootElement=$get(id);
this._tableElement=this.get_mainTable();
var _906=$get(id+"Center");
var _907=this.get_contentAreaElement();
_907.style.display="none";
var _908=_906.offsetHeight;
_906.appendChild(_907);
_907.style.height="100%";
_907.style.display="";
if(!$telerik.isIE&&_908<160&&_906.offsetHeight>_908+2){
_906.style.height=_908+"px";
}
this._created=true;
},_updateEditorSize:function(_909,_90a){
var _90b=this._tableElement;
var _90c=_909?_909:_90b.style.height;
if(true==_90a){
_90c=_90b.offsetHeight+"px";
}
if(parseInt(_90c)==0){
return;
}
_90c=parseInt(_90c)+"px";
_90b.style.height=_90c;
if(this.isIE){
this._fixIeHeight(_90b,_90c);
}else{
}
_90b.parentNode.style.height=_90c;
},_fixIeHeight:function(_90d,_90e){
if("CSS1Compat"==document.compatMode){
var _90f=(_90d.offsetHeight-parseInt(_90e));
if(_90f>0){
var _910=(parseInt(_90d.style.height)-_90f);
if(_910>0){
_90d.style.height=_910+"px";
}
}
}
},setSize:function(_911,_912){
var _911=parseInt(_911);
var _912=parseInt(_912);
var _913=this;
var _914=this.get_mainTable();
_914.style.height="";
var _915=_914.parentNode;
_915.style.width=_911+"px";
_915.style.height=_912+"px";
_913._fixIeHeight(_915,_912);
if(_913.isIE){
_914.style.height=_912+"px";
_913._fixIeHeight(_914,_912);
}else{
_914.style.height="100%";
}
},pasteHtml:function(_916,_917,_918,_919,_91a){
if(!this.get_editable()){
return;
}
var args=new Telerik.Web.UI.EditorCommandEventArgs(_917,null,_916);
if(false==this._executeCommandEvent("pasteHtml",_917,args)){
return;
}
if(_916!=args.get_value()){
_916=args.get_value();
}
var _91c=this.getLocalizedString(_917);
var mode=this.get_mode();
if(Telerik.Web.UI.EditModes.Design==mode){
this.setFocus();
this.executeCommand(new Telerik.Web.UI.Editor.PasteHtmlCommand(_91c,this._contentWindow,_916,_918),null,_91a);
if(_919!=false){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}else{
if(Telerik.Web.UI.EditModes.Html==mode){
var _91e=this._getTextArea();
if(this.isIE){
_91e.setActive();
var _91f=document.selection.createRange();
_91f.text=_916;
}else{
if(_91e.setSelectionRange){
var _920=_91e.selectionStart;
var _921=_91e.selectionEnd;
var _922=_91e.value.substring(_920,_921);
var _923=_916;
_91e.value=_91e.value.substring(0,_920)+_923+_91e.value.substring(_921);
_91e.setSelectionRange(_920+_923.length,_920+_923.length);
this.setFocus();
}
}
}
}
},fire:function(_924,args){
if(false==this._executeCommandEvent("commandExecuting",_924,args)){
return;
}
if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[_924]){
return;
}
this.setActive();
this._pendingTextTypeCmd=null;
var _926=Telerik.Web.UI.Editor.CommandList[_924];
var _927=false;
if(_926){
_927=(false!=_926(_924,this,args));
}else{
alert("The command "+_924+" is not implemented yet.");
}
if(_927){
if(!$telerik.isOpera){
this.setFocus();
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
this._executeCommandEvent("commandExecuted",_924,args);
},_executeCommandEvent:function(_928,_929,args){
if(!args){
args=new Telerik.Web.UI.EditorCommandEventArgs(_929);
}
this.raiseEvent(_928,args);
if(args.get_cancel&&args.get_cancel()){
return false;
}
return true;
},_onWindowResize:function(){
var _92b=this._getViewportBounds();
this.setSize(_92b.width,_92b.height,false);
},_registerWindowResizeHandler:function(_92c){
if(_92c){
this._onWindowResizeDelegate=Function.createDelegate(this,this._onWindowResize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
}else{
if(this._onWindowResizeDelegate){
$removeHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowResizeDelegate=null;
}
}
},_getViewportBounds:function(){
var _92d=$telerik.getClientBounds();
var _92e=document.documentElement.scrollLeft||document.body.scrollLeft;
var _92f=document.documentElement.scrollTop||document.body.scrollTop;
_92d.scrollLeft=_92e;
_92d.scrollTop=_92f;
return _92d;
},_handleParentsWithOverflow:function(_930){
if(false==_930){
if(!this._parentsWithOverflow){
return;
}
var _931=this._parentsWithOverflow;
var _932=_931.length;
for(var i=0;i<_932;i++){
var _934=_931[i];
if(_934[0]){
var _935=_934[0].style;
_935.overflow=_934[1];
_935.height=_934[2];
_935.tableLayout=_934[3];
_935.position=_934[4];
}
}
this._parentsWithOverflow=null;
}else{
this._parentsWithOverflow=[];
var _931=this._parentsWithOverflow;
var _936=this._getRootNode().parentNode;
while(_936&&_936.tagName!="BODY"){
var _935=_936.style;
_931[_931.length]=[_936,_935.overflow,_935.height,_935.tableLayout,_935.position];
_936.style.position="static";
_936.style.tableLayout="auto";
_936.style.overflow="visible";
_936.style.height="auto";
_936=_936.parentNode;
}
}
},_getRootNode:function(){
return this.get_mainTable().parentNode;
},isFullScreen:function(){
return this._isFullScreen;
},toggleScreenMode:function(){
var _937=this;
if(!_937._isFullScreen){
_937._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){
_937._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}
var _938=_937._getRootNode();
_937._preFullScreenBounds=$telerik.getBounds(_938);
_937._handleParentsWithOverflow(true);
_937._onWindowResize();
_937._preFullScreenBrowserRect=_937._getViewportBounds();
var _939=$telerik.getLocation(_938);
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_939.x,_939.y);
_937._isFullScreen=true;
_937._registerWindowResizeHandler(true);
}else{
_937._registerWindowResizeHandler(false);
document.body.scroll=_937._preFullScreenBodyStyle[0];
try{
document.body.style.margin=_937._preFullScreenBodyStyle[1];
}
catch(e){
}
document.documentElement.style.overflow=_937._preFullScreenBodyStyle[2];
_937._isFullScreen=false;
_937._handleParentsWithOverflow(false);
var _93a=_937._preFullScreenBounds;
_937.setSize(_93a.width,_93a.height,false);
var _939=_937._preFullScreenBrowserRect;
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_939.scrollLeft,_939.scrollTop);
}
_937.set_editable(true);
_937.setFocus();
var _93b=_937.getToolByName("ToggleScreenMode");
if(_93b){
_93b.setOn(_937._isFullScreen);
}
this.raiseEvent("toggleScreenMode",Sys.EventArgs.Empty);
},get_contentHiddenTextareaValue:function(){
if(this._contentHiddenTextarea){
return Telerik.Web.UI.Editor.Utils.decodePostbackContent(this._contentHiddenTextarea.value);
}else{
return "";
}
},set_contentHiddenTextareaValue:function(_93c){
if($telerik.isSafari&&this._contentHiddenTextarea.innerText!=null){
this._contentHiddenTextarea.innerText=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_93c);
}else{
this._contentHiddenTextarea.value=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_93c);
}
},get_localization:function(){
return this._localization;
},get_contentAreaElement:function(){
if(!this._contentAreaElement){
var elem=document.createElement("iframe");
elem.frameBorder="0";
elem.src="javascript:'<html></html>';";
elem.style.width="100%";
elem.style.margin="0px";
elem.style.padding="0px";
elem.setAttribute("id",this.get_id()+"_contentIframe");
this._contentAreaElement=elem;
}
return this._contentAreaElement;
},get_contentArea:function(){
return this._contentArea;
},get_document:function(){
return this._document;
},get_contentWindow:function(){
return this._contentWindow;
},get_toolAdapter:function(){
return this._toolAdapter;
},set_toolAdapter:function(_93e){
this._toolAdapter=_93e;
},get_fullPage:function(){
return this._fullPage;
},set_fullPage:function(_93f){
this._fullPage=_93f;
},get_dialogOpener:function(){
return this._dialogOpener;
},set_dialogOpener:function(_940){
this._dialogOpener=_940;
},get_filtersManager:function(){
return this._filtersManager;
},get_commandsManager:function(){
return this._commandsManager;
},get_modulesManager:function(){
return this._modulesManager;
},get_links:function(){
if(null==this._links){
return [];
}
return this._links;
},set_links:function(_941){
this._links=_941;
},get_language:function(){
if(null==this._language){
return "en-us";
}
return this._language.toLowerCase();
},set_language:function(_942){
this._language=_942;
},get_colors:function(){
if(null==this._colors){
return ["","#ffffff","#ffcc99","#ffff99","#ffffcc","#99ff99","#99ffff","#ccffff","#ccccff","#ffccff","#cccccc","#ff6666","#ff9966","#ffff66","#ffff33","#66ff99","#33ffff","#66ffff","#9999ff","#ff99ff","#c0c0c0","#ff0000","#ff9900","#ffcc66","#ffff00","#33ff33","#66cccc","#33ccff","#6666cc","#cc66cc","#999999","#cc0000","#FF6600","#FFCC33","#FFCC00","#33CC00","#00CCCC","#3366FF","#6633FF","#CC33CC","#666666","#990000","#cc6600","#cc9933","#999900","#009900","#339999","#3333ff","#6600cc","#993399","#333333","#660000","#993300","#996633","#666600","#006600","#336666","#000099","#333399","#663366","#000000","#330000","#663300","#663333","#333300","#003300","#003333","#000066","#330099","#330033"];
}
return this._colors;
},set_colors:function(_943){
this._colors=_943;
},get_fontNames:function(){
if(null==this._fontNames){
return ["Times New Roman","MS Sans Serif","Tahoma","Verdana","Arial","Courier New"];
}
return this._fontNames;
},set_fontNames:function(_944){
this._fontNames=_944;
},get_fontSizes:function(){
if(null==this._fontSizes){
return [1,2,3,4,5,6,7];
}
return this._fontSizes;
},set_fontSizes:function(_945){
this._fontSizes=_945;
},get_symbols:function(){
if(null==this._symbols){
return ["&#8364;","&#162;","&#163;","&#165;","&#164;","&#169;","&#174;","&#8482;","&#177;","&ne;","&#8776;","&#8804;","&#8805;","&#247;","&#215;","&#8734;","&#189;","&#188;","&#190;","&#178;","&#179;","&#8240;","&#182;","&#167;","&#945;","&#946;","&#916;","&#181;","&#937;","&#8721;","&#216;","&ang;","&#186;","&#171;","&raquo;","&#183;","&#8226;","&#8224;","&#8225;","&#402;"];
}
return this._symbols;
},set_symbols:function(_946){
this._symbols=_946;
},get_realFontSizes:function(){
if(null==this._realFontSizes){
return ["8px","9px","10px","11px","12px","13px","14px","16px","18px","20px","22px","24px","26px","28px","32px","36px","48px","72px"];
}
return this._realFontSizes;
},set_realFontSizes:function(_947){
this._realFontSizes=_947;
},get_contextMenus:function(){
if(null==this._contextMenus){
return [];
}
return this._contextMenus;
},set_contextMenus:function(_948){
this._contextMenus=_948;
},get_snippets:function(){
if(null==this._snippets){
return [];
}
return this._snippets;
},set_snippets:function(_949){
this._snippets=_949;
},get_cssClasses:function(){
if(null==this._cssClasses){
return [];
}
return this._cssClasses;
},set_cssClasses:function(_94a){
this._cssClasses=_94a;
},get_cssFiles:function(){
if(null==this._cssFiles){
return [];
}
return this._cssFiles;
},set_cssFiles:function(_94b){
this._cssFiles=_94b;
},get_languages:function(){
if(null==this._languages){
return [];
}
return this._languages;
},set_languages:function(_94c){
this._languages=_94c;
},get_paragraphs:function(){
if(null==this._paragraphs){
return [["<p>","Normal"],["<h1>","<h1>Heading 1</h1>"],["<h2>","<h2>Heading 2</h2>"],["<h3>","<h3>Heading 3</h3>"],["<h4>","<h4>Heading 4</h4>"],["<h5>","<h5>Heading 5</h5>"],["<h5>","<dir>Directory List</dir>"],["<menu>","<menu>Menu List</menu>"],["<pre>","<pre>Formatted</pre>"],["<address>","<address>Address</address>"]];
}
return this._paragraphs;
},set_paragraphs:function(_94d){
this._paragraphs=_94d;
},get_toolsWidth:function(){
return this._toolsWidth;
},set_toolsWidth:function(_94e){
this._toolsWidth=_94e;
},get_toolProviderID:function(){
return this._toolProviderID;
},set_toolProviderID:function(_94f){
this._toolProviderID=_94f;
},get_autoResizeHeight:function(){
return this._autoResizeHeight;
},set_autoResizeHeight:function(_950){
this._autoResizeHeight=_950;
},get_toolbarMode:function(){
return this._toolbarMode;
},set_toolbarMode:function(_951){
this._toolbarMode=_951;
},get_editModes:function(){
return this._editModes;
},set_editModes:function(_952){
this._editModes=_952;
},get_stripFormattingOptions:function(){
return this._stripFormattingOptions;
},set_stripFormattingOptions:function(_953){
this._stripFormattingOptions=_953;
},get_contentFilters:function(){
return this._contentFilters;
},set_contentFilters:function(_954){
this._contentFilters=_954;
},get_newLineBr:function(){
return this._newLineBr;
},set_newLineBr:function(_955){
this._newLineBr=_955;
},get_contentAreaCssFile:function(){
return this._contentAreaCssFile;
},set_contentAreaCssFile:function(_956){
this._contentAreaCssFile=_956;
},get_mozillaFlashOverlayImage:function(){
return this._mozillaFlashOverlayImage;
},set_mozillaFlashOverlayImage:function(_957){
this._mozillaFlashOverlayImage=_957;
},get_toolAdapterType:function(){
return this._toolAdapterType;
},set_toolAdapterType:function(_958){
this._toolAdapterType=_958;
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_959){
this._toolJSON=_959;
},get_modulesJSON:function(){
return this._modulesJSON;
},set_modulesJSON:function(_95a){
this._modulesJSON=_95a;
},get_contextMenusJSON:function(){
return this._contextMenusJSON;
},set_contextMenusJSON:function(_95b){
this._contextMenusJSON=_95b;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_95c){
this._uniqueID=_95c;
},get_useClassicDialogs:function(){
return this.get_dialogOpener().get_useClassicDialogs();
},set_useClassicDialogs:function(_95d){
this.get_dialogOpener().set_useClassicDialogs(_95d);
},get_skin:function(){
if(!this._skin){
return "Default";
}
return this._skin;
},set_skin:function(_95e){
this._skin=_95e;
},get_qualifiedSkin:function(){
var skin=this.get_skin();
return "radeditor."+skin;
},_registerClientValidation:function(){
if(typeof (Page_ClientValidate)=="function"){
var _960=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(_961){
var _962=this.get_element();
if(_962){
var _963=this.get_html(true);
this.set_contentHiddenTextareaValue(_963);
_962.value=_963;
_962.setAttribute("value",_963);
}
_962=null;
return _960(_961);
});
}
},saveContent:function(){
if(this._saveContentDelegate){
this.raiseEvent("submit",Sys.EventArgs.Empty);
var _964=this.get_html(true);
this.set_contentHiddenTextareaValue(_964);
}
},_registerPostBackHandlers:function(){
this._saveContentDelegate=Function.createDelegate(this,this.saveContent);
var _965=this._contentHiddenTextarea.form;
$telerik.addExternalHandler(_965,"submit",this._saveContentDelegate);
if(typeof (__doPostBack)!="undefined"){
var _966=this._saveContentDelegate;
var _967=__doPostBack;
__doPostBack=function(_968,_969){
_966();
_967(_968,_969);
};
}
if(typeof (Sys.WebForms)!="undefined"&&typeof (Sys.WebForms.PageRequestManager)!="undefined"){
var prm=Sys.WebForms.PageRequestManager.getInstance();
if(prm){
prm.add_initializeRequest(this._saveContentDelegate);
}
prm=null;
}
_965=null;
},toggleEnhancedEdit:function(_96b){
if(!this.get_document()){
return false;
}
var _96c=this.get_document().getElementById(this._getUniqueStyleSheetId(0));
if(_96c){
if(_96b==null){
_96b=_96c.disabled;
}
_96c.disabled=!_96b;
var tool=this.getToolByName("ToggleTableBorder");
if(tool){
tool.setOn(_96b);
}
return _96b;
}else{
return false;
}
},pasteHyperLink:function(_96e,_96f){
if($telerik.isIE){
var sel=this.getSelectedElement();
if(sel.tagName=="IMG"&&sel.parentNode&&sel.parentNode.tagName=="A"){
var _971=sel.parentNode;
_971.parentNode.removeChild(_971);
}
if(sel.tagName=="IMG"){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_96e,Telerik.Web.UI.Editor.Utils.getOuterHtml(sel));
}
}
if($telerik.isOpera){
var sel=this.getSelectedElement();
if(sel.tagName=="A"){
this.fire("Unlink");
}
}
if("DocumentManager"==_96f){
var _972=this.getSelection().getText();
if(""!=_972.trim()){
_96e.innerHTML=_972;
}
}
var _973=Telerik.Web.UI.Editor.Utils.getOuterHtml(_96e);
this.pasteHtml(_973,_96f);
},_saveTypedContent:function(_974,_975){
if(this._pendingTextTypeCmd){
this._pendingTextTypeCmd.update();
}
if(true!=_974){
this._pendingTextTypeCmd=null;
}
},_attachIEBodyHandlers:function(_976){
var body=null;
if(this._document&&this._document.body){
body=this._document.body;
}
if(!body){
return;
}
if(_976){
this._onResizeStartDelegate=Function.createDelegate(this,this._onResizeStart);
this._onResizeEndDelegate=Function.createDelegate(this,this._onResizeEnd);
this._onDropDelegate=Function.createDelegate(this,this._onDrop);
$telerik.addExternalHandler(body,"resizestart",this._onResizeStartDelegate);
$telerik.addExternalHandler(body,"resizeend",this._onResizeEndDelegate);
$telerik.addExternalHandler(body,"drop",this._onDropDelegate);
if($telerik.isIE){
this._onDragEndDelegate=Function.createDelegate(this,this._onDragEnd);
this._onDragStartDelegate=Function.createDelegate(this,this._onDragStart);
$telerik.addExternalHandler(body,"dragend",this._onDragEndDelegate);
$telerik.addExternalHandler(body,"dragstart",this._onDragStartDelegate);
}
this._onPasteDelegate=Function.createDelegate(this,this._onPaste);
this._onBeforePasteDelegate=Function.createDelegate(this,this._onBeforePaste);
if(!this.isIE7){
if(!$telerik.isFirefox){
$telerik.addExternalHandler(body,"paste",this._onPasteDelegate);
}else{
$telerik.addExternalHandler(body,"paste",this._onBeforePasteDelegate);
}
}else{
$telerik.addExternalHandler(body,"beforepaste",this._onBeforePasteDelegate);
}
}else{
if(this._onResizeStartDelegate){
$telerik.removeExternalHandler(body,"resizestart",this._onResizeStartDelegate);
}
if(this._onResizeEndDelegate){
$telerik.removeExternalHandler(body,"resizeend",this._onResizeEndDelegate);
}
if(this._onDropDelegate){
$telerik.removeExternalHandler(body,"drop",this._onDropDelegate);
}
if(this._onDragEndDelegate){
$telerik.removeExternalHandler(body,"dragend",this._onDragEndDelegate);
}
if(this._onDragStartDelegate){
$telerik.removeExternalHandler(body,"dragstart",this._onDragStartDelegate);
}
if(!this.isIE7){
if(!$telerik.isFirefox){
if(this._onPasteDelegate){
$telerik.removeExternalHandler(body,"paste",this._onPasteDelegate);
}
}else{
if(this._onBeforePasteDelegate){
$telerik.removeExternalHandler(body,"paste",this._onBeforePasteDelegate);
}
}
if(this._onPasteDelegate){
$telerik.removeExternalHandler(body,"paste",this._onPasteDelegate);
}
}else{
if(this._onBeforePasteDelegate){
$telerik.removeExternalHandler(body,"beforepaste",this._onBeforePasteDelegate);
}
}
this._onResizeStartDelegate=null;
this._onResizeEndDelegate=null;
this._onDropDelegate=null;
this._onDragEndDelegate=null;
this._onDragStartDelegate=null;
this._onPasteDelegate=null;
this._onBeforePasteDelegate=null;
}
},_initEvents:function(){
var _978=this;
var _979=_978.fire;
_978.fire=function(_97a,_97b){
if(_97a!="Copy"){
_978._saveTypedContent(true,"editor.fire "+_97a+" executing");
}
_979.call(_978,_97a,_97b);
try{
if(_97a=="Undo"&&!_978.isIE&&_978._document.body.innerHTML.toLowerCase().trim()=="<br>"){
_978._document.body.innerHTML="<br>";
}
}
catch(e){
}
};
if(!this.isIE){
this.attachEventHandler("keypress",function(e){
if(_978._onKeyPressed(e)){
e.preventDefault();
return false;
}
});
this.attachEventHandler("click",function(e){
if(!_978.isFirefox){
return;
}
if(!_978.get_editable()){
return;
}
if("on"==_978._document["designMode"]){
window.setTimeout(function(){
_978.set_editable(true);
_978.setFocus();
},100);
}
});
}
this.attachEventHandler("keydown",function(e){
if(_978.isOpera){
return _978._onKeyDown(e);
}else{
_978._onKeyDown(e);
}
});
this.attachEventHandler("onmousedown",function(){
_978._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var _97f=Function.createDelegate(this,function(e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",_97f);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachIEBodyHandlers(true);
},_onKeyDown:function(e){
var _982=e.keyCode;
switch(_982){
case 46:
if($telerik.isOpera){
this._document.execCommand("Delete");
this.get_contentArea().contentEditable=true;
this._document.designMode="on";
this.get_contentArea().focus();
return $telerik.cancelRawEvent(e);
}
case 8:
this._shortcutHit=false;
if(this.getSelectionHtml()){
this._saveTypedContent(false,"Saving typed content before allowing delete to proceed..");
this._pendingTextTypeCmd=new Telerik.Web.UI.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this._contentWindow);
this._hasDeleteExecuted=true;
}
if(this.isIE){
var _983=this;
var _984=function(){
var _985=_983.getSelectedElement();
if(_985&&_985.tagName=="EMBED"){
_985.setAttribute("hidden","true");
_985.setAttribute("id","FileToDelete");
window.setTimeout(function(){
var _986=_983._document.getElementById("FileToDelete");
if(_986.parentNode&&_986.parentNode.removeChild){
_986.parentNode.removeChild(_986);
}
},100);
$telerik.cancelRawEvent(e);
return true;
}
};
var _987=_984();
if(_987){
return false;
}
try{
var _988=_983._document.selection.createRange();
var _989=null;
if(_988&&_988.duplicate){
_989=_988.duplicate();
}
if(8==e.keyCode){
_988.moveStart("character",-1);
}else{
_988.moveEnd("character",1);
}
if(_988.parentElement().tagName=="EMBED"){
_988.select();
_984();
if(_989&&_989.select){
_989.select();
}
}
}
catch(ex){
}
var _98a=new Telerik.Web.UI.Editor.Selection(this._contentWindow);
if(_98a&&_98a.isControl()){
var _98b=_98a.getRange();
_98b.execCommand("Delete");
$telerik.cancelRawEvent(e);
}
}
return;
}
var _98c=e.target?e.target:e.srcElement;
if(_98c&&"INPUT"!=_98c.tagName){
var _98d=this._shortCutManager.isShortCutHit(e);
if(null!=_98d&&_98d.get_name()=="Copy"){
this._shortcutHit=false;
return;
}
this._shortcutHit=(null!=_98d);
if(this._shortcutHit){
this.fire(_98d.get_name());
}else{
if(Telerik.Web.UI.Editor.Utils.isCursorMovingKey(e.keyCode)){
if(!this._hasCursorMoved){
this._saveTypedContent(false,"Saving typed content before letting the cursor move");
}
this._hasCursorMoved=true;
return;
}
if(32==e.keyCode||13==e.keyCode||!Telerik.Web.UI.Editor.Utils.isSystemKey(e.keyCode)){
if(this._hasCursorMoved){
this._pendingTextTypeCmd=new Telerik.Web.UI.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this._contentWindow);
this.executeCommand(this._pendingTextTypeCmd);
this._hasCursorMoved=false;
return;
}
if(!this._pendingTextTypeCmd){
this._pendingTextTypeCmd=new Telerik.Web.UI.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this._contentWindow);
this.executeCommand(this._pendingTextTypeCmd);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}
}
if(this._shortcutHit){
if(this.isIE){
var name=_98d.get_name();
if(name=="Cut"||name=="Paste"){
return;
}
e.keyCode=123;
e.returnValue=!this._shortcutHit;
}
}
}
},_onKeyUp:function(e){
if(this._hasDeleteExecuted){
if(this._pendingTextTypeCmd){
this.executeCommand(this._pendingTextTypeCmd);
}
this._pendingTextTypeCmd=null;
this._hasDeleteExecuted=false;
return;
}
if(this._pendingTextTypeCmd){
return;
}
if(this._pendingCutPasteCommand){
this.executeCommand(this._pendingCutPasteCommand);
this._pendingCutPasteCommand=null;
}
if(this._shortcutHit){
return false;
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
},_onKeyPressed:function(e){
if(this._pendingTextTypeCmd){
}else{
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
if(this._shortcutHit&&!this._pendingCutPasteCommand){
return true;
}
},_insertPastedContent:function(_991,_992,_993,_994){
var _995=this;
var _996=(this.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _997=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_992,_995.get_stripFormattingOptions(),_995.get_localization()["askwordcleaning"],_996);
if(_991){
_991.select();
}
if(_997){
window.setTimeout(function(){
if(_994&&_991){
_991.select();
}
_995.pasteHtml(_997);
},5);
return $telerik.cancelRawEvent(_993);
}
return true;
},_onPaste:function(_998){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _999=this.createRestorePoint();
var _99a=this.getSelectionHtml()?true:false;
var _99b=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
return this._insertPastedContent(_999,_99b,_998,_99a);
},_onBeforePaste:function(_99c){
if(_99c){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _99d=new Telerik.Web.UI.Editor.GenericCommand("Paste",this._contentWindow);
var _99e=this.getSelection().getRange();
var _99f=Telerik.Web.UI.Editor.Utils.getUniqueID();
if(_99e.pasteHTML){
_99e.pasteHTML("&nbsp;<font id='"+_99f+"'>&nbsp;</font>");
}else{
this.pasteHtml("<font id='"+_99f+"'>&nbsp;</font>");
}
var _9a0=Telerik.Web.UI.Editor.Utils.getPasteContainer();
_9a0.innerHTML="";
if(_9a0.setActive){
_9a0.setActive();
}else{
var _9a1=this.getSelection();
var _9a2=_9a1.getRange();
if(_9a2.selectNodeContents){
_9a2.selectNodeContents(_9a0);
}
_9a1.selectRange(_9a2);
}
var _9a3=this;
window.setTimeout(function(){
var _9a4=_9a0.innerHTML;
var _9a5=(_9a3.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _9a6=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_9a4,_9a3.get_stripFormattingOptions(),_9a3.get_localization()["askwordcleaning"],_9a5);
var _9a7=_9a3._document.getElementById(_99f);
_9a3.setActive(true);
_9a3._pendingCutPasteCommand=null;
if(_9a3._document.body.createTextRange){
var _9a8=_9a3._document.body.createTextRange();
_9a8.moveToElementText(_9a7);
_9a8.moveStart("character",-1);
_9a8.select();
_9a8.pasteHTML(_9a6);
}else{
_9a3.selectElement(_9a7);
_9a3.pasteHtml(_9a6);
}
_9a3.executeCommand(_99d);
_9a3.setActive(true);
_9a3.setFocus(true);
},0);
}
},_onResizeStart:function(e){
var _9aa=this.getSelectedElement();
if(_9aa==e.srcElement){
var _9ab=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new Telerik.Web.UI.Editor.GenericCommand(_9ab,this._contentWindow);
}
},_onResizeEnd:function(e){
if(this._pendingResizeCmd){
this.executeCommand(this._pendingResizeCmd);
}
},_onDragStart:function(e){
var _9ae=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new Telerik.Web.UI.Editor.GenericCommand(_9ae,this.get_contentArea());
this._startRange=null;
if(!e.ctrlKey&&!e.ctrlLeft){
this._startRange=this._contentWindow.document.selection.createRange();
if(this._startRange.length){
var rng=this._contentWindow.document.body.createTextRange();
var _9b0=this._startRange.item(0);
if("IMG"==_9b0.tagName&&"A"==_9b0.parentNode.tagName&&_9b0.parentNode.childNodes.length==1){
_9b0=_9b0.parentNode;
}
rng.moveToElementText(_9b0);
this._startRange=rng;
}
}
},_onDragEnd:function(e){
if(this._pendingMoveCommand){
if(this._startRange){
var _9b2=this._contentWindow.document.selection.createRange();
if(_9b2.length){
var rng=this._contentWindow.document.body.createTextRange();
rng.moveToElementText(_9b2.item(0));
_9b2=rng;
}
try{
if(_9b2.compareEndPoints&&0!=_9b2.compareEndPoints("StartToStart",this._startRange)&&0!=_9b2.compareEndPoints("EndToEnd",this._startRange)){
this._startRange.execCommand("Delete",false,null);
}
}
catch(e){
}
}
this.executeCommand(this._pendingMoveCommand);
this._pendingMoveCommand=null;
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},_onDrop:function(e){
this._saveTypedContent(false,"on drop operation executing");
var _9b5=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new Telerik.Web.UI.Editor.GenericCommand(_9b5,this._contentWindow);
},_onDocumentDragEnd:function(e){
if(!this._pendingDockCommand){
return;
}
this.executeCommand(this._pendingDockCommand);
this._pendingDockCommand=null;
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
},add_toggleScreenMode:function(_9b7){
this.get_events().addHandler("toggleScreenMode",_9b7);
},remove_toggleScreenMode:function(_9b8){
this.get_events().removeHandler("toggleScreenMode",_9b8);
},add_modeChange:function(_9b9){
this.get_events().addHandler("modeChange",_9b9);
},remove_modeChange:function(_9ba){
this.get_events().removeHandler("modeChange",_9ba);
},add_load:function(_9bb){
this.get_events().addHandler("load",_9bb);
},remove_load:function(_9bc){
this.get_events().removeHandler("load",_9bc);
},add_init:function(_9bd){
this.get_events().addHandler("init",_9bd);
},remove_init:function(_9be){
this.get_events().removeHandler("init",_9be);
},add_selectionChange:function(_9bf){
this.get_events().addHandler("selectionChange",_9bf);
},remove_selectionChange:function(_9c0){
this.get_events().removeHandler("selectionChange",_9c0);
},add_commandExecuting:function(_9c1){
this.get_events().addHandler("commandExecuting",_9c1);
},remove_commandExecuting:function(_9c2){
this.get_events().removeHandler("commandExecuting",_9c2);
},add_commandExecuted:function(_9c3){
this.get_events().addHandler("commandExecuted",_9c3);
},remove_commandExecuted:function(_9c4){
this.get_events().removeHandler("commandExecuted",_9c4);
},add_submit:function(_9c5){
this.get_events().addHandler("submit",_9c5);
},remove_submit:function(_9c6){
this.get_events().removeHandler("submit",_9c6);
},add_editReady:function(_9c7){
this.get_events().addHandler("editReady",_9c7);
},remove_editReady:function(_9c8){
this.get_events().removeHandler("editReady",_9c8);
},add_pasteHtml:function(_9c9){
this.get_events().addHandler("pasteHtml",_9c9);
},remove_pasteHtml:function(_9ca){
this.get_events().removeHandler("pasteHtml",_9ca);
},add_firstShow:function(_9cb){
this.get_events().addHandler("firstShow",_9cb);
},remove_firstShow:function(_9cc){
this.get_events().removeHandler("firstShow",_9cc);
}};
Telerik.Web.UI.RadEditor.registerClass("Telerik.Web.UI.RadEditor",Telerik.Web.UI.RadWebControl);

