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){
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{
_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();
_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);
}
},_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);
},set_color:function(_2d4){
if(!_2d4){
_2d4="";
}
var _2d5=this.getSpanElement();
_2d5.style.borderBottom="0px";
_2d5.style.height="";
if(_2d4){
var _2d6=_2d5.offsetHeight;
if(_2d6){
_2d5.style.height=(_2d6-3)+"px";
}
_2d5.style.borderBottom="3px solid "+_2d4;
}
this._color=_2d4;
},get_color:function(){
return this._color;
},onPopupMouseOver:function(e){
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"onPopupMouseOver",[e]);
var _2d8=this.get_activeIndex();
var _2d9=this._items[_2d8];
if(null==_2d9){
return;
}
if(this._infoSpan1){
this._infoSpan1.innerHTML=_2d9;
this._infoSpan1.style.backgroundColor=_2d9;
}
if(this._infoSpan2){
this._infoSpan2.innerHTML=_2d9;
this._infoSpan2.style.color=_2d9;
}
},renderFooter:function(){
var oDiv=document.createElement("div");
oDiv.className="rade_ColorPickerFooter";
var _2db=document.createElement("span");
_2db.className="rade_DarkColor";
var _2dc=document.createElement("span");
_2dc.className="rade_LightColor";
_2db.innerHTML=_2dc.innerHTML="&nbsp";
oDiv.appendChild(_2db);
oDiv.appendChild(_2dc);
this.get_popupElement().appendChild(oDiv);
this._infoSpan1=_2db;
this._infoSpan2=_2dc;
},renderChild:function(_2dd,_2de,_2df){
var oDiv=document.createElement("div");
if(null!=_2de){
oDiv.style.backgroundColor=_2de;
oDiv.setAttribute("title",_2de);
oDiv.innerHTML="&nbsp;";
}
_2dd.appendChild(oDiv);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_2e1){
this._clientStateFieldID=_2e1;
}};
Telerik.Web.UI.Editor.ColorPicker.registerClass("Telerik.Web.UI.Editor.ColorPicker",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.UndoRedoDropDown=function(_2e2){
Telerik.Web.UI.Editor.UndoRedoDropDown.initializeBase(this,[_2e2]);
};
Telerik.Web.UI.Editor.UndoRedoDropDown.prototype={renderFooter:function(){
},get_selectedItem:function(){
var _2e3=Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"get_selectedItem");
if(!_2e3){
_2e3=1;
}
return _2e3;
},selectUIItem:function(e,_2e5){
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(_2e6){
Telerik.Web.UI.Editor.ApplyClassDropDown.initializeBase(this,[_2e6]);
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 _2e8="";
if(!tag){
_2e8=this._cssClasses["notag"];
}else{
tag=tag.toLowerCase();
var res=this._cssClasses[tag];
_2e8=res?res:this._cssClasses["unknown"];
}
var _2ea=document.createElement("span");
_2ea.innerHTML="&nbsp;"+tag;
_2ea.className=_2e8;
return _2ea;
},_getClassTag:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2ed=str.lastIndexOf(".");
if(_2ed==0){
return "ALL";
}
var _2ee=str.lastIndexOf(" ",_2ed);
return str.substring((_2ee+1),_2ed);
},_getClassCss:function(_2ef){
var re=this._cssClassRegex;
var oCss="";
if(null!=_2ef.cssText){
oCss=_2ef.cssText;
oCss=oCss.replace(re,"$1");
}else{
oCss=_2ef.style.cssText;
}
return oCss;
},_getDisplayName:function(rule){
if(!rule||!rule.selectorText){
return "";
}
var _2f3=rule.selectorText;
var _2f4=_2f3.indexOf(".");
if(-1==_2f4){
_2f4=0;
}else{
_2f4+=1;
}
var _2f5=_2f3.indexOf(":");
if(-1==_2f5){
_2f5=_2f3.length;
}
return _2f3.substring(_2f4,_2f5);
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2f8=str.lastIndexOf(".");
if(_2f8==-1){
return "";
}
var _2f9=str.indexOf(" ",_2f8);
if(-1==_2f9){
_2f9=str.indexOf(":",_2f8);
}
if(-1==_2f9){
_2f9=str.length;
}
return str.substring((_2f8+1),_2f9);
},_getChild:function(_2fa,_2fb,_2fc){
var elem=document.createElement("DIV");
if(_2fb.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=_2fa;
}
elem.setAttribute("style",_2fa);
elem.innerHTML=_2fc;
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(_2fe){
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"set_items",[_2fe]);
this._items.splice(0,0,["",{cssText:"",selectorText:this.get_clearclasstext()}]);
},renderChild:function(cell,_300,_301){
var _302=_300[1];
var oTag=this._getClassTag(_302);
var oCss=this._getClassCss(_302);
var _305=_300[2]?_300[2]:this._getDisplayName(_302);
cell.setAttribute("title",_302.selectorText);
var _306=this._getClassIcon(oTag);
cell.appendChild(_306);
var div=this._getChild(oCss,oTag,_305);
cell.appendChild(div);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_308){
this._clientStateFieldID=_308;
},get_clearclasstext:function(){
return this._clearclasstext;
},set_clearclasstext:function(_309){
this._clearclasstext=_309;
}};
Telerik.Web.UI.Editor.ApplyClassDropDown.registerClass("Telerik.Web.UI.Editor.ApplyClassDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontNameDropDown=function(_30a){
Telerik.Web.UI.Editor.FontNameDropDown.initializeBase(this,[_30a]);
};
Telerik.Web.UI.Editor.FontNameDropDown.prototype={updateValue:function(oVal){
try{
if(!oVal){
oVal=this.get_text();
}
if(null==oVal||"AZBY"==oVal){
return;
}
var _30c=this.getSpanElement();
if(_30c){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_30c.innerHTML=this._value;
}
}
catch(e){
}
},renderChildren:function(){
var _30d=this._items;
if(_30d&&_30d[0]&&!(_30d[0] instanceof Array)){
for(var i=0;i<_30d.length;i++){
var item=_30d[i];
_30d[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(_310){
Telerik.Web.UI.Editor.FontSizeDropDown.initializeBase(this,[_310]);
};
Telerik.Web.UI.Editor.FontSizeDropDown.prototype={renderChildren:function(){
var _311=this._items;
if(_311&&_311[0]&&!(_311[0] instanceof Array)){
for(var i=0;i<_311.length;i++){
var item=_311[i];
_311[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(_314){
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.initializeBase(this,[_314]);
};
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 _318=this.FlatLinksArray[this.get_selectedIndex()];
return {innerHTML:_318.name,href:_318.href,target:_318.target,title:_318.toolTip};
},_parseSubtree:function(_319,t){
var _31b=this._linkCounter;
this.FlatLinksArray[_31b]=_319;
var li=document.createElement("LI");
t.appendChild(li);
var _31d=_319.childLinks&&_319.childLinks.length;
var span=document.createElement("SPAN");
span.innerHTML="&nbsp;";
span.className=_31d?"rade_CustomLinksIcon rade_icon_plus":"rade_CustomLinksIcon rade_icon_empty";
if(_31d){
function onclick(e){
var _320=Sys.UI.DomElement.containsCssClass(this,"rade_icon_plus");
var ul=this.parentNode.getElementsByTagName("UL")[0];
if(ul){
ul.style.display=_320?"":"none";
var _322=_320?"rade_icon_plus":"rade_icon_minus";
var _323=_320?"rade_icon_minus":"rade_icon_plus";
Sys.UI.DomElement.removeCssClass(this,_322);
Sys.UI.DomElement.addCssClass(this,_323);
}
return false;
}
$addHandler(span,"click",onclick);
}
li.appendChild(span);
var _324=null;
if(_319.href){
_324=document.createElement("A");
_324.href="#";
_324.innerHTML=_319.name;
li.appendChild(_324);
this.markItemContainer(_324,this._linkCounter);
}else{
_324=document.createElement("SPAN");
_324.innerHTML=_319.name;
li.appendChild(_324);
}
this._linkCounter++;
if(_31d){
var ul=document.createElement("UL");
li.appendChild(ul);
var _326=_319.childLinks;
for(var i=0;i<_319.childLinks.length;i++){
var _328=_326[i];
this._parseSubtree(_328,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(_329,_32a){
var _32b=window.frames;
for(var i=0;i<_32b.length;i++){
var _32d=null;
try{
_32d=_32b[i].window.document;
}
catch(e){
}
if(!_32d){
continue;
}
try{
if(false!=_329){
_32a.attachToDocument(_32d);
}else{
_32a.detachFromDocument(_32d);
}
}
catch(e){
}
}
}
var _32e=Function.createDelegate(null,function(e){
if(e.keyCode==27){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
});
$addHandler(document.body,"keydown",_32e);
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",_32e);
});
},attachToDocument:function(_330){
$telerik.addExternalHandler(_330,"mousedown",this._hideHandler);
},detachFromDocument:function(_331){
$telerik.removeExternalHandler(_331,"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 _334=this._activePopup.get_popupElement();
if(!this._isMouseOverElement(e,_334)){
this.hideActivePopup();
}
}
},_isMouseOverElement:function(e,_336){
var rect=null;
try{
rect=$telerik.getBounds(_336);
}
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(_33b){
if(this._activePopup==_33b){
this._activePopup=null;
}
},set_activePopup:function(_33c){
if(this._activePopup&&(_33c!=this._activePopup)){
this._activePopup.hide();
}
this._activePopup=_33c;
},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(_33d){
Telerik.Web.UI.Editor.DefaultToolAdapter.initializeBase(this,[_33d]);
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 _33e=Telerik.Web.UI.EditorToolbarMode;
var _33f=this.get_editor();
switch(_33f.get_toolbarMode()){
case _33e.Default:
_33f.add_firstShow(Function.createDelegate(this,function(){
this._hookToolbarJson2Html();
var _340=this.get_editor();
var _341=_340.get_element().style.height;
_340._updateEditorSize(_341);
}));
break;
case _33e.Floating:
this._createFloatingButton();
break;
case _33e.PageTop:
case _33e.ShowOnFocus:
this._hookToolbarModeEventHandlers();
break;
}
},_hookToolbarJson2Html:function(){
if(this._initializedToolbars){
return;
}
this._initializedToolbars=true;
var _342=this.get_toolJSON();
var _343=this._getToolBarElements();
var _344=[];
for(var i=0;i<_342.length;i++){
var json=_342[i];
var _347=_343[i];
this._initializeToolbar(json,_347);
var _348=json["attributes"];
var zone=_348?_348["dockingzone"]:null;
if(zone){
_344[_344.length]=[zone,_347];
}
}
if($telerik.isIE){
var elem=this.get_element();
elem.style.height="";
}
var _34b=this.get_editor();
var _34c=_34b.get_id();
for(var i=0;i<_344.length;i++){
var _34d=_344[i][0];
var zone=_34d.charAt(0).toUpperCase()+_34d.substring(1);
var _34e=$get(_34c+zone);
if(!_34e){
_34e=$get(_34d);
}
if(_34e){
if(_34e.innerHTML=="&nbsp;"){
_34e.innerHTML="";
}
_34e.appendChild(_344[i][1]);
}
}
},_initNonDefaultToolbarMode:function(){
var _34f=this.get_editor();
var _350=Telerik.Web.UI.EditorToolbarMode;
var _351=_34f.get_toolbarMode();
if(_351==_350.ShowOnFocus){
var wnd=this._toolbarHolder;
var _353=Telerik.Web.UI.WindowBehaviors;
wnd.set_behaviors(_353.Resize);
wnd.set_visibleTitlebar(false);
}else{
if(_351==_350.PageTop){
var wnd=this._toolbarHolder;
wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
wnd.set_visibleTitlebar(false);
}
}
var _354=this.get_element();
_354.style.visibility="visible";
},_showToolbarHolder:function(_355){
if(!_355){
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 _356=Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper;
if(_356==this&&_356._toolbarHolder&&_356._toolbarHolder.isVisible()){
_356.get_toolbarHolder().setActive(true);
return;
}
if(_356&&_356._showToolbarHolder){
_356._showToolbarHolder(false);
}
Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=this;
this.get_window();
this._initNonDefaultToolbarMode();
this._toolbarHolder.show();
},_positionWindow:function(){
var _357=Telerik.Web.UI.EditorToolbarMode;
var _358=this.get_editor();
var _359=_358.get_toolbarMode();
if(_359==_357.ShowOnFocus){
this._positionToolbarAboveEditor();
}else{
if(_359==_357.PageTop){
this._positionOnPageTop();
}else{
if(_359==_357.Floating){
if(!this._wasShown){
this._positionToolbarAboveEditor();
this._wasShown=true;
}
}
}
}
},get_window:function(){
if(!this._toolbarHolder){
var _35a=this.get_editor();
var _35b=_35a.get_dialogOpener();
if(!_35b){
return;
}
var wnd=_35b.get_container().clone(_35a.get_id()+"_toolbarMode");
wnd.set_visibleStatusbar(false);
var _35d=this.get_element();
var _35e=_35d.offsetWidth;
wnd.setSize(_35e+10,"");
wnd.add_show(Function.createDelegate(this,function(_35f,args){
var _361=_35f.get_contentElement();
if(!_361){
return;
}
var _362=_35f.get_popupElement();
_362.style.zIndex="10000";
this._hookToolbarJson2Html();
_361.style.overflow="";
_361.style.height="";
var _363=_361.offsetWidth;
_361.style.width=_363+"px";
var _364=_35a.get_toolsWidth();
if(!_364){
var _365=_35f.getWindowBounds();
_364=_365.width;
}
_35f.setSize(_364,null);
_361.style.width="100%";
this._positionWindow();
}));
this._toolbarHolder=wnd;
this._moveToolbarsToEditor(false);
}
return this._toolbarHolder;
},_moveToolbarsToEditor:function(_366){
var _367=this.get_element();
if(!_366){
if(!this._fakeToolbarParentCreated){
var div=_367.ownerDocument.createElement("DIV");
div.control=_367.control;
_367.parentNode.appendChild(div);
this._fakeToolbarParentCreated=true;
_367.control=null;
var _369=div.style;
_369.height=_369.fontSize=_369.lineHeight="1px";
_369.border="1px solid red";
_369.visibility="hidden";
if(!$telerik.isIE){
_369.display="none";
}
}
var wnd=this.get_toolbarHolder();
wnd.set_contentElement(_367);
_367.style.width="100%";
}else{
_367.style.width="";
var _36b=this.get_editor().get_TopZone();
_36b.appendChild(_367);
}
},_positionToolbarAboveEditor:function(){
var wnd=this._toolbarHolder;
var _36d=this.get_editor();
var _36e=$telerik.getBounds(_36d.get_element());
var x=_36e.x;
var _370=$telerik.getBounds(wnd.get_popupElement()).height;
var y=_36e.y-_370;
wnd.moveTo(x,y);
},_positionOnPageTop:function(){
var wnd=this._toolbarHolder;
var _373=wnd._getViewportBounds();
var x=_373.scrollLeft;
var y=_373.scrollTop;
wnd.moveTo(x,y);
wnd.set_width("");
if(!wnd.isPinned()){
wnd.togglePin();
}
},_createFloatingButton:function(){
this._onToggleFloatingToolbarDelegate=Function.createDelegate(this,this._onToggleFloatingToolbar);
var _376=this.get_editor();
var skin=_376.get_skin();
var _378={name:"ToggleFloatingToolbar",addClickHandler:true,skin:skin};
var _379={"valueSelected":this._onToggleFloatingToolbarDelegate};
var _37a=Telerik.Web.UI.EditorButton.createTool(_378,_379);
var _37b=Telerik.Web.UI.EditorButton.createToolWrapper(_37a,skin);
var _37c=$get(_376.get_id()+"Top");
if(_37c){
_37c.appendChild(_37b);
}
},_onToggleFloatingToolbar:function(){
var _37d=!this._toolbarHolder||!this._toolbarHolder.isVisible();
this._showToolbarHolder(_37d);
},_hookToolbarModeEventHandlers:function(){
var _37e=this;
var _37f=function(){
_37e._showToolbarHolder(true);
};
var _380=this.get_editor();
if(_380.isIE){
this.get_editor().add_editReady(function(){
_380.attachEventHandler("beforeeditfocus",_37f);
});
}else{
_380.add_selectionChange(_37f);
}
_380.add_modeChange(function(){
_37e._showToolbarHolder(_37e.get_editor().get_mode()==Telerik.Web.UI.EditModes.Design);
});
_380.add_submit(function(){
_37e._showToolbarHolder(false);
});
_380.add_toggleScreenMode(function(){
var _381=_37e.get_editor().isFullScreen();
_37e._moveToolbarsToEditor(_381);
var wnd=_37e.get_toolbarHolder();
if(_381){
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 _384=this.get_editor();
if(_384.get_mode()!=Telerik.Web.UI.EditModes.Design){
return;
}
this.createContextMenus();
var _385=e.srcElement?e.srcElement:e.target;
var _386=_385.tagName;
var _387=this._contextMenus[_386];
if("TH"==_386&&!_387){
_387=this._contextMenus["TD"];
}
var _388="";
if(!_387){
var _389=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_385,"A");
if(!_389){
_389=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_385,"TD");
}
if(!_389){
_389=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_385,"TABLE");
}
if(_389){
_388=_389.tagName;
_385=_389;
}else{
_388="*";
}
_387=this._contextMenus[_388];
}
if(_387&&_386=="IMG"&&_385&&"true"==_385.getAttribute("isflash")){
_387=null;
}
if(!this.isIE&&_388=="*"){
return;
}
if(_387){
_387.set_eventObject(e);
_387.show();
}
return $telerik.cancelRawEvent(e);
},enableContextMenus:function(_38a){
this._contextMenusEnabled=_38a;
},_initContextMenus:function(){
var _38b=Function.createDelegate(this,this.onContextMenu);
var _38c=this.get_editor();
_38c.add_editReady(function(){
_38c.attachEventHandler("contextmenu",_38b);
});
},createContextMenus:function(){
if(this._contextMenus){
return;
}
this._contextMenus={};
var _38d=this.get_editor();
var skin=_38d.get_skin();
var _38f=_38d.get_contextMenusJSON();
var _390={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
for(var i=0;i<_38f.length;i++){
var args=_38f[i];
args["sizetofit"]=true;
args["parentElement"]=_38d.get_contentAreaElement();
args["skin"]=skin;
var tool=$create(Telerik.Web.UI.EditorContextMenu,args,_390,null,document.createElement("SPAN"));
this._contextMenus[args.tagName]=tool;
}
},dispose:function(){
var _394=this._getToolBarElements();
for(var i=0;i<_394.length;i++){
$clearHandlers(_394[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(_398){
this.createContextMenus();
return this._contextMenus[_398];
},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(_39c,_39d){
if(!_39c){
_39c=this._tools;
}
var _39e=this.get_editor();
for(var i=0;i<_39c.length;i++){
var _3a0=_39c[i];
var _3a1=_3a0.get_name();
if(_3a0.setState){
var _3a2=_39d;
if(null==_3a2){
_3a2=_39e.getToolState(_3a1);
}
if(null!=_3a2){
_3a0.setState(_3a2);
}
}
if(_3a0.updateValue){
_3a0.updateValue(_39e.getToolValue(_3a1));
}
}
},_convertCommandsArray:function(_3a3){
var _3a4=[];
for(var i=0;i<_3a3.length;i++){
var _3a6=_3a3[i];
var _3a7=(i+1)+". "+_3a6.get_title();
if(_3a6.get_argument){
var arg=_3a6.get_argument();
if(arg){
_3a7+=" [\""+arg+"\"]";
}
}
_3a4[i]=[i+1,_3a7];
}
return _3a4;
},_onDropDownHide:function(_3a9,args){
var _3ab=this.get_editor();
_3ab.enableContentArea(true);
},_onDropDownBeforeShow:function(_3ac,args){
var _3ae=this.get_editor();
if(Telerik.Web.UI.EditorToolStrip.isInstanceOfType(_3ac)){
this.setToolState(_3ac.get_items());
}
if(!_3ae.getSelection().isControl()&&!Telerik.Web.UI.EditorContextMenu.isInstanceOfType(_3ac)){
_3ae.enableContentArea(false);
}
var _3af=_3ac.get_name();
if(_3af=="Undo"){
var _3b0=_3ae.get_commandsManager().getCommandsToUndo();
_3b0=this._convertCommandsArray(_3b0);
_3ac.set_items(_3b0);
}else{
if(_3af=="Redo"){
var _3b1=_3ae.get_commandsManager().getCommandsToRedo();
_3b1=this._convertCommandsArray(_3b1);
_3ac.set_items(_3b1);
}else{
if(_3af=="ModuleManager"){
var _3b2=_3ae.get_modulesManager();
if(!_3b2){
return;
}
var _3b3=_3b2.get_modules();
var _3b4=[];
for(var i=0;i<_3b3.length;i++){
var _3b6=_3b3[i];
var name=_3b6.get_name();
var _3b8=_3b6.get_title();
if(!_3b8){
_3b8=name;
}
cssClass=_3b6.get_visible()?"rade_module_visible_icon":"rade_module_hidden_icon";
_3b4[i]=[name,_3b8,cssClass];
}
_3ac.set_updateHeader(false);
_3ac.set_items(_3b4);
}
}
}
var _3b9=_3ac.get_items();
if(_3b9&&_3b9.length>0){
return;
}
var _3ba=null;
switch(_3af){
case "ApplyClass":
_3ba=_3ae.getCssArray();
break;
case "FontName":
_3ba=_3ae.get_fontNames();
break;
case "FontSize":
_3ba=_3ae.get_fontSizes();
break;
case "InsertSymbol":
_3ba=_3ae.get_symbols();
break;
case "BackColor":
case "ForeColor":
_3ba=_3ae.get_colors();
break;
case "RealFontSize":
_3ba=_3ae.get_realFontSizes();
break;
case "InsertSnippet":
_3ba=_3ae.get_snippets();
break;
case "Zoom":
_3ba=["10%","20%","50%","100%","150%","200%","300%","500%"];
break;
case "FormatBlock":
_3ba=_3ae.get_paragraphs();
break;
case "InsertCustomLink":
_3ba=_3ae.get_links();
break;
case "AjaxSpellCheck":
case "SpellCheck":
_3ba=_3ae.get_languages();
break;
}
if(_3ba){
_3ac.set_items(_3ba);
}
},_initializeToolbar:function(_3bb,_3bc){
var _3bd=_3bc.getElementsByTagName("li");
var _3be=_3bb.tools;
var _3bf=this.get_editor();
var skin=_3bf.get_skin();
var _3c1=0;
if(_3be){
var _3c2=0;
for(var i=0;i<_3be.length;i++){
var _3c4=_3bd[i+1];
_3c2+=_3c4.offsetWidth;
var _3c5=Telerik.Web.UI.EditorButton;
var _3c6=_3be[i].type;
var _3c7=_3be[i].name;
var _3c8=Telerik.Web.UI.EditorToolType;
var args=_3be[i];
var tool=null;
var _3cb=false;
if(_3c6){
switch(_3c6){
case _3c8.Button:
break;
case _3c8.Separator:
if(!_3c1){
_3c1+=parseInt($telerik.getCurrentStyle(_3c4,"marginLeft"));
_3c1+=parseInt($telerik.getCurrentStyle(_3c4,"marginRight"));
}
_3c2+=_3c1;
_3c5=null;
break;
case _3c8.DropDown:
_3c5=Telerik.Web.UI.EditorDropDown;
_3cb=true;
if(_3c7=="FontName"){
_3c5=Telerik.Web.UI.Editor.FontNameDropDown;
}else{
if(_3c7=="FontSize"){
_3c5=Telerik.Web.UI.Editor.FontSizeDropDown;
}else{
if(_3c7=="FormatBlock"){
_3c5=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c7=="RealFontSize"){
_3c5=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c7=="Zoom"){
_3c5=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c7=="InsertCustomLink"){
_3c5=Telerik.Web.UI.Editor.InsertCustomLinkDropDown;
}else{
if(_3c7=="ApplyClass"){
_3c5=Telerik.Web.UI.Editor.ApplyClassDropDown;
}
}
}
}
}
}
}
break;
case _3c8.SplitButton:
_3c5=Telerik.Web.UI.EditorSplitButton;
if(_3c7=="ForeColor"||_3c7=="BackColor"){
_3c5=Telerik.Web.UI.Editor.ColorPicker;
}else{
if(_3c7=="Undo"||_3c7=="Redo"){
_3c5=Telerik.Web.UI.Editor.UndoRedoDropDown;
}
}
_3cb=true;
break;
case _3c8.ToolStrip:
if(_3c7=="InsertTable"){
_3c5=Telerik.Web.UI.Editor.InsertTable;
}else{
_3c5=Telerik.Web.UI.EditorToolStrip;
}
_3cb=true;
break;
case _3c8.Custom:
break;
}
}
if(args.attributes){
for(var item in args.attributes){
args[item.toLowerCase()]=args.attributes[item];
}
}
if(_3c5){
var _3cd=null;
if(_3cb){
_3cd={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
args["skin"]=skin;
}
tool=$create(_3c5,args,_3cd,null,_3c4);
}
if(tool){
Array.add(this._tools,tool);
var _3ce=tool.get_shortCut();
if(_3ce){
var _3cf=tool.get_name();
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(tool)&&!(Telerik.Web.UI.EditorSplitButton.isInstanceOfType(tool))){
_3cf="RadE_ToolAdapter_"+_3cf;
Telerik.Web.UI.Editor.CommandList[_3cf]=this._toolAdapterDropDownExpander;
}
_3bf.setShortCut(_3cf,_3ce);
}
}
}
var ul=_3bc;
if(this.isIE&&ul&&_3c2){
ul.style.width=(_3c2+(_3bd[0].offsetWidth)*2)+"px";
}
if($telerik.isSafari){
ul.setAttribute("onmousedown","return false;");
}
$addHandlers(_3bc,{"click":this._onToolAdapterClickDelegate,"keydown":this._onToolAdapterKeyDownDelegate},this);
}
},_toolAdapterDropDownExpander:function(_3d1,_3d2){
var tool=_3d2.getToolByName(_3d1.replace("RadE_ToolAdapter_",""));
tool.setFocus();
tool.show();
tool.selectNextItem();
return false;
},_onEditorModeChange:function(_3d4,args){
var _3d6=Telerik.Web.UI.EditModes;
var mode=_3d4.get_mode();
this._setEnabled((mode==_3d6.Design));
},_onEditorSelectionChange:function(_3d8,args){
this.setToolState();
},_setEnabled:function(_3da){
var _3db=this._tools;
for(var i=0;i<_3db.length;i++){
var tool=_3db[i];
tool.set_enabled(_3da);
}
},_registerEditorHandlers:function(){
var _3de=this.get_editor();
_3de.add_selectionChange(this._onEditorSelectionChangeDelegate);
_3de.add_modeChange(this._onEditorModeChangeDelegate);
},_onBodyClick:function(){
if(this._preventToolbarFromHiding){
this._preventToolbarFromHiding=false;
return;
}
this._showToolbarHolder(false);
},_onDropDownValueSelected:function(_3df,args){
this._preventToolbarFromHiding=true;
var _3e1=_3df.get_selectedItem();
if(Telerik.Web.UI.EditorButton.isInstanceOfType(_3e1)){
this._raiseEditorEvent(_3e1,null);
}else{
this._raiseEditorEvent(_3df,_3e1);
}
},_onKeyDownHandler:function(e){
var _3e3=e.keyCode;
if(9==_3e3||37==_3e3||39==_3e3||121==_3e3){
if(Telerik.Web.UI.Editor.PopupController){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
}
if(121==_3e3){
var _3e4=this.get_editor();
window.setTimeout(function(){
if(_3e4){
_3e4.setFocus();
}
},100);
if(e.rawEvent){
$telerik.cancelRawEvent(e.rawEvent);
}
return $telerik.cancelRawEvent(e);
}
if(9==_3e3){
return;
}
var _3e5=this._getSelectedTool(e);
if(!Telerik.Web.UI.EditorButton.isInstanceOfType(_3e5)){
return;
}
if(37==_3e3||39==_3e3){
var tool=_3e5;
while(true){
tool=(37==_3e3)?this._getPreviousTool(tool):this._getNextTool(tool);
if(null==tool){
break;
}
if(tool.get_enabled()){
break;
}
}
if(tool&&tool.get_enabled()){
tool.setFocus();
}
}
if(13==_3e3&&_3e5&&!_3e5.get_selectedItem){
this._raiseEditorEvent(_3e5,null);
return;
}
if(!Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3e5)){
return;
}
if(38==_3e3||40==_3e3){
var _3e7=false;
if(!_3e5.isExpanded()){
_3e5.show();
_3e7=true;
}
if(_3e7||40==_3e3){
_3e5.selectNextItem();
}else{
_3e5.selectPreviousItem();
}
}else{
if(13==_3e3){
_3e5.hide();
if(_3e5.get_activeIndex){
_3e5.set_selectedIndex(_3e5.get_activeIndex());
}
this._onDropDownValueSelected(_3e5);
}else{
if(27==_3e3){
_3e5.hide();
}
}
}
},_onToolBarClick:function(e){
var _3e9=this._getSelectedTool(e);
if(_3e9){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3e9)){
_3e9.click(e);
}else{
if(false){
}else{
this._raiseEditorEvent(_3e9);
}
}
}
$telerik.cancelRawEvent(e);
},_raiseEditorEvent:function(tool,_3eb){
var _3ec=this.get_events().getHandler("ToolClick");
if(_3ec){
var _3ed=tool.get_name?tool.get_name():"";
var _3ee=new Telerik.Web.UI.EditorCommandEventArgs(_3ed,tool,_3eb);
_3ec(tool,_3ee);
}
},_getPreviousTool:function(tool){
var _3f0=Array.indexOf(this._tools,tool);
return this._tools[_3f0-1];
},_getNextTool:function(tool){
var _3f2=Array.indexOf(this._tools,tool);
return this._tools[_3f2+1];
},_getSelectedTool:function(e){
var _3f4=Telerik.Web.UI.EditorButton.getToolRootNode(e.target);
if(null==_3f4){
return;
}
var _3f5=_3f4.control;
if(null==_3f5){
return;
}
if(_3f5.get_enabled&&_3f5.get_enabled()==false){
return;
}
if(e&&_3f5){
e.preventDefault();
e.stopPropagation();
}
return _3f5;
},_getToolBarElements:function(){
var _3f6=this.get_element();
var _3f7=_3f6.getElementsByTagName("ul");
return _3f7;
},get_tools:function(){
return this._tools;
},get_toolbarHolder:function(){
return this.get_window();
},get_editor:function(){
return this._editor;
},set_editor:function(_3f8){
if(this._editor!=_3f8){
this._editor=_3f8;
}
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_3f9){
this._toolJSON=_3f9;
},add_toolClick:function(_3fa){
this.get_events().addHandler("ToolClick",_3fa);
},remove_toolClick:function(_3fb){
this.get_events().removeHandler("ToolClick",_3fb);
}};
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(_3fc,_3fd,args){
function createSpellCheckEngine(){
if(!_3fd.get_ajaxSpellCheck()){
var _3ff={"editor":_3fd};
var _400=document.createElement("DIV");
var _401=$create(Telerik.Web.UI.Editor.AjaxSpellCheck,_3ff,null,null,_400);
var _402=_401.get_element();
var _403=$get(_3fd.get_id()+"Top");
if(_403){
_403.appendChild(_402);
}
_3fd.set_ajaxSpellCheck(_401);
}
var _404=_3fd.get_ajaxSpellCheck();
if(args&&args.value){
_404.set_language(args.value);
}
_404.spellCheck();
}
if(typeof (Telerik.Web.UI.Editor.AjaxSpellCheck)=="undefined"){
function OnWebRequestCompleted(_405,_406){
var _407=_405.get_responseData();
Telerik.Web.UI.Editor.Utils.evalScriptCode(_407);
createSpellCheckEngine();
}
var _408=_3fd.get_ajaxSpellCheckScriptReference();
var _409=new Sys.Net.WebRequest();
_409.set_url(_408);
_409.set_httpVerb("GET");
_409.add_completed(OnWebRequestCompleted);
_409.invoke();
}else{
createSpellCheckEngine();
}
return false;
};
this.ModuleManager=function(_40a,_40b,args){
var _40d=args.value;
var _40e=_40b.get_modulesManager();
if(!_40e){
return false;
}
var _40f=_40e.getModuleByName(_40d);
if(_40f){
_40f.toggleVisibility();
_40b._updateEditorSize(null,true);
}
return false;
};
this.ToggleScreenMode=function(_410,_411,args){
_411.toggleScreenMode();
return false;
};
this.InsertRowAbove=this.InsertRowBelow=function(_413,_414,args){
_414.executeCommand(new Telerik.Web.UI.Editor.TableInsertRow(_414.getLocalizedString(_413),null,_413=="InsertRowAbove"?"above":"below"));
};
this.InsertColumnLeft=this.InsertColumnRight=function(_416,_417,args){
_417.executeCommand(new Telerik.Web.UI.Editor.TableInsertColumn(_417.getLocalizedString(_416),null,_416=="InsertColumnLeft"?"left":"right"));
};
this.DeleteRow=function(_419,_41a,args){
_41a.executeCommand(new Telerik.Web.UI.Editor.TableDeleteRow(_41a.getLocalizedString(_419)));
};
this.DeleteColumn=function(_41c,_41d,args){
_41d.executeCommand(new Telerik.Web.UI.Editor.TableDeleteColumn(_41d.getLocalizedString(_41c)));
};
this.DeleteCell=function(_41f,_420,args){
_420.executeCommand(new Telerik.Web.UI.Editor.TableDeleteCell(_420.getLocalizedString(_41f)));
};
this.MergeColumns=function(_422,_423,args){
_423.executeCommand(new Telerik.Web.UI.Editor.TableMergeColumns(_423.getLocalizedString(_422)));
};
this.MergeRows=function(_425,_426,args){
_426.executeCommand(new Telerik.Web.UI.Editor.TableMergeRows(_426.getLocalizedString(_425)));
};
this.SplitCell=function(_428,_429,args){
_429.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(_429.getLocalizedString(_428)));
};
this.DeleteTable=function(_42b,_42c,args){
var _42e=args.value;
if(!_42e){
_42e=_42c.getSelectedElement();
}
if(_42e&&"TABLE"!=_42e.tagName){
_42e=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_42e,"TABLE");
}
if(_42e){
_42c.selectElement(_42e);
_42c.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(_42f,_430,args){
var _432=_42f.substring(10);
var _433=new Telerik.Web.UI.EditorCommandEventArgs(_42f,args.get_tool(),_432);
_430.fire("InsertFormElement",_433);
};
this.StripAll=this.StripCss=this.StripFont=this.StripSpan=this.StripWord=function(_434,_435,args){
var _437=_434.substring(5);
var _438=new Telerik.Web.UI.EditorCommandEventArgs(_434,args.get_tool(),_437.toUpperCase());
_435.fire("FormatStripper",_438);
};
this.FormatStripper=function(_439,_43a,args){
var _43c=args.value;
var _43d="";
try{
_43d=_43a.getSelectionHtml();
}
catch(e){
}
var oSel=_43a.get_document().selection?_43a.get_document().selection:_43a.get_contentWindow().getSelection();
var _43f=oSel.type?oSel.type.toLowerCase()=="none":oSel.isCollapsed;
if(_43f||_43d==""||_43a.get_html()==_43d){
var _440=Telerik.Web.UI.Editor.Utils.stripFormatting(_43a.get_html(),_43c);
_43a.set_html(_440,_43a.getLocalizedString(_439)+" "+_43c);
}else{
if(_43d!=null){
var _440=Telerik.Web.UI.Editor.Utils.stripFormatting(_43d,_43c);
_43a.pasteHtml(_440,_439);
}
}
};
this.InsertTable=function(_441,_442,args){
var _444=args.value;
if(_444){
var _445=Telerik.Web.UI.Editor.Utils.createTable(_444.rows,_444.cols);
var _446=Telerik.Web.UI.Editor.Utils.getOuterHtml(_445);
_442.pasteHtml(_446,_441);
}
};
this.InsertTab=function(_447,_448,_449){
var _44a=_448.getSelectedElement();
if(_44a.tagName=="LI"){
_448.fire("Indent");
}else{
_448.pasteHtml(" &nbsp;&nbsp;&nbsp;&nbsp;",_447);
}
return false;
};
this.SetToolFocus=function(_44b,_44c,_44d){
var _44e=_44c.get_toolAdapter();
if(_44e){
_44e.setFocus();
}
return false;
};
this.ViewHtml=function(_44f,_450,_451){
alert(_450.get_html(true));
return false;
};
this.Undo=this.Redo=function(_452,_453,args){
var _455=args?args.value:1;
if(!_455){
_455=1;
}
if(_452=="Redo"){
_453.redo(_455);
}else{
_453.undo(_455);
}
};
this.PastePlainText=function(_456,_457,_458){
var _459=function(_45a){
if(_45a){
var _45b=_45a.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
_45b=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(_45b);
if(_45b){
_457.pasteHtml(_45b,_456);
}
}
};
if(_457.isIE){
_459(window.clipboardData.getData("Text"));
}else{
var _45c=function(_45d,args){
_459(args.get_content());
};
_457.showDialog("CleanPasteTextContent",{},_45c);
return false;
}
};
this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(_45f,_460,_461){
var _462=function(_463,_464){
var _465="";
if(_45f=="PasteFromWord"){
_465=Telerik.Web.UI.Editor.Utils.stripFormatting(_463,"WORD");
}else{
if(_45f=="PasteFromWordNoFontsNoSizes"){
_465=Telerik.Web.UI.Editor.Utils.stripFormatting(_463,"WORD_ALL");
}else{
_465=Telerik.Web.UI.Editor.Utils.convertText2Html(_463);
}
}
if(_464){
_464.select();
}
if(_465){
_460.pasteHtml(_465,_45f);
}
};
if(_460.isIE){
var _466=_460.createRestorePoint();
var _467=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
_462(_467,_466);
}else{
var _468=function(_469,args){
_462(args.get_content());
};
_460.showDialog("CleanPasteHtmlContent",{},_468);
}
};
this.Copy=function(_46b,_46c,args){
if(null!=args){
var _46e=window.opera?false:true;
if(_46e){
try{
document.queryCommandEnabled(_46b);
}
catch(e){
_46e=false;
}
}
if(_46e){
_46c.get_document().execCommand(_46b,false,null);
}else{
alert(_46c.getLocalizedString("UseCtrlC"));
}
}
};
this.Cut=this.Paste=function(_46f,_470,args){
if(null!=args){
var _472=window.opera?false:true;
if(_472){
try{
if(!_470.isIE7){
document.queryCommandEnabled(_46f);
}
}
catch(e){
_472=false;
}
}
if(_46f=="Paste"&&_472&&_470.isIE7){
_470.get_document().body.fireEvent("onbeforepaste");
}
if(_472){
var oCmd=new Telerik.Web.UI.Editor.GenericCommand(_470.getLocalizedString(_46f),_470.get_contentWindow());
_470.get_document().execCommand(_46f,false,null);
_470.executeCommand(oCmd);
}else{
var id=(_46f=="Cut"?"UseCtrlX":"UseCtrlV");
alert(_470.getLocalizedString(id));
}
}else{
_470._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(_470.getLocalizedString(_46f),_470.get_contentWindow());
}
};
this.InsertParagraph=function(_475,_476,_477){
_476.executeBrowserCommand(_475,true,"");
return true;
};
this.FormatBlock=function(_478,_479,args){
_479.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(_479.getLocalizedString(_478),_479.get_contentWindow(),args.value));
};
this.InsertOrderedList=this.InsertUnorderedList=function(_47b,_47c,args){
_47c.setFocus();
_47c.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(_47c.getLocalizedString(_47b),_47c.get_contentWindow(),_47c.get_newLineBr(),_47b,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(_47e,_47f,_480){
_47f.setActive();
var _481="SelectAll"!=_47e;
if(_47e=="Unlink"&&!_47f.isIE){
var elem=_47f.getSelectedElement();
if(elem&&elem.tagName=="A"){
_47f.selectElement(elem,false);
}
}
_47f.executeBrowserCommand(_47e,_481,null,null);
return true;
};
this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(_483,_484,args){
var _486=args.value;
_484.executeBrowserCommand(_483,true,_486);
};
this.Zoom=function(_487,_488,args){
var _48a=args.value;
var tool=args.get_tool?args.get_tool():null;
if(_48a&&tool&&tool.updateValue){
tool.updateValue(_48a);
}
_488._contentArea.style.zoom=_48a;
return false;
};
this.Print=function(_48c,_48d,args){
if(_48d.isIE){
_48d.get_document().execCommand(_48c,false,null);
}else{
if(_48d.get_contentWindow().print){
_48d.get_contentWindow().print();
}
}
return false;
};
this.InsertSnippet=function(_48f,_490,args){
_490.pasteHtml(args.value,_48f);
};
this.InsertFormElement=function(_492,_493,args){
var _495=args.value;
_495=_495.toLowerCase();
var _496=null;
switch(_495){
case "form":
_496=_493.createElement("form","150px","150px");
_496.innerHTML="&nbsp;";
break;
case "textarea":
_496=_493.createElement("textarea");
break;
case "select":
_496=_493.createElement("select","100px","22px");
break;
case "checkbox":
case "radio":
_496=_493.createElement("input");
_496.setAttribute("type",_495);
break;
case "button":
case "reset":
case "submit":
_496=_493.createElement("input","50px","22px");
_496.setAttribute("type",_495);
break;
case "hidden":
case "password":
case "text":
_496=_493.createElement("input","100px","22px");
_496.setAttribute("type",_495);
break;
}
if(_496){
var id=Telerik.Web.UI.Editor.Utils.getUniqueID();
_496.setAttribute("id",id);
var html=Telerik.Web.UI.Editor.Utils.getOuterHtml(_496);
_493.pasteHtml(html,_492);
var _499=_493.get_document().getElementById(id);
if(_499){
_499.removeAttribute("id");
if(_499.setActive){
_499.setActive();
}
return false;
}
}
};
this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(_49a,_49b,args){
var _49d="";
switch(_49a){
case "InsertSymbol":
_49d=args.value;
break;
case "InsertHorizontalRule":
_49d="<hr>";
break;
case "InsertDate":
var now=new Date();
_49d="&nbsp;"+now.toLocaleDateString();
break;
case "InsertTime":
var now=new Date();
_49d="&nbsp;"+now.toLocaleTimeString();
break;
default:
_49d="<fieldset style='WIDTH: 200px; HEIGHT: 76px'> <legend>Title</legend>Content... </fieldset> ";
}
_49b.pasteHtml(_49d,_49a);
};
this.ImageManager=function(_49f,_4a0,_4a1){
var _4a2=function(_4a3,args){
_4a0.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_49f);
};
var _4a5=_4a0.get_dialogOpener().get_additionalQueryString();
var _4a6=_4a0.getSelectedElement();
if(_4a6&&_4a6.tagName.toLowerCase()=="img"){
_4a0.get_dialogOpener().set_additionalQueryString(_4a5+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4a6.src));
}
var args={editor:_4a0};
_4a0.showDialog("ImageManager",args,_4a2);
_4a0.get_dialogOpener().set_additionalQueryString(_4a5);
return false;
};
this.SilverlightManager=function(_4a8,_4a9,_4aa){
var _4ab=function(_4ac,args){
var html=args.Result;
var _4af=_4a9._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4b0=_4a9._filtersManager.getFilterByName("MozillaKeepFlashString");
html=(_4af)?_4af.getDesignContent(html):html;
html=(_4b0)?_4b0.getDesignContent(html):html;
_4a9.pasteHtml(html,_4a8);
};
var _4b1={};
var _4b2=_4a9.get_dialogOpener().get_additionalQueryString();
var _4b3=_4a9.getSelectedElement();
if(_4b3){
if($telerik.isIE&&_4b3.object&&_4b3.object.Movie){
var _4b4=_4b3.object.Movie;
_4a9.get_dialogOpener().set_additionalQueryString(_4b2+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4b4));
_4b1.selectedItemUrl=_4b4;
_4b1.selectedObject=_4b3;
}
}
_4a9.showDialog("SilverlightManager",_4b1,_4ab);
_4a9.get_dialogOpener().set_additionalQueryString(_4b2);
return false;
};
this.FlashManager=function(_4b5,_4b6,_4b7){
var _4b8=function(_4b9,args){
var _4bb=_4b6._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4bc=_4b6._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4bb)?_4bb.getDesignContent(html):html;
html=(_4bc)?_4bc.getDesignContent(html):html;
_4b6.pasteHtml(html,_4b5);
};
var _4be={};
var _4bf=_4b6.get_dialogOpener().get_additionalQueryString();
var _4c0=_4b6.getSelectedElement();
if(_4c0){
if($telerik.isIE&&_4c0.object&&_4c0.object.Movie){
var _4c1=_4c0.object.Movie;
_4b6.get_dialogOpener().set_additionalQueryString(_4bf+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4c1));
_4be.selectedItemUrl=_4c1;
_4be.selectedObject=_4c0;
}
}
_4b6.showDialog("FlashManager",_4be,_4b8);
_4b6.get_dialogOpener().set_additionalQueryString(_4bf);
return false;
};
this.MediaManager=function(_4c2,_4c3,_4c4){
var _4c5=function(_4c6,args){
var _4c8=_4c3._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4c9=_4c3._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4c8)?_4c8.getDesignContent(html):html;
html=(_4c9)?_4c9.getDesignContent(html):html;
_4c3.pasteHtml(html,_4c2);
};
var _4cb={};
var _4cc=_4c3.get_dialogOpener().get_additionalQueryString();
var _4cd=_4c3.getSelectedElement();
if(_4cd){
if($telerik.isIE&&_4cd.object&&_4cd.object.FileName){
var _4ce=_4cd.object.FileName;
_4c3.get_dialogOpener().set_additionalQueryString(_4cc+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4ce));
_4cb.selectedItemUrl=_4ce;
_4cb.selectedObject=_4cd;
}
}
_4c3.showDialog("MediaManager",_4cb,_4c5);
_4c3.get_dialogOpener().set_additionalQueryString(_4cc);
return false;
};
this.TemplateManager=function(_4cf,_4d0,_4d1){
var _4d2=function(_4d3,args){
_4d0.pasteHtml(args.Result,_4cf);
};
_4d0.showDialog("TemplateManager",{},_4d2);
return false;
};
this.AboutDialog=function(_4d5,_4d6,_4d7){
_4d6.showDialog("AboutDialog");
return false;
};
this.Help=function(_4d8,_4d9,_4da){
_4d9.showDialog("Help");
return false;
};
this.PageProperties=function(_4db,_4dc,_4dd){
var _4de=function(_4df,args){
};
var _4e1={};
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4e1,"BODY",_4dc,_4db);
_4dc.showDialog("PageProperties",_4e1,_4de);
return false;
};
this.ImageMapDialog=function(_4e2,_4e3,args){
var _4e5=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(_4e3);
var _4e6=function(wnd,_4e8){
Telerik.Web.UI.Editor.CommandList._setImageMapProperties(_4e3,_4e8);
return false;
};
_4e3.showDialog("ImageMapDialog",_4e5,_4e6);
return false;
};
this._setImageMapProperties=function(_4e9,args){
if(!args){
return;
}
var _4eb=_4e9.getSelectedElement();
var _4ec;
if(_4eb&&_4eb.tagName=="IMG"){
_4ec=_4eb;
if(args.ImageSrc!=_4ec.src){
_4ec.src=args.ImageSrc;
}
}else{
if(!args.ImageSrc){
return;
}
_4e9.pasteHtml("<img src=\""+args.ImageSrc+"\" id = \"__tmp__\">");
_4ec=_4e9.get_document().getElementById("__tmp__");
_4ec.removeAttribute("id");
if(document.all){
var oRng=_4e9.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4ec);
oRng.select();
}
}
var _4ee=document.createElement("SPAN");
_4ee.innerHTML=args.MapHtml;
var _4ef=_4ee.getElementsByTagName("map");
if(_4ef.length==0){
return;
}
var _4f0=_4ef[0].innerHTML;
_4ee=null;
if(!_4f0){
_4ec.removeAttribute("useMap");
return;
}
var _4f1="";
var map=null;
var _4f3=_4ec.getAttribute("useMap");
if(_4f3){
_4f1=_4f3.substr(1);
map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4e9,_4f1);
}
if(map==null){
var _4f4=new Date()-100;
var _4f1="rade_img_map_"+_4f4;
map=_4e9.get_document().createElement("map");
map.id=_4f1;
this._setNameAttribute(map,_4f1);
map=_4e9.get_document().body.appendChild(map);
_4ec.setAttribute("useMap","#"+_4f1);
_4ec.setAttribute("border","0");
}
map.innerHTML=_4f0;
};
this._setNameAttribute=function(_4f5,name){
_4f5.removeAttribute("name");
_4f5.removeAttribute("NAME");
_4f5.name=null;
_4f5.name=name;
_4f5["NAME"]=name;
};
this._getImageMapDialogArgument=function(_4f7){
var _4f8={};
_4f8._editor=_4f7;
var _4f9=_4f7.getSelectedElement();
if(_4f9&&_4f9.tagName=="IMG"){
_4f8.ImageSrc=_4f9.getAttribute("src",2);
_4f8.ImageWidth=(_4f9.style.width)?_4f9.style.width:_4f9.width;
_4f8.ImageHeight=(_4f9.style.height)?_4f9.style.height:_4f9.height;
if($telerik.isIE){
var oRng=_4f7.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4f9);
oRng.select();
}
if(_4f9.useMap){
var _4fb=_4f9.getAttribute("useMap").substr(1);
var map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4f7,_4fb);
if(map!=null){
_4f8.ImageMapHTML="<map name = \""+_4fb+"\">"+map.innerHTML+"</map>";
}else{
_4f8.ImageMapHTML="";
}
_4f9.style.width=_4f8.ImageWidth;
_4f9.style.height=_4f8.ImageHeight;
}
}
return _4f8;
};
this._getImageMapByName=function(_4fd,_4fe){
var _4ff=_4fd.get_document();
var map=_4ff.getElementById(_4fe);
if(map!=null){
return map;
}
var maps=_4ff.getElementsByTagName("map");
for(var i=0;i<maps.length;i++){
if(maps[i].getAttribute("name")==_4fe){
return maps[i];
}
}
return null;
};
this.DocumentManager=function(_503,_504,_505){
var _506={};
var _507=function(_508,args){
_504.pasteHyperLink(args.Result,_503);
};
var _50a=_504.get_dialogOpener().get_additionalQueryString();
var _50b=_504.getSelectedElement();
if(_50b&&_50b.tagName.toLowerCase()=="a"){
_504.get_dialogOpener().set_additionalQueryString(_50a+"&PreselectedItemUrl="+encodeURIComponent(_50b.href));
}
_504.showDialog("DocumentManager",_506,_507);
_504.get_dialogOpener().set_additionalQueryString(_50a);
return false;
};
this.TableWizard=function(_50c,_50d,_50e){
var _50f=Telerik.Web.UI.Editor.CommandList._getTableArgument(_50d,null,true,false);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_50f,"TABLE",_50d,_50c);
var _510=function(_511,args){
_50d.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_50c);
};
_50d.showDialog("TableWizard",_50f,_510);
return false;
};
this.SetTableProperties=function(_513,_514,_515){
var _516=Telerik.Web.UI.Editor.CommandList._getTableArgument(_514,1,false,true);
if(!_516){
alert(_514.getLocalizedString("tablewarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_516,"TABLE",_514,_513);
var _517=Telerik.Web.UI.Editor.CommandList._getParentTable(_514);
var _518=function(_519,args){
_514.selectElement(_517);
_514.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_513);
};
if(_514.get_document().selection&&_514.get_document().selection.empty){
_514.get_document().selection.empty();
}
_514.showDialog("TableWizard",_516,_518);
return false;
};
this.SetCellProperties=function(_51b,_51c,_51d){
var _51e=Telerik.Web.UI.Editor.CommandList._getTableArgument(_51c,2,false,true);
if(!_51e){
alert(_51c.getLocalizedString("cellwarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_51e,"TABLE",_51c,_51b);
var _51f=Telerik.Web.UI.Editor.CommandList._getParentTable(_51c);
var _520=function(_521,args){
_51c.selectElement(_51f);
_51c.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_51b);
};
_51c.showDialog("TableWizard",_51e,_520);
return false;
};
this.FindAndReplace=function(_523,_524,_525){
var _526={};
_526._editor=_524;
var _527=function(_528,args){
};
_524.showDialog("FindAndReplace",_526,_527);
return false;
};
this.StyleBuilder=function(_52a,_52b,_52c){
var _52d=function(_52e,args){
_52b.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_52a);
};
var _530={};
var _531=_52b.getSelection();
var _532=_531.getParentElement();
if(!_531.isControl()){
var _533=_531.getHtml();
if(_533!=""||(_532&&_532.tagName&&_532.tagName.toLowerCase()=="body")){
var _534=_52b.createElement("span");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_534,_533);
_532=_534;
}else{
_52b.selectElement(_532,false);
}
}
_530.htmlElement=_532;
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_530,"*",_52b,_52a);
_530.fontNames=_52b.get_fontNames();
_52b.showDialog("StyleBuilder",_530,_52d);
return false;
};
this.XhtmlValidator=function(_535,_536,_537){
var _538=_536;
var _539=function(_53a,args){
};
_536.showDialog("XhtmlValidator",_538,_539);
return false;
};
this.TrackChangesDialog=function(_53c,_53d,_53e){
var _53f=_53d;
var _540=function(_541,args){
};
_53d.showDialog("TrackChangesDialog",_53f,_540);
};
this.InsertCustomLink=function(_543,_544,args){
var link=args.value;
var _547=String.format("<a href='{1}' title='{3}' target='{2}'>{0}</a>",link.innerHTML,link.href,link.target,link.title);
var _548=Telerik.Web.UI.Editor.CommandList._getParentLink(_544);
if(_548){
var _549=_548.cloneNode(true);
if(link.href){
_549.setAttribute("href",link.href);
}
if(link.target){
_549.setAttribute("target",link.target);
}
if(link.title){
_549.setAttribute("title",link.title);
}
if(!_549.innerHTML){
_549.innerHTML=link.innerHTML;
}
_547=Telerik.Web.UI.Editor.Utils.getOuterHtml(_549);
}
_544.pasteHtml(_547,_543);
};
this._getDialogArguments=function(_54a,_54b,_54c,_54d){
_54a.Colors=_54c.get_colors();
if("TD"==_54b||"TH"==_54b||"TABLE"==_54b){
_54a.CssClasses=_54c.getCssArray("TABLE");
_54a.CellCssClasses=_54c.getCssArray("TD");
}else{
if("A"==_54b||"BODY"==_54b||"IMG"==_54b){
_54a.CssClasses=_54c.getCssArray(_54b);
}
}
_54a.Editor=_54c;
};
this.SetLinkProperties=this.LinkManager=function(_54e,_54f,_550){
var _551=Telerik.Web.UI.Editor.CommandList._getLinkArgument(_54f);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_551,"A",_54f,_54e);
var _552=function(_553,args){
_54f.pasteHyperLink(args.realLink,_54e);
};
_54f.showDialog("LinkManager",_551,_552);
return false;
};
this.SetImageProperties=function(_555,_556,_557){
var _558=_556.getSelectedElement();
if(_558.nodeName.toLowerCase()!="img"){
return false;
}
var _559={};
_559.Element=_558;
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_559,"IMG",_556,_555);
var _55a=function(_55b,args){
if(_558&&_558.parentNode){
_558.parentNode.replaceChild(args.Result,_558);
}else{
_556.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_555);
}
};
_556.showDialog("ImageProperties",_559,_55a);
return false;
};
this.FormatCodeBlock=function(_55d,_55e,_55f){
var _560={dirtyCode:_55e.getSelectionHtml()};
if(_55e.get_document().selection&&_55e.get_document().selection){
var _561=_55e.get_document().selection.type.toLowerCase();
if(_561=="control"||_561=="none"){
_560.dirtyCode="";
}
}
var _562=function(_563,args){
_55e.pasteHtml(args.get_code(),_55d);
};
_55e.showDialog("FormatCodeBlock",_560,_562);
return false;
};
this._getDocumentAnchors=function(_565){
var _566=_565.getElementsByTagName("A");
var _567=new Array();
for(var i=0;i<_566.length;i++){
if(_566[i].name){
_567[_567.length]=_566[i];
}
}
return _567;
};
this._getParentLink=function(_569){
_569.setFocus();
var _56a=_569.getSelectedElement();
var _56b=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_56a,"A");
if(_56b){
_569.selectElement(_56b);
}else{
var _56c="";
if(_56a&&_56a.tagName=="IMG"){
_56c=Telerik.Web.UI.Editor.Utils.getOuterHtml(_56a);
}else{
_56c=_569.getSelection().getHtml();
}
_56b=_569.get_document().createElement("A");
try{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_56b,_56c);
}
catch(e){
_56b.innerHTML=Telerik.Web.UI.Editor.Utils.stripFormatting(_56c,"ALL");
}
}
return _56b;
};
this._getLinkArgument=function(_56d,_56e){
var _56f=Telerik.Web.UI.Editor.CommandList._getParentLink(_56d);
var _570=_56f.innerHTML;
var _571=!_570?false:_570.match(/</);
if($telerik.isIE&&_571){
if(_570.trim().toLowerCase()=="<p>&nbsp;</p>"){
_56f.innerHTML=" ";
_571=false;
}
}
return {selectedTabIndex:_56e?_56e:0,realLink:_56f.cloneNode(true),showText:!_571,documentAnchors:Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(_56d.get_document())};
};
this._getParentTable=function(_572){
_572.setFocus();
var _573=_572.getSelectedElement();
var _574=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_573,"TABLE");
return _574;
};
this._getParentCell=function(_575){
_575.setFocus();
var _576=_575.getSelectedElement();
var _577=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_576,"TD");
return _577;
};
this._getTableArgument=function(_578,_579,_57a,_57b){
var _57c;
var _57d=null;
if(_57a){
_57c=Telerik.Web.UI.Editor.Utils.createTable(2,2,_578._document);
}else{
_57c=Telerik.Web.UI.Editor.CommandList._getParentTable(_578);
}
if(!_57a&&!_57c){
return null;
}
if(_57b){
_57d=Telerik.Web.UI.Editor.CommandList._getParentCell(_578);
}
var _57e=_57c.cloneNode(true);
var _57f=_57c;
return {selectedTabIndex:_579?_579:0,cellToModify:_57d,tableToModify:_57e,originalTable:_57f,tableDocument:(_57e.document)?_57e.document:_578.get_document()};
};
this.EnterParagraphMozilla=function(_580,_581,args){
var _583=_581.getSelectedElement();
if("LI"==_583.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_583,"LI")!=null){
_581.bubbleKeyEventToBrowser();
return false;
}else{
if(_583.tagName=="A"){
_581.bubbleKeyEventToBrowser();
return false;
}
}
var _584=_581.get_contentWindow();
var oDoc=_584.document;
function checkParent(_586,_587){
_587[_587.length]=_586;
while(_586!=null&&_586.tagName!="P"){
if(_586.tagName=="TD"){
return null;
}
_586=_586.parentNode;
_587[_587.length]=_586;
}
return _586;
}
var _588=_584.getSelection();
var _589=_588.getRangeAt(0);
var _58a=_589.cloneRange();
_589.deleteContents();
var _58b=_589.startOffset;
var _58c=_589.startContainer;
var _58d="";
var _58e=[];
var inP=checkParent(_58c,_58e);
if(inP){
var _590=(inP.innerHTML=="");
var _591=_589.cloneRange();
_591.setStart(inP,0);
_591.setEnd(_58c,_58b);
var _592=_591.cloneContents();
var _593=_589.cloneRange();
_593.setStart(_58c,_58b);
if(inP.lastChild){
_593.setEndAfter(inP.lastChild);
}else{
_593.setEnd(inP,0);
}
var _594=_593.cloneContents();
_589.selectNode(inP);
_588.removeAllRanges();
_588.addRange(_589);
inP=inP.cloneNode(true);
inP.innerHTML="";
var _595=inP.cloneNode(true);
if(_590){
_595.innerHTML="&nbsp;";
}else{
_595.appendChild(_592);
}
endPar=inP.cloneNode(true);
endPar.appendChild(_594);
var newP=inP.cloneNode(true);
var _597=newP;
if(_58e.length>0){
for(var i=_58e.length;i>0;i--){
var _599=_58e[i];
var _59a=_599&&_599.cloneNode?_599.cloneNode(false):null;
if(_59a&&_59a.tagName!="P"){
_597.appendChild(_59a);
_597=_59a;
}
}
}
_597.innerHTML="&nbsp;";
_597.setAttribute("id","radETempNode");
var _59b=oDoc.createElement("div");
_59b.appendChild(_595);
_59b.appendChild(newP);
if(!_590){
_59b.appendChild(endPar);
}
_58d=_59b.innerHTML;
}else{
_58d="<p id='radETempNode'>&nbsp;</p>";
}
_581.pasteHtml(_58d,"Enter",false,false,false);
oP=oDoc.getElementById("radETempNode");
if(oP){
oP.removeAttribute("id",0);
var _588=_584.getSelection();
var _589=oDoc.createRange();
_589.selectNodeContents(oP);
_588.removeAllRanges();
_588.addRange(_589);
}
var ps=oDoc.getElementsByTagName("P");
for(var i=0;i<ps.length;i++){
var _59d=ps[i].innerHTML;
if(_59d==""||_59d.trim().toLowerCase()=="<br>"){
ps[i].parentNode.removeChild(ps[i]);
}
}
return false;
};
this.Enter=function(_59e,_59f,args){
var _5a1=_59f.getSelectedElement();
if("LI"==_5a1.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5a1,"LI")!=null){
_59f.bubbleKeyEventToBrowser();
return false;
}
try{
var _5a2=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_59f.get_contentWindow());
var _5a3=_59f.get_document().selection.createRange();
if(_5a3.pasteHTML){
var tag=_5a1.tagName;
if(tag.charAt(0)=="H"&&parseInt(tag.charAt(1))>0){
var _5a5=_5a3.duplicate();
_5a5.moveToElementText(_5a1);
_59f.bubbleKeyEventToBrowser();
return false;
}
_5a3.pasteHTML("<br>");
_5a3.select();
_5a3.moveEnd("character",1);
_5a3.moveStart("character",1);
_5a3.collapse(false);
}else{
if(_5a3(0)){
_5a3.execCommand("Delete");
}
}
_59f.executeCommand(_5a2);
}
catch(exc){
alert(exc.message);
}
return false;
};
this.ShiftEnter=function(_5a6,_5a7,args){
var _5a9=_5a7.getSelectedElement();
if("LI"==_5a9.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5a9,"LI")!=null){
var _5aa=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_5a7.get_contentWindow());
var _5ab=_5a7.get_document().selection.createRange();
_5ab.pasteHTML("<br>");
_5ab.select();
_5ab.moveEnd("character",1);
_5ab.moveStart("character",1);
_5ab.collapse(false);
_5a7.executeCommand(_5aa);
return false;
}
_5a7.bubbleKeyEventToBrowser();
return false;
};
this.ToggleTableBorder=function(_5ac,_5ad,args){
_5ad.toggleEnhancedEdit();
return false;
};
this.ConvertToUpper=this.ConvertToLower=function(_5af,_5b0,args){
var _5b2;
var endR;
if($telerik.isIE){
if(_5b0._document.selection.type.toLowerCase()=="control"){
return;
}
var _5b4=_5b0._document.selection.createRange();
_5b2=_5b4.duplicate();
endR=_5b4.duplicate();
_5b2.collapse();
endR.collapse(false);
}
var _5b5=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5b0);
var _5b6=_5b5.markedElements;
var _5b7=_5b5.newElements;
var _5b8=new Telerik.Web.UI.Editor.GenericCommand(_5b0.getLocalizedString(_5af),_5b0.get_contentWindow());
for(var i=0;i<_5b6.length;i++){
changeChildNodesCase(_5b6[i]);
}
for(var i=0;i<_5b7.length;i++){
if($telerik.isIE){
_5b7[i].removeNode(false);
}else{
var _5ba=document.createRange();
_5ba.selectNodeContents(_5b7[i]);
_5b7[i].parentNode.replaceChild(_5ba.extractContents(),_5b7[i]);
}
}
if($telerik.isIE){
var _5bb=_5b0._document.selection.createRange();
_5bb.setEndPoint("StartToStart",_5b2);
_5bb.setEndPoint("EndToEnd",endR);
_5bb.select();
}else{
var _5bc=_5b0.get_contentWindow().getSelection();
var rng=_5bc.getRangeAt(0);
rng.collapse(true);
}
_5b0.executeCommand(_5b8);
function changeChildNodesCase(_5be){
var _5bf=_5be.childNodes;
for(var i=0;i<_5bf.length;i++){
if(_5bf[i].nodeType==3){
_5bf[i].nodeValue=("ConvertToLower"==_5af)?_5bf[i].nodeValue.toLowerCase():_5bf[i].nodeValue.toUpperCase();
}else{
if(_5bf[i].nodeType==1&&_5bf[i].tagName.toUpperCase()!="FONT"){
changeChildNodesCase(_5bf[i]);
}
}
}
}
};
this.ApplyClass=function(_5c1,_5c2,args){
var _5c4=true;
var _5c5=args.get_value();
var _5c6=_5c2.get_contentWindow();
var _5c7=_5c2.get_document();
var _5c8=_5c2.createRestorePoint();
var _5c9=new Telerik.Web.UI.Editor.GenericCommand(_5c2.getLocalizedString(_5c1)+" [\""+_5c5+"\"]",_5c2.get_contentWindow());
var _5ca=Telerik.Web.UI.Editor.Utils.getFullySelectedElement(_5c6);
if(_5ca){
Telerik.Web.UI.Editor.Utils.setElementClassName(_5ca,_5c5);
_5c4=false;
}else{
if(!_5c5){
_5c7.execCommand("RemoveFormat",false,null);
_5c4=false;
}
}
if(_5c4){
var _5cb=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5c2);
var _5cc=_5cb.markedElements;
if(_5cc.length>0){
for(var i=0;i<_5cc.length;i++){
var _5ce=_5cc[i];
if(_5ce.className){
continue;
}else{
_5ce.className=_5c5;
}
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5c2.get_contentWindow(),_5cc);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5c2,"class='"+_5c5+"'");
}
}
_5c2.executeCommand(_5c9);
},this.RealFontSize=function(_5cf,_5d0,args){
var _5d2=args.get_value();
var _5d3=new Telerik.Web.UI.Editor.GenericCommand(_5d0.getLocalizedString(_5cf)+" [\""+_5d2+"\"]",_5d0.get_contentWindow());
var _5d4=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5d0);
var _5d5=_5d4.markedElements;
if(_5d5.length>0){
for(var i=0;i<_5d5.length;i++){
_5d5[i].style.fontSize=_5d2;
_5d5[i].removeAttribute("size");
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5d0.get_contentWindow(),_5d5);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5d0,"style='font-size:"+_5d2+"'");
}
_5d0.executeCommand(_5d3);
},this._completeEditorSelection=function(_5d7,_5d8){
if(!_5d8){
_5d8="";
}
var _5d9=_5d7.get_contentWindow();
var _5da=_5d7.get_document();
var _5db=_5d7.getSelection().getParentElement().tagName;
if($telerik.isIE&&!_5d7.getSelectionHtml()&&(_5db=="FONT"||_5db=="SPAN")){
_5da.execCommand("RemoveFormat",null,false);
}
var _5dc=_5d7.getSelection();
_5dc.pasteHtml("<font "+_5d8+" id='radERealFont'>&nbsp;</font>");
var _5dd=_5d7.get_document().getElementById("radERealFont");
_5dd.removeAttribute("id");
if($telerik.isIE){
_5d7.selectElement(_5dd);
_5d7.getSelection().collapse();
_5dd.innerHTML="";
}else{
if(_5d9.getSelection){
var oSel=_5d9.getSelection();
var _5df=_5d7.getSelection().getRange();
oSel.removeAllRanges();
_5dd.innerHTML="";
if(_5df&&_5df.selectNodeContents){
_5df.selectNodeContents(_5dd);
}
oSel.addRange(_5df);
}
}
},this._markEditorSelection=function(_5e0){
if(_5e0.get_html()==""){
return {markedElements:[],newElements:[]};
}
var _5e1="AZBY";
var _5e2="_cm";
var _5e3=[];
var _5e4=[];
var _5e5=[];
var _5e6=$telerik.isSafari?"span":"font";
var _5e7=_5e0._contentArea;
var _5e8=_5e0.getSelection();
if(_5e8.isControl()){
var _5e9=_5e8.getParentElement();
var _5ea=_5e0._document.createElement(_5e6);
_5ea.appendChild(_5e9.cloneNode(true));
_5e9.parentNode.replaceChild(_5ea,_5e9);
return {markedElements:[_5ea],newElements:[_5ea]};
}
if(!$telerik.isSafari){
keepFontNames();
}
if(!$telerik.isIE){
_5e7.ownerDocument.execCommand("UseCSS",false,true);
_5e7.ownerDocument.execCommand("styleWithCSS",false,false);
}
_5e7.ownerDocument.execCommand("FontName",false,_5e1);
var _5eb=_5e7.getElementsByTagName(_5e6);
for(var i=0;i<_5eb.length;i++){
var _5ea=_5eb[i];
if(_5ea.getAttribute("face")==_5e1||_5ea.style.fontFamily==_5e1){
_5ea.removeAttribute("face");
if(_5ea.style.fontFamily==_5e1){
_5ea.style.fontFamily="";
if(_5ea.className=="Apple-style-span"){
_5ea.className="";
}
}
_5e4.push(_5ea);
var _5ed=_5ea.getElementsByTagName(_5e6);
for(var j=0;j<_5ed.length;j++){
var _o=_5ed[j];
if(_o.getAttribute("face")!=_5e1){
_5e4.push(_o);
}
}
if(!_5ea.getAttribute(_5e2)){
_5e5.push(_5ea);
}
}
_5ea.removeAttribute(_5e2);
}
if(!$telerik.isSafari){
restoreFontNames();
}
if(!$telerik.isIE){
_5e7.ownerDocument.execCommand("UseCSS",false,false);
_5e7.ownerDocument.execCommand("styleWithCSS",false,true);
}
function keepFontNames(){
var _5f0=_5e0._contentArea.getElementsByTagName(_5e6);
for(var i=0;i<_5f0.length;i++){
var _5f2=_5f0[i];
if(_5f0[i].face){
_5f2.setAttribute("_face",_5f2.face);
_5e3.push(_5f2);
}
_5f2.setAttribute(_5e2,1);
}
}
function restoreFontNames(){
for(var i=0;i<_5e3.length;i++){
_5e3[i].face=_5e3[i].getAttribute("_face");
_5e3[i].removeAttribute("_face");
}
_5e3=[];
}
return {markedElements:_5e4,newElements:_5e5};
};
})();
if(typeof (RadEditorCommandList)=="undefined"){
var RadEditorCommandList=Telerik.Web.UI.Editor.CommandList;
}
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandsManager=function(_5f4){
this._commands=[];
this._currentCommandIndex=-1;
};
Telerik.Web.UI.Editor.CommandsManager.prototype={get_commands:function(){
return this._commands;
},execute:function(_5f5,_5f6){
if(_5f5&&_5f5.execute){
var _5f7=_5f5.execute();
if(false==_5f6){
return false;
}
if(_5f7&&_5f5._canUnexecute){
this._clearCommandsToRedo();
Array.add(this._commands,_5f5);
this._currentCommandIndex=this._commands.length-1;
return true;
}
}
return false;
},undo:function(_5f8){
if(_5f8>this._commands.length){
_5f8=this._commands.length;
}
var _5f9=0;
var _5fa=null;
while(0<_5f8--&&0<=this._currentCommandIndex&&this._currentCommandIndex<this._commands.length){
_5fa=this._commands[this._currentCommandIndex--];
if(_5fa){
_5fa.unexecute();
_5f9++;
}
}
},redo:function(_5fb){
if(_5fb>this._commands.length){
_5fb=this._commands.length;
}
var _5fc=0;
var _5fd=null;
var _5fe=this._currentCommandIndex+1;
while(0<_5fb--&&0<=_5fe&&_5fe<this._commands.length){
_5fd=this._commands[_5fe];
if(_5fd){
_5fd.execute();
this._currentCommandIndex=_5fe;
_5fc++;
}
_5fe++;
}
},removeCommandAt:function(_5ff){
this._commands.splice(_5ff,1);
if(this._currentCommandIndex>=_5ff){
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 _600=this._commands[this._currentCommandIndex].clone();
this.execute(_600);
}
},_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(_601){
return _601;
},getDesignContent:function(_602){
return _602;
},get_isDom:function(){
return this.IsDom;
},set_isDom:function(_603){
this.IsDom=_603;
},get_enabled:function(){
return this.Enabled;
},set_enabled:function(_604){
this.Enabled=_604;
},get_name:function(){
return this.Name;
},set_name:function(_605){
this.Name=_605;
},get_description:function(){
return this.Description;
},set_description:function(_606){
this.Description=_606;
}};
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(_607){
return this._performStripping(_607);
},getDesignContent:function(_608){
return this._performStripping(_608);
},_performStripping:function(_609){
var _60a=_609.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_60a=_60a.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
return _60a;
}};
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(_60b){
var _60c=new RegExp("<!"+"--RADEDITORSAVEDTAG_([\\s\\S]*?)--"+">","ig");
var _60d=new RegExp("--RADEDITORSAVEDTAGENDING>","ig");
var _60e=_60b.replace(_60c,"<$1>");
_60e=_60e.replace(_60d,"--"+">");
return _60e;
},getDesignContent:function(_60f){
var _610=function(_611,_612,_613,_614,_615){
var _616=_615.substring(0,_614).lastIndexOf("<!"+"--");
var _617=_615.substring(0,_614).lastIndexOf("--"+">");
if(_616>_617){
_616=_615.substring(_614,_615.length).indexOf("<!"+"--");
_617=_615.substring(_614,_615.length).indexOf("--"+">");
if((_616==-1&&_617>-1)||(_617<_616)){
return _611;
}
}
var _618=_613.replace("--"+">","--RADEDITORSAVEDTAGENDING>");
var _619="<!"+"--RADEDITORSAVEDTAG_"+_612+_618+"--"+">";
return _619;
};
var _61a=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig");
var _61b=_60f.replace(_61a,_610);
return _61b;
}};
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(_61c){
return this._performStripping(_61c);
},_performStripping:function(_61d){
var _61e=_61d;
_61e=_61e.replace(/<BR\s?\/?>\s*<\/(H1|H2|H3|H4|H5|H6|LI|P)/ig,"</$1");
_61e=_61e.replace(/<(H1|H2|H3|H4|H5|H6|LI|P)([^>]*)?><BR\s?\/?>/ig,"<$1 $2>");
return _61e;
}};
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(_61f,_620){
var _621=_61f.getElementsByTagName(_620);
if(!_621){
_621=_61f.ownerDocument.getElementsByTagName(_620);
}
return _621;
},fixLists:function(_622,_623){
var _624=this._getElements(_622,_623);
for(var i=_624.length-1;i>=0;i--){
var list=_624[i];
var _627=list.previousSibling;
if(_627&&_627.nodeType==3){
_627=_627.previousSibling;
}
if(_627&&"li"==list.previousSibling.nodeName.toLowerCase()){
_627.appendChild(list.cloneNode(true));
var _628=list.parentNode;
_628.removeChild(list);
_628=null;
}
}
},getHtmlContent:function(_629){
this.fixLists(_629,"OL");
this.fixLists(_629,"UL");
return _629;
}};
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(_62a,_62b){
var _62c=_62a.getElementsByTagName(_62b);
if(!_62c){
_62c=_62a.ownerDocument.getElementsByTagName(_62b);
}
return _62c;
},_replaceElementWithSpan:function(_62d,_62e,_62f){
var _630=this._getElements(_62d,_62e);
var _631=[];
for(var j=_630.length-1;j>=0;j--){
Array.add(_631,_630[j]);
}
for(var i=0,len=_631.length;i<len;i++){
var _635=_62d.ownerDocument.createElement("span");
_635.style.cssText=_62f;
var _636=_631[i];
var _637=_636.innerHTML;
if($telerik.isIE&&_637==" "){
_635.innerText=_637;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_635,_637);
}
_636.parentNode.replaceChild(_635,_636);
}
},_replaceSpanWithElement:function(_638,_639,_63a){
var _63b=this._getElements(_638,"span");
var _63c=[];
for(var j=_63b.length-1;j>=0;j--){
Array.add(_63c,_63b[j]);
}
for(var i=0,len=_63c.length;i<len;i++){
var _640=[];
var _641=_63c[i];
for(var k=0;k<_641.childNodes.length;k++){
Array.add(_640,_641.childNodes[k].cloneNode(true));
}
if(_641.style.cssText.toLowerCase()==_63a||_641.style.cssText.toLowerCase()==(_63a+";")){
var _643=_638.ownerDocument.createElement(_639);
for(var l=0;l<_640.length;l++){
_643.appendChild(_640[l]);
}
_641.parentNode.replaceChild(_643,_641);
}
}
},getHtmlContent:function(_645){
this._replaceElementWithSpan(_645,"u","text-decoration:underline;");
return _645;
},getDesignContent:function(_646){
this._replaceSpanWithElement(_646,"u","text-decoration: underline");
return _646;
}};
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(_647,_648){
var _649=_647.getElementsByTagName(_648);
if(!_649){
_649=_647.ownerDocument.getElementsByTagName(_648);
}
return _649;
},_singleChild:function(node){
if(node==null||node.parentNode==null){
return false;
}
var _64b=node.parentNode;
var _64c=0;
for(var i=0,len=_64b.childNodes.length;i<len&&_64c<2;i++){
var _64f=_64b.childNodes[i];
if(_64f.nodeType==3&&String(_64f.nodeValue).trim()==""){
continue;
}
_64c++;
}
return (_64c==1);
},_optimizeElement:function(node){
var _651=node.parentNode;
var _652=node.innerHTML;
var _653=["align","dir","lang","title","class","id"];
var _654=true;
for(var i=0,len=_653.length;i<len;i++){
_654|=this._checkAttribute(node,_651,_653[i]);
}
if(!_654){
return;
}
for(var i=0,len=_653.length;i<len;i++){
var _657=_653[i];
var _658=node.getAttribute(_657,2);
if(_658){
_651.setAttribute(_657,_658);
}
}
var _659=$telerik.isIE?node.style.cssText:node.getAttribute("style",2);
if(_659){
var _65a=$telerik.isIE?_651.style.cssText:_651.getAttribute("style",2);
_65a=_65a?_65a+";":"";
if($telerik.isIE){
_651.style.cssText=_65a+_659;
}else{
_651.setAttribute("style",_65a+_659);
}
}
Telerik.Web.UI.Editor.Utils.removeNode(node);
},_checkAttribute:function(node,_65c,_65d){
var _65e=node.getAttribute(_65d,2);
var _65f=_65c.getAttribute(_65d,2);
return (_65e==null||_65f==null||_65e==_65f);
},getHtmlContent:function(_660){
var _661=this._getElements(_660,"span");
if(_661){
var i,len=_661.length;
var _664=[];
for(i=0;i<len;i++){
var span=_661[i];
var _666=span.tagName.toLowerCase();
if(span.parentNode.tagName.toLowerCase()==_666){
if(this._singleChild(span)){
_664[_664.length]=span;
}else{
var _667=Telerik.Web.UI.Editor.Utils.getOuterHtml(span).toLowerCase();
if(_667.indexOf("<"+_666+">")==0){
_664[_664.length]=span;
}
}
}
}
len=_664.length;
for(i=0;i<len;i++){
this._optimizeElement(_664[i]);
}
}
return _660;
}};
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(_668){
var _669=new RegExp("<!"+"--RADEDITORSAVEDCOMMENT","ig");
var _66a=_668.replace(_669,"<!--");
return _66a;
},getDesignContent:function(_66b){
var _66c=new RegExp("<!"+"--(\\[[^]]+\\][\\s\\S]*?)-"+"->","ig");
var _66d=_66b.replace(_66c,"<!-"+"-RADEDITORSAVEDCOMMENT$1-"+"->");
return _66d;
}};
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(_66e){
var _66f=new RegExp("<param([\\s\\S]+?)?>","ig");
var _670=new RegExp("<rade_param([\\s>])","ig");
var _671=_66e;
if(_66f.test(_66e)&&_670.test(_66e)){
_671=_671.replace(_66f,"");
}
_671=_671.replace(_670,"<param$1");
_671=_671.replace(/<\/rade_param>/gi,"");
return _671;
},getDesignContent:function(_672){
var _673=new RegExp("<param([\\s\\S]+?)/?>","ig");
var _674=_672.replace(_673,"<rade_param$1></rade_param><param$1>");
return _674;
}};
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(_675){
var _676=null;
if(_675.tagName.toLowerCase()=="html"){
_676=_675.getElementsByTagName("BODY")[0];
}else{
_676=_675;
}
if($telerik.isIE){
if(_676&&(_676.firstChild)&&("P"==_676.firstChild.tagName)&&(_676.childNodes.length==1)&&(_676.innerHTML.substring(0,3).toLowerCase()=="<p>")){
Telerik.Web.UI.Editor.Utils.removeNode(_676.firstChild);
}
}else{
if(_676&&(_676.childNodes.length==1)&&(_676.firstChild.tagName)&&("br"==_676.firstChild.tagName.toLowerCase())){
_676.innerHTML="";
}
}
return _675;
}};
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(_677){
var re=new RegExp("(<p[^>]*>)(<\\/p>)","ig");
var _679=_677.replace(re,"$1&nbsp;$2");
return _679;
}};
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(_67a){
var _67b=document.location.href.replace(/\?/gi,"\\?");
var re=new RegExp("(<A[^<>]*?(href)\\s*=\\s*['\"])("+_67b+")(\\#[^'\"]*?['\"][^>]*?>)","ig");
var _67d=_67a.replace(re,"$1$4");
return _67d;
}};
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(_67e){
var _67f=_67e.replace(new RegExp("<b(\\s([^>])*?)?>","ig"),"<strong$1>");
_67f=_67f.replace(new RegExp("</b(\\s([^>])*?)?>","ig"),"</strong$1>");
_67f=_67f.replace(new RegExp("<i(\\s([^>])*?)?>","ig"),"<em$1>");
_67f=_67f.replace(new RegExp("</i(\\s([^>])*?)?>","ig"),"</em$1>");
return _67f;
},getDesignContent:function(_680){
var _681=_680.replace(new RegExp("<strong(\\s([^>])*?)?>","ig"),"<b$1>");
_681=_681.replace(new RegExp("</strong(\\s([^>])*?)?>","ig"),"</b$1>");
_681=_681.replace(new RegExp("<em(\\s([^>])*?)?>","ig"),"<i$1>");
_681=_681.replace(new RegExp("</em(\\s([^>])*?)?>","ig"),"</i$1>");
return _681;
}};
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(_682){
var self=this;
var _684=function(_685,_686,_687,_688,_689){
var _68a=_689.indexOf("</head>",_688);
if(_68a!=-1&&_689.indexOf("<body",_68a)!=-1){
return _685;
}else{
self.markerCounter++;
var _68b="RadEditorStyleKeeper"+self.markerCounter;
var _68c="<div id='"+_68b+"' style='display:none;'>&nbsp;</div><"+_686+" reoriginalpositionmarker='"+_68b+"'"+_687;
return _68c;
}
};
var _68d=new RegExp("<(link|style)([^>]*>)","gi");
var _68e=_682.replace(_68d,_684);
return _68e;
}};
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(_68f){
var _690=_68f.getElementsByTagName("HEAD")[0];
var _691=true;
if(!_690){
_690=_68f.ownerDocument.getElementsByTagName("HEAD")[0];
_691=false;
}
if(!_690){
return _68f;
}
this._restoreElements(_690,_68f,"STYLE");
this._restoreElements(_690,_68f,"LINK");
var divs=_68f.getElementsByTagName("DIV");
if(divs){
for(var j=divs.length-1;j>=0;j--){
var _694=divs[j];
if(_694.id.indexOf("RadEditorStyleKeeper")==0){
var _695=_694.parentNode;
_695.removeChild(_694);
}
}
}
divs=null;
if(_691){
this._removeElements(_690,"STYLE");
this._removeElements(_690,"LINK");
}
this._removeMarkerAttributes(_68f,"STYLE");
this._removeMarkerAttributes(_68f,"LINK");
return _68f;
},_restoreElements:function(_696,_697,_698){
var _699;
_699=_696.getElementsByTagName(_698);
this._divs=_697.getElementsByTagName("DIV");
var i=0;
while(_699.length>0&&i<_699.length){
this._restoreStyle(_699[i++]);
}
},_restoreStyle:function(_69b){
var _69c=_69b.getAttribute("reoriginalpositionmarker");
if(_69c){
j=0;
var _69d=null;
while(j<this._divs.length&&!_69d){
if(this._divs[j].id==_69c){
_69d=this._divs[j];
}
j++;
}
if(_69d){
var _69e=_69b.cloneNode(true);
_69e.removeAttribute("reoriginalpositionmarker");
var _69f=_69d.parentNode;
_69f.replaceChild(_69e,_69d);
return true;
}
}
return false;
},_removeElements:function(_6a0,_6a1){
var _6a2=_6a0.getElementsByTagName(_6a1);
if(_6a2){
for(var j=_6a2.length-1;j>=0;j--){
var _6a4=_6a2[j];
if(null!=_6a4.getAttribute("reoriginalpositionmarker")){
var _6a5=_6a4.parentNode;
_6a5.removeChild(_6a4);
}
}
_6a2=null;
}
},_removeMarkerAttributes:function(_6a6,_6a7){
styles=_6a6.getElementsByTagName(_6a7);
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(_6a9){
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=_6a9?_6a9:"FlashManager.gif";
};
Telerik.Web.UI.Editor.MozillaKeepFlashString.prototype={getDesignContent:function(_6aa){
var _6ab=this._flashImageSrc;
var _6ac=function(_6ad,gr1,gr2,gr3,_6b1,str){
var _6b3=new Sys.StringBuilder("<img isflash=\"true\" ");
_6b3.append(gr1.replace(/\ssrc=/gi,String.format(" src=\"{0}\" flashSrc=",_6ab)));
_6b3.append(" />");
return _6b3.toString();
};
var _6b4=new RegExp("<embed([^>]+)>?","ig");
var _6b5=_6aa.replace(_6b4,_6ac);
_6b5=_6b5.replace(/<\/embed>/ig,"");
return _6b5;
}};
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(_6b6){
var _6b7=_6b6.getElementsByTagName("IMG");
for(var i=0;i<_6b7.length;i++){
var _6b9=_6b7[i];
var _6ba=_6b9.getAttribute("isflash");
if(_6ba!=null){
var _6bb=_6b9.getAttribute("flashSrc");
var _6bc=Telerik.Web.UI.Editor.Utils.getOuterHtml(_6b9);
_6bc=_6bc.replace(/<img/gi,"<embed");
var oDiv=_6b9.ownerDocument.createElement("DIV");
oDiv.innerHTML=_6bc;
newNode=oDiv.firstChild;
if(_6bb){
newNode.src=_6bb;
if($telerik.isSafari){
newNode.setAttribute("src",_6bb);
}
}
newNode.removeAttribute("flashSrc");
newNode.removeAttribute("isflash");
var _6be=_6b9.parentNode;
_6be.insertBefore(newNode,_6b9);
_6be.removeChild(_6b9);
i--;
}
}
return _6b6;
}};
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(_6bf){
var html=_6bf;
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(_6c2){
var _6c3=_6c2.ownerDocument;
var _6c4=_6c3.createElement("SPAN");
var span,font,_6c7;
var _6c8=_6c2.getElementsByTagName("FONT");
while(_6c8.length>0){
font=_6c8[0];
_6c7=font.parentNode;
span=_6c4.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);
}
_6c7.replaceChild(span,font);
_6c8=_6c2.getElementsByTagName("FONT");
}
return _6c2;
},getDesignContent:function(_6ca){
var _6cb=_6ca.ownerDocument;
var _6cc=_6cb.createElement("FONT");
var span,font,_6cf;
var _6d0=_6ca.getElementsByTagName("SPAN");
while(_6d0.length>0){
span=_6d0[0];
_6cf=span.parentNode;
font=_6cc.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 _6d2=null;
if(-1!=span.style.fontSize.indexOf("px")){
_6d2=this._fontSizesRevPx[parseInt(span.style.fontSize)];
}
if(typeof (_6d2)!="undefined"&&null!=_6d2){
font.size=_6d2+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);
}
_6cf.replaceChild(font,span);
_6d0=_6ca.getElementsByTagName("SPAN");
}
return _6ca;
},_fixColorValue:function(_6d3){
if(_6d3.toLowerCase().indexOf("rgb")!=-1){
var _6d4="#";
var _6d5=function(val){
var _6d7=parseInt(val,10).toString(16);
_6d4=_6d4+(_6d7.length==1?"0"+_6d7:_6d7);
return val;
};
_6d3=_6d3.replace(/(\d+)/gi,_6d5);
_6d5=null;
return _6d4;
}else{
return _6d3;
}
},_removeElementStyleAttribute:function(_6d8,_6d9){
if(_6d8.style&&_6d8.style[_6d9]){
if(_6d8.style.removeAttribute){
_6d8.style.removeAttribute(_6d9);
}else{
if(_6d8.style.removeProperty){
_6d9=_6d9.replace(/([A-Z])/g,"-$1").toLowerCase();
_6d8.style.removeProperty(_6d9);
}
}
if(_6d8.style[_6d9]){
_6d8.style[_6d9]=null;
}
if(_6d8.style.cssText){
}else{
_6d8.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(_6da,_6db){
var _6dc=_6da.getElementsByTagName(_6db);
if(!_6dc){
_6dc=_6da.ownerDocument.getElementsByTagName(_6db);
}
return _6dc;
},getHtmlContent:function(_6dd){
var _6de=_6dd;
var tags=_6de.getElementsByTagName("body");
var _6e0=tags.length;
for(i=0;i<_6e0;i++){
this.convertAttribute(tags[i],"bgColor","backgroundColor");
}
var tags=_6de.getElementsByTagName("p");
var _6e0=tags.length;
for(i=0;i<_6e0;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
var tags=_6de.getElementsByTagName("div");
var _6e0=tags.length;
for(i=0;i<_6e0;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
tags=_6de.getElementsByTagName("table");
_6e0=tags.length;
for(i=0;i<_6e0;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
}
tags=_6de.getElementsByTagName("td");
_6e0=tags.length;
for(i=0;i<_6e0;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=_6de.getElementsByTagName("img");
_6e0=tags.length;
for(i=0;i<_6e0;i++){
var obj=tags[i];
this.convertImgAlignAttribute(obj);
var _6e2=new Array("marginLeft","marginRight");
this.convertAttribute(obj,"hspace",_6e2);
_6e2=new Array("marginTop","marginBottom");
this.convertAttribute(obj,"vspace",_6e2);
this.convertBorderAttribute(obj);
}
tags=_6de.getElementsByTagName("ul");
_6e0=tags.length;
for(i=0;i<_6e0;i++){
this.convertTypeAttribute(tags[i]);
}
tags=_6de.getElementsByTagName("ol");
_6e0=tags.length;
for(i=0;i<_6e0;i++){
this.convertTypeAttribute(tags[i]);
}
return _6de;
},getDesignContent:function(_6e3){
var _6e4=_6e3;
var tags=_6e4.getElementsByTagName("body");
var _6e6=tags.length;
for(i=0;i<_6e6;i++){
this.convertCSSProperty(tags[i],"bgColor","backgroundColor");
}
var tags=_6e4.getElementsByTagName("p");
var _6e6=tags.length;
for(i=0;i<_6e6;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6e4.getElementsByTagName("div");
_6e6=tags.length;
for(i=0;i<_6e6;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6e4.getElementsByTagName("table");
_6e6=tags.length;
for(i=0;i<_6e6;i++){
var obj=tags[i];
this.convertCSSProperty(obj,"bgColor","backgroundColor");
this.convertCSSProperty(obj,"background","backgroundImage");
}
tags=_6e4.getElementsByTagName("td");
_6e6=tags.length;
for(i=0;i<_6e6;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=_6e4.getElementsByTagName("img");
_6e6=tags.length;
for(i=0;i<_6e6;i++){
var obj=tags[i];
var _6e8=new Array("marginLeft","marginRight");
this.convertCSSProperty(obj,"hspace",_6e8);
_6e8=new Array("marginTop","marginBottom");
this.convertCSSProperty(obj,"vspace",_6e8);
this.convertBorderCSS(obj);
}
tags=_6e4.getElementsByTagName("ul");
_6e6=tags.length;
for(i=0;i<_6e6;i++){
this.convertListStyleTypeStyle(tags[i]);
}
tags=_6e4.getElementsByTagName("ol");
_6e6=tags.length;
for(i=0;i<_6e6;i++){
this.convertListStyleTypeStyle(tags[i]);
}
return _6e4;
},convertAttribute:function(obj,_6ea,_6eb){
var _6ec=obj.getAttribute(_6ea);
var _6ed=_6ec;
if(_6ea=="background"){
_6ec=obj.getAttribute(_6ea,2);
_6ed="url("+_6ec+")";
}else{
if(_6ea=="width"||_6ea=="height"||_6ea=="vspace"||_6ea=="hspace"){
if(!(typeof (_6ed)=="string"&&_6ed.match("%"))){
_6ed=parseInt(_6ed)+"px";
}
}else{
if(_6ea=="noWrap"){
_6ec=obj.noWrap;
_6ed="nowrap";
}
}
}
if(_6ec){
if(typeof (_6eb)=="object"){
var _6ee=_6eb.length;
for(var i=0;i<_6ee;i++){
pValue=obj.style[_6eb[i]];
if(!pValue){
obj.style[_6eb[i]]=_6ed;
}
}
}else{
pValue=obj.style[_6eb];
if(!pValue){
obj.style[_6eb]=_6ed;
}
}
obj.removeAttribute(_6ea);
}
},convertCSSProperty:function(obj,_6f1,_6f2){
var _6f3=obj.getAttribute(_6f1);
var _6f4=obj.style[_6f2];
var _6f5=_6f4;
if(_6f2=="backgroundImage"){
_6f5=_6f4.slice(4,_6f4.length-1);
}else{
if(_6f2=="width"||_6f2=="height"){
if(_6f4&&!_6f4.match("%")){
_6f5=parseInt(_6f4);
}
}else{
if(_6f2=="whiteSpace"){
_6f3=obj.noWrap;
_6f5="nowrap";
}else{
if(_6f1=="vspace"||_6f1=="hspace"){
var _6f6=_6f2.length;
for(var i=0;i<_6f6;i++){
if(i==0){
_6f4=obj.style[_6f2[i]];
_6f5=parseInt(_6f4);
}else{
if(_6f4!=obj.style[_6f2[i]]){
_6f4=false;
break;
}
}
}
}
}
}
}
if(_6f4&&!_6f3){
obj.setAttribute(_6f1,_6f5);
if(typeof (_6f2)=="object"){
_6f6=_6f2.length;
for(var i=0;i<_6f6;i++){
obj.style[_6f2[i]]="";
}
}else{
obj.style[_6f2]="";
}
}
},convertImgAlignAttribute:function(obj){
var _6f9=obj.getAttribute("align");
var _6fa=($telerik.isIE)?"styleFloat":"cssFloat";
if(_6f9){
_6f9=_6f9.toLowerCase();
obj.style.verticalAlign="";
obj.style[_6fa]="";
switch(_6f9){
case "left":
obj.style[_6fa]="left";
break;
case "right":
obj.style[_6fa]="right";
break;
case "bottom":
case "baseline":
case "absbottom":
obj.style[_6fa]="";
obj.style.verticalAlign="text-bottom";
break;
case "middle":
case "absmiddle":
obj.style[_6fa]="";
obj.style.verticalAlign="middle";
break;
case "top":
case "texttop":
obj.style[_6fa]="";
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 _6ff=obj.getAttribute("type");
if(t&&!_6ff){
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 _704=obj.getAttribute("border");
if(b&&obj.style.borderStyle.match("none")&&(!_704||_704==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(_705){
if(!_705){
return "";
}
var sb=new Sys.StringBuilder("");
this._appendNodeXhtml(_705,sb);
return sb.toString();
},_convertAttribute:function(s){
return String(s).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
},_getAttributeValue:function(_708,_709,sb){
var name=_708.nodeName;
var _70c=_708.nodeValue;
if(name!="style"){
if($telerik.isIE&&(name=="type"||name=="value"||name=="selected")){
if(!_70c){
return;
}
}else{
if(!_708.specified){
if($telerik.isIE&&_70c==""&&typeof (_709[name])=="string"&&_709[name]!=""){
_70c=_709[name];
}else{
return;
}
}
}
if(!_70c){
return;
}
if(!isNaN(_70c)){
_70c=_709.getAttribute(name);
}
if($telerik.isIE&&(name=="href"||name=="src")){
_70c=_709.getAttribute(name,2);
}
sb.append(" "+(_708.expando?name:name.toLowerCase())+"=\""+this._convertAttribute(_70c)+"\"");
}else{
var _70d=_709.style.cssText;
if(_70d){
sb.append(" style=\""+this._convertAttribute(_70d.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 _713=node.getAttribute("href",2);
if(_713){
_713=_713.replace("about:blank","");
_713=_713.replace("about:","");
_713=_713.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
sb.append(" href=\""+_713+"\"");
node.removeAttribute("href",0);
}
}
try{
var _714=node.attributes;
var l=_714.length;
for(var i=0;i<l;i++){
this._getAttributeValue(_714[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 _717="";
if(node.altHtml){
_717=node.altHtml;
}else{
_717=node.innerHTML;
}
if($telerik.isIE){
_717=_717.replace(/\soriginalAttribute="[^"]+"/gi,"");
_717=_717.replace(/\soriginalPath="[^"]+"/gi,"");
}
sb.append(_717);
sb.append("</object>");
break;
case "title":
case "style":
case "comment":
case "noscript":
var _717=node.innerHTML;
if($telerik.isIE&&_717.length==0){
_717=node.ownerDocument.title;
}
sb.append(">"+_717+"</"+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 _71b=String(node.nodeValue);
var _71c=node.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(_71c=="style"||_71c=="script")){
sb.append(_71b);
}else{
_71b=_71b.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if($telerik.isFirefox){
_71b=_71b.replace(/[\u00a0]/g,"&nbsp;");
}
sb.append(_71b);
}
},_appendCDataNode:function(node,sb){
sb.append("<![CDA"+"TA[\n"+node.nodeValue+"\n]"+"]>");
},_appendCommentNode:function(node,sb){
var _721=node.nodeValue;
if(!_721&&node.text){
_721=node.text;
}else{
_721="<!--"+_721+"-->";
}
sb.append(_721);
},_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 _724="P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION";
var _725="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var _726=_725+"|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+_724+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+_724+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+_725+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+_726+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+_726+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={getHtmlContent:function(html){
var _728=html.trim();
if(_728.indexOf("<body")==0){
_728=_728.substring(_728.indexOf(">")+1,_728.length-7);
}
this._protectedData=[];
var self=this;
var _72a=function(_72b,_72c,_72d,_72e,_72f,_730){
Array.add(self._protectedData,_72d);
return _72c+"RADEDITORFORMATTED_"+self._protectedData.length+_72e;
};
_728=_728.replace(this._ignoreTags,_72a);
var _731="$&";
if($telerik.isSafari2){
_731="$0";
}
_728=_728.replace(this._tagsNLBefore,"\n"+_731);
_728=_728.replace(this._tagsNLAfter,_731+"\n");
_728=_728.replace(this._tagsNLNoCloseAfter,_731+"\n");
_728=_728.replace(this._tagsNLBeforeAndAfter,"\n"+_731+"\n");
var _732=_728.split(this._shrinkNL);
var _733=new Sys.StringBuilder("");
var _734="";
for(var i=0;i<_732.length;i++){
var line=_732[i];
if(line.length==0){
continue;
}
if(this._tagsDecIndent.test(line)){
if(_734.length>this._indentPattern.length){
_734=_734.substring(this._indentPattern.length);
}else{
_734="";
}
}
_733.append(_734);
_733.append(line);
_733.append("\n");
if(this._tagsIncIndent.test(line)){
_734+=this._indentPattern;
}
}
_728=_733.toString();
for(var i=0;i<this._protectedData.length;i++){
var _737=new RegExp("RADEDITORFORMATTED_"+(i+1));
var _738=this._protectedData[i].replace(/\$/gi,"$$$$");
_728=_728.replace(_737,_738);
}
return _728;
}};
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(_739){
this._updateElements(_739,"A","href");
this._updateElements(_739,"AREA","href");
this._updateElements(_739,"IMG","src");
this._updateElements(_739,"EMBED","src");
return _739;
},_getElements:function(_73a,_73b){
var _73c=_73a.getElementsByTagName(_73b);
if(!_73c){
_73c=_73a.ownerDocument.getElementsByTagName(_73b);
}
return _73c;
},_updateElements:function(_73d,_73e,_73f){
var _740=_73d.ownerDocument.createElement("div");
var _741=this._getElements(_73d,_73e);
if(_741){
for(var i=0;i<_741.length;i++){
var _743=_741[i].getAttribute(_73f,2);
if("href"==_73f&&_743){
_740.innerHTML="<a href=\""+_743.replace(/\"/gi,"%22")+"\">test</a>";
if($telerik.isIE){
var _744=_741[i].innerHTML;
}
_741[i].setAttribute("href",_740.childNodes[0].href);
if($telerik.isIE){
if((_744.indexOf("www.")==0&&_741[i].innerHTML.match("[a-z]+://"))||(_744.indexOf("mailto:")==-1&&_741[i].innerHTML.match("mailto:"))){
_741[i].innerHTML=_744;
}
}
}else{
if("src"==_73f&&_743){
_740.innerHTML="<img src=\""+_743.replace(/\"/gi,"%22")+"\" />";
_741[i].setAttribute("src",_740.childNodes[0].src);
}
}
}
}
_740.innerHTML="";
_740=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(_745){
this._enableXhtmlFilter=_745;
},add:function(_746){
Array.add(this._filters,_746);
},addAt:function(_747,_748){
Array.insert(this._filters,_748,_747);
},remove:function(_749){
Array.remove(this._filters,_749);
},removeAt:function(_74a){
Array.removeAt(this._filters,_74a);
},getFilterAt:function(_74b){
return this._filters[_74b];
},getFilterByName:function(name){
for(var i=0;i<this._filters.length;i++){
var _74e=this._filters[i];
if(_74e&&name==_74e.get_name()){
return _74e;
}
}
},getDesignContent:function(_74f){
var _750=_74f;
for(var i=0;i<this._filters.length;i++){
var _752=this._filters[i];
if((!_752.get_isDom())&&(false!=_752.get_enabled())&&_752.getDesignContent){
try{
_750=_752.getDesignContent(_750);
}
catch(exc){
alert("Error while executing filter "+_752.get_name()+" - "+exc.toString());
}
}
}
return _750;
},getDesignContentDom:function(_753){
for(var i=0;i<this._filters.length;i++){
var _755=this._filters[i];
if((_755.get_isDom())&&(false!=_755.get_enabled())&&_755.getDesignContent){
try{
_753=_755.getDesignContent(_753);
}
catch(exc){
alert("Error while executing filter "+_755.get_name()+" - "+exc.toString());
}
}
}
return _753;
},getHtmlContent:function(_756){
for(var i=0;i<this._filters.length;i++){
var _758=this._filters[i];
if((_758.get_isDom())&&(false!=_758.get_enabled())&&_758.getHtmlContent){
try{
_756=_758.getHtmlContent(_756);
}
catch(exc){
alert("Error while executing filter "+_758.get_name()+" - "+exc.toString());
}
}
}
var _759;
if(this.get_enableXhtmlFilter()){
try{
_759=this._convertToXhtmlFilter.getHtmlContent(_756);
}
catch(exc){
alert("Error while executing filter XHTML - "+exc.toString());
}
}else{
_759=$telerik.getOuterHtml(_756);
}
_759=_759.replace(/<body\s*\/>/i,"<body></body>").trim();
for(var i=0;i<this._filters.length;i++){
var _758=this._filters[i];
if((!_758.get_isDom())&&(false!=_758.get_enabled())&&_758.getHtmlContent){
try{
_759=_758.getHtmlContent(_759);
}
catch(exc){
alert("Error while executing filter "+_758.get_name()+" - "+exc.toString());
}
}
}
return _759;
}};
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(_75a){
this.Window=_75a;
this.Document=_75a.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 _75b=this.Document.selection.createRange();
if(_75b.length){
this.SourceIndex=_75b.item(0).sourceIndex;
}else{
this.StartBookmark=_75b.getBookmark();
}
},restore:function(_75c){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.Document.body,this.HtmlText);
this.select(_75c);
},select:function(_75d){
if(null!=this.SourceIndex){
var _75e=this.Document.body.createControlRange();
_75e.addElement(this.Document.all(this.SourceIndex));
_75e.select();
}else{
if(null!=this.StartBookmark){
var _75e=this.Document.body.createTextRange();
_75e.moveToBookmark(this.StartBookmark);
_75e.select();
if(true==_75d&&_75e.collapse){
_75e.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(_75f){
if(_75f){
return {anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_75f.anchorNode),anchorOffset:_75f.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_75f.focusNode),focusOffset:_75f.focusOffset,isCollapsed:_75f.isCollapsed};
}else{
return {};
}
},_moveToBookmark:function(_760,_761){
var _762=_761.anchorNodeBookmark.select();
var _763=_761.focusNodeBookmark.select();
_760.collapse(_762,_761.anchorOffset);
if(!_761.isCollapsed){
_760.extend(_763,_761.focusOffset);
}
}};
}
Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(_764,node){
this.Window=_764;
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(_767,node){
var n,res;
for(var i=0;i<_767.childNodes.length;i++){
n=_767.childNodes[i];
res=this._findNodePath(n,node);
if(""!=res){
return ""+i+","+res;
}
if(n==node){
return ""+i;
}
}
return "";
},_findNode:function(_76c,_76d){
var arr=_76d.split(",");
for(var i=0;i<arr.length;i++){
_76c=_76c.childNodes[arr[i]];
}
return _76c;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Selection=function(_770){
this._window=_770;
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(_771,_772){
_772=(_772==true);
if($telerik.isIE){
return this._executeIE(_771,_772);
}else{
return this._executeMozilla(_771,_772);
}
},_executeIE:function(_773,_774){
var _775=this._window.document;
var _776=_775.selection;
if(_776.type.toLowerCase()!="none"){
_776.createRange().execCommand("Delete");
}
if(_776.type.toLowerCase()!="none"){
_775.execCommand("Delete");
}
_775.body.setActive();
selRange=_776.createRange();
if(selRange&&selRange.length){
var _777=selRange.item(0);
if(_777&&_777.tagName=="BODY"){
var _778=_777.getElementsByTagName("FORM")[0];
if(_778){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_778,_778.innerHTML+_773);
}
}
}else{
var _779=selRange.duplicate();
_779.collapse(true);
_773=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(_773);
selRange.pasteHTML(_773);
Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(selRange.parentElement());
if(_774){
_779.setEndPoint("EndToEnd",selRange);
_779.select();
}
}
return true;
},_executeMozilla:function(_77a,_77b){
var oDoc=this._window.document;
var _77d=oDoc.createElement("SPAN");
_77d.innerHTML=_77a;
var _77e="radetempnode";
if(this.isOpera){
_77d.setAttribute("id",_77e);
}
this._insertNodeAtSelection(this._window,_77d,true);
if(this.isOpera){
var _77f=oDoc.createRange();
var _780=this._window.getSelection();
var span=oDoc.getElementById(_77e);
_77f.selectNodeContents(span);
var _782=_77f.extractContents();
_77f.selectNode(span);
var _783=_77f.extractContents();
_77f.insertNode(_782);
_780.addRange(_77f);
return true;
}else{
if(!this.isSafari){
var _77f=oDoc.createRange();
_77f.selectNodeContents(_77d);
var _782=_77f.extractContents();
_77f.selectNode(_77d);
_77f.deleteContents();
this._insertNodeAtSelection(this._window,_782,_77b);
}
}
return true;
},_insertNodeAtSelection:function(win,_785,_786){
var _787=win.getSelection();
if(_787.rangeCount==0){
win.document.body.appendChild(_785);
return;
}
var _788=null;
if(_787.getRangeAt){
_788=_787.getRangeAt(0);
}else{
_788=win.document.createRange();
_788.setStart(_787.anchorNode,_787.anchorOffset);
_788.setEnd(_787.focusNode,_787.focusOffset);
}
if(_787.removeAllRanges){
_787.removeAllRanges();
}
_788.deleteContents();
var _789=$telerik.isSafari&&!$telerik.isSafari3?_787.baseNode:_788.startContainer;
var _78a=$telerik.isSafari&&!$telerik.isSafari3?_787.baseOffset:_788.startOffset;
if($telerik.isSafari&&null==_789){
_789=win.document.body;
}
_788=win.document.createRange();
if((_785.nodeType==3)&&(_789.nodeType==3)){
_789.insertData(_78a,_785.nodeValue);
_788.setEnd(_789,_78a+_785.length);
if(_786){
_788.setStart(_789,_78a);
}else{
_788.setStart(_789,_78a+_785.length);
}
}else{
var _78b;
if(_789.nodeType==3){
var _78c=_789;
_789=_78c.parentNode;
var _78d=_78c.nodeValue;
var _78e=_78d.substr(0,_78a);
var _78f=_78d.substr(_78a);
var _790=win.document.createTextNode(_78e);
var _78b=win.document.createTextNode(_78f);
_789.insertBefore(_78b,_78c);
_789.insertBefore(_785,_78b);
try{
_789.insertBefore(_790,_785);
}
catch(exc){
}
_789.removeChild(_78c);
}else{
if(_789.childNodes.length>0){
_78b=_789.childNodes[_78a];
_789.insertBefore(_785,_78b);
}else{
if(_789.tagName!="BODY"){
_789=_789.parentNode;
}
_789.appendChild(_785);
}
}
try{
if(_786){
_788.setStart(_785,0);
_788.setEnd(_78b,0);
}else{
_788.setStartBefore(_78b);
_788.setEndBefore(_78b);
}
}
catch(exc){
}
}
try{
_787.addRange(_788);
}
catch(exc){
}
},selectRange:function(_791){
if(!_791){
return;
}
var _792=this._window;
if(_791.select){
_791.select();
}else{
if(_792.getSelection){
var _793=_792.getSelection();
if(_793.removeAllRanges){
_793.removeAllRanges();
_793.addRange(_791);
}else{
var base=_791.baseNode;
if(null==base){
base=_792.document.body;
}
var _795=_791.extentNode;
if(null==_795){
_795=_792.document.body;
}
_793.setBaseAndExtent(base,_791.startOffset,_795,_791.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 _796=this._window.getSelection();
if(!_796||_796.rangeCount<1){
return null;
}
var rng=null;
if(_796.getRangeAt){
rng=_796.getRangeAt(0);
}else{
rng=this._window.document.createRange();
rng.setStart(_796.anchorNode,_796.anchorOffset);
rng.setEnd(_796.focusNode,_796.focusOffset);
}
return rng;
}
}
},getParentElement:function(){
var rng=this.getRange();
if(!rng){
return null;
}
if(rng.commonAncestorContainer){
var _799=this._window.getSelection();
var _79a=rng.startContainer?rng.startContainer:_799.baseNode;
var _79b=rng.endContainer?rng.endContainer:_799.extentNode;
var _79c=rng.startOffset!=null?rng.startOffset:_799.baseOffset;
var _79d=rng.endOffset!=null?rng.endOffset:_799.extentOffset;
if(_79a==_79b&&(_79d-_79c)==1){
return _799.anchorNode.childNodes[_799.anchorOffset];
}else{
if(!rng.commonAncestorContainer.tagName){
if(this._window.document==rng.commonAncestorContainer&&_799.baseNode){
return _799.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 _79f=oSel.focusNode;
if(!_79f||_79f.nodeType==1){
return false;
}
return (_79f.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 _7a2=this._window.getSelection();
var rng=null;
if(null==_7a2){
return "";
}
if(_7a2.getRangeAt&&typeof (_7a2.rangeCount)!="undefined"&&_7a2.rangeCount==0){
return "";
}
if(_7a2.getRangeAt){
rng=_7a2.getRangeAt(0);
var _7a3=this._window.document.createElement("div");
var _7a4=rng.cloneContents();
if(_7a4){
_7a3.appendChild(_7a4);
return _7a3.innerHTML;
}else{
return "";
}
}else{
return _7a2;
}
}else{
return "";
}
}
},collapse:function(_7a5){
_7a5=(_7a5==true);
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.collapse){
rng.collapse(_7a5);
rng.select();
}
}else{
if(this._window.getSelection){
var _7a7=this._window.getSelection();
if(!_7a7.isCollapsed){
if(_7a5){
_7a7.collapseToStart();
}else{
_7a7.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(_7a8,_7a9){
var rs=new Telerik.Web.UI.EditorShortCut(_7a8,_7a9);
rs.HashValue=this._getShortCutHashValue(rs);
this._shortcuts[rs.HashValue]=rs;
},removeShortCut:function(_7ab){
var _7ac=this._findByName(_7ab);
if(_7ac){
this._shortcuts[_7ac.HashValue]=null;
}
},setShortCut:function(_7ad,_7ae){
this.removeShortCut(_7ad);
this.addShortCut(_7ad,_7ae);
},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(_7b0,_7b1,_7b2,_7b3,_7b4,_7b5,_7b6){
var _7b7=this._getHashValue(_7b0,_7b1,_7b2,_7b3,_7b4,_7b5,_7b6);
return this._shortcuts[_7b7];
},_getHashValue:function(_7b8,_7b9,_7ba,_7bb,_7bc,_7bd,_7be){
var _7bf=_7b8&65535;
var _7c0=0;
_7c0|=(_7b9?(1<<0):0);
_7c0|=(_7bb?(1<<2):0);
_7c0|=(_7bd?(1<<4):0);
_7bf|=(_7c0<<16);
return _7bf;
},_getShortCutHashValue:function(_7c1){
return this._getHashValue(_7c1.KeyCode,_7c1.CtrlKey,_7c1.LeftCtrlKey,_7c1.ShiftKey,_7c1.LeftShiftKey,_7c1.AltKey,_7c1.LeftAltKey);
},_findByName:function(_7c2){
var _7c3;
for(var _7c4 in this._shortcuts){
_7c3=this._shortcuts[_7c4];
if(null!=_7c3&&_7c3._name==_7c2){
return _7c3;
}
}
return null;
}};
Telerik.Web.UI.EditorShortCut=function(_7c5,_7c6){
this._name=_7c5;
this.setShortCut(_7c6);
};
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(_7c7){
this._name=_7c7;
},setShortCut:function(_7c8){
this._parseShortcutString(_7c8);
},_parseShortcutString:function(_7c9){
if("string"==typeof (_7c9)){
this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
_7c9=_7c9.replace(/\s*/gi,"");
_7c9=_7c9.replace(/\+\+/gi,"+PLUS");
var _7ca=_7c9.split("+");
var _7cb="";
for(var i=0;i<_7ca.length;i++){
_7cb=_7ca[i].toUpperCase();
switch(_7cb){
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=_7cb.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(_7cd,_7ce,_7cf){
if(typeof (this._controls[_7cd])=="undefined"){
this._controls[_7cd]={};
}
if(typeof (this._controls[_7cd][_7ce])=="undefined"){
this._controls[_7cd][_7ce]={};
}
var _7d0=this._controls[_7cd][_7ce];
for(var _7d1 in _7cf){
if(typeof (_7cf[_7d1])=="string"){
_7d0[_7d1]=_7cf[_7d1];
}
}
return _7d0;
}};
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(_7d2){
Telerik.Web.UI.RadEditor.initializeBase(this,[_7d2]);
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(_7d3){
this.get_events().addHandler("spellCheckLoaded",_7d3);
},remove_spellCheckLoaded:function(_7d4){
this.get_events().removeHandler("spellCheckLoaded",_7d4);
},get_ajaxSpellCheck:function(){
return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(_7d5){
this._ajaxSpellCheck=_7d5;
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(_7d7){
this._spellAllowAddCustom=_7d7;
},get_spellCheckJSON:function(){
return this._spellCheckJSON;
},set_spellCheckJSON:function(_7d8){
this._spellCheckJSON=_7d8;
},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(_7da,args){
},raiseEvent:function(_7dc,args){
if(_7dc!="selectionChange"||this.get_mode()==Telerik.Web.UI.EditModes.Design){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"raiseEvent",[_7dc,args]);
}
},_initializeToolProvider:function(){
var _7de=this;
var _7df=_7de.get_toolProviderID();
if(_7df&&$find(_7df)){
var _7e0=$find(_7df);
var _7e1=_7e0.get_dialogOpener();
_7de.set_dialogOpener(_7e1);
var _7e2=_7e0.get_contextMenusJSON();
if(_7e2&&_7e2.concat){
_7de.set_contextMenusJSON(_7e2.concat([]));
}
var _7e3=_7e0.get_modulesJSON();
if(_7e3&&_7e3.concat){
_7de.set_modulesJSON(_7e3.concat([]));
}
var root=this.get_toolContainer();
root.innerHTML="";
this._toolJSON=[];
var html=_7e0.get_toolHTML();
root.innerHTML=html;
var json=_7e0.get_toolJSON().concat([]);
this.set_toolJSON(json);
if(_7e0.get_spellCheckJSON){
_7de.set_spellCheckJSON(_7e0.get_spellCheckJSON());
}
if(_7e0.get_ajaxSpellCheckScriptReference){
var ref=_7e0.get_ajaxSpellCheckScriptReference();
if(ref){
_7de.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 _7e9=this;
window.setTimeout(function(){
if($telerik.isIE){
var area=_7e9.get_contentArea();
if(!area){
return;
}
try{
var _7eb=Telerik.Web.UI.Editor.Utils.storeBrowserPosition();
var r=area.createTextRange();
var _7ed=document.body.createTextRange();
if(_7eb&&_7eb.y>0){
_7ed.moveToElementText(_7e9.get_contentAreaElement());
}else{
_7ed.moveStart("textedit",_7ed.text.length);
}
_7ed.collapse(true);
_7ed.select();
if(_7eb&&_7eb.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 _7ee=this.get_mainTable();
this._originalHeight=_7ee.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
this._createTools();
this._makeResizeable(true);
var _7ef=$get(this.get_id()+"ContentHiddenTextarea");
if(_7ef){
_7ef.setAttribute("id",this.get_id());
this._contentHiddenTextarea=_7ef;
}
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 _7f0=$get(this.get_id()+"Module");
_7f0.style.display="none";
var _7f1=this;
window.setTimeout(function(){
_7f1._modulesManager.initialize();
_7f0.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 _7f3=this.get_element().getAttribute("accessKey");
if(_7f3){
this.get_element().removeAttribute("accessKey");
var _7f4=document.createElement("input");
_7f4.setAttribute("name",this.get_id()+"EditorAccessKey");
_7f4.setAttribute("type","text");
_7f4.setAttribute("id",this.get_id()+"EditorAccessKey");
_7f4.setAttribute("accessKey",_7f3);
this._accessKeyTextbox=_7f4;
$addHandlers(this._accessKeyTextbox,{"focus":this.setFocus},this);
var _7f5=document.createElement("div");
_7f5.style.width="0px";
_7f5.style.height="0px";
_7f5.style.overflow="hidden";
_7f5.appendChild(this._accessKeyTextbox);
this.get_element().appendChild(_7f5);
}
},_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 _7f6=this;
this.attachEventHandler("keydown",function(e){
if(!_7f6._isKeyUpButton(e)){
_7f6._resizeContentArea(e);
}
});
this.attachEventHandler("keyup",function(e){
if(_7f6._isKeyUpButton(e)||(e.keyCode==13&&!_7f6.isIE)){
_7f6._resizeContentArea(e);
}
});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
},_isKeyUpButton:function(e){
var _7fa=e.keyCode;
if(_7fa==8||_7fa==46){
return true;
}
return false;
},_getCurrentFontSize:function(){
var o=this.getSelectedElement();
var _7fc=parseInt($telerik.getCurrentStyle(o,"fontSize"));
return _7fc;
},_resizeContentArea:function(e){
var body=this.isIE?this._document.body:this._document.documentElement;
var _7ff=this._contentAreaElement;
var _800=_7ff.parentNode;
var _801=this._initialContentHeight;
var _802=_7ff.offsetHeight;
var _803=body.scrollHeight+(e&&e.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(_803==_802){
return;
}
if((_801==_802)&&(_803<=_801)){
return;
}
var _804=(_803>_801)?_803:_801;
_7ff.style.height=_804+"px";
if(_803>_802){
_800.style.height=parseInt(_803)+"px";
}else{
var _805=this.get_element();
var _806=_805.offsetHeight-(_800.offsetHeight-_7ff.offsetHeight);
if(_7ff.style.height!="100%"){
_800.style.height="";
this._updateEditorSize(_806);
}
return;
}
this._updateEditorSize(null,true);
},_makeResizeable:function(_807){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_807){
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 _808={se:this._bottomResizer};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._rootElement,_808,this._tableElement);
},_getInvisibleParent:function(){
return Telerik.Web.UI.Editor.Utils.getInvisibleParent(this.get_element());
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixIEVisibilityProblems:function(_809){
if(!this.isIE){
return;
}
if(_809){
var _80a=this._getInvisibleParent();
if(_80a){
this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=_80a;
$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(_80b){
if(this.isIE){
return;
}
if(_80b){
var _80c=this._getInvisibleParent();
if(_80c){
this._invisibleParent=_80c;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
_80c.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 _80e=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_80e!="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 _810=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_810,"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 _812=$telerik.isDescendantOrSelf(e.target,this.get_element());
if(_812){
this.onParentNodeChanged();
}
},onParentNodeChanged:function(){
if(!$telerik.isIE){
var _813=this.get_html(true);
var _814=this.get_contentAreaElement();
this._contentWindow=_814.contentWindow;
this._setContentAreaHtml(_813,true);
this.set_editable(true);
}
},onResizeStart:function(){
this._resizeSelection=this.getSelection().getRange();
},onResizeEnd:function(){
if(!this.isIE){
return;
}
this.setActive();
if(this._resizeSelection){
var _815=this._resizeSelection.parentElement();
if(_815&&(this.get_document()==_815.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 _816=this.getSelection().getRange();
var _817=this.getSelectedElement();
if(_816!=null&&_817!=null&&_817.ownerDocument!=this.get_document()){
_816=null;
}
return _816;
},selectElement:function(_818,_819){
if(Telerik.Web.UI.Editor.Utils.selectElement(this.get_contentWindow(),_818)&&false!=_819){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},undo:function(_81a){
this._commandsManager.undo(_81a);
},redo:function(_81b){
this._commandsManager.redo(_81b);
},executeCommand:function(_81c,_81d,_81e){
if(!_81c.get_window()){
_81c.set_window(this.get_contentWindow());
}
if(false!=_81d&&!this.isOpera){
this.setFocus();
}
this._commandsManager.execute(_81c,_81e);
},executeBrowserCommand:function(_81f,_820,_821,_822){
var _823=this._localization[_81f];
this.executeCommand(new Telerik.Web.UI.Editor.BrowserCommand(_823,this._contentWindow,_81f,_821));
this.setActive();
this.setFocus();
if(true==_822){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},createElement:function(_824,_825,_826,sId,_828,_829){
var _82a=this._document.createElement(_824);
if(_825){
_82a.style.width=_825;
}
if(_826){
_82a.style.height=_826;
}
if(null!=sId){
_82a.id=sId;
}
if(null!=_828){
_82a.name=_828;
}
if(null!=_829){
_82a.value=_829;
}
return _82a;
},createRestorePoint:function(){
return new Telerik.Web.UI.Editor.RestorePoint(this._contentWindow);
},getToolState:function(_82b){
if(_82b=="Undo"){
return this.get_commandsManager().isUndoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
if(_82b=="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[_82b];
if(oCmd&&oCmd.getState){
return oCmd.getState(this._contentWindow);
}
}
}
},getToolValue:function(_82d){
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_82d];
if(oCmd&&oCmd.getValue){
return oCmd.getValue(this._contentWindow);
}else{
if(_82d=="RealFontSize"){
var o=this.getSelectedElement();
if(o){
var _830=null;
try{
_830=$telerik.getCurrentStyle(o,"fontSize","");
}
catch(exc){
}
if(_830){
var _831=parseFloat(_830);
if(_831>parseInt(_830)){
if(_830.indexOf("px")>-1){
_830=parseInt(_830)+"px";
}
}
}
return _830;
}
}
}
},_addFilters:function(){
var _832=this.get_filtersManager();
var _833=this.get_contentFilters();
var _834=Telerik.Web.UI.EditorFilters;
_832.clear();
var _835=_833&_834.ConvertToXhtml;
_832.set_enableXhtmlFilter(_835);
if(_835){
_832.add(new Telerik.Web.UI.Editor.CleanAttributesFilter());
}
if(_833&_834.RemoveScripts){
_832.add(new Telerik.Web.UI.Editor.StripScriptsFilter());
}
if(_833&_834.EncodeScripts){
_832.add(new Telerik.Web.UI.Editor.EncodeScriptsFilter());
}
if(_833&_834.FixUlBoldItalic){
_832.add(new Telerik.Web.UI.Editor.FixUlBoldItalic());
}
_832.add(new Telerik.Web.UI.Editor.FixNestedLists());
if(_833&_834.ConvertFontToSpan){
_832.add(new Telerik.Web.UI.Editor.ConvertFontToSpanFilter());
}
if(_833&_834.OptimizeSpans){
_832.add(new Telerik.Web.UI.Editor.OptimizeSpans());
}
if(_833&_834.FixEnclosingP){
_832.add(new Telerik.Web.UI.Editor.FixEnclosingP());
}
if($telerik.isIE){
_832.add(new Telerik.Web.UI.Editor.IEKeepObjectParamsFilter());
_832.add(new Telerik.Web.UI.Editor.IEKeepCommentsFilter());
_832.add(new Telerik.Web.UI.Editor.IEFixEmptyParagraphs());
if(_833&_834.IECleanAnchors){
_832.add(new Telerik.Web.UI.Editor.IECleanAnchorsFilter());
}
}
if(!$telerik.isIE&&!$telerik.isOpera){
if(!$telerik.isSafari){
_832.add(new Telerik.Web.UI.Editor.MozillaKeepFlashString(this.get_mozillaFlashOverlayImage()));
_832.add(new Telerik.Web.UI.Editor.MozillaKeepFlash());
}
_832.add(new Telerik.Web.UI.Editor.MozillaKeepStylesString());
_832.add(new Telerik.Web.UI.Editor.MozillaKeepStylesDom());
if(_833&_834.MozEmStrong){
_832.add(new Telerik.Web.UI.Editor.MozEmStrongFilter());
}
}
_832.add(new Telerik.Web.UI.Editor.StripJunkFilter());
if(_833&_834.MakeUrlsAbsolute){
_832.add(new Telerik.Web.UI.Editor.MakeUrlsAbsolute());
}
_832.add(new Telerik.Web.UI.Editor.RemoveExtraBrakes());
if(_833&_834.IndentHTMLContent){
_832.add(new Telerik.Web.UI.Editor.IndentHTMLContentFilter());
}
},addShortCut:function(_836,_837){
if(this._shortCutManager){
this._shortCutManager.addShortCut(_836,_837);
}
},removeShortCut:function(_838){
if(this._shortCutManager){
this._shortCutManager.removeShortCut(_838);
}
},setShortCut:function(_839,_83a){
if(this._shortCutManager){
this._shortCutManager.setShortCut(_839,_83a);
}
},_addDefaultShortCuts:function(){
var _83b=[["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<_83b.length;i++){
this.addShortCut(_83b[i][0],_83b[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(_83d,_83e){
if(_83d.startsWith("on")){
_83d=_83d.replace("on","");
}
$telerik.addExternalHandler(this._document,_83d,_83e);
var _83f=this._contentAreaEventHandlers;
if(!_83f[_83d]){
_83f[_83d]=[];
}
var _840=_83f[_83d];
_840[_840.length]=_83e;
},detachEventHandler:function(_841,_842){
if(_841.startsWith("on")){
_841=_841.replace("on","");
}
$telerik.removeExternalHandler(this._document,_841,_842);
},_detachEvents:function(){
var _843=this._contentAreaEventHandlers;
for(var _844 in _843){
var _845=_843[_844];
if(_845.length!=null){
for(var i=0;i<_845.length;i++){
var _847=_845[i];
if(typeof (_847)=="function"){
try{
this.detachEventHandler(_844,_847);
}
catch(e){
}
}
}
_845=[];
}
}
this._contentAreaEventHandlers={};
this._attachIEBodyHandlers(false);
},get_TopZone:function(){
return $get(this.get_id()+"Top");
},_createTools:function(){
if(!this._toolAdapter){
var _848=this.get_toolContainer();
var _849=eval(this._toolAdapterType);
this._toolAdapter=$create(_849,{"editor":this,"toolJSON":this.get_toolJSON()},{"toolClick":this._onToolClickDelegate},null,_848);
if(this.isIE){
if(this.get_toolbarMode()==Telerik.Web.UI.EditorToolbarMode.Default){
_848.style.overflow="";
}
this._updateEditorSize();
}
}
},_onToolClick:function(tool,args){
this.fire(tool.get_name(),args);
},getContextMenuByTagName:function(_84c){
if(this._toolAdapter&&this._toolAdapter.getContextMenuByTagName){
return this._toolAdapter.getContextMenuByTagName(_84c);
}
},getToolByName:function(_84d){
if(this._toolAdapter){
return this._toolAdapter.getToolByName(_84d);
}
return null;
},getLocalizedString:function(name,_84f){
if(!name){
return _84f;
}
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 _852=this.get_contentArea();
if(_852&&_852.setActive){
_852.setActive();
}
},set_visible:function(_853){
var _854=this.get_element();
if(_854){
_854.style.display=_853?"":"none";
}
this.set_editable(_853);
},enableEditing:function(_855,_856,_857){
var _858=this.get_toolAdapter();
var _859=Telerik.Web.UI.EditingOptions;
var _85a=function(){
};
if(!_856){
_856=Telerik.Web.UI.EditingOptions.All;
}
this._editingOptions=_856;
this._optionalIgnoredTools=_857;
if(_856&_859.ContextMenus){
if(_858){
_858.enableContextMenus(_855);
}
}
if(_856&_859.EditModes){
if(!_855){
this._originalEditModeRef=this.set_mode;
this.set_mode=_85a;
}else{
if(this._originalEditModeRef){
this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}
}
}
if(_856&_859.Tools){
if(_858){
if(!_855){
_858.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Disabled);
if(_857){
var _85b=[];
for(var item in _857){
var tool=_858.getToolByName(item);
if(tool){
_85b[_85b.length]=tool;
}
}
_858.setToolState(_85b);
}
this._originalSetToolStateRef=_858.setToolState;
_858.setToolState=_85a;
}else{
_858.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}
}
}
if(_856&_859.Modules){
var _85e=this._modulesManager;
if(_85e){
_85e.setModulesVisible(_855);
}
}
if(_856&_859.Typing){
if(!_855){
this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{
if(this._disableTypingDelegate){
this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}
}
}
if(_856&_856.Tab){
if(!_855){
this.removeShortCut("InsertTab");
}else{
this.setShortCut("InsertTab","TAB");
}
}
if(_855){
if(_858){
_858.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Off);
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},set_editable:function(_85f){
if($telerik.isIE||$telerik.isOpera){
var oEd=this;
window.setTimeout(function(){
try{
oEd._document.body.setAttribute("contentEditable",""+_85f);
oEd._document.execCommand("2D-Position",false,true);
}
catch(ev){
}
},0);
}else{
var oEd=this;
window.setTimeout(function(){
try{
oEd._document["designMode"]=_85f?"on":"off";
if(_85f){
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(_861){
if(this.isIE){
this.get_document().body.setAttribute("contentEditable",""+_861);
}
},showExternalDialog:function(url,_863,_864,_865,_866,_867,_868,_869,_86a,_86b,_86c,_86d){
var _86e=this.getEditorSelectionRange();
var _86f=this;
var _870=function(_871,args){
window.setTimeout(function(){
if(_86e!=null){
_86f.getSelection().selectRange(_86e);
}
if(_866){
var _873=_866(_871,args);
if(false==_873){
return;
}
_86f.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_86f.setFocus();
},50);
};
this.get_dialogOpener().openUrl(url,_863,_864,_865,_870,_867,_868,_869,_86a,_86b,_86c,_86d);
},showDialog:function(_874,_875,_876){
var _877=this.getEditorSelectionRange();
var _878=this;
var _879=function(_87a,args){
window.setTimeout(function(){
if(_877!=null){
_878.getSelection().selectRange(_877);
}
if(_876){
var oRes=_876(_87a,args);
if(false==oRes){
return;
}
_878.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_878.setFocus();
},50);
};
this.get_dialogOpener().open(_874,_875,_879);
if(this.isIE){
var wnd=this.get_dialogOpener()._getDialogContainer(_874);
if(!wnd||wnd._DRAG_ATTACHED){
return;
}
wnd._DRAG_ATTACHED=true;
wnd.add_dragEnd(function(){
if(_877!=null){
_878.getSelection().selectRange(_877);
}
});
}
},_getModeButtonsWrapper:function(){
return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(_87e){
if(_87e){
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 _880=this.get_mode();
var _881=Telerik.Web.UI.Editor.Utils.getElementParentByTag(e.target,"LI");
if(_881){
var _882=Telerik.Web.UI.EditModes;
var _883=Sys.UI.DomElement;
var a=_881.getElementsByTagName("A")[0];
if(_883.containsCssClass(a,"rade_mode_html")){
_880=_882.Html;
}else{
if(_883.containsCssClass(a,"rade_mode_design")){
_880=_882.Design;
}else{
_880=_882.Preview;
}
}
}
if(_880!=this.get_mode()){
this.set_mode(_880);
}
return $telerik.cancelRawEvent(e);
},_changeModeUI:function(mode){
var _886=Sys.UI.DomElement;
var _887=Telerik.Web.UI.EditModes;
var _888="rade_mode_";
switch(mode){
case _887.Html:
_888+="html";
break;
case _887.Design:
_888+="design";
break;
case _887.Preview:
_888+="preview";
break;
}
var _889=this._getModeButtonsWrapper();
var as=_889.getElementsByTagName("A");
for(var i=0;i<as.length;i++){
var a=as[i];
_886.removeCssClass(a,"rade_mode_selected");
if(_886.containsCssClass(a,_888)){
_886.addCssClass(a,"rade_mode_selected");
}
}
},_isEditModeEnabled:function(_88d){
return _88d&this._editModes?true:false;
},get_mode:function(){
return this._mode;
},set_mode:function(_88e){
this._setEditableDelegate=Function.createDelegate(this,function(){
this.remove_editReady(this._setEditableDelegate);
var _88f=(this._mode==_890.Design);
this.set_editable(_88f);
this.toggleEnhancedEdit(_88f);
this._setEditableDelegate=null;
});
this.add_editReady(this._setEditableDelegate);
var _891=this._mode;
var _890=Telerik.Web.UI.EditModes;
if(_891==_890.Html||_88e==_890.Html){
var html=this.get_html(true);
this._mode=_88e;
this._showTextArea(this._mode==_890.Html);
this.set_html(html);
}else{
this._mode=_88e;
this._showTextArea(this._mode==_890.Html);
}
this._changeModeUI(_88e);
if(this._mode!=_890.Preview){
this.setFocus();
if(this.isFirefox&&(!this._document||!this._document.body)){
}else{
this.set_editable(true);
}
if(this._mode==_890.Design){
this.toggleEnhancedEdit(true);
}
}else{
this.set_editable(false);
this.toggleEnhancedEdit(false);
}
this.setFocus();
var _893=this.get_id();
var _894=this.get_mainTable();
var _895=_894.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(_895);
},_getTextIframe:function(){
if(!this._textIframe){
var _896=this.get_contentAreaElement();
if(_896){
this._textIframe=_896.cloneNode(true);
this._textIframe.style.position="absolute";
var _897=this._textIframe.style;
_897.height="2px";
_897.width="2px";
_896.parentNode.appendChild(this._textIframe);
var doc=this._textIframe.contentWindow.document;
doc.designMode="off";
var _899=doc.open("text/html","replace");
var _89a="<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 (_899)=="undefined"){
_899=doc;
}
_899.write(_89a);
_899.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(_89c){
var area=this._getTextIframe();
var _89e=this.get_contentAreaElement();
if(_89c){
if($telerik.isSafari){
_89e.style.width="0px";
_89e.style.height="0px";
}else{
_89e.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){
_89e.style.width="100%";
_89e.style.height="100%";
}else{
_89e.style.display="";
}
area.style.display="none";
}
},_setContentAsText:function(_89f){
var area=this._getTextArea();
if(area){
area.value=_89f;
}
},_getContentAsText:function(){
var area=this._getTextArea();
if(area&&area.value){
var _8a2=area.value;
return _8a2;
}
return "";
},set_html:function(_8a3,_8a4,_8a5){
var _8a6=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_8a6.Html){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(_8a4?_8a4:"Set HTML",this.get_contentWindow());
this._setContentAreaHtml(_8a3);
this.executeCommand(cmd,_8a5);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}else{
this._setContentAsText(_8a3);
}
},get_html:function(_8a8){
var _8a9=null;
var _8aa="";
var mode=this.get_mode();
var _8ac=Telerik.Web.UI.EditModes;
if(mode==_8ac.Html){
return this._getContentAsText();
}else{
if(this.get_fullPage()){
if(this._document){
_8a9=this._document.getElementsByTagName("HTML")[0];
_8a9=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(_8a9);
var _8ad=this._getAllSheets(_8a9);
for(var i=0;i<_8ad.length;i++){
var _8af=_8ad[i];
var _8b0=_8af.getAttribute("id");
if(_8b0&&_8b0.indexOf("RADEDITORSTYLESHEET")==0){
_8af.parentNode.removeChild(_8af);
}
}
if($telerik.isIE||$telerik.isOpera){
_8a9.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}
}
}else{
if(this.get_contentArea()){
if(true==_8a8){
_8a9=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
}else{
_8a9=this.get_contentArea();
}
}
}
}
if(_8a9){
if(true==_8a8){
_8aa=this.get_filtersManager().getHtmlContent(_8a9);
}else{
_8aa=_8a9.innerHTML;
}
}
var _8b1=_8aa.match(/<body[^>]*>/i);
if(_8b1&&_8b1.index==0){
_8aa=_8aa.trim();
_8aa=_8aa.substring(_8aa.indexOf(">")+1,_8aa.length-7);
_8aa=_8aa.trim();
}
if(this.get_fullPage()&&this._doctypeString){
_8aa=this._doctypeString+"\n"+_8aa;
}
return _8aa;
},set_initialContent:function(_8b2){
if(_8b2!=null){
this._initialContent=_8b2;
}else{
this._initialContent=this.get_html(true);
}
},get_initialContent:function(){
return this._initialContent;
},get_text:function(){
var _8b3=Telerik.Web.UI.EditModes;
var _8b4="";
if(this.get_mode()!=_8b3.Html){
var _8b5=this.get_contentArea();
if(_8b5){
if(_8b5.innerText){
_8b4=_8b5.innerText;
}else{
if(_8b5.textContent!=null){
_8b4=_8b5.textContent;
}else{
_8b4=_8b5.innerHTML.replace(/<\/?[^>]*>/ig,"");
_8b4=_8b4.replace(/&nbsp;/gi,"");
}
}
}
}else{
_8b4=this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}
return _8b4;
},_getUniqueStyleSheetId:function(i){
return "RADEDITORSTYLESHEET"+i;
},_getAllSheets:function(oDoc){
if(!oDoc){
alert("RadEditor._getAllSheets called with no document object provided");
}
var _8b8=oDoc.getElementsByTagName("link");
var _8b9=oDoc.getElementsByTagName("style");
var _8ba=[];
for(var x=0;_8b8[x];x++){
var rel=_8b8[x].rel?_8b8[x].rel:_8b8[x].getAttribute("rel");
if(typeof (rel)=="string"&&rel.toLowerCase().indexOf("style")+1){
Array.add(_8ba,_8b8[x]);
}
}
for(var x=0;_8b9[x];x++){
Array.add(_8ba,_8b9[x]);
}
return _8ba;
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _8bf=str.lastIndexOf(".");
if(_8bf==-1){
return "";
}
var _8c0=str.indexOf(" ",_8bf);
if(-1==_8c0){
_8c0=str.indexOf(":",_8bf);
}
if(-1==_8c0){
_8c0=str.length;
}
return str.substring((_8bf+1),_8c0);
},_createCssFilterObject:function(){
if(this._cssClassesHash){
return;
}
var _8c1=this.get_cssClasses();
if(_8c1&&_8c1.length>0){
var obj={};
var _8c3=_8c1.length;
for(var i=0;i<_8c3;i++){
var oKey=_8c1[i][0];
var oVal=_8c1[i][1];
obj[oKey.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})]=oVal;
}
this._cssClassesHash=obj;
}
},_getFilteredCssClasses:function(_8c8){
this._createCssFilterObject();
if(_8c8&&this._cssClassesHash){
var _8c9=[];
var _8ca=_8c8.length;
for(var _8cb=0;_8cb<_8ca;_8cb++){
var _8cc=_8c8[_8cb];
if(outAlias=this._checkCssFilter(_8cc[1].selectorText)){
_8cc[2]=outAlias;
_8c9[_8c9.length]=_8cc;
}
}
return _8c9;
}else{
return _8c8;
}
},_checkCssFilter:function(_8cd){
if(!_8cd||!this._cssClassesHash){
return null;
}
return this._cssClassesHash[_8cd.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})];
},getCssArray:function(_8cf){
var _8d0=this.get_document();
var _8d1=[];
for(var i=0;i<_8d0.styleSheets.length;i++){
var _8d3=_8d0.styleSheets[i];
this._getStyleSheetRules(_8d1,_8d3,_8cf);
}
_8d1=this._getFilteredCssClasses(_8d1);
return _8d1;
},_getStyleSheetRules:function(_8d4,_8d5,_8d6){
var _8d7=_8d5.href;
if(_8d7&&_8d7.indexOf("WebResource.axd?")>-1){
return;
}
if(_8d7&&_8d7.indexOf(this.get_contentAreaCssFile())>-1){
return;
}
var _8d8=(_8d5.rules)?_8d5.rules:_8d5.cssRules;
if($telerik.isIE&&_8d5.imports){
for(var k=0;k<_8d5.imports.length;k++){
this._getStyleSheetRules(_8d4,_8d5.imports[k],_8d6);
}
}
for(var j=0;j<_8d8.length;j++){
var _8db=_8d8[j];
if(_8db&&_8db.cssText){
var text=_8db.cssText.toLowerCase();
if(text.indexOf("@import")>=0&&_8db.parentStyleSheet&&_8db.styleSheet&&_8db.parentStyleSheet!=_8db.styleSheet){
this._getStyleSheetRules(_8d4,_8db.styleSheet,_8d6);
continue;
}
}
var str=_8db&&_8db.selectorText?_8db.selectorText:"";
var _8de=str.lastIndexOf(".");
if(_8de<0){
continue;
}
var _8de=str.lastIndexOf(":");
if(_8de>0){
continue;
}
var _8df=this._getClassName(_8db);
_8d4[_8d4.length]=[_8df,_8db];
}
},copyStyleSheets:function(_8e0,_8e1){
if(null==_8e0&&null==_8e1){
return;
}
var _8e2=0;
var _8e3=null;
if(_8e1.styleSheets.length==0){
if(_8e1.createStyleSheet){
_8e1.createStyleSheet();
}else{
css=_8e1.createElement("style");
css.media="all";
css.type="text/css";
var _8e4=_8e1.getElementsByTagName("head")[0];
_8e4.appendChild(css);
_8e3=css;
}
}
if(_8e1.styleSheets[0]){
_8e3=_8e1.styleSheets[0];
}
for(var i=0;i<_8e0.styleSheets.length;i++){
try{
var _8e6=_8e0.styleSheets[i];
var _8e7=_8e6.href;
var _8e8=false;
if($telerik.isFirefox){
if(_8e6.ownerNode&&_8e6.ownerNode.tagName.toLowerCase()=="style"){
_8e8=true;
}
}
if(_8e7&&!_8e8){
continue;
}
var _8e9=(_8e6.rules)?_8e6.rules:_8e6.cssRules;
for(var j=0;j<_8e9.length;j++){
var _8eb=_8e9[j];
if(_8e3.addRule){
var _8ec=_8eb.selectorText;
var oCss=_8eb.style.cssText;
if(oCss&&_8ec){
_8e3.addRule(_8ec,oCss,_8e2);
}
}else{
if(_8e3.insertRule){
_8e3.insertRule(_8eb.cssText,_8e2);
}else{
var oCss=_8eb.selectorText+"{"+_8eb.style.cssText+"}";
var _8ee=_8e1.createTextNode(oCss);
_8e3.appendChild(_8ee);
}
}
_8e2++;
}
}
catch(exc){
}
}
},_setContentAreaHtml:function(_8ef,_8f0){
var _8f1=this.get_filtersManager().getDesignContent(_8ef);
this.set_contentHiddenTextareaValue(_8f1);
var _8f2=null;
if(-1!=_8f1.toLowerCase().indexOf("<html")){
this.set_fullPage(true);
_8f2=_8f1;
var _8f3=new RegExp("(<!DOCTYPE(.|\\n)*?>)(.|\\n)*?","g");
this._doctypeString=(_8f2.match(_8f3))?_8f2.match(_8f3)[0]:"";
}else{
this.set_fullPage(false);
}
if(null!=_8f2||true==_8f0){
var _8f4=this;
var _8f5=function(){
_8f6=false;
try{
_8f4._document=_8f4._contentAreaElement.contentWindow.document;
_8f4._contentWindow=_8f4._contentAreaElement.contentWindow;
_8f4._contentArea=_8f4._document.body;
_8f4.get_filtersManager().getDesignContentDom(_8f4.get_contentArea());
var _8f7=1;
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8f4.get_contentAreaCssFile(),_8f4._document,_8f4._getUniqueStyleSheetId(0));
var _8f8=_8f4.get_cssFiles();
if(_8f8.length>0){
for(var i=0;i<_8f8.length;i++){
var _8fa=_8f4._getUniqueStyleSheetId(_8f7++);
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8f8[i],_8f4._document,_8fa);
}
}else{
if(!_8f4._fullPage){
_8f4.copyStyleSheets(document,_8f4._document);
var _8fb=_8f4._getAllSheets(document);
for(var i=0;i<_8fb.length;i++){
var _8fa=_8f4._getUniqueStyleSheetId(_8f7++);
var _8fc=_8fb[i];
if(_8fc.tagName=="LINK"){
var _8fd=_8fc.href;
if(_8fd&&_8fd.indexOf("WebResource.axd?")>-1){
continue;
}
if(_8fd){
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8fc.getAttribute("href"),_8f4._document,_8fa);
}
}else{
if(_8fc.tagName=="STYLE"){
}
}
}
}
}
var _8fe=Telerik.Web.UI.Editor.PopupController;
if(_8fe){
_8fe.detachFromDocument(_8f4._document);
_8fe.attachToDocument(_8f4._document);
}
_8f4._initEvents();
if(_8f4.isVisible()){
_8f4.raiseEvent("firstShow");
}
if(_8f4.get_mode()!=Telerik.Web.UI.EditModes.Preview){
_8f4.set_editable(true);
}else{
_8f4.set_editable(false);
}
_8f4.toggleEnhancedEdit(true);
if(_8f4._document&&_8f4._document.body){
_8f4.raiseEvent("editReady",Sys.EventArgs.Empty);
}
}
catch(e){
}
};
if($telerik.isFirefox){
$addHandler(this._contentAreaElement,"load",function(){
if(_8f6){
_8f5();
}
});
}
if(!_8f2){
_8f2="<head><style></style></head><body>"+_8f1+"</body>";
}
try{
var _8ff=this._contentAreaElement.contentWindow.document;
_8ff.open();
_8ff.write(_8f2);
_8ff.close();
var _8f6=false;
if(_8ff.body){
_8f5();
}else{
_8f6=true;
}
}
catch(e){
}
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this._contentArea,_8f1);
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 _901=$get(id+"Center");
var _902=this.get_contentAreaElement();
_902.style.display="none";
var _903=_901.offsetHeight;
_901.appendChild(_902);
_902.style.height="100%";
_902.style.display="";
if(!$telerik.isIE&&_903<160&&_901.offsetHeight>_903+2){
_901.style.height=_903+"px";
}
this._created=true;
},_updateEditorSize:function(_904,_905){
var _906=this._tableElement;
var _907=_904?_904:_906.style.height;
if(true==_905){
_907=_906.offsetHeight+"px";
}
if(parseInt(_907)==0){
return;
}
_907=parseInt(_907)+"px";
_906.style.height=_907;
if(this.isIE){
this._fixIeHeight(_906,_907);
}else{
}
_906.parentNode.style.height=_907;
},_fixIeHeight:function(_908,_909){
if("CSS1Compat"==document.compatMode){
var _90a=(_908.offsetHeight-parseInt(_909));
if(_90a>0){
var _90b=(parseInt(_908.style.height)-_90a);
if(_90b>0){
_908.style.height=_90b+"px";
}
}
}
},setSize:function(_90c,_90d){
var _90c=parseInt(_90c);
var _90d=parseInt(_90d);
var _90e=this;
var _90f=this.get_mainTable();
_90f.style.height="";
var _910=_90f.parentNode;
_910.style.width=_90c+"px";
_910.style.height=_90d+"px";
_90e._fixIeHeight(_910,_90d);
if(_90e.isIE){
_90f.style.height=_90d+"px";
_90e._fixIeHeight(_90f,_90d);
}else{
_90f.style.height="100%";
}
},pasteHtml:function(_911,_912,_913,_914,_915){
if(!this.get_editable()){
return;
}
var args=new Telerik.Web.UI.EditorCommandEventArgs(_912,null,_911);
if(false==this._executeCommandEvent("pasteHtml",_912,args)){
return;
}
if(_911!=args.get_value()){
_911=args.get_value();
}
var _917=this.getLocalizedString(_912);
var mode=this.get_mode();
if(Telerik.Web.UI.EditModes.Design==mode){
this.setFocus();
this.executeCommand(new Telerik.Web.UI.Editor.PasteHtmlCommand(_917,this._contentWindow,_911,_913),null,_915);
if(_914!=false){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}else{
if(Telerik.Web.UI.EditModes.Html==mode){
var _919=this._getTextArea();
if(this.isIE){
_919.setActive();
var _91a=document.selection.createRange();
_91a.text=_911;
}else{
if(_919.setSelectionRange){
var _91b=_919.selectionStart;
var _91c=_919.selectionEnd;
var _91d=_919.value.substring(_91b,_91c);
var _91e=_911;
_919.value=_919.value.substring(0,_91b)+_91e+_919.value.substring(_91c);
_919.setSelectionRange(_91b+_91e.length,_91b+_91e.length);
this.setFocus();
}
}
}
}
},fire:function(_91f,args){
if(false==this._executeCommandEvent("commandExecuting",_91f,args)){
return;
}
if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[_91f]){
return;
}
this.setActive();
this._pendingTextTypeCmd=null;
var _921=Telerik.Web.UI.Editor.CommandList[_91f];
var _922=false;
if(_921){
_922=(false!=_921(_91f,this,args));
}else{
alert("The command "+_91f+" is not implemented yet.");
}
if(_922){
if(!$telerik.isOpera){
this.setFocus();
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
this._executeCommandEvent("commandExecuted",_91f,args);
},_executeCommandEvent:function(_923,_924,args){
if(!args){
args=new Telerik.Web.UI.EditorCommandEventArgs(_924);
}
this.raiseEvent(_923,args);
if(args.get_cancel&&args.get_cancel()){
return false;
}
return true;
},_onWindowResize:function(){
var _926=this._getViewportBounds();
this.setSize(_926.width,_926.height,false);
},_registerWindowResizeHandler:function(_927){
if(_927){
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 _928=$telerik.getClientBounds();
var _929=document.documentElement.scrollLeft||document.body.scrollLeft;
var _92a=document.documentElement.scrollTop||document.body.scrollTop;
_928.scrollLeft=_929;
_928.scrollTop=_92a;
return _928;
},_handleParentsWithOverflow:function(_92b){
if(false==_92b){
if(!this._parentsWithOverflow){
return;
}
var _92c=this._parentsWithOverflow;
var _92d=_92c.length;
for(var i=0;i<_92d;i++){
var _92f=_92c[i];
if(_92f[0]){
var _930=_92f[0].style;
_930.overflow=_92f[1];
_930.height=_92f[2];
_930.tableLayout=_92f[3];
_930.position=_92f[4];
}
}
this._parentsWithOverflow=null;
}else{
this._parentsWithOverflow=[];
var _92c=this._parentsWithOverflow;
var _931=this._getRootNode().parentNode;
while(_931&&_931.tagName!="BODY"){
var _930=_931.style;
_92c[_92c.length]=[_931,_930.overflow,_930.height,_930.tableLayout,_930.position];
_931.style.position="static";
_931.style.tableLayout="auto";
_931.style.overflow="visible";
_931.style.height="auto";
_931=_931.parentNode;
}
}
},_getRootNode:function(){
return this.get_mainTable().parentNode;
},isFullScreen:function(){
return this._isFullScreen;
},toggleScreenMode:function(){
var _932=this;
if(!_932._isFullScreen){
_932._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){
_932._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}
var _933=_932._getRootNode();
_932._preFullScreenBounds=$telerik.getBounds(_933);
_932._handleParentsWithOverflow(true);
_932._onWindowResize();
_932._preFullScreenBrowserRect=_932._getViewportBounds();
var _934=$telerik.getLocation(_933);
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_934.x,_934.y);
_932._isFullScreen=true;
_932._registerWindowResizeHandler(true);
}else{
_932._registerWindowResizeHandler(false);
document.body.scroll=_932._preFullScreenBodyStyle[0];
try{
document.body.style.margin=_932._preFullScreenBodyStyle[1];
}
catch(e){
}
document.documentElement.style.overflow=_932._preFullScreenBodyStyle[2];
_932._isFullScreen=false;
_932._handleParentsWithOverflow(false);
var _935=_932._preFullScreenBounds;
_932.setSize(_935.width,_935.height,false);
var _934=_932._preFullScreenBrowserRect;
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_934.scrollLeft,_934.scrollTop);
}
_932.set_editable(true);
_932.setFocus();
var _936=_932.getToolByName("ToggleScreenMode");
if(_936){
_936.setOn(_932._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(_937){
if($telerik.isSafari&&this._contentHiddenTextarea.innerText!=null){
this._contentHiddenTextarea.innerText=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_937);
}else{
this._contentHiddenTextarea.value=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_937);
}
},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(_939){
this._toolAdapter=_939;
},get_fullPage:function(){
return this._fullPage;
},set_fullPage:function(_93a){
this._fullPage=_93a;
},get_dialogOpener:function(){
return this._dialogOpener;
},set_dialogOpener:function(_93b){
this._dialogOpener=_93b;
},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(_93c){
this._links=_93c;
},get_language:function(){
if(null==this._language){
return "en-us";
}
return this._language.toLowerCase();
},set_language:function(_93d){
this._language=_93d;
},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(_93e){
this._colors=_93e;
},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(_93f){
this._fontNames=_93f;
},get_fontSizes:function(){
if(null==this._fontSizes){
return [1,2,3,4,5,6,7];
}
return this._fontSizes;
},set_fontSizes:function(_940){
this._fontSizes=_940;
},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(_941){
this._symbols=_941;
},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(_942){
this._realFontSizes=_942;
},get_contextMenus:function(){
if(null==this._contextMenus){
return [];
}
return this._contextMenus;
},set_contextMenus:function(_943){
this._contextMenus=_943;
},get_snippets:function(){
if(null==this._snippets){
return [];
}
return this._snippets;
},set_snippets:function(_944){
this._snippets=_944;
},get_cssClasses:function(){
if(null==this._cssClasses){
return [];
}
return this._cssClasses;
},set_cssClasses:function(_945){
this._cssClasses=_945;
},get_cssFiles:function(){
if(null==this._cssFiles){
return [];
}
return this._cssFiles;
},set_cssFiles:function(_946){
this._cssFiles=_946;
},get_languages:function(){
if(null==this._languages){
return [];
}
return this._languages;
},set_languages:function(_947){
this._languages=_947;
},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(_948){
this._paragraphs=_948;
},get_toolsWidth:function(){
return this._toolsWidth;
},set_toolsWidth:function(_949){
this._toolsWidth=_949;
},get_toolProviderID:function(){
return this._toolProviderID;
},set_toolProviderID:function(_94a){
this._toolProviderID=_94a;
},get_autoResizeHeight:function(){
return this._autoResizeHeight;
},set_autoResizeHeight:function(_94b){
this._autoResizeHeight=_94b;
},get_toolbarMode:function(){
return this._toolbarMode;
},set_toolbarMode:function(_94c){
this._toolbarMode=_94c;
},get_editModes:function(){
return this._editModes;
},set_editModes:function(_94d){
this._editModes=_94d;
},get_stripFormattingOptions:function(){
return this._stripFormattingOptions;
},set_stripFormattingOptions:function(_94e){
this._stripFormattingOptions=_94e;
},get_contentFilters:function(){
return this._contentFilters;
},set_contentFilters:function(_94f){
this._contentFilters=_94f;
},get_newLineBr:function(){
return this._newLineBr;
},set_newLineBr:function(_950){
this._newLineBr=_950;
},get_contentAreaCssFile:function(){
return this._contentAreaCssFile;
},set_contentAreaCssFile:function(_951){
this._contentAreaCssFile=_951;
},get_mozillaFlashOverlayImage:function(){
return this._mozillaFlashOverlayImage;
},set_mozillaFlashOverlayImage:function(_952){
this._mozillaFlashOverlayImage=_952;
},get_toolAdapterType:function(){
return this._toolAdapterType;
},set_toolAdapterType:function(_953){
this._toolAdapterType=_953;
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_954){
this._toolJSON=_954;
},get_modulesJSON:function(){
return this._modulesJSON;
},set_modulesJSON:function(_955){
this._modulesJSON=_955;
},get_contextMenusJSON:function(){
return this._contextMenusJSON;
},set_contextMenusJSON:function(_956){
this._contextMenusJSON=_956;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_957){
this._uniqueID=_957;
},get_useClassicDialogs:function(){
return this.get_dialogOpener().get_useClassicDialogs();
},set_useClassicDialogs:function(_958){
this.get_dialogOpener().set_useClassicDialogs(_958);
},get_skin:function(){
if(!this._skin){
return "Default";
}
return this._skin;
},set_skin:function(_959){
this._skin=_959;
},get_qualifiedSkin:function(){
var skin=this.get_skin();
return "radeditor."+skin;
},_registerClientValidation:function(){
if(typeof (Page_ClientValidate)=="function"){
var _95b=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(_95c){
var _95d=this.get_element();
if(_95d){
var _95e=this.get_html(true);
this.set_contentHiddenTextareaValue(_95e);
_95d.value=_95e;
_95d.setAttribute("value",_95e);
}
_95d=null;
return _95b(_95c);
});
}
},saveContent:function(){
if(this._saveContentDelegate){
this.raiseEvent("submit",Sys.EventArgs.Empty);
var _95f=this.get_html(true);
this.set_contentHiddenTextareaValue(_95f);
}
},_registerPostBackHandlers:function(){
this._saveContentDelegate=Function.createDelegate(this,this.saveContent);
var _960=this._contentHiddenTextarea.form;
$telerik.addExternalHandler(_960,"submit",this._saveContentDelegate);
if(typeof (__doPostBack)!="undefined"){
var _961=this._saveContentDelegate;
var _962=__doPostBack;
__doPostBack=function(_963,_964){
_961();
_962(_963,_964);
};
}
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;
}
_960=null;
},toggleEnhancedEdit:function(_966){
if(!this.get_document()){
return false;
}
var _967=this.get_document().getElementById(this._getUniqueStyleSheetId(0));
if(_967){
if(_966==null){
_966=_967.disabled;
}
_967.disabled=!_966;
var tool=this.getToolByName("ToggleTableBorder");
if(tool){
tool.setOn(_966);
}
return _966;
}else{
return false;
}
},pasteHyperLink:function(_969,_96a){
if($telerik.isIE){
var sel=this.getSelectedElement();
if(sel.tagName=="IMG"&&sel.parentNode&&sel.parentNode.tagName=="A"){
var _96c=sel.parentNode;
_96c.parentNode.removeChild(_96c);
}
if(sel.tagName=="IMG"){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_969,Telerik.Web.UI.Editor.Utils.getOuterHtml(sel));
}
}
if($telerik.isOpera){
var sel=this.getSelectedElement();
if(sel.tagName=="A"){
this.fire("Unlink");
}
}
if("DocumentManager"==_96a){
var _96d=this.getSelection().getText();
if(""!=_96d.trim()){
_969.innerHTML=_96d;
}
}
var _96e=Telerik.Web.UI.Editor.Utils.getOuterHtml(_969);
this.pasteHtml(_96e,_96a);
},_saveTypedContent:function(_96f,_970){
if(this._pendingTextTypeCmd){
this._pendingTextTypeCmd.update();
}
if(true!=_96f){
this._pendingTextTypeCmd=null;
}
},_attachIEBodyHandlers:function(_971){
var body=null;
if(this._document&&this._document.body){
body=this._document.body;
}
if(!body){
return;
}
if(_971){
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 _973=this;
var _974=_973.fire;
_973.fire=function(_975,_976){
if(_975!="Copy"){
_973._saveTypedContent(true,"editor.fire "+_975+" executing");
}
_974.call(_973,_975,_976);
try{
if(_975=="Undo"&&!_973.isIE&&_973._document.body.innerHTML.toLowerCase().trim()=="<br>"){
_973._document.body.innerHTML="<br>";
}
}
catch(e){
}
};
if(!this.isIE){
this.attachEventHandler("keypress",function(e){
if(_973._onKeyPressed(e)){
e.preventDefault();
return false;
}
});
this.attachEventHandler("click",function(e){
if(!_973.isFirefox){
return;
}
if(!_973.get_editable()){
return;
}
if("on"==_973._document["designMode"]){
window.setTimeout(function(){
_973.set_editable(true);
_973.setFocus();
},100);
}
});
}
this.attachEventHandler("keydown",function(e){
if(_973.isOpera){
return _973._onKeyDown(e);
}else{
_973._onKeyDown(e);
}
});
this.attachEventHandler("onmousedown",function(){
_973._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var _97a=Function.createDelegate(this,function(e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",_97a);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachIEBodyHandlers(true);
},_onKeyDown:function(e){
var _97d=e.keyCode;
switch(_97d){
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 _97e=this;
var _97f=function(){
var _980=_97e.getSelectedElement();
if(_980&&_980.tagName=="EMBED"){
_980.setAttribute("hidden","true");
_980.setAttribute("id","FileToDelete");
window.setTimeout(function(){
var _981=_97e._document.getElementById("FileToDelete");
if(_981.parentNode&&_981.parentNode.removeChild){
_981.parentNode.removeChild(_981);
}
},100);
$telerik.cancelRawEvent(e);
return true;
}
};
var _982=_97f();
if(_982){
return false;
}
try{
var _983=_97e._document.selection.createRange();
var _984=null;
if(_983&&_983.duplicate){
_984=_983.duplicate();
}
if(8==e.keyCode){
_983.moveStart("character",-1);
}else{
_983.moveEnd("character",1);
}
if(_983.parentElement().tagName=="EMBED"){
_983.select();
_97f();
if(_984&&_984.select){
_984.select();
}
}
}
catch(ex){
}
var _985=new Telerik.Web.UI.Editor.Selection(this._contentWindow);
if(_985&&_985.isControl()){
var _986=_985.getRange();
_986.execCommand("Delete");
$telerik.cancelRawEvent(e);
}
}
return;
}
var _987=e.target?e.target:e.srcElement;
if(_987&&"INPUT"!=_987.tagName){
var _988=this._shortCutManager.isShortCutHit(e);
if(null!=_988&&_988.get_name()=="Copy"){
this._shortcutHit=false;
return;
}
this._shortcutHit=(null!=_988);
if(this._shortcutHit){
this.fire(_988.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=_988.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(_98c,_98d,_98e,_98f){
var _990=this;
var _991=(this.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _992=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_98d,_990.get_stripFormattingOptions(),_990.get_localization()["askwordcleaning"],_991);
if(_98c){
_98c.select();
}
if(_992){
window.setTimeout(function(){
if(_98f&&_98c){
_98c.select();
}
_990.pasteHtml(_992);
},5);
return $telerik.cancelRawEvent(_98e);
}
return true;
},_onPaste:function(_993){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _994=this.createRestorePoint();
var _995=this.getSelectionHtml()?true:false;
var _996=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
return this._insertPastedContent(_994,_996,_993,_995);
},_onBeforePaste:function(_997){
if(_997){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _998=new Telerik.Web.UI.Editor.GenericCommand("Paste",this._contentWindow);
var _999=this.getSelection().getRange();
var _99a=Telerik.Web.UI.Editor.Utils.getUniqueID();
if(_999.pasteHTML){
_999.pasteHTML("&nbsp;<font id='"+_99a+"'>&nbsp;</font>");
}else{
this.pasteHtml("<font id='"+_99a+"'>&nbsp;</font>");
}
var _99b=Telerik.Web.UI.Editor.Utils.getPasteContainer();
_99b.innerHTML="";
if(_99b.setActive){
_99b.setActive();
}else{
var _99c=this.getSelection();
var _99d=_99c.getRange();
if(_99d.selectNodeContents){
_99d.selectNodeContents(_99b);
}
_99c.selectRange(_99d);
}
var _99e=this;
window.setTimeout(function(){
var _99f=_99b.innerHTML;
var _9a0=(_99e.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _9a1=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_99f,_99e.get_stripFormattingOptions(),_99e.get_localization()["askwordcleaning"],_9a0);
var _9a2=_99e._document.getElementById(_99a);
_99e.setActive(true);
_99e._pendingCutPasteCommand=null;
if(_99e._document.body.createTextRange){
var _9a3=_99e._document.body.createTextRange();
_9a3.moveToElementText(_9a2);
_9a3.moveStart("character",-1);
_9a3.select();
_9a3.pasteHTML(_9a1);
}else{
_99e.selectElement(_9a2);
_99e.pasteHtml(_9a1);
}
_99e.executeCommand(_998);
_99e.setActive(true);
_99e.setFocus(true);
},0);
}
},_onResizeStart:function(e){
var _9a5=this.getSelectedElement();
if(_9a5==e.srcElement){
var _9a6=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new Telerik.Web.UI.Editor.GenericCommand(_9a6,this._contentWindow);
}
},_onResizeEnd:function(e){
if(this._pendingResizeCmd){
this.executeCommand(this._pendingResizeCmd);
}
},_onDragStart:function(e){
var _9a9=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new Telerik.Web.UI.Editor.GenericCommand(_9a9,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 _9ab=this._startRange.item(0);
if("IMG"==_9ab.tagName&&"A"==_9ab.parentNode.tagName&&_9ab.parentNode.childNodes.length==1){
_9ab=_9ab.parentNode;
}
rng.moveToElementText(_9ab);
this._startRange=rng;
}
}
},_onDragEnd:function(e){
if(this._pendingMoveCommand){
if(this._startRange){
var _9ad=this._contentWindow.document.selection.createRange();
if(_9ad.length){
var rng=this._contentWindow.document.body.createTextRange();
rng.moveToElementText(_9ad.item(0));
_9ad=rng;
}
try{
if(_9ad.compareEndPoints&&0!=_9ad.compareEndPoints("StartToStart",this._startRange)&&0!=_9ad.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 _9b0=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new Telerik.Web.UI.Editor.GenericCommand(_9b0,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(_9b2){
this.get_events().addHandler("toggleScreenMode",_9b2);
},remove_toggleScreenMode:function(_9b3){
this.get_events().removeHandler("toggleScreenMode",_9b3);
},add_modeChange:function(_9b4){
this.get_events().addHandler("modeChange",_9b4);
},remove_modeChange:function(_9b5){
this.get_events().removeHandler("modeChange",_9b5);
},add_load:function(_9b6){
this.get_events().addHandler("load",_9b6);
},remove_load:function(_9b7){
this.get_events().removeHandler("load",_9b7);
},add_init:function(_9b8){
this.get_events().addHandler("init",_9b8);
},remove_init:function(_9b9){
this.get_events().removeHandler("init",_9b9);
},add_selectionChange:function(_9ba){
this.get_events().addHandler("selectionChange",_9ba);
},remove_selectionChange:function(_9bb){
this.get_events().removeHandler("selectionChange",_9bb);
},add_commandExecuting:function(_9bc){
this.get_events().addHandler("commandExecuting",_9bc);
},remove_commandExecuting:function(_9bd){
this.get_events().removeHandler("commandExecuting",_9bd);
},add_commandExecuted:function(_9be){
this.get_events().addHandler("commandExecuted",_9be);
},remove_commandExecuted:function(_9bf){
this.get_events().removeHandler("commandExecuted",_9bf);
},add_submit:function(_9c0){
this.get_events().addHandler("submit",_9c0);
},remove_submit:function(_9c1){
this.get_events().removeHandler("submit",_9c1);
},add_editReady:function(_9c2){
this.get_events().addHandler("editReady",_9c2);
},remove_editReady:function(_9c3){
this.get_events().removeHandler("editReady",_9c3);
},add_pasteHtml:function(_9c4){
this.get_events().addHandler("pasteHtml",_9c4);
},remove_pasteHtml:function(_9c5){
this.get_events().removeHandler("pasteHtml",_9c5);
},add_firstShow:function(_9c6){
this.get_events().addHandler("firstShow",_9c6);
},remove_firstShow:function(_9c7){
this.get_events().removeHandler("firstShow",_9c7);
}};
Telerik.Web.UI.RadEditor.registerClass("Telerik.Web.UI.RadEditor",Telerik.Web.UI.RadWebControl);

