Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Utils={scrollIntoView:function(_1){
if(!_1||!_1.parentNode){
return;
}
var _2=null;
var _3=0;
var _4=_1.parentNode;
while(_4!=null){
if(_4.tagName=="BODY"){
var _5=_4.ownerDocument;
if(!$telerik.isIE&&_5.defaultView&&_5.defaultView.frameElement){
_3=_5.defaultView.frameElement.offsetHeight;
}
_2=_4;
break;
}
var _6=$telerik.getCurrentStyle(_4,"overflowY");
if(_6=="scroll"||_6=="auto"){
_2=_4;
break;
}
_4=_4.parentNode;
}
if(!_2){
return;
}
if(!_3){
_3=_2.offsetHeight;
}
if(_3<_1.offsetTop+_1.offsetHeight){
_2.scrollTop=(_1.offsetTop+_1.offsetHeight)-_3;
}else{
if(_1.offsetTop<_2.scrollTop){
_2.scrollTop=_1.offsetTop;
}
}
},setElementClassName:function(_7,_8){
if(!_7){
return "";
}
if(!_8){
_7.className="";
_7.removeAttribute("class",0);
_7.removeAttribute("classname",0);
}else{
var _9=_7.className;
_7.className=_8;
return _9;
}
},addElementsToSelection:function(_a,_b){
if($telerik.isIE){
Telerik.Web.UI.Editor.Utils.selectElement(_a,_b[0]);
return 1;
}
var _c=_a.getSelection();
var _d=new Telerik.Web.UI.Editor.Selection(_a);
var _e=_d.getRange();
if(!_e||!_e.selectNodeContents){
return -1;
}
if(_c.removeAllRanges){
_c.removeAllRanges();
}
for(var i=0;i<_b.length;i++){
_e.selectNodeContents(_b[i]);
_c.addRange(_e);
}
return _b.length;
},getFullySelectedElement:function(_10){
return $telerik.isIE?Telerik.Web.UI.Editor.Utils._getFullySelectedElementIE(_10):Telerik.Web.UI.Editor.Utils._getFullySelectedElementMoz(_10);
},_isListFullySelected:function(_11,_12){
if(_11.tagName=="UL"||_11.tagName=="OL"){
var _13=_12.match(/<LI\/?>/gi);
if(_13.length==_11.getElementsByTagName("LI").length){
return true;
}
}
return false;
},_getFullySelectedElementIE:function(_14){
var _15=new Telerik.Web.UI.Editor.Selection(_14);
var _16=_15.getRange();
var _17=(_16.length>0?_16(0):_16.parentElement());
if(_16.length>0){
return _17;
}else{
if(Telerik.Web.UI.Editor.Utils._isListFullySelected(_17,_15.getHtml())){
return _17;
}else{
if(!_16.htmlText){
return null;
}
}
}
var _18=_16.duplicate();
var _19=_16.duplicate();
_18.collapse(true);
_19.collapse(false);
var _1a=_18.parentElement();
if(_1a.parentNode==_17){
_1a=_17;
}
var _1b=_19.parentElement();
if(_1a==_1b){
var doc=_14.document;
var _1d=doc.body.createTextRange();
_1d.moveToElementText(_1a);
var _1e=_16.htmlText;
var _1f=false;
var _20=_1a.outerHTML.replace(/[\r\n\t]/ig,"");
var _21=_1a.innerHTML.replace(/[\r\n\t]/ig,"");
var _1e=_1e.replace(/[\r\n\t]/ig,"");
if(_20==_1e||_21==_1e){
_1f=true;
}
if(_1f||(0==_1d.compareEndPoints("StartToStart",_16)&&0==_1d.compareEndPoints("EndToEnd",_16))){
if("BODY"!=_17.tagName){
return _17;
}
}
}
},_getFullySelectedElementMoz:function(_22){
var doc=_22.document;
var _24=_22.getSelection();
if(_24.rangeCount<1){
return null;
}
var _25=_24.getRangeAt(0);
var _26=_25.commonAncestorContainer;
var _27=_26.parentNode;
var _28=new Telerik.Web.UI.Editor.Selection(_22);
if($telerik.isFirefox){
var _29=_28.getHtml();
var div=document.createElement("DIV");
div.innerHTML=_29;
if(div.childNodes.length==1&&div.firstChild.nodeType==1){
var _2b=div.firstChild.tagName;
var _2c=_25.startContainer;
if(_2c.nodeType==1){
if(_2c.tagName==_2b){
return _2c;
}else{
if(_2c.getElementsByTagName){
var _2c=_2c.getElementsByTagName(_2b)[0];
if(_2c){
return _2c;
}
}
}
}else{
while(_2c){
if(_2b==_2c.tagName){
return _2c;
}
_2c=_2c.nextSibling;
}
}
}
}
if(_26.tagName=="BODY"){
var _2d=_28.getParentElement();
if(_2d&&_2d.tagName!="BODY"){
return _2d;
}
}else{
var _2e=doc.createElement("SPAN");
_2e.appendChild(_25.cloneContents());
if(_2e.innerHTML==_27.innerHTML&&_27.tagName!="BODY"){
return _27;
}
}
if(Telerik.Web.UI.Editor.Utils._isListFullySelected(_26,_28.getHtml())){
return _26;
}
},getInvisibleParent:function(_2f){
while(_2f!=document){
if("none"==$telerik.getCurrentStyle(_2f,"display","")){
return _2f;
}
_2f=_2f.parentNode;
}
return null;
},evalScriptCode:function(_30){
var _31=$telerik.isSafari;
if(_31){
_30=_30.replace(/^\s*<!--((.|\n)*)-->\s*$/mi,"$1");
}
var _32=document.createElement("script");
_32.setAttribute("type","text/javascript");
if(_31){
_32.appendChild(document.createTextNode(_30));
}else{
_32.text=_30;
}
var _33=document.getElementsByTagName("head")[0];
_33.appendChild(_32);
if(_31){
_32.innerHTML="";
}else{
_32.parentNode.removeChild(_32);
}
},cleanPastedContent:function(_34,_35,_36,_37){
var _38=_34;
if(_35==Telerik.Web.UI.StripFormattingOptions.None){
if((_34.match(/style="[^"]*?mso[^"]*?"/ig)||_34.match(/class="?[^"]*?mso[^"]*?"?/ig))&&confirm(_36)){
_38=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"WORD");
}
}else{
if(_35&Telerik.Web.UI.StripFormattingOptions.All){
_38=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"ALL");
}else{
if(_35&Telerik.Web.UI.StripFormattingOptions.AllExceptNewLines){
_38=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"ALL_NO_BRAKES");
}else{
if(_35&Telerik.Web.UI.StripFormattingOptions.MSWordRemoveAll){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"WORD_ALL");
}
if(_35&Telerik.Web.UI.StripFormattingOptions.MSWordNoFonts){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"WORD_NO_FONTS");
}
if(_35&Telerik.Web.UI.StripFormattingOptions.MSWord){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"WORD");
}
if(_35&Telerik.Web.UI.StripFormattingOptions.Css){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"CSS");
}
if(_35&Telerik.Web.UI.StripFormattingOptions.Font){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"FONT");
}
if(_35&Telerik.Web.UI.StripFormattingOptions.Span){
_34=Telerik.Web.UI.Editor.Utils.stripFormatting(_34,"SPAN");
}
_38=_34;
}
}
}
if(null!=_37&&false==_37){
_38=Telerik.Web.UI.Editor.Utils.stripFormatting(_38,"SCRIPT");
}
return _38;
},isCursorMovingKey:function(_39){
if(_39>=33&&_39<=40){
return true;
}
return false;
},isSystemKey:function(_3a){
if(_3a>=112&&_3a<=123){
return true;
}
if(_3a>=8&&_3a<=27){
return true;
}
if(_3a>=32&&_3a<=46){
return true;
}
if(_3a==93){
return true;
}
return false;
},storeBrowserPosition:function(){
var _3b=document.body;
var _3c=document.documentElement;
this._browserTop=_3b.scrollTop>_3c.scrollTop?_3b.scrollTop:_3c.scrollTop;
this._browserLeft=_3b.scrollLeft>_3c.scrollLeft?_3b.scrollTop:_3c.scrollLeft;
return {x:this._browserLeft,y:this._browserTop};
},restoreBrowserPosition:function(_3d,top){
try{
if(null==_3d){
_3d=this._browserLeft;
}
if(null==top){
top=this._browserTop;
}
var _3f=document.body;
var _40=document.documentElement;
_3f.scrollTop=top;
_3f.scrollLeft=_3d;
_40.scrollTop=top;
_40.scrollLeft=_3d;
}
catch(ex){
}
},_getPasteIframe:function(){
if(!this._pasteIframe){
this._pasteIframe=document.createElement("IFRAME");
var _41=this._pasteIframe.style;
_41.width="1px";
_41.height="1px";
_41.border="0px solid red";
_41.overflow="hidden";
_41.position="absolute";
document.body.appendChild(this._pasteIframe);
try{
var doc=this._pasteIframe.contentWindow.document;
var _43=doc.open("text/html","replace");
var _44="<html><head><title>New Document</title></head>"+"<body contentEditable='true' style='overflow:hidden;margin:0px;padding:0px;height:100%'>"+"</html>";
_43.write(_44);
_43.close();
}
catch(e){
}
}
return this._pasteIframe;
},getPasteContainer:function(){
var _45=this._getPasteIframe();
return _45.contentWindow.document.body;
},getClipboardAsHtml:function(){
var div=this.getPasteContainer();
div.innerHTML="";
if(div.setActive){
div.setActive();
}
document.execCommand("Paste",null);
var _47=div.innerHTML;
div.innerHTML="";
return _47;
},stripFormatting:function(_48,_49){
switch(_49){
case "ALL":
_48=_48.replace(/<\/?[^>]*>/ig,"");
break;
case "ALL_NO_BRAKES":
_48=_48.replace(/<BR(\s[^>]*)?\/?>/ig,"~RADEDITORBRAKE~");
_48=_48.replace(/<\/?[^>]*>/ig,"");
_48=_48.replace(/~RADEDITORBRAKE~/ig,"<br/>");
_48=_48.replace(/\n/ig,"<br/>");
_48=_48.replace(/\r/ig,"");
break;
case "WORD":
case "WORD_ALL":
case "WORD_NO_FONTS":
_48=this.stripWordFormatting(_48,_49);
break;
case "CSS":
_48=_48.replace(new RegExp("(<[^>]+) class=[^ |^>]*([^>]*>)","ig"),"$1 $2");
_48=_48.replace(/(<[^>]+) style="[^"]*"([^>]*>)/ig,"$1 $2");
break;
case "FONT":
_48=_48.replace(/<\/?font[^>]*>/ig,"");
break;
case "SPAN":
_48=_48.replace(/<\/?span[^>]*>/ig,"");
break;
case "SCRIPT":
_48=_48.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_48=_48.replace(new RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
break;
default:
break;
}
return _48;
},replaceNewLineWithBr:function(_4a){
try{
_4a=_4a.replace(/\n/g,"<br>");
return _4a;
}
catch(exc){
}
},convertText2Html:function(_4b){
try{
_4b=_4b.replace(/</g,"&lt;");
_4b=_4b.replace(/>/g,"&gt;");
_4b=_4b.replace(/\n/g,"<br>");
return _4b;
}
catch(exc){
}
},clearWordAttributesInElement:function(_4c,_4d){
var _4e=$telerik.isIE?_4c.all:_4c.getElementsByTagName("*");
for(var i=0;i<_4e.length;i++){
var _50=_4e[i];
var _51=new RegExp("mso","gi");
if(_50.nodeType==1){
if(_51.exec(_50.className)){
_50.className="";
}
_50.removeAttribute("lang","",0);
_50.removeAttribute("stylw","",0);
_50.style.cssText=_50.style.cssText.replace(/(([\w-]*?mso[\w-]*?):(.+?)([;^$]|$))/gi,"");
if($telerik.isIE){
_50.style.removeAttribute("tab-stops",0);
_50.style.removeAttribute("textIndent",0);
}
if($telerik.isIE&&(_4d=="WORD_NO_FONTS"||_4d=="WORD_ALL")){
_50.style.removeAttribute("fontFamily",0);
_50.removeAttribute("face",0);
}
for(j=_50.attributes.length-1;j>=0;j--){
var _52=_50.attributes[j];
if("null"!=_52.value&&""!=_52.value){
if(_51.exec(_52.name)||_51.exec(_52.value)){
_50.removeAttribute(_52.name);
}
}
}
}
}
},stripWordFormatting:function(_53,_54){
if(_54=="WORD_ALL"){
var _55=/<SPAN[^>]*?>([\s\S]*?)<\/SPAN[^>]*?>/ig;
while(_53.match(_55)){
_53=_53.replace(_55,"$1");
}
var _56=/<FONT[^>]*?>([\s\S]*?)<\/FONT[^>]*?>/ig;
while(_53.match(_56)){
_53=_53.replace(_56,"$1");
}
}
_53=_53.replace(/<span>([^<>]+)<\/span>/gi,"<span EditorSaved='true'>$1</span>");
_53=_53.replace(/<font>([^<>]+)<\/font>/gi,"<font EditorSaved='true'>$1</font>");
var _57=document.createElement("DIV");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_57,_53);
this.clearWordAttributesInElement(_57,_54);
var _58=_57.innerHTML;
if($telerik.isFirefox){
_58=_58.replace(/<link [^>]+>/ig,"");
_58=_58.replace(/<meta [^>]+>/ig,"");
_58=_58.replace(/<!--\[if [^\]]+]>[\s\S]+?<!\[endif\]-->/ig,"");
}
_58=_58.replace(/\t/g," ");
_58=_58.replace(/<\/?\w+:[^>]*>/gi,"");
_58=_58.replace(/<\\?\??xml[^>]>/gi,"");
_58=_58.replace(/<p>&nbsp;<\/p>/gi,"<BR><BR>");
_58=_58.replace(/[ ]+/g," ");
_58=_58.replace(/<(\/)?strong>/ig,"<$1B>");
_58=_58.replace(/<(\/)?em>/ig,"<$1I>");
_58=_58.replace(/^\s/i,"");
_58=_58.replace(/\s$/i,"");
_58=_58.replace(/<o:[pP]>&nbsp;<\/o:[pP]>/gi,"");
_58=_58.replace(/<st1:.*?>/gi,"");
_58=_58.replace(/<font>([^<>]+)<\/font>/gi,"$1");
_58=_58.replace(/<span>([^<>]+)<\/span>/gi,"$1");
_58=_58.replace(/[\s]+EditorSaved=[\'\"]true[\'\"]/gi,"");
_58=_58.replace(/<\?xml[^>]*>/ig,"");
_58=_58.replace(/<\/?[a-z]+:[^>]*>/ig,"");
_58=_58.replace(/style=(""|'')/ig,"");
_58=_58.replace(/class=(""|'')/ig,"");
_58=_58.replace(/v:shape="[^"]+"/ig,"");
_58=_58.replace(/<span[^>]*>\s*<\/span[^>]*>/ig," ");
_58=_58.replace(/<font[^>]*>\s*<\/font[^>]*>/ig," ");
_58=_58.replace(/\s+/ig," ");
_58=_58.replace(/<span><span>/ig,"<span>");
_58=_58.replace(/<\/span><\/span>/ig,"</span>");
return _58;
},createTable:function(_59,_5a,_5b){
if(!_5b){
_5b=document;
}
var _5c=_5b.createElement("TABLE");
for(var r=0;r<_59;r++){
oRow=_5c.insertRow(-1);
for(var c=0;c<_5a;c++){
oCell=oRow.insertCell(-1);
oCell.innerHTML="&nbsp;";
}
}
return _5c;
},mergeElementAttributes:function(_5f,_60,_61){
if(!_5f||!_60){
return;
}
if(_5f.mergeAttributes){
_60.mergeAttributes(_5f,_61);
}else{
for(var ac=0;ac<_5f.attributes.length;ac++){
var _63=_5f.attributes[ac].nodeValue;
_60.setAttribute(_5f.attributes[ac].nodeName,_63);
}
if(""==_60.getAttribute("style")){
_60.removeAttribute("style");
}
}
},getElementParentByTag:function(_64,_65){
if(null==_64){
return null;
}
if(null==_65){
return _64;
}
try{
while(_64&&null!=_64.tagName&&_64.tagName!=_65){
_64=_64.parentNode;
}
return ((_64.tagName==_65)?_64:null);
}
catch(e){
return null;
}
},selectElement:function(_66,_67){
if(!_67){
return;
}
var _68=_66.document;
if($telerik.isIE){
var _69;
switch(_67.tagName){
case "TABLE":
case "IMG":
case "HR":
case "INPUT":
_69=_68.body.createControlRange();
_69.add(_67);
break;
case "UL":
case "OL":
_69=_68.body.createTextRange();
_69.moveToElementText(_67);
var _6a=_69.parentElement();
if(_6a.tagName!="UL"||_6a.tagName!="OL"){
_69.moveEnd("character",-1);
}
break;
default:
_69=_68.body.createTextRange();
_69.moveToElementText(_67);
break;
}
if(_69){
_69.select();
return true;
}
}else{
if(_66.getSelection){
var _69=_68.createRange();
_69.selectNode(_67);
if(window.opera){
_69.selectNodeContents(_67);
}
var _6b=_66.getSelection();
if($telerik.isSafari){
_6b.setBaseAndExtent(_69.startContainer,_69.startOffset,_69.endContainer,_69.endOffset);
}else{
_6b.removeAllRanges();
_6b.addRange(_69);
}
return true;
}
}
return false;
},getOuterHtml:function(_6c){
return $telerik.getOuterHtml(_6c);
},setElementInnerHtml:function(_6d,_6e){
var _6f=$telerik.isIE?this.getStoredOriginalPathsAndAttributes(_6e):_6e;
_6d.innerHTML="<span>&nbsp;</span>"+_6f;
_6d.removeChild(_6d.firstChild);
if($telerik.isIE){
this.restoreOriginalPathsAndAttributes(_6d);
}
},removeNode:function(_70){
var _71=_70.parentNode;
if(_71!=null){
while(_70.childNodes&&_70.childNodes.length>0){
_71.insertBefore(_70.childNodes[0],_70);
}
_71.removeChild(_70);
return _71;
}
return true;
},getStoredOriginalPathsAndAttributes:function(_72){
var _73=function(_74,g1,g2,g3,g4,g5,g6,_7b,_7c){
if(!g3){
g3="";
g4=g4+g6;
var _7d=g4.search(/(\s|>)/gi);
if(_7d>0){
g6=g4.substring(_7d,g4.length);
g4=g4.substring(0,_7d);
}else{
return _74;
}
}
return g1+" "+g2+"="+g3+g4+g3+" originalAttribute=\""+g2+"\" originalPath=\""+g4+"\""+g6;
};
var _7e=new RegExp("(<[^>]*?)\\s(href|src)\\s*=\\s*('|\")?(.+?)(\\3)([^<]*?>)","ig");
_72=_72.replace(_7e,_73);
var _7f=new RegExp("(<!--[\\s\\S]*?) originalAttribute=\"(href|src)\" originalPath=\"[^\"]+\"([\\s\\S]*?-->)","ig");
var _80=_72.length+1;
while(_72.length<_80){
_80=_72.length;
_72=_72.replace(_7f,"$1$3");
}
return _72;
},restoreOriginalPathsAndAttributes:function(_81){
var _82=_81.getElementsByTagName("*");
for(var i=0;i<_82.length;i++){
var _84=_82[i];
var _85=_84.getAttribute("originalPath");
var _86=_84.getAttribute("originalAttribute");
if(_85!=null&&_86!=null){
_84.removeAttribute("originalPath");
_84.removeAttribute("originalAttribute");
if(_85.toLowerCase().indexOf("mailto:")==0){
continue;
}
_85=_85.replace(window.location.href+"#","#");
_84.removeAttribute(_86);
var _87=_84.innerHTML;
_84.setAttribute(_86,_85);
if(_87!=_84.innerHTML){
_84.innerHTML=_87;
}
}
}
},_encodeHtmlContent:function(_88,_89){
var _8a=new Array("%","<",">","!","\"","#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+");
var _8b=_88;
if(_89){
for(var i=0;i<_8a.length;i++){
_8b=_8b.replace(new RegExp("\\x"+_8a[i].charCodeAt(0).toString(16),"ig"),"%"+_8a[i].charCodeAt(0).toString(16));
}
}else{
for(var i=_8a.length-1;i>=0;i--){
_8b=_8b.replace(new RegExp("%"+_8a[i].charCodeAt(0).toString(16),"ig"),_8a[i]);
}
}
return _8b;
},encodePostbackContent:function(_8d){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_8d,true);
},decodePostbackContent:function(_8e){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_8e,false);
},addStyleSheet:function(url,doc,id){
doc=doc||document;
var _92=doc.createElement("link");
_92.setAttribute("href",url,0);
_92.setAttribute("type","text/css");
if(id){
_92.setAttribute("id",id);
}else{
id="";
}
_92.setAttribute("rel","stylesheet",0);
var _93=doc.getElementsByTagName("head")[0];
if($telerik.isSafari){
var _94=function(){
_93.appendChild(_92);
};
window.setTimeout(_94,200);
}else{
_93.appendChild(_92);
}
},_copyElementsBetweenNodes:function(_95,_96,_97){
var _98=_95.getElementsByTagName(_97);
var _99=_96.getElementsByTagName(_97);
for(var i=0;i<_98.length;i++){
switch(_97){
case "script":
case "title":
_99[i].text=_98[i].text;
break;
case "style":
if(_99[i].innerHTML!=_98[i].innerHTML){
_99[i].styleSheet.cssText=_98[i].styleSheet.cssText;
}
break;
default:
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_99[i],_98[i].innerHTML);
break;
}
}
},cloneNodeWithChildren:function(_9b){
if(!_9b){
return null;
}
if($telerik.isIE&&_9b.getElementsByTagName){
var _9c=_9b.cloneNode(true);
if(typeof (_9c.innerHTML)!="string"){
this.setElementInnerHtml(_9c,_9b.innerHTML);
}
this._copyElementsBetweenNodes(_9b,_9c,"script");
this._copyElementsBetweenNodes(_9b,_9c,"map");
this._copyElementsBetweenNodes(_9b,_9c,"style");
this._copyElementsBetweenNodes(_9b,_9c,"title");
return _9c;
}else{
return _9b.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 _9d=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_9d;
}};
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorCommandEventArgs=function(_9e,_9f,_a0){
Telerik.Web.UI.EditorCommandEventArgs.initializeBase(this);
this._name=this._commandName=_9e;
this._tool=_9f;
this._value=_a0;
this.value=_a0;
};
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(_a2,_a3,_a4){
this.isSafari=$telerik.isSafari;
this.isIE=$telerik.isIE;
this.isOpera=$telerik.isOpera;
this.isFirefox=$telerik.isFirefox;
this._title=_a2;
this._window=_a3;
this._isExecuted=false;
this._canUnexecute=(_a4!=false);
};
Telerik.Web.UI.Editor.CommandBase.prototype={get_argument:function(){
return null;
},getState:function(_a5){
return Telerik.Web.UI.Editor.CommandStates.Off;
},getValue:function(_a6){
return null;
},set_window:function(_a7){
this._window=_a7;
},get_window:function(){
return this._window;
},get_title:function(){
return this._title;
},set_title:function(_a8){
this._title=_a8;
},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(_a9,_aa,_ab,_ac){
Telerik.Web.UI.Editor.PasteHtmlCommand.initializeBase(this,[(_a9||"Insert Html"),_aa,true]);
this.HtmlText=_ab;
this.SelectText=(true==_ac);
};
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(_ae,_af){
Telerik.Web.UI.Editor.GenericCommand.initializeBase(this,[_ae,_af,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(_b0,_b1){
Telerik.Web.UI.Editor.TextTypeCommand.initializeBase(this,[(_b0||"Typing"),_b1]);
};
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(_b2,_b3,_b4,_b5){
var _b6=true;
switch(this.CommandID){
case "Copy":
case "SelectAll":
case "Print":
_b6=false;
break;
}
Telerik.Web.UI.Editor.BrowserCommand.initializeBase(this,[(_b2||_b4),_b3,_b6]);
this.CommandID=_b4;
this.Value=_b5;
};
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(_b7){
try{
_b7=_b7||this.get_window();
var _b8=_b7.document;
if(null==_b8){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
var _b9=true;
if("Paste"!=this.CommandID){
_b9=_b8.queryCommandEnabled(this.CommandID);
}else{
if(!$telerik.isIE7){
_b9=_b8.queryCommandEnabled(this.CommandID);
}
}
if(!this.isOpera&&!_b9){
if(!this.isSafari||!this.CommandID=="RealFontSize"){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
}
var _ba=null;
if("Paste"!=this.CommandID){
_ba=_b8.queryCommandState(this.CommandID);
}else{
if(!$telerik.isIE7){
_ba=_b8.queryCommandState(this.CommandID);
}
}
return _ba?Telerik.Web.UI.Editor.CommandStates.On:Telerik.Web.UI.Editor.CommandStates.Off;
}
catch(ex){
return Telerik.Web.UI.Editor.CommandStates.Off;
}
},getValue:function(_bb){
try{
_bb=_bb||this.get_window();
return _bb.document.queryCommandValue(this.CommandID);
}
catch(ex){
}
return null;
},onExecute:function(){
var _bc=this.get_window();
if(!_bc){
return false;
}
var _bd=_bc.document;
if("AbsolutePosition"==this.CommandID){
_bd.execCommand("2D-Position",false,true);
}
var _be=true;
if(this.CommandID=="BackColor"&&(this.isOpera||this.isFirefox)){
this.CommandID="HiliteColor";
_be=false;
}
if(this.CommandID=="FontSize"&&this.isSafari&&!$telerik.isSafari3){
var _bf=parseInt(this.Value);
switch(_bf){
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{
_bd.execCommand("UseCSS",false,(false!=_be));
_bd.execCommand("styleWithCSS",false,(false==_be));
}
catch(e){
}
var _c0=_bd.execCommand(this.CommandID,false,this.Value);
try{
_bd.execCommand("UseCSS",false,true);
_bd.execCommand("styleWithCSS",false,false);
}
catch(e){
}
return _c0;
}};
Telerik.Web.UI.Editor.BrowserCommand.registerClass("Telerik.Web.UI.Editor.BrowserCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.StyleRuleCommand=function(_c1,_c2,_c3,_c4,_c5){
Telerik.Web.UI.Editor.StyleRuleCommand.initializeBase(this,[(_c1||sCmdID),_c2,true]);
if(!_c3){
var _c6=new Telerik.Web.UI.Editor.Selection(this._window);
_c3=_c6.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_c3);
this._styleAttributeName=_c4;
this._newValue=_c5;
};
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 _c7=this._nodeBookmark.select();
if(!_c7){
return false;
}
if(!this._isExecuted){
this._oldValue=_c7.style[this._styleAttributeName];
}
_c7.style[this._styleAttributeName]=this._newValue;
this._isExecuted=true;
return true;
},unexecute:function(){
var _c8=this._nodeBookmark.select();
_c8.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(_c9,_ca,_cb,_cc,_cd){
Telerik.Web.UI.Editor.AttributeCommand.initializeBase(this,[(_c9||sCmdID),_ca,true]);
if(!_cb){
var _ce=new Telerik.Web.UI.Editor.Selection(this._window);
_cb=_ce.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_cb);
this._attribName=_cc;
this._newValue=_cd;
};
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 _cf=this._nodeBookmark.select();
if(!_cf){
return false;
}
if(!this._isExecuted){
if(this._attribName=="style"){
this._oldValue=_cf.style.cssText;
}else{
this._oldValue=_cf.getAttribute(this._attribName);
}
}
if(this._attribName&&this._attribName.toLowerCase()=="name"&&document.all){
_cf.name=this._newValue;
_cf.removeAttribute("name");
_cf.removeAttribute("NAME");
}
var _d0=this._newValue.trim();
if(""==_d0){
_cf.removeAttribute(this._attribName,0);
if("className"==this._attribName){
_cf.removeAttribute("class",0);
}
}else{
if(this._attribName=="style"){
_cf.style.cssText=this._newValue;
}else{
_cf[this._attribName]=this._newValue;
if(this._attribName.toLowerCase()=="nowrap"||this._attribName=="borderColor"){
_cf.setAttribute(this._attribName,this._newValue);
}
}
}
this._isExecuted=true;
return true;
},unexecute:function(){
var _d1=this._nodeBookmark.select();
if(this._attribName=="style"){
_d1.style.cssText=this._oldValue;
}else{
_d1[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(_d2,_d3,_d4){
Telerik.Web.UI.Editor.ClassNameCommand.initializeBase(this,[(_d2||"Classname"),_d3,true]);
};
Telerik.Web.UI.Editor.ClassNameCommand.prototype={getValue:function(_d5){
_d5=_d5||this._window;
if($telerik.isIE){
return this._getValueIE(_d5);
}else{
return this._getValueMoz(_d5);
}
},_getValueIE:function(_d6){
var _d7=new Telerik.Web.UI.Editor.Selection(_d6);
var _d8=_d7.getParentElement();
if("BODY"==_d8.tagName){
return "";
}else{
return (""==_d8.className?"":_d8.className);
}
},_getValueMoz:function(_d9){
if(!_d9){
return "";
}
var _da=_d9.getSelection();
if(!_da){
return "";
}
if(_da.rangeCount!=1){
return "";
}
var _db=(_da.focusNode.nodeType!=3?_da.focusNode:_da.focusNode.parentNode);
var _dc=(_da.anchorNode.nodeType!=3?_da.anchorNode:_da.anchorNode.parentNode);
if(_db!=_dc){
return "";
}
var _dd=new Telerik.Web.UI.Editor.Selection(_d9);
var _de="",_df;
if(null!=_dd&&null!=(_df=_dd.getParentElement())){
_de=_df.className;
}
return (""==_de?"":_de);
}};
Telerik.Web.UI.Editor.ClassNameCommand.registerClass("Telerik.Web.UI.Editor.ClassNameCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.FormatBlockCommand=function(_e0,_e1,_e2){
Telerik.Web.UI.Editor.FormatBlockCommand.initializeBase(this,[(_e0||"Format Block"),_e1,true]);
this.FormatValue=_e2;
};
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(_e3){
try{
_e3=_e3||this._window;
var _e4=_e3.document.queryCommandValue("FormatBlock");
if(!document.all){
switch(_e4){
case "x":
case "":
_e4="Normal";
break;
}
}
return _e4;
}
catch(ex){
}
return null;
},_isFormatBlockElement:function(_e5){
if(!_e5||!_e5.tagName){
return false;
}
var _e6=_e5.tagName;
if(_e6=="H1"||_e6=="H2"||_e6=="H3"||_e6=="H4"||_e6=="H5"||_e6=="H6"||_e6=="H7"||_e6=="ADDRESS"||_e6=="PRE"){
return true;
}
},OnExecuteIE:function(){
var _e7=this._window.document;
if("<p>"==this.FormatValue.toLowerCase()){
return _e7.execCommand("FormatBlock",false,"<p>")&&_e7.execCommand("RemoveFormat");
}
var _e8=_e7.selection.createRange();
var _e9=false;
var _ea=_e8.htmlText.trim();
if(_ea&&_ea.length>2&&_ea.substr(0,2).toLowerCase()=="<p"){
_e9=true;
}
if(!_e9&&""!=_e8.text){
var _eb=this.FormatValue.substring(1,this.FormatValue.length-1);
_e7.execCommand("FormatBlock",false,"<p>");
_e7.execCommand("RemoveFormat");
var _ec=_e7.createElement(_eb);
_ec.innerHTML=_e8.htmlText;
_e8.pasteHTML(_ec.outerHTML);
return true;
}else{
return _e7.execCommand("FormatBlock",false,this.FormatValue);
}
},OnExecuteMoz:function(){
var _ed=this.FormatValue.substring(1,this.FormatValue.length-1);
var _ee=this._window.document;
var _ef=("body"==this.FormatValue.toLowerCase()||"normal"==this.FormatValue.toLowerCase());
var _f0=null;
var _f1=_ed.indexOf(" ");
if(_f1!=-1){
_f0=_ed.substring(_f1+1);
_ed=_ed.substring(0,_f1);
}
if(this.isSafari){
if(_ef){
}else{
var _f2=_ee.createElement(_ed);
if(_f0){
var _f3="";
_f3=_f0.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_f3.length>0){
_f2.className=_f3;
}
}
var _f4=new Telerik.Web.UI.Editor.Selection(this._window);
_f2.innerHTML=_f4.getHtml();
var _f5=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_f2.outerHTML,true);
_f5.execute();
}
return;
}
if(_ef){
return _ee.execCommand("FormatBlock",false,"Normal");
}
var _f6=this._window.getSelection();
if(_f6.rangeCount<1){
return false;
}
var _f7=_f6.getRangeAt(0);
var _f8=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
if(_f7.toString()!=""&&!this._isFormatBlockElement(_f8)){
try{
var _f2=_ee.createElement(_ed);
if(_f0){
var _f3="";
_f3=_f0.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_f3.length>0){
_f2.className=_f3;
}
}
_f2.appendChild(_f7.extractContents());
_f7.insertNode(_f2);
return true;
}
catch(ex){
return false;
}
}else{
return _ee.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(_f9,_fa,_fb,_fc,_fd){
Telerik.Web.UI.Editor.InsertListCommand.initializeBase(this,[(_f9||"Insert List"),_fa,true]);
this._newLineBr=(_fb==true);
this._commandName=_fc;
this._listType=(_fc=="InsertOrderedList")?"OL":"UL";
this._listStyle=_fd;
this._document=this._window.document;
};
Telerik.Web.UI.Editor.InsertListCommand.prototype={_insertList:function(){
return this._document.execCommand(this._commandName,false,false);
},_pasteHtml:function(_fe){
var _ff=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_fe);
_ff.execute();
},_expandSelection:function(_100,_101,_102){
var _103=_100.duplicate();
var _104=null;
var _105=null;
for(var i=_101.length-1;i>=0;i--){
_103.moveToElementText(_101[i]);
var _107=_100.compareEndPoints("StartToStart",_103);
if(-1==_107||0==_107){
if(_102[_101[i].tagName]!=null){
_105=_101[i];
}
}else{
if(_102[_101[i].tagName]!=null){
_104=_101[i];
break;
}
}
}
if(_104){
_103.moveToElementText(_104);
_100.setEndPoint("StartToEnd",_103);
}else{
var _108=_100.parentElement();
_103.moveToElementText(_108);
_100.setEndPoint("StartToStart",_103);
}
if(_105){
_103.moveToElementText(_105);
if("BR"==_105.tagName){
_100.setEndPoint("EndToEnd",_103);
}else{
_100.setEndPoint("EndToStart",_103);
}
}else{
var _108=_100.parentElement();
_103.moveToElementText(_108);
_100.setEndPoint("EndToEnd",_103);
}
_100.select();
},_handleEmptyListSelection:function(_109,_10a){
var _10b=_109.parentElement();
var _10c=(_10b&&"P"==_10b.tagName.toUpperCase());
var brs=_10b.getElementsByTagName("BR");
if(_10c&&brs.length==0){
return this._insertList();
}else{
var _10e={};
_10e["BR"]="";
_10e["TD"]="";
_10e["OL"]="";
_10e["UL"]="";
_10e["TABLE"]="";
_10e["DIV"]="";
_10e["IMG"]="";
_10e["OBJECT"]="";
var _10f=_109.parentElement().getElementsByTagName("*");
this._expandSelection(_109,_10f,_10e);
if(_109.htmlText){
return this.OnExecuteIE();
}
}
},OnExecuteIE:function(){
if(!this._newLineBr){
return this._insertList();
}
var _110=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
var _111=this._document.selection.createRange();
if("OL"==_110.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_110,"OL")!=null||"UL"==_110.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_110,"UL")!=null){
return this._insertList();
}else{
if("TD"==_110.tagName||"TR"==_110.tagName||"TBODY"==_110.tagName||"TABLE"==_110.tagName){
var _111=this._document.selection.createRange();
var _112=_111.parentElement().getElementsByTagName("TD");
for(var i=_112.length-1;i>=0;i--){
brRange=_111.duplicate();
brRange.moveToElementText(_112[i]);
if(_111.inRange(brRange)&&_112[i].innerHTML!=""){
_111.moveToElementText(_112[i]);
}
}
}
}
var oSel=this._document.selection;
var _115=this._listType;
if(oSel.type=="Control"){
var _116=this._document.body.createTextRange();
_116.moveToElementText(_111(0));
var _117=_116.parentElement();
var _118=_117.tagName.toLowerCase();
if(_118=="table"||_118=="tbody"){
var _119=_117.parentNode.outerHTML;
_117.parentNode.outerHTML="<"+_115+"><LI>"+_119+"</LI></"+_115+">";
}else{
var _119=_116.htmlText;
this._pasteHtml("<"+_115+"><LI>"+_119+"</LI></"+_115+">");
}
}else{
if(_111.htmlText==""){
return this._handleEmptyListSelection(_111,this._commandName);
}
var _11a=this._document.createElement("SPAN");
_11a.innerHTML=_111.htmlText;
if(_11a.getElementsByTagName("P").length>0){
return this._insertList();
}else{
var _11b;
if(_111.parentElement().tagName.toUpperCase()=="LI"){
_11b=_111.parentElement().parentNode;
}else{
_11b=_111.parentElement();
}
if(_11b.tagName.toUpperCase()=="OL"||_11b.tagName.toUpperCase()=="UL"){
var _11c=_11b.tagName.toUpperCase();
if(_115==_11c){
if(this._newLineBr){
var _11d=_111.duplicate();
var _11e=_111.duplicate();
_11e.moveToElementText(_11b);
var _11f=_111.duplicate();
var _120=_11b.getElementsByTagName("LI");
var _121=0;
var _122=_120.length-1;
var _123=_111.duplicate();
_123.moveToElementText(_120[0]);
var _124=_111.duplicate();
_124.moveToElementText(_120[_120.length-1]);
_11f.setEndPoint("EndToEnd",_124);
_11f.setEndPoint("StartToStart",_123);
while((_121<_120.length)&&(_11f.compareEndPoints("StartToStart",_11d)<=0)){
_11f.moveToElementText(_120[_121]);
_11f.setEndPoint("EndToEnd",_124);
_121++;
}
_121-=2;
while((_122>0)&&(_11f.compareEndPoints("EndToEnd",_11d)>=0)){
_11f.moveToElementText(_120[_122]);
_11f.setEndPoint("StartToStart",_123);
_122--;
}
_122+=2;
var _125=_111.duplicate();
var _126=_111.duplicate();
_125.moveToElementText(_120[_121]);
_125.collapse(true);
_125.setEndPoint("StartToStart",_11e);
_126.moveToElementText(_120[_122]);
_126.collapse(false);
_126.setEndPoint("EndToEnd",_11e);
_111.setEndPoint("StartToEnd",_125);
_111.setEndPoint("EndToStart",_126);
var _127="";
var _128=false;
var _129=false;
if(_125.htmlText.replace(/<(.*?)>/)!=""){
_127+="<"+_11c+">"+_125.htmlText+"</"+_11c+">";
}else{
_128=true;
}
_127+=_111.htmlText.replace(/<LI\/?>/gi,"<BR>").replace(/<\/LI>/gi,"").replace(/^\s*<BR\/?>/gi,"").replace(/<BR\/?>\s*$/gi,"");
if(_126.htmlText.replace(/<(.*?)>/)!=""){
_127+="<"+_11c+">"+_126.htmlText+"</"+_11c+">";
}else{
_129=true;
_127+="<BR>";
}
if(_128&&_129){
_127=_127.replace(new RegExp("</?"+_11c+"/?>","gi"),"").replace(/^\s*<BR\/?>/gi,"");
}
if(_11b.parentNode.childNodes[0]==_11b){
_11e.collapse();
_11b.parentNode.removeChild(_11b,_127);
}else{
_11e.moveStart("character",-1);
}
this._pasteHtml(_127);
}else{
return this._insertList();
}
}else{
return this._insertList();
}
}else{
var _12a=_111.duplicate();
_12a.collapse(false);
_12a.moveEnd("character",1);
if(_12a.htmlText.match(/<BR\/?>/gi)){
_111.moveEnd("character",1);
}
var _12b="<"+_115+"><LI>"+_111.htmlText.replace(/(<BR\s*>\s*)*$/gi,"").replace(/<BR\/?>$/gi,"").replace(/<BR\/?>/gi,"</LI><LI>")+"</LI></"+_115+">";
try{
_111.pasteHTML(_12b);
}
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(_12c,_12d){
Telerik.Web.UI.Editor.TableCommandBase.initializeBase(this,[(_12c||"Table Command"),_12d,true]);
};
Telerik.Web.UI.Editor.TableCommandBase.prototype={getState:function(_12e){
return this.getSelectedCell(_12e)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
},getSelectedCell:function(_12f){
var _130=new Telerik.Web.UI.Editor.Selection(_12f||this._window);
var _131;
if(_130){
_131=_130.getParentElement();
}
while(null!=_131&&_131.tagName!="TD"&&_131.tagName!="TH"&&_131.tagName!="BODY"){
_131=_131.parentNode;
}
if(!_131||!_131.tagName){
return null;
}
return (_131.tagName=="TD"||_131.tagName=="TH"?_131:null);
},getSelectedRow:function(_132){
var _133=new Telerik.Web.UI.Editor.Selection(_132||this._window);
var _134;
if(_133){
_134=_133.getParentElement();
}
if(!_134){
return null;
}
while(null!=_134&&_134.tagName!="TR"&&_134.tagName!="BODY"){
_134=_134.parentNode;
}
return (_134&&_134.tagName=="TR"?_134:null);
},getParentTable:function(_135){
if(!_135){
return null;
}
while(null!=_135&&_135.parentNode!=_135&&"TABLE"!=_135.tagName){
_135=_135.parentNode;
}
return (_135&&_135.tagName=="TABLE"?_135:null);
}};
Telerik.Web.UI.Editor.TableCommandBase.registerClass("Telerik.Web.UI.Editor.TableCommandBase",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TableInsertRow=function(_136,_137,_138){
Telerik.Web.UI.Editor.TableInsertRow.initializeBase(this,[(_136||"Insert row"),_137,true]);
this._direction=_138||"above";
};
Telerik.Web.UI.Editor.TableInsertRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertRow(this._title,this._window,this._direction);
},getState:function(_139){
return (this.getSelectedRow(_139)?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 _13c=row.rowIndex;
if("below"==this._direction){
_13c++;
}
var _13d=this.getParentTable(row);
if(!_13d){
return false;
}
var _13e=_13d.insertRow(_13c);
if(!_13e){
return false;
}
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(row,_13e);
var _13f;
for(var i=0;i<row.cells.length;i++){
cell=row.cells[i];
_13f=_13e.insertCell(-1);
_13f.colSpan=cell.colSpan;
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_13f);
_13f.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(_141,_142){
Telerik.Web.UI.Editor.TableDeleteRow.initializeBase(this,[(_141||"Delete Row"),_142,true]);
};
Telerik.Web.UI.Editor.TableDeleteRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableDeleteRow(this._title,this._window);
},getState:function(_143){
return (this.getSelectedRow(_143)?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(_145,_146,_147){
Telerik.Web.UI.Editor.TableInsertColumn.initializeBase(this,[(_145||"Insert column"),_146,true]);
this._direction=_147||"left";
};
Telerik.Web.UI.Editor.TableInsertColumn.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertColumn(this._title,this._window,this._direction);
},getState:function(_148){
return (this.getSelectedCell(_148)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _14a=cell.cellIndex;
if("right"==this._direction){
_14a++;
}
var _14b=this.getParentTable(cell);
if(!_14b){
return false;
}
var rows=_14b.rows;
var _14d;
for(var i=0;i<rows.length;i++){
_14d=rows[i].insertCell(_14a);
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_14d);
_14d.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(_14f,_150,_151){
Telerik.Web.UI.Editor.TableDeleteColumn.initializeBase(this,[(_14f||"Delete column"),_150,true]);
};
Telerik.Web.UI.Editor.TableDeleteColumn.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableDeleteColumn.New(this._title,this._window);
},getState:function(_152){
return (this.getSelectedCell(_152)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _154=cell.cellIndex;
var _155=this.getParentTable(cell);
if(!_155){
return false;
}
var rows=_155.rows;
for(var i=0;i<rows.length;i++){
cell=rows[i].cells[_154];
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(_158,_159){
Telerik.Web.UI.Editor.TableMergeRows.initializeBase(this,[(_158||"Merge rows"),_159,true]);
};
Telerik.Web.UI.Editor.TableMergeRows.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeRows.New(this._title,this._window);
},getState:function(_15a){
var cell=this.getSelectedCell(_15a);
if(null!=cell){
var _15c=this.getLowerCell(cell);
if(null!=_15c&&cell.colSpan==_15c.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 _15e=this.getLowerCell(cell);
if(!_15e){
return false;
}
if(""!=_15e.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_15e.innerHTML;
}
cell.rowSpan+=_15e.rowSpan;
var row=_15e.parentNode;
row.removeChild(_15e);
if(!row.cells||row.cells.length==0){
for(var i=cell.parentNode.cells.length-1;i>=0;i--){
var _161=cell.parentNode.cells[i];
if(_161.rowSpan>1){
_161.rowSpan--;
}
}
row.parentNode.removeChild(row);
}
return true;
},getLowerCell:function(cell){
if(!cell){
return null;
}
var _163=this.getParentTable(cell);
var row=cell.parentNode;
var _165=_163.rows[row.rowIndex+cell.rowSpan];
if(!_165){
return null;
}
var _166=_165.cells[cell.cellIndex];
if(!_166){
for(var i=_165.cells.length-1;i>=0;i--){
if(_165.cells[i].offsetLeft==cell.offsetLeft){
return _165.cells[i];
}
}
}
return _166;
}};
Telerik.Web.UI.Editor.TableMergeRows.registerClass("Telerik.Web.UI.Editor.TableMergeRows",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeColumns=function(_168,_169){
Telerik.Web.UI.Editor.TableMergeColumns.initializeBase(this,[(_168||"Merge columns"),_169,true]);
};
Telerik.Web.UI.Editor.TableMergeColumns.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeColumns.New(this._title,this._window);
},getState:function(_16a){
var cell=this.getSelectedCell(_16a);
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 _16e=row.cells[cell.cellIndex+1];
if(null!=_16e&&cell.rowSpan==_16e.rowSpan){
return _16e;
}else{
return null;
}
},onExecute:function(){
var cell=this.getSelectedCell();
if(null==cell){
return false;
}
var _170=this.getNextSiblingCell(cell);
if(!_170){
return false;
}
cell.colSpan+=_170.colSpan;
if(""!=_170.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_170.innerHTML;
}
_170.parentNode.removeChild(_170);
return true;
}};
Telerik.Web.UI.Editor.TableMergeColumns.registerClass("Telerik.Web.UI.Editor.TableMergeColumns",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableSplitCell=function(_171,_172){
Telerik.Web.UI.Editor.TableSplitCell.initializeBase(this,[(_171||"Split cell"),_172,true]);
};
Telerik.Web.UI.Editor.TableSplitCell.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableSplitCell(this._title,this._window);
},getState:function(_173){
var cell=this.getSelectedCell(_173);
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 _176=this.getParentTable(cell);
if(!_176){
return false;
}
var row=cell.parentNode;
var _178=("THEAD"==row.parentNode.tagName.toUpperCase()?"TH":"TD");
if(cell.colSpan>1){
var _179=this._window.document.createElement(_178);
_179.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_179);
_179.colSpan=1;
cell.colSpan--;
var _17a=cell.nextSibling;
if(_17a){
row.insertBefore(_179,_17a);
}else{
row.appendChild(_179);
}
}
if(cell.rowSpan>1){
var _17b=_176.rows[row.rowIndex+cell.rowSpan-1];
if(!_17b){
return;
}
var _179=this._window.document.createElement(_178);
_179.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_179);
_179.rowSpan=1;
cell.rowSpan--;
var _17a=_17b.cells[this.getRealCellIndex(cell)];
if(_17a){
_17b.insertBefore(_179,_17a);
}else{
_17b.appendChild(_179);
}
}
return true;
},getRealCellIndex:function(cell){
if(!cell){
return 0;
}
var row=cell.parentNode;
var i=0;
var _17f=0;
while(row.cells.length>i&&row.cells[i]!=cell){
var _180=row.cells[i];
if(_180.colSpan>1){
_17f+=_180.colSpan;
}else{
_17f++;
}
i++;
}
return _17f;
}};
Telerik.Web.UI.Editor.TableSplitCell.registerClass("Telerik.Web.UI.Editor.TableSplitCell",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteCell=function(_181,_182){
Telerik.Web.UI.Editor.TableDeleteCell.initializeBase(this,[(_181||"Delete cell"),_182,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(_184){
Telerik.Web.UI.EditorButton.initializeBase(this,[_184]);
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(_185,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 _189=_185.get_element();
ul.appendChild(_189);
li=document.createElement("LI");
li.innerHTML="&nbsp;";
li.className="rade_grip grip_last";
ul.appendChild(li);
return ul;
};
Telerik.Web.UI.EditorButton.getToolRootNode=function(_18a){
while(_18a&&_18a.tagName!="LI"){
_18a=_18a.parentNode;
}
return _18a;
};
Telerik.Web.UI.EditorButton._createButton=function(_18b){
var _18c=document.createElement("LI");
var a=document.createElement("A");
_18c.appendChild(a);
a.className=_18b.showText==true?"rade_tool_text":"rade_tool";
var text=_18b["text"];
a.title=text?text:_18b["name"];
a.href="#";
a.setAttribute("unselectable","on");
if(_18b.showIcon!=false){
var span=document.createElement("SPAN");
span.className=_18b.name;
span.innerHTML="&nbsp;";
span.setAttribute("unselectable","on");
a.appendChild(span);
}
if(_18b.showText==true){
var span=document.createElement("SPAN");
span.className="rade_button_text";
span.innerHTML=_18b.text?_18b.text:_18b.name;
span.setAttribute("unselectable","on");
a.appendChild(span);
}
return _18c;
};
Telerik.Web.UI.EditorButton.createTool=function(_190,_191,type,_193,_194){
if(!type){
type=Telerik.Web.UI.EditorButton;
}
if(!_193){
_193=Telerik.Web.UI.EditorButton._createButton(_190);
if(type==Telerik.Web.UI.EditorSplitButton||type.inheritsFrom(Telerik.Web.UI.EditorSplitButton)){
var a=_193.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=_193.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 _197=_190["width"]?_190["width"]:"50px";
span.style.width=_197;
a.appendChild(span);
}
}
}
}
var tool=$create(type,_190,_191,null,_193);
if(_194&&_194.appendChild){
_194.appendChild(_193);
}
return tool;
};
Telerik.Web.UI.EditorButton.prototype={initialize:function(){
var _199=this.getAnchorElement();
if(_199){
_199.setAttribute("unselectable","on");
}
var span=this.getSpanElement();
if(span){
span.setAttribute("unselectable","on");
}
if(this._addClickHandler){
var _19b=this.get_element();
$addHandlers(_19b,{"click":this.click},this);
}
},dispose:function(){
var _19c=this.get_element();
if(_19c){
$clearHandlers(_19c);
}
Telerik.Web.UI.EditorButton.callBaseMethod(this,"dispose");
},click:function(e){
this.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(e);
},add_valueSelected:function(_19e){
this.get_events().addHandler("valueSelected",_19e);
},remove_valueSelected:function(_19f){
this.get_events().removeHandler("valueSelected",_19f);
},raiseEvent:function(_1a0,_1a1){
var _1a2=this.get_events().getHandler(_1a0);
if(_1a2){
if(!_1a1){
_1a1=Sys.EventArgs.Empty;
}
_1a2(this,_1a1);
}
},set_width:function(_1a3){
var span=this.getSpanElement();
if(span){
span.style.width=_1a3;
}
},get_width:function(){
return this.get_element().offsetWidth;
},set_height:function(_1a5){
var span=this.getSpanElement();
if(span){
span.style.height=_1a5;
}
},get_height:function(){
return this.get_element().offsetHeight;
},isTarget:function(e){
return $telerik.isDescendantOrSelf(this.get_element(),e.target);
},setState:function(_1a8){
this.set_enabled(_1a8!=Telerik.Web.UI.Editor.CommandStates.Disabled);
this.setOn(_1a8==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(_1aa){
this._addClickHandler=_1aa;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_1ab){
this._attributes=_1ab;
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_1ac){
this._autoPostBack=_1ac;
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_1ad){
if(this._enabled!=_1ad){
this._enabled=_1ad;
var _1ae=this.getAnchorElement();
if(!this._enabled){
this._addAnchorCssClass("rade_tool_disabled");
_1ae.setAttribute("disabled","disabled");
}else{
this._removeAnchorCssClass("rade_tool_disabled");
_1ae.removeAttribute("disabled");
}
}
},isOn:function(){
return this._isOn;
},setOn:function(_1af){
if(this._isOn!=_1af){
this._isOn=_1af;
if(this._isOn){
this._addAnchorCssClass("rade_tool_selected");
}else{
this._removeAnchorCssClass("rade_tool_selected");
}
}
},get_name:function(){
return this._name;
},set_name:function(_1b0){
this._name=_1b0;
},get_text:function(){
if(this._text){
return this._text;
}
var _1b1=this.getAnchorElement();
if(_1b1&&_1b1.getAttribute("title")){
return _1b1.getAttribute("title");
}
return this.get_name();
},set_text:function(_1b2){
if(this._text!=_1b2){
this._text=_1b2;
if(this.get_showText()){
this.getSpanElement().innerHTML=_1b2;
}
}
},get_shortCut:function(){
return this._shortCut;
},set_shortCut:function(_1b3){
this._shortCut=_1b3;
},get_showIcon:function(){
return this._showIcon;
},set_showIcon:function(_1b4){
if(this._showIcon!=_1b4){
this._showIcon=_1b4;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_1b5){
this._skin=_1b5;
},_addAnchorCssClass:function(_1b6){
Sys.UI.DomElement.addCssClass(this.getAnchorElement(),_1b6);
},_removeAnchorCssClass:function(_1b7){
Sys.UI.DomElement.removeCssClass(this.getAnchorElement(),_1b7);
},get_showText:function(){
return this._showText;
},set_showText:function(_1b8){
if(this._showText!=_1b8){
this._showText=_1b8;
}
},get_type:function(){
return this._type;
},set_type:function(_1b9){
this._type=_1b9;
},get_clientTypeName:function(){
return this._clientTypeName;
},set_clientTypeName:function(_1ba){
this._clientTypeName=_1ba;
},getAnchorElement:function(){
var _1bb=this.get_element().firstChild;
while(_1bb!=null&&(_1bb.tagName==null)){
_1bb=_1bb.nextSibling;
}
return _1bb;
},getSpanElement:function(){
var _1bc=this.getAnchorElement();
var _1bd=_1bc.firstChild;
while(_1bd!=null&&(_1bd.tagName==null||_1bd.tagName.toLowerCase()!="span")){
_1bd=_1bd.nextSibling;
}
return _1bd;
}};
Telerik.Web.UI.EditorButton.registerClass("Telerik.Web.UI.EditorButton",Sys.UI.Control);
Telerik.Web.UI.EditorSpinBoxEventArgs=function(_1be,_1bf){
Telerik.Web.UI.EditorSpinBoxEventArgs.initializeBase(this);
this._newValue=_1be;
this._oldValue=_1bf;
};
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(_1c0){
Telerik.Web.UI.EditorSpinBox.initializeBase(this,[_1c0]);
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 _1c1=document.createElement("table");
_1c1.cellSpacing=0;
_1c1.cellPadding=0;
_1c1.className=this.get_visibleInput()?this._className:"rade_TableWizardSpinBox";
_1c1.insertRow(-1);
var _1c2=_1c1.rows[0].insertCell(-1);
var _1c3=document.createElement("INPUT");
_1c3.className="radfd_skipme";
_1c3.type="text";
_1c3.onclick=function(e){
this.focus();
};
_1c3.onkeypress=Function.createDelegate(this,this._onKeyPressHandler);
_1c3.onchange=Function.createDelegate(this,this._onChangeHandler);
this._inputElement=_1c3;
_1c2.appendChild(_1c3);
if(!this.get_visibleInput()){
this.set_visibleInput(false);
}
if(this.get_visibleInput()){
_1c2=_1c1.rows[0].insertCell(-1);
var _1c5=document.createElement("table");
_1c5.cellSpacing=0;
_1c5.cellPadding=0;
_1c5.insertRow(-1);
var _1c6=_1c5.rows[0].insertCell(-1);
var _1c7=this._createAnchorElement("Increase");
this._increaseButton=_1c7;
_1c6.appendChild(_1c7);
_1c5.insertRow(-1);
_1c6=_1c5.rows[1].insertCell(-1);
_1c7=this._createAnchorElement("Decrease");
this._decreaseButton=_1c7;
_1c6.appendChild(_1c7);
_1c2.appendChild(_1c5);
}else{
_1c2=_1c1.rows[0].insertCell(-1);
var _1c7=this._createAnchorElement_noinput("Increase");
this._increaseButton=_1c7;
_1c2.appendChild(_1c7);
_1c2=_1c1.rows[0].insertCell(-1);
_1c7=this._createAnchorElement_noinput("Decrease");
this._decreaseButton=_1c7;
_1c2.appendChild(_1c7);
}
var _1c8=this.get_element();
_1c8.appendChild(_1c1);
_1c8.style.width=this.get_width();
},_createAnchorElement:function(_1c9){
var _1ca=document.createElement("A");
_1ca.title=_1c9;
_1ca.href="javascript:void(0);";
_1ca.innerHTML=_1c9;
_1ca.className="rade_SpinBox"+_1c9;
_1ca.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return _1ca;
},_createAnchorElement_noinput:function(_1cb){
var _1cc=document.createElement("A");
_1cc.title=_1cb;
_1cc.href="javascript:void(0);";
_1cc.innerHTML="<span class='rade_TableWizardSpinBox_"+_1cb+"'>"+_1cb+"</span>";
_1cc.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return _1cc;
},_executeFunction:function(e,elem,_1cf){
if(_1cf){
if(elem.Executed){
elem.Executed=false;
return $telerik.cancelRawEvent(e);
}
}
elem.Executed=true;
var _1d0=(this._selectedItem!="")?this._selectedItem:this._initialValue;
this._selectedItem=elem.value;
var _1d1=new Telerik.Web.UI.EditorSpinBoxEventArgs(elem.value,_1d0);
this.raiseEvent("valueSelected",_1d1);
},_onPlusMinusClickHandler:function(e){
var _1d3=null;
if(!e){
_1d3=window.event.srcElement;
}else{
_1d3=e.target;
}
while(_1d3&&_1d3.tagName.toLowerCase()!="a"){
_1d3=_1d3.parentNode;
}
if(!_1d3){
return;
}
var _1d4=this.get_value();
_1d4=_1d4.replace(/^0+(\d)/ig,"$1");
if(""==_1d4){
_1d4="0";
}
var _1d5=parseInt(_1d4);
var _1d6=_1d5+"";
if(isNaN(_1d5)){
return;
}else{
_1d6=_1d4.substring(_1d6.length);
}
if(_1d3==this._increaseButton){
if(this._enabledIncrease){
_1d5++;
}else{
return;
}
}else{
if(_1d3==this._decreaseButton){
if(this._enabledDecrease){
_1d5--;
}else{
return;
}
}else{
_1d3=null;
}
}
if(_1d3){
this.set_value(_1d5+_1d6);
this._executeFunction(e,this._inputElement);
}
return false;
},_onChangeHandler:function(e){
if(!e){
e=window.event;
}
this._executeFunction(e,this._inputElement);
},_onKeyPressHandler:function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
this._executeFunction(e,this._inputElement);
return $telerik.cancelRawEvent(e);
}
},_onKeyDownHandler:function(e){
if(!e){
var e=window.event;
}
e.returnValue=this._isKeyValid(e);
},_onKeyUpHandler:function(e){
if(!e){
var e=window.event;
}
if(this._isKeyValid(e,true)){
var _1db=this._selectedItem;
var _1dc=this.get_value();
var _1dd=new Telerik.Web.UI.EditorSpinBoxEventArgs(_1dc,_1db);
this.raiseEvent("valueSelected",_1dd);
}
},_isKeyValid:function(e,_1df){
try{
if(!_1df){
_1df=false;
}
if(!e){
e=window.event;
}
var _1e0=((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(!_1df){
_1e0|=((35<=e.keyCode&&e.keyCode<=40));
}
return _1e0;
}
catch(ex){
return true;
}
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1e1){
if(null==_1e1){
_1e1="";
}
this._inputElement.value=_1e1;
if(this._initialValue==""){
this._initialValue=_1e1;
}
},get_width:function(){
return this._width;
},set_width:function(_1e2){
this._width=_1e2;
var _1e3=this.get_element();
_1e3.style.width=this._width;
},get_enabledIncrease:function(){
return this._enabledIncrease;
},set_enabledIncrease:function(_1e4){
this._enabledIncrease=_1e4;
this._setButtonState(this._increaseButton,_1e4);
},get_enabledDecrease:function(){
return this._enabledDecrease;
},set_enabledDecrease:function(_1e5){
this._enabledDecrease=_1e5;
this._setButtonState(this._decreaseButton,_1e5);
},_setButtonState:function(_1e6,_1e7){
if(!_1e7){
Sys.UI.DomElement.addCssClass(_1e6,"disabled-button");
}else{
Sys.UI.DomElement.removeCssClass(_1e6,"disabled-button");
}
},get_visibleInput:function(){
return this._visibleInput;
},set_visibleInput:function(_1e8){
this._visibleInput=_1e8;
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(_1e9){
this._clientStateFieldID=_1e9;
}};
Telerik.Web.UI.EditorSpinBox.registerClass("Telerik.Web.UI.EditorSpinBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorCheckBox=function(_1ea){
Telerik.Web.UI.EditorCheckBox.initializeBase(this,[_1ea]);
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(_1eb){
if(this._inputElement.checked!=_1eb){
this._inputElement.checked=_1eb;
}
},initialize:function(){
var _1ec=document.createElement("INPUT");
_1ec.setAttribute("type","CHECKBOX");
_1ec.Parent=this;
_1ec.onclick=function(e){
var oP=this.Parent;
oP._selectedItem=!oP._selectedItem;
this.checked=oP._selectedItem;
oP._selectedItem=this.checked;
oP.raiseEvent("valueSelected");
};
this._inputElement=_1ec;
this.get_element().appendChild(_1ec);
}};
Telerik.Web.UI.EditorCheckBox.registerClass("Telerik.Web.UI.EditorCheckBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorTextBox=function(_1ef){
Telerik.Web.UI.EditorTextBox.initializeBase(this,[_1ef]);
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(_1f0){
this._width=_1f0;
},initialize:function(){
var _1f1=document.createElement("INPUT");
_1f1.style.width=this.get_width();
_1f1.Parent=this;
var _1f2=this.get_name();
var _1f3=function(e,elem,_1f6){
if(_1f6){
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);
};
_1f1.onchange=function(e){
if(!e){
e=window.event;
}
return _1f3(e,this,true);
};
_1f1.onclick=function(e){
this.focus();
};
_1f1.onkeypress=function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
return _1f3(e,this);
}
};
this._inputElement=_1f1;
this.get_element().appendChild(_1f1);
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1fa){
if(null==_1fa){
_1fa="";
}
this._inputElement.value=_1fa;
}};
Telerik.Web.UI.EditorTextBox.registerClass("Telerik.Web.UI.EditorTextBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.ImageDialogCaller=function(_1fb){
Telerik.Web.UI.ImageDialogCaller.initializeBase(this,[_1fb]);
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 _1fc=this.get_element();
_1fc.style.width=parseInt(this._inputElement.style.width)+30+"px";
_1fc.className=(this.get_skin()+" "+this._className);
},_createInputElement:function(){
var _1fd=document.createElement("INPUT");
_1fd.style.width=this.get_width();
this._inputElement=_1fd;
this.get_element().appendChild(_1fd);
},_createButton:function(){
var _1fe=document.createElement("A");
_1fe.title="Call Image Manager";
_1fe.href="javascript:void(0);";
_1fe.onclick=Function.createDelegate(this,this._onButtonClickHandler);
_1fe.innerHTML="<span>...</span>";
this.get_element().appendChild(_1fe);
this._pushButton=_1fe;
},_onButtonClickHandler:function(e){
var _200=this;
var _201=function(_202,args){
var src="";
var img=args.Result;
if(img){
src=img.getAttribute("src",2);
}
if(src){
_200._inputElement.value=src;
_200.raiseEvent("valueSelected");
}
};
var args={editor:this.get_editor()};
this._editor.showDialog("ImageManager",args,_201);
},get_editor:function(){
return this._editor;
},set_editor:function(_207){
this._editor=_207;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_208){
if(null==_208){
_208="";
}
this._inputElement.value=_208;
},get_width:function(){
return this._width;
},set_width:function(_209){
this._width=_209;
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_20a){
this._clientStateFieldID=_20a;
}};
Telerik.Web.UI.ImageDialogCaller.registerClass("Telerik.Web.UI.ImageDialogCaller",Telerik.Web.UI.EditorButton);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorDropDown=function(_20b){
Telerik.Web.UI.EditorDropDown.initializeBase(this,[_20b]);
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 _20d=false;
if(!this._rendered){
this.render();
_20d=true;
}
this.raiseEvent("show");
if(!this._childrenRendered){
this.renderChildren();
this._childrenRendered=true;
_20d=true;
}
if(_20d){
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 _20f=this.resolveActiveIndex(e);
if(_20f>-1){
this.set_activeIndex(_20f,e);
}
this._cancelEvent(e);
},_cancelEvent:function(e){
if(e){
e.preventDefault();
e.stopPropagation();
e.returnValue=false;
e.cancelBubble=true;
}
},_onPopupClick:function(e){
var _212=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_212>-1){
this._selectedIndex=_212;
this.hide();
this.raiseEvent("valueSelected");
}
},get_activeIndex:function(){
return this._activeIndex;
},set_activeIndex:function(_213,e){
this._activeIndex=_213;
this.selectUIItem(e);
},selectPreviousItem:function(){
var _215=this.get_activeIndex();
if(_215-1>=0){
this.set_activeIndex(_215-1);
}
},selectNextItem:function(){
var _216=this.get_activeIndex();
if(_216+1<this._items.length){
this.set_activeIndex(_216+1);
}
},selectUIItem:function(e,_218){
if(!this._popupElement){
return;
}
var _219=this._popupElement.getElementsByTagName("TD");
var len=_219.length;
var _21b=this.get_activeIndex();
var _21c=null;
for(var i=0;i<len;i++){
var _21e=_219[i];
if(_21e.item_index==_21b){
_21e.className="rade_itemOver";
_21c=_21e;
}else{
if(_218&&_21e.item_index<=_21b){
_21e.className="rade_itemOver";
}else{
_21e.className="";
}
}
}
if(_21c&&!e){
this._scrollIntoView(_21c);
}
return _21c;
},_scrollIntoView:function(_21f){
Telerik.Web.UI.Editor.Utils.scrollIntoView(_21f);
},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 _220=this._itemRootElement;
this.renderItemRoot();
_220.parentNode.replaceChild(this._itemRootElement,_220);
}
},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 _221=this._itemRootElement.rows[this._itemRootElement.rows.length-1];
var cell=_221.insertCell(-1);
return cell;
},renderChildren:function(){
for(var i=0;i<this._items.length;i++){
if(0==(i%this._itemsPerRow)){
this.renderNewRow();
}
var _224=this.renderItemContainer();
this.markItemContainer(_224,i);
this.renderChild(_224,this._items[i],i);
}
},renderChild:function(_225,_226,_227){
var _228=document.createElement("span");
if(_226){
var _229=null;
var _22a=null;
if(_226 instanceof Array){
_229=_226[1];
_22a=_226[2];
}else{
_229=_226;
}
if(_22a){
var _22b=document.createElement("span");
_22b.innerHTML="&nbsp;";
_22b.className=_22a;
_228.appendChild(_22b);
}
if(_229){
_228.innerHTML+=_229;
_228.noWrap=true;
}
}
_225.innerHTML=_228.innerHTML;
},resolveActiveIndex:function(e){
var _22d=e.target;
var _22e=-1;
while(_22d&&_22d!=this._itemRootElement){
if(null!=_22d.item_index){
_22e=_22d.item_index;
break;
}
_22d=_22d.parentNode;
}
return _22e;
},markItemContainer:function(_22f,_230){
_22f.item_index=_230;
},_makeAllItemsUnselectable:function(){
if(!this._popupElement){
return;
}
this._popupElement.setAttribute("unselectable","on");
var _231=this._popupElement.getElementsByTagName("*");
var len=_231.length;
for(var i=0;i<len;i++){
_231[i].unselectable="on";
}
},_show:function(){
this.configurePopupPropertiesBeforeShow();
var _234=this._popupElement;
var _235=this.get_sizetofit();
var _236=_234.style.overflow;
if(_235){
_234.style.overflowY="hidden";
}
_234.style.width=this.get_popupwidth();
_234.style.height=this.get_popupheight();
this._itemRootElement.style.width="100%";
this._popupBehavior.show();
if(_235){
_234.style.width=this._getPopupChildrenWidth();
var _237=this._getPopupChildrenHeight();
if(_237!="0px"){
_234.style.height=_237;
}
}
this._popupBehavior.show();
this._getPopupVisibilityController().set_activePopup(this);
_234.style.zIndex="100000";
if(_235){
_234.style.overflowY=_236;
}
this._popupVisible=true;
},_getPopupChildrenWidth:function(){
var _238=this.get_popupElement().childNodes;
var _239=0;
for(var i=0;i<_238.length;i++){
var _23b=_238[i].offsetWidth;
if(_23b&&_23b>_239){
_239=_23b;
}
}
return _239+"px";
},_getPopupChildrenHeight:function(){
var _23c=this.get_popupElement().childNodes;
var _23d=0;
for(var i=0;i<_23c.length;i++){
if(_23c[i].offsetHeight){
_23d+=_23c[i].offsetHeight;
}
}
return _23d+"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 _23f=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_23f;
},_createUI:function(){
if(this._popupBehavior){
return;
}
var _240=this.get_element();
if(!this._popupElement){
var _241=document.createElement("DIV");
$telerik.addCssClasses(_241,[this.get_skin(),this._rootPopupClassName,this.get_popupclassname()]);
this._popupElement=_241;
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":_240},null,null,this._popupElement);
this.attachEventHandlers();
},_getTable:function(){
var _242=document.createElement("table");
_242.border=0;
_242.cellPadding=0;
_242.setAttribute("unselectable","on");
_242.style.cursor="default";
return _242;
},get_clearSelectedOnShow:function(){
return this._clearSelectedOnShow;
},set_clearSelectedOnShow:function(_243){
this._clearSelectedOnShow=_243;
},get_popupElement:function(){
return this._popupElement;
},get_selectedItem:function(){
if(this._items&&this._selectedIndex>-1){
var item=this._items[this._selectedIndex];
var _245=((true==this._isArrayCollection)||(item instanceof Array))?item[0]:item;
return _245;
}
return null;
},get_selectedIndex:function(){
return this._selectedIndex;
},set_selectedIndex:function(_246){
this._selectedIndex=_246;
this.set_activeIndex(_246);
},get_items:function(){
return this._items;
},set_items:function(_247){
this.disposeChildren();
this._items=_247;
},get_itemsperrow:function(){
return this._itemsPerRow;
},set_itemsperrow:function(_248){
this._itemsPerRow=_248;
},get_sizetofit:function(){
return this._sizeToFit;
},set_sizetofit:function(_249){
this._sizeToFit=_249;
},get_popupclassname:function(){
return this._popupClassName;
},set_popupclassname:function(_24a){
this._popupClassName=_24a;
},get_rootpopupclassname:function(){
return this._rootPopupClassName;
},set_rootpopupclassname:function(_24b){
this._rootPopupClassName=_24b;
},get_popupwidth:function(){
return this._popupWidth;
},set_popupwidth:function(_24c){
this._popupWidth=_24c;
},get_popupheight:function(){
return this._popupHeight;
},set_popupheight:function(_24d){
this._popupHeight=_24d;
},add_show:function(_24e){
this.get_events().addHandler("show",_24e);
},remove_show:function(_24f){
this.get_events().removeHandler("show",_24f);
},add_hide:function(_250){
this.get_events().addHandler("hide",_250);
},remove_hide:function(_251){
this.get_events().removeHandler("hide",_251);
}};
Telerik.Web.UI.EditorDropDown.registerClass("Telerik.Web.UI.EditorDropDown",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorUpdateableDropDown=function(_252){
Telerik.Web.UI.EditorUpdateableDropDown.initializeBase(this,[_252]);
};
Telerik.Web.UI.EditorUpdateableDropDown.prototype={updateValue:function(oVal){
if(null==oVal){
return;
}
try{
if(!oVal){
oVal=this.get_text();
}
var _254=this.getSpanElement();
if(_254){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_254.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(_256){
Telerik.Web.UI.EditorSelfUpdateableDropDown.initializeBase(this,[_256]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.EditorSelfUpdateableDropDown.prototype={_onPopupClick:function(e){
var _258=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_258>-1){
this._selectedIndex=_258;
this.hide();
var _259=this.get_selectedItem();
if(_259){
this.updateValue(_259);
}
this.raiseEvent("valueSelected");
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_25a){
this._clientStateFieldID=_25a;
}};
Telerik.Web.UI.EditorSelfUpdateableDropDown.registerClass("Telerik.Web.UI.EditorSelfUpdateableDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorSplitButton=function(_25b){
Telerik.Web.UI.EditorSplitButton.initializeBase(this,[_25b]);
this._updateHeader=true;
};
Telerik.Web.UI.EditorSplitButton.prototype={click:function(e){
var _25d=this.isArrowClicked(e.target);
if(_25d||!this._updateHeader){
this.show();
}else{
var _25e=this.get_selectedItem();
if(null==_25e){
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(_25f){
var _260=this._getArrowElement();
if(_25f==_260){
return true;
}
return false;
},_getArrowElement:function(){
var _261=this.getAnchorElement().getElementsByTagName("SPAN");
var _262=_261[_261.length-1];
return _262;
},get_updateHeader:function(){
return this._updateHeader;
},set_updateHeader:function(_263){
this._updateHeader=_263;
}};
Telerik.Web.UI.EditorSplitButton.registerClass("Telerik.Web.UI.EditorSplitButton",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorToolStrip=function(_264){
Telerik.Web.UI.EditorToolStrip.initializeBase(this,[_264]);
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(_26a){
Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"set_selectedIndex",[_26a]);
if(this.get_updateHeader()){
var tool=this.get_selectedItem();
if(!tool||!tool.getSpanElement){
return;
}
var span=tool.getSpanElement();
if(span){
var _26d=span.cloneNode(true);
var _26e=this.getSpanElement();
var _26f=_26e.parentNode;
_26f.replaceChild(_26d,_26e);
var _270=tool.getAnchorElement();
if(_270){
_26f.setAttribute("title",_270.getAttribute("title"));
}
}
}
},show:function(){
var _271=this._items;
for(var i=0,_273=_271.length;i<_273;i++){
var tool=_271[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 _277=Array.indexOf(this._items,tool);
if($telerik.isSafari){
this._selectedIndex=_277;
this.set_activeIndex(_277);
}else{
this.set_selectedIndex(_277);
}
this.hide();
this.raiseEvent("valueSelected");
}
},renderItemRoot:function(){
var _278=document.createElement("DIV");
_278.className="rade_tlbVertical";
_278.style.cssFloat="left";
_278.style.width="100%";
this._itemRootElement=_278;
return this._itemRootElement;
},renderChildren:function(){
var _279=this.get_itemsperrow();
var _27a=this.get_tools();
var ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
for(var i=0;i<_27a.length;i++){
if(_279>1&&i>1&&(i%this.get_itemsperrow()==0)){
ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
}
var _27d=_27a[i];
if(null==_27d["showText"]){
_27d["showText"]=true;
}
var tool=Telerik.Web.UI.EditorButton.createTool(_27d,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(_282){
this._tools=_282;
}};
Telerik.Web.UI.EditorToolStrip.registerClass("Telerik.Web.UI.EditorToolStrip",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.EditorContextMenu=function(_283){
Telerik.Web.UI.EditorContextMenu.initializeBase(this,[_283]);
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 _284=this._popupBehavior;
_284.set_positioningMode(Telerik.Web.PositioningMode.Absolute);
var _285=this.get_parentElement();
if(_285){
_284.set_parentElement(_285);
}
var e=this._eventObject;
if(e){
_284.set_x(e.clientX+10);
_284.set_y(e.clientY+10);
}
},set_eventObject:function(_287){
this._eventObject=_287;
},get_tagName:function(){
return this._tagName;
},set_tagName:function(_288){
this._tagName=_288;
},get_parentElement:function(){
return this._parentElement;
},set_parentElement:function(_289){
this._parentElement=_289;
}};
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(_28a){
Telerik.Web.UI.Editor.AlignmentSelector.initializeBase(this,[_28a]);
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(_28b){
switch(_28b.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(_28c){
if(!this._rendered){
this.render();
}
var _28d=this._itemRootElement;
var _28e=0;
for(var i=0;i<_28d.rows.length;i++){
var _290=false;
for(var j=0;j<_28d.rows[i].cells.length;j++){
var cell=_28d.rows[i].cells[j];
var _293=this._isAvailable(_28e++);
cell.style.visibility=_293?"visible":"hidden";
_290|=_293;
}
if(null!=document.all){
_28d.rows[i].style.display=_290?"":"none";
}
}
},_isAvailable:function(_294){
var _295=false;
if(this._items){
var _296=this._items[_294];
_295=((null!=_296)&&(""!=_296[0]||""!=_296[1]));
}
return _295;
},renderChild:function(_297,_298,_299){
var _29a=document.createElement("div");
if(_298){
_29a.innerHTML="&nbsp;";
_29a.className=this._alignmentClassName[_299];
}
_297.appendChild(_29a);
},_onDropDownValueSelected:function(){
this.set_selectedIndex(this.get_selectedIndex());
},_selectAlignment:function(_29b,_29c){
_29b=(""==_29b||!_29b)?"none":_29b.toUpperCase();
_29c=!_29c?"":_29c.toUpperCase();
if(this._items){
var _29d=-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==_29d){
_29d=i;
}
if((_29b==ha||_29b==va)&&(_29c==ha||_29c==va)){
this.set_selectedIndex(i);
return;
}
}
}
this.set_selectedIndex(_29d);
}
},set_selectedIndex:function(_2a0){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"set_selectedIndex",[_2a0]);
var span=this.getSpanElement();
var _2a2=this._alignmentClassName[_2a0];
span.className=_2a2;
},setTagName:function(_2a3){
this._tagName=_2a3;
this._items=this._getLookupTableByTagName(this._tagName);
this.set_selectedIndex(this._noAlignmentIndex);
},updateValue:function(_2a4,_2a5){
this._selectAlignment(_2a4,_2a5);
},getAlign:function(){
var _2a6=this._items[this._selectedIndex];
var _2a7=(_2a6?_2a6[0]:"");
if("none"==_2a7){
_2a7="";
}
return _2a7;
},getVAlign:function(){
var _2a8=this._items[this._selectedIndex];
var _2a9=(_2a8?_2a8[1]:"");
if("none"==_2a9){
_2a9="";
}
return _2a9;
},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(_2aa){
this._clientStateFieldID=_2aa;
}};
Telerik.Web.UI.Editor.AlignmentSelector.registerClass("Telerik.Web.UI.Editor.AlignmentSelector",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.InsertTableHelper=function(_2ab){
Telerik.Web.UI.Editor.InsertTableHelper.initializeBase(this,[_2ab]);
};
Telerik.Web.UI.Editor.InsertTableHelper.prototype={initialize:function(){
var _2ac=new Array(this.get_itemsperrow()*this.get_itemsperrow());
for(var i=0;i<_2ac.length;i++){
_2ac[i]=i;
}
this._items=_2ac;
},hide:function(){
},renderChild:function(_2ae,_2af,_2b0){
var oDiv=document.createElement("div");
oDiv.innerHTML="&nbsp;";
_2ae.appendChild(oDiv);
var dim=this._getDimensionByIndex(_2b0);
_2ae.setAttribute("title"," "+dim.rows+" x "+dim.cols+" ");
},_getDimensionByIndex:function(_2b3){
var _2b4=0;
var _2b5=0;
var _2b6=this.get_itemsperrow();
for(var i=0;i<this._items.length;i++){
if(i%_2b6==0){
_2b4++;
_2b5=0;
}
_2b5++;
if(_2b3==i){
break;
}
}
var obj={rows:_2b4,cols:_2b5};
return obj;
},get_selectedItem:function(){
var _2b9=this.get_selectedIndex();
return this._getDimensionByIndex(_2b9);
},selectUIItem:function(e,_2bb){
var _2bc=this._popupElement.getElementsByTagName("TD");
var len=_2bc.length;
var _2be=this.get_activeIndex();
var dim=this._getDimensionByIndex(_2be);
var cols=dim.cols;
for(var i=0;i<len;i++){
var _2c2=_2bc[i];
var _2c3=_2c2.item_index;
if(_2c3<=_2be&&_2c2.cellIndex<cols){
_2c2.className="rade_itemOver";
}else{
_2c2.className="";
}
}
}};
Telerik.Web.UI.Editor.InsertTableHelper.registerClass("Telerik.Web.UI.Editor.InsertTableHelper",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.Editor.InsertTable=function(_2c4){
Telerik.Web.UI.Editor.InsertTable.initializeBase(this,[_2c4]);
};
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 _2c5=this.get_tools();
this._longTool=_2c5[0];
Array.removeAt(_2c5,0);
for(var i=0;i<_2c5.length;i++){
_2c5[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 _2ca={"valueSelected":this._onTableHelperValueSelectedDelegate};
var tool=$create(Telerik.Web.UI.Editor.InsertTableHelper,args,_2ca,null,document.createElement("DIV"));
tool.set_rootpopupclassname("");
this._tableHelper=tool;
tool.render();
var _2cc=tool.get_popupElement();
_2cc.style.display="";
_2cc.style.visibility="visible";
_2cc.style.position="";
_2cc.style.cssFloat="left";
var _2cd=this.get_popupElement();
_2cd.insertBefore(_2cc,_2cd.firstChild);
},renderChildren:function(){
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"renderChildren");
var _2ce=this._itemRootElement;
if(this._longTool){
var ul=document.createElement("UL");
_2ce.insertBefore(ul,_2ce.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(_2d1){
Telerik.Web.UI.Editor.ColorPicker.initializeBase(this,[_2d1]);
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 _2d2=this.get_selectedItem();
this.set_color(_2d2);
},get_value:function(){
return this.get_color();
},set_value:function(oVal){
this.set_color(oVal);
},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];
if(_302){
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);
var _376=this.get_editor().get_toolsWidth();
if(_376&&_376.indexOf("%")==-1){
wnd.set_width(_376);
}else{
wnd.set_width("");
}
if(!wnd.isPinned()){
wnd.togglePin();
}
},_createFloatingButton:function(){
this._onToggleFloatingToolbarDelegate=Function.createDelegate(this,this._onToggleFloatingToolbar);
var _377=this.get_editor();
var skin=_377.get_skin();
var _379={name:"ToggleFloatingToolbar",addClickHandler:true,skin:skin};
var _37a={"valueSelected":this._onToggleFloatingToolbarDelegate};
var _37b=Telerik.Web.UI.EditorButton.createTool(_379,_37a);
var _37c=Telerik.Web.UI.EditorButton.createToolWrapper(_37b,skin);
var _37d=$get(_377.get_id()+"Top");
if(_37d){
_37d.appendChild(_37c);
}
},_onToggleFloatingToolbar:function(){
var _37e=!this._toolbarHolder||!this._toolbarHolder.isVisible();
this._showToolbarHolder(_37e);
},_hookToolbarModeEventHandlers:function(){
var _37f=this;
var _380=function(){
_37f._showToolbarHolder(true);
};
var _381=this.get_editor();
if(_381.isIE){
this.get_editor().add_editReady(function(){
_381.attachEventHandler("beforeeditfocus",_380);
});
}else{
_381.add_selectionChange(_380);
}
_381.add_modeChange(function(){
_37f._showToolbarHolder(_37f.get_editor().get_mode()==Telerik.Web.UI.EditModes.Design);
});
_381.add_submit(function(){
_37f._showToolbarHolder(false);
});
_381.add_toggleScreenMode(function(){
var _382=_37f.get_editor().isFullScreen();
_37f._moveToolbarsToEditor(_382);
var wnd=_37f.get_toolbarHolder();
if(_382){
wnd.hide();
}else{
wnd.show();
}
});
this._bodyClickDelegate=Function.createDelegate(this,this._onBodyClick);
$addHandler(document.body,"click",this._bodyClickDelegate);
},_disposeToolbarModeHandlers:function(){
if(this._bodyClickDelegate){
$removeHandler(document.body,"click",this._bodyClickDelegate);
this._bodyClickDelegate=null;
}
},onContextMenu:function(e){
if(!this._contextMenusEnabled){
return;
}
var _385=this.get_editor();
if(_385.get_mode()!=Telerik.Web.UI.EditModes.Design){
return;
}
this.createContextMenus();
var _386=e.srcElement?e.srcElement:e.target;
var _387=_386.tagName;
var _388=this._contextMenus[_387];
if("TH"==_387&&!_388){
_388=this._contextMenus["TD"];
}
var _389="";
if(!_388){
var _38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"A");
if(!_38a){
_38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"TD");
}
if(!_38a){
_38a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_386,"TABLE");
}
if(_38a){
_389=_38a.tagName;
_386=_38a;
}else{
_389="*";
}
_388=this._contextMenus[_389];
}
if(_388&&_387=="IMG"&&_386&&"true"==_386.getAttribute("isflash")){
_388=null;
}
if(!this.isIE&&_389=="*"){
return;
}
if(_388){
_388.set_eventObject(e);
_388.show();
}
return $telerik.cancelRawEvent(e);
},enableContextMenus:function(_38b){
this._contextMenusEnabled=_38b;
},_initContextMenus:function(){
var _38c=Function.createDelegate(this,this.onContextMenu);
var _38d=this.get_editor();
_38d.add_editReady(function(){
_38d.attachEventHandler("contextmenu",_38c);
});
},createContextMenus:function(){
if(this._contextMenus){
return;
}
this._contextMenus={};
var _38e=this.get_editor();
var skin=_38e.get_skin();
var _390=_38e.get_contextMenusJSON();
var _391={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
for(var i=0;i<_390.length;i++){
var args=_390[i];
args["sizetofit"]=true;
args["parentElement"]=_38e.get_contentAreaElement();
args["skin"]=skin;
var tool=$create(Telerik.Web.UI.EditorContextMenu,args,_391,null,document.createElement("SPAN"));
this._contextMenus[args.tagName]=tool;
}
},dispose:function(){
var _395=this._getToolBarElements();
for(var i=0;i<_395.length;i++){
$clearHandlers(_395[i]);
}
this._tools=[];
this._disposeToolbarModeHandlers();
var wnd=this._toolbarHolder;
if(wnd&&wnd.dispose){
wnd.dispose();
}
Telerik.Web.UI.Editor.DefaultToolAdapter.callBaseMethod(this,"dispose");
},setFocus:function(){
var tool=this._tools[0];
window.setTimeout(function(){
if(tool){
tool.setFocus();
}
},100);
return false;
},getContextMenuByTagName:function(_399){
this.createContextMenus();
return this._contextMenus[_399];
},getToolByName:function(name){
for(var i=0;i<this._tools.length;i++){
var tool=this._tools[i];
if(tool&&tool.get_name()==name){
return tool;
}
}
return null;
},setToolState:function(_39d,_39e){
if(!_39d){
_39d=this._tools;
}
var _39f=this.get_editor();
for(var i=0;i<_39d.length;i++){
var _3a1=_39d[i];
var _3a2=_3a1.get_name();
if(_3a1.setState){
var _3a3=_39e;
if(null==_3a3){
_3a3=_39f.getToolState(_3a2);
}
if(null!=_3a3){
_3a1.setState(_3a3);
}
}
if(_3a1.updateValue){
_3a1.updateValue(_39f.getToolValue(_3a2));
}
}
},_convertCommandsArray:function(_3a4){
var _3a5=[];
for(var i=0;i<_3a4.length;i++){
var _3a7=_3a4[i];
var _3a8=(i+1)+". "+_3a7.get_title();
if(_3a7.get_argument){
var arg=_3a7.get_argument();
if(arg){
_3a8+=" [\""+arg+"\"]";
}
}
_3a5[i]=[i+1,_3a8];
}
return _3a5;
},_onDropDownHide:function(_3aa,args){
var _3ac=this.get_editor();
_3ac.enableContentArea(true);
},_onDropDownBeforeShow:function(_3ad,args){
var _3af=this.get_editor();
if(Telerik.Web.UI.EditorToolStrip.isInstanceOfType(_3ad)){
this.setToolState(_3ad.get_items());
}
if(!_3af.getSelection().isControl()&&!Telerik.Web.UI.EditorContextMenu.isInstanceOfType(_3ad)){
_3af.enableContentArea(false);
}
var _3b0=_3ad.get_name();
if(_3b0=="Undo"){
var _3b1=_3af.get_commandsManager().getCommandsToUndo();
_3b1=this._convertCommandsArray(_3b1);
_3ad.set_items(_3b1);
}else{
if(_3b0=="Redo"){
var _3b2=_3af.get_commandsManager().getCommandsToRedo();
_3b2=this._convertCommandsArray(_3b2);
_3ad.set_items(_3b2);
}else{
if(_3b0=="ModuleManager"){
var _3b3=_3af.get_modulesManager();
if(!_3b3){
return;
}
var _3b4=_3b3.get_modules();
var _3b5=[];
for(var i=0;i<_3b4.length;i++){
var _3b7=_3b4[i];
var name=_3b7.get_name();
var _3b9=_3b7.get_title();
if(!_3b9){
_3b9=name;
}
cssClass=_3b7.get_visible()?"rade_module_visible_icon":"rade_module_hidden_icon";
_3b5[i]=[name,_3b9,cssClass];
}
_3ad.set_updateHeader(false);
_3ad.set_items(_3b5);
}
}
}
var _3ba=_3ad.get_items();
if(_3ba&&_3ba.length>0){
return;
}
var _3bb=null;
switch(_3b0){
case "ApplyClass":
_3bb=_3af.getCssArray();
break;
case "FontName":
_3bb=_3af.get_fontNames();
break;
case "FontSize":
_3bb=_3af.get_fontSizes();
break;
case "InsertSymbol":
_3bb=_3af.get_symbols();
break;
case "BackColor":
case "ForeColor":
_3bb=_3af.get_colors();
break;
case "RealFontSize":
_3bb=_3af.get_realFontSizes();
break;
case "InsertSnippet":
_3bb=_3af.get_snippets();
break;
case "Zoom":
_3bb=["10%","20%","50%","100%","150%","200%","300%","500%"];
break;
case "FormatBlock":
_3bb=_3af.get_paragraphs();
break;
case "InsertCustomLink":
_3bb=_3af.get_links();
break;
case "AjaxSpellCheck":
case "SpellCheck":
_3bb=_3af.get_languages();
break;
}
if(_3bb){
_3ad.set_items(_3bb);
}
},_initializeToolbar:function(_3bc,_3bd){
var _3be=_3bd.getElementsByTagName("li");
var _3bf=_3bc.tools;
var _3c0=this.get_editor();
var skin=_3c0.get_skin();
var _3c2=0;
if(_3bf){
var _3c3=0;
for(var i=0;i<_3bf.length;i++){
var _3c5=_3be[i+1];
_3c3+=_3c5.offsetWidth;
var _3c6=Telerik.Web.UI.EditorButton;
var _3c7=_3bf[i].type;
var _3c8=_3bf[i].name;
var _3c9=Telerik.Web.UI.EditorToolType;
var args=_3bf[i];
var tool=null;
var _3cc=false;
if(_3c7){
switch(_3c7){
case _3c9.Button:
break;
case _3c9.Separator:
if(!_3c2){
_3c2+=parseInt($telerik.getCurrentStyle(_3c5,"marginLeft"));
_3c2+=parseInt($telerik.getCurrentStyle(_3c5,"marginRight"));
}
_3c3+=_3c2;
_3c6=null;
break;
case _3c9.DropDown:
_3c6=Telerik.Web.UI.EditorDropDown;
_3cc=true;
if(_3c8=="FontName"){
_3c6=Telerik.Web.UI.Editor.FontNameDropDown;
}else{
if(_3c8=="FontSize"){
_3c6=Telerik.Web.UI.Editor.FontSizeDropDown;
}else{
if(_3c8=="FormatBlock"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="RealFontSize"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="Zoom"){
_3c6=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_3c8=="InsertCustomLink"){
_3c6=Telerik.Web.UI.Editor.InsertCustomLinkDropDown;
}else{
if(_3c8=="ApplyClass"){
_3c6=Telerik.Web.UI.Editor.ApplyClassDropDown;
}
}
}
}
}
}
}
break;
case _3c9.SplitButton:
_3c6=Telerik.Web.UI.EditorSplitButton;
if(_3c8=="ForeColor"||_3c8=="BackColor"){
_3c6=Telerik.Web.UI.Editor.ColorPicker;
}else{
if(_3c8=="Undo"||_3c8=="Redo"){
_3c6=Telerik.Web.UI.Editor.UndoRedoDropDown;
}
}
_3cc=true;
break;
case _3c9.ToolStrip:
if(_3c8=="InsertTable"){
_3c6=Telerik.Web.UI.Editor.InsertTable;
}else{
_3c6=Telerik.Web.UI.EditorToolStrip;
}
_3cc=true;
break;
case _3c9.Custom:
break;
}
}
if(args.attributes){
for(var item in args.attributes){
args[item.toLowerCase()]=args.attributes[item];
}
}
if(_3c6){
var _3ce=null;
if(_3cc){
_3ce={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
args["skin"]=skin;
}
tool=$create(_3c6,args,_3ce,null,_3c5);
}
if(tool){
Array.add(this._tools,tool);
var _3cf=tool.get_shortCut();
if(_3cf){
var _3d0=tool.get_name();
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(tool)&&!(Telerik.Web.UI.EditorSplitButton.isInstanceOfType(tool))){
_3d0="RadE_ToolAdapter_"+_3d0;
Telerik.Web.UI.Editor.CommandList[_3d0]=this._toolAdapterDropDownExpander;
}
_3c0.setShortCut(_3d0,_3cf);
}
}
}
var ul=_3bd;
if(this.isIE&&ul&&_3c3){
ul.style.width=(_3c3+(_3be[0].offsetWidth)*2)+"px";
}
if($telerik.isSafari){
ul.setAttribute("onmousedown","return false;");
}
$addHandlers(_3bd,{"click":this._onToolAdapterClickDelegate,"keydown":this._onToolAdapterKeyDownDelegate},this);
}
},_toolAdapterDropDownExpander:function(_3d2,_3d3){
var tool=_3d3.getToolByName(_3d2.replace("RadE_ToolAdapter_",""));
tool.setFocus();
tool.show();
tool.selectNextItem();
return false;
},_onEditorModeChange:function(_3d5,args){
var _3d7=Telerik.Web.UI.EditModes;
var mode=_3d5.get_mode();
this._setEnabled((mode==_3d7.Design));
},_onEditorSelectionChange:function(_3d9,args){
this.setToolState();
},_setEnabled:function(_3db){
var _3dc=this._tools;
for(var i=0;i<_3dc.length;i++){
var tool=_3dc[i];
tool.set_enabled(_3db);
}
},_registerEditorHandlers:function(){
var _3df=this.get_editor();
_3df.add_selectionChange(this._onEditorSelectionChangeDelegate);
_3df.add_modeChange(this._onEditorModeChangeDelegate);
},_onBodyClick:function(){
if(this._preventToolbarFromHiding){
this._preventToolbarFromHiding=false;
return;
}
this._showToolbarHolder(false);
},_onDropDownValueSelected:function(_3e0,args){
this._preventToolbarFromHiding=true;
var _3e2=_3e0.get_selectedItem();
if(Telerik.Web.UI.EditorButton.isInstanceOfType(_3e2)){
this._raiseEditorEvent(_3e2,null);
}else{
this._raiseEditorEvent(_3e0,_3e2);
}
},_onKeyDownHandler:function(e){
var _3e4=e.keyCode;
if(9==_3e4||37==_3e4||39==_3e4||121==_3e4){
if(Telerik.Web.UI.Editor.PopupController){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
}
if(121==_3e4){
var _3e5=this.get_editor();
window.setTimeout(function(){
if(_3e5){
_3e5.setFocus();
}
},100);
if(e.rawEvent){
$telerik.cancelRawEvent(e.rawEvent);
}
return $telerik.cancelRawEvent(e);
}
if(9==_3e4){
return;
}
var _3e6=this._getSelectedTool(e);
if(!Telerik.Web.UI.EditorButton.isInstanceOfType(_3e6)){
return;
}
if(37==_3e4||39==_3e4){
var tool=_3e6;
while(true){
tool=(37==_3e4)?this._getPreviousTool(tool):this._getNextTool(tool);
if(null==tool){
break;
}
if(tool.get_enabled()){
break;
}
}
if(tool&&tool.get_enabled()){
tool.setFocus();
}
}
if(13==_3e4&&_3e6&&!_3e6.get_selectedItem){
this._raiseEditorEvent(_3e6,null);
return;
}
if(!Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3e6)){
return;
}
if(38==_3e4||40==_3e4){
var _3e8=false;
if(!_3e6.isExpanded()){
_3e6.show();
_3e8=true;
}
if(_3e8||40==_3e4){
_3e6.selectNextItem();
}else{
_3e6.selectPreviousItem();
}
}else{
if(13==_3e4){
_3e6.hide();
if(_3e6.get_activeIndex){
_3e6.set_selectedIndex(_3e6.get_activeIndex());
}
this._onDropDownValueSelected(_3e6);
}else{
if(27==_3e4){
_3e6.hide();
}
}
}
},_onToolBarClick:function(e){
var _3ea=this._getSelectedTool(e);
if(_3ea){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_3ea)){
_3ea.click(e);
}else{
if(false){
}else{
this._raiseEditorEvent(_3ea);
}
}
}
$telerik.cancelRawEvent(e);
},_raiseEditorEvent:function(tool,_3ec){
var _3ed=this.get_events().getHandler("ToolClick");
if(_3ed){
var _3ee=tool.get_name?tool.get_name():"";
var _3ef=new Telerik.Web.UI.EditorCommandEventArgs(_3ee,tool,_3ec);
_3ed(tool,_3ef);
}
},_getPreviousTool:function(tool){
var _3f1=Array.indexOf(this._tools,tool);
return this._tools[_3f1-1];
},_getNextTool:function(tool){
var _3f3=Array.indexOf(this._tools,tool);
return this._tools[_3f3+1];
},_getSelectedTool:function(e){
var _3f5=Telerik.Web.UI.EditorButton.getToolRootNode(e.target);
if(null==_3f5){
return;
}
var _3f6=_3f5.control;
if(null==_3f6){
return;
}
if(_3f6.get_enabled&&_3f6.get_enabled()==false){
return;
}
if(e&&_3f6){
e.preventDefault();
e.stopPropagation();
}
return _3f6;
},_getToolBarElements:function(){
var _3f7=this.get_element();
var _3f8=_3f7.getElementsByTagName("ul");
return _3f8;
},get_tools:function(){
return this._tools;
},get_toolbarHolder:function(){
return this.get_window();
},get_editor:function(){
return this._editor;
},set_editor:function(_3f9){
if(this._editor!=_3f9){
this._editor=_3f9;
}
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_3fa){
this._toolJSON=_3fa;
},add_toolClick:function(_3fb){
this.get_events().addHandler("ToolClick",_3fb);
},remove_toolClick:function(_3fc){
this.get_events().removeHandler("ToolClick",_3fc);
}};
Telerik.Web.UI.Editor.DefaultToolAdapter.registerClass("Telerik.Web.UI.Editor.DefaultToolAdapter",Sys.UI.Control);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
with(Telerik.Web.UI.Editor){
Telerik.Web.UI.Editor.UpdateCommandsArray={InsertOrderedList:new BrowserCommand(null,null,"InsertOrderedList"),InsertUnorderedList:new BrowserCommand(null,null,"InsertUnorderedList"),Unlink:new BrowserCommand(null,null,"Unlink"),Bold:new BrowserCommand(null,null,"Bold"),Italic:new BrowserCommand(null,null,"Italic"),Underline:new BrowserCommand(null,null,"Underline"),FontName:new BrowserCommand(null,null,"FontName"),FontSize:new BrowserCommand(null,null,"FontSize"),Paste:new BrowserCommand(null,null,"Paste"),Cut:new BrowserCommand(null,null,"Cut"),Copy:new BrowserCommand(null,null,"Copy"),JustifyLeft:new BrowserCommand(null,null,"JustifyLeft"),JustifyRight:new BrowserCommand(null,null,"JustifyRight"),JustifyCenter:new BrowserCommand(null,null,"JustifyCenter"),JustifyNone:new BrowserCommand(null,null,"JustifyNone"),JustifyFull:new BrowserCommand(null,null,"JustifyFull"),Indent:new BrowserCommand(null,null,"Indent"),Outdent:new BrowserCommand(null,null,"Outdent"),Unlink:new BrowserCommand(null,null,"Unlink"),Subscript:new BrowserCommand(null,null,"Subscript"),Superscript:new BrowserCommand(null,null,"Superscript"),StrikeThrough:new BrowserCommand(null,null,"StrikeThrough"),AbsolutePosition:new BrowserCommand(null,null,"AbsolutePosition"),FormatBlock:new FormatBlockCommand(null,null,null),InsertRowAbove:new TableInsertRow(null,null,"above"),InsertRowBelow:new TableInsertRow(null,null,"below"),InsertColumnLeft:new TableInsertColumn(null,null,"left"),InsertColumnRight:new TableInsertColumn(null,null,"right"),DeleteRow:new TableDeleteRow(null,null),DeleteColumn:new TableDeleteColumn(null,null),DeleteCell:new TableDeleteCell(null,null),MergeColumns:new TableMergeColumns(null,null),MergeRows:new TableMergeRows(null,null),SplitCell:new TableSplitCell(null,null),ApplyClass:new ClassNameCommand(null,null)};
}
Telerik.Web.UI.Editor.CommandList=new (function(){
this.AjaxSpellCheck=function(_3fd,_3fe,args){
function createSpellCheckEngine(){
if(!_3fe.get_ajaxSpellCheck()){
var _400={"editor":_3fe};
var _401=document.createElement("DIV");
var _402=$create(Telerik.Web.UI.Editor.AjaxSpellCheck,_400,null,null,_401);
var _403=_402.get_element();
var _404=$get(_3fe.get_id()+"Top");
if(_404){
_404.appendChild(_403);
}
_3fe.set_ajaxSpellCheck(_402);
}
var _405=_3fe.get_ajaxSpellCheck();
if(args&&args.value){
_405.set_language(args.value);
}
_405.spellCheck();
}
if(typeof (Telerik.Web.UI.Editor.AjaxSpellCheck)=="undefined"){
function OnWebRequestCompleted(_406,_407){
var _408=_406.get_responseData();
Telerik.Web.UI.Editor.Utils.evalScriptCode(_408);
createSpellCheckEngine();
}
var _409=_3fe.get_ajaxSpellCheckScriptReference();
var _40a=new Sys.Net.WebRequest();
_40a.set_url(_409);
_40a.set_httpVerb("GET");
_40a.add_completed(OnWebRequestCompleted);
_40a.invoke();
}else{
createSpellCheckEngine();
}
return false;
};
this.ModuleManager=function(_40b,_40c,args){
var _40e=args.value;
var _40f=_40c.get_modulesManager();
if(!_40f){
return false;
}
var _410=_40f.getModuleByName(_40e);
if(_410){
_410.toggleVisibility();
_40c._updateEditorSize(null,true);
}
return false;
};
this.ToggleScreenMode=function(_411,_412,args){
_412.toggleScreenMode();
return false;
};
this.InsertRowAbove=this.InsertRowBelow=function(_414,_415,args){
_415.executeCommand(new Telerik.Web.UI.Editor.TableInsertRow(_415.getLocalizedString(_414),null,_414=="InsertRowAbove"?"above":"below"));
};
this.InsertColumnLeft=this.InsertColumnRight=function(_417,_418,args){
_418.executeCommand(new Telerik.Web.UI.Editor.TableInsertColumn(_418.getLocalizedString(_417),null,_417=="InsertColumnLeft"?"left":"right"));
};
this.DeleteRow=function(_41a,_41b,args){
_41b.executeCommand(new Telerik.Web.UI.Editor.TableDeleteRow(_41b.getLocalizedString(_41a)));
};
this.DeleteColumn=function(_41d,_41e,args){
_41e.executeCommand(new Telerik.Web.UI.Editor.TableDeleteColumn(_41e.getLocalizedString(_41d)));
};
this.DeleteCell=function(_420,_421,args){
_421.executeCommand(new Telerik.Web.UI.Editor.TableDeleteCell(_421.getLocalizedString(_420)));
};
this.MergeColumns=function(_423,_424,args){
_424.executeCommand(new Telerik.Web.UI.Editor.TableMergeColumns(_424.getLocalizedString(_423)));
};
this.MergeRows=function(_426,_427,args){
_427.executeCommand(new Telerik.Web.UI.Editor.TableMergeRows(_427.getLocalizedString(_426)));
};
this.SplitCell=function(_429,_42a,args){
_42a.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(_42a.getLocalizedString(_429)));
};
this.DeleteTable=function(_42c,_42d,args){
var _42f=args.value;
if(!_42f){
_42f=_42d.getSelectedElement();
}
if(_42f&&"TABLE"!=_42f.tagName){
_42f=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_42f,"TABLE");
}
if(_42f){
_42d.selectElement(_42f);
_42d.executeBrowserCommand("Delete");
}
};
this.InsertFormForm=this.InsertFormButton=this.InsertFormCheckbox=this.InsertFormHidden=this.InsertFormImageButton=this.InsertFormPassword=this.InsertFormRadio=this.InsertFormReset=this.InsertFormSelect=this.InsertFormSubmit=this.InsertFormTextarea=this.InsertFormText=function(_430,_431,args){
var _433=_430.substring(10);
var _434=new Telerik.Web.UI.EditorCommandEventArgs(_430,args.get_tool(),_433);
_431.fire("InsertFormElement",_434);
};
this.StripAll=this.StripCss=this.StripFont=this.StripSpan=this.StripWord=function(_435,_436,args){
var _438=_435.substring(5);
var _439=new Telerik.Web.UI.EditorCommandEventArgs(_435,args.get_tool(),_438.toUpperCase());
_436.fire("FormatStripper",_439);
};
this.FormatStripper=function(_43a,_43b,args){
var _43d=args.value;
var _43e="";
try{
_43e=_43b.getSelectionHtml();
}
catch(e){
}
var oSel=_43b.get_document().selection?_43b.get_document().selection:_43b.get_contentWindow().getSelection();
var _440=oSel.type?oSel.type.toLowerCase()=="none":oSel.isCollapsed;
if(_440||_43e==""||_43b.get_html()==_43e){
var _441=Telerik.Web.UI.Editor.Utils.stripFormatting(_43b.get_html(),_43d);
_43b.set_html(_441,_43b.getLocalizedString(_43a)+" "+_43d);
}else{
if(_43e!=null){
var _441=Telerik.Web.UI.Editor.Utils.stripFormatting(_43e,_43d);
_43b.pasteHtml(_441,_43a);
}
}
};
this.InsertTable=function(_442,_443,args){
var _445=args.value;
if(_445){
var _446=Telerik.Web.UI.Editor.Utils.createTable(_445.rows,_445.cols);
var _447=Telerik.Web.UI.Editor.Utils.getOuterHtml(_446);
_443.pasteHtml(_447,_442);
}
};
this.InsertTab=function(_448,_449,_44a){
var _44b=_449.getSelectedElement();
if(_44b.tagName=="LI"){
_449.fire("Indent");
}else{
_449.pasteHtml(" &nbsp;&nbsp;&nbsp;&nbsp;",_448);
}
return false;
};
this.SetToolFocus=function(_44c,_44d,_44e){
var _44f=_44d.get_toolAdapter();
if(_44f){
_44f.setFocus();
}
return false;
};
this.ViewHtml=function(_450,_451,_452){
alert(_451.get_html(true));
return false;
};
this.Undo=this.Redo=function(_453,_454,args){
var _456=args?args.value:1;
if(!_456){
_456=1;
}
if(_453=="Redo"){
_454.redo(_456);
}else{
_454.undo(_456);
}
};
this.PastePlainText=function(_457,_458,_459){
var _45a=function(_45b){
if(_45b){
var _45c=_45b.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
_45c=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(_45c);
if(_45c){
_458.pasteHtml(_45c,_457);
}
}
};
if(_458.isIE){
_45a(window.clipboardData.getData("Text"));
}else{
var _45d=function(_45e,args){
_45a(args.get_content());
};
_458.showDialog("CleanPasteTextContent",{},_45d);
return false;
}
};
this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(_460,_461,_462){
var _463=function(_464,_465){
var _466="";
if(_460=="PasteFromWord"){
_466=Telerik.Web.UI.Editor.Utils.stripFormatting(_464,"WORD");
}else{
if(_460=="PasteFromWordNoFontsNoSizes"){
_466=Telerik.Web.UI.Editor.Utils.stripFormatting(_464,"WORD_ALL");
}else{
_466=Telerik.Web.UI.Editor.Utils.convertText2Html(_464);
}
}
if(_465){
_465.select();
}
if(_466){
_461.pasteHtml(_466,_460);
}
};
if(_461.isIE){
var _467=_461.createRestorePoint();
var _468=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
_463(_468,_467);
}else{
var _469=function(_46a,args){
_463(args.get_content());
};
_461.showDialog("CleanPasteHtmlContent",{},_469);
}
};
this.Copy=function(_46c,_46d,args){
if(null!=args){
var _46f=window.opera?false:true;
if(_46f){
try{
document.queryCommandEnabled(_46c);
}
catch(e){
_46f=false;
}
}
if(_46f){
_46d.get_document().execCommand(_46c,false,null);
}else{
alert(_46d.getLocalizedString("UseCtrlC"));
}
}
};
this.Cut=this.Paste=function(_470,_471,args){
if(null!=args){
var _473=window.opera?false:true;
if(_473){
try{
if(!_471.isIE7){
document.queryCommandEnabled(_470);
}
}
catch(e){
_473=false;
}
}
if(_470=="Paste"&&_473&&_471.isIE7){
_471.get_document().body.fireEvent("onbeforepaste");
}
if(_473){
var oCmd=new Telerik.Web.UI.Editor.GenericCommand(_471.getLocalizedString(_470),_471.get_contentWindow());
_471.get_document().execCommand(_470,false,null);
_471.executeCommand(oCmd);
}else{
var id=(_470=="Cut"?"UseCtrlX":"UseCtrlV");
alert(_471.getLocalizedString(id));
}
}else{
_471._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(_471.getLocalizedString(_470),_471.get_contentWindow());
}
};
this.InsertParagraph=function(_476,_477,_478){
_477.executeBrowserCommand(_476,true,"");
return true;
};
this.FormatBlock=function(_479,_47a,args){
_47a.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(_47a.getLocalizedString(_479),_47a.get_contentWindow(),args.value));
};
this.InsertOrderedList=this.InsertUnorderedList=function(_47c,_47d,args){
_47d.setFocus();
_47d.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(_47d.getLocalizedString(_47c),_47d.get_contentWindow(),_47d.get_newLineBr(),_47c,null));
};
this.Bold=this.Italic=this.Underline=this.JustifyLeft=this.JustifyRight=this.JustifyCenter=this.JustifyNone=this.Indent=this.Outdent=this.SelectAll=this.Unlink=this.JustifyFull=this.StrikeThrough=this.Subscript=this.Superscript=this.AbsolutePosition=function(_47f,_480,_481){
_480.setActive();
var _482="SelectAll"!=_47f;
if(_47f=="Unlink"&&!_480.isIE){
var elem=_480.getSelectedElement();
if(elem&&elem.tagName=="A"){
_480.selectElement(elem,false);
}
}
_480.executeBrowserCommand(_47f,_482,null,null);
return true;
};
this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(_484,_485,args){
var _487=args.value;
_485.executeBrowserCommand(_484,true,_487);
};
this.Zoom=function(_488,_489,args){
var _48b=args.value;
var tool=args.get_tool?args.get_tool():null;
if(_48b&&tool&&tool.updateValue){
tool.updateValue(_48b);
}
_489._contentArea.style.zoom=_48b;
return false;
};
this.Print=function(_48d,_48e,args){
if(_48e.isIE){
_48e.get_document().execCommand(_48d,false,null);
}else{
if(_48e.get_contentWindow().print){
_48e.get_contentWindow().print();
}
}
return false;
};
this.InsertSnippet=function(_490,_491,args){
_491.pasteHtml(args.value,_490);
};
this.InsertFormElement=function(_493,_494,args){
var _496=args.value;
_496=_496.toLowerCase();
var _497=null;
switch(_496){
case "form":
_497=_494.createElement("form","150px","150px");
_497.innerHTML="&nbsp;";
break;
case "textarea":
_497=_494.createElement("textarea");
break;
case "select":
_497=_494.createElement("select","100px","22px");
break;
case "checkbox":
case "radio":
_497=_494.createElement("input");
_497.setAttribute("type",_496);
break;
case "button":
case "reset":
case "submit":
_497=_494.createElement("input","50px","22px");
_497.setAttribute("type",_496);
break;
case "hidden":
case "password":
case "text":
_497=_494.createElement("input","100px","22px");
_497.setAttribute("type",_496);
break;
}
if(_497){
var id=Telerik.Web.UI.Editor.Utils.getUniqueID();
_497.setAttribute("id",id);
var html=Telerik.Web.UI.Editor.Utils.getOuterHtml(_497);
_494.pasteHtml(html,_493);
var _49a=_494.get_document().getElementById(id);
if(_49a){
_49a.removeAttribute("id");
if(_49a.setActive){
_49a.setActive();
}
return false;
}
}
};
this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(_49b,_49c,args){
var _49e="";
switch(_49b){
case "InsertSymbol":
_49e=args.value;
break;
case "InsertHorizontalRule":
_49e="<hr>";
break;
case "InsertDate":
var now=new Date();
_49e="&nbsp;"+now.toLocaleDateString();
break;
case "InsertTime":
var now=new Date();
_49e="&nbsp;"+now.toLocaleTimeString();
break;
default:
_49e="<fieldset style='WIDTH: 200px; HEIGHT: 76px'> <legend>Title</legend>Content... </fieldset> ";
}
_49c.pasteHtml(_49e,_49b);
};
this.ImageManager=function(_4a0,_4a1,_4a2){
var _4a3=function(_4a4,args){
_4a1.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_4a0);
};
var _4a6=_4a1.get_dialogOpener().get_additionalQueryString();
var _4a7=_4a1.getSelectedElement();
if(_4a7&&_4a7.tagName.toLowerCase()=="img"){
_4a1.get_dialogOpener().set_additionalQueryString(_4a6+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4a7.src));
}
var args={editor:_4a1};
_4a1.showDialog("ImageManager",args,_4a3);
_4a1.get_dialogOpener().set_additionalQueryString(_4a6);
return false;
};
this.SilverlightManager=function(_4a9,_4aa,_4ab){
var _4ac=function(_4ad,args){
var html=args.Result;
var _4b0=_4aa._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4b1=_4aa._filtersManager.getFilterByName("MozillaKeepFlashString");
html=(_4b0)?_4b0.getDesignContent(html):html;
html=(_4b1)?_4b1.getDesignContent(html):html;
_4aa.pasteHtml(html,_4a9);
};
var _4b2={};
var _4b3=_4aa.get_dialogOpener().get_additionalQueryString();
var _4b4=_4aa.getSelectedElement();
if(_4b4){
if($telerik.isIE&&_4b4.object&&_4b4.object.Movie){
var _4b5=_4b4.object.Movie;
_4aa.get_dialogOpener().set_additionalQueryString(_4b3+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4b5));
_4b2.selectedItemUrl=_4b5;
_4b2.selectedObject=_4b4;
}
}
_4aa.showDialog("SilverlightManager",_4b2,_4ac);
_4aa.get_dialogOpener().set_additionalQueryString(_4b3);
return false;
};
this.FlashManager=function(_4b6,_4b7,_4b8){
var _4b9=function(_4ba,args){
var _4bc=_4b7._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4bd=_4b7._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4bc)?_4bc.getDesignContent(html):html;
html=(_4bd)?_4bd.getDesignContent(html):html;
_4b7.pasteHtml(html,_4b6);
};
var _4bf={};
var _4c0=_4b7.get_dialogOpener().get_additionalQueryString();
var _4c1=_4b7.getSelectedElement();
if(_4c1){
if($telerik.isIE&&_4c1.object&&_4c1.object.Movie){
var _4c2=_4c1.object.Movie;
_4b7.get_dialogOpener().set_additionalQueryString(_4c0+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4c2));
_4bf.selectedItemUrl=_4c2;
_4bf.selectedObject=_4c1;
}
}
_4b7.showDialog("FlashManager",_4bf,_4b9);
_4b7.get_dialogOpener().set_additionalQueryString(_4c0);
return false;
};
this.MediaManager=function(_4c3,_4c4,_4c5){
var _4c6=function(_4c7,args){
var _4c9=_4c4._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _4ca=_4c4._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_4c9)?_4c9.getDesignContent(html):html;
html=(_4ca)?_4ca.getDesignContent(html):html;
_4c4.pasteHtml(html,_4c3);
};
var _4cc={};
var _4cd=_4c4.get_dialogOpener().get_additionalQueryString();
var _4ce=_4c4.getSelectedElement();
if(_4ce){
if($telerik.isIE&&_4ce.object&&_4ce.object.FileName){
var _4cf=_4ce.object.FileName;
_4c4.get_dialogOpener().set_additionalQueryString(_4cd+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(_4cf));
_4cc.selectedItemUrl=_4cf;
_4cc.selectedObject=_4ce;
}
}
_4c4.showDialog("MediaManager",_4cc,_4c6);
_4c4.get_dialogOpener().set_additionalQueryString(_4cd);
return false;
};
this.TemplateManager=function(_4d0,_4d1,_4d2){
var _4d3=function(_4d4,args){
_4d1.pasteHtml(args.Result,_4d0);
};
_4d1.showDialog("TemplateManager",{},_4d3);
return false;
};
this.AboutDialog=function(_4d6,_4d7,_4d8){
_4d7.showDialog("AboutDialog");
return false;
};
this.Help=function(_4d9,_4da,_4db){
_4da.showDialog("Help");
return false;
};
this.PageProperties=function(_4dc,_4dd,_4de){
var _4df=function(_4e0,args){
};
var _4e2={};
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4e2,"BODY",_4dd,_4dc);
_4dd.showDialog("PageProperties",_4e2,_4df);
return false;
};
this.ImageMapDialog=function(_4e3,_4e4,args){
var _4e6=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(_4e4);
var _4e7=function(wnd,_4e9){
Telerik.Web.UI.Editor.CommandList._setImageMapProperties(_4e4,_4e9);
return false;
};
_4e4.showDialog("ImageMapDialog",_4e6,_4e7);
return false;
};
this._setImageMapProperties=function(_4ea,args){
if(!args){
return;
}
var _4ec=_4ea.getSelectedElement();
var _4ed;
if(_4ec&&_4ec.tagName=="IMG"){
_4ed=_4ec;
if(args.ImageSrc!=_4ed.src){
_4ed.src=args.ImageSrc;
}
}else{
if(!args.ImageSrc){
return;
}
_4ea.pasteHtml("<img src=\""+args.ImageSrc+"\" id = \"__tmp__\">");
_4ed=_4ea.get_document().getElementById("__tmp__");
_4ed.removeAttribute("id");
if(document.all){
var oRng=_4ea.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4ed);
oRng.select();
}
}
var _4ef=document.createElement("SPAN");
_4ef.innerHTML=args.MapHtml;
var _4f0=_4ef.getElementsByTagName("map");
if(_4f0.length==0){
return;
}
var _4f1=_4f0[0].innerHTML;
_4ef=null;
if(!_4f1){
_4ed.removeAttribute("useMap");
return;
}
var _4f2="";
var map=null;
var _4f4=_4ed.getAttribute("useMap");
if(_4f4){
_4f2=_4f4.substr(1);
map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4ea,_4f2);
}
if(map==null){
var _4f5=new Date()-100;
var _4f2="rade_img_map_"+_4f5;
map=_4ea.get_document().createElement("map");
map.id=_4f2;
this._setNameAttribute(map,_4f2);
map=_4ea.get_document().body.appendChild(map);
_4ed.setAttribute("useMap","#"+_4f2);
_4ed.setAttribute("border","0");
}
map.innerHTML=_4f1;
};
this._setNameAttribute=function(_4f6,name){
_4f6.removeAttribute("name");
_4f6.removeAttribute("NAME");
_4f6.name=null;
_4f6.name=name;
_4f6["NAME"]=name;
};
this._getImageMapDialogArgument=function(_4f8){
var _4f9={};
_4f9._editor=_4f8;
var _4fa=_4f8.getSelectedElement();
if(_4fa&&_4fa.tagName=="IMG"){
_4f9.ImageSrc=_4fa.getAttribute("src",2);
_4f9.ImageWidth=(_4fa.style.width)?_4fa.style.width:_4fa.width;
_4f9.ImageHeight=(_4fa.style.height)?_4fa.style.height:_4fa.height;
if($telerik.isIE){
var oRng=_4f8.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4fa);
oRng.select();
}
if(_4fa.useMap){
var _4fc=_4fa.getAttribute("useMap").substr(1);
var map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4f8,_4fc);
if(map!=null){
_4f9.ImageMapHTML="<map name = \""+_4fc+"\">"+map.innerHTML+"</map>";
}else{
_4f9.ImageMapHTML="";
}
_4fa.style.width=_4f9.ImageWidth;
_4fa.style.height=_4f9.ImageHeight;
}
}
return _4f9;
};
this._getImageMapByName=function(_4fe,_4ff){
var _500=_4fe.get_document();
var map=_500.getElementById(_4ff);
if(map!=null){
return map;
}
var maps=_500.getElementsByTagName("map");
for(var i=0;i<maps.length;i++){
if(maps[i].getAttribute("name")==_4ff){
return maps[i];
}
}
return null;
};
this.DocumentManager=function(_504,_505,_506){
var _507={};
var _508=function(_509,args){
_505.pasteHyperLink(args.Result,_504);
};
var _50b=_505.get_dialogOpener().get_additionalQueryString();
var _50c=_505.getSelectedElement();
if(_50c&&_50c.tagName.toLowerCase()=="a"){
_505.get_dialogOpener().set_additionalQueryString(_50b+"&PreselectedItemUrl="+encodeURIComponent(_50c.href));
}
_505.showDialog("DocumentManager",_507,_508);
_505.get_dialogOpener().set_additionalQueryString(_50b);
return false;
};
this.TableWizard=function(_50d,_50e,_50f){
var _510=Telerik.Web.UI.Editor.CommandList._getTableArgument(_50e,null,true,false);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_510,"TABLE",_50e,_50d);
var _511=function(_512,args){
_50e.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_50d);
};
_50e.showDialog("TableWizard",_510,_511);
return false;
};
this.SetTableProperties=function(_514,_515,_516){
var _517=Telerik.Web.UI.Editor.CommandList._getTableArgument(_515,1,false,true);
if(!_517){
alert(_515.getLocalizedString("tablewarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_517,"TABLE",_515,_514);
var _518=Telerik.Web.UI.Editor.CommandList._getParentTable(_515);
var _519=function(_51a,args){
_515.selectElement(_518);
_515.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_514);
};
if(_515.get_document().selection&&_515.get_document().selection.empty){
_515.get_document().selection.empty();
}
_515.showDialog("TableWizard",_517,_519);
return false;
};
this.SetCellProperties=function(_51c,_51d,_51e){
var _51f=Telerik.Web.UI.Editor.CommandList._getTableArgument(_51d,2,false,true);
if(!_51f){
alert(_51d.getLocalizedString("cellwarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_51f,"TABLE",_51d,_51c);
var _520=Telerik.Web.UI.Editor.CommandList._getParentTable(_51d);
var _521=function(_522,args){
_51d.selectElement(_520);
_51d.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_51c);
};
_51d.showDialog("TableWizard",_51f,_521);
return false;
};
this.FindAndReplace=function(_524,_525,_526){
var _527={};
_527._editor=_525;
var _528=function(_529,args){
};
_525.showDialog("FindAndReplace",_527,_528);
return false;
};
this.StyleBuilder=function(_52b,_52c,_52d){
var _52e=null;
var _52f=function(_530,args){
var _532=Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result);
if(_52e){
var _533=_532.match(/style=["'](.*)["']/i);
if(_533[1]){
var _534=new Telerik.Web.UI.Editor.AttributeCommand(_52b+"set Style Attribute",_52c.get_contentWindow(),_52e,"style",_533[1]);
_52c.executeCommand(_534);
}
}else{
_52c.pasteHtml(_532,_52b);
}
};
var _535={};
var _536=_52c.getSelection();
var _537=_536.getParentElement();
if(!_536.isControl()){
var _538=_536.getHtml();
if(_538!=""||(_537&&_537.tagName&&_537.tagName.toLowerCase()=="body")){
var _539=_52c.createElement("span");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_539,_538);
_537=_539;
}else{
_52e=_537;
_52c.selectElement(_537,false);
}
}
_535.htmlElement=_537.cloneNode(true);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_535,"*",_52c,_52b);
_535.fontNames=_52c.get_fontNames();
_52c.showDialog("StyleBuilder",_535,_52f);
return false;
};
this.XhtmlValidator=function(_53a,_53b,_53c){
var _53d=_53b;
var _53e=function(_53f,args){
};
_53b.showDialog("XhtmlValidator",_53d,_53e);
return false;
};
this.TrackChangesDialog=function(_541,_542,_543){
var _544=_542;
var _545=function(_546,args){
};
_542.showDialog("TrackChangesDialog",_544,_545);
};
this.InsertCustomLink=function(_548,_549,args){
var link=args.value;
var _54c=String.format("<a href='{1}' title='{3}' target='{2}'>{0}</a>",link.innerHTML,link.href,link.target,link.title);
var _54d=Telerik.Web.UI.Editor.CommandList._getParentLink(_549);
if(_54d){
var _54e=_54d.cloneNode(true);
if(link.href){
_54e.setAttribute("href",link.href);
}
if(link.target){
_54e.setAttribute("target",link.target);
}
if(link.title){
_54e.setAttribute("title",link.title);
}
if(!_54e.innerHTML){
_54e.innerHTML=link.innerHTML;
}
_54c=Telerik.Web.UI.Editor.Utils.getOuterHtml(_54e);
}
_549.pasteHtml(_54c,_548);
};
this._getDialogArguments=function(_54f,_550,_551,_552){
_54f.Colors=_551.get_colors();
if("TD"==_550||"TH"==_550||"TABLE"==_550){
_54f.CssClasses=_551.getCssArray("TABLE");
_54f.CellCssClasses=_551.getCssArray("TD");
}else{
if("A"==_550||"BODY"==_550||"IMG"==_550){
_54f.CssClasses=_551.getCssArray(_550);
}
}
_54f.Editor=_551;
};
this.SetLinkProperties=this.LinkManager=function(_553,_554,_555){
var _556=Telerik.Web.UI.Editor.CommandList._getLinkArgument(_554);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_556,"A",_554,_553);
var _557=function(_558,args){
_554.pasteHyperLink(args.realLink,_553);
};
_554.showDialog("LinkManager",_556,_557);
return false;
};
this.SetImageProperties=function(_55a,_55b,_55c){
var _55d=_55b.getSelectedElement();
if(_55d.nodeName.toLowerCase()!="img"){
return false;
}
var _55e={};
_55e.Element=_55d;
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_55e,"IMG",_55b,_55a);
var _55f=function(_560,args){
if(_55d&&_55d.parentNode){
_55d.parentNode.replaceChild(args.Result,_55d);
}else{
_55b.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_55a);
}
};
_55b.showDialog("ImageProperties",_55e,_55f);
return false;
};
this.FormatCodeBlock=function(_562,_563,_564){
var _565={dirtyCode:_563.getSelectionHtml()};
if(_563.get_document().selection&&_563.get_document().selection){
var _566=_563.get_document().selection.type.toLowerCase();
if(_566=="control"||_566=="none"){
_565.dirtyCode="";
}
}
var _567=function(_568,args){
_563.pasteHtml(args.get_code(),_562);
};
_563.showDialog("FormatCodeBlock",_565,_567);
return false;
};
this._getDocumentAnchors=function(_56a){
var _56b=_56a.getElementsByTagName("A");
var _56c=new Array();
for(var i=0;i<_56b.length;i++){
if(_56b[i].name){
_56c[_56c.length]=_56b[i];
}
}
return _56c;
};
this._getParentLink=function(_56e){
_56e.setFocus();
var _56f=_56e.getSelectedElement();
var _570=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_56f,"A");
if(_570){
_56e.selectElement(_570);
}else{
var _571="";
if(_56f&&_56f.tagName=="IMG"){
_571=Telerik.Web.UI.Editor.Utils.getOuterHtml(_56f);
}else{
_571=_56e.getSelection().getHtml();
}
_570=_56e.get_document().createElement("A");
try{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_570,_571);
}
catch(e){
_570.innerHTML=Telerik.Web.UI.Editor.Utils.stripFormatting(_571,"ALL");
}
}
return _570;
};
this._getLinkArgument=function(_572,_573){
var _574=Telerik.Web.UI.Editor.CommandList._getParentLink(_572);
var _575=_574.innerHTML;
var _576=!_575?false:_575.match(/</);
if($telerik.isIE&&_576){
if(_575.trim().toLowerCase()=="<p>&nbsp;</p>"){
_574.innerHTML=" ";
_576=false;
}
}
return {selectedTabIndex:_573?_573:0,realLink:_574.cloneNode(true),showText:!_576,documentAnchors:Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(_572.get_document())};
};
this._getParentTable=function(_577){
_577.setFocus();
var _578=_577.getSelectedElement();
var _579=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_578,"TABLE");
return _579;
};
this._getParentCell=function(_57a){
_57a.setFocus();
var _57b=_57a.getSelectedElement();
var _57c=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_57b,"TD");
return _57c;
};
this._getTableArgument=function(_57d,_57e,_57f,_580){
var _581;
var _582=null;
if(_57f){
_581=Telerik.Web.UI.Editor.Utils.createTable(2,2,_57d._document);
}else{
_581=Telerik.Web.UI.Editor.CommandList._getParentTable(_57d);
}
if(!_57f&&!_581){
return null;
}
if(_580){
_582=Telerik.Web.UI.Editor.CommandList._getParentCell(_57d);
}
var _583=_581.cloneNode(true);
var _584=_581;
return {selectedTabIndex:_57e?_57e:0,cellToModify:_582,tableToModify:_583,originalTable:_584,tableDocument:(_583.document)?_583.document:_57d.get_document()};
};
this.EnterParagraphMozilla=function(_585,_586,args){
var _588=_586.getSelectedElement();
if("LI"==_588.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_588,"LI")!=null){
_586.bubbleKeyEventToBrowser();
return false;
}else{
if(_588.tagName=="A"){
_586.bubbleKeyEventToBrowser();
return false;
}
}
var _589=_586.get_contentWindow();
var oDoc=_589.document;
function checkParent(_58b,_58c){
_58c[_58c.length]=_58b;
while(_58b!=null&&_58b.tagName!="P"){
if(_58b.tagName=="TD"){
return null;
}
_58b=_58b.parentNode;
_58c[_58c.length]=_58b;
}
return _58b;
}
var _58d=_589.getSelection();
var _58e=_58d.getRangeAt(0);
var _58f=_58e.cloneRange();
_58e.deleteContents();
var _590=_58e.startOffset;
var _591=_58e.startContainer;
var _592="";
var _593=[];
var inP=checkParent(_591,_593);
if(inP){
var _595=(inP.innerHTML=="");
var _596=_58e.cloneRange();
_596.setStart(inP,0);
_596.setEnd(_591,_590);
var _597=_596.cloneContents();
var _598=_58e.cloneRange();
_598.setStart(_591,_590);
if(inP.lastChild){
_598.setEndAfter(inP.lastChild);
}else{
_598.setEnd(inP,0);
}
var _599=_598.cloneContents();
_58e.selectNode(inP);
_58d.removeAllRanges();
_58d.addRange(_58e);
inP=inP.cloneNode(true);
inP.innerHTML="";
var _59a=inP.cloneNode(true);
if(_595){
_59a.innerHTML="&nbsp;";
}else{
_59a.appendChild(_597);
}
endPar=inP.cloneNode(true);
endPar.appendChild(_599);
var newP=inP.cloneNode(true);
var _59c=newP;
if(_593.length>0){
for(var i=_593.length;i>0;i--){
var _59e=_593[i];
var _59f=_59e&&_59e.cloneNode?_59e.cloneNode(false):null;
if(_59f&&_59f.tagName!="P"){
_59c.appendChild(_59f);
_59c=_59f;
}
}
}
_59c.innerHTML="&nbsp;";
_59c.setAttribute("id","radETempNode");
var _5a0=oDoc.createElement("div");
_5a0.appendChild(_59a);
_5a0.appendChild(newP);
if(!_595){
_5a0.appendChild(endPar);
}
_592=_5a0.innerHTML;
}else{
_592="<p id='radETempNode'>&nbsp;</p>";
}
_586.pasteHtml(_592,"Enter",false,false,false);
oP=oDoc.getElementById("radETempNode");
if(oP){
oP.removeAttribute("id",0);
var _58d=_589.getSelection();
var _58e=oDoc.createRange();
_58e.selectNodeContents(oP);
_58d.removeAllRanges();
_58d.addRange(_58e);
}
var ps=oDoc.getElementsByTagName("P");
for(var i=0;i<ps.length;i++){
var _5a2=ps[i].innerHTML;
if(_5a2==""||_5a2.trim().toLowerCase()=="<br>"){
ps[i].parentNode.removeChild(ps[i]);
}
}
return false;
};
this.Enter=function(_5a3,_5a4,args){
var _5a6=_5a4.getSelectedElement();
if("LI"==_5a6.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5a6,"LI")!=null){
_5a4.bubbleKeyEventToBrowser();
return false;
}
try{
var _5a7=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_5a4.get_contentWindow());
var _5a8=_5a4.get_document().selection.createRange();
if(_5a8.pasteHTML){
var tag=_5a6.tagName;
if(tag.charAt(0)=="H"&&parseInt(tag.charAt(1))>0){
var _5aa=_5a8.duplicate();
_5aa.moveToElementText(_5a6);
_5a4.bubbleKeyEventToBrowser();
return false;
}
_5a8.pasteHTML("<br>");
_5a8.select();
_5a8.moveEnd("character",1);
_5a8.moveStart("character",1);
_5a8.collapse(false);
}else{
if(_5a8(0)){
_5a8.execCommand("Delete");
}
}
_5a4.executeCommand(_5a7);
}
catch(exc){
alert(exc.message);
}
return false;
};
this.ShiftEnter=function(_5ab,_5ac,args){
var _5ae=_5ac.getSelectedElement();
if("LI"==_5ae.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_5ae,"LI")!=null){
var _5af=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_5ac.get_contentWindow());
var _5b0=_5ac.get_document().selection.createRange();
_5b0.pasteHTML("<br>");
_5b0.select();
_5b0.moveEnd("character",1);
_5b0.moveStart("character",1);
_5b0.collapse(false);
_5ac.executeCommand(_5af);
return false;
}
_5ac.bubbleKeyEventToBrowser();
return false;
};
this.ToggleTableBorder=function(_5b1,_5b2,args){
_5b2.toggleEnhancedEdit();
return false;
};
this.ConvertToUpper=this.ConvertToLower=function(_5b4,_5b5,args){
var _5b7;
var endR;
if($telerik.isIE){
if(_5b5._document.selection.type.toLowerCase()=="control"){
return;
}
var _5b9=_5b5._document.selection.createRange();
_5b7=_5b9.duplicate();
endR=_5b9.duplicate();
_5b7.collapse();
endR.collapse(false);
}
var _5ba=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5b5);
var _5bb=_5ba.markedElements;
var _5bc=_5ba.newElements;
var _5bd=new Telerik.Web.UI.Editor.GenericCommand(_5b5.getLocalizedString(_5b4),_5b5.get_contentWindow());
for(var i=0;i<_5bb.length;i++){
changeChildNodesCase(_5bb[i]);
}
for(var i=0;i<_5bc.length;i++){
if($telerik.isIE){
_5bc[i].removeNode(false);
}else{
var _5bf=document.createRange();
_5bf.selectNodeContents(_5bc[i]);
_5bc[i].parentNode.replaceChild(_5bf.extractContents(),_5bc[i]);
}
}
if($telerik.isIE){
var _5c0=_5b5._document.selection.createRange();
_5c0.setEndPoint("StartToStart",_5b7);
_5c0.setEndPoint("EndToEnd",endR);
_5c0.select();
}else{
var _5c1=_5b5.get_contentWindow().getSelection();
var rng=_5c1.getRangeAt(0);
rng.collapse(true);
}
_5b5.executeCommand(_5bd);
function changeChildNodesCase(_5c3){
var _5c4=_5c3.childNodes;
for(var i=0;i<_5c4.length;i++){
if(_5c4[i].nodeType==3){
_5c4[i].nodeValue=("ConvertToLower"==_5b4)?_5c4[i].nodeValue.toLowerCase():_5c4[i].nodeValue.toUpperCase();
}else{
if(_5c4[i].nodeType==1&&_5c4[i].tagName.toUpperCase()!="FONT"){
changeChildNodesCase(_5c4[i]);
}
}
}
}
};
this.ApplyClass=function(_5c6,_5c7,args){
var _5c9=true;
var _5ca=args.get_value();
var _5cb=_5c7.get_contentWindow();
var _5cc=_5c7.get_document();
var _5cd=_5c7.createRestorePoint();
var _5ce=new Telerik.Web.UI.Editor.GenericCommand(_5c7.getLocalizedString(_5c6)+" [\""+_5ca+"\"]",_5c7.get_contentWindow());
var _5cf=Telerik.Web.UI.Editor.Utils.getFullySelectedElement(_5cb);
if(_5cf){
Telerik.Web.UI.Editor.Utils.setElementClassName(_5cf,_5ca);
_5c9=false;
}else{
if(!_5ca){
_5cc.execCommand("RemoveFormat",false,null);
_5c9=false;
}
}
if(_5c9){
var _5d0=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5c7);
var _5d1=_5d0.markedElements;
if(_5d1.length>0){
for(var i=0;i<_5d1.length;i++){
var _5d3=_5d1[i];
if(_5d3.className){
continue;
}else{
_5d3.className=_5ca;
}
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5c7.get_contentWindow(),_5d1);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5c7,"class='"+_5ca+"'");
}
}
_5c7.executeCommand(_5ce);
},this.RealFontSize=function(_5d4,_5d5,args){
var _5d7=args.get_value();
var _5d8=new Telerik.Web.UI.Editor.GenericCommand(_5d5.getLocalizedString(_5d4)+" [\""+_5d7+"\"]",_5d5.get_contentWindow());
var _5d9=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_5d5);
var _5da=_5d9.markedElements;
if(_5da.length>0){
for(var i=0;i<_5da.length;i++){
_5da[i].style.fontSize=_5d7;
_5da[i].removeAttribute("size");
}
if(!$telerik.isIE){
Telerik.Web.UI.Editor.Utils.addElementsToSelection(_5d5.get_contentWindow(),_5da);
}
}else{
Telerik.Web.UI.Editor.CommandList._completeEditorSelection(_5d5,"style='font-size:"+_5d7+"'");
}
_5d5.executeCommand(_5d8);
},this._completeEditorSelection=function(_5dc,_5dd){
if(!_5dd){
_5dd="";
}
var _5de=_5dc.get_contentWindow();
var _5df=_5dc.get_document();
var _5e0=_5dc.getSelection().getParentElement().tagName;
if($telerik.isIE&&!_5dc.getSelectionHtml()&&(_5e0=="FONT"||_5e0=="SPAN")){
_5df.execCommand("RemoveFormat",null,false);
}
var _5e1=_5dc.getSelection();
_5e1.pasteHtml("<font "+_5dd+" id='radERealFont'>&nbsp;</font>");
var _5e2=_5dc.get_document().getElementById("radERealFont");
_5e2.removeAttribute("id");
if($telerik.isIE){
_5dc.selectElement(_5e2);
_5dc.getSelection().collapse();
_5e2.innerHTML="";
}else{
if(_5de.getSelection){
var oSel=_5de.getSelection();
var _5e4=_5dc.getSelection().getRange();
oSel.removeAllRanges();
_5e2.innerHTML="";
if(_5e4&&_5e4.selectNodeContents){
_5e4.selectNodeContents(_5e2);
}
oSel.addRange(_5e4);
}
}
},this._markEditorSelection=function(_5e5){
if(_5e5.get_html()==""){
return {markedElements:[],newElements:[]};
}
var _5e6="AZBY";
var _5e7="_cm";
var _5e8=[];
var _5e9=[];
var _5ea=[];
var _5eb=$telerik.isSafari?"span":"font";
var _5ec=_5e5._contentArea;
var _5ed=_5e5.getSelection();
if(_5ed.isControl()){
var _5ee=_5ed.getParentElement();
var _5ef=_5e5._document.createElement(_5eb);
_5ef.appendChild(_5ee.cloneNode(true));
_5ee.parentNode.replaceChild(_5ef,_5ee);
return {markedElements:[_5ef],newElements:[_5ef]};
}
if(!$telerik.isSafari){
keepFontNames();
}
if(!$telerik.isIE){
_5ec.ownerDocument.execCommand("UseCSS",false,true);
_5ec.ownerDocument.execCommand("styleWithCSS",false,false);
}
_5ec.ownerDocument.execCommand("FontName",false,_5e6);
var _5f0=_5ec.getElementsByTagName(_5eb);
for(var i=0;i<_5f0.length;i++){
var _5ef=_5f0[i];
if(_5ef.getAttribute("face")==_5e6||_5ef.style.fontFamily==_5e6){
_5ef.removeAttribute("face");
if(_5ef.style.fontFamily==_5e6){
_5ef.style.fontFamily="";
if(_5ef.className=="Apple-style-span"){
_5ef.className="";
}
}
_5e9.push(_5ef);
var _5f2=_5ef.getElementsByTagName(_5eb);
for(var j=0;j<_5f2.length;j++){
var _o=_5f2[j];
if(_o.getAttribute("face")!=_5e6){
_5e9.push(_o);
}
}
if(!_5ef.getAttribute(_5e7)){
_5ea.push(_5ef);
}
}
_5ef.removeAttribute(_5e7);
}
if(!$telerik.isSafari){
restoreFontNames();
}
if(!$telerik.isIE){
_5ec.ownerDocument.execCommand("UseCSS",false,false);
_5ec.ownerDocument.execCommand("styleWithCSS",false,true);
}
function keepFontNames(){
var _5f5=_5e5._contentArea.getElementsByTagName(_5eb);
for(var i=0;i<_5f5.length;i++){
var _5f7=_5f5[i];
if(_5f5[i].face){
_5f7.setAttribute("_face",_5f7.face);
_5e8.push(_5f7);
}
_5f7.setAttribute(_5e7,1);
}
}
function restoreFontNames(){
for(var i=0;i<_5e8.length;i++){
_5e8[i].face=_5e8[i].getAttribute("_face");
_5e8[i].removeAttribute("_face");
}
_5e8=[];
}
return {markedElements:_5e9,newElements:_5ea};
};
})();
if(typeof (RadEditorCommandList)=="undefined"){
var RadEditorCommandList=Telerik.Web.UI.Editor.CommandList;
}
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandsManager=function(_5f9){
this._commands=[];
this._currentCommandIndex=-1;
};
Telerik.Web.UI.Editor.CommandsManager.prototype={get_commands:function(){
return this._commands;
},execute:function(_5fa,_5fb){
if(_5fa&&_5fa.execute){
var _5fc=_5fa.execute();
if(false==_5fb){
return false;
}
if(_5fc&&_5fa._canUnexecute){
this._clearCommandsToRedo();
Array.add(this._commands,_5fa);
this._currentCommandIndex=this._commands.length-1;
return true;
}
}
return false;
},undo:function(_5fd){
if(_5fd>this._commands.length){
_5fd=this._commands.length;
}
var _5fe=0;
var _5ff=null;
while(0<_5fd--&&0<=this._currentCommandIndex&&this._currentCommandIndex<this._commands.length){
_5ff=this._commands[this._currentCommandIndex--];
if(_5ff){
_5ff.unexecute();
_5fe++;
}
}
},redo:function(_600){
if(_600>this._commands.length){
_600=this._commands.length;
}
var _601=0;
var _602=null;
var _603=this._currentCommandIndex+1;
while(0<_600--&&0<=_603&&_603<this._commands.length){
_602=this._commands[_603];
if(_602){
_602.execute();
this._currentCommandIndex=_603;
_601++;
}
_603++;
}
},removeCommandAt:function(_604){
this._commands.splice(_604,1);
if(this._currentCommandIndex>=_604){
this._currentCommandIndex--;
}
},isUndoAvailable:function(){
return (-1<this._currentCommandIndex);
},isRedoAvailable:function(){
return (this._currentCommandIndex<this._commands.length-1);
},getCommandsToUndo:function(){
if(this.isUndoAvailable()){
return (this._commands.slice(0,this._currentCommandIndex+1)).reverse();
}else{
return [];
}
},getCommandsToRedo:function(){
if(this.isRedoAvailable()){
return this._commands.slice(this._currentCommandIndex+1);
}else{
return [];
}
},canRepeatLastCommand:function(){
return ((this._currentCommandIndex==this._commands.length-1)&&null!=this._commands[this._currentCommandIndex]&&("function"==typeof (this._commands[this._currentCommandIndex].clone)));
},repeatLastCommand:function(){
if(this.canRepeatLastCommand()){
var _605=this._commands[this._currentCommandIndex].clone();
this.execute(_605);
}
},_clearCommandsToRedo:function(){
if(this.isRedoAvailable()){
this._commands.splice(this._currentCommandIndex+1,this._commands.length-this._currentCommandIndex);
}
}};
Telerik.Web.UI.Editor.CommandsManager.registerClass("Telerik.Web.UI.Editor.CommandsManager",null);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditingOptions=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditingOptions.prototype={Typing:1,Tools:2,ContextMenus:4,Tab:8,Modules:16,EditModes:32,All:63};
Telerik.Web.UI.EditingOptions.registerEnum("Telerik.Web.UI.EditingOptions",false);
Telerik.Web.UI.StripFormattingOptions=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.StripFormattingOptions.prototype={None:0,NoneSupressCleanMessage:1,MSWord:2,MSWordNoFonts:4,MSWordRemoveAll:8,Css:16,Font:32,Span:64,AllExceptNewLines:128,All:256};
Telerik.Web.UI.StripFormattingOptions.registerEnum("Telerik.Web.UI.StripFormattingOptions",false);
Telerik.Web.UI.EditModes=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditModes.prototype={Design:1,Html:2,Preview:4,All:7};
Telerik.Web.UI.EditModes.registerEnum("Telerik.Web.UI.EditModes",false);
Telerik.Web.UI.EditorToolbarMode=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorToolbarMode.prototype={Default:1,Floating:2,PageTop:4,ShowOnFocus:8};
Telerik.Web.UI.EditorToolbarMode.registerEnum("Telerik.Web.UI.EditorToolbarMode",false);
Telerik.Web.UI.EditorFilters=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorFilters.prototype={None:0,RemoveScripts:1,MakeUrlsAbsolute:2,FixUlBoldItalic:4,FixEnclosingP:8,IECleanAnchors:16,MozEmStrong:32,ConvertFontToSpan:64,ConvertToXhtml:128,IndentHTMLContent:256,EncodeScripts:512,OptimizeSpans:1024,DefaultFilters:65533};
Telerik.Web.UI.EditorFilters.registerEnum("Telerik.Web.UI.EditorFilters",false);
Telerik.Web.UI.EditorToolType=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.EditorToolType.prototype={Button:1,DropDown:2,SplitButton:4,Separator:8,ToolStrip:16,Custom:32};
Telerik.Web.UI.EditorToolType.registerEnum("Telerik.Web.UI.EditorToolType",false);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Filter=function(){
Telerik.Web.UI.Editor.Filter.initializeBase(this);
this.IsDom=false;
this.Enabled=false;
this.Name="RadEditor filter";
this.Description="RadEditor filter description";
};
Telerik.Web.UI.Editor.Filter.prototype={getHtmlContent:function(_606){
return _606;
},getDesignContent:function(_607){
return _607;
},get_isDom:function(){
return this.IsDom;
},set_isDom:function(_608){
this.IsDom=_608;
},get_enabled:function(){
return this.Enabled;
},set_enabled:function(_609){
this.Enabled=_609;
},get_name:function(){
return this.Name;
},set_name:function(_60a){
this.Name=_60a;
},get_description:function(){
return this.Description;
},set_description:function(_60b){
this.Description=_60b;
}};
Telerik.Web.UI.Editor.Filter.registerClass("Telerik.Web.UI.Editor.Filter",Sys.Component);
Telerik.Web.UI.Editor.StripScriptsFilter=function(){
Telerik.Web.UI.Editor.StripScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="StripScriptsFilter";
this.Description="This filter strips all script tags from the content.";
};
Telerik.Web.UI.Editor.StripScriptsFilter.prototype={getHtmlContent:function(_60c){
return this._performStripping(_60c);
},getDesignContent:function(_60d){
return this._performStripping(_60d);
},_performStripping:function(_60e){
var _60f=_60e.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_60f=_60f.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
return _60f;
}};
Telerik.Web.UI.Editor.StripScriptsFilter.registerClass("Telerik.Web.UI.Editor.StripScriptsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.EncodeScriptsFilter=function(){
Telerik.Web.UI.Editor.EncodeScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="EncodeScriptsFilter";
this.Description="This filter encodes all script tags from the content.";
};
Telerik.Web.UI.Editor.EncodeScriptsFilter.prototype={getHtmlContent:function(_610){
var _611=new RegExp("<!"+"--RADEDITORSAVEDTAG_([\\s\\S]*?)--"+">","ig");
var _612=new RegExp("RADEDITORSAVEDTAGENDING","ig");
var _613=new RegExp("RADEDITORSAVEDTAGBEGINNING","ig");
var _614=_610.replace(_611,"<$1>");
_614=_614.replace(_612,"--"+">");
_614=_614.replace(_613,"<!"+"--");
return _614;
},getDesignContent:function(_615){
var _616=function(_617,_618,_619,_61a,_61b){
var _61c=_61b.substring(0,_61a).lastIndexOf("<!"+"--");
var _61d=_61b.substring(0,_61a).lastIndexOf("--"+">");
if(_61c>_61d){
_61c=_61b.substring(_61a,_61b.length).indexOf("<!"+"--");
_61d=_61b.substring(_61a,_61b.length).indexOf("--"+">");
if((_61c==-1&&_61d>-1)||(_61d<_61c)){
return _617;
}
}
var _61e=new RegExp("--"+">","ig");
var _61f=new RegExp("<!"+"--","ig");
var _620=_619.replace(_61e,"RADEDITORSAVEDTAGENDING");
var _620=_620.replace(_61f,"RADEDITORSAVEDTAGBEGINNING");
var _621="<!"+"--RADEDITORSAVEDTAG_"+_618+_620+"--"+">";
return _621;
};
var _622=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig");
var _623=_615.replace(_622,_616);
return _623;
}};
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(_624){
return this._performStripping(_624);
},_performStripping:function(_625){
var _626=_625;
_626=_626.replace(/<BR\s?\/?>\s*<\/(H1|H2|H3|H4|H5|H6|LI|P)/ig,"</$1");
_626=_626.replace(/<(H1|H2|H3|H4|H5|H6|LI|P)([^>]*)?><BR\s?\/?>/ig,"<$1 $2>");
return _626;
}};
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(_627,_628){
var _629=_627.getElementsByTagName(_628);
if(!_629){
_629=_627.ownerDocument.getElementsByTagName(_628);
}
return _629;
},fixLists:function(_62a,_62b){
var _62c=this._getElements(_62a,_62b);
for(var i=_62c.length-1;i>=0;i--){
var list=_62c[i];
var _62f=list.previousSibling;
if(_62f&&_62f.nodeType==3){
_62f=_62f.previousSibling;
}
if(_62f&&"li"==list.previousSibling.nodeName.toLowerCase()){
_62f.appendChild(list.cloneNode(true));
var _630=list.parentNode;
_630.removeChild(list);
_630=null;
}
}
},getHtmlContent:function(_631){
this.fixLists(_631,"OL");
this.fixLists(_631,"UL");
return _631;
}};
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(_632,_633){
var _634=_632.getElementsByTagName(_633);
if(!_634){
_634=_632.ownerDocument.getElementsByTagName(_633);
}
return _634;
},_replaceElementWithSpan:function(_635,_636,_637){
var _638=this._getElements(_635,_636);
var _639=[];
for(var j=_638.length-1;j>=0;j--){
Array.add(_639,_638[j]);
}
for(var i=0,len=_639.length;i<len;i++){
var _63d=_635.ownerDocument.createElement("span");
_63d.style.cssText=_637;
var _63e=_639[i];
var _63f=_63e.innerHTML;
if($telerik.isIE&&_63f==" "){
_63d.innerText=_63f;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_63d,_63f);
}
_63e.parentNode.replaceChild(_63d,_63e);
}
},_replaceSpanWithElement:function(_640,_641,_642){
var _643=this._getElements(_640,"span");
var _644=[];
for(var j=_643.length-1;j>=0;j--){
Array.add(_644,_643[j]);
}
for(var i=0,len=_644.length;i<len;i++){
var _648=[];
var _649=_644[i];
for(var k=0;k<_649.childNodes.length;k++){
Array.add(_648,_649.childNodes[k].cloneNode(true));
}
if(_649.style.cssText.toLowerCase()==_642||_649.style.cssText.toLowerCase()==(_642+";")){
var _64b=_640.ownerDocument.createElement(_641);
for(var l=0;l<_648.length;l++){
_64b.appendChild(_648[l]);
}
_649.parentNode.replaceChild(_64b,_649);
}
}
},getHtmlContent:function(_64d){
this._replaceElementWithSpan(_64d,"u","text-decoration:underline;");
return _64d;
},getDesignContent:function(_64e){
this._replaceSpanWithElement(_64e,"u","text-decoration: underline");
return _64e;
}};
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(_64f,_650){
var _651=_64f.getElementsByTagName(_650);
if(!_651){
_651=_64f.ownerDocument.getElementsByTagName(_650);
}
return _651;
},_singleChild:function(node){
if(node==null||node.parentNode==null){
return false;
}
var _653=node.parentNode;
var _654=0;
for(var i=0,len=_653.childNodes.length;i<len&&_654<2;i++){
var _657=_653.childNodes[i];
if(_657.nodeType==3&&String(_657.nodeValue).trim()==""){
continue;
}
_654++;
}
return (_654==1);
},_optimizeElement:function(node){
var _659=node.parentNode;
var _65a=node.innerHTML;
var _65b=["align","dir","lang","title","class","id"];
var _65c=true;
for(var i=0,len=_65b.length;i<len;i++){
_65c|=this._checkAttribute(node,_659,_65b[i]);
}
if(!_65c){
return;
}
for(var i=0,len=_65b.length;i<len;i++){
var _65f=_65b[i];
var _660=node.getAttribute(_65f,2);
if(_660){
_659.setAttribute(_65f,_660);
}
}
var _661=$telerik.isIE?node.style.cssText:node.getAttribute("style",2);
if(_661){
var _662=$telerik.isIE?_659.style.cssText:_659.getAttribute("style",2);
_662=_662?_662+";":"";
if($telerik.isIE){
_659.style.cssText=_662+_661;
}else{
_659.setAttribute("style",_662+_661);
}
}
Telerik.Web.UI.Editor.Utils.removeNode(node);
},_checkAttribute:function(node,_664,_665){
var _666=node.getAttribute(_665,2);
var _667=_664.getAttribute(_665,2);
return (_666==null||_667==null||_666==_667);
},getHtmlContent:function(_668){
var _669=this._getElements(_668,"span");
if(_669){
var i,len=_669.length;
var _66c=[];
for(i=0;i<len;i++){
var span=_669[i];
var _66e=span.tagName.toLowerCase();
if(span.parentNode.tagName.toLowerCase()==_66e){
if(this._singleChild(span)){
_66c[_66c.length]=span;
}else{
var _66f=Telerik.Web.UI.Editor.Utils.getOuterHtml(span).toLowerCase();
if(_66f.indexOf("<"+_66e+">")==0){
_66c[_66c.length]=span;
}
}
}
}
len=_66c.length;
for(i=0;i<len;i++){
this._optimizeElement(_66c[i]);
}
}
return _668;
}};
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(_670){
var _671=new RegExp("<!"+"--RADEDITORSAVEDCOMMENT","ig");
var _672=_670.replace(_671,"<!--");
return _672;
},getDesignContent:function(_673){
var _674=new RegExp("<!"+"--(\\[[^]]+\\][\\s\\S]*?)-"+"->","ig");
var _675=_673.replace(_674,"<!-"+"-RADEDITORSAVEDCOMMENT$1-"+"->");
return _675;
}};
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(_676){
var _677=new RegExp("<param([\\s\\S]+?)?>","ig");
var _678=new RegExp("<rade_param([\\s>])","ig");
var _679=_676;
if(_677.test(_676)&&_678.test(_676)){
_679=_679.replace(_677,"");
}
_679=_679.replace(_678,"<param$1");
_679=_679.replace(/<\/rade_param>/gi,"");
return _679;
},getDesignContent:function(_67a){
var _67b=new RegExp("<param([\\s\\S]+?)/?>","ig");
var _67c=_67a.replace(_67b,"<rade_param$1></rade_param><param$1>");
return _67c;
}};
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(_67d){
var _67e=null;
if(_67d.tagName.toLowerCase()=="html"){
_67e=_67d.getElementsByTagName("BODY")[0];
}else{
_67e=_67d;
}
if($telerik.isIE){
if(_67e&&(_67e.firstChild)&&("P"==_67e.firstChild.tagName)&&(_67e.childNodes.length==1)&&(_67e.innerHTML.substring(0,3).toLowerCase()=="<p>")){
Telerik.Web.UI.Editor.Utils.removeNode(_67e.firstChild);
}
}else{
if(_67e&&(_67e.childNodes.length==1)&&(_67e.firstChild.tagName)&&("br"==_67e.firstChild.tagName.toLowerCase())){
_67e.innerHTML="";
}
}
return _67d;
}};
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(_67f){
var re=new RegExp("(<p[^>]*>)(<\\/p>)","ig");
var _681=_67f.replace(re,"$1&nbsp;$2");
return _681;
}};
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(_682){
var _683=document.location.href.replace(/\?/gi,"\\?");
var re=new RegExp("(<A[^<>]*?(href)\\s*=\\s*['\"])("+_683+")(\\#[^'\"]*?['\"][^>]*?>)","ig");
var _685=_682.replace(re,"$1$4");
return _685;
}};
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(_686){
var _687=_686.replace(new RegExp("<b(\\s([^>])*?)?>","ig"),"<strong$1>");
_687=_687.replace(new RegExp("</b(\\s([^>])*?)?>","ig"),"</strong$1>");
_687=_687.replace(new RegExp("<i(\\s([^>])*?)?>","ig"),"<em$1>");
_687=_687.replace(new RegExp("</i(\\s([^>])*?)?>","ig"),"</em$1>");
return _687;
},getDesignContent:function(_688){
var _689=_688.replace(new RegExp("<strong(\\s([^>])*?)?>","ig"),"<b$1>");
_689=_689.replace(new RegExp("</strong(\\s([^>])*?)?>","ig"),"</b$1>");
_689=_689.replace(new RegExp("<em(\\s([^>])*?)?>","ig"),"<i$1>");
_689=_689.replace(new RegExp("</em(\\s([^>])*?)?>","ig"),"</i$1>");
return _689;
}};
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(_68a){
var self=this;
var _68c=function(_68d,_68e,_68f,_690,_691){
var _692=_691.indexOf("</head>",_690);
if(_692!=-1&&_691.indexOf("<body",_692)!=-1){
return _68d;
}else{
self.markerCounter++;
var _693="RadEditorStyleKeeper"+self.markerCounter;
var _694="<div id='"+_693+"' style='display:none;'>&nbsp;</div><"+_68e+" reoriginalpositionmarker='"+_693+"'"+_68f;
return _694;
}
};
var _695=new RegExp("<(link|style)([^>]*>)","gi");
var _696=_68a.replace(_695,_68c);
return _696;
}};
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(_697){
var _698=_697.getElementsByTagName("HEAD")[0];
var _699=true;
if(!_698){
_698=_697.ownerDocument.getElementsByTagName("HEAD")[0];
_699=false;
}
if(!_698){
return _697;
}
this._restoreElements(_698,_697,"STYLE");
this._restoreElements(_698,_697,"LINK");
var divs=_697.getElementsByTagName("DIV");
if(divs){
for(var j=divs.length-1;j>=0;j--){
var _69c=divs[j];
if(_69c.id.indexOf("RadEditorStyleKeeper")==0){
var _69d=_69c.parentNode;
_69d.removeChild(_69c);
}
}
}
divs=null;
if(_699){
this._removeElements(_698,"STYLE");
this._removeElements(_698,"LINK");
}
this._removeMarkerAttributes(_697,"STYLE");
this._removeMarkerAttributes(_697,"LINK");
return _697;
},_restoreElements:function(_69e,_69f,_6a0){
var _6a1;
_6a1=_69e.getElementsByTagName(_6a0);
this._divs=_69f.getElementsByTagName("DIV");
var i=0;
while(_6a1.length>0&&i<_6a1.length){
this._restoreStyle(_6a1[i++]);
}
},_restoreStyle:function(_6a3){
var _6a4=_6a3.getAttribute("reoriginalpositionmarker");
if(_6a4){
j=0;
var _6a5=null;
while(j<this._divs.length&&!_6a5){
if(this._divs[j].id==_6a4){
_6a5=this._divs[j];
}
j++;
}
if(_6a5){
var _6a6=_6a3.cloneNode(true);
_6a6.removeAttribute("reoriginalpositionmarker");
var _6a7=_6a5.parentNode;
_6a7.replaceChild(_6a6,_6a5);
return true;
}
}
return false;
},_removeElements:function(_6a8,_6a9){
var _6aa=_6a8.getElementsByTagName(_6a9);
if(_6aa){
for(var j=_6aa.length-1;j>=0;j--){
var _6ac=_6aa[j];
if(null!=_6ac.getAttribute("reoriginalpositionmarker")){
var _6ad=_6ac.parentNode;
_6ad.removeChild(_6ac);
}
}
_6aa=null;
}
},_removeMarkerAttributes:function(_6ae,_6af){
styles=_6ae.getElementsByTagName(_6af);
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(_6b1){
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=_6b1?_6b1:"FlashManager.gif";
};
Telerik.Web.UI.Editor.MozillaKeepFlashString.prototype={getDesignContent:function(_6b2){
var _6b3=this._flashImageSrc;
var _6b4=function(_6b5,gr1,gr2,gr3,_6b9,str){
var _6bb=new Sys.StringBuilder("<img isflash=\"true\" ");
_6bb.append(gr1.replace(/\ssrc=/gi,String.format(" src=\"{0}\" flashSrc=",_6b3)));
_6bb.append(" />");
return _6bb.toString();
};
var _6bc=new RegExp("<embed([^>]+)>?","ig");
var _6bd=_6b2.replace(_6bc,_6b4);
_6bd=_6bd.replace(/<\/embed>/ig,"");
return _6bd;
}};
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(_6be){
var _6bf=_6be.getElementsByTagName("IMG");
for(var i=0;i<_6bf.length;i++){
var _6c1=_6bf[i];
var _6c2=_6c1.getAttribute("isflash");
if(_6c2!=null){
var _6c3=_6c1.getAttribute("flashSrc");
var _6c4=Telerik.Web.UI.Editor.Utils.getOuterHtml(_6c1);
_6c4=_6c4.replace(/<img/gi,"<embed");
var oDiv=_6c1.ownerDocument.createElement("DIV");
oDiv.innerHTML=_6c4;
newNode=oDiv.firstChild;
if(_6c3){
newNode.src=_6c3;
if($telerik.isSafari){
newNode.setAttribute("src",_6c3);
}
}
newNode.removeAttribute("flashSrc");
newNode.removeAttribute("isflash");
var _6c6=_6c1.parentNode;
_6c6.insertBefore(newNode,_6c1);
_6c6.removeChild(_6c1);
i--;
}
}
return _6be;
}};
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(_6c7){
var html=_6c7;
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(_6ca){
var _6cb=_6ca.ownerDocument;
var _6cc=_6cb.createElement("SPAN");
var span,font,_6cf;
var _6d0=_6ca.getElementsByTagName("FONT");
while(_6d0.length>0){
font=_6d0[0];
_6cf=font.parentNode;
span=_6cc.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);
}
_6cf.replaceChild(span,font);
_6d0=_6ca.getElementsByTagName("FONT");
}
return _6ca;
},getDesignContent:function(_6d2){
var _6d3=_6d2.ownerDocument;
var _6d4=_6d3.createElement("FONT");
var span,font,_6d7;
var _6d8=_6d2.getElementsByTagName("SPAN");
while(_6d8.length>0){
span=_6d8[0];
_6d7=span.parentNode;
font=_6d4.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 _6da=null;
if(-1!=span.style.fontSize.indexOf("px")){
_6da=this._fontSizesRevPx[parseInt(span.style.fontSize)];
}
if(typeof (_6da)!="undefined"&&null!=_6da){
font.size=_6da+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);
}
_6d7.replaceChild(font,span);
_6d8=_6d2.getElementsByTagName("SPAN");
}
return _6d2;
},_fixColorValue:function(_6db){
if(_6db.toLowerCase().indexOf("rgb")!=-1){
var _6dc="#";
var _6dd=function(val){
var _6df=parseInt(val,10).toString(16);
_6dc=_6dc+(_6df.length==1?"0"+_6df:_6df);
return val;
};
_6db=_6db.replace(/(\d+)/gi,_6dd);
_6dd=null;
return _6dc;
}else{
return _6db;
}
},_removeElementStyleAttribute:function(_6e0,_6e1){
if(_6e0.style&&_6e0.style[_6e1]){
if(_6e0.style.removeAttribute){
_6e0.style.removeAttribute(_6e1);
}else{
if(_6e0.style.removeProperty){
_6e1=_6e1.replace(/([A-Z])/g,"-$1").toLowerCase();
_6e0.style.removeProperty(_6e1);
}
}
if(_6e0.style[_6e1]){
_6e0.style[_6e1]=null;
}
if(_6e0.style.cssText){
}else{
_6e0.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(_6e2,_6e3){
var _6e4=_6e2.getElementsByTagName(_6e3);
if(!_6e4){
_6e4=_6e2.ownerDocument.getElementsByTagName(_6e3);
}
return _6e4;
},getHtmlContent:function(_6e5){
var _6e6=_6e5;
var tags=_6e6.getElementsByTagName("body");
var _6e8=tags.length;
for(i=0;i<_6e8;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
}
var tags=_6e6.getElementsByTagName("p");
var _6e8=tags.length;
for(i=0;i<_6e8;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
var tags=_6e6.getElementsByTagName("div");
var _6e8=tags.length;
for(i=0;i<_6e8;i++){
this.convertAttribute(tags[i],"align","textAlign");
}
tags=_6e6.getElementsByTagName("table");
_6e8=tags.length;
for(i=0;i<_6e8;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
}
tags=_6e6.getElementsByTagName("td");
_6e8=tags.length;
for(i=0;i<_6e8;i++){
var obj=tags[i];
this.convertAttribute(obj,"bgColor","backgroundColor");
this.convertAttribute(obj,"background","backgroundImage");
this.convertAttribute(obj,"borderColor","borderColor");
this.convertAttribute(obj,"width","width");
this.convertAttribute(obj,"height","height");
this.convertAttribute(obj,"noWrap","whiteSpace");
}
tags=_6e6.getElementsByTagName("img");
_6e8=tags.length;
for(i=0;i<_6e8;i++){
var obj=tags[i];
this.convertImgAlignAttribute(obj);
var _6ea=new Array("marginLeft","marginRight");
this.convertAttribute(obj,"hspace",_6ea);
_6ea=new Array("marginTop","marginBottom");
this.convertAttribute(obj,"vspace",_6ea);
this.convertBorderAttribute(obj);
}
tags=_6e6.getElementsByTagName("ul");
_6e8=tags.length;
for(i=0;i<_6e8;i++){
this.convertTypeAttribute(tags[i]);
}
tags=_6e6.getElementsByTagName("ol");
_6e8=tags.length;
for(i=0;i<_6e8;i++){
this.convertTypeAttribute(tags[i]);
}
return _6e6;
},getDesignContent:function(_6eb){
var _6ec=_6eb;
var tags=_6ec.getElementsByTagName("p");
var _6ee=tags.length;
for(i=0;i<_6ee;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6ec.getElementsByTagName("div");
_6ee=tags.length;
for(i=0;i<_6ee;i++){
this.convertCSSProperty(tags[i],"align","textAlign");
}
tags=_6ec.getElementsByTagName("img");
_6ee=tags.length;
for(i=0;i<_6ee;i++){
var obj=tags[i];
this.convertBorderCSS(obj);
}
return _6ec;
},convertAttribute:function(obj,_6f1,_6f2){
var _6f3=obj.getAttribute(_6f1);
var _6f4=_6f3;
if(_6f1=="background"){
_6f3=obj.getAttribute(_6f1,2);
_6f4="url("+_6f3+")";
}else{
if(_6f1=="width"||_6f1=="height"||_6f1=="vspace"||_6f1=="hspace"){
if(!(typeof (_6f4)=="string"&&_6f4.match("%"))){
_6f4=parseInt(_6f4)+"px";
}
}else{
if(_6f1=="noWrap"){
_6f3=obj.noWrap;
_6f4="nowrap";
}
}
}
if(_6f3){
if(typeof (_6f2)=="object"){
var _6f5=_6f2.length;
for(var i=0;i<_6f5;i++){
pValue=obj.style[_6f2[i]];
if(!pValue){
obj.style[_6f2[i]]=_6f4;
}
}
}else{
pValue=obj.style[_6f2];
if(!pValue){
obj.style[_6f2]=_6f4;
}
}
obj.removeAttribute(_6f1);
}
},convertCSSProperty:function(obj,_6f8,_6f9){
var _6fa=obj.getAttribute(_6f8);
var _6fb=obj.style[_6f9];
var _6fc=_6fb;
if(_6f9=="backgroundImage"){
_6fc=_6fb.slice(4,_6fb.length-1);
}else{
if(_6f9=="width"||_6f9=="height"){
if(_6fb&&!_6fb.match("%")){
_6fc=parseInt(_6fb);
}
}else{
if(_6f9=="whiteSpace"){
_6fa=obj.noWrap;
_6fc="nowrap";
}else{
if(_6f8=="vspace"||_6f8=="hspace"){
var _6fd=_6f9.length;
for(var i=0;i<_6fd;i++){
if(i==0){
_6fb=obj.style[_6f9[i]];
_6fc=parseInt(_6fb);
}else{
if(_6fb!=obj.style[_6f9[i]]){
_6fb=false;
break;
}
}
}
}
}
}
}
if(_6fb&&!_6fa){
obj.setAttribute(_6f8,_6fc);
if(typeof (_6f9)=="object"){
_6fd=_6f9.length;
for(var i=0;i<_6fd;i++){
obj.style[_6f9[i]]="";
}
}else{
obj.style[_6f9]="";
}
}
},convertImgAlignAttribute:function(obj){
var _700=obj.getAttribute("align");
var _701=($telerik.isIE)?"styleFloat":"cssFloat";
if(_700){
_700=_700.toLowerCase();
obj.style.verticalAlign="";
obj.style[_701]="";
switch(_700){
case "left":
obj.style[_701]="left";
break;
case "right":
obj.style[_701]="right";
break;
case "bottom":
case "baseline":
case "absbottom":
obj.style[_701]="";
obj.style.verticalAlign="text-bottom";
break;
case "middle":
case "absmiddle":
obj.style[_701]="";
obj.style.verticalAlign="middle";
break;
case "top":
case "texttop":
obj.style[_701]="";
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 _706=obj.getAttribute("type");
if(t&&!_706){
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="solid";
}
obj.removeAttribute("border");
}
},convertBorderCSS:function(obj){
var b=parseInt(obj.style.borderWidth);
var _70b=obj.getAttribute("border");
if(b&&obj.style.borderStyle.match("solid")&&(!_70b||_70b==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(_70c){
if(!_70c){
return "";
}
var sb=new Sys.StringBuilder("");
this._appendNodeXhtml(_70c,sb);
return sb.toString();
},_convertAttribute:function(s){
return String(s).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
},_getAttributeValue:function(_70f,_710,sb){
var name=_70f.nodeName;
var _713=_70f.nodeValue;
if(name!="style"){
if($telerik.isIE&&(name=="type"||name=="value"||name=="selected")){
if(!_713){
return;
}
}else{
if(!_70f.specified){
if($telerik.isIE&&_713==""&&typeof (_710[name])=="string"&&_710[name]!=""){
_713=_710[name];
}else{
return;
}
}
}
if(!_713){
return;
}
if(!isNaN(_713)){
_713=_710.getAttribute(name);
}
if($telerik.isIE&&(name=="href"||name=="src")){
_713=_710.getAttribute(name,2);
}
sb.append(" "+(_70f.expando?name:name.toLowerCase())+"=\""+this._convertAttribute(_713)+"\"");
}else{
var _714=_710.style.cssText;
if(_714){
if($telerik.isFirefox){
var _715=Telerik.Web.UI.Editor.ConvertFontToSpanFilter.prototype._fixColorValue;
_714=_714.replace(/rgb *\( *\d+ *, *\d+ *, *\d+ *\)/gi,function(_716,_717,_718){
return _715(_716);
});
}
sb.append(" style=\""+this._convertAttribute(_714.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 _71e=node.getAttribute("href",2);
if(_71e){
_71e=_71e.replace("about:blank","");
_71e=_71e.replace("about:","");
_71e=_71e.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
sb.append(" href=\""+_71e+"\"");
node.removeAttribute("href",0);
}
}
try{
var _71f=node.attributes;
var l=_71f.length;
for(var i=0;i<l;i++){
this._getAttributeValue(_71f[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 _722="";
if(node.altHtml){
_722=node.altHtml;
}else{
_722=node.innerHTML;
}
if($telerik.isIE){
_722=_722.replace(/\soriginalAttribute="[^"]+"/gi,"");
_722=_722.replace(/\soriginalPath="[^"]+"/gi,"");
}
sb.append(_722);
sb.append("</object>");
break;
case "title":
case "style":
case "comment":
case "noscript":
var _722=node.innerHTML;
if($telerik.isIE&&_722.length==0){
_722=node.ownerDocument.title;
}
sb.append(">"+_722+"</"+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 _726=String(node.nodeValue);
var _727=node.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(_727=="style"||_727=="script")){
sb.append(_726);
}else{
_726=_726.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if($telerik.isFirefox){
_726=_726.replace(/[\u00a0]/g,"&nbsp;");
}
sb.append(_726);
}
},_appendCDataNode:function(node,sb){
sb.append("<![CDA"+"TA[\n"+node.nodeValue+"\n]"+"]>");
},_appendCommentNode:function(node,sb){
var _72c=node.nodeValue;
if(!_72c&&node.text){
_72c=node.text;
}else{
_72c="<!--"+_72c+"-->";
}
sb.append(_72c);
},_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 _72f="P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION";
var _730="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var _731=_730+"|DL|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+_72f+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+_72f+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+_730+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+_731+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+_731+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={getHtmlContent:function(html){
var _733=html.trim();
if(_733.indexOf("<body")==0){
_733=_733.substring(_733.indexOf(">")+1,_733.length-7);
}
this._protectedData=[];
var self=this;
var _735=function(_736,_737,_738,_739,_73a,_73b){
Array.add(self._protectedData,_738);
return _737+"RADEDITORFORMATTED_"+self._protectedData.length+_739;
};
_733=_733.replace(this._ignoreTags,_735);
var _73c="$&";
if($telerik.isSafari2){
_73c="$0";
}
_733=_733.replace(this._tagsNLBefore,"\n"+_73c);
_733=_733.replace(this._tagsNLAfter,_73c+"\n");
_733=_733.replace(this._tagsNLNoCloseAfter,_73c+"\n");
_733=_733.replace(this._tagsNLBeforeAndAfter,"\n"+_73c+"\n");
var _73d=_733.split(this._shrinkNL);
var _73e=new Sys.StringBuilder("");
var _73f="";
for(var i=0;i<_73d.length;i++){
var line=_73d[i];
if(line.length==0){
continue;
}
if(this._tagsDecIndent.test(line)){
if(_73f.length>this._indentPattern.length){
_73f=_73f.substring(this._indentPattern.length);
}else{
_73f="";
}
}
_73e.append(_73f);
_73e.append(line);
_73e.append("\n");
if(this._tagsIncIndent.test(line)){
_73f+=this._indentPattern;
}
}
_733=_73e.toString();
for(var i=0;i<this._protectedData.length;i++){
var _742=new RegExp("RADEDITORFORMATTED_"+(i+1));
var _743=this._protectedData[i].replace(/\$/gi,"$$$$");
_733=_733.replace(_742,_743);
}
return _733;
}};
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(_744){
this._updateElements(_744,"A","href");
this._updateElements(_744,"AREA","href");
this._updateElements(_744,"IMG","src");
this._updateElements(_744,"EMBED","src");
return _744;
},_getElements:function(_745,_746){
var _747=_745.getElementsByTagName(_746);
if(!_747){
_747=_745.ownerDocument.getElementsByTagName(_746);
}
return _747;
},_updateElements:function(_748,_749,_74a){
var _74b=_748.ownerDocument.createElement("div");
var _74c=this._getElements(_748,_749);
if(_74c){
for(var i=0;i<_74c.length;i++){
var _74e=_74c[i].getAttribute(_74a,2);
if("href"==_74a&&_74e){
_74b.innerHTML="<a href=\""+_74e.replace(/\"/gi,"%22")+"\">test</a>";
if($telerik.isIE){
var _74f=_74c[i].innerHTML;
}
_74c[i].setAttribute("href",_74b.childNodes[0].href);
if($telerik.isIE){
if((_74f.indexOf("www.")==0&&_74c[i].innerHTML.match("[a-z]+://"))||(_74f.indexOf("mailto:")==-1&&_74c[i].innerHTML.match("mailto:"))){
_74c[i].innerHTML=_74f;
}
}
}else{
if("src"==_74a&&_74e){
_74b.innerHTML="<img src=\""+_74e.replace(/\"/gi,"%22")+"\" />";
_74c[i].setAttribute("src",_74b.childNodes[0].src);
}
}
}
}
_74b.innerHTML="";
_74b=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(_750){
this._enableXhtmlFilter=_750;
},add:function(_751){
Array.add(this._filters,_751);
},addAt:function(_752,_753){
Array.insert(this._filters,_753,_752);
},remove:function(_754){
Array.remove(this._filters,_754);
},removeAt:function(_755){
Array.removeAt(this._filters,_755);
},getFilterAt:function(_756){
return this._filters[_756];
},getFilterByName:function(name){
for(var i=0;i<this._filters.length;i++){
var _759=this._filters[i];
if(_759&&name==_759.get_name()){
return _759;
}
}
},getDesignContent:function(_75a){
var _75b=_75a;
for(var i=0;i<this._filters.length;i++){
var _75d=this._filters[i];
if((!_75d.get_isDom())&&(false!=_75d.get_enabled())&&_75d.getDesignContent){
try{
_75b=_75d.getDesignContent(_75b);
}
catch(exc){
alert("Error while executing filter "+_75d.get_name()+" - "+exc.toString());
}
}
}
return _75b;
},getDesignContentDom:function(_75e){
for(var i=0;i<this._filters.length;i++){
var _760=this._filters[i];
if((_760.get_isDom())&&(false!=_760.get_enabled())&&_760.getDesignContent){
try{
_75e=_760.getDesignContent(_75e);
}
catch(exc){
alert("Error while executing filter "+_760.get_name()+" - "+exc.toString());
}
}
}
return _75e;
},getHtmlContent:function(_761){
for(var i=0;i<this._filters.length;i++){
var _763=this._filters[i];
if((_763.get_isDom())&&(false!=_763.get_enabled())&&_763.getHtmlContent){
try{
_761=_763.getHtmlContent(_761);
}
catch(exc){
alert("Error while executing filter "+_763.get_name()+" - "+exc.toString());
}
}
}
var _764;
if(this.get_enableXhtmlFilter()){
try{
_764=this._convertToXhtmlFilter.getHtmlContent(_761);
}
catch(exc){
alert("Error while executing filter XHTML - "+exc.toString());
}
}else{
_764=$telerik.getOuterHtml(_761);
}
_764=_764.replace(/<body\s*\/>/i,"<body></body>").trim();
for(var i=0;i<this._filters.length;i++){
var _763=this._filters[i];
if((!_763.get_isDom())&&(false!=_763.get_enabled())&&_763.getHtmlContent){
try{
_764=_763.getHtmlContent(_764);
}
catch(exc){
alert("Error while executing filter "+_763.get_name()+" - "+exc.toString());
}
}
}
return _764;
}};
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(_765){
this.Window=_765;
this.Document=_765.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 _766=this.Document.selection.createRange();
if(_766.length){
this.SourceIndex=_766.item(0).sourceIndex;
}else{
this.StartBookmark=_766.getBookmark();
}
},restore:function(_767){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.Document.body,this.HtmlText);
this.select(_767);
},select:function(_768){
if(null!=this.SourceIndex){
var _769=this.Document.body.createControlRange();
_769.addElement(this.Document.all(this.SourceIndex));
_769.select();
}else{
if(null!=this.StartBookmark){
var _769=this.Document.body.createTextRange();
_769.moveToBookmark(this.StartBookmark);
_769.select();
if(true==_768&&_769.collapse){
_769.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(_76a){
if(_76a){
return {anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_76a.anchorNode),anchorOffset:_76a.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_76a.focusNode),focusOffset:_76a.focusOffset,isCollapsed:_76a.isCollapsed};
}else{
return {};
}
},_moveToBookmark:function(_76b,_76c){
var _76d=_76c.anchorNodeBookmark.select();
var _76e=_76c.focusNodeBookmark.select();
_76b.collapse(_76d,_76c.anchorOffset);
if(!_76c.isCollapsed){
_76b.extend(_76e,_76c.focusOffset);
}
}};
}
Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(_76f,node){
this.Window=_76f;
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(_772,node){
var n,res;
for(var i=0;i<_772.childNodes.length;i++){
n=_772.childNodes[i];
res=this._findNodePath(n,node);
if(""!=res){
return ""+i+","+res;
}
if(n==node){
return ""+i;
}
}
return "";
},_findNode:function(_777,_778){
var arr=_778.split(",");
for(var i=0;i<arr.length;i++){
_777=_777.childNodes[arr[i]];
}
return _777;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Selection=function(_77b){
this._window=_77b;
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(_77c,_77d){
_77d=(_77d==true);
if($telerik.isIE){
return this._executeIE(_77c,_77d);
}else{
return this._executeMozilla(_77c,_77d);
}
},_executeIE:function(_77e,_77f){
var _780=this._window.document;
var _781=_780.selection;
if(_781.type.toLowerCase()!="none"){
_781.createRange().execCommand("Delete");
}
if(_781.type.toLowerCase()!="none"){
_780.execCommand("Delete");
}
_780.body.setActive();
selRange=_781.createRange();
if(selRange&&selRange.length){
var _782=selRange.item(0);
if(_782&&_782.tagName=="BODY"){
var _783=_782.getElementsByTagName("FORM")[0];
if(_783){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_783,_783.innerHTML+_77e);
}
}
}else{
var _784=selRange.duplicate();
_784.collapse(true);
_77e=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(_77e);
selRange.pasteHTML(_77e);
Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(selRange.parentElement());
if(_77f){
_784.setEndPoint("EndToEnd",selRange);
_784.select();
}
}
return true;
},_executeMozilla:function(_785,_786){
var oDoc=this._window.document;
var _788=oDoc.createElement("SPAN");
_788.innerHTML=_785;
var _789="radetempnode";
if(this.isOpera){
_788.setAttribute("id",_789);
}
this._insertNodeAtSelection(this._window,_788,true);
if(this.isOpera){
var _78a=oDoc.createRange();
var _78b=this._window.getSelection();
var span=oDoc.getElementById(_789);
_78a.selectNodeContents(span);
var _78d=_78a.extractContents();
_78a.selectNode(span);
var _78e=_78a.extractContents();
_78a.insertNode(_78d);
_78b.addRange(_78a);
return true;
}else{
if(!this.isSafari){
var _78a=oDoc.createRange();
_78a.selectNodeContents(_788);
var _78d=_78a.extractContents();
_78a.selectNode(_788);
_78a.deleteContents();
this._insertNodeAtSelection(this._window,_78d,_786);
}
}
return true;
},_insertNodeAtSelection:function(win,_790,_791){
var _792=win.getSelection();
if(_792.rangeCount==0){
win.document.body.appendChild(_790);
return;
}
var _793=null;
if(_792.getRangeAt){
_793=_792.getRangeAt(0);
}else{
_793=win.document.createRange();
_793.setStart(_792.anchorNode,_792.anchorOffset);
_793.setEnd(_792.focusNode,_792.focusOffset);
}
if(_792.removeAllRanges){
_792.removeAllRanges();
}
_793.deleteContents();
var _794=$telerik.isSafari&&!$telerik.isSafari3?_792.baseNode:_793.startContainer;
var _795=$telerik.isSafari&&!$telerik.isSafari3?_792.baseOffset:_793.startOffset;
if($telerik.isSafari&&null==_794){
_794=win.document.body;
}
_793=win.document.createRange();
if((_790.nodeType==3)&&(_794.nodeType==3)){
_794.insertData(_795,_790.nodeValue);
_793.setEnd(_794,_795+_790.length);
if(_791){
_793.setStart(_794,_795);
}else{
_793.setStart(_794,_795+_790.length);
}
}else{
var _796;
if(_794.nodeType==3){
var _797=_794;
_794=_797.parentNode;
var _798=_797.nodeValue;
var _799=_798.substr(0,_795);
var _79a=_798.substr(_795);
var _79b=win.document.createTextNode(_799);
var _796=win.document.createTextNode(_79a);
_794.insertBefore(_796,_797);
_794.insertBefore(_790,_796);
try{
_794.insertBefore(_79b,_790);
}
catch(exc){
}
_794.removeChild(_797);
}else{
if(_794.childNodes.length>0){
_796=_794.childNodes[_795];
_794.insertBefore(_790,_796);
}else{
if(_794.tagName!="BODY"){
_794=_794.parentNode;
}
_794.appendChild(_790);
}
}
try{
if(_791){
_793.setStart(_790,0);
_793.setEnd(_796,0);
}else{
_793.setStartBefore(_796);
_793.setEndBefore(_796);
}
}
catch(exc){
}
}
try{
_792.addRange(_793);
}
catch(exc){
}
},selectRange:function(_79c){
if(!_79c){
return;
}
var _79d=this._window;
if(_79c.select){
_79c.select();
}else{
if(_79d.getSelection){
var _79e=_79d.getSelection();
if(_79e.removeAllRanges){
_79e.removeAllRanges();
_79e.addRange(_79c);
}else{
var base=_79c.baseNode;
if(null==base){
base=_79d.document.body;
}
var _7a0=_79c.extentNode;
if(null==_7a0){
_7a0=_79d.document.body;
}
_79e.setBaseAndExtent(base,_79c.startOffset,_7a0,_79c.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 _7a1=this._window.getSelection();
if(!_7a1||_7a1.rangeCount<1){
return null;
}
var rng=null;
if(_7a1.getRangeAt){
rng=_7a1.getRangeAt(0);
}else{
rng=this._window.document.createRange();
rng.setStart(_7a1.anchorNode,_7a1.anchorOffset);
rng.setEnd(_7a1.focusNode,_7a1.focusOffset);
}
return rng;
}
}
},getParentElement:function(){
var rng=this.getRange();
if(!rng){
return null;
}
if(rng.commonAncestorContainer){
var _7a4=this._window.getSelection();
var _7a5=rng.startContainer?rng.startContainer:_7a4.baseNode;
var _7a6=rng.endContainer?rng.endContainer:_7a4.extentNode;
var _7a7=rng.startOffset!=null?rng.startOffset:_7a4.baseOffset;
var _7a8=rng.endOffset!=null?rng.endOffset:_7a4.extentOffset;
if(_7a5==_7a6&&(_7a8-_7a7)==1){
return _7a4.anchorNode.childNodes[_7a4.anchorOffset];
}else{
if(!rng.commonAncestorContainer.tagName){
if(this._window.document==rng.commonAncestorContainer&&_7a4.baseNode){
return _7a4.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 _7aa=oSel.focusNode;
if(!_7aa||_7aa.nodeType==1){
return false;
}
return (_7aa.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 _7ad=this._window.getSelection();
var rng=null;
if(null==_7ad){
return "";
}
if(_7ad.getRangeAt&&typeof (_7ad.rangeCount)!="undefined"&&_7ad.rangeCount==0){
return "";
}
if(_7ad.getRangeAt){
rng=_7ad.getRangeAt(0);
var _7ae=this._window.document.createElement("div");
var _7af=rng.cloneContents();
if(_7af){
_7ae.appendChild(_7af);
return _7ae.innerHTML;
}else{
return "";
}
}else{
return _7ad;
}
}else{
return "";
}
}
},collapse:function(_7b0){
_7b0=(_7b0==true);
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.collapse){
rng.collapse(_7b0);
rng.select();
}
}else{
if(this._window.getSelection){
var _7b2=this._window.getSelection();
if(!_7b2.isCollapsed){
if(_7b0){
_7b2.collapseToStart();
}else{
_7b2.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(_7b3,_7b4){
var rs=new Telerik.Web.UI.EditorShortCut(_7b3,_7b4);
rs.HashValue=this._getShortCutHashValue(rs);
this._shortcuts[rs.HashValue]=rs;
},removeShortCut:function(_7b6){
var _7b7=this._findByName(_7b6);
if(_7b7){
this._shortcuts[_7b7.HashValue]=null;
}
},setShortCut:function(_7b8,_7b9){
this.removeShortCut(_7b8);
this.addShortCut(_7b8,_7b9);
},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(_7bb,_7bc,_7bd,_7be,_7bf,_7c0,_7c1){
var _7c2=this._getHashValue(_7bb,_7bc,_7bd,_7be,_7bf,_7c0,_7c1);
return this._shortcuts[_7c2];
},_getHashValue:function(_7c3,_7c4,_7c5,_7c6,_7c7,_7c8,_7c9){
var _7ca=_7c3&65535;
var _7cb=0;
_7cb|=(_7c4?(1<<0):0);
_7cb|=(_7c6?(1<<2):0);
_7cb|=(_7c8?(1<<4):0);
_7ca|=(_7cb<<16);
return _7ca;
},_getShortCutHashValue:function(_7cc){
return this._getHashValue(_7cc.KeyCode,_7cc.CtrlKey,_7cc.LeftCtrlKey,_7cc.ShiftKey,_7cc.LeftShiftKey,_7cc.AltKey,_7cc.LeftAltKey);
},_findByName:function(_7cd){
var _7ce;
for(var _7cf in this._shortcuts){
_7ce=this._shortcuts[_7cf];
if(null!=_7ce&&_7ce._name==_7cd){
return _7ce;
}
}
return null;
}};
Telerik.Web.UI.EditorShortCut=function(_7d0,_7d1){
this._name=_7d0;
this.setShortCut(_7d1);
};
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(_7d2){
this._name=_7d2;
},setShortCut:function(_7d3){
this._parseShortcutString(_7d3);
},_parseShortcutString:function(_7d4){
if("string"==typeof (_7d4)){
this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
_7d4=_7d4.replace(/\s*/gi,"");
_7d4=_7d4.replace(/\+\+/gi,"+PLUS");
var _7d5=_7d4.split("+");
var _7d6="";
for(var i=0;i<_7d5.length;i++){
_7d6=_7d5[i].toUpperCase();
switch(_7d6){
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=_7d6.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(_7d8,_7d9,_7da){
if(typeof (this._controls[_7d8])=="undefined"){
this._controls[_7d8]={};
}
if(typeof (this._controls[_7d8][_7d9])=="undefined"){
this._controls[_7d8][_7d9]={};
}
var _7db=this._controls[_7d8][_7d9];
for(var _7dc in _7da){
if(typeof (_7da[_7dc])=="string"){
_7db[_7dc]=_7da[_7dc];
}
}
return _7db;
}};
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(_7dd){
Telerik.Web.UI.RadEditor.initializeBase(this,[_7dd]);
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(_7de){
this.get_events().addHandler("spellCheckLoaded",_7de);
},remove_spellCheckLoaded:function(_7df){
this.get_events().removeHandler("spellCheckLoaded",_7df);
},get_ajaxSpellCheck:function(){
return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(_7e0){
this._ajaxSpellCheck=_7e0;
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(_7e2){
this._spellAllowAddCustom=_7e2;
},get_spellCheckJSON:function(){
return this._spellCheckJSON;
},set_spellCheckJSON:function(_7e3){
this._spellCheckJSON=_7e3;
},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(_7e5,args){
},raiseEvent:function(_7e7,args){
if(_7e7!="selectionChange"||this.get_mode()==Telerik.Web.UI.EditModes.Design){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"raiseEvent",[_7e7,args]);
}
},_initializeToolProvider:function(){
var _7e9=this;
var _7ea=_7e9.get_toolProviderID();
if(_7ea&&$find(_7ea)){
var _7eb=$find(_7ea);
var _7ec=_7eb.get_dialogOpener();
_7e9.set_dialogOpener(_7ec);
var _7ed=_7eb.get_contextMenusJSON();
if(_7ed&&_7ed.concat){
_7e9.set_contextMenusJSON(_7ed.concat([]));
}
var _7ee=_7eb.get_modulesJSON();
if(_7ee&&_7ee.concat){
_7e9.set_modulesJSON(_7ee.concat([]));
}
var root=this.get_toolContainer();
root.innerHTML="";
this._toolJSON=[];
var html=_7eb.get_toolHTML();
root.innerHTML=html;
var json=_7eb.get_toolJSON().concat([]);
this.set_toolJSON(json);
if(_7eb.get_spellCheckJSON){
_7e9.set_spellCheckJSON(_7eb.get_spellCheckJSON());
}
if(_7eb.get_ajaxSpellCheckScriptReference){
var ref=_7eb.get_ajaxSpellCheckScriptReference();
if(ref){
_7e9.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 _7f4=this;
window.setTimeout(function(){
if($telerik.isIE){
var area=_7f4.get_contentArea();
if(!area){
return;
}
try{
var _7f6=Telerik.Web.UI.Editor.Utils.storeBrowserPosition();
var r=area.createTextRange();
var _7f8=document.body.createTextRange();
if(_7f6&&_7f6.y>0){
_7f8.moveToElementText(_7f4.get_contentAreaElement());
}else{
_7f8.moveStart("textedit",_7f8.text.length);
}
_7f8.collapse(true);
_7f8.select();
if(_7f6&&_7f6.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 _7f9=this.get_mainTable();
this._originalHeight=_7f9.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
this._createTools();
this._makeResizeable(true);
var _7fa=$get(this.get_id()+"ContentHiddenTextarea");
if(_7fa){
_7fa.setAttribute("id",this.get_id());
this._contentHiddenTextarea=_7fa;
}
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 _7fb=$get(this.get_id()+"Module");
_7fb.style.display="none";
var _7fc=this;
window.setTimeout(function(){
_7fc._modulesManager.initialize();
_7fb.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 _7fe=this.get_element().getAttribute("accessKey");
if(_7fe){
this.get_element().removeAttribute("accessKey");
var _7ff=document.createElement("input");
_7ff.setAttribute("name",this.get_id()+"EditorAccessKey");
_7ff.setAttribute("type","text");
_7ff.setAttribute("id",this.get_id()+"EditorAccessKey");
_7ff.setAttribute("accessKey",_7fe);
this._accessKeyTextbox=_7ff;
$addHandlers(this._accessKeyTextbox,{"focus":this.setFocus},this);
var _800=document.createElement("div");
_800.style.width="0px";
_800.style.height="0px";
_800.style.overflow="hidden";
_800.appendChild(this._accessKeyTextbox);
this.get_element().appendChild(_800);
}
},_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 _801=this;
this.attachEventHandler("keydown",function(e){
if(!_801._isKeyUpButton(e)){
_801._resizeContentArea(e);
}
});
this.attachEventHandler("keyup",function(e){
if(_801._isKeyUpButton(e)||(e.keyCode==13&&!_801.isIE)){
_801._resizeContentArea(e);
}
});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
},_isKeyUpButton:function(e){
var _805=e.keyCode;
if(_805==8||_805==46){
return true;
}
return false;
},_getCurrentFontSize:function(){
var o=this.getSelectedElement();
var _807=parseInt($telerik.getCurrentStyle(o,"fontSize"));
return _807;
},_resizeContentArea:function(e){
var body=this.isIE?this._document.body:this._document.documentElement;
var _80a=this._contentAreaElement;
var _80b=_80a.parentNode;
var _80c=this._initialContentHeight;
var _80d=_80a.offsetHeight;
var _80e=body.scrollHeight+(e&&e.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(_80e==_80d){
return;
}
if((_80c==_80d)&&(_80e<=_80c)){
return;
}
var _80f=(_80e>_80c)?_80e:_80c;
_80a.style.height=_80f+"px";
if(_80e>_80d){
_80b.style.height=parseInt(_80e)+"px";
}else{
var _810=this.get_element();
var _811=_810.offsetHeight-(_80b.offsetHeight-_80a.offsetHeight);
if(_80a.style.height!="100%"){
_80b.style.height="";
this._updateEditorSize(_811);
}
return;
}
this._updateEditorSize(null,true);
},_makeResizeable:function(_812){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_812){
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 _813={se:this._bottomResizer};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._rootElement,_813,this._tableElement);
},_getInvisibleParent:function(){
return Telerik.Web.UI.Editor.Utils.getInvisibleParent(this.get_element());
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixIEVisibilityProblems:function(_814){
if(!this.isIE){
return;
}
if(_814){
var _815=this._getInvisibleParent();
if(_815){
this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=_815;
$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(_816){
if(this.isIE){
return;
}
if(_816){
var _817=this._getInvisibleParent();
if(_817){
this._invisibleParent=_817;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
_817.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 _819=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_819!="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 _81b=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_81b,"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 _81d=$telerik.isDescendantOrSelf(e.target,this.get_element());
if(_81d){
this.onParentNodeChanged();
}
},onParentNodeChanged:function(){
if(!$telerik.isIE){
var _81e=this.get_html(true);
var _81f=this.get_contentAreaElement();
this._contentWindow=_81f.contentWindow;
this._setContentAreaHtml(_81e,true);
this.set_editable(true);
}
},onResizeStart:function(){
this._resizeSelection=this.getSelection().getRange();
},onResizeEnd:function(){
if(!this.isIE){
return;
}
this.setActive();
if(this._resizeSelection){
var _820=this._resizeSelection.parentElement();
if(_820&&(this.get_document()==_820.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 _821=this.getSelection().getRange();
var _822=this.getSelectedElement();
if(_821!=null&&_822!=null&&_822.ownerDocument!=this.get_document()){
_821=null;
}
return _821;
},selectElement:function(_823,_824){
if(Telerik.Web.UI.Editor.Utils.selectElement(this.get_contentWindow(),_823)&&false!=_824){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},undo:function(_825){
this._commandsManager.undo(_825);
},redo:function(_826){
this._commandsManager.redo(_826);
},executeCommand:function(_827,_828,_829){
if(!_827.get_window()){
_827.set_window(this.get_contentWindow());
}
if(false!=_828&&!this.isOpera){
this.setFocus();
}
this._commandsManager.execute(_827,_829);
},executeBrowserCommand:function(_82a,_82b,_82c,_82d){
var _82e=this._localization[_82a];
this.executeCommand(new Telerik.Web.UI.Editor.BrowserCommand(_82e,this._contentWindow,_82a,_82c));
this.setActive();
this.setFocus();
if(true==_82d){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},createElement:function(_82f,_830,_831,sId,_833,_834){
var _835=this._document.createElement(_82f);
if(_830){
_835.style.width=_830;
}
if(_831){
_835.style.height=_831;
}
if(null!=sId){
_835.id=sId;
}
if(null!=_833){
_835.name=_833;
}
if(null!=_834){
_835.value=_834;
}
return _835;
},createRestorePoint:function(){
return new Telerik.Web.UI.Editor.RestorePoint(this._contentWindow);
},getToolState:function(_836){
if(_836=="Undo"){
return this.get_commandsManager().isUndoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
if(_836=="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[_836];
if(oCmd&&oCmd.getState){
return oCmd.getState(this._contentWindow);
}
}
}
},getToolValue:function(_838){
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_838];
if(oCmd&&oCmd.getValue){
return oCmd.getValue(this._contentWindow);
}else{
if(_838=="RealFontSize"){
var o=this.getSelectedElement();
if(o){
var _83b=null;
try{
_83b=$telerik.getCurrentStyle(o,"fontSize","");
}
catch(exc){
}
if(_83b){
var _83c=parseFloat(_83b);
if(_83c>parseInt(_83b)){
if(_83b.indexOf("px")>-1){
_83b=parseInt(_83b)+"px";
}
}
}
return _83b;
}
}
}
},_addFilters:function(){
var _83d=this.get_filtersManager();
var _83e=this.get_contentFilters();
var _83f=Telerik.Web.UI.EditorFilters;
_83d.clear();
var _840=_83e&_83f.ConvertToXhtml;
_83d.set_enableXhtmlFilter(_840);
if(_840){
_83d.add(new Telerik.Web.UI.Editor.CleanAttributesFilter());
}
if(_83e&_83f.RemoveScripts){
_83d.add(new Telerik.Web.UI.Editor.StripScriptsFilter());
}
if(_83e&_83f.EncodeScripts){
_83d.add(new Telerik.Web.UI.Editor.EncodeScriptsFilter());
}
if(_83e&_83f.FixUlBoldItalic){
_83d.add(new Telerik.Web.UI.Editor.FixUlBoldItalic());
}
_83d.add(new Telerik.Web.UI.Editor.FixNestedLists());
if(_83e&_83f.ConvertFontToSpan){
_83d.add(new Telerik.Web.UI.Editor.ConvertFontToSpanFilter());
}
if(_83e&_83f.OptimizeSpans){
_83d.add(new Telerik.Web.UI.Editor.OptimizeSpans());
}
if(_83e&_83f.FixEnclosingP){
_83d.add(new Telerik.Web.UI.Editor.FixEnclosingP());
}
if($telerik.isIE){
_83d.add(new Telerik.Web.UI.Editor.IEKeepObjectParamsFilter());
_83d.add(new Telerik.Web.UI.Editor.IEKeepCommentsFilter());
_83d.add(new Telerik.Web.UI.Editor.IEFixEmptyParagraphs());
if(_83e&_83f.IECleanAnchors){
_83d.add(new Telerik.Web.UI.Editor.IECleanAnchorsFilter());
}
}
if(!$telerik.isIE&&!$telerik.isOpera){
if(!$telerik.isSafari){
_83d.add(new Telerik.Web.UI.Editor.MozillaKeepFlashString(this.get_mozillaFlashOverlayImage()));
_83d.add(new Telerik.Web.UI.Editor.MozillaKeepFlash());
}
_83d.add(new Telerik.Web.UI.Editor.MozillaKeepStylesString());
_83d.add(new Telerik.Web.UI.Editor.MozillaKeepStylesDom());
if(_83e&_83f.MozEmStrong){
_83d.add(new Telerik.Web.UI.Editor.MozEmStrongFilter());
}
}
_83d.add(new Telerik.Web.UI.Editor.StripJunkFilter());
if(_83e&_83f.MakeUrlsAbsolute){
_83d.add(new Telerik.Web.UI.Editor.MakeUrlsAbsolute());
}
_83d.add(new Telerik.Web.UI.Editor.RemoveExtraBrakes());
if(_83e&_83f.IndentHTMLContent){
_83d.add(new Telerik.Web.UI.Editor.IndentHTMLContentFilter());
}
},addShortCut:function(_841,_842){
if(this._shortCutManager){
this._shortCutManager.addShortCut(_841,_842);
}
},removeShortCut:function(_843){
if(this._shortCutManager){
this._shortCutManager.removeShortCut(_843);
}
},setShortCut:function(_844,_845){
if(this._shortCutManager){
this._shortCutManager.setShortCut(_844,_845);
}
},_addDefaultShortCuts:function(){
var _846=[["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<_846.length;i++){
this.addShortCut(_846[i][0],_846[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(_848,_849){
if(_848.startsWith("on")){
_848=_848.replace("on","");
}
$telerik.addExternalHandler(this._document,_848,_849);
var _84a=this._contentAreaEventHandlers;
if(!_84a[_848]){
_84a[_848]=[];
}
var _84b=_84a[_848];
_84b[_84b.length]=_849;
},detachEventHandler:function(_84c,_84d){
if(_84c.startsWith("on")){
_84c=_84c.replace("on","");
}
$telerik.removeExternalHandler(this._document,_84c,_84d);
},_detachEvents:function(){
var _84e=this._contentAreaEventHandlers;
for(var _84f in _84e){
var _850=_84e[_84f];
if(_850.length!=null){
for(var i=0;i<_850.length;i++){
var _852=_850[i];
if(typeof (_852)=="function"){
try{
this.detachEventHandler(_84f,_852);
}
catch(e){
}
}
}
_850=[];
}
}
this._contentAreaEventHandlers={};
this._attachIEBodyHandlers(false);
},get_TopZone:function(){
return $get(this.get_id()+"Top");
},_createTools:function(){
if(!this._toolAdapter){
var _853=this.get_toolContainer();
var _854=eval(this._toolAdapterType);
this._toolAdapter=$create(_854,{"editor":this,"toolJSON":this.get_toolJSON()},{"toolClick":this._onToolClickDelegate},null,_853);
if(this.isIE){
if(this.get_toolbarMode()==Telerik.Web.UI.EditorToolbarMode.Default){
_853.style.overflow="";
}
this._updateEditorSize();
}
}
},_onToolClick:function(tool,args){
this.fire(tool.get_name(),args);
},getContextMenuByTagName:function(_857){
if(this._toolAdapter&&this._toolAdapter.getContextMenuByTagName){
return this._toolAdapter.getContextMenuByTagName(_857);
}
},getToolByName:function(_858){
if(this._toolAdapter){
return this._toolAdapter.getToolByName(_858);
}
return null;
},getLocalizedString:function(name,_85a){
if(!name){
return _85a;
}
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 _85d=this.get_contentArea();
if(_85d&&_85d.setActive){
_85d.setActive();
}
},set_visible:function(_85e){
var _85f=this.get_element();
if(_85f){
_85f.style.display=_85e?"":"none";
}
this.set_editable(_85e);
},enableEditing:function(_860,_861,_862){
var _863=this.get_toolAdapter();
var _864=Telerik.Web.UI.EditingOptions;
var _865=function(){
};
if(!_861){
_861=Telerik.Web.UI.EditingOptions.All;
}
this._editingOptions=_861;
this._optionalIgnoredTools=_862;
if(_861&_864.ContextMenus){
if(_863){
_863.enableContextMenus(_860);
}
}
if(_861&_864.EditModes){
if(!_860){
this._originalEditModeRef=this.set_mode;
this.set_mode=_865;
}else{
if(this._originalEditModeRef){
this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}
}
}
if(_861&_864.Tools){
if(_863){
if(!_860){
_863.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Disabled);
if(_862){
var _866=[];
for(var item in _862){
var tool=_863.getToolByName(item);
if(tool){
_866[_866.length]=tool;
}
}
_863.setToolState(_866);
}
this._originalSetToolStateRef=_863.setToolState;
_863.setToolState=_865;
}else{
_863.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}
}
}
if(_861&_864.Modules){
var _869=this._modulesManager;
if(_869){
_869.setModulesVisible(_860);
}
}
if(_861&_864.Typing){
if(!_860){
this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{
if(this._disableTypingDelegate){
this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}
}
}
if(_861&_861.Tab){
if(!_860){
this.removeShortCut("InsertTab");
}else{
this.setShortCut("InsertTab","TAB");
}
}
if(_860){
if(_863){
_863.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Off);
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},set_editable:function(_86a){
if($telerik.isIE||$telerik.isOpera){
var oEd=this;
window.setTimeout(function(){
try{
oEd._document.body.setAttribute("contentEditable",""+_86a);
oEd._document.execCommand("2D-Position",false,true);
}
catch(ev){
}
},0);
}else{
var oEd=this;
window.setTimeout(function(){
try{
oEd._document["designMode"]=_86a?"on":"off";
if(_86a){
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(_86c){
if(this.isIE){
this.get_document().body.setAttribute("contentEditable",""+_86c);
}
},showExternalDialog:function(url,_86e,_86f,_870,_871,_872,_873,_874,_875,_876,_877,_878){
var _879=this.getEditorSelectionRange();
var _87a=this;
var _87b=function(_87c,args){
window.setTimeout(function(){
if(_879!=null){
_87a.getSelection().selectRange(_879);
}
if(_871){
var _87e=_871(_87c,args);
if(false==_87e){
return;
}
_87a.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_87a.setFocus();
},50);
};
this.get_dialogOpener().openUrl(url,_86e,_86f,_870,_87b,_872,_873,_874,_875,_876,_877,_878);
},showDialog:function(_87f,_880,_881){
var _882=this.getEditorSelectionRange();
var _883=this;
var _884=function(_885,args){
window.setTimeout(function(){
if(_882!=null){
_883.getSelection().selectRange(_882);
}
if(_881){
var oRes=_881(_885,args);
if(false==oRes){
return;
}
_883.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_883.setFocus();
},50);
};
this.get_dialogOpener().open(_87f,_880,_884);
if(this.isIE){
var wnd=this.get_dialogOpener()._getDialogContainer(_87f);
if(!wnd||wnd._DRAG_ATTACHED){
return;
}
wnd._DRAG_ATTACHED=true;
wnd.add_dragEnd(function(){
if(_882!=null){
_883.getSelection().selectRange(_882);
}
});
}
},_getModeButtonsWrapper:function(){
return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(_889){
if(_889){
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 _88b=this.get_mode();
var _88c=Telerik.Web.UI.Editor.Utils.getElementParentByTag(e.target,"LI");
if(_88c){
var _88d=Telerik.Web.UI.EditModes;
var _88e=Sys.UI.DomElement;
var a=_88c.getElementsByTagName("A")[0];
if(_88e.containsCssClass(a,"rade_mode_html")){
_88b=_88d.Html;
}else{
if(_88e.containsCssClass(a,"rade_mode_design")){
_88b=_88d.Design;
}else{
_88b=_88d.Preview;
}
}
}
if(_88b!=this.get_mode()){
this.set_mode(_88b);
}
return $telerik.cancelRawEvent(e);
},_changeModeUI:function(mode){
var _891=Sys.UI.DomElement;
var _892=Telerik.Web.UI.EditModes;
var _893="rade_mode_";
switch(mode){
case _892.Html:
_893+="html";
break;
case _892.Design:
_893+="design";
break;
case _892.Preview:
_893+="preview";
break;
}
var _894=this._getModeButtonsWrapper();
var as=_894.getElementsByTagName("A");
for(var i=0;i<as.length;i++){
var a=as[i];
_891.removeCssClass(a,"rade_mode_selected");
if(_891.containsCssClass(a,_893)){
_891.addCssClass(a,"rade_mode_selected");
}
}
},_isEditModeEnabled:function(_898){
return _898&this._editModes?true:false;
},get_mode:function(){
return this._mode;
},set_mode:function(_899){
this._setEditableDelegate=Function.createDelegate(this,function(){
this.remove_editReady(this._setEditableDelegate);
var _89a=(this._mode==_89b.Design);
this.set_editable(_89a);
this.toggleEnhancedEdit(_89a);
this._setEditableDelegate=null;
});
this.add_editReady(this._setEditableDelegate);
var _89c=this._mode;
var _89b=Telerik.Web.UI.EditModes;
if(_89c==_89b.Html||_899==_89b.Html){
var html=this.get_html(true);
this._mode=_899;
this._showTextArea(this._mode==_89b.Html);
this.set_html(html);
}else{
this._mode=_899;
this._showTextArea(this._mode==_89b.Html);
}
this._changeModeUI(_899);
if(this._mode!=_89b.Preview){
this.setFocus();
if(this.isFirefox&&(!this._document||!this._document.body)){
}else{
this.set_editable(true);
}
if(this._mode==_89b.Design){
this.toggleEnhancedEdit(true);
}
}else{
this.set_editable(false);
this.toggleEnhancedEdit(false);
}
this.setFocus();
var _89e=this.get_id();
var _89f=this.get_mainTable();
var _8a0=_89f.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(_8a0);
},_getTextIframe:function(){
if(!this._textIframe){
var _8a1=this.get_contentAreaElement();
if(_8a1){
this._textIframe=_8a1.cloneNode(true);
this._textIframe.style.position="absolute";
var _8a2=this._textIframe.style;
_8a2.height="2px";
_8a2.width="2px";
_8a1.parentNode.appendChild(this._textIframe);
var doc=this._textIframe.contentWindow.document;
doc.designMode="off";
var _8a4=doc.open("text/html","replace");
var _8a5="<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 (_8a4)=="undefined"){
_8a4=doc;
}
_8a4.write(_8a5);
_8a4.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(_8a7){
var area=this._getTextIframe();
var _8a9=this.get_contentAreaElement();
if(_8a7){
if($telerik.isSafari){
_8a9.style.width="0px";
_8a9.style.height="0px";
}else{
_8a9.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){
_8a9.style.width="100%";
_8a9.style.height="100%";
}else{
_8a9.style.display="";
}
area.style.display="none";
}
},_setContentAsText:function(_8aa){
var area=this._getTextArea();
if(area){
area.value=_8aa;
}
},_getContentAsText:function(){
var area=this._getTextArea();
if(area&&area.value){
var _8ad=area.value;
return _8ad;
}
return "";
},set_html:function(_8ae,_8af,_8b0){
var _8b1=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_8b1.Html){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(_8af?_8af:"Set HTML",this.get_contentWindow());
this._setContentAreaHtml(_8ae);
this.executeCommand(cmd,_8b0);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}else{
this._setContentAsText(_8ae);
}
},get_html:function(_8b3){
var _8b4=null;
var _8b5="";
var mode=this.get_mode();
var _8b7=Telerik.Web.UI.EditModes;
if(mode==_8b7.Html){
return this._getContentAsText();
}else{
if(this.get_fullPage()){
if(this._document){
_8b4=this._document.getElementsByTagName("HTML")[0];
_8b4=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(_8b4);
var _8b8=this._getAllSheets(_8b4);
for(var i=0;i<_8b8.length;i++){
var _8ba=_8b8[i];
var _8bb=_8ba.getAttribute("id");
if(_8bb&&_8bb.indexOf("RADEDITORSTYLESHEET")==0){
_8ba.parentNode.removeChild(_8ba);
}
}
if($telerik.isIE||$telerik.isOpera){
_8b4.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}
}
}else{
if(this.get_contentArea()){
if(true==_8b3){
_8b4=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
}else{
_8b4=this.get_contentArea();
}
}
}
}
if(_8b4){
if(true==_8b3){
_8b5=this.get_filtersManager().getHtmlContent(_8b4);
}else{
_8b5=_8b4.innerHTML;
}
}
var _8bc=_8b5.match(/<body[^>]*>/i);
if(_8bc&&_8bc.index==0){
_8b5=_8b5.trim();
_8b5=_8b5.substring(_8b5.indexOf(">")+1,_8b5.length-7);
_8b5=_8b5.trim();
}
if(this.get_fullPage()&&this._doctypeString){
_8b5=this._doctypeString+"\n"+_8b5;
}
return _8b5;
},set_initialContent:function(_8bd){
if(_8bd!=null){
this._initialContent=_8bd;
}else{
this._initialContent=this.get_html(true);
}
},get_initialContent:function(){
return this._initialContent;
},get_text:function(){
var _8be=Telerik.Web.UI.EditModes;
var _8bf="";
if(this.get_mode()!=_8be.Html){
var _8c0=this.get_contentArea();
if(_8c0){
if(_8c0.innerText){
_8bf=_8c0.innerText;
}else{
if(_8c0.textContent!=null){
_8bf=_8c0.textContent;
}else{
_8bf=_8c0.innerHTML.replace(/<\/?[^>]*>/ig,"");
_8bf=_8bf.replace(/&nbsp;/gi,"");
}
}
}
}else{
_8bf=this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}
return _8bf;
},_getUniqueStyleSheetId:function(i){
return "RADEDITORSTYLESHEET"+i;
},_getAllSheets:function(oDoc){
if(!oDoc){
alert("RadEditor._getAllSheets called with no document object provided");
}
var _8c3=oDoc.getElementsByTagName("link");
var _8c4=oDoc.getElementsByTagName("style");
var _8c5=[];
for(var x=0;_8c3[x];x++){
var rel=_8c3[x].rel?_8c3[x].rel:_8c3[x].getAttribute("rel");
if(typeof (rel)=="string"&&rel.toLowerCase().indexOf("style")+1){
Array.add(_8c5,_8c3[x]);
}
}
for(var x=0;_8c4[x];x++){
Array.add(_8c5,_8c4[x]);
}
return _8c5;
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _8ca=str.lastIndexOf(".");
if(_8ca==-1){
return "";
}
var _8cb=str.indexOf(" ",_8ca);
if(-1==_8cb){
_8cb=str.indexOf(":",_8ca);
}
if(-1==_8cb){
_8cb=str.length;
}
return str.substring((_8ca+1),_8cb);
},_createCssFilterObject:function(){
if(this._cssClassesHash){
return;
}
var _8cc=this.get_cssClasses();
if(_8cc&&_8cc.length>0){
var obj={};
var _8ce=_8cc.length;
for(var i=0;i<_8ce;i++){
var oKey=_8cc[i][0];
var oVal=_8cc[i][1];
obj[oKey.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})]=oVal;
}
this._cssClassesHash=obj;
}
},_getFilteredCssClasses:function(_8d3){
this._createCssFilterObject();
if(_8d3&&this._cssClassesHash){
var _8d4=[];
var _8d5=_8d3.length;
for(var _8d6=0;_8d6<_8d5;_8d6++){
var _8d7=_8d3[_8d6];
if(outAlias=this._checkCssFilter(_8d7[1].selectorText)){
_8d7[2]=outAlias;
_8d4[_8d4.length]=_8d7;
}
}
return _8d4;
}else{
return _8d3;
}
},_checkCssFilter:function(_8d8){
if(!_8d8||!this._cssClassesHash){
return null;
}
return this._cssClassesHash[_8d8.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})];
},getCssArray:function(_8da){
var _8db=this.get_document();
var _8dc=[];
for(var i=0;i<_8db.styleSheets.length;i++){
var _8de=_8db.styleSheets[i];
try{
this._getStyleSheetRules(_8dc,_8de,_8da);
}
catch(e){
}
}
_8dc=this._getFilteredCssClasses(_8dc);
return _8dc;
},_getStyleSheetRules:function(_8df,_8e0,_8e1){
var _8e2=_8e0.href;
if(_8e2&&_8e2.indexOf("WebResource.axd?")>-1){
return;
}
if(_8e2&&_8e2.indexOf(this.get_contentAreaCssFile())>-1){
return;
}
var _8e3=(_8e0.rules)?_8e0.rules:_8e0.cssRules;
if($telerik.isIE&&_8e0.imports){
for(var k=0;k<_8e0.imports.length;k++){
this._getStyleSheetRules(_8df,_8e0.imports[k],_8e1);
}
}
for(var j=0;j<_8e3.length;j++){
var _8e6=_8e3[j];
if(_8e6&&_8e6.cssText){
var text=_8e6.cssText.toLowerCase();
if(text.indexOf("@import")>=0&&_8e6.parentStyleSheet&&_8e6.styleSheet&&_8e6.parentStyleSheet!=_8e6.styleSheet){
this._getStyleSheetRules(_8df,_8e6.styleSheet,_8e1);
continue;
}
}
var str=_8e6&&_8e6.selectorText?_8e6.selectorText:"";
var _8e9=str.lastIndexOf(".");
if(_8e9<0){
continue;
}
var _8e9=str.lastIndexOf(":");
if(_8e9>0){
continue;
}
var _8ea=this._getClassName(_8e6);
_8df[_8df.length]=[_8ea,_8e6];
}
},copyStyleSheets:function(_8eb,_8ec){
if(null==_8eb&&null==_8ec){
return;
}
var _8ed=0;
var _8ee=null;
if(_8ec.styleSheets.length==0){
if(_8ec.createStyleSheet){
_8ec.createStyleSheet();
}else{
css=_8ec.createElement("style");
css.media="all";
css.type="text/css";
var _8ef=_8ec.getElementsByTagName("head")[0];
_8ef.appendChild(css);
_8ee=css;
}
}
if(_8ec.styleSheets[0]){
_8ee=_8ec.styleSheets[0];
}
for(var i=0;i<_8eb.styleSheets.length;i++){
try{
var _8f1=_8eb.styleSheets[i];
var _8f2=_8f1.href;
var _8f3=false;
if($telerik.isFirefox){
if(_8f1.ownerNode&&_8f1.ownerNode.tagName.toLowerCase()=="style"){
_8f3=true;
}
}
if(_8f2&&!_8f3){
continue;
}
var _8f4=(_8f1.rules)?_8f1.rules:_8f1.cssRules;
for(var j=0;j<_8f4.length;j++){
var _8f6=_8f4[j];
if(_8ee.addRule){
var _8f7=_8f6.selectorText;
var oCss=_8f6.style.cssText;
if(oCss&&_8f7){
_8ee.addRule(_8f7,oCss,_8ed);
}
}else{
if(_8ee.insertRule){
_8ee.insertRule(_8f6.cssText,_8ed);
}else{
var oCss=_8f6.selectorText+"{"+_8f6.style.cssText+"}";
var _8f9=_8ec.createTextNode(oCss);
_8ee.appendChild(_8f9);
}
}
_8ed++;
}
}
catch(exc){
}
}
},_setContentAreaHtml:function(_8fa,_8fb){
var _8fc=this.get_filtersManager().getDesignContent(_8fa);
this.set_contentHiddenTextareaValue(_8fc);
var _8fd=null;
if(-1!=_8fc.toLowerCase().indexOf("<html")){
this.set_fullPage(true);
_8fd=_8fc;
var _8fe=new RegExp("(<!DOCTYPE(.|\\n)*?>)(.|\\n)*?","g");
this._doctypeString=(_8fd.match(_8fe))?_8fd.match(_8fe)[0]:"";
}else{
this.set_fullPage(false);
}
if(null!=_8fd||true==_8fb){
var _8ff=this;
var _900=function(){
_901=false;
try{
_8ff._document=_8ff._contentAreaElement.contentWindow.document;
_8ff._contentWindow=_8ff._contentAreaElement.contentWindow;
_8ff._contentArea=_8ff._document.body;
_8ff.get_filtersManager().getDesignContentDom(_8ff.get_contentArea());
var _902=1;
Telerik.Web.UI.Editor.Utils.addStyleSheet(_8ff.get_contentAreaCssFile(),_8ff._document,_8ff._getUniqueStyleSheetId(0));
var _903=_8ff.get_cssFiles();
if(_903.length>0){
for(var i=0;i<_903.length;i++){
var _905=_8ff._getUniqueStyleSheetId(_902++);
Telerik.Web.UI.Editor.Utils.addStyleSheet(_903[i],_8ff._document,_905);
}
}else{
if(!_8ff._fullPage){
_8ff.copyStyleSheets(document,_8ff._document);
var _906=_8ff._getAllSheets(document);
for(var i=0;i<_906.length;i++){
var _905=_8ff._getUniqueStyleSheetId(_902++);
var _907=_906[i];
if(_907.tagName=="LINK"){
var _908=_907.href;
if(_908&&_908.indexOf("WebResource.axd?")>-1){
continue;
}
if(_908){
Telerik.Web.UI.Editor.Utils.addStyleSheet(_907.getAttribute("href"),_8ff._document,_905);
}
}else{
if(_907.tagName=="STYLE"){
}
}
}
}
}
var _909=Telerik.Web.UI.Editor.PopupController;
if(_909){
_909.detachFromDocument(_8ff._document);
_909.attachToDocument(_8ff._document);
}
_8ff._initEvents();
if(_8ff.isVisible()){
_8ff.raiseEvent("firstShow");
}
if(_8ff.get_mode()!=Telerik.Web.UI.EditModes.Preview){
_8ff.set_editable(true);
}else{
_8ff.set_editable(false);
}
_8ff.toggleEnhancedEdit(true);
if(_8ff._document&&_8ff._document.body){
_8ff.raiseEvent("editReady",Sys.EventArgs.Empty);
}
}
catch(e){
}
};
if($telerik.isFirefox){
$addHandler(this._contentAreaElement,"load",function(){
if(_901){
_900();
}
});
}
if(!_8fd){
_8fd="<head><style></style></head><body>"+_8fc+"</body>";
}
try{
var _90a=this._contentAreaElement.contentWindow.document;
_90a.open();
_90a.write(_8fd);
_90a.close();
var _901=false;
if(_90a.body){
_900();
}else{
_901=true;
}
}
catch(e){
}
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this._contentArea,_8fc);
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 _90c=$get(id+"Center");
var _90d=this.get_contentAreaElement();
_90d.style.display="none";
var _90e=_90c.offsetHeight;
_90c.appendChild(_90d);
_90d.style.height="100%";
_90d.style.display="";
if(!$telerik.isIE&&_90e<160&&_90c.offsetHeight>_90e+2){
_90c.style.height=_90e+"px";
}
this._created=true;
},_updateEditorSize:function(_90f,_910){
var _911=this._tableElement;
var _912=_90f?_90f:_911.style.height;
if(true==_910){
_912=_911.offsetHeight+"px";
}
if(parseInt(_912)==0){
return;
}
_912=parseInt(_912)+"px";
_911.style.height=_912;
if(this.isIE){
this._fixIeHeight(_911,_912);
}else{
}
_911.parentNode.style.height=_912;
},_fixIeHeight:function(_913,_914){
if("CSS1Compat"==document.compatMode){
var _915=(_913.offsetHeight-parseInt(_914));
if(_915>0){
var _916=(parseInt(_913.style.height)-_915);
if(_916>0){
_913.style.height=_916+"px";
}
}
}
},setSize:function(_917,_918){
var _917=parseInt(_917);
var _918=parseInt(_918);
var _919=this;
var _91a=this.get_mainTable();
_91a.style.height="";
var _91b=_91a.parentNode;
_91b.style.width=_917+"px";
_91b.style.height=_918+"px";
_919._fixIeHeight(_91b,_918);
if(_919.isIE){
_91a.style.height=_918+"px";
_919._fixIeHeight(_91a,_918);
}else{
_91a.style.height="100%";
}
},pasteHtml:function(_91c,_91d,_91e,_91f,_920){
if(!this.get_editable()){
return;
}
var args=new Telerik.Web.UI.EditorCommandEventArgs(_91d,null,_91c);
if(false==this._executeCommandEvent("pasteHtml",_91d,args)){
return;
}
if(_91c!=args.get_value()){
_91c=args.get_value();
}
var _922=this.getLocalizedString(_91d);
var mode=this.get_mode();
if(Telerik.Web.UI.EditModes.Design==mode){
this.setFocus();
this.executeCommand(new Telerik.Web.UI.Editor.PasteHtmlCommand(_922,this._contentWindow,_91c,_91e),null,_920);
if(_91f!=false){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}else{
if(Telerik.Web.UI.EditModes.Html==mode){
var _924=this._getTextArea();
if(this.isIE){
_924.setActive();
var _925=document.selection.createRange();
_925.text=_91c;
}else{
if(_924.setSelectionRange){
var _926=_924.selectionStart;
var _927=_924.selectionEnd;
var _928=_924.value.substring(_926,_927);
var _929=_91c;
_924.value=_924.value.substring(0,_926)+_929+_924.value.substring(_927);
_924.setSelectionRange(_926+_929.length,_926+_929.length);
this.setFocus();
}
}
}
}
},fire:function(_92a,args){
if(false==this._executeCommandEvent("commandExecuting",_92a,args)){
return;
}
if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[_92a]){
return;
}
this.setActive();
this._pendingTextTypeCmd=null;
var _92c=Telerik.Web.UI.Editor.CommandList[_92a];
var _92d=false;
if(_92c){
_92d=(false!=_92c(_92a,this,args));
}else{
alert("The command "+_92a+" is not implemented yet.");
}
if(_92d){
if(!$telerik.isOpera){
this.setFocus();
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
this._executeCommandEvent("commandExecuted",_92a,args);
},_executeCommandEvent:function(_92e,_92f,args){
if(!args){
args=new Telerik.Web.UI.EditorCommandEventArgs(_92f);
}
this.raiseEvent(_92e,args);
if(args.get_cancel&&args.get_cancel()){
return false;
}
return true;
},_onWindowResize:function(){
var _931=this._getViewportBounds();
this.setSize(_931.width,_931.height,false);
},_registerWindowResizeHandler:function(_932){
if(_932){
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 _933=$telerik.getClientBounds();
var _934=document.documentElement.scrollLeft||document.body.scrollLeft;
var _935=document.documentElement.scrollTop||document.body.scrollTop;
_933.scrollLeft=_934;
_933.scrollTop=_935;
return _933;
},_handleParentsWithOverflow:function(_936){
if(false==_936){
if(!this._parentsWithOverflow){
return;
}
var _937=this._parentsWithOverflow;
var _938=_937.length;
for(var i=0;i<_938;i++){
var _93a=_937[i];
if(_93a[0]){
var _93b=_93a[0].style;
_93b.overflow=_93a[1];
_93b.height=_93a[2];
_93b.tableLayout=_93a[3];
_93b.position=_93a[4];
}
}
this._parentsWithOverflow=null;
}else{
this._parentsWithOverflow=[];
var _937=this._parentsWithOverflow;
var _93c=this._getRootNode().parentNode;
while(_93c&&_93c.tagName!="BODY"){
var _93b=_93c.style;
_937[_937.length]=[_93c,_93b.overflow,_93b.height,_93b.tableLayout,_93b.position];
_93c.style.position="static";
_93c.style.tableLayout="auto";
_93c.style.overflow="visible";
_93c.style.height="auto";
_93c=_93c.parentNode;
}
}
},_getRootNode:function(){
return this.get_mainTable().parentNode;
},isFullScreen:function(){
return this._isFullScreen;
},toggleScreenMode:function(){
var _93d=this;
if(!_93d._isFullScreen){
_93d._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){
_93d._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}
var _93e=_93d._getRootNode();
_93d._preFullScreenBounds=$telerik.getBounds(_93e);
_93d._handleParentsWithOverflow(true);
_93d._onWindowResize();
_93d._preFullScreenBrowserRect=_93d._getViewportBounds();
var _93f=$telerik.getLocation(_93e);
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_93f.x,_93f.y);
_93d._isFullScreen=true;
_93d._registerWindowResizeHandler(true);
}else{
_93d._registerWindowResizeHandler(false);
document.body.scroll=_93d._preFullScreenBodyStyle[0];
try{
document.body.style.margin=_93d._preFullScreenBodyStyle[1];
}
catch(e){
}
document.documentElement.style.overflow=_93d._preFullScreenBodyStyle[2];
_93d._isFullScreen=false;
_93d._handleParentsWithOverflow(false);
var _940=_93d._preFullScreenBounds;
_93d.setSize(_940.width,_940.height,false);
var _93f=_93d._preFullScreenBrowserRect;
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_93f.scrollLeft,_93f.scrollTop);
}
_93d.set_editable(true);
_93d.setFocus();
var _941=_93d.getToolByName("ToggleScreenMode");
if(_941){
_941.setOn(_93d._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(_942){
if($telerik.isSafari&&this._contentHiddenTextarea.innerText!=null){
this._contentHiddenTextarea.innerText=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_942);
}else{
this._contentHiddenTextarea.value=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_942);
}
},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(_944){
this._toolAdapter=_944;
},get_fullPage:function(){
return this._fullPage;
},set_fullPage:function(_945){
this._fullPage=_945;
},get_dialogOpener:function(){
return this._dialogOpener;
},set_dialogOpener:function(_946){
this._dialogOpener=_946;
},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(_947){
this._links=_947;
},get_language:function(){
if(null==this._language){
return "en-us";
}
return this._language.toLowerCase();
},set_language:function(_948){
this._language=_948;
},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(_949){
this._colors=_949;
},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(_94a){
this._fontNames=_94a;
},get_fontSizes:function(){
if(null==this._fontSizes){
return [1,2,3,4,5,6,7];
}
return this._fontSizes;
},set_fontSizes:function(_94b){
this._fontSizes=_94b;
},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(_94c){
this._symbols=_94c;
},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(_94d){
this._realFontSizes=_94d;
},get_contextMenus:function(){
if(null==this._contextMenus){
return [];
}
return this._contextMenus;
},set_contextMenus:function(_94e){
this._contextMenus=_94e;
},get_snippets:function(){
if(null==this._snippets){
return [];
}
return this._snippets;
},set_snippets:function(_94f){
this._snippets=_94f;
},get_cssClasses:function(){
if(null==this._cssClasses){
return [];
}
return this._cssClasses;
},set_cssClasses:function(_950){
this._cssClasses=_950;
},get_cssFiles:function(){
if(null==this._cssFiles){
return [];
}
return this._cssFiles;
},set_cssFiles:function(_951){
this._cssFiles=_951;
},get_languages:function(){
if(null==this._languages){
return [];
}
return this._languages;
},set_languages:function(_952){
this._languages=_952;
},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(_953){
this._paragraphs=_953;
},get_toolsWidth:function(){
return this._toolsWidth;
},set_toolsWidth:function(_954){
this._toolsWidth=_954;
},get_toolProviderID:function(){
return this._toolProviderID;
},set_toolProviderID:function(_955){
this._toolProviderID=_955;
},get_autoResizeHeight:function(){
return this._autoResizeHeight;
},set_autoResizeHeight:function(_956){
this._autoResizeHeight=_956;
},get_toolbarMode:function(){
return this._toolbarMode;
},set_toolbarMode:function(_957){
this._toolbarMode=_957;
},get_editModes:function(){
return this._editModes;
},set_editModes:function(_958){
this._editModes=_958;
},get_stripFormattingOptions:function(){
return this._stripFormattingOptions;
},set_stripFormattingOptions:function(_959){
this._stripFormattingOptions=_959;
},get_contentFilters:function(){
return this._contentFilters;
},set_contentFilters:function(_95a){
this._contentFilters=_95a;
},get_newLineBr:function(){
return this._newLineBr;
},set_newLineBr:function(_95b){
this._newLineBr=_95b;
},get_contentAreaCssFile:function(){
return this._contentAreaCssFile;
},set_contentAreaCssFile:function(_95c){
this._contentAreaCssFile=_95c;
},get_mozillaFlashOverlayImage:function(){
return this._mozillaFlashOverlayImage;
},set_mozillaFlashOverlayImage:function(_95d){
this._mozillaFlashOverlayImage=_95d;
},get_toolAdapterType:function(){
return this._toolAdapterType;
},set_toolAdapterType:function(_95e){
this._toolAdapterType=_95e;
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_95f){
this._toolJSON=_95f;
},get_modulesJSON:function(){
return this._modulesJSON;
},set_modulesJSON:function(_960){
this._modulesJSON=_960;
},get_contextMenusJSON:function(){
return this._contextMenusJSON;
},set_contextMenusJSON:function(_961){
this._contextMenusJSON=_961;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_962){
this._uniqueID=_962;
},get_useClassicDialogs:function(){
return this.get_dialogOpener().get_useClassicDialogs();
},set_useClassicDialogs:function(_963){
this.get_dialogOpener().set_useClassicDialogs(_963);
},get_skin:function(){
if(!this._skin){
return "Default";
}
return this._skin;
},set_skin:function(_964){
this._skin=_964;
},get_qualifiedSkin:function(){
var skin=this.get_skin();
return "radeditor."+skin;
},_registerClientValidation:function(){
if(typeof (Page_ClientValidate)=="function"){
var _966=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(_967){
var _968=this.get_element();
if(_968){
var _969=this.get_html(true);
this.set_contentHiddenTextareaValue(_969);
_968.value=_969;
_968.setAttribute("value",_969);
}
_968=null;
return _966(_967);
});
}
},saveContent:function(){
if(this._saveContentDelegate){
this.raiseEvent("submit",Sys.EventArgs.Empty);
var _96a=this.get_html(true);
this.set_contentHiddenTextareaValue(_96a);
}
},_registerPostBackHandlers:function(){
this._saveContentDelegate=Function.createDelegate(this,this.saveContent);
var _96b=this._contentHiddenTextarea.form;
$telerik.addExternalHandler(_96b,"submit",this._saveContentDelegate);
if(typeof (__doPostBack)!="undefined"){
var _96c=this._saveContentDelegate;
var _96d=__doPostBack;
__doPostBack=function(_96e,_96f){
_96c();
_96d(_96e,_96f);
};
}
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;
}
_96b=null;
},toggleEnhancedEdit:function(_971){
if(!this.get_document()){
return false;
}
var _972=this.get_document().getElementById(this._getUniqueStyleSheetId(0));
if(_972){
if(_971==null){
_971=_972.disabled;
}
_972.disabled=!_971;
var tool=this.getToolByName("ToggleTableBorder");
if(tool){
tool.setOn(_971);
}
return _971;
}else{
return false;
}
},pasteHyperLink:function(_974,_975){
if($telerik.isIE){
var sel=this.getSelectedElement();
if(sel.tagName=="IMG"&&sel.parentNode&&sel.parentNode.tagName=="A"){
var _977=sel.parentNode;
_977.parentNode.removeChild(_977);
}
if(sel.tagName=="IMG"){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_974,Telerik.Web.UI.Editor.Utils.getOuterHtml(sel));
}
}
if($telerik.isOpera){
var sel=this.getSelectedElement();
if(sel.tagName=="A"){
this.fire("Unlink");
}
}
if("DocumentManager"==_975){
var _978=this.getSelection().getText();
if(""!=_978.trim()){
_974.innerHTML=_978;
}
}
var _979=Telerik.Web.UI.Editor.Utils.getOuterHtml(_974);
this.pasteHtml(_979,_975);
},_saveTypedContent:function(_97a,_97b){
if(this._pendingTextTypeCmd){
this._pendingTextTypeCmd.update();
}
if(true!=_97a){
this._pendingTextTypeCmd=null;
}
},_attachIEBodyHandlers:function(_97c){
var body=null;
if(this._document&&this._document.body){
body=this._document.body;
}
if(!body){
return;
}
if(_97c){
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 _97e=this;
var _97f=_97e.fire;
_97e.fire=function(_980,_981){
if(_980!="Copy"){
_97e._saveTypedContent(true,"editor.fire "+_980+" executing");
}
_97f.call(_97e,_980,_981);
try{
if(_980=="Undo"&&!_97e.isIE&&_97e._document.body.innerHTML.toLowerCase().trim()=="<br>"){
_97e._document.body.innerHTML="<br>";
}
}
catch(e){
}
};
if(!this.isIE){
this.attachEventHandler("keypress",function(e){
if(_97e._onKeyPressed(e)){
e.preventDefault();
return false;
}
});
this.attachEventHandler("click",function(e){
if(!_97e.isFirefox){
return;
}
if(!_97e.get_editable()){
return;
}
if("on"==_97e._document["designMode"]){
window.setTimeout(function(){
_97e.set_editable(true);
_97e.setFocus();
},100);
}
});
}
this.attachEventHandler("keydown",function(e){
if(_97e.isOpera){
return _97e._onKeyDown(e);
}else{
_97e._onKeyDown(e);
}
});
this.attachEventHandler("onmousedown",function(){
_97e._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var _985=Function.createDelegate(this,function(e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",_985);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachIEBodyHandlers(true);
},_onKeyDown:function(e){
var _988=e.keyCode;
switch(_988){
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 _989=this;
var _98a=function(){
var _98b=_989.getSelectedElement();
if(_98b&&_98b.tagName=="EMBED"){
_98b.setAttribute("hidden","true");
_98b.setAttribute("id","FileToDelete");
window.setTimeout(function(){
var _98c=_989._document.getElementById("FileToDelete");
if(_98c.parentNode&&_98c.parentNode.removeChild){
_98c.parentNode.removeChild(_98c);
}
},100);
$telerik.cancelRawEvent(e);
return true;
}
};
var _98d=_98a();
if(_98d){
return false;
}
try{
var _98e=_989._document.selection.createRange();
var _98f=null;
if(_98e&&_98e.duplicate){
_98f=_98e.duplicate();
}
if(8==e.keyCode){
_98e.moveStart("character",-1);
}else{
_98e.moveEnd("character",1);
}
if(_98e.parentElement().tagName=="EMBED"){
_98e.select();
_98a();
if(_98f&&_98f.select){
_98f.select();
}
}
}
catch(ex){
}
var _990=new Telerik.Web.UI.Editor.Selection(this._contentWindow);
if(_990&&_990.isControl()){
var _991=_990.getRange();
_991.execCommand("Delete");
$telerik.cancelRawEvent(e);
}
}
return;
}
var _992=e.target?e.target:e.srcElement;
if(_992&&"INPUT"!=_992.tagName){
var _993=this._shortCutManager.isShortCutHit(e);
if(null!=_993&&_993.get_name()=="Copy"){
this._shortcutHit=false;
return;
}
this._shortcutHit=(null!=_993);
if(this._shortcutHit){
this.fire(_993.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=_993.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(_997,_998,_999,_99a){
var _99b=this;
var _99c=(this.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _99d=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_998,_99b.get_stripFormattingOptions(),_99b.get_localization()["askwordcleaning"],_99c);
if(_997){
_997.select();
}
if(_99d){
window.setTimeout(function(){
if(_99a&&_997){
_997.select();
}
_99b.pasteHtml(_99d);
},5);
return $telerik.cancelRawEvent(_999);
}
return true;
},_onPaste:function(_99e){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _99f=this.createRestorePoint();
var _9a0=this.getSelectionHtml()?true:false;
var _9a1=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
return this._insertPastedContent(_99f,_9a1,_99e,_9a0);
},_onBeforePaste:function(_9a2){
if(_9a2){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _9a3=new Telerik.Web.UI.Editor.GenericCommand("Paste",this._contentWindow);
var _9a4=this.getSelection().getRange();
var _9a5=Telerik.Web.UI.Editor.Utils.getUniqueID();
if(_9a4.pasteHTML){
_9a4.pasteHTML("&nbsp;<font id='"+_9a5+"'>&nbsp;</font>");
}else{
this.pasteHtml("<font id='"+_9a5+"'>&nbsp;</font>");
}
var _9a6=Telerik.Web.UI.Editor.Utils.getPasteContainer();
_9a6.innerHTML="";
if(_9a6.setActive){
_9a6.setActive();
}else{
var _9a7=this.getSelection();
var _9a8=_9a7.getRange();
if(_9a8.selectNodeContents){
_9a8.selectNodeContents(_9a6);
}
_9a7.selectRange(_9a8);
}
var _9a9=this;
window.setTimeout(function(){
var _9aa=_9a6.innerHTML;
var _9ab=(_9a9.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _9ac=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_9aa,_9a9.get_stripFormattingOptions(),_9a9.get_localization()["askwordcleaning"],_9ab);
var _9ad=_9a9._document.getElementById(_9a5);
_9a9.setActive(true);
_9a9._pendingCutPasteCommand=null;
if(_9a9._document.body.createTextRange){
var _9ae=_9a9._document.body.createTextRange();
_9ae.moveToElementText(_9ad);
_9ae.moveStart("character",-1);
_9ae.select();
_9ae.pasteHTML(_9ac);
}else{
_9a9.selectElement(_9ad);
_9a9.pasteHtml(_9ac);
}
_9a9.executeCommand(_9a3);
_9a9.setActive(true);
_9a9.setFocus(true);
},0);
}
},_onResizeStart:function(e){
var _9b0=this.getSelectedElement();
if(_9b0==e.srcElement){
var _9b1=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new Telerik.Web.UI.Editor.GenericCommand(_9b1,this._contentWindow);
}
},_onResizeEnd:function(e){
if(this._pendingResizeCmd){
this.executeCommand(this._pendingResizeCmd);
}
},_onDragStart:function(e){
var _9b4=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new Telerik.Web.UI.Editor.GenericCommand(_9b4,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 _9b6=this._startRange.item(0);
if("IMG"==_9b6.tagName&&"A"==_9b6.parentNode.tagName&&_9b6.parentNode.childNodes.length==1){
_9b6=_9b6.parentNode;
}
rng.moveToElementText(_9b6);
this._startRange=rng;
}
}
},_onDragEnd:function(e){
if(this._pendingMoveCommand){
if(this._startRange){
var _9b8=this._contentWindow.document.selection.createRange();
if(_9b8.length){
var rng=this._contentWindow.document.body.createTextRange();
rng.moveToElementText(_9b8.item(0));
_9b8=rng;
}
try{
if(_9b8.compareEndPoints&&0!=_9b8.compareEndPoints("StartToStart",this._startRange)&&0!=_9b8.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 _9bb=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new Telerik.Web.UI.Editor.GenericCommand(_9bb,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(_9bd){
this.get_events().addHandler("toggleScreenMode",_9bd);
},remove_toggleScreenMode:function(_9be){
this.get_events().removeHandler("toggleScreenMode",_9be);
},add_modeChange:function(_9bf){
this.get_events().addHandler("modeChange",_9bf);
},remove_modeChange:function(_9c0){
this.get_events().removeHandler("modeChange",_9c0);
},add_load:function(_9c1){
this.get_events().addHandler("load",_9c1);
},remove_load:function(_9c2){
this.get_events().removeHandler("load",_9c2);
},add_init:function(_9c3){
this.get_events().addHandler("init",_9c3);
},remove_init:function(_9c4){
this.get_events().removeHandler("init",_9c4);
},add_selectionChange:function(_9c5){
this.get_events().addHandler("selectionChange",_9c5);
},remove_selectionChange:function(_9c6){
this.get_events().removeHandler("selectionChange",_9c6);
},add_commandExecuting:function(_9c7){
this.get_events().addHandler("commandExecuting",_9c7);
},remove_commandExecuting:function(_9c8){
this.get_events().removeHandler("commandExecuting",_9c8);
},add_commandExecuted:function(_9c9){
this.get_events().addHandler("commandExecuted",_9c9);
},remove_commandExecuted:function(_9ca){
this.get_events().removeHandler("commandExecuted",_9ca);
},add_submit:function(_9cb){
this.get_events().addHandler("submit",_9cb);
},remove_submit:function(_9cc){
this.get_events().removeHandler("submit",_9cc);
},add_editReady:function(_9cd){
this.get_events().addHandler("editReady",_9cd);
},remove_editReady:function(_9ce){
this.get_events().removeHandler("editReady",_9ce);
},add_pasteHtml:function(_9cf){
this.get_events().addHandler("pasteHtml",_9cf);
},remove_pasteHtml:function(_9d0){
this.get_events().removeHandler("pasteHtml",_9d0);
},add_firstShow:function(_9d1){
this.get_events().addHandler("firstShow",_9d1);
},remove_firstShow:function(_9d2){
this.get_events().removeHandler("firstShow",_9d2);
}};
Telerik.Web.UI.RadEditor.registerClass("Telerik.Web.UI.RadEditor",Telerik.Web.UI.RadWebControl);

