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){
_714=this._convertRgbToHex(_714);
_714=this._stripBorderRepetition(_714);
sb.append(" style=\""+this._convertAttribute(_714.toLowerCase())+"\"");
}
}
},_convertRgbToHex:function(text){
if($telerik.isFirefox){
var _716=Telerik.Web.UI.Editor.ConvertFontToSpanFilter.prototype._fixColorValue;
text=text.replace(/rgb *\( *\d+ *, *\d+ *, *\d+ *\)/gi,function(_717,_718,_719){
return _716(_717);
});
}
return text;
},_stripBorderRepetition:function(text){
if($telerik.isIE){
if(!text.match(/;$/)){
text+=";";
}
text=text.replace(/BORDER-RIGHT:([^;]*);[\s\S]*BORDER-TOP:([^;]*);[\s\S]*BORDER-LEFT:([^;]*);[\s\S]*BORDER-BOTTOM:([^;]*);/gi,function(_71b,_71c,_71d,_71e,_71f,_720,_721){
if(_71c==_71d&&_71d==_71e&&_71e==_71f){
_71b=_71b.replace(/[\s\S]*BORDER-(RIGHT|TOP|LEFT|BOTTOM):([^;]*);/gi,"");
}
_71b="BORDER:"+_71c+";"+_71b;
return _71b;
});
}
return text;
},_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 _727=node.getAttribute("href",2);
if(_727){
_727=_727.replace("about:blank","");
_727=_727.replace("about:","");
_727=_727.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
sb.append(" href=\""+_727+"\"");
node.removeAttribute("href",0);
}
}
try{
var _728=node.attributes;
var l=_728.length;
for(var i=0;i<l;i++){
this._getAttributeValue(_728[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 _72b="";
if(node.altHtml){
_72b=node.altHtml;
}else{
_72b=node.innerHTML;
}
if($telerik.isIE){
_72b=_72b.replace(/\soriginalAttribute="[^"]+"/gi,"");
_72b=_72b.replace(/\soriginalPath="[^"]+"/gi,"");
}
sb.append(_72b);
sb.append("</object>");
break;
case "title":
case "style":
case "comment":
case "noscript":
var _72b=node.innerHTML;
if($telerik.isIE&&_72b.length==0){
_72b=node.ownerDocument.title;
}
sb.append(">"+_72b+"</"+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 _72f=String(node.nodeValue);
var _730=node.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(_730=="style"||_730=="script")){
sb.append(_72f);
}else{
_72f=_72f.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if($telerik.isFirefox){
_72f=_72f.replace(/[\u00a0]/g,"&nbsp;");
}
sb.append(_72f);
}
},_appendCDataNode:function(node,sb){
sb.append("<![CDA"+"TA[\n"+node.nodeValue+"\n]"+"]>");
},_appendCommentNode:function(node,sb){
var _735=node.nodeValue;
if(!_735&&node.text){
_735=node.text;
}else{
_735="<!--"+_735+"-->";
}
sb.append(_735);
},_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 _738="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 _739="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var _73a=_739+"|DL|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+_738+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+_738+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+_739+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+_73a+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+_73a+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={getHtmlContent:function(html){
var _73c=html.trim();
if(_73c.indexOf("<body")==0){
_73c=_73c.substring(_73c.indexOf(">")+1,_73c.length-7);
}
this._protectedData=[];
var self=this;
var _73e=function(_73f,_740,_741,_742,_743,_744){
Array.add(self._protectedData,_741);
return _740+"RADEDITORFORMATTED_"+self._protectedData.length+_742;
};
_73c=_73c.replace(this._ignoreTags,_73e);
var _745="$&";
if($telerik.isSafari2){
_745="$0";
}
_73c=_73c.replace(this._tagsNLBefore,"\n"+_745);
_73c=_73c.replace(this._tagsNLAfter,_745+"\n");
_73c=_73c.replace(this._tagsNLNoCloseAfter,_745+"\n");
_73c=_73c.replace(this._tagsNLBeforeAndAfter,"\n"+_745+"\n");
var _746=_73c.split(this._shrinkNL);
var _747=new Sys.StringBuilder("");
var _748="";
for(var i=0;i<_746.length;i++){
var line=_746[i];
if(line.length==0){
continue;
}
if(this._tagsDecIndent.test(line)){
if(_748.length>this._indentPattern.length){
_748=_748.substring(this._indentPattern.length);
}else{
_748="";
}
}
_747.append(_748);
_747.append(line);
_747.append("\n");
if(this._tagsIncIndent.test(line)){
_748+=this._indentPattern;
}
}
_73c=_747.toString();
for(var i=0;i<this._protectedData.length;i++){
var _74b=new RegExp("RADEDITORFORMATTED_"+(i+1));
var _74c=this._protectedData[i].replace(/\$/gi,"$$$$");
_73c=_73c.replace(_74b,_74c);
}
return _73c;
}};
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(_74d){
this._updateElements(_74d,"A","href");
this._updateElements(_74d,"AREA","href");
this._updateElements(_74d,"IMG","src");
this._updateElements(_74d,"EMBED","src");
return _74d;
},_getElements:function(_74e,_74f){
var _750=_74e.getElementsByTagName(_74f);
if(!_750){
_750=_74e.ownerDocument.getElementsByTagName(_74f);
}
return _750;
},_updateElements:function(_751,_752,_753){
var _754=_751.ownerDocument.createElement("div");
var _755=this._getElements(_751,_752);
if(_755){
for(var i=0;i<_755.length;i++){
var _757=_755[i].getAttribute(_753,2);
if("href"==_753&&_757){
_754.innerHTML="<a href=\""+_757.replace(/\"/gi,"%22")+"\">test</a>";
if($telerik.isIE){
var _758=_755[i].innerHTML;
}
_755[i].setAttribute("href",_754.childNodes[0].href);
if($telerik.isIE){
if((_758.indexOf("www.")==0&&_755[i].innerHTML.match("[a-z]+://"))||(_758.indexOf("mailto:")==-1&&_755[i].innerHTML.match("mailto:"))){
_755[i].innerHTML=_758;
}
}
}else{
if("src"==_753&&_757){
_754.innerHTML="<img src=\""+_757.replace(/\"/gi,"%22")+"\" />";
_755[i].setAttribute("src",_754.childNodes[0].src);
}
}
}
}
_754.innerHTML="";
_754=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(_759){
this._enableXhtmlFilter=_759;
},add:function(_75a){
Array.add(this._filters,_75a);
},addAt:function(_75b,_75c){
Array.insert(this._filters,_75c,_75b);
},remove:function(_75d){
Array.remove(this._filters,_75d);
},removeAt:function(_75e){
Array.removeAt(this._filters,_75e);
},getFilterAt:function(_75f){
return this._filters[_75f];
},getFilterByName:function(name){
for(var i=0;i<this._filters.length;i++){
var _762=this._filters[i];
if(_762&&name==_762.get_name()){
return _762;
}
}
},getDesignContent:function(_763){
var _764=_763;
for(var i=0;i<this._filters.length;i++){
var _766=this._filters[i];
if((!_766.get_isDom())&&(false!=_766.get_enabled())&&_766.getDesignContent){
try{
_764=_766.getDesignContent(_764);
}
catch(exc){
alert("Error while executing filter "+_766.get_name()+" - "+exc.toString());
}
}
}
return _764;
},getDesignContentDom:function(_767){
for(var i=0;i<this._filters.length;i++){
var _769=this._filters[i];
if((_769.get_isDom())&&(false!=_769.get_enabled())&&_769.getDesignContent){
try{
_767=_769.getDesignContent(_767);
}
catch(exc){
alert("Error while executing filter "+_769.get_name()+" - "+exc.toString());
}
}
}
return _767;
},getHtmlContent:function(_76a){
for(var i=0;i<this._filters.length;i++){
var _76c=this._filters[i];
if((_76c.get_isDom())&&(false!=_76c.get_enabled())&&_76c.getHtmlContent){
try{
_76a=_76c.getHtmlContent(_76a);
}
catch(exc){
alert("Error while executing filter "+_76c.get_name()+" - "+exc.toString());
}
}
}
var _76d;
if(this.get_enableXhtmlFilter()){
try{
_76d=this._convertToXhtmlFilter.getHtmlContent(_76a);
}
catch(exc){
alert("Error while executing filter XHTML - "+exc.toString());
}
}else{
_76d=$telerik.getOuterHtml(_76a);
}
_76d=_76d.replace(/<body\s*\/>/i,"<body></body>").trim();
for(var i=0;i<this._filters.length;i++){
var _76c=this._filters[i];
if((!_76c.get_isDom())&&(false!=_76c.get_enabled())&&_76c.getHtmlContent){
try{
_76d=_76c.getHtmlContent(_76d);
}
catch(exc){
alert("Error while executing filter "+_76c.get_name()+" - "+exc.toString());
}
}
}
return _76d;
}};
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(_76e){
this.Window=_76e;
this.Document=_76e.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 _76f=this.Document.selection.createRange();
if(_76f.length){
this.SourceIndex=_76f.item(0).sourceIndex;
}else{
this.StartBookmark=_76f.getBookmark();
}
},restore:function(_770){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.Document.body,this.HtmlText);
this.select(_770);
},select:function(_771){
if(null!=this.SourceIndex){
var _772=this.Document.body.createControlRange();
_772.addElement(this.Document.all(this.SourceIndex));
_772.select();
}else{
if(null!=this.StartBookmark){
var _772=this.Document.body.createTextRange();
_772.moveToBookmark(this.StartBookmark);
_772.select();
if(true==_771&&_772.collapse){
_772.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(_773){
if(_773){
return {anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_773.anchorNode),anchorOffset:_773.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_773.focusNode),focusOffset:_773.focusOffset,isCollapsed:_773.isCollapsed};
}else{
return {};
}
},_moveToBookmark:function(_774,_775){
var _776=_775.anchorNodeBookmark.select();
var _777=_775.focusNodeBookmark.select();
_774.collapse(_776,_775.anchorOffset);
if(!_775.isCollapsed){
_774.extend(_777,_775.focusOffset);
}
}};
}
Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(_778,node){
this.Window=_778;
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(_77b,node){
var n,res;
for(var i=0;i<_77b.childNodes.length;i++){
n=_77b.childNodes[i];
res=this._findNodePath(n,node);
if(""!=res){
return ""+i+","+res;
}
if(n==node){
return ""+i;
}
}
return "";
},_findNode:function(_780,_781){
var arr=_781.split(",");
for(var i=0;i<arr.length;i++){
_780=_780.childNodes[arr[i]];
}
return _780;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Selection=function(_784){
this._window=_784;
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(_785,_786){
_786=(_786==true);
if($telerik.isIE){
return this._executeIE(_785,_786);
}else{
return this._executeMozilla(_785,_786);
}
},_executeIE:function(_787,_788){
var _789=this._window.document;
var _78a=_789.selection;
if(_78a.type.toLowerCase()!="none"){
_78a.createRange().execCommand("Delete");
}
if(_78a.type.toLowerCase()!="none"){
_789.execCommand("Delete");
}
_789.body.setActive();
selRange=_78a.createRange();
if(selRange&&selRange.length){
var _78b=selRange.item(0);
if(_78b&&_78b.tagName=="BODY"){
var _78c=_78b.getElementsByTagName("FORM")[0];
if(_78c){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_78c,_78c.innerHTML+_787);
}
}
}else{
var _78d=selRange.duplicate();
_78d.collapse(true);
_787=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(_787);
selRange.pasteHTML(_787);
Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(selRange.parentElement());
if(_788){
_78d.setEndPoint("EndToEnd",selRange);
_78d.select();
}
}
return true;
},_executeMozilla:function(_78e,_78f){
var oDoc=this._window.document;
var _791=oDoc.createElement("SPAN");
_791.innerHTML=_78e;
var _792="radetempnode";
if(this.isOpera){
_791.setAttribute("id",_792);
}
this._insertNodeAtSelection(this._window,_791,true);
if(this.isOpera){
var _793=oDoc.createRange();
var _794=this._window.getSelection();
var span=oDoc.getElementById(_792);
_793.selectNodeContents(span);
var _796=_793.extractContents();
_793.selectNode(span);
var _797=_793.extractContents();
_793.insertNode(_796);
_794.addRange(_793);
return true;
}else{
if(!this.isSafari){
var _793=oDoc.createRange();
_793.selectNodeContents(_791);
var _796=_793.extractContents();
_793.selectNode(_791);
_793.deleteContents();
this._insertNodeAtSelection(this._window,_796,_78f);
}
}
return true;
},_insertNodeAtSelection:function(win,_799,_79a){
var _79b=win.getSelection();
if(_79b.rangeCount==0){
win.document.body.appendChild(_799);
return;
}
var _79c=null;
if(_79b.getRangeAt){
_79c=_79b.getRangeAt(0);
}else{
_79c=win.document.createRange();
_79c.setStart(_79b.anchorNode,_79b.anchorOffset);
_79c.setEnd(_79b.focusNode,_79b.focusOffset);
}
if(_79b.removeAllRanges){
_79b.removeAllRanges();
}
_79c.deleteContents();
var _79d=$telerik.isSafari&&!$telerik.isSafari3?_79b.baseNode:_79c.startContainer;
var _79e=$telerik.isSafari&&!$telerik.isSafari3?_79b.baseOffset:_79c.startOffset;
if($telerik.isSafari&&null==_79d){
_79d=win.document.body;
}
_79c=win.document.createRange();
if((_799.nodeType==3)&&(_79d.nodeType==3)){
_79d.insertData(_79e,_799.nodeValue);
_79c.setEnd(_79d,_79e+_799.length);
if(_79a){
_79c.setStart(_79d,_79e);
}else{
_79c.setStart(_79d,_79e+_799.length);
}
}else{
var _79f;
if(_79d.nodeType==3){
var _7a0=_79d;
_79d=_7a0.parentNode;
var _7a1=_7a0.nodeValue;
var _7a2=_7a1.substr(0,_79e);
var _7a3=_7a1.substr(_79e);
var _7a4=win.document.createTextNode(_7a2);
var _79f=win.document.createTextNode(_7a3);
_79d.insertBefore(_79f,_7a0);
_79d.insertBefore(_799,_79f);
try{
_79d.insertBefore(_7a4,_799);
}
catch(exc){
}
_79d.removeChild(_7a0);
}else{
if(_79d.childNodes.length>0){
_79f=_79d.childNodes[_79e];
_79d.insertBefore(_799,_79f);
}else{
if(_79d.tagName!="BODY"){
_79d=_79d.parentNode;
}
_79d.appendChild(_799);
}
}
try{
if(_79a){
_79c.setStart(_799,0);
_79c.setEnd(_79f,0);
}else{
_79c.setStartBefore(_79f);
_79c.setEndBefore(_79f);
}
}
catch(exc){
}
}
try{
_79b.addRange(_79c);
}
catch(exc){
}
},selectRange:function(_7a5){
if(!_7a5){
return;
}
var _7a6=this._window;
if(_7a5.select){
_7a5.select();
}else{
if(_7a6.getSelection){
var _7a7=_7a6.getSelection();
if(_7a7.removeAllRanges){
_7a7.removeAllRanges();
_7a7.addRange(_7a5);
}else{
var base=_7a5.baseNode;
if(null==base){
base=_7a6.document.body;
}
var _7a9=_7a5.extentNode;
if(null==_7a9){
_7a9=_7a6.document.body;
}
_7a7.setBaseAndExtent(base,_7a5.startOffset,_7a9,_7a5.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 _7aa=this._window.getSelection();
if(!_7aa||_7aa.rangeCount<1){
return null;
}
var rng=null;
if(_7aa.getRangeAt){
rng=_7aa.getRangeAt(0);
}else{
rng=this._window.document.createRange();
rng.setStart(_7aa.anchorNode,_7aa.anchorOffset);
rng.setEnd(_7aa.focusNode,_7aa.focusOffset);
}
return rng;
}
}
},getParentElement:function(){
var rng=this.getRange();
if(!rng){
return null;
}
if(rng.commonAncestorContainer){
var _7ad=this._window.getSelection();
var _7ae=rng.startContainer?rng.startContainer:_7ad.baseNode;
var _7af=rng.endContainer?rng.endContainer:_7ad.extentNode;
var _7b0=rng.startOffset!=null?rng.startOffset:_7ad.baseOffset;
var _7b1=rng.endOffset!=null?rng.endOffset:_7ad.extentOffset;
if(_7ae==_7af&&(_7b1-_7b0)==1){
return _7ad.anchorNode.childNodes[_7ad.anchorOffset];
}else{
if(!rng.commonAncestorContainer.tagName){
if(this._window.document==rng.commonAncestorContainer&&_7ad.baseNode){
return _7ad.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 _7b3=oSel.focusNode;
if(!_7b3||_7b3.nodeType==1){
return false;
}
return (_7b3.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 _7b6=this._window.getSelection();
var rng=null;
if(null==_7b6){
return "";
}
if(_7b6.getRangeAt&&typeof (_7b6.rangeCount)!="undefined"&&_7b6.rangeCount==0){
return "";
}
if(_7b6.getRangeAt){
rng=_7b6.getRangeAt(0);
var _7b7=this._window.document.createElement("div");
var _7b8=rng.cloneContents();
if(_7b8){
_7b7.appendChild(_7b8);
return _7b7.innerHTML;
}else{
return "";
}
}else{
return _7b6;
}
}else{
return "";
}
}
},collapse:function(_7b9){
_7b9=(_7b9==true);
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.collapse){
rng.collapse(_7b9);
rng.select();
}
}else{
if(this._window.getSelection){
var _7bb=this._window.getSelection();
if(!_7bb.isCollapsed){
if(_7b9){
_7bb.collapseToStart();
}else{
_7bb.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(_7bc,_7bd){
var rs=new Telerik.Web.UI.EditorShortCut(_7bc,_7bd);
rs.HashValue=this._getShortCutHashValue(rs);
this._shortcuts[rs.HashValue]=rs;
},removeShortCut:function(_7bf){
var _7c0=this._findByName(_7bf);
if(_7c0){
this._shortcuts[_7c0.HashValue]=null;
}
},setShortCut:function(_7c1,_7c2){
this.removeShortCut(_7c1);
this.addShortCut(_7c1,_7c2);
},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(_7c4,_7c5,_7c6,_7c7,_7c8,_7c9,_7ca){
var _7cb=this._getHashValue(_7c4,_7c5,_7c6,_7c7,_7c8,_7c9,_7ca);
return this._shortcuts[_7cb];
},_getHashValue:function(_7cc,_7cd,_7ce,_7cf,_7d0,_7d1,_7d2){
var _7d3=_7cc&65535;
var _7d4=0;
_7d4|=(_7cd?(1<<0):0);
_7d4|=(_7cf?(1<<2):0);
_7d4|=(_7d1?(1<<4):0);
_7d3|=(_7d4<<16);
return _7d3;
},_getShortCutHashValue:function(_7d5){
return this._getHashValue(_7d5.KeyCode,_7d5.CtrlKey,_7d5.LeftCtrlKey,_7d5.ShiftKey,_7d5.LeftShiftKey,_7d5.AltKey,_7d5.LeftAltKey);
},_findByName:function(_7d6){
var _7d7;
for(var _7d8 in this._shortcuts){
_7d7=this._shortcuts[_7d8];
if(null!=_7d7&&_7d7._name==_7d6){
return _7d7;
}
}
return null;
}};
Telerik.Web.UI.EditorShortCut=function(_7d9,_7da){
this._name=_7d9;
this.setShortCut(_7da);
};
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(_7db){
this._name=_7db;
},setShortCut:function(_7dc){
this._parseShortcutString(_7dc);
},_parseShortcutString:function(_7dd){
if("string"==typeof (_7dd)){
this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
_7dd=_7dd.replace(/\s*/gi,"");
_7dd=_7dd.replace(/\+\+/gi,"+PLUS");
var _7de=_7dd.split("+");
var _7df="";
for(var i=0;i<_7de.length;i++){
_7df=_7de[i].toUpperCase();
switch(_7df){
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=_7df.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(_7e1,_7e2,_7e3){
if(typeof (this._controls[_7e1])=="undefined"){
this._controls[_7e1]={};
}
if(typeof (this._controls[_7e1][_7e2])=="undefined"){
this._controls[_7e1][_7e2]={};
}
var _7e4=this._controls[_7e1][_7e2];
for(var _7e5 in _7e3){
if(typeof (_7e3[_7e5])=="string"){
_7e4[_7e5]=_7e3[_7e5];
}
}
return _7e4;
}};
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(_7e6){
Telerik.Web.UI.RadEditor.initializeBase(this,[_7e6]);
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(_7e7){
this.get_events().addHandler("spellCheckLoaded",_7e7);
},remove_spellCheckLoaded:function(_7e8){
this.get_events().removeHandler("spellCheckLoaded",_7e8);
},get_ajaxSpellCheck:function(){
return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(_7e9){
this._ajaxSpellCheck=_7e9;
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(_7eb){
this._spellAllowAddCustom=_7eb;
},get_spellCheckJSON:function(){
return this._spellCheckJSON;
},set_spellCheckJSON:function(_7ec){
this._spellCheckJSON=_7ec;
},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(_7ee,args){
},raiseEvent:function(_7f0,args){
if(_7f0!="selectionChange"||this.get_mode()==Telerik.Web.UI.EditModes.Design){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"raiseEvent",[_7f0,args]);
}
},_initializeToolProvider:function(){
var _7f2=this;
var _7f3=_7f2.get_toolProviderID();
if(_7f3&&$find(_7f3)){
var _7f4=$find(_7f3);
var _7f5=_7f4.get_dialogOpener();
_7f2.set_dialogOpener(_7f5);
var _7f6=_7f4.get_contextMenusJSON();
if(_7f6&&_7f6.concat){
_7f2.set_contextMenusJSON(_7f6.concat([]));
}
var _7f7=_7f4.get_modulesJSON();
if(_7f7&&_7f7.concat){
_7f2.set_modulesJSON(_7f7.concat([]));
}
var root=this.get_toolContainer();
root.innerHTML="";
this._toolJSON=[];
var html=_7f4.get_toolHTML();
root.innerHTML=html;
var json=_7f4.get_toolJSON().concat([]);
this.set_toolJSON(json);
if(_7f4.get_spellCheckJSON){
_7f2.set_spellCheckJSON(_7f4.get_spellCheckJSON());
}
if(_7f4.get_ajaxSpellCheckScriptReference){
var ref=_7f4.get_ajaxSpellCheckScriptReference();
if(ref){
_7f2.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 _7fd=this;
window.setTimeout(function(){
if($telerik.isIE){
var area=_7fd.get_contentArea();
if(!area){
return;
}
try{
var _7ff=Telerik.Web.UI.Editor.Utils.storeBrowserPosition();
var r=area.createTextRange();
var _801=document.body.createTextRange();
if(_7ff&&_7ff.y>0){
_801.moveToElementText(_7fd.get_contentAreaElement());
}else{
_801.moveStart("textedit",_801.text.length);
}
_801.collapse(true);
_801.select();
if(_7ff&&_7ff.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 _802=this.get_mainTable();
this._originalHeight=_802.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
this._createTools();
this._makeResizeable(true);
var _803=$get(this.get_id()+"ContentHiddenTextarea");
if(_803){
_803.setAttribute("id",this.get_id());
this._contentHiddenTextarea=_803;
}
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 _804=$get(this.get_id()+"Module");
_804.style.display="none";
var _805=this;
window.setTimeout(function(){
_805._modulesManager.initialize();
_804.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 _807=this.get_element().getAttribute("accessKey");
if(_807){
this.get_element().removeAttribute("accessKey");
var _808=document.createElement("input");
_808.setAttribute("name",this.get_id()+"EditorAccessKey");
_808.setAttribute("type","text");
_808.setAttribute("id",this.get_id()+"EditorAccessKey");
_808.setAttribute("accessKey",_807);
this._accessKeyTextbox=_808;
$addHandlers(this._accessKeyTextbox,{"focus":this.setFocus},this);
var _809=document.createElement("div");
_809.style.width="0px";
_809.style.height="0px";
_809.style.overflow="hidden";
_809.appendChild(this._accessKeyTextbox);
this.get_element().appendChild(_809);
}
},_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 _80a=this;
this.attachEventHandler("keydown",function(e){
if(!_80a._isKeyUpButton(e)){
_80a._resizeContentArea(e);
}
});
this.attachEventHandler("keyup",function(e){
if(_80a._isKeyUpButton(e)||(e.keyCode==13&&!_80a.isIE)){
_80a._resizeContentArea(e);
}
});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
},_isKeyUpButton:function(e){
var _80e=e.keyCode;
if(_80e==8||_80e==46){
return true;
}
return false;
},_getCurrentFontSize:function(){
var o=this.getSelectedElement();
var _810=parseInt($telerik.getCurrentStyle(o,"fontSize"));
return _810;
},_resizeContentArea:function(e){
var body=this.isIE?this._document.body:this._document.documentElement;
var _813=this._contentAreaElement;
var _814=_813.parentNode;
var _815=this._initialContentHeight;
var _816=_813.offsetHeight;
var _817=body.scrollHeight+(e&&e.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(_817==_816){
return;
}
if((_815==_816)&&(_817<=_815)){
return;
}
var _818=(_817>_815)?_817:_815;
_813.style.height=_818+"px";
if(_817>_816){
_814.style.height=parseInt(_817)+"px";
}else{
var _819=this.get_element();
var _81a=_819.offsetHeight-(_814.offsetHeight-_813.offsetHeight);
if(_813.style.height!="100%"){
_814.style.height="";
this._updateEditorSize(_81a);
}
return;
}
this._updateEditorSize(null,true);
},_makeResizeable:function(_81b){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_81b){
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 _81c={se:this._bottomResizer};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._rootElement,_81c,this._tableElement);
},_getInvisibleParent:function(){
return Telerik.Web.UI.Editor.Utils.getInvisibleParent(this.get_element());
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixIEVisibilityProblems:function(_81d){
if(!this.isIE){
return;
}
if(_81d){
var _81e=this._getInvisibleParent();
if(_81e){
this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=_81e;
$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(_81f){
if(this.isIE){
return;
}
if(_81f){
var _820=this._getInvisibleParent();
if(_820){
this._invisibleParent=_820;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
_820.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 _822=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_822!="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 _824=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_824,"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 _826=$telerik.isDescendantOrSelf(e.target,this.get_element());
if(_826){
this.onParentNodeChanged();
}
},onParentNodeChanged:function(){
if(!$telerik.isIE){
var _827=this.get_html(true);
var _828=this.get_contentAreaElement();
this._contentWindow=_828.contentWindow;
this._setContentAreaHtml(_827,true);
this.set_editable(true);
}
},onResizeStart:function(){
this._resizeSelection=this.getSelection().getRange();
},onResizeEnd:function(){
if(!this.isIE){
return;
}
this.setActive();
if(this._resizeSelection){
var _829=this._resizeSelection.parentElement();
if(_829&&(this.get_document()==_829.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 _82a=this.getSelection().getRange();
var _82b=this.getSelectedElement();
if(_82a!=null&&_82b!=null&&_82b.ownerDocument!=this.get_document()){
_82a=null;
}
return _82a;
},selectElement:function(_82c,_82d){
if(Telerik.Web.UI.Editor.Utils.selectElement(this.get_contentWindow(),_82c)&&false!=_82d){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},undo:function(_82e){
this._commandsManager.undo(_82e);
},redo:function(_82f){
this._commandsManager.redo(_82f);
},executeCommand:function(_830,_831,_832){
if(!_830.get_window()){
_830.set_window(this.get_contentWindow());
}
if(false!=_831&&!this.isOpera){
this.setFocus();
}
this._commandsManager.execute(_830,_832);
},executeBrowserCommand:function(_833,_834,_835,_836){
var _837=this._localization[_833];
this.executeCommand(new Telerik.Web.UI.Editor.BrowserCommand(_837,this._contentWindow,_833,_835));
this.setActive();
this.setFocus();
if(true==_836){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},createElement:function(_838,_839,_83a,sId,_83c,_83d){
var _83e=this._document.createElement(_838);
if(_839){
_83e.style.width=_839;
}
if(_83a){
_83e.style.height=_83a;
}
if(null!=sId){
_83e.id=sId;
}
if(null!=_83c){
_83e.name=_83c;
}
if(null!=_83d){
_83e.value=_83d;
}
return _83e;
},createRestorePoint:function(){
return new Telerik.Web.UI.Editor.RestorePoint(this._contentWindow);
},getToolState:function(_83f){
if(_83f=="Undo"){
return this.get_commandsManager().isUndoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
if(_83f=="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[_83f];
if(oCmd&&oCmd.getState){
return oCmd.getState(this._contentWindow);
}
}
}
},getToolValue:function(_841){
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_841];
if(oCmd&&oCmd.getValue){
return oCmd.getValue(this._contentWindow);
}else{
if(_841=="RealFontSize"){
var o=this.getSelectedElement();
if(o){
var _844=null;
try{
_844=$telerik.getCurrentStyle(o,"fontSize","");
}
catch(exc){
}
if(_844){
var _845=parseFloat(_844);
if(_845>parseInt(_844)){
if(_844.indexOf("px")>-1){
_844=parseInt(_844)+"px";
}
}
}
return _844;
}
}
}
},_addFilters:function(){
var _846=this.get_filtersManager();
var _847=this.get_contentFilters();
var _848=Telerik.Web.UI.EditorFilters;
_846.clear();
var _849=_847&_848.ConvertToXhtml;
_846.set_enableXhtmlFilter(_849);
if(_849){
_846.add(new Telerik.Web.UI.Editor.CleanAttributesFilter());
}
if(_847&_848.RemoveScripts){
_846.add(new Telerik.Web.UI.Editor.StripScriptsFilter());
}
if(_847&_848.EncodeScripts){
_846.add(new Telerik.Web.UI.Editor.EncodeScriptsFilter());
}
if(_847&_848.FixUlBoldItalic){
_846.add(new Telerik.Web.UI.Editor.FixUlBoldItalic());
}
_846.add(new Telerik.Web.UI.Editor.FixNestedLists());
if(_847&_848.ConvertFontToSpan){
_846.add(new Telerik.Web.UI.Editor.ConvertFontToSpanFilter());
}
if(_847&_848.OptimizeSpans){
_846.add(new Telerik.Web.UI.Editor.OptimizeSpans());
}
if(_847&_848.FixEnclosingP){
_846.add(new Telerik.Web.UI.Editor.FixEnclosingP());
}
if($telerik.isIE){
_846.add(new Telerik.Web.UI.Editor.IEKeepObjectParamsFilter());
_846.add(new Telerik.Web.UI.Editor.IEKeepCommentsFilter());
_846.add(new Telerik.Web.UI.Editor.IEFixEmptyParagraphs());
if(_847&_848.IECleanAnchors){
_846.add(new Telerik.Web.UI.Editor.IECleanAnchorsFilter());
}
}
if(!$telerik.isIE&&!$telerik.isOpera){
if(!$telerik.isSafari){
_846.add(new Telerik.Web.UI.Editor.MozillaKeepFlashString(this.get_mozillaFlashOverlayImage()));
_846.add(new Telerik.Web.UI.Editor.MozillaKeepFlash());
}
_846.add(new Telerik.Web.UI.Editor.MozillaKeepStylesString());
_846.add(new Telerik.Web.UI.Editor.MozillaKeepStylesDom());
if(_847&_848.MozEmStrong){
_846.add(new Telerik.Web.UI.Editor.MozEmStrongFilter());
}
}
_846.add(new Telerik.Web.UI.Editor.StripJunkFilter());
if(_847&_848.MakeUrlsAbsolute){
_846.add(new Telerik.Web.UI.Editor.MakeUrlsAbsolute());
}
_846.add(new Telerik.Web.UI.Editor.RemoveExtraBrakes());
if(_847&_848.IndentHTMLContent){
_846.add(new Telerik.Web.UI.Editor.IndentHTMLContentFilter());
}
},addShortCut:function(_84a,_84b){
if(this._shortCutManager){
this._shortCutManager.addShortCut(_84a,_84b);
}
},removeShortCut:function(_84c){
if(this._shortCutManager){
this._shortCutManager.removeShortCut(_84c);
}
},setShortCut:function(_84d,_84e){
if(this._shortCutManager){
this._shortCutManager.setShortCut(_84d,_84e);
}
},_addDefaultShortCuts:function(){
var _84f=[["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<_84f.length;i++){
this.addShortCut(_84f[i][0],_84f[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(_851,_852){
if(_851.startsWith("on")){
_851=_851.replace("on","");
}
$telerik.addExternalHandler(this._document,_851,_852);
var _853=this._contentAreaEventHandlers;
if(!_853[_851]){
_853[_851]=[];
}
var _854=_853[_851];
_854[_854.length]=_852;
},detachEventHandler:function(_855,_856){
if(_855.startsWith("on")){
_855=_855.replace("on","");
}
$telerik.removeExternalHandler(this._document,_855,_856);
},_detachEvents:function(){
var _857=this._contentAreaEventHandlers;
for(var _858 in _857){
var _859=_857[_858];
if(_859.length!=null){
for(var i=0;i<_859.length;i++){
var _85b=_859[i];
if(typeof (_85b)=="function"){
try{
this.detachEventHandler(_858,_85b);
}
catch(e){
}
}
}
_859=[];
}
}
this._contentAreaEventHandlers={};
this._attachIEBodyHandlers(false);
},get_TopZone:function(){
return $get(this.get_id()+"Top");
},_createTools:function(){
if(!this._toolAdapter){
var _85c=this.get_toolContainer();
var _85d=eval(this._toolAdapterType);
this._toolAdapter=$create(_85d,{"editor":this,"toolJSON":this.get_toolJSON()},{"toolClick":this._onToolClickDelegate},null,_85c);
if(this.isIE){
if(this.get_toolbarMode()==Telerik.Web.UI.EditorToolbarMode.Default){
_85c.style.overflow="";
}
this._updateEditorSize();
}
}
},_onToolClick:function(tool,args){
this.fire(tool.get_name(),args);
},getContextMenuByTagName:function(_860){
if(this._toolAdapter&&this._toolAdapter.getContextMenuByTagName){
return this._toolAdapter.getContextMenuByTagName(_860);
}
},getToolByName:function(_861){
if(this._toolAdapter){
return this._toolAdapter.getToolByName(_861);
}
return null;
},getLocalizedString:function(name,_863){
if(!name){
return _863;
}
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 _866=this.get_contentArea();
if(_866&&_866.setActive){
_866.setActive();
}
},set_visible:function(_867){
var _868=this.get_element();
if(_868){
_868.style.display=_867?"":"none";
}
this.set_editable(_867);
},enableEditing:function(_869,_86a,_86b){
var _86c=this.get_toolAdapter();
var _86d=Telerik.Web.UI.EditingOptions;
var _86e=function(){
};
if(!_86a){
_86a=Telerik.Web.UI.EditingOptions.All;
}
this._editingOptions=_86a;
this._optionalIgnoredTools=_86b;
if(_86a&_86d.ContextMenus){
if(_86c){
_86c.enableContextMenus(_869);
}
}
if(_86a&_86d.EditModes){
if(!_869){
this._originalEditModeRef=this.set_mode;
this.set_mode=_86e;
}else{
if(this._originalEditModeRef){
this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}
}
}
if(_86a&_86d.Tools){
if(_86c){
if(!_869){
_86c.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Disabled);
if(_86b){
var _86f=[];
for(var item in _86b){
var tool=_86c.getToolByName(item);
if(tool){
_86f[_86f.length]=tool;
}
}
_86c.setToolState(_86f);
}
this._originalSetToolStateRef=_86c.setToolState;
_86c.setToolState=_86e;
}else{
_86c.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}
}
}
if(_86a&_86d.Modules){
var _872=this._modulesManager;
if(_872){
_872.setModulesVisible(_869);
}
}
if(_86a&_86d.Typing){
if(!_869){
this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{
if(this._disableTypingDelegate){
this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}
}
}
if(_86a&_86a.Tab){
if(!_869){
this.removeShortCut("InsertTab");
}else{
this.setShortCut("InsertTab","TAB");
}
}
if(_869){
if(_86c){
_86c.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Off);
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},set_editable:function(_873){
if($telerik.isIE||$telerik.isOpera){
var oEd=this;
window.setTimeout(function(){
try{
oEd._document.body.setAttribute("contentEditable",""+_873);
oEd._document.execCommand("2D-Position",false,true);
}
catch(ev){
}
},0);
}else{
var oEd=this;
window.setTimeout(function(){
try{
oEd._document["designMode"]=_873?"on":"off";
if(_873){
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(_875){
if(this.isIE){
this.get_document().body.setAttribute("contentEditable",""+_875);
}
},showExternalDialog:function(url,_877,_878,_879,_87a,_87b,_87c,_87d,_87e,_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(_87a){
var _887=_87a(_885,args);
if(false==_887){
return;
}
_883.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_883.setFocus();
},50);
};
this.get_dialogOpener().openUrl(url,_877,_878,_879,_884,_87b,_87c,_87d,_87e,_87f,_880,_881);
},showDialog:function(_888,_889,_88a){
var _88b=this.getEditorSelectionRange();
var _88c=this;
var _88d=function(_88e,args){
window.setTimeout(function(){
if(_88b!=null){
_88c.getSelection().selectRange(_88b);
}
if(_88a){
var oRes=_88a(_88e,args);
if(false==oRes){
return;
}
_88c.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_88c.setFocus();
},50);
};
this.get_dialogOpener().open(_888,_889,_88d);
if(this.isIE){
var wnd=this.get_dialogOpener()._getDialogContainer(_888);
if(!wnd||wnd._DRAG_ATTACHED){
return;
}
wnd._DRAG_ATTACHED=true;
wnd.add_dragEnd(function(){
if(_88b!=null){
_88c.getSelection().selectRange(_88b);
}
});
}
},_getModeButtonsWrapper:function(){
return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(_892){
if(_892){
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 _894=this.get_mode();
var _895=Telerik.Web.UI.Editor.Utils.getElementParentByTag(e.target,"LI");
if(_895){
var _896=Telerik.Web.UI.EditModes;
var _897=Sys.UI.DomElement;
var a=_895.getElementsByTagName("A")[0];
if(_897.containsCssClass(a,"rade_mode_html")){
_894=_896.Html;
}else{
if(_897.containsCssClass(a,"rade_mode_design")){
_894=_896.Design;
}else{
_894=_896.Preview;
}
}
}
if(_894!=this.get_mode()){
this.set_mode(_894);
}
return $telerik.cancelRawEvent(e);
},_changeModeUI:function(mode){
var _89a=Sys.UI.DomElement;
var _89b=Telerik.Web.UI.EditModes;
var _89c="rade_mode_";
switch(mode){
case _89b.Html:
_89c+="html";
break;
case _89b.Design:
_89c+="design";
break;
case _89b.Preview:
_89c+="preview";
break;
}
var _89d=this._getModeButtonsWrapper();
var as=_89d.getElementsByTagName("A");
for(var i=0;i<as.length;i++){
var a=as[i];
_89a.removeCssClass(a,"rade_mode_selected");
if(_89a.containsCssClass(a,_89c)){
_89a.addCssClass(a,"rade_mode_selected");
}
}
},_isEditModeEnabled:function(_8a1){
return _8a1&this._editModes?true:false;
},get_mode:function(){
return this._mode;
},set_mode:function(_8a2){
this._setEditableDelegate=Function.createDelegate(this,function(){
this.remove_editReady(this._setEditableDelegate);
var _8a3=(this._mode==_8a4.Design);
this.set_editable(_8a3);
this.toggleEnhancedEdit(_8a3);
this._setEditableDelegate=null;
});
this.add_editReady(this._setEditableDelegate);
var _8a5=this._mode;
var _8a4=Telerik.Web.UI.EditModes;
if(_8a5==_8a4.Html||_8a2==_8a4.Html){
var html=this.get_html(true);
this._mode=_8a2;
this._showTextArea(this._mode==_8a4.Html);
this.set_html(html);
}else{
this._mode=_8a2;
this._showTextArea(this._mode==_8a4.Html);
}
this._changeModeUI(_8a2);
if(this._mode!=_8a4.Preview){
this.setFocus();
if(this.isFirefox&&(!this._document||!this._document.body)){
}else{
this.set_editable(true);
}
if(this._mode==_8a4.Design){
this.toggleEnhancedEdit(true);
}
}else{
this.set_editable(false);
this.toggleEnhancedEdit(false);
}
this.setFocus();
var _8a7=this.get_id();
var _8a8=this.get_mainTable();
var _8a9=_8a8.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(_8a9);
},_getTextIframe:function(){
if(!this._textIframe){
var _8aa=this.get_contentAreaElement();
if(_8aa){
this._textIframe=_8aa.cloneNode(true);
this._textIframe.style.position="absolute";
var _8ab=this._textIframe.style;
_8ab.height="2px";
_8ab.width="2px";
_8aa.parentNode.appendChild(this._textIframe);
var doc=this._textIframe.contentWindow.document;
doc.designMode="off";
var _8ad=doc.open("text/html","replace");
var _8ae="<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 (_8ad)=="undefined"){
_8ad=doc;
}
_8ad.write(_8ae);
_8ad.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(_8b0){
var area=this._getTextIframe();
var _8b2=this.get_contentAreaElement();
if(_8b0){
if($telerik.isSafari){
_8b2.style.width="0px";
_8b2.style.height="0px";
}else{
_8b2.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){
_8b2.style.width="100%";
_8b2.style.height="100%";
}else{
_8b2.style.display="";
}
area.style.display="none";
}
},_setContentAsText:function(_8b3){
var area=this._getTextArea();
if(area){
area.value=_8b3;
}
},_getContentAsText:function(){
var area=this._getTextArea();
if(area&&area.value){
var _8b6=area.value;
return _8b6;
}
return "";
},set_html:function(_8b7,_8b8,_8b9){
var _8ba=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_8ba.Html){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(_8b8?_8b8:"Set HTML",this.get_contentWindow());
this._setContentAreaHtml(_8b7);
this.executeCommand(cmd,_8b9);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}else{
this._setContentAsText(_8b7);
}
},get_html:function(_8bc){
var _8bd=null;
var _8be="";
var mode=this.get_mode();
var _8c0=Telerik.Web.UI.EditModes;
if(mode==_8c0.Html){
return this._getContentAsText();
}else{
if(this.get_fullPage()){
if(this._document){
_8bd=this._document.getElementsByTagName("HTML")[0];
_8bd=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(_8bd);
var _8c1=this._getAllSheets(_8bd);
for(var i=0;i<_8c1.length;i++){
var _8c3=_8c1[i];
var _8c4=_8c3.getAttribute("id");
if(_8c4&&_8c4.indexOf("RADEDITORSTYLESHEET")==0){
_8c3.parentNode.removeChild(_8c3);
}
}
if($telerik.isIE||$telerik.isOpera){
_8bd.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}
}
}else{
if(this.get_contentArea()){
if(true==_8bc){
_8bd=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
}else{
_8bd=this.get_contentArea();
}
}
}
}
if(_8bd){
if(true==_8bc){
_8be=this.get_filtersManager().getHtmlContent(_8bd);
}else{
_8be=_8bd.innerHTML;
}
}
var _8c5=_8be.match(/<body[^>]*>/i);
if(_8c5&&_8c5.index==0){
_8be=_8be.trim();
_8be=_8be.substring(_8be.indexOf(">")+1,_8be.length-7);
_8be=_8be.trim();
}
if(this.get_fullPage()&&this._doctypeString){
_8be=this._doctypeString+"\n"+_8be;
}
return _8be;
},set_initialContent:function(_8c6){
if(_8c6!=null){
this._initialContent=_8c6;
}else{
this._initialContent=this.get_html(true);
}
},get_initialContent:function(){
return this._initialContent;
},get_text:function(){
var _8c7=Telerik.Web.UI.EditModes;
var _8c8="";
if(this.get_mode()!=_8c7.Html){
var _8c9=this.get_contentArea();
if(_8c9){
if(_8c9.innerText){
_8c8=_8c9.innerText;
}else{
if(_8c9.textContent!=null){
_8c8=_8c9.textContent;
}else{
_8c8=_8c9.innerHTML.replace(/<\/?[^>]*>/ig,"");
_8c8=_8c8.replace(/&nbsp;/gi,"");
}
}
}
}else{
_8c8=this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}
return _8c8;
},_getUniqueStyleSheetId:function(i){
return "RADEDITORSTYLESHEET"+i;
},_getAllSheets:function(oDoc){
if(!oDoc){
alert("RadEditor._getAllSheets called with no document object provided");
}
var _8cc=oDoc.getElementsByTagName("link");
var _8cd=oDoc.getElementsByTagName("style");
var _8ce=[];
for(var x=0;_8cc[x];x++){
var rel=_8cc[x].rel?_8cc[x].rel:_8cc[x].getAttribute("rel");
if(typeof (rel)=="string"&&rel.toLowerCase().indexOf("style")+1){
Array.add(_8ce,_8cc[x]);
}
}
for(var x=0;_8cd[x];x++){
Array.add(_8ce,_8cd[x]);
}
return _8ce;
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _8d3=str.lastIndexOf(".");
if(_8d3==-1){
return "";
}
var _8d4=str.indexOf(" ",_8d3);
if(-1==_8d4){
_8d4=str.indexOf(":",_8d3);
}
if(-1==_8d4){
_8d4=str.length;
}
return str.substring((_8d3+1),_8d4);
},_createCssFilterObject:function(){
if(this._cssClassesHash){
return;
}
var _8d5=this.get_cssClasses();
if(_8d5&&_8d5.length>0){
var obj={};
var _8d7=_8d5.length;
for(var i=0;i<_8d7;i++){
var oKey=_8d5[i][0];
var oVal=_8d5[i][1];
obj[oKey.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})]=oVal;
}
this._cssClassesHash=obj;
}
},_getFilteredCssClasses:function(_8dc){
this._createCssFilterObject();
if(_8dc&&this._cssClassesHash){
var _8dd=[];
var _8de=_8dc.length;
for(var _8df=0;_8df<_8de;_8df++){
var _8e0=_8dc[_8df];
if(outAlias=this._checkCssFilter(_8e0[1].selectorText)){
_8e0[2]=outAlias;
_8dd[_8dd.length]=_8e0;
}
}
return _8dd;
}else{
return _8dc;
}
},_checkCssFilter:function(_8e1){
if(!_8e1||!this._cssClassesHash){
return null;
}
return this._cssClassesHash[_8e1.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})];
},getCssArray:function(_8e3){
var _8e4=this.get_document();
var _8e5=[];
for(var i=0;i<_8e4.styleSheets.length;i++){
var _8e7=_8e4.styleSheets[i];
try{
this._getStyleSheetRules(_8e5,_8e7,_8e3);
}
catch(e){
}
}
_8e5=this._getFilteredCssClasses(_8e5);
return _8e5;
},_getStyleSheetRules:function(_8e8,_8e9,_8ea){
var _8eb=_8e9.href;
if(_8eb&&_8eb.indexOf("WebResource.axd?")>-1){
return;
}
if(_8eb&&_8eb.indexOf(this.get_contentAreaCssFile())>-1){
return;
}
var _8ec=(_8e9.rules)?_8e9.rules:_8e9.cssRules;
if($telerik.isIE&&_8e9.imports){
for(var k=0;k<_8e9.imports.length;k++){
this._getStyleSheetRules(_8e8,_8e9.imports[k],_8ea);
}
}
for(var j=0;j<_8ec.length;j++){
var _8ef=_8ec[j];
if(_8ef&&_8ef.cssText){
var text=_8ef.cssText.toLowerCase();
if(text.indexOf("@import")>=0&&_8ef.parentStyleSheet&&_8ef.styleSheet&&_8ef.parentStyleSheet!=_8ef.styleSheet){
this._getStyleSheetRules(_8e8,_8ef.styleSheet,_8ea);
continue;
}
}
var str=_8ef&&_8ef.selectorText?_8ef.selectorText:"";
var _8f2=str.lastIndexOf(".");
if(_8f2<0){
continue;
}
var _8f2=str.lastIndexOf(":");
if(_8f2>0){
continue;
}
var _8f3=this._getClassName(_8ef);
_8e8[_8e8.length]=[_8f3,_8ef];
}
},copyStyleSheets:function(_8f4,_8f5){
if(null==_8f4&&null==_8f5){
return;
}
var _8f6=0;
var _8f7=null;
if(_8f5.styleSheets.length==0){
if(_8f5.createStyleSheet){
_8f5.createStyleSheet();
}else{
css=_8f5.createElement("style");
css.media="all";
css.type="text/css";
var _8f8=_8f5.getElementsByTagName("head")[0];
_8f8.appendChild(css);
_8f7=css;
}
}
if(_8f5.styleSheets[0]){
_8f7=_8f5.styleSheets[0];
}
for(var i=0;i<_8f4.styleSheets.length;i++){
try{
var _8fa=_8f4.styleSheets[i];
var _8fb=_8fa.href;
var _8fc=false;
if($telerik.isFirefox){
if(_8fa.ownerNode&&_8fa.ownerNode.tagName.toLowerCase()=="style"){
_8fc=true;
}
}
if(_8fb&&!_8fc){
continue;
}
var _8fd=(_8fa.rules)?_8fa.rules:_8fa.cssRules;
for(var j=0;j<_8fd.length;j++){
var _8ff=_8fd[j];
if(_8f7.addRule){
var _900=_8ff.selectorText;
var oCss=_8ff.style.cssText;
if(oCss&&_900){
_8f7.addRule(_900,oCss,_8f6);
}
}else{
if(_8f7.insertRule){
_8f7.insertRule(_8ff.cssText,_8f6);
}else{
var oCss=_8ff.selectorText+"{"+_8ff.style.cssText+"}";
var _902=_8f5.createTextNode(oCss);
_8f7.appendChild(_902);
}
}
_8f6++;
}
}
catch(exc){
}
}
},_setContentAreaHtml:function(_903,_904){
var _905=this.get_filtersManager().getDesignContent(_903);
this.set_contentHiddenTextareaValue(_905);
var _906=null;
if(-1!=_905.toLowerCase().indexOf("<html")){
this.set_fullPage(true);
_906=_905;
var _907=new RegExp("(<!DOCTYPE(.|\\n)*?>)(.|\\n)*?","g");
this._doctypeString=(_906.match(_907))?_906.match(_907)[0]:"";
}else{
this.set_fullPage(false);
}
if(null!=_906||true==_904){
var _908=this;
var _909=function(){
_90a=false;
try{
_908._document=_908._contentAreaElement.contentWindow.document;
_908._contentWindow=_908._contentAreaElement.contentWindow;
_908._contentArea=_908._document.body;
_908.get_filtersManager().getDesignContentDom(_908.get_contentArea());
var _90b=1;
Telerik.Web.UI.Editor.Utils.addStyleSheet(_908.get_contentAreaCssFile(),_908._document,_908._getUniqueStyleSheetId(0));
var _90c=_908.get_cssFiles();
if(_90c.length>0){
for(var i=0;i<_90c.length;i++){
var _90e=_908._getUniqueStyleSheetId(_90b++);
Telerik.Web.UI.Editor.Utils.addStyleSheet(_90c[i],_908._document,_90e);
}
}else{
if(!_908._fullPage){
_908.copyStyleSheets(document,_908._document);
var _90f=_908._getAllSheets(document);
for(var i=0;i<_90f.length;i++){
var _90e=_908._getUniqueStyleSheetId(_90b++);
var _910=_90f[i];
if(_910.tagName=="LINK"){
var _911=_910.href;
if(_911&&_911.indexOf("WebResource.axd?")>-1){
continue;
}
if(_911){
Telerik.Web.UI.Editor.Utils.addStyleSheet(_910.getAttribute("href"),_908._document,_90e);
}
}else{
if(_910.tagName=="STYLE"){
}
}
}
}
}
var _912=Telerik.Web.UI.Editor.PopupController;
if(_912){
_912.detachFromDocument(_908._document);
_912.attachToDocument(_908._document);
}
_908._initEvents();
if(_908.isVisible()){
_908.raiseEvent("firstShow");
}
if(_908.get_mode()!=Telerik.Web.UI.EditModes.Preview){
_908.set_editable(true);
}else{
_908.set_editable(false);
}
_908.toggleEnhancedEdit(true);
if(_908._document&&_908._document.body){
_908.raiseEvent("editReady",Sys.EventArgs.Empty);
}
}
catch(e){
}
};
if($telerik.isFirefox){
$addHandler(this._contentAreaElement,"load",function(){
if(_90a){
_909();
}
});
}
if(!_906){
_906="<head><style></style></head><body>"+_905+"</body>";
}
try{
var _913=this._contentAreaElement.contentWindow.document;
_913.open();
_913.write(_906);
_913.close();
var _90a=false;
if(_913.body){
_909();
}else{
_90a=true;
}
}
catch(e){
}
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this._contentArea,_905);
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 _915=$get(id+"Center");
var _916=this.get_contentAreaElement();
_916.style.display="none";
var _917=_915.offsetHeight;
_915.appendChild(_916);
_916.style.height="100%";
_916.style.display="";
if(!$telerik.isIE&&_917<160&&_915.offsetHeight>_917+2){
_915.style.height=_917+"px";
}
this._created=true;
},_updateEditorSize:function(_918,_919){
var _91a=this._tableElement;
var _91b=_918?_918:_91a.style.height;
if(true==_919){
_91b=_91a.offsetHeight+"px";
}
if(parseInt(_91b)==0){
return;
}
_91b=parseInt(_91b)+"px";
_91a.style.height=_91b;
if(this.isIE){
this._fixIeHeight(_91a,_91b);
}else{
}
_91a.parentNode.style.height=_91b;
},_fixIeHeight:function(_91c,_91d){
if("CSS1Compat"==document.compatMode){
var _91e=(_91c.offsetHeight-parseInt(_91d));
if(_91e>0){
var _91f=(parseInt(_91c.style.height)-_91e);
if(_91f>0){
_91c.style.height=_91f+"px";
}
}
}
},setSize:function(_920,_921){
var _920=parseInt(_920);
var _921=parseInt(_921);
var _922=this;
var _923=this.get_mainTable();
_923.style.height="";
var _924=_923.parentNode;
_924.style.width=_920+"px";
_924.style.height=_921+"px";
_922._fixIeHeight(_924,_921);
if(_922.isIE){
_923.style.height=_921+"px";
_922._fixIeHeight(_923,_921);
}else{
_923.style.height="100%";
}
},pasteHtml:function(_925,_926,_927,_928,_929){
if(!this.get_editable()){
return;
}
var args=new Telerik.Web.UI.EditorCommandEventArgs(_926,null,_925);
if(false==this._executeCommandEvent("pasteHtml",_926,args)){
return;
}
if(_925!=args.get_value()){
_925=args.get_value();
}
var _92b=this.getLocalizedString(_926);
var mode=this.get_mode();
if(Telerik.Web.UI.EditModes.Design==mode){
this.setFocus();
this.executeCommand(new Telerik.Web.UI.Editor.PasteHtmlCommand(_92b,this._contentWindow,_925,_927),null,_929);
if(_928!=false){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}else{
if(Telerik.Web.UI.EditModes.Html==mode){
var _92d=this._getTextArea();
if(this.isIE){
_92d.setActive();
var _92e=document.selection.createRange();
_92e.text=_925;
}else{
if(_92d.setSelectionRange){
var _92f=_92d.selectionStart;
var _930=_92d.selectionEnd;
var _931=_92d.value.substring(_92f,_930);
var _932=_925;
_92d.value=_92d.value.substring(0,_92f)+_932+_92d.value.substring(_930);
_92d.setSelectionRange(_92f+_932.length,_92f+_932.length);
this.setFocus();
}
}
}
}
},fire:function(_933,args){
if(false==this._executeCommandEvent("commandExecuting",_933,args)){
return;
}
if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[_933]){
return;
}
this.setActive();
this._pendingTextTypeCmd=null;
var _935=Telerik.Web.UI.Editor.CommandList[_933];
var _936=false;
if(_935){
_936=(false!=_935(_933,this,args));
}else{
alert("The command "+_933+" is not implemented yet.");
}
if(_936){
if(!$telerik.isOpera){
this.setFocus();
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
this._executeCommandEvent("commandExecuted",_933,args);
},_executeCommandEvent:function(_937,_938,args){
if(!args){
args=new Telerik.Web.UI.EditorCommandEventArgs(_938);
}
this.raiseEvent(_937,args);
if(args.get_cancel&&args.get_cancel()){
return false;
}
return true;
},_onWindowResize:function(){
var _93a=this._getViewportBounds();
this.setSize(_93a.width,_93a.height,false);
},_registerWindowResizeHandler:function(_93b){
if(_93b){
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 _93c=$telerik.getClientBounds();
var _93d=document.documentElement.scrollLeft||document.body.scrollLeft;
var _93e=document.documentElement.scrollTop||document.body.scrollTop;
_93c.scrollLeft=_93d;
_93c.scrollTop=_93e;
return _93c;
},_handleParentsWithOverflow:function(_93f){
if(false==_93f){
if(!this._parentsWithOverflow){
return;
}
var _940=this._parentsWithOverflow;
var _941=_940.length;
for(var i=0;i<_941;i++){
var _943=_940[i];
if(_943[0]){
var _944=_943[0].style;
_944.overflow=_943[1];
_944.height=_943[2];
_944.tableLayout=_943[3];
_944.position=_943[4];
}
}
this._parentsWithOverflow=null;
}else{
this._parentsWithOverflow=[];
var _940=this._parentsWithOverflow;
var _945=this._getRootNode().parentNode;
while(_945&&_945.tagName!="BODY"){
var _944=_945.style;
_940[_940.length]=[_945,_944.overflow,_944.height,_944.tableLayout,_944.position];
_945.style.position="static";
_945.style.tableLayout="auto";
_945.style.overflow="visible";
_945.style.height="auto";
_945=_945.parentNode;
}
}
},_getRootNode:function(){
return this.get_mainTable().parentNode;
},isFullScreen:function(){
return this._isFullScreen;
},toggleScreenMode:function(){
var _946=this;
if(!_946._isFullScreen){
_946._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){
_946._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}
var _947=_946._getRootNode();
_946._preFullScreenBounds=$telerik.getBounds(_947);
_946._handleParentsWithOverflow(true);
_946._onWindowResize();
_946._preFullScreenBrowserRect=_946._getViewportBounds();
var _948=$telerik.getLocation(_947);
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_948.x,_948.y);
_946._isFullScreen=true;
_946._registerWindowResizeHandler(true);
}else{
_946._registerWindowResizeHandler(false);
document.body.scroll=_946._preFullScreenBodyStyle[0];
try{
document.body.style.margin=_946._preFullScreenBodyStyle[1];
}
catch(e){
}
document.documentElement.style.overflow=_946._preFullScreenBodyStyle[2];
_946._isFullScreen=false;
_946._handleParentsWithOverflow(false);
var _949=_946._preFullScreenBounds;
_946.setSize(_949.width,_949.height,false);
var _948=_946._preFullScreenBrowserRect;
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_948.scrollLeft,_948.scrollTop);
}
_946.set_editable(true);
_946.setFocus();
var _94a=_946.getToolByName("ToggleScreenMode");
if(_94a){
_94a.setOn(_946._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(_94b){
if($telerik.isSafari&&this._contentHiddenTextarea.innerText!=null){
this._contentHiddenTextarea.innerText=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_94b);
}else{
this._contentHiddenTextarea.value=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_94b);
}
},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(_94d){
this._toolAdapter=_94d;
},get_fullPage:function(){
return this._fullPage;
},set_fullPage:function(_94e){
this._fullPage=_94e;
},get_dialogOpener:function(){
return this._dialogOpener;
},set_dialogOpener:function(_94f){
this._dialogOpener=_94f;
},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(_950){
this._links=_950;
},get_language:function(){
if(null==this._language){
return "en-us";
}
return this._language.toLowerCase();
},set_language:function(_951){
this._language=_951;
},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(_952){
this._colors=_952;
},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(_953){
this._fontNames=_953;
},get_fontSizes:function(){
if(null==this._fontSizes){
return [1,2,3,4,5,6,7];
}
return this._fontSizes;
},set_fontSizes:function(_954){
this._fontSizes=_954;
},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(_955){
this._symbols=_955;
},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(_956){
this._realFontSizes=_956;
},get_contextMenus:function(){
if(null==this._contextMenus){
return [];
}
return this._contextMenus;
},set_contextMenus:function(_957){
this._contextMenus=_957;
},get_snippets:function(){
if(null==this._snippets){
return [];
}
return this._snippets;
},set_snippets:function(_958){
this._snippets=_958;
},get_cssClasses:function(){
if(null==this._cssClasses){
return [];
}
return this._cssClasses;
},set_cssClasses:function(_959){
this._cssClasses=_959;
},get_cssFiles:function(){
if(null==this._cssFiles){
return [];
}
return this._cssFiles;
},set_cssFiles:function(_95a){
this._cssFiles=_95a;
},get_languages:function(){
if(null==this._languages){
return [];
}
return this._languages;
},set_languages:function(_95b){
this._languages=_95b;
},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(_95c){
this._paragraphs=_95c;
},get_toolsWidth:function(){
return this._toolsWidth;
},set_toolsWidth:function(_95d){
this._toolsWidth=_95d;
},get_toolProviderID:function(){
return this._toolProviderID;
},set_toolProviderID:function(_95e){
this._toolProviderID=_95e;
},get_autoResizeHeight:function(){
return this._autoResizeHeight;
},set_autoResizeHeight:function(_95f){
this._autoResizeHeight=_95f;
},get_toolbarMode:function(){
return this._toolbarMode;
},set_toolbarMode:function(_960){
this._toolbarMode=_960;
},get_editModes:function(){
return this._editModes;
},set_editModes:function(_961){
this._editModes=_961;
},get_stripFormattingOptions:function(){
return this._stripFormattingOptions;
},set_stripFormattingOptions:function(_962){
this._stripFormattingOptions=_962;
},get_contentFilters:function(){
return this._contentFilters;
},set_contentFilters:function(_963){
this._contentFilters=_963;
},get_newLineBr:function(){
return this._newLineBr;
},set_newLineBr:function(_964){
this._newLineBr=_964;
},get_contentAreaCssFile:function(){
return this._contentAreaCssFile;
},set_contentAreaCssFile:function(_965){
this._contentAreaCssFile=_965;
},get_mozillaFlashOverlayImage:function(){
return this._mozillaFlashOverlayImage;
},set_mozillaFlashOverlayImage:function(_966){
this._mozillaFlashOverlayImage=_966;
},get_toolAdapterType:function(){
return this._toolAdapterType;
},set_toolAdapterType:function(_967){
this._toolAdapterType=_967;
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_968){
this._toolJSON=_968;
},get_modulesJSON:function(){
return this._modulesJSON;
},set_modulesJSON:function(_969){
this._modulesJSON=_969;
},get_contextMenusJSON:function(){
return this._contextMenusJSON;
},set_contextMenusJSON:function(_96a){
this._contextMenusJSON=_96a;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_96b){
this._uniqueID=_96b;
},get_useClassicDialogs:function(){
return this.get_dialogOpener().get_useClassicDialogs();
},set_useClassicDialogs:function(_96c){
this.get_dialogOpener().set_useClassicDialogs(_96c);
},get_skin:function(){
if(!this._skin){
return "Default";
}
return this._skin;
},set_skin:function(_96d){
this._skin=_96d;
},get_qualifiedSkin:function(){
var skin=this.get_skin();
return "radeditor."+skin;
},_registerClientValidation:function(){
if(typeof (Page_ClientValidate)=="function"){
var _96f=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(_970){
var _971=this.get_element();
if(_971){
var _972=this.get_html(true);
this.set_contentHiddenTextareaValue(_972);
_971.value=_972;
_971.setAttribute("value",_972);
}
_971=null;
return _96f(_970);
});
}
},saveContent:function(){
if(this._saveContentDelegate){
this.raiseEvent("submit",Sys.EventArgs.Empty);
var _973=this.get_html(true);
this.set_contentHiddenTextareaValue(_973);
}
},_registerPostBackHandlers:function(){
this._saveContentDelegate=Function.createDelegate(this,this.saveContent);
var _974=this._contentHiddenTextarea.form;
$telerik.addExternalHandler(_974,"submit",this._saveContentDelegate);
if(typeof (__doPostBack)!="undefined"){
var _975=this._saveContentDelegate;
var _976=__doPostBack;
__doPostBack=function(_977,_978){
_975();
_976(_977,_978);
};
}
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;
}
_974=null;
},toggleEnhancedEdit:function(_97a){
if(!this.get_document()){
return false;
}
var _97b=this.get_document().getElementById(this._getUniqueStyleSheetId(0));
if(_97b){
if(_97a==null){
_97a=_97b.disabled;
}
_97b.disabled=!_97a;
var tool=this.getToolByName("ToggleTableBorder");
if(tool){
tool.setOn(_97a);
}
return _97a;
}else{
return false;
}
},pasteHyperLink:function(_97d,_97e){
if($telerik.isIE){
var sel=this.getSelectedElement();
if(sel.tagName=="IMG"&&sel.parentNode&&sel.parentNode.tagName=="A"){
var _980=sel.parentNode;
_980.parentNode.removeChild(_980);
}
if(sel.tagName=="IMG"){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_97d,Telerik.Web.UI.Editor.Utils.getOuterHtml(sel));
}
}
if($telerik.isOpera){
var sel=this.getSelectedElement();
if(sel.tagName=="A"){
this.fire("Unlink");
}
}
if("DocumentManager"==_97e){
var _981=this.getSelection().getText();
if(""!=_981.trim()){
_97d.innerHTML=_981;
}
}
var _982=Telerik.Web.UI.Editor.Utils.getOuterHtml(_97d);
this.pasteHtml(_982,_97e);
},_saveTypedContent:function(_983,_984){
if(this._pendingTextTypeCmd){
this._pendingTextTypeCmd.update();
}
if(true!=_983){
this._pendingTextTypeCmd=null;
}
},_attachIEBodyHandlers:function(_985){
var body=null;
if(this._document&&this._document.body){
body=this._document.body;
}
if(!body){
return;
}
if(_985){
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 _987=this;
var _988=_987.fire;
_987.fire=function(_989,_98a){
if(_989!="Copy"){
_987._saveTypedContent(true,"editor.fire "+_989+" executing");
}
_988.call(_987,_989,_98a);
try{
if(_989=="Undo"&&!_987.isIE&&_987._document.body.innerHTML.toLowerCase().trim()=="<br>"){
_987._document.body.innerHTML="<br>";
}
}
catch(e){
}
};
if(!this.isIE){
this.attachEventHandler("keypress",function(e){
if(_987._onKeyPressed(e)){
e.preventDefault();
return false;
}
});
this.attachEventHandler("click",function(e){
if(!_987.isFirefox){
return;
}
if(!_987.get_editable()){
return;
}
if("on"==_987._document["designMode"]){
window.setTimeout(function(){
_987.set_editable(true);
_987.setFocus();
},100);
}
});
}
this.attachEventHandler("keydown",function(e){
if(_987.isOpera){
return _987._onKeyDown(e);
}else{
_987._onKeyDown(e);
}
});
this.attachEventHandler("onmousedown",function(){
_987._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var _98e=Function.createDelegate(this,function(e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",_98e);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachIEBodyHandlers(true);
},_onKeyDown:function(e){
var _991=e.keyCode;
switch(_991){
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 _992=this;
var _993=function(){
var _994=_992.getSelectedElement();
if(_994&&_994.tagName=="EMBED"){
_994.setAttribute("hidden","true");
_994.setAttribute("id","FileToDelete");
window.setTimeout(function(){
var _995=_992._document.getElementById("FileToDelete");
if(_995.parentNode&&_995.parentNode.removeChild){
_995.parentNode.removeChild(_995);
}
},100);
$telerik.cancelRawEvent(e);
return true;
}
};
var _996=_993();
if(_996){
return false;
}
try{
var _997=_992._document.selection.createRange();
var _998=null;
if(_997&&_997.duplicate){
_998=_997.duplicate();
}
if(8==e.keyCode){
_997.moveStart("character",-1);
}else{
_997.moveEnd("character",1);
}
if(_997.parentElement().tagName=="EMBED"){
_997.select();
_993();
if(_998&&_998.select){
_998.select();
}
}
}
catch(ex){
}
var _999=new Telerik.Web.UI.Editor.Selection(this._contentWindow);
if(_999&&_999.isControl()){
var _99a=_999.getRange();
_99a.execCommand("Delete");
$telerik.cancelRawEvent(e);
}
}
return;
}
var _99b=e.target?e.target:e.srcElement;
if(_99b&&"INPUT"!=_99b.tagName){
var _99c=this._shortCutManager.isShortCutHit(e);
if(null!=_99c&&_99c.get_name()=="Copy"){
this._shortcutHit=false;
return;
}
this._shortcutHit=(null!=_99c);
if(this._shortcutHit){
this.fire(_99c.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=_99c.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(_9a0,_9a1,_9a2,_9a3){
var _9a4=this;
var _9a5=(this.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _9a6=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_9a1,_9a4.get_stripFormattingOptions(),_9a4.get_localization()["askwordcleaning"],_9a5);
if(_9a0){
_9a0.select();
}
if(_9a6){
window.setTimeout(function(){
if(_9a3&&_9a0){
_9a0.select();
}
_9a4.pasteHtml(_9a6);
},5);
return $telerik.cancelRawEvent(_9a2);
}
return true;
},_onPaste:function(_9a7){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _9a8=this.createRestorePoint();
var _9a9=this.getSelectionHtml()?true:false;
var _9aa=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
return this._insertPastedContent(_9a8,_9aa,_9a7,_9a9);
},_onBeforePaste:function(_9ab){
if(_9ab){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _9ac=new Telerik.Web.UI.Editor.GenericCommand("Paste",this._contentWindow);
var _9ad=this.getSelection().getRange();
var _9ae=Telerik.Web.UI.Editor.Utils.getUniqueID();
if(_9ad.pasteHTML){
_9ad.pasteHTML("&nbsp;<font id='"+_9ae+"'>&nbsp;</font>");
}else{
this.pasteHtml("<font id='"+_9ae+"'>&nbsp;</font>");
}
var _9af=Telerik.Web.UI.Editor.Utils.getPasteContainer();
_9af.innerHTML="";
if(_9af.setActive){
_9af.setActive();
}else{
var _9b0=this.getSelection();
var _9b1=_9b0.getRange();
if(_9b1.selectNodeContents){
_9b1.selectNodeContents(_9af);
}
_9b0.selectRange(_9b1);
}
var _9b2=this;
window.setTimeout(function(){
var _9b3=_9af.innerHTML;
var _9b4=(_9b2.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _9b5=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_9b3,_9b2.get_stripFormattingOptions(),_9b2.get_localization()["askwordcleaning"],_9b4);
var _9b6=_9b2._document.getElementById(_9ae);
_9b2.setActive(true);
_9b2._pendingCutPasteCommand=null;
if(_9b2._document.body.createTextRange){
var _9b7=_9b2._document.body.createTextRange();
_9b7.moveToElementText(_9b6);
_9b7.moveStart("character",-1);
_9b7.select();
_9b7.pasteHTML(_9b5);
}else{
_9b2.selectElement(_9b6);
_9b2.pasteHtml(_9b5);
}
_9b2.executeCommand(_9ac);
_9b2.setActive(true);
_9b2.setFocus(true);
},0);
}
},_onResizeStart:function(e){
var _9b9=this.getSelectedElement();
if(_9b9==e.srcElement){
var _9ba=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new Telerik.Web.UI.Editor.GenericCommand(_9ba,this._contentWindow);
}
},_onResizeEnd:function(e){
if(this._pendingResizeCmd){
this.executeCommand(this._pendingResizeCmd);
}
},_onDragStart:function(e){
var _9bd=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new Telerik.Web.UI.Editor.GenericCommand(_9bd,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 _9bf=this._startRange.item(0);
if("IMG"==_9bf.tagName&&"A"==_9bf.parentNode.tagName&&_9bf.parentNode.childNodes.length==1){
_9bf=_9bf.parentNode;
}
rng.moveToElementText(_9bf);
this._startRange=rng;
}
}
},_onDragEnd:function(e){
if(this._pendingMoveCommand){
if(this._startRange){
var _9c1=this._contentWindow.document.selection.createRange();
if(_9c1.length){
var rng=this._contentWindow.document.body.createTextRange();
rng.moveToElementText(_9c1.item(0));
_9c1=rng;
}
try{
if(_9c1.compareEndPoints&&0!=_9c1.compareEndPoints("StartToStart",this._startRange)&&0!=_9c1.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 _9c4=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new Telerik.Web.UI.Editor.GenericCommand(_9c4,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(_9c6){
this.get_events().addHandler("toggleScreenMode",_9c6);
},remove_toggleScreenMode:function(_9c7){
this.get_events().removeHandler("toggleScreenMode",_9c7);
},add_modeChange:function(_9c8){
this.get_events().addHandler("modeChange",_9c8);
},remove_modeChange:function(_9c9){
this.get_events().removeHandler("modeChange",_9c9);
},add_load:function(_9ca){
this.get_events().addHandler("load",_9ca);
},remove_load:function(_9cb){
this.get_events().removeHandler("load",_9cb);
},add_init:function(_9cc){
this.get_events().addHandler("init",_9cc);
},remove_init:function(_9cd){
this.get_events().removeHandler("init",_9cd);
},add_selectionChange:function(_9ce){
this.get_events().addHandler("selectionChange",_9ce);
},remove_selectionChange:function(_9cf){
this.get_events().removeHandler("selectionChange",_9cf);
},add_commandExecuting:function(_9d0){
this.get_events().addHandler("commandExecuting",_9d0);
},remove_commandExecuting:function(_9d1){
this.get_events().removeHandler("commandExecuting",_9d1);
},add_commandExecuted:function(_9d2){
this.get_events().addHandler("commandExecuted",_9d2);
},remove_commandExecuted:function(_9d3){
this.get_events().removeHandler("commandExecuted",_9d3);
},add_submit:function(_9d4){
this.get_events().addHandler("submit",_9d4);
},remove_submit:function(_9d5){
this.get_events().removeHandler("submit",_9d5);
},add_editReady:function(_9d6){
this.get_events().addHandler("editReady",_9d6);
},remove_editReady:function(_9d7){
this.get_events().removeHandler("editReady",_9d7);
},add_pasteHtml:function(_9d8){
this.get_events().addHandler("pasteHtml",_9d8);
},remove_pasteHtml:function(_9d9){
this.get_events().removeHandler("pasteHtml",_9d9);
},add_firstShow:function(_9da){
this.get_events().addHandler("firstShow",_9da);
},remove_firstShow:function(_9db){
this.get_events().removeHandler("firstShow",_9db);
}};
Telerik.Web.UI.RadEditor.registerClass("Telerik.Web.UI.RadEditor",Telerik.Web.UI.RadWebControl);

