Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Utils={getInvisibleParent:function(_1){
while(_1!=document){
if("none"==$telerik.getCurrentStyle(_1,"display","")){
return _1;
}
_1=_1.parentNode;
}
return null;
},evalScriptCode:function(_2){
var _3=$telerik.isSafari;
if(_3){
_2=_2.replace(/^\s*<!--((.|\n)*)-->\s*$/mi,"$1");
}
var _4=document.createElement("script");
_4.setAttribute("type","text/javascript");
if(_3){
_4.appendChild(document.createTextNode(_2));
}else{
_4.text=_2;
}
var _5=document.getElementsByTagName("head")[0];
_5.appendChild(_4);
if(_3){
_4.innerHTML="";
}else{
_4.parentNode.removeChild(_4);
}
},cleanPastedContent:function(_6,_7,_8,_9){
var _a=_6;
if(_7==Telerik.Web.UI.StripFormattingOptions.None){
if((_6.match(/style="[^"]*?mso[^"]*?"/ig)||_6.match(/class="?[^"]*?mso[^"]*?"?/ig))&&confirm(_8)){
_a=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"WORD");
}
}else{
if(_7&Telerik.Web.UI.StripFormattingOptions.All){
_a=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"ALL");
}else{
if(_7&Telerik.Web.UI.StripFormattingOptions.AllExceptNewLines){
_a=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"ALL_NO_BRAKES");
}else{
if(_7&Telerik.Web.UI.StripFormattingOptions.MSWordRemoveAll){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"WORD_ALL");
}
if(_7&Telerik.Web.UI.StripFormattingOptions.MSWordNoFonts){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"WORD_NO_FONTS");
}
if(_7&Telerik.Web.UI.StripFormattingOptions.MSWord){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"WORD");
}
if(_7&Telerik.Web.UI.StripFormattingOptions.Css){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"CSS");
}
if(_7&Telerik.Web.UI.StripFormattingOptions.Font){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"FONT");
}
if(_7&Telerik.Web.UI.StripFormattingOptions.Span){
_6=Telerik.Web.UI.Editor.Utils.stripFormatting(_6,"SPAN");
}
_a=_6;
}
}
}
if(null!=_9&&false==_9){
_a=Telerik.Web.UI.Editor.Utils.stripFormatting(_a,"SCRIPT");
}
return _a;
},isCursorMovingKey:function(_b){
if(_b>=33&&_b<=40){
return true;
}
return false;
},isSystemKey:function(_c){
if(_c>=112&&_c<=123){
return true;
}
if(_c>=8&&_c<=27){
return true;
}
if(_c>=32&&_c<=46){
return true;
}
if(_c==93){
return true;
}
return false;
},storeBrowserPosition:function(){
var _d=document.body;
var _e=document.documentElement;
this._browserTop=_d.scrollTop>_e.scrollTop?_d.scrollTop:_e.scrollTop;
this._browserLeft=_d.scrollLeft>_e.scrollLeft?_d.scrollTop:_e.scrollLeft;
},restoreBrowserPosition:function(_f,top){
try{
if(null==_f){
_f=this._browserLeft;
}
if(null==top){
top=this._browserTop;
}
var _11=document.body;
var _12=document.documentElement;
_11.scrollTop=top;
_11.scrollLeft=_f;
_12.scrollTop=top;
_12.scrollLeft=_f;
}
catch(ex){
}
},_getPasteIframe:function(){
if(!this._pasteIframe){
this._pasteIframe=document.createElement("IFRAME");
var _13=this._pasteIframe.style;
_13.width="1px";
_13.height="1px";
_13.border="0px solid red";
_13.overflow="hidden";
_13.position="absolute";
document.body.appendChild(this._pasteIframe);
var doc=this._pasteIframe.contentWindow.document;
var _15=doc.open("text/html","replace");
var _16="<html><head><title>New Document</title></head>"+"<body contentEditable='true' style='overflow:hidden;margin:0px;padding:0px;height:100%'>"+"</html>";
_15.write(_16);
_15.close();
}
return this._pasteIframe;
},getPasteContainer:function(){
var _17=this._getPasteIframe();
return _17.contentWindow.document.body;
},getClipboardAsHtml:function(){
var div=this.getPasteContainer();
div.innerHTML="";
div.setActive();
document.execCommand("Paste",null);
var _19=div.innerHTML;
div.innerHTML="";
return _19;
},stripFormatting:function(_1a,_1b){
switch(_1b){
case "ALL":
_1a=_1a.replace(/<\/?[^>]*>/ig,"");
break;
case "ALL_NO_BRAKES":
_1a=_1a.replace(/<BR(\s[^>]*)?\/?>/ig,"~RADEDITORBRAKE~");
_1a=_1a.replace(/<\/?[^>]*>/ig,"");
_1a=_1a.replace(/~RADEDITORBRAKE~/ig,"<br/>");
_1a=_1a.replace(/\n/ig,"<br/>");
_1a=_1a.replace(/\r/ig,"");
break;
case "WORD":
case "WORD_ALL":
case "WORD_NO_FONTS":
_1a=this.stripWordFormatting(_1a,_1b);
break;
case "CSS":
_1a=_1a.replace(new RegExp("(<[^>]+) class=[^ |^>]*([^>]*>)","ig"),"$1 $2");
_1a=_1a.replace(/(<[^>]+) style="[^"]*"([^>]*>)/ig,"$1 $2");
break;
case "FONT":
_1a=_1a.replace(/<\/?font[^>]*>/ig,"");
break;
case "SPAN":
_1a=_1a.replace(/<\/?span[^>]*>/ig,"");
break;
case "SCRIPT":
_1a=_1a.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_1a=_1a.replace(new RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
break;
default:
break;
}
return _1a;
},replaceNewLineWithBr:function(_1c){
try{
_1c=_1c.replace(/\n/g,"<br>");
return _1c;
}
catch(exc){
}
},convertText2Html:function(_1d){
try{
_1d=_1d.replace(/</g,"&lt;");
_1d=_1d.replace(/>/g,"&gt;");
_1d=_1d.replace(/\n/g,"<br>");
return _1d;
}
catch(exc){
}
},clearWordAttributesInElement:function(_1e,_1f){
var _20=$telerik.isIE?_1e.all:_1e.getElementsByTagName("*");
for(var i=0;i<_20.length;i++){
var _22=_20[i];
var _23=new RegExp("mso","gi");
if(_22.nodeType==1){
if(_23.exec(_22.className)){
_22.className="";
}
_22.removeAttribute("lang","",0);
_22.removeAttribute("stylw","",0);
_22.style.cssText=_22.style.cssText.replace(/(([\w-]*?mso[\w-]*?):(.+?)([;^$]|$))/gi,"");
if($telerik.isIE){
_22.style.removeAttribute("tab-stops",0);
_22.style.removeAttribute("textIndent",0);
}
if($telerik.isIE&&(_1f=="WORD_NO_FONTS"||_1f=="WORD_ALL")){
_22.style.removeAttribute("fontFamily",0);
_22.removeAttribute("face",0);
}
for(j=_22.attributes.length-1;j>=0;j--){
var _24=_22.attributes[j];
if("null"!=_24.value&&""!=_24.value){
if(_23.exec(_24.name)||_23.exec(_24.value)){
_22.removeAttribute(_24.name);
}
}
}
}
}
},stripWordFormatting:function(_25,_26){
if(_26=="WORD_ALL"){
var _27=/<SPAN[^>]*?>([\s\S]*?)<\/SPAN[^>]*?>/ig;
while(_25.match(_27)){
_25=_25.replace(_27,"$1");
}
var _28=/<FONT[^>]*?>([\s\S]*?)<\/FONT[^>]*?>/ig;
while(_25.match(_28)){
_25=_25.replace(_28,"$1");
}
}
_25=_25.replace(/<span>([^<>]+)<\/span>/gi,"<span EditorSaved='true'>$1</span>");
_25=_25.replace(/<font>([^<>]+)<\/font>/gi,"<font EditorSaved='true'>$1</font>");
var _29=document.createElement("DIV");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_29,_25);
this.clearWordAttributesInElement(_29,_26);
var _2a=_29.innerHTML;
_2a=_2a.replace(/\t/g," ");
_2a=_2a.replace(/<\/?\w+:[^>]*>/gi,"");
_2a=_2a.replace(/<\\?\??xml[^>]>/gi,"");
_2a=_2a.replace(/<p>&nbsp;<\/p>/gi,"<BR><BR>");
_2a=_2a.replace(/[ ]+/g," ");
_2a=_2a.replace(/<(\/)?strong>/ig,"<$1B>");
_2a=_2a.replace(/<(\/)?em>/ig,"<$1I>");
_2a=_2a.replace(/^\s/i,"");
_2a=_2a.replace(/\s$/i,"");
_2a=_2a.replace(/<o:[pP]>&nbsp;<\/o:[pP]>/gi,"");
_2a=_2a.replace(/<st1:.*?>/gi,"");
_2a=_2a.replace(/<font>([^<>]+)<\/font>/gi,"$1");
_2a=_2a.replace(/<span>([^<>]+)<\/span>/gi,"$1");
_2a=_2a.replace(/[\s]+EditorSaved=[\'\"]true[\'\"]/gi,"");
_2a=_2a.replace(/<\?xml[^>]*>/ig,"");
_2a=_2a.replace(/<\/?[a-z]+:[^>]*>/ig,"");
_2a=_2a.replace(/style=(""|'')/ig,"");
_2a=_2a.replace(/class=(""|'')/ig,"");
_2a=_2a.replace(/v:shape="[^"]+"/ig,"");
_2a=_2a.replace(/<span[^>]*>\s*<\/span[^>]*>/ig," ");
_2a=_2a.replace(/<font[^>]*>\s*<\/font[^>]*>/ig," ");
_2a=_2a.replace(/\s+/ig," ");
_2a=_2a.replace(/<span><span>/ig,"<span>");
_2a=_2a.replace(/<\/span><\/span>/ig,"</span>");
return _2a;
},createTable:function(_2b,_2c,_2d){
if(!_2d){
_2d=document;
}
var _2e=_2d.createElement("TABLE");
for(var r=0;r<_2b;r++){
oRow=_2e.insertRow(-1);
for(var c=0;c<_2c;c++){
oCell=oRow.insertCell(-1);
oCell.innerHTML="&nbsp;";
}
}
return _2e;
},mergeElementAttributes:function(_31,_32,_33){
if(!_31||!_32){
return;
}
if(_31.mergeAttributes){
_32.mergeAttributes(_31,_33);
}else{
for(var ac=0;ac<_31.attributes.length;ac++){
var _35=_31.attributes[ac].nodeValue;
_32.setAttribute(_31.attributes[ac].nodeName,_35);
}
if(""==_32.getAttribute("style")){
_32.removeAttribute("style");
}
}
},getElementParentByTag:function(_36,_37){
if(null==_36){
return null;
}
if(null==_37){
return _36;
}
try{
while(_36&&null!=_36.tagName&&_36.tagName!=_37){
_36=_36.parentNode;
}
return ((_36.tagName==_37)?_36:null);
}
catch(e){
return null;
}
},selectElement:function(_38,_39){
if(!_39){
return;
}
var _3a=_38.document;
if($telerik.isIE){
var _3b;
switch(_39.tagName){
case "TABLE":
case "IMG":
case "HR":
case "INPUT":
_3b=_3a.body.createControlRange();
_3b.add(_39);
break;
case "UL":
case "OL":
_3b=_3a.body.createTextRange();
_3b.moveToElementText(_39);
var _3c=_3b.parentElement();
if(_3c.tagName!="UL"||_3c.tagName!="OL"){
_3b.moveEnd("character",-1);
}
break;
default:
_3b=_3a.body.createTextRange();
_3b.moveToElementText(_39);
break;
}
if(_3b){
_3b.select();
return true;
}
}else{
if(_38.getSelection){
var _3b=_3a.createRange();
_3b.selectNode(_39);
if(window.opera){
_3b.selectNodeContents(_39);
}
var _3d=_38.getSelection();
if($telerik.isSafari){
_3d.setBaseAndExtent(_3b.startContainer,_3b.startOffset,_3b.endContainer,_3b.endOffset);
}else{
_3d.removeAllRanges();
_3d.addRange(_3b);
}
return true;
}
}
return false;
},getOuterHtml:function(_3e){
return $telerik.getOuterHtml(_3e);
},hasHtmlContent:function(_3f){
if(!_3f||!_3f.match){
return _3f;
}
return _3f.match(/</);
},setElementInnerHtml:function(_40,_41){
var _42=$telerik.isIE?this.getStoredOriginalPathsAndAttributes(_41):_41;
_40.innerHTML="<span>&nbsp;</span>"+_42;
_40.removeChild(_40.firstChild);
if($telerik.isIE){
this.restoreOriginalPathsAndAttributes(_40);
}
},getStoredOriginalPathsAndAttributes:function(_43){
var _44=function(_45,g1,g2,g3,g4,g5,_4b,_4c){
if(!g2){
g2="";
g3=g3+g5;
var _4d=g3.search(/(\s|>)/gi);
if(_4d>0){
g5=g3.substring(_4d,g3.length);
g3=g3.substring(0,_4d);
}else{
return _45;
}
}
return " "+g1+"="+g2+g3+g2+" originalAttribute=\""+g1+"\" originalPath=\""+g3+"\""+g5;
};
var _4e=new RegExp("\\s(href|src)\\s*=\\s*('|\")?(.+?)(\\2)([^<]*?>)","ig");
_43=_43.replace(_4e,_44);
var _4f=new RegExp("(<!--[\\s\\S]*?) originalAttribute=\"(href|src)\" originalPath=\"[^\"]+\"([\\s\\S]*?-->)","ig");
_43=_43.replace(_4f,"$1$3");
return _43;
},restoreOriginalPathsAndAttributes:function(_50){
var _51=_50.getElementsByTagName("*");
for(var i=0;i<_51.length;i++){
var _53=_51[i];
var _54=_53.getAttribute("originalPath");
var _55=_53.getAttribute("originalAttribute");
if(_54!=null&&_55!=null){
_53.removeAttribute("originalPath");
_53.removeAttribute("originalAttribute");
if(_54.toLowerCase().indexOf("mailto:")==0){
continue;
}
_54=_54.replace(window.location.href+"#","#");
_53.removeAttribute(_55);
var _56=_53.innerHTML;
_53.setAttribute(_55,_54);
if(_56.indexOf("www.")==0&&_53.innerHTML.match("[a-z]+://")){
_53.innerHTML=_56;
}
}
}
},_encodeHtmlContent:function(_57,_58){
var _59=new Array("%","<",">","!","\"","#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+");
var _5a=_57;
if(_58){
for(var i=0;i<_59.length;i++){
_5a=_5a.replace(new RegExp("\\x"+_59[i].charCodeAt(0).toString(16),"ig"),"%"+_59[i].charCodeAt(0).toString(16));
}
}else{
for(var i=_59.length-1;i>=0;i--){
_5a=_5a.replace(new RegExp("%"+_59[i].charCodeAt(0).toString(16),"ig"),_59[i]);
}
}
return _5a;
},encodePostbackContent:function(_5c){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_5c,true);
},decodePostbackContent:function(_5d){
return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(_5d,false);
},addStyleSheet:function(url,doc,id){
doc=doc||document;
var _61=doc.createElement("link");
_61.setAttribute("href",url,0);
_61.setAttribute("type","text/css");
if(id){
_61.setAttribute("id",id);
}else{
id="";
}
_61.setAttribute("rel","stylesheet",0);
var _62=doc.getElementsByTagName("head")[0];
if($telerik.isSafari){
var _63=function(){
_62.appendChild(_61);
};
window.setTimeout(_63,200);
}else{
_62.appendChild(_61);
}
},_copyElementsBetweenNodes:function(_64,_65,_66){
var _67=_64.getElementsByTagName(_66);
var _68=_65.getElementsByTagName(_66);
for(var i=0;i<_67.length;i++){
switch(_66){
case "script":
case "title":
_68[i].text=_67[i].text;
break;
case "style":
if(_68[i].innerHTML!=_67[i].innerHTML){
_68[i].styleSheet.cssText=_67[i].styleSheet.cssText;
}
break;
default:
_68[i].innerHTML=_67[i].innerHTML;
break;
}
}
},cloneNodeWithChildren:function(_6a){
if(!_6a){
return null;
}
if($telerik.isIE&&_6a.getElementsByTagName){
var _6b=_6a.cloneNode(true);
if(typeof (_6b.innerHTML)!="string"){
this.setElementInnerHtml(_6b,_6a.innerHTML);
}
this._copyElementsBetweenNodes(_6a,_6b,"script");
this._copyElementsBetweenNodes(_6a,_6b,"map");
this._copyElementsBetweenNodes(_6a,_6b,"style");
this._copyElementsBetweenNodes(_6a,_6b,"title");
return _6b;
}else{
return _6a.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 _6c=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_6c;
}};
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(_6d,_6e,_6f){
this.isSafari=$telerik.isSafari;
this.isIE=$telerik.isIE;
this.isOpera=$telerik.isOpera;
this.isFirefox=$telerik.isFirefox;
this._title=_6d;
this._window=_6e;
this._isExecuted=false;
this._canUnexecute=(_6f!=false);
};
Telerik.Web.UI.Editor.CommandBase.prototype={getState:function(_70){
return Telerik.Web.UI.Editor.CommandStates.Off;
},getValue:function(_71){
return null;
},set_window:function(_72){
this._window=_72;
},get_window:function(){
return this._window;
},get_title:function(){
return this._title;
},set_title:function(_73){
this._title=_73;
},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(_74,_75,_76,_77){
Telerik.Web.UI.Editor.PasteHtmlCommand.initializeBase(this,[(_74||"Insert Html"),_75,true]);
this.HtmlText=_76;
this.SelectText=(true==_77);
};
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(_79,_7a){
Telerik.Web.UI.Editor.GenericCommand.initializeBase(this,[_79,_7a,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(_7b,_7c){
Telerik.Web.UI.Editor.TextTypeCommand.initializeBase(this,[(_7b||"Typing"),_7c]);
};
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(_7d,_7e,_7f,_80){
var _81=true;
switch(this.CommandID){
case "Copy":
case "SelectAll":
case "Print":
_81=false;
break;
}
Telerik.Web.UI.Editor.BrowserCommand.initializeBase(this,[(_7d||_7f),_7e,_81]);
this.CommandID=_7f;
this.Value=_80;
};
Telerik.Web.UI.Editor.BrowserCommand.prototype={clone:function(){
return new Telerik.Web.UI.Editor.BrowserCommand(this._title,this.get_window(),this.CommandID,this.Value);
},getState:function(_82){
try{
_82=_82||this.get_window();
var _83=_82.document;
if(null==_83){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
var _84=true;
if("Paste"!=this.CommandID){
_84=_83.queryCommandEnabled(this.CommandID);
}else{
if(!$telerik.isIE7){
_84=_83.queryCommandEnabled(this.CommandID);
}
}
if(!this.isOpera&&!_84){
if(!this.isSafari||!this.CommandID=="RealFontSize"){
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
}
var _85=null;
if("Paste"!=this.CommandID){
_85=_83.queryCommandState(this.CommandID);
}else{
if(!$telerik.isIE7){
_85=_83.queryCommandState(this.CommandID);
}
}
return _85?Telerik.Web.UI.Editor.CommandStates.On:Telerik.Web.UI.Editor.CommandStates.Off;
}
catch(ex){
return Telerik.Web.UI.Editor.CommandStates.Off;
}
},getValue:function(_86){
try{
_86=_86||this.get_window();
return _86.document.queryCommandValue(this.CommandID);
}
catch(ex){
}
return null;
},onExecute:function(){
var _87=this.get_window();
if(!_87){
return false;
}
var _88=_87.document;
if("AbsolutePosition"==this.CommandID){
_88.execCommand("2D-Position",false,true);
}
var _89=true;
if(this.CommandID=="BackColor"&&(this.isOpera||this.isFirefox)){
this.CommandID="HiliteColor";
_89=false;
}
if(this.CommandID=="FontSize"&&this.isSafari&&!$telerik.isSafari3){
var _8a=parseInt(this.Value);
switch(_8a){
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{
_88.execCommand("UseCSS",false,(false!=_89));
}
catch(e){
}
var _8b=_88.execCommand(this.CommandID,false,this.Value);
try{
_88.execCommand("UseCSS",false,true);
}
catch(e){
}
return _8b;
}};
Telerik.Web.UI.Editor.BrowserCommand.registerClass("Telerik.Web.UI.Editor.BrowserCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.StyleRuleCommand=function(_8c,_8d,_8e,_8f,_90){
Telerik.Web.UI.Editor.StyleRuleCommand.initializeBase(this,[(_8c||sCmdID),_8d,true]);
if(!_8e){
var _91=new Telerik.Web.UI.Editor.Selection(this._window);
_8e=_91.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_8e);
this._styleAttributeName=_8f;
this._newValue=_90;
};
Telerik.Web.UI.Editor.StyleRuleCommand.prototype={clone:function(){
return new Telerik.Web.UI.Editor.StyleRuleCommand(this._title,this._window,null,this._styleAttributeName,this._newValue);
},execute:function(){
var _92=this._nodeBookmark.select();
if(!_92){
return false;
}
if(!this._isExecuted){
this._oldValue=_92.style[this._styleAttributeName];
}
_92.style[this._styleAttributeName]=this._newValue;
this._isExecuted=true;
return true;
},unexecute:function(){
var _93=this._nodeBookmark.select();
_93.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(_94,_95,_96,_97,_98){
Telerik.Web.UI.Editor.AttributeCommand.initializeBase(this,[(_94||sCmdID),_95,true]);
if(!_96){
var _99=new Telerik.Web.UI.Editor.Selection(this._window);
_96=_99.getParentElement();
}
this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,_96);
this._attribName=_97;
this._newValue=_98;
};
Telerik.Web.UI.Editor.AttributeCommand.prototype={clone:function(){
return new Telerik.Web.UI.Editor.AttributeCommand(this._title,this._window,null,this._attribName,this._newValue);
},execute:function(){
var _9a=this._nodeBookmark.select();
if(!_9a){
return false;
}
if(!this._isExecuted){
this._oldValue=_9a.getAttribute(this._attribName);
}
if(this._attribName&&this._attribName.toLowerCase()=="name"&&document.all){
_9a.name=this._newValue;
_9a.removeAttribute("name");
_9a.removeAttribute("NAME");
}
var _9b=this._newValue.trim();
if(""==_9b){
_9a.removeAttribute(this._attribName,0);
if("className"==this._attribName){
_9a.removeAttribute("class",0);
}
}else{
_9a[this._attribName]=this._newValue;
if(this._attribName.toLowerCase()=="nowrap"){
_9a.setAttribute(this._attribName,this._newValue);
}
}
this._isExecuted=true;
return true;
},unexecute:function(){
var _9c=this._nodeBookmark.select();
_9c[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(_9d,_9e,_9f){
Telerik.Web.UI.Editor.ClassNameCommand.initializeBase(this,[(_9d||"Classname"),_9e,true]);
};
Telerik.Web.UI.Editor.ClassNameCommand.prototype={getValue:function(_a0){
_a0=_a0||this._window;
if($telerik.isIE){
return this._getValueIE(_a0);
}else{
return this._getValueMoz(_a0);
}
},_getValueIE:function(_a1){
var _a2=new Telerik.Web.UI.Editor.Selection(_a1);
var _a3=_a2.getParentElement();
if("BODY"==_a3.tagName){
return "";
}else{
return (""==_a3.className?"":_a3.className);
}
},_getValueMoz:function(_a4){
if(!_a4){
return "";
}
var _a5=_a4.getSelection();
if(!_a5){
return "";
}
if(_a5.rangeCount!=1){
return "";
}
var _a6=(_a5.focusNode.nodeType!=3?_a5.focusNode:_a5.focusNode.parentNode);
var _a7=(_a5.anchorNode.nodeType!=3?_a5.anchorNode:_a5.anchorNode.parentNode);
if(_a6!=_a7){
return "";
}
var _a8=new Telerik.Web.UI.Editor.Selection(_a4);
var _a9="",_aa;
if(null!=_a8&&null!=(_aa=_a8.getParentElement())){
_a9=_aa.className;
}
return (""==_a9?"":_a9);
}};
Telerik.Web.UI.Editor.ClassNameCommand.registerClass("Telerik.Web.UI.Editor.ClassNameCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.FormatBlockCommand=function(_ab,_ac,_ad){
Telerik.Web.UI.Editor.FormatBlockCommand.initializeBase(this,[(_ab||"Format Block"),_ac,true]);
this.FormatValue=_ad;
};
Telerik.Web.UI.Editor.FormatBlockCommand.prototype={clone:function(){
return new Telerik.Web.UI.Editor.FormatBlockCommand(this.Title,this._window,this.FormatValue);
},getValue:function(_ae){
try{
_ae=_ae||this._window;
var _af=_ae.document.queryCommandValue("FormatBlock");
if(!document.all){
switch(_af){
case "x":
case "":
_af="Normal";
break;
}
}
return _af;
}
catch(ex){
}
return null;
},_isFormatBlockElement:function(_b0){
if(!_b0||!_b0.tagName){
return false;
}
var _b1=_b0.tagName;
if(_b1=="H1"||_b1=="H2"||_b1=="H3"||_b1=="H4"||_b1=="H5"||_b1=="H6"||_b1=="H7"||_b1=="ADDRESS"||_b1=="PRE"){
return true;
}
},OnExecuteIE:function(){
var _b2=this._window.document;
if("<p>"==this.FormatValue.toLowerCase()){
return _b2.execCommand("FormatBlock",false,"<p>")&&_b2.execCommand("RemoveFormat");
}
var _b3=_b2.selection.createRange();
var _b4=false;
var _b5=_b3.htmlText.trim();
if(_b5&&_b5.length>2&&_b5.substr(0,2).toLowerCase()=="<p"){
_b4=true;
}
if(!_b4&&""!=_b3.text){
var _b6=this.FormatValue.substring(1,this.FormatValue.length-1);
_b2.execCommand("FormatBlock",false,"<p>");
_b2.execCommand("RemoveFormat");
var _b7=_b2.createElement(_b6);
_b7.innerHTML=_b3.htmlText;
_b3.pasteHTML(_b7.outerHTML);
return true;
}else{
return _b2.execCommand("FormatBlock",false,this.FormatValue);
}
},OnExecuteMoz:function(){
var _b8=this.FormatValue.substring(1,this.FormatValue.length-1);
var _b9=this._window.document;
var _ba=("body"==this.FormatValue.toLowerCase()||"normal"==this.FormatValue.toLowerCase());
var _bb=null;
var _bc=_b8.indexOf(" ");
if(_bc!=-1){
_bb=_b8.substring(_bc+1);
_b8=_b8.substring(0,_bc);
}
if(this.isSafari){
if(_ba){
}else{
var _bd=_b9.createElement(_b8);
if(_bb){
var _be="";
_be=_bb.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_be.length>0){
_bd.className=_be;
}
}
var _bf=new Telerik.Web.UI.Editor.Selection(this._window);
_bd.innerHTML=_bf.getHtml();
var _c0=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_bd.outerHTML,true);
_c0.execute();
}
return;
}
if(_ba){
return _b9.execCommand("FormatBlock",false,"Normal");
}
var _c1=this._window.getSelection();
if(_c1.rangeCount<1){
return false;
}
var _c2=_c1.getRangeAt(0);
var _c3=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
if(_c2.toString()!=""&&!this._isFormatBlockElement(_c3)){
try{
var _bd=_b9.createElement(_b8);
if(_bb){
var _be="";
_be=_bb.replace(/class\=[\'|\"]?([^\'|^\"]+)[\'|\"]?/gi,"$1");
if(_be.length>0){
_bd.className=_be;
}
}
_bd.appendChild(_c2.extractContents());
_c2.insertNode(_bd);
return true;
}
catch(ex){
return false;
}
}else{
return _b9.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(_c4,_c5,_c6,_c7,_c8){
Telerik.Web.UI.Editor.InsertListCommand.initializeBase(this,[(_c4||"Insert List"),_c5,true]);
this._newLineBr=(_c6==true);
this._commandName=_c7;
this._listType=(_c7=="InsertOrderedList")?"OL":"UL";
this._listStyle=_c8;
this._document=this._window.document;
};
Telerik.Web.UI.Editor.InsertListCommand.prototype={_insertList:function(){
return this._document.execCommand(this._commandName,false,false);
},_pasteHtml:function(_c9){
var _ca=new Telerik.Web.UI.Editor.PasteHtmlCommand(this.Title,this._window,_c9);
_ca.execute();
},_expandSelection:function(_cb,_cc,_cd){
var _ce=_cb.duplicate();
var _cf=null;
var _d0=null;
for(var i=_cc.length-1;i>=0;i--){
_ce.moveToElementText(_cc[i]);
var _d2=_cb.compareEndPoints("StartToStart",_ce);
if(-1==_d2||0==_d2){
if(_cd[_cc[i].tagName]!=null){
_d0=_cc[i];
}
}else{
if(_cd[_cc[i].tagName]!=null){
_cf=_cc[i];
break;
}
}
}
if(_cf){
_ce.moveToElementText(_cf);
_cb.setEndPoint("StartToEnd",_ce);
}else{
var _d3=_cb.parentElement();
_ce.moveToElementText(_d3);
_cb.setEndPoint("StartToStart",_ce);
}
if(_d0){
_ce.moveToElementText(_d0);
if("BR"==_d0.tagName){
_cb.setEndPoint("EndToEnd",_ce);
}else{
_cb.setEndPoint("EndToStart",_ce);
}
}else{
var _d3=_cb.parentElement();
_ce.moveToElementText(_d3);
_cb.setEndPoint("EndToEnd",_ce);
}
_cb.select();
},_handleEmptyListSelection:function(_d4,_d5){
var _d6=_d4.parentElement();
var _d7=(_d6&&"P"==_d6.tagName.toUpperCase());
var brs=_d6.getElementsByTagName("BR");
if(_d7&&brs.length==0){
return this._insertList();
}else{
var _d9={};
_d9["BR"]="";
_d9["TD"]="";
_d9["OL"]="";
_d9["UL"]="";
_d9["TABLE"]="";
_d9["DIV"]="";
_d9["IMG"]="";
_d9["OBJECT"]="";
var _da=_d4.parentElement().getElementsByTagName("*");
this._expandSelection(_d4,_da,_d9);
if(_d4.htmlText){
return this.OnExecuteIE();
}
}
},OnExecuteIE:function(){
if(!this._newLineBr){
return this._insertList();
}
var _db=new Telerik.Web.UI.Editor.Selection(this._window).getParentElement();
var _dc=this._document.selection.createRange();
if("OL"==_db.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_db,"OL")!=null||"UL"==_db.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_db,"UL")!=null){
return this._insertList();
}else{
if("TD"==_db.tagName||"TR"==_db.tagName||"TBODY"==_db.tagName||"TABLE"==_db.tagName){
var _dc=this._document.selection.createRange();
var _dd=_dc.parentElement().getElementsByTagName("TD");
for(var i=_dd.length-1;i>=0;i--){
brRange=_dc.duplicate();
brRange.moveToElementText(_dd[i]);
if(_dc.inRange(brRange)&&_dd[i].innerHTML!=""){
_dc.moveToElementText(_dd[i]);
}
}
}
}
var _df=this._document.selection;
var _e0=this._listType;
if(_df.type=="Control"){
var _e1=this._document.body.createTextRange();
_e1.moveToElementText(_dc(0));
var _e2=_e1.parentElement();
var _e3=_e2.tagName.toLowerCase();
if(_e3=="table"||_e3=="tbody"){
var _e4=_e2.parentNode.outerHTML;
_e2.parentNode.outerHTML="<"+_e0+"><LI>"+_e4+"</LI></"+_e0+">";
}else{
var _e4=_e1.htmlText;
this._pasteHtml("<"+_e0+"><LI>"+_e4+"</LI></"+_e0+">");
}
}else{
if(_dc.htmlText==""){
return this._handleEmptyListSelection(_dc,this._commandName);
}
var _e5=this._document.createElement("SPAN");
_e5.innerHTML=_dc.htmlText;
if(_e5.getElementsByTagName("P").length>0){
return this._insertList();
}else{
var _e6;
if(_dc.parentElement().tagName.toUpperCase()=="LI"){
_e6=_dc.parentElement().parentNode;
}else{
_e6=_dc.parentElement();
}
if(_e6.tagName.toUpperCase()=="OL"||_e6.tagName.toUpperCase()=="UL"){
var _e7=_e6.tagName.toUpperCase();
if(_e0==_e7){
if(this._newLineBr){
var _e8=_dc.duplicate();
var _e9=_dc.duplicate();
_e9.moveToElementText(_e6);
var _ea=_dc.duplicate();
var _eb=_e6.getElementsByTagName("LI");
var _ec=0;
var _ed=_eb.length-1;
var _ee=_dc.duplicate();
_ee.moveToElementText(_eb[0]);
var _ef=_dc.duplicate();
_ef.moveToElementText(_eb[_eb.length-1]);
_ea.setEndPoint("EndToEnd",_ef);
_ea.setEndPoint("StartToStart",_ee);
while((_ec<_eb.length)&&(_ea.compareEndPoints("StartToStart",_e8)<=0)){
_ea.moveToElementText(_eb[_ec]);
_ea.setEndPoint("EndToEnd",_ef);
_ec++;
}
_ec-=2;
while((_ed>0)&&(_ea.compareEndPoints("EndToEnd",_e8)>=0)){
_ea.moveToElementText(_eb[_ed]);
_ea.setEndPoint("StartToStart",_ee);
_ed--;
}
_ed+=2;
var _f0=_dc.duplicate();
var _f1=_dc.duplicate();
_f0.moveToElementText(_eb[_ec]);
_f0.collapse(true);
_f0.setEndPoint("StartToStart",_e9);
_f1.moveToElementText(_eb[_ed]);
_f1.collapse(false);
_f1.setEndPoint("EndToEnd",_e9);
_dc.setEndPoint("StartToEnd",_f0);
_dc.setEndPoint("EndToStart",_f1);
var _f2="";
var _f3=false;
var _f4=false;
if(_f0.htmlText.replace(/<(.*?)>/)!=""){
_f2+="<"+_e7+">"+_f0.htmlText+"</"+_e7+">";
}else{
_f3=true;
}
_f2+=_dc.htmlText.replace(/<LI\/?>/gi,"<BR>").replace(/<\/LI>/gi,"").replace(/^\s*<BR\/?>/gi,"").replace(/<BR\/?>\s*$/gi,"");
if(_f1.htmlText.replace(/<(.*?)>/)!=""){
_f2+="<"+_e7+">"+_f1.htmlText+"</"+_e7+">";
}else{
_f4=true;
_f2+="<BR>";
}
if(_f3&&_f4){
_f2=_f2.replace(new RegExp("</?"+_e7+"/?>","gi"),"").replace(/^\s*<BR\/?>/gi,"");
}
if(_e6.parentNode.childNodes[0]==_e6){
_e9.collapse();
_e6.parentNode.removeChild(_e6,_f2);
}else{
_e9.moveStart("character",-1);
}
this._pasteHtml(_f2);
}else{
return this._insertList();
}
}else{
return this._insertList();
}
}else{
var _f5=_dc.duplicate();
_f5.collapse(false);
_f5.moveEnd("character",1);
if(_f5.htmlText.match(/<BR\/?>/gi)){
_dc.moveEnd("character",1);
}
var _f6="<"+_e0+"><LI>"+_dc.htmlText.replace(/(<BR\s*>\s*)*$/gi,"").replace(/<BR\/?>$/gi,"").replace(/<BR\/?>/gi,"</LI><LI>")+"</LI></"+_e0+">";
try{
_dc.pasteHTML(_f6);
}
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(_f7,_f8){
Telerik.Web.UI.Editor.TableCommandBase.initializeBase(this,[(_f7||"Table Command"),_f8,true]);
};
Telerik.Web.UI.Editor.TableCommandBase.prototype={getState:function(_f9){
return this.getSelectedCell(_f9)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
},getSelectedCell:function(_fa){
var _fb=new Telerik.Web.UI.Editor.Selection(_fa||this._window);
var _fc;
if(_fb){
_fc=_fb.getParentElement();
}
while(null!=_fc&&_fc.tagName!="TD"&&_fc.tagName!="TH"&&_fc.tagName!="BODY"){
_fc=_fc.parentNode;
}
if(!_fc||!_fc.tagName){
return null;
}
return (_fc.tagName=="TD"||_fc.tagName=="TH"?_fc:null);
},getSelectedRow:function(_fd){
var _fe=new Telerik.Web.UI.Editor.Selection(_fd||this._window);
var _ff;
if(_fe){
_ff=_fe.getParentElement();
}
if(!_ff){
return null;
}
while(null!=_ff&&_ff.tagName!="TR"&&_ff.tagName!="BODY"){
_ff=_ff.parentNode;
}
return (_ff&&_ff.tagName=="TR"?_ff:null);
},getParentTable:function(_100){
if(!_100){
return null;
}
while(null!=_100&&_100.parentNode!=_100&&"TABLE"!=_100.tagName){
_100=_100.parentNode;
}
return (_100&&_100.tagName=="TABLE"?_100:null);
},getNextSiblingCell:function(cell){
if(!cell){
return null;
}
var row=cell.parentNode;
var _103=cell.cellIndex+1;
if(0<=_103&&_103<row.cells.length){
return row.cells[_103];
}
return null;
},getPreviouseSiblingCell:function(cell){
if(!cell){
return null;
}
var row=cell.parentNode;
var _106=cell.cellIndex-1;
if(0<=_106&&_106<row.cells.length){
return row.cells[_106];
}
return null;
}};
Telerik.Web.UI.Editor.TableCommandBase.registerClass("Telerik.Web.UI.Editor.TableCommandBase",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TableInsertRow=function(_107,_108,_109){
Telerik.Web.UI.Editor.TableInsertRow.initializeBase(this,[(_107||"Insert row"),_108,true]);
this._direction=_109||"above";
};
Telerik.Web.UI.Editor.TableInsertRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertRow(this._title,this._window,this._direction);
},getState:function(_10a){
return (this.getSelectedRow(_10a)?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 _10d=row.rowIndex;
if("below"==this._direction){
_10d++;
}
var _10e=this.getParentTable(row);
if(!_10e){
return false;
}
var _10f=_10e.insertRow(_10d);
if(!_10f){
return false;
}
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(row,_10f);
var _110;
for(var i=0;i<row.cells.length;i++){
cell=row.cells[i];
_110=_10f.insertCell(-1);
_110.colSpan=cell.colSpan;
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_110);
_110.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(_112,_113){
Telerik.Web.UI.Editor.TableDeleteRow.initializeBase(this,[(_112||"Delete Row"),_113,true]);
};
Telerik.Web.UI.Editor.TableDeleteRow.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableDeleteRow(this._title,this._window);
},getState:function(_114){
return (this.getSelectedRow(_114)?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(_116,_117,_118){
Telerik.Web.UI.Editor.TableInsertColumn.initializeBase(this,[(_116||"Insert column"),_117,true]);
this._direction=_118||"left";
};
Telerik.Web.UI.Editor.TableInsertColumn.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableInsertColumn(this._title,this._window,this._direction);
},getState:function(_119){
return (this.getSelectedCell(_119)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _11b=cell.cellIndex;
if("right"==this._direction){
_11b++;
}
var _11c=this.getParentTable(cell);
if(!_11c){
return false;
}
var rows=_11c.rows;
var _11e;
for(var i=0;i<rows.length;i++){
_11e=rows[i].insertCell(_11b);
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_11e);
_11e.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(_120,_121,_122){
Telerik.Web.UI.Editor.TableDeleteColumn.initializeBase(this,[(_120||"Delete column"),_121,true]);
};
Telerik.Web.UI.Editor.TableDeleteColumn.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableDeleteColumn.New(this._title,this._window);
},getState:function(_123){
return (this.getSelectedCell(_123)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _125=cell.cellIndex;
var _126=this.getParentTable(cell);
if(!_126){
return false;
}
var rows=_126.rows;
for(var i=0;i<rows.length;i++){
cell=rows[i].cells[_125];
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(_129,_12a){
Telerik.Web.UI.Editor.TableMergeRows.initializeBase(this,[(_129||"Merge rows"),_12a,true]);
};
Telerik.Web.UI.Editor.TableMergeRows.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeRows.New(this._title,this._window);
},getState:function(_12b){
var cell=this.getSelectedCell(_12b);
if(null!=cell&&null!=this.getLowerCell(cell)&&1==cell.colSpan){
return Telerik.Web.UI.Editor.CommandStates.Off;
}else{
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
},onExecute:function(){
var cell=this.getSelectedCell();
if(!cell){
return false;
}
var _12e=this.getLowerCell(cell);
if(!_12e){
return false;
}
if(""!=_12e.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_12e.innerHTML;
}
cell.rowSpan+=_12e.rowSpan;
_12e.parentNode.removeChild(_12e);
return true;
},getLowerCell:function(cell){
if(!cell){
return null;
}
var _130=this.getParentTable(cell);
var row=cell.parentNode;
var _132=_130.rows[row.rowIndex+cell.rowSpan];
if(!_132){
return null;
}
var _133=_132.cells[cell.cellIndex];
return _133;
}};
Telerik.Web.UI.Editor.TableMergeRows.registerClass("Telerik.Web.UI.Editor.TableMergeRows",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeColumns=function(_134,_135){
Telerik.Web.UI.Editor.TableMergeColumns.initializeBase(this,[(_134||"Merge columns"),_135,true]);
};
Telerik.Web.UI.Editor.TableMergeColumns.prototype={clone:function(){
return Telerik.Web.UI.Editor.TableMergeColumns.New(this._title,this._window);
},getState:function(_136){
var cell=this.getSelectedCell(_136);
if(null!=cell&&null!=this.getNextSiblingCell(cell)){
return Telerik.Web.UI.Editor.CommandStates.Off;
}else{
return Telerik.Web.UI.Editor.CommandStates.Disabled;
}
},onExecute:function(){
var cell=this.getSelectedCell();
if(null==cell){
return false;
}
var _139=this.getNextSiblingCell(cell);
if(!_139){
return false;
}
cell.colSpan+=_139.colSpan;
if(""!=_139.innerHTML){
if(""!=cell.innerHTML){
cell.innerHTML+="<br>";
}
cell.innerHTML+=_139.innerHTML;
}
_139.parentNode.removeChild(_139);
return true;
}};
Telerik.Web.UI.Editor.TableMergeColumns.registerClass("Telerik.Web.UI.Editor.TableMergeColumns",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableSplitCell=function(_13a,_13b){
Telerik.Web.UI.Editor.TableSplitCell.initializeBase(this,[(_13a||"Split cell"),_13b,true]);
this._newRows=2;
this._newColumns=2;
};
Telerik.Web.UI.Editor.TableSplitCell.prototype={clone:function(){
return new Telerik.Web.UI.Editor.TableSplitCell(this._title,this._window);
},getState:function(_13c){
var cell=this.getSelectedCell(_13c);
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 _13f=this.getParentTable(cell);
if(!_13f){
return false;
}
var row=cell.parentNode;
var _141=("THEAD"==row.parentNode.tagName.toUpperCase()?"TH":"TD");
if(cell.colSpan>1){
for(i=1;i<this._newColumns;i++){
var _142=this._window.document.createElement(_141);
_142.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_142);
_142.colSpan=1;
if(cell.cellIndex+1<row.cells.length){
row.insertBefore(_142,row.cells[cell.cellIndex+1]);
}else{
row.appendChild(_142);
}
cell.colSpan--;
}
}
if(cell.rowSpan>1){
for(i=1;i<this._newRows;i++){
var _143=_13f.rows[row.rowIndex+cell.rowSpan-1];
if(!_143||0==_143.cells.length){
break;
}
var _142=this._window.document.createElement(_141);
_142.innerHTML=this.isIE?"":"&nbsp;";
Telerik.Web.UI.Editor.Utils.mergeElementAttributes(cell,_142);
_142.rowSpan=1;
if(cell.cellIndex+1<_143.cells.length){
_143.insertBefore(_142,_143.cells[cell.cellIndex+1]);
}else{
_143.appendChild(_142);
}
cell.rowSpan--;
}
}
return true;
}};
Telerik.Web.UI.Editor.TableSplitCell.registerClass("Telerik.Web.UI.Editor.TableSplitCell",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteCell=function(_144,_145){
Telerik.Web.UI.Editor.TableDeleteCell.initializeBase(this,[(_144||"Delete cell"),_145,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(_147){
Telerik.Web.UI.EditorButton.initializeBase(this,[_147]);
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(_148,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 _14c=_148.get_element();
ul.appendChild(_14c);
li=document.createElement("LI");
li.innerHTML="&nbsp;";
li.className="rade_grip grip_last";
ul.appendChild(li);
return ul;
};
Telerik.Web.UI.EditorButton.getToolRootNode=function(_14d){
while(_14d&&_14d.tagName!="LI"){
_14d=_14d.parentNode;
}
return _14d;
};
Telerik.Web.UI.EditorButton._createButton=function(_14e){
var _14f=document.createElement("LI");
var a=document.createElement("A");
_14f.appendChild(a);
a.className=_14e.showText==true?"rade_tool_text":"rade_tool";
var text=_14e["text"];
a.title=text?text:_14e["name"];
a.href="#";
a.setAttribute("unselectable","on");
if(_14e.showIcon!=false){
var span=document.createElement("SPAN");
span.className=_14e.name;
span.innerHTML="&nbsp;";
span.setAttribute("unselectable","on");
a.appendChild(span);
}
if(_14e.showText==true){
var span=document.createElement("SPAN");
span.className="rade_button_text";
span.innerHTML=_14e.text?_14e.text:_14e.name;
span.setAttribute("unselectable","on");
a.appendChild(span);
}
return _14f;
};
Telerik.Web.UI.EditorButton.createTool=function(_153,_154,type,_156,_157){
if(!type){
type=Telerik.Web.UI.EditorButton;
}
if(!_156){
_156=Telerik.Web.UI.EditorButton._createButton(_153);
if(type==Telerik.Web.UI.EditorSplitButton||type.inheritsFrom(Telerik.Web.UI.EditorSplitButton)){
var a=_156.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=_156.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 _15a=_153["width"]?_153["width"]:"50px";
span.style.width=_15a;
a.appendChild(span);
}
}
}
}
var tool=$create(type,_153,_154,null,_156);
if(_157&&_157.appendChild){
_157.appendChild(_156);
}
return tool;
};
Telerik.Web.UI.EditorButton.prototype={initialize:function(){
var _15c=this.getAnchorElement();
if(_15c){
if(!_15c.title||_15c.title.length==0){
_15c.title=this.get_text();
}
_15c.setAttribute("unselectable","on");
}
var span=this.getSpanElement();
if(span){
span.setAttribute("unselectable","on");
}
if(this._addClickHandler){
var _15e=this.get_element();
$addHandlers(_15e,{"click":this.click},this);
}
},dispose:function(){
var _15f=this.get_element();
if(_15f){
$clearHandlers(_15f);
}
Telerik.Web.UI.EditorButton.callBaseMethod(this,"dispose");
},click:function(e){
this.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(e);
},add_valueSelected:function(_161){
this.get_events().addHandler("valueSelected",_161);
},remove_valueSelected:function(_162){
this.get_events().removeHandler("valueSelected",_162);
},raiseEvent:function(_163,_164){
var _165=this.get_events().getHandler(_163);
if(_165){
if(!_164){
_164=Sys.EventArgs.Empty;
}
_165(this,_164);
}
},set_width:function(_166){
var span=this.getSpanElement();
if(span){
span.style.width=_166;
}
},get_width:function(){
return this.get_element().offsetWidth;
},set_height:function(_168){
var span=this.getSpanElement();
if(span){
span.style.height=_168;
}
},get_height:function(){
return this.get_element().offsetHeight;
},isTarget:function(e){
return $telerik.isDescendantOrSelf(this.get_element(),e.target);
},setState:function(_16b){
this.set_enabled(_16b!=Telerik.Web.UI.Editor.CommandStates.Disabled);
this.setOn(_16b==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(_16d){
this._addClickHandler=_16d;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_16e){
this._attributes=_16e;
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_16f){
this._autoPostBack=_16f;
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_170){
if(this._enabled!=_170){
this._enabled=_170;
var _171=this.getAnchorElement();
if(!this._enabled){
this._addAnchorCssClass("rade_tool_disabled");
_171.setAttribute("disabled","disabled");
}else{
this._removeAnchorCssClass("rade_tool_disabled");
_171.removeAttribute("disabled");
}
}
},isOn:function(){
return this._isOn;
},setOn:function(_172){
if(this._isOn!=_172){
this._isOn=_172;
if(this._isOn){
this._addAnchorCssClass("rade_tool_selected");
}else{
this._removeAnchorCssClass("rade_tool_selected");
}
}
},get_name:function(){
return this._name;
},set_name:function(_173){
this._name=_173;
},get_text:function(){
if(!this._text){
return this.get_name();
}else{
return this._text;
}
},set_text:function(_174){
if(this._text!=_174){
this._text=_174;
if(this.get_showText()){
this.getSpanElement().innerHTML=_174;
}
}
},get_shortCut:function(){
return this._shortCut;
},set_shortCut:function(_175){
this._shortCut=_175;
},get_showIcon:function(){
return this._showIcon;
},set_showIcon:function(_176){
if(this._showIcon!=_176){
this._showIcon=_176;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_177){
this._skin=_177;
},_addAnchorCssClass:function(_178){
Sys.UI.DomElement.addCssClass(this.getAnchorElement(),_178);
},_removeAnchorCssClass:function(_179){
Sys.UI.DomElement.removeCssClass(this.getAnchorElement(),_179);
},get_showText:function(){
return this._showText;
},set_showText:function(_17a){
if(this._showText!=_17a){
this._showText=_17a;
}
},get_type:function(){
return this._type;
},set_type:function(_17b){
this._type=_17b;
},get_clientTypeName:function(){
return this._clientTypeName;
},set_clientTypeName:function(_17c){
this._clientTypeName=_17c;
},getAnchorElement:function(){
var _17d=this.get_element().firstChild;
while(_17d!=null&&(_17d.tagName==null)){
_17d=_17d.nextSibling;
}
return _17d;
},getSpanElement:function(){
var _17e=this.getAnchorElement();
var _17f=_17e.firstChild;
while(_17f!=null&&(_17f.tagName==null||_17f.tagName.toLowerCase()!="span")){
_17f=_17f.nextSibling;
}
return _17f;
}};
Telerik.Web.UI.EditorButton.registerClass("Telerik.Web.UI.EditorButton",Sys.UI.Control);
Telerik.Web.UI.EditorSpinBoxEventArgs=function(_180,_181){
Telerik.Web.UI.EditorSpinBoxEventArgs.initializeBase(this);
this._newValue=_180;
this._oldValue=_181;
};
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(_182){
Telerik.Web.UI.EditorSpinBox.initializeBase(this,[_182]);
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._createInputElement();
this._createPlusMinusList();
},_createInputElement:function(){
var _183=document.createElement("INPUT");
_183.setAttribute("size","3");
_183.style.width="30px";
_183.onclick=function(e){
this.focus();
};
_183.onkeypress=Function.createDelegate(this,this._onKeyPressHandler);
_183.onchange=Function.createDelegate(this,this._onChangeHandler);
this._inputElement=_183;
var _185=this.get_element();
_185.appendChild(_183);
_185.style.width=this.get_width();
_185.className=(this.get_skin()+" "+this._className);
},_createPlusMinusList:function(){
var _186=document.createElement("UL");
this.get_element().appendChild(_186);
var _187=document.createElement("LI");
Sys.UI.DomElement.addCssClass(_187,"rade_SpinBox_tool rade_sbt_increase");
_186.appendChild(_187);
var _188=document.createElement("A");
_188.title="Increase";
_188.href="javascript:void(0);";
_188.innerHTML="<span>+</span>";
_188.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
_187.appendChild(_188);
this._increaseButton=_188;
var _187=document.createElement("LI");
Sys.UI.DomElement.addCssClass(_187,"rade_SpinBox_tool rade_sbt_decrease");
_186.appendChild(_187);
var _188=document.createElement("A");
_188.title="Decrease";
_188.href="javascript:void(0);";
_188.innerHTML="<span>-</span>";
_188.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
_187.appendChild(_188);
this._decreaseButton=_188;
},_executeFunction:function(e,elem,_18b){
if(_18b){
if(elem.Executed){
elem.Executed=false;
return $telerik.cancelRawEvent(e);
}
}
elem.Executed=true;
var _18c=(this._selectedItem!="")?this._selectedItem:this._initialValue;
this._selectedItem=elem.value;
var _18d=new Telerik.Web.UI.EditorSpinBoxEventArgs(elem.value,_18c);
this.raiseEvent("valueSelected",_18d);
},_onPlusMinusClickHandler:function(e){
var _18f=null;
if(!e){
_18f=window.event.srcElement;
}else{
_18f=e.target;
}
if(!_18f){
return;
}
var _190=_18f.parentNode;
var _191=this.get_value();
_191=_191.replace(/^0+(\d)/ig,"$1");
if(""==_191){
_191="0";
}
var _192=parseInt(_191);
var _193=_192+"";
if(isNaN(_192)){
return;
}else{
_193=_191.substring(_193.length);
}
if(_190==this._increaseButton){
if(this._enabledIncrease){
_192++;
}else{
return;
}
}else{
if(_190==this._decreaseButton){
if(this._enabledDecrease){
_192--;
}else{
return;
}
}else{
_190=null;
}
}
if(_190){
this.set_value(_192+_193);
this._executeFunction(e,this._inputElement);
}
},_onChangeHandler:function(e){
if(!e){
e=window.event;
}
this._executeFunction(e,this._inputElement);
},_onKeyPressHandler:function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
this._executeFunction(e,this._inputElement);
return $telerik.cancelRawEvent(e);
}
},_onKeyDownHandler:function(e){
if(!e){
var e=window.event;
}
e.returnValue=this._isKeyValid(e);
},_onKeyUpHandler:function(e){
if(!e){
var e=window.event;
}
if(this._isKeyValid(e,true)){
var _198=this._selectedItem;
var _199=this.get_value();
var _19a=new Telerik.Web.UI.EditorSpinBoxEventArgs(_199,_198);
this.raiseEvent("valueSelected",_19a);
}
},_isKeyValid:function(e,_19c){
try{
if(!_19c){
_19c=false;
}
if(!e){
e=window.event;
}
var _19d=((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(!_19c){
_19d|=((35<=e.keyCode&&e.keyCode<=40));
}
return _19d;
}
catch(ex){
return true;
}
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_19e){
if(null==_19e){
_19e="";
}
this._inputElement.value=_19e;
if(this._initialValue==""){
this._initialValue=_19e;
}
},get_width:function(){
return this._width;
},set_width:function(_19f){
this._width=_19f;
var _1a0=this.get_element();
_1a0.style.width=this._width;
},get_enabledIncrease:function(){
return this._enabledIncrease;
},set_enabledIncrease:function(_1a1){
this._enabledIncrease=_1a1;
if(!this._enabledIncrease){
Sys.UI.DomElement.addCssClass(this._increaseButton,"disabled-button");
}else{
Sys.UI.DomElement.removeCssClass(this._increaseButton,"disabled-button");
}
},get_enabledDecrease:function(){
return this._enabledDecrease;
},set_enabledDecrease:function(_1a2){
this._enabledDecrease=_1a2;
if(!this._enabledDecrease){
Sys.UI.DomElement.addCssClass(this._decreaseButton,"disabled-button");
}else{
Sys.UI.DomElement.removeCssClass(this._decreaseButton,"disabled-button");
}
},get_visibleInput:function(){
return this._visibleInput;
},set_visibleInput:function(_1a3){
this._visibleInput=_1a3;
if(!this._visibleInput){
this._inputElement.style.display="none";
}else{
this._inputElement.style.display="";
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_1a4){
this._clientStateFieldID=_1a4;
}};
Telerik.Web.UI.EditorSpinBox.registerClass("Telerik.Web.UI.EditorSpinBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorCheckBox=function(_1a5){
Telerik.Web.UI.EditorCheckBox.initializeBase(this,[_1a5]);
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(_1a6){
if(this._inputElement.checked!=_1a6){
this._inputElement.checked=_1a6;
}
},initialize:function(){
var _1a7=document.createElement("INPUT");
_1a7.setAttribute("type","CHECKBOX");
_1a7.Parent=this;
_1a7.onclick=function(e){
var oP=this.Parent;
oP._selectedItem=!oP._selectedItem;
this.checked=oP._selectedItem;
oP._selectedItem=this.checked;
oP.raiseEvent("valueSelected");
};
this._inputElement=_1a7;
this.get_element().appendChild(_1a7);
}};
Telerik.Web.UI.EditorCheckBox.registerClass("Telerik.Web.UI.EditorCheckBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorTextBox=function(_1aa){
Telerik.Web.UI.EditorTextBox.initializeBase(this,[_1aa]);
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(_1ab){
this._width=_1ab;
},initialize:function(){
var _1ac=document.createElement("INPUT");
_1ac.style.width=this.get_width();
_1ac.Parent=this;
var _1ad=this.get_name();
var _1ae=function(e,elem,_1b1){
if(_1b1){
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);
};
_1ac.onchange=function(e){
if(!e){
e=window.event;
}
return _1ae(e,this,true);
};
_1ac.onclick=function(e){
this.focus();
};
_1ac.onkeypress=function(e){
if(!e){
e=window.event;
}
if(e.keyCode==13){
return _1ae(e,this);
}
};
this._inputElement=_1ac;
this.get_element().appendChild(_1ac);
},get_selectedItem:function(){
return this._selectedItem;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1b5){
if(null==_1b5){
_1b5="";
}
this._inputElement.value=_1b5;
}};
Telerik.Web.UI.EditorTextBox.registerClass("Telerik.Web.UI.EditorTextBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.ImageDialogCaller=function(_1b6){
Telerik.Web.UI.ImageDialogCaller.initializeBase(this,[_1b6]);
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 _1b7=this.get_element();
_1b7.style.width=parseInt(this._inputElement.style.width)+30+"px";
_1b7.className=(this.get_skin()+" "+this._className);
},_createInputElement:function(){
var _1b8=document.createElement("INPUT");
_1b8.style.width=this.get_width();
this._inputElement=_1b8;
this.get_element().appendChild(_1b8);
},_createButton:function(){
var _1b9=document.createElement("A");
_1b9.title="Call Image Manager";
_1b9.href="javascript:void(0);";
_1b9.onclick=Function.createDelegate(this,this._onButtonClickHandler);
_1b9.innerHTML="<span>...</span>";
this.get_element().appendChild(_1b9);
this._pushButton=_1b9;
},_onButtonClickHandler:function(e){
var _1bb=this;
var _1bc=function(_1bd,args){
var src="";
var img=args.Result;
if(img){
src=img.getAttribute("src",2);
}
if(src){
_1bb._inputElement.value=src;
_1bb.raiseEvent("valueSelected");
}
};
var args={editor:this.get_editor()};
this._editor.showDialog("ImageManager",args,_1bc);
},get_editor:function(){
return this._editor;
},set_editor:function(_1c2){
this._editor=_1c2;
},get_value:function(){
return this._inputElement.value;
},set_value:function(_1c3){
if(null==_1c3){
_1c3="";
}
this._inputElement.value=_1c3;
},get_width:function(){
return this._width;
},set_width:function(_1c4){
this._width=_1c4;
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_1c5){
this._clientStateFieldID=_1c5;
}};
Telerik.Web.UI.ImageDialogCaller.registerClass("Telerik.Web.UI.ImageDialogCaller",Telerik.Web.UI.EditorButton);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorDropDown=function(_1c6){
Telerik.Web.UI.EditorDropDown.initializeBase(this,[_1c6]);
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 _1c8=false;
if(!this._rendered){
this.render();
_1c8=true;
}
this.raiseEvent("show");
if(!this._childrenRendered){
this.renderChildren();
this._childrenRendered=true;
_1c8=true;
}
if(_1c8){
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 _1ca=this.resolveActiveIndex(e);
if(_1ca>-1){
this.set_activeIndex(_1ca,e);
}
this._cancelEvent(e);
},_cancelEvent:function(e){
if(e){
e.preventDefault();
e.stopPropagation();
e.returnValue=false;
e.cancelBubble=true;
}
},_onPopupClick:function(e){
var _1cd=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_1cd>-1){
this._selectedIndex=_1cd;
this.hide();
this.raiseEvent("valueSelected");
}
},get_activeIndex:function(){
return this._activeIndex;
},set_activeIndex:function(_1ce,e){
this._activeIndex=_1ce;
this.selectUIItem(e);
},selectPreviousItem:function(){
var _1d0=this.get_activeIndex();
if(_1d0-1>=0){
this.set_activeIndex(_1d0-1);
}
},selectNextItem:function(){
var _1d1=this.get_activeIndex();
if(_1d1+1<this._items.length){
this.set_activeIndex(_1d1+1);
}
},selectUIItem:function(e,_1d3){
if(!this._popupElement){
return;
}
var _1d4=this._popupElement.getElementsByTagName("TD");
var len=_1d4.length;
var _1d6=this.get_activeIndex();
var _1d7=null;
for(var i=0;i<len;i++){
var _1d9=_1d4[i];
if(_1d9.item_index==_1d6){
_1d9.className="rade_itemOver";
_1d7=_1d9;
}else{
if(_1d3&&_1d9.item_index<=_1d6){
_1d9.className="rade_itemOver";
}else{
_1d9.className="";
}
}
}
if(_1d7&&!e){
this._scrollIntoView(_1d7,_1d7.parentNode.parentNode.parentNode.parentNode);
}
return _1d7;
},_scrollIntoView:function(_1da,_1db){
if($telerik.isIE||!_1db){
var _1dc=_1db;
_1dc.scrollTop=0;
var _1dd=_1dc.getClientRects()[0];
var _1de=_1dd.top;
var _1df=_1dd.bottom;
var _1e0=_1da.getClientRects()[0].bottom;
if(_1e0==0){
return;
}
while(_1e0>_1df||_1e0<_1de){
var _1e1="down";
if(_1e0<_1de){
_1e1="up";
}
_1dc.doScroll(_1e1);
_1e0=_1da.getClientRects()[0].bottom;
}
}else{
if(_1da.scrollIntoView){
_1da.scrollIntoView(false);
}
}
},attachEventHandlers:function(){
if(!this._popupElement){
return;
}
this.detachEventHandlers();
this._onPopupMouseOverDelegate=Function.createDelegate(this,this.onPopupMouseOver);
$addHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupClickDelegate=Function.createDelegate(this,this._onPopupClick);
$addHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
},detachEventHandlers:function(){
if(null!=this._onPopupMouseOverDelegate){
$removeHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupMouseOverDelegate=null;
}
if(null!=this._onPopupClickDelegate){
$addHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
this._onPopupClickDelegate=null;
}
},disposeChildren:function(){
this._childrenRendered=false;
if(this._itemRootElement&&this._itemRootElement.parentNode){
var _1e2=this._itemRootElement;
this.renderItemRoot();
_1e2.parentNode.replaceChild(this._itemRootElement,_1e2);
}
},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 _1e3=this._itemRootElement.rows[this._itemRootElement.rows.length-1];
var cell=_1e3.insertCell(-1);
return cell;
},renderChildren:function(){
for(var i=0;i<this._items.length;i++){
if(0==(i%this._itemsPerRow)){
this.renderNewRow();
}
var _1e6=this.renderItemContainer();
this.markItemContainer(_1e6,i);
this.renderChild(_1e6,this._items[i],i);
}
},renderChild:function(_1e7,_1e8,_1e9){
var _1ea=document.createElement("span");
if(_1e8){
var _1eb=null;
var _1ec=null;
if(_1e8 instanceof Array){
_1eb=_1e8[1];
_1ec=_1e8[2];
}else{
_1eb=_1e8;
}
if(_1ec){
var _1ed=document.createElement("span");
_1ed.innerHTML="&nbsp;";
_1ed.className=_1ec;
_1ea.appendChild(_1ed);
}
if(_1eb){
_1ea.innerHTML+=_1eb;
_1ea.noWrap=true;
}
}
_1e7.innerHTML=_1ea.innerHTML;
},resolveActiveIndex:function(e){
var _1ef=e.target;
var _1f0=-1;
while(_1ef&&_1ef!=this._itemRootElement){
if(null!=_1ef.item_index){
_1f0=_1ef.item_index;
break;
}
_1ef=_1ef.parentNode;
}
return _1f0;
},markItemContainer:function(_1f1,_1f2){
_1f1.item_index=_1f2;
},_makeAllItemsUnselectable:function(){
if(!this._popupElement){
return;
}
this._popupElement.setAttribute("unselectable","on");
var _1f3=this._popupElement.getElementsByTagName("*");
var len=_1f3.length;
for(var i=0;i<len;i++){
_1f3[i].unselectable="on";
}
},_show:function(){
this.configurePopupPropertiesBeforeShow();
var _1f6=this._popupElement;
var _1f7=this.get_sizetofit();
var _1f8=_1f6.style.overflow;
if(_1f7){
_1f6.style.overflowY="hidden";
}
_1f6.style.width=this.get_popupwidth();
_1f6.style.height=this.get_popupheight();
this._itemRootElement.style.width="100%";
this._popupBehavior.show();
if(_1f7){
_1f6.style.width=this._getPopupChildrenWidth();
var _1f9=this._getPopupChildrenHeight();
if(_1f9!="0px"){
_1f6.style.height=_1f9;
}
}
this._popupBehavior.show();
this._getPopupVisibilityController().set_activePopup(this);
_1f6.style.zIndex="100000";
if(_1f7){
_1f6.style.overflowY=_1f8;
}
this._popupVisible=true;
},_getPopupChildrenWidth:function(){
var _1fa=this.get_popupElement().childNodes;
var _1fb=0;
for(var i=0;i<_1fa.length;i++){
var _1fd=_1fa[i].offsetWidth;
if(_1fd&&_1fd>_1fb){
_1fb=_1fd;
}
}
return _1fb+"px";
},_getPopupChildrenHeight:function(){
var _1fe=this.get_popupElement().childNodes;
var _1ff=0;
for(var i=0;i<_1fe.length;i++){
if(_1fe[i].offsetHeight){
_1ff+=_1fe[i].offsetHeight;
}
}
return _1ff+"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 _201=window["RadEditor_uniqueSeed"]-window["RadEditor_uniqueIdCounter"];
return "UniqueID"+_201;
},_createUI:function(){
if(this._popupBehavior){
return;
}
var _202=this.get_element();
if(!this._popupElement){
var _203=document.createElement("DIV");
$telerik.addCssClasses(_203,[this.get_skin(),this._rootPopupClassName,this.get_popupclassname()]);
this._popupElement=_203;
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":_202},null,null,this._popupElement);
this.attachEventHandlers();
},_getTable:function(){
var _204=document.createElement("table");
_204.border=0;
_204.cellPadding=0;
_204.setAttribute("unselectable","on");
_204.style.cursor="default";
return _204;
},get_clearSelectedOnShow:function(){
return this._clearSelectedOnShow;
},set_clearSelectedOnShow:function(_205){
this._clearSelectedOnShow=_205;
},get_popupElement:function(){
return this._popupElement;
},get_selectedItem:function(){
if(this._items&&this._selectedIndex>-1){
var item=this._items[this._selectedIndex];
var _207=((true==this._isArrayCollection)||(item instanceof Array))?item[0]:item;
return _207;
}
return null;
},get_selectedIndex:function(){
return this._selectedIndex;
},set_selectedIndex:function(_208){
this._selectedIndex=_208;
this.set_activeIndex(_208);
},get_items:function(){
return this._items;
},set_items:function(_209){
this.disposeChildren();
this._items=_209;
},get_itemsperrow:function(){
return this._itemsPerRow;
},set_itemsperrow:function(_20a){
this._itemsPerRow=_20a;
},get_sizetofit:function(){
return this._sizeToFit;
},set_sizetofit:function(_20b){
this._sizeToFit=_20b;
},get_popupclassname:function(){
return this._popupClassName;
},set_popupclassname:function(_20c){
this._popupClassName=_20c;
},get_rootpopupclassname:function(){
return this._rootPopupClassName;
},set_rootpopupclassname:function(_20d){
this._rootPopupClassName=_20d;
},get_popupwidth:function(){
return this._popupWidth;
},set_popupwidth:function(_20e){
this._popupWidth=_20e;
},get_popupheight:function(){
return this._popupHeight;
},set_popupheight:function(_20f){
this._popupHeight=_20f;
},add_show:function(_210){
this.get_events().addHandler("show",_210);
},remove_show:function(_211){
this.get_events().removeHandler("show",_211);
},add_hide:function(_212){
this.get_events().addHandler("hide",_212);
},remove_hide:function(_213){
this.get_events().removeHandler("hide",_213);
}};
Telerik.Web.UI.EditorDropDown.registerClass("Telerik.Web.UI.EditorDropDown",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorUpdateableDropDown=function(_214){
Telerik.Web.UI.EditorUpdateableDropDown.initializeBase(this,[_214]);
};
Telerik.Web.UI.EditorUpdateableDropDown.prototype={updateValue:function(oVal){
if(null==oVal){
return;
}
try{
if(!oVal){
oVal=this.get_text();
}
var _216=this.getSpanElement();
if(_216){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_216.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(_218){
Telerik.Web.UI.EditorSelfUpdateableDropDown.initializeBase(this,[_218]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.EditorSelfUpdateableDropDown.prototype={_onPopupClick:function(e){
var _21a=this.resolveActiveIndex(e);
this._cancelEvent(e);
if(_21a>-1){
this._selectedIndex=_21a;
this.hide();
var _21b=this.get_selectedItem();
if(_21b){
this.updateValue(_21b);
}
this.raiseEvent("valueSelected");
}
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_21c){
this._clientStateFieldID=_21c;
}};
Telerik.Web.UI.EditorSelfUpdateableDropDown.registerClass("Telerik.Web.UI.EditorSelfUpdateableDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorSplitButton=function(_21d){
Telerik.Web.UI.EditorSplitButton.initializeBase(this,[_21d]);
};
Telerik.Web.UI.EditorSplitButton.prototype={click:function(e){
var _21f=this.isArrowClicked(e.target);
if(_21f){
this.show();
}else{
var _220=this.get_selectedItem();
if(null==_220){
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(_221){
var _222=this._getArrowElement();
if(_221==_222){
return true;
}
return false;
},_getArrowElement:function(){
var _223=this.getAnchorElement().getElementsByTagName("SPAN");
var _224=_223[_223.length-1];
return _224;
}};
Telerik.Web.UI.EditorSplitButton.registerClass("Telerik.Web.UI.EditorSplitButton",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorToolStrip=function(_225){
Telerik.Web.UI.EditorToolStrip.initializeBase(this,[_225]);
this._tools=[];
this._udpateHeader=true;
};
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(_22b){
Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"set_selectedIndex",[_22b]);
if(this.get_updateHeader()){
var tool=this.get_selectedItem();
if(!tool||!tool.getSpanElement){
return;
}
var span=tool.getSpanElement();
if(span){
var _22e=span.cloneNode(true);
var _22f=this.getSpanElement();
var _230=_22f.parentNode;
_230.replaceChild(_22e,_22f);
var _231=tool.getAnchorElement();
if(_231){
_230.setAttribute("title",_231.getAttribute("title"));
}
}
}
},_onPopupClick:function(e){
var tool=this._resolveSelectedTool(e);
this._cancelEvent(e);
if(tool){
var _234=Array.indexOf(this._items,tool);
if($telerik.isSafari){
this._selectedIndex=_234;
this.set_activeIndex(_234);
}else{
this.set_selectedIndex(_234);
}
this.hide();
this.raiseEvent("valueSelected");
}
},renderItemRoot:function(){
var _235=document.createElement("DIV");
_235.className="rade_tlbVertical";
_235.style.cssFloat="left";
_235.style.width="100%";
this._itemRootElement=_235;
return this._itemRootElement;
},renderChildren:function(){
var _236=this.get_itemsperrow();
var _237=this.get_tools();
var ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
for(var i=0;i<_237.length;i++){
if(_236>1&&i>1&&(i%this.get_itemsperrow()==0)){
ul=document.createElement("UL");
ul.className="rade_toolbar "+this.get_skin();
this._itemRootElement.appendChild(ul);
}
var _23a=_237[i];
if(null==_23a["showText"]){
_23a["showText"]=true;
}
var tool=Telerik.Web.UI.EditorButton.createTool(_23a,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(_23f){
this._tools=_23f;
},get_updateHeader:function(){
return this._udpateHeader;
},set_updateHeader:function(_240){
this._udpateHeader=_240;
}};
Telerik.Web.UI.EditorToolStrip.registerClass("Telerik.Web.UI.EditorToolStrip",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.EditorContextMenu=function(_241){
Telerik.Web.UI.EditorContextMenu.initializeBase(this,[_241]);
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 _242=this._popupBehavior;
_242.set_positioningMode(Telerik.Web.PositioningMode.Absolute);
var _243=this.get_parentElement();
if(_243){
_242.set_parentElement(_243);
}
var e=this._eventObject;
if(e){
_242.set_x(e.clientX+10);
_242.set_y(e.clientY+10);
}
},set_eventObject:function(_245){
this._eventObject=_245;
},get_tagName:function(){
return this._tagName;
},set_tagName:function(_246){
this._tagName=_246;
},get_parentElement:function(){
return this._parentElement;
},set_parentElement:function(_247){
this._parentElement=_247;
}};
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(_248){
Telerik.Web.UI.Editor.AlignmentSelector.initializeBase(this,[_248]);
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(_249){
switch(_249.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(_24a){
if(!this._rendered){
this.render();
}
var _24b=this._itemRootElement;
var _24c=0;
for(var i=0;i<_24b.rows.length;i++){
var _24e=false;
for(var j=0;j<_24b.rows[i].cells.length;j++){
var cell=_24b.rows[i].cells[j];
var _251=this._isAvailable(_24c++);
cell.style.visibility=_251?"visible":"hidden";
_24e|=_251;
}
if(null!=document.all){
_24b.rows[i].style.display=_24e?"":"none";
}
}
},_isAvailable:function(_252){
var _253=false;
if(this._items){
var _254=this._items[_252];
_253=((null!=_254)&&(""!=_254[0]||""!=_254[1]));
}
return _253;
},renderChild:function(_255,_256,_257){
var _258=document.createElement("div");
if(_256){
_258.innerHTML="&nbsp;";
_258.className=this._alignmentClassName[_257];
}
_255.appendChild(_258);
},_onDropDownValueSelected:function(){
this.set_selectedIndex(this.get_selectedIndex());
},_selectAlignment:function(_259,_25a){
_259=(""==_259||!_259)?"none":_259.toUpperCase();
_25a=!_25a?"":_25a.toUpperCase();
if(this._items){
var _25b=-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==_25b){
_25b=i;
}
if((_259==ha||_259==va)&&(_25a==ha||_25a==va)){
this.set_selectedIndex(i);
return;
}
}
}
this.set_selectedIndex(_25b);
}
},set_selectedIndex:function(_25e){
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"set_selectedIndex",[_25e]);
var span=this.getSpanElement();
var _260=this._alignmentClassName[_25e];
span.className=_260;
},setTagName:function(_261){
this._tagName=_261;
this._items=this._getLookupTableByTagName(this._tagName);
this.set_selectedIndex(this._noAlignmentIndex);
},updateValue:function(_262,_263){
this._selectAlignment(_262,_263);
},getAlign:function(){
var _264=this._items[this._selectedIndex];
var _265=(_264?_264[0]:"");
if("none"==_265){
_265="";
}
return _265;
},getVAlign:function(){
var _266=this._items[this._selectedIndex];
var _267=(_266?_266[1]:"");
if("none"==_267){
_267="";
}
return _267;
},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(_268){
this._clientStateFieldID=_268;
}};
Telerik.Web.UI.Editor.AlignmentSelector.registerClass("Telerik.Web.UI.Editor.AlignmentSelector",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.InsertTableHelper=function(_269){
Telerik.Web.UI.Editor.InsertTableHelper.initializeBase(this,[_269]);
};
Telerik.Web.UI.Editor.InsertTableHelper.prototype={initialize:function(){
var _26a=new Array(this.get_itemsperrow()*this.get_itemsperrow());
for(var i=0;i<_26a.length;i++){
_26a[i]=i;
}
this._items=_26a;
},hide:function(){
},renderChild:function(_26c,_26d,_26e){
var oDiv=document.createElement("div");
oDiv.innerHTML="&nbsp;";
_26c.appendChild(oDiv);
var dim=this._getDimensionByIndex(_26e);
_26c.setAttribute("title"," "+dim.rows+" x "+dim.cols+" ");
},_getDimensionByIndex:function(_271){
var _272=0;
var _273=0;
var _274=this.get_itemsperrow();
for(var i=0;i<this._items.length;i++){
if(i%_274==0){
_272++;
_273=0;
}
_273++;
if(_271==i){
break;
}
}
var obj={rows:_272,cols:_273};
return obj;
},get_selectedItem:function(){
var _277=this.get_selectedIndex();
return this._getDimensionByIndex(_277);
},selectUIItem:function(e,_279){
var _27a=this._popupElement.getElementsByTagName("TD");
var len=_27a.length;
var _27c=this.get_activeIndex();
var dim=this._getDimensionByIndex(_27c);
var cols=dim.cols;
for(var i=0;i<len;i++){
var _280=_27a[i];
var _281=_280.item_index;
if(_281<=_27c&&_280.cellIndex<cols){
_280.className="rade_itemOver";
}else{
_280.className="";
}
}
}};
Telerik.Web.UI.Editor.InsertTableHelper.registerClass("Telerik.Web.UI.Editor.InsertTableHelper",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.Editor.InsertTable=function(_282){
Telerik.Web.UI.Editor.InsertTable.initializeBase(this,[_282]);
};
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");
var _283=this.get_tools();
this._longTool=_283[0];
Array.removeAt(_283,0);
for(var i=0;i<_283.length;i++){
_283[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 _288={"valueSelected":this._onTableHelperValueSelectedDelegate};
var tool=$create(Telerik.Web.UI.Editor.InsertTableHelper,args,_288,null,document.createElement("DIV"));
tool.set_rootpopupclassname("");
this._tableHelper=tool;
tool.render();
var _28a=tool.get_popupElement();
_28a.style.display="";
_28a.style.visibility="visible";
_28a.style.position="";
_28a.style.cssFloat="left";
var _28b=this.get_popupElement();
_28b.insertBefore(_28a,_28b.firstChild);
},renderChildren:function(){
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"renderChildren");
var _28c=this._itemRootElement;
if(this._longTool){
var ul=document.createElement("UL");
_28c.insertBefore(ul,_28c.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(_28f){
Telerik.Web.UI.Editor.ColorPicker.initializeBase(this,[_28f]);
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 _290=this.get_selectedItem();
this.set_color(_290);
},set_color:function(_291){
if(!_291){
_291="";
}
var _292=this.getSpanElement();
_292.style.borderBottom="0px";
_292.style.height="";
if(_291){
var _293=_292.offsetHeight;
if(_293){
_292.style.height=(_293-3)+"px";
}
_292.style.borderBottom="3px solid "+_291;
}
this._color=_291;
},get_color:function(){
return this._color;
},onPopupMouseOver:function(e){
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"onPopupMouseOver",[e]);
var _295=this.get_activeIndex();
var _296=this._items[_295];
if(null==_296){
return;
}
if(this._infoSpan1){
this._infoSpan1.innerHTML=_296;
this._infoSpan1.style.backgroundColor=_296;
}
if(this._infoSpan2){
this._infoSpan2.innerHTML=_296;
this._infoSpan2.style.color=_296;
}
},renderFooter:function(){
var oDiv=document.createElement("div");
oDiv.className="rade_ColorPickerFooter";
var _298=document.createElement("span");
_298.className="rade_DarkColor";
var _299=document.createElement("span");
_299.className="rade_LightColor";
_298.innerHTML=_299.innerHTML="&nbsp";
oDiv.appendChild(_298);
oDiv.appendChild(_299);
this.get_popupElement().appendChild(oDiv);
this._infoSpan1=_298;
this._infoSpan2=_299;
},renderChild:function(_29a,_29b,_29c){
var oDiv=document.createElement("div");
if(null!=_29b){
oDiv.style.backgroundColor=_29b;
oDiv.setAttribute("title",_29b);
oDiv.innerHTML="&nbsp;";
}
_29a.appendChild(oDiv);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_29e){
this._clientStateFieldID=_29e;
}};
Telerik.Web.UI.Editor.ColorPicker.registerClass("Telerik.Web.UI.Editor.ColorPicker",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.UndoRedoDropDown=function(_29f){
Telerik.Web.UI.Editor.UndoRedoDropDown.initializeBase(this,[_29f]);
};
Telerik.Web.UI.Editor.UndoRedoDropDown.prototype={renderFooter:function(){
},get_selectedItem:function(){
var _2a0=Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"get_selectedItem");
if(!_2a0){
_2a0=1;
}
return _2a0;
},selectUIItem:function(e,_2a2){
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(_2a3){
Telerik.Web.UI.Editor.ApplyClassDropDown.initializeBase(this,[_2a3]);
this._popupClassName="rade_ApplyClass";
this._onValueSelectedDelegate=null;
this._clientStateFieldID=null;
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 _2a5="";
if(!tag){
_2a5=this._cssClasses["notag"];
}else{
tag=tag.toLowerCase();
var res=this._cssClasses[tag];
_2a5=res?res:this._cssClasses["unknown"];
}
var _2a7=document.createElement("span");
_2a7.innerHTML="&nbsp;"+tag;
_2a7.className=_2a5;
return _2a7;
},_getClassTag:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2aa=str.lastIndexOf(".");
if(_2aa==0){
return "ALL";
}
var _2ab=str.lastIndexOf(" ",_2aa);
return str.substring((_2ab+1),_2aa);
},_getClassCss:function(_2ac){
var re=this._cssClassRegex;
var oCss="";
if(null!=_2ac.cssText){
oCss=_2ac.cssText;
oCss=oCss.replace(re,"$1");
}else{
oCss=_2ac.style.cssText;
}
return oCss;
},_getDisplayName:function(rule){
if(!rule||!rule.selectorText){
return "";
}
var _2b0=rule.selectorText;
var _2b1=_2b0.indexOf(".");
if(-1==_2b1){
_2b1=0;
}else{
_2b1+=1;
}
var _2b2=_2b0.indexOf(":");
if(-1==_2b2){
_2b2=_2b0.length;
}
return _2b0.substring(_2b1,_2b2);
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _2b5=str.lastIndexOf(".");
if(_2b5==-1){
return "";
}
var _2b6=str.indexOf(" ",_2b5);
if(-1==_2b6){
_2b6=str.indexOf(":",_2b5);
}
if(-1==_2b6){
_2b6=str.length;
}
return str.substring((_2b5+1),_2b6);
},_getChild:function(_2b7,_2b8,_2b9){
var elem=document.createElement("DIV");
if(_2b8.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=_2b7;
}
elem.setAttribute("style",_2b7);
elem.innerHTML=_2b9;
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(_2bb){
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"set_items",[_2bb]);
this._items.splice(0,0,["",{cssText:"",selectorText:"Clear Class"}]);
},renderChild:function(cell,_2bd,_2be){
var _2bf=_2bd[1];
var oTag=this._getClassTag(_2bf);
var oCss=this._getClassCss(_2bf);
var _2c2=_2bd[2]?_2bd[2]:this._getDisplayName(_2bf);
cell.setAttribute("title",_2bf.selectorText);
var _2c3=this._getClassIcon(oTag);
cell.appendChild(_2c3);
var div=this._getChild(oCss,oTag,_2c2);
cell.appendChild(div);
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_2c5){
this._clientStateFieldID=_2c5;
}};
Telerik.Web.UI.Editor.ApplyClassDropDown.registerClass("Telerik.Web.UI.Editor.ApplyClassDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontNameDropDown=function(_2c6){
Telerik.Web.UI.Editor.FontNameDropDown.initializeBase(this,[_2c6]);
};
Telerik.Web.UI.Editor.FontNameDropDown.prototype={updateValue:function(oVal){
try{
if(!oVal){
oVal=this.get_text();
}
if(null==oVal||"AZBY"==oVal){
return;
}
var _2c8=this.getSpanElement();
if(_2c8){
this._value=(""+oVal).replace(/\s+/ig,"&nbsp;");
_2c8.innerHTML=this._value;
}
}
catch(e){
}
},renderChildren:function(){
var _2c9=this._items;
if(_2c9&&_2c9[0]&&!(_2c9[0] instanceof Array)){
for(var i=0;i<_2c9.length;i++){
var item=_2c9[i];
_2c9[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(_2cc){
Telerik.Web.UI.Editor.FontSizeDropDown.initializeBase(this,[_2cc]);
};
Telerik.Web.UI.Editor.FontSizeDropDown.prototype={renderChildren:function(){
var _2cd=this._items;
if(_2cd&&_2cd[0]&&!(_2cd[0] instanceof Array)){
for(var i=0;i<_2cd.length;i++){
var item=_2cd[i];
_2cd[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(_2d0){
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.initializeBase(this,[_2d0]);
};
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 _2d4=this.FlatLinksArray[this.get_selectedIndex()];
return {innerHTML:_2d4.name,href:_2d4.href,target:_2d4.target,title:_2d4.toolTip};
},_parseSubtree:function(_2d5,t){
var _2d7=this._linkCounter;
this.FlatLinksArray[_2d7]=_2d5;
var li=document.createElement("LI");
t.appendChild(li);
var _2d9=_2d5.childLinks&&_2d5.childLinks.length;
var span=document.createElement("SPAN");
span.innerHTML="&nbsp;";
span.className=_2d9?"rade_CustomLinksIcon rade_icon_plus":"rade_CustomLinksIcon rade_icon_empty";
if(_2d9){
function onclick(e){
var _2dc=Sys.UI.DomElement.containsCssClass(this,"rade_icon_plus");
var ul=this.parentNode.getElementsByTagName("UL")[0];
if(ul){
ul.style.display=_2dc?"":"none";
var _2de=_2dc?"rade_icon_plus":"rade_icon_minus";
var _2df=_2dc?"rade_icon_minus":"rade_icon_plus";
Sys.UI.DomElement.removeCssClass(this,_2de);
Sys.UI.DomElement.addCssClass(this,_2df);
}
return false;
}
$addHandler(span,"click",onclick);
}
li.appendChild(span);
var _2e0=null;
if(_2d5.href){
_2e0=document.createElement("A");
_2e0.href="#";
_2e0.innerHTML=_2d5.name;
li.appendChild(_2e0);
this.markItemContainer(_2e0,this._linkCounter);
}else{
_2e0=document.createElement("SPAN");
_2e0.innerHTML=_2d5.name;
li.appendChild(_2e0);
}
this._linkCounter++;
if(_2d9){
var ul=document.createElement("UL");
li.appendChild(ul);
var _2e2=_2d5.childLinks;
for(var i=0;i<_2d5.childLinks.length;i++){
var _2e4=_2e2[i];
this._parseSubtree(_2e4,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(_2e5,_2e6){
var _2e7=window.frames;
for(var i=0;i<_2e7.length;i++){
var _2e9=null;
try{
_2e9=_2e7[i].window.document;
}
catch(e){
}
if(!_2e9){
continue;
}
try{
if(false!=_2e5){
_2e6.attachToDocument(_2e9);
}else{
_2e6.detachFromDocument(_2e9);
}
}
catch(e){
}
}
}
var _2ea=Function.createDelegate(null,function(e){
if(e.keyCode==27){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
});
$addHandler(document.body,"keydown",_2ea);
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",_2ea);
});
},attachToDocument:function(_2ec){
$telerik.addExternalHandler(_2ec,"mousedown",this._hideHandler);
},detachFromDocument:function(_2ed){
$telerik.removeExternalHandler(_2ed,"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 _2f0=this._activePopup.get_popupElement();
if(!this._isMouseOverElement(e,_2f0)){
this.hideActivePopup();
}
}
},_isMouseOverElement:function(e,_2f2){
var rect=null;
try{
rect=$telerik.getBounds(_2f2);
}
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(_2f7){
if(this._activePopup==_2f7){
this._activePopup=null;
}
},set_activePopup:function(_2f8){
if(this._activePopup&&(_2f8!=this._activePopup)){
this._activePopup.hide();
}
this._activePopup=_2f8;
},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(_2f9){
Telerik.Web.UI.Editor.DefaultToolAdapter.initializeBase(this,[_2f9]);
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._initToolbarMode();
this._initContextMenus();
this._registerEditorHandlers();
},_initToolbarMode:function(){
var _2fa=this.get_editor();
var _2fb=this.get_element();
var _2fc=Telerik.Web.UI.EditorToolbarMode;
var _2fd=_2fa.get_toolbarMode();
if(_2fd!=_2fc.Default){
_2fb.style.visibility="hidden";
}
this._initToolbars();
if(_2fd!=_2fc.Default){
this._createWindowWrapper();
if(_2fd==_2fc.ShowOnFocus){
this._initShowOnFocus();
}else{
if(_2fd==_2fc.PageTop){
this._initPageTop();
}else{
if(_2fd==_2fc.Floating){
this._initFloating();
}
}
}
_2fb.style.visibility="visible";
}
},get_toolbarHolder:function(){
return this._toolbarHolder;
},_moveToolbarsToEditor:function(_2fe){
var _2ff=this.get_element();
if(!_2fe){
var wnd=this.get_toolbarHolder();
if(!this._fakeToolbarParent){
var div=_2ff.ownerDocument.createElement("DIV");
div.control=_2ff.control;
_2ff.parentNode.appendChild(div);
_2ff.control=null;
var _302=div.style;
_302.height=_302.fontSize=_302.lineHeight="1px";
_302.border="1px solid red";
_302.visibility="hidden";
window.setTimeout(function(){
wnd.set_contentElement(_2ff);
_2ff.style.display="";
},0);
this._fakeToolbarParent=div;
}else{
wnd.set_contentElement(_2ff);
}
_2ff.style.width="100%";
}else{
_2ff.style.width="";
var _303=this.get_editor().get_TopZone();
_303.appendChild(_2ff);
}
},_createWindowWrapper:function(){
if(!this._toolbarHolder){
var _304=this.get_editor();
var wnd=_304.get_dialogOpener().get_container().clone(_304.get_id()+"_toolbarMode");
wnd.set_visibleStatusbar(false);
var _306=this.get_element();
var _307=_306.offsetWidth;
wnd.setSize(_307+10,"");
wnd.add_show(function(_308,args){
var _30a=_308.get_contentElement();
if(!_30a){
return;
}
_30a.style.overflow="";
_30a.style.height="";
var _30b=_30a.offsetWidth;
var _30c=_30a.offsetHeight;
_30a.style.width=_30b+"px";
var _30d=_308.getWindowBounds();
_308.setSize(_30d.width,"");
_30a.style.width="100%";
});
this._toolbarHolder=wnd;
this._moveToolbarsToEditor(false);
}
return this._toolbarHolder;
},_createFloatingButton:function(){
this._onToggleFloatingToolbarDelegate=Function.createDelegate(this,this._onToggleFloatingToolbar);
var _30e=this.get_editor();
var skin=_30e.get_skin();
var _310={name:"ToggleFloatingToolbar",addClickHandler:true,skin:skin};
var _311={"valueSelected":this._onToggleFloatingToolbarDelegate};
var _312=Telerik.Web.UI.EditorButton.createTool(_310,_311);
var _313=Telerik.Web.UI.EditorButton.createToolWrapper(_312,skin);
var _314=$get(_30e.get_id()+"Top");
if(_314){
_314.appendChild(_313);
}
},_onToggleFloatingToolbar:function(){
var _315=!this._toolbarHolder.isVisible();
this._showToolbarHolder(_315);
},_positionToolbarAboveEditor:function(){
var wnd=this._toolbarHolder;
var _317=this.get_editor();
var _318=$telerik.getBounds(_317.get_element());
var x=_318.x;
var y=_318.y-wnd.getWindowBounds().height;
wnd.moveTo(x,y);
},_positionOnPageTop:function(){
var wnd=this._toolbarHolder;
var _31c=wnd._getViewportBounds();
var x=_31c.scrollLeft;
var y=_31c.scrollTop;
wnd.moveTo(x,y);
wnd.set_width(_31c.width-10);
if(!wnd.isPinned()){
wnd.togglePin();
}
},_showToolbarHolder:function(_31f){
if(!_31f){
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 _320=Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper;
if(_320==this&&_320._toolbarHolder&&_320._toolbarHolder.isVisible()){
_320._toolbarHolder.setActive(true);
return;
}
if(_320&&_320._showToolbarHolder){
_320._showToolbarHolder(false);
}
Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=this;
this._toolbarHolder.show();
var _321=this.get_editor();
var _322=Telerik.Web.UI.EditorToolbarMode;
var _323=_321.get_toolbarMode();
if(_323==_322.ShowOnFocus){
this._positionToolbarAboveEditor();
}else{
if(_323==_322.PageTop){
this._positionOnPageTop();
}else{
if(_323==_322.Floating){
if(!this._wasShown){
this._positionToolbarAboveEditor();
this._wasShown=true;
}
}
}
}
},_initFloating:function(){
this._createFloatingButton();
},_initPageTop:function(){
var wnd=this._toolbarHolder;
wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
wnd.set_visibleTitlebar(false);
this._initToolbarModeEvents();
},_initShowOnFocus:function(){
var wnd=this._toolbarHolder;
var _326=Telerik.Web.UI.WindowBehaviors;
wnd.set_behaviors(_326.Resize);
wnd.set_visibleTitlebar(false);
this._initToolbarModeEvents();
},_initToolbarModeEvents:function(){
var _327=this;
var _328=function(){
_327._showToolbarHolder(true);
};
var _329=this.get_editor();
if(_329.isIE){
this.get_editor().add_editReady(function(){
_329.attachEventHandler("beforeeditfocus",_328);
});
}else{
_329.add_selectionChange(_328);
}
_329.add_modeChange(function(){
_327._showToolbarHolder(_327.get_editor().get_mode()==Telerik.Web.UI.EditModes.Design);
});
_329.add_submit(function(){
_327._showToolbarHolder(false);
});
_329.add_toggleScreenMode(function(){
var _32a=_327.get_editor().isFullScreen();
_327._moveToolbarsToEditor(_32a);
var wnd=_327.get_toolbarHolder();
if(_32a){
wnd.hide();
}else{
wnd.show();
}
});
this._bodyClickDelegate=Function.createDelegate(this,this._onBodyClick);
$addHandler(document.body,"click",this._bodyClickDelegate);
},_onBodyClick:function(){
this._showToolbarHolder(false);
},_disposeToolbarModeHandlers:function(){
if(this._bodyClickDelegate){
$removeHandler(document.body,"click",this._bodyClickDelegate);
this._bodyClickDelegate=null;
}
},_initToolbars:function(){
var root=this.get_element();
var _32d=root.parentNode;
var _32e=false;
if($telerik.isIE){
var _32f=Telerik.Web.UI.Editor.Utils.getInvisibleParent(_32d);
_32e=(_32f!=null);
if(_32e){
root.parentNode.removeChild(root);
root.style.position="absolute";
root.style.top="-5000px";
root.style.left="-5000px";
document.body.appendChild(root);
}
}
var _330=this.get_toolJSON();
var _331=this._getToolBarElements();
var _332=[];
for(var i=0;i<_330.length;i++){
var json=_330[i];
var _335=_331[i];
this._initializeToolbar(json,_335);
var _336=json["attributes"];
var zone=_336?_336["dockingzone"]:null;
if(zone){
_332[_332.length]=[zone,_335];
}
}
if(_32e){
root.style.position="";
root.style.top="";
root.style.left="";
root.parentNode.removeChild(root);
_32d.appendChild(root);
}
var _338=this.get_editor();
if(_338.get_toolbarMode()!=Telerik.Web.UI.EditorToolbarMode.Default){
return;
}
var _339=_338.get_id();
for(var i=0;i<_332.length;i++){
var _33a=_332[i][0];
var zone=_33a.charAt(0).toUpperCase()+_33a.substring(1);
var _33b=$get(_339+zone);
if(!_33b){
_33b=$get(_33a);
}
if(_33b){
if(_33b.innerHTML=="&nbsp;"){
_33b.innerHTML="";
}
_33b.appendChild(_332[i][1]);
}
}
},onContextMenu:function(e){
if(!this._contextMenusEnabled){
return;
}
var _33d=this.get_editor();
if(_33d.get_mode()!=Telerik.Web.UI.EditModes.Design){
return;
}
this.createContextMenus();
var _33e=e.srcElement?e.srcElement:e.target;
var _33f=_33e.tagName;
var _340=this._contextMenus[_33f];
if("TH"==_33f&&!_340){
_340=this._contextMenus["TD"];
}
var _341="";
if(!_340){
var _342=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_33e,"A");
if(!_342){
_342=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_33e,"TD");
}
if(!_342){
_342=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_33e,"TABLE");
}
if(_342){
_341=_342.tagName;
_33e=_342;
}else{
_341="*";
}
_340=this._contextMenus[_341];
}
if(_340&&_33f=="IMG"&&_33e&&"true"==_33e.getAttribute("isflash")){
_340=null;
}
if(!this.isIE&&_341=="*"){
return;
}
if(_340){
_340.set_eventObject(e);
_340.show();
}
return $telerik.cancelRawEvent(e);
},enableContextMenus:function(_343){
this._contextMenusEnabled=_343;
},_initContextMenus:function(){
var _344=Function.createDelegate(this,this.onContextMenu);
var _345=this.get_editor();
_345.add_editReady(function(){
_345.attachEventHandler("contextmenu",_344);
});
},createContextMenus:function(){
if(this._contextMenus){
return;
}
this._contextMenus={};
var _346=this.get_editor();
var skin=_346.get_skin();
var _348=_346.get_contextMenusJSON();
var _349={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
for(var i=0;i<_348.length;i++){
var args=_348[i];
args["sizetofit"]=true;
args["parentElement"]=_346.get_contentAreaElement();
args["skin"]=skin;
var tool=$create(Telerik.Web.UI.EditorContextMenu,args,_349,null,document.createElement("SPAN"));
this._contextMenus[args.tagName]=tool;
}
},dispose:function(){
var _34d=this._getToolBarElements();
for(var i=0;i<_34d.length;i++){
$clearHandlers(_34d[i]);
}
this._tools=[];
this._disposeToolbarModeHandlers();
var wnd=this.get_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(_351){
this.createContextMenus();
return this._contextMenus[_351];
},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(_355,_356){
if(!_355){
_355=this._tools;
}
var _357=this.get_editor();
for(var i=0;i<_355.length;i++){
var _359=_355[i];
var _35a=_359.get_name();
if(_359.setState){
var _35b=_356;
if(null==_35b){
_35b=_357.getToolState(_35a);
}
if(null!=_35b){
_359.setState(_35b);
}
}
if(_359.updateValue){
_359.updateValue(_357.getToolValue(_35a));
}
}
},_convertCommandsArray:function(_35c){
var _35d=[];
for(var i=0;i<_35c.length;i++){
_35d[i]=[i+1,_35c[i].get_title()];
}
return _35d;
},_onDropDownHide:function(_35f,args){
var _361=this.get_editor();
_361.enableContentArea(true);
},_onDropDownBeforeShow:function(_362,args){
var _364=this.get_editor();
if(Telerik.Web.UI.EditorToolStrip.isInstanceOfType(_362)){
this.setToolState(_362.get_items());
}
if(!_364.getSelection().isControl()&&!Telerik.Web.UI.EditorContextMenu.isInstanceOfType(_362)){
_364.enableContentArea(false);
}
var _365=_362.get_name();
if(_365=="Undo"){
var _366=_364.get_commandsManager().getCommandsToUndo();
_366=this._convertCommandsArray(_366);
_362.set_items(_366);
}else{
if(_365=="Redo"){
var _367=_364.get_commandsManager().getCommandsToRedo();
_367=this._convertCommandsArray(_367);
_362.set_items(_367);
}else{
if(_365=="ModuleManager"){
var _368=_364.get_modulesManager();
if(!_368){
return;
}
var _369=_368.get_modules();
var _36a=[];
for(var i=0;i<_369.length;i++){
var _36c=_369[i];
var name=_36c.get_name();
var _36e=_36c.get_title();
if(!_36e){
_36e=name;
}
cssClass=_36c.get_visible()?"rade_module_visible_icon":"rade_module_hidden_icon";
_36a[i]=[name,_36e,cssClass];
}
_362.set_items(_36a);
}
}
}
var _36f=_362.get_items();
if(_36f&&_36f.length>0){
return;
}
var _370=null;
switch(_365){
case "ApplyClass":
_370=_364.getCssArray();
break;
case "FontName":
_370=_364.get_fontNames();
break;
case "FontSize":
_370=_364.get_fontSizes();
break;
case "InsertSymbol":
_370=_364.get_symbols();
break;
case "BackColor":
case "ForeColor":
_370=_364.get_colors();
break;
case "RealFontSize":
_370=_364.get_realFontSizes();
break;
case "InsertSnippet":
_370=_364.get_snippets();
break;
case "Zoom":
_370=["10%","20%","50%","100%","150%","200%","300%","500%"];
break;
case "FormatBlock":
_370=_364.get_paragraphs();
break;
case "InsertCustomLink":
_370=_364.get_links();
break;
case "AjaxSpellCheck":
case "SpellCheck":
_370=_364.get_languages();
break;
}
if(_370){
_362.set_items(_370);
}
},_initializeToolbar:function(_371,_372){
var _373=_372.getElementsByTagName("li");
var _374=_371.tools;
var _375=this.get_editor();
var skin=_375.get_skin();
var _377=0;
if(_374){
var _378=0;
for(var i=0;i<_374.length;i++){
var _37a=_373[i+1];
_378+=_37a.offsetWidth;
var _37b=Telerik.Web.UI.EditorButton;
var _37c=_374[i].type;
var _37d=_374[i].name;
var _37e=Telerik.Web.UI.EditorToolType;
var args=_374[i];
var tool=null;
var _381=false;
if(_37c){
switch(_37c){
case _37e.Button:
break;
case _37e.Separator:
if(!_377){
_377+=parseInt($telerik.getCurrentStyle(_37a,"marginLeft"));
_377+=parseInt($telerik.getCurrentStyle(_37a,"marginRight"));
}
_378+=_377;
_37b=null;
break;
case _37e.DropDown:
_37b=Telerik.Web.UI.EditorDropDown;
_381=true;
if(_37d=="FontName"){
_37b=Telerik.Web.UI.Editor.FontNameDropDown;
}else{
if(_37d=="FontSize"){
_37b=Telerik.Web.UI.Editor.FontSizeDropDown;
}else{
if(_37d=="FormatBlock"){
_37b=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_37d=="RealFontSize"){
_37b=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_37d=="Zoom"){
_37b=Telerik.Web.UI.EditorUpdateableDropDown;
}else{
if(_37d=="InsertCustomLink"){
_37b=Telerik.Web.UI.Editor.InsertCustomLinkDropDown;
}else{
if(_37d=="ApplyClass"){
_37b=Telerik.Web.UI.Editor.ApplyClassDropDown;
}
}
}
}
}
}
}
break;
case _37e.SplitButton:
_37b=Telerik.Web.UI.EditorSplitButton;
if(_37d=="ForeColor"||_37d=="BackColor"){
_37b=Telerik.Web.UI.Editor.ColorPicker;
}else{
if(_37d=="Undo"||_37d=="Redo"){
_37b=Telerik.Web.UI.Editor.UndoRedoDropDown;
}
}
_381=true;
break;
case _37e.ToolStrip:
if(_37d=="InsertTable"){
_37b=Telerik.Web.UI.Editor.InsertTable;
}else{
_37b=Telerik.Web.UI.EditorToolStrip;
}
_381=true;
break;
case _37e.Custom:
break;
}
}
if(args.attributes){
for(var item in args.attributes){
args[item.toLowerCase()]=args.attributes[item];
}
}
if(_37b){
var _383=null;
if(_381){
_383={"valueSelected":this._onDropDownValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate,"hide":this._onDropDownHideDelegate};
args["skin"]=skin;
}
tool=$create(_37b,args,_383,null,_37a);
}
if(tool){
Array.add(this._tools,tool);
var _384=tool.get_shortCut();
if(_384){
var _385=tool.get_name();
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(tool)&&!(Telerik.Web.UI.EditorSplitButton.isInstanceOfType(tool))){
_385="RadE_ToolAdapter_"+_385;
Telerik.Web.UI.Editor.CommandList[_385]=this._toolAdapterDropDownExpander;
}
_375.setShortCut(_385,_384);
}
}
}
var ul=_372;
if(this.isIE&&ul&&_378){
ul.style.width=(_378+(_373[0].offsetWidth)*2)+"px";
}
if($telerik.isSafari){
ul.setAttribute("onmousedown","return false;");
}
$addHandlers(_372,{"click":this._onToolAdapterClickDelegate,"keydown":this._onToolAdapterKeyDownDelegate},this);
}
},_toolAdapterDropDownExpander:function(_387,_388){
var tool=_388.getToolByName(_387.replace("RadE_ToolAdapter_",""));
tool.setFocus();
tool.show();
tool.selectNextItem();
return false;
},_onEditorModeChange:function(_38a,args){
var _38c=Telerik.Web.UI.EditModes;
var mode=_38a.get_mode();
this._setEnabled((mode==_38c.Design));
},_onEditorSelectionChange:function(_38e,args){
this.setToolState();
},_setEnabled:function(_390){
var _391=this._tools;
for(var i=0;i<_391.length;i++){
var tool=_391[i];
tool.set_enabled(_390);
}
},_registerEditorHandlers:function(){
var _394=this.get_editor();
_394.add_selectionChange(this._onEditorSelectionChangeDelegate);
_394.add_modeChange(this._onEditorModeChangeDelegate);
},_onDropDownValueSelected:function(_395,args){
var _397=_395.get_selectedItem();
if(Telerik.Web.UI.EditorButton.isInstanceOfType(_397)){
this._raiseEditorEvent(_397,null);
}else{
this._raiseEditorEvent(_395,_397);
}
},_onKeyDownHandler:function(e){
var _399=e.keyCode;
if(9==_399||37==_399||39==_399||121==_399){
if(Telerik.Web.UI.Editor.PopupController){
Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}
}
if(121==_399){
var _39a=this.get_editor();
window.setTimeout(function(){
if(_39a){
_39a.setFocus();
}
},100);
if(e.rawEvent){
$telerik.cancelRawEvent(e.rawEvent);
}
return $telerik.cancelRawEvent(e);
}
if(9==_399){
return;
}
var _39b=this._getSelectedTool(e);
if(!Telerik.Web.UI.EditorButton.isInstanceOfType(_39b)){
return;
}
if(37==_399||39==_399){
var tool=_39b;
while(true){
tool=(37==_399)?this._getPreviousTool(tool):this._getNextTool(tool);
if(null==tool){
break;
}
if(tool.get_enabled()){
break;
}
}
if(tool&&tool.get_enabled()){
tool.setFocus();
}
}
if(13==_399&&_39b&&!_39b.get_selectedItem){
this._raiseEditorEvent(_39b,null);
return;
}
if(!Telerik.Web.UI.EditorDropDown.isInstanceOfType(_39b)){
return;
}
if(38==_399||40==_399){
var _39d=false;
if(!_39b.isExpanded()){
_39b.show();
_39d=true;
}
if(_39d||40==_399){
_39b.selectNextItem();
}else{
_39b.selectPreviousItem();
}
}else{
if(13==_399){
_39b.hide();
if(_39b.get_activeIndex){
_39b.set_selectedIndex(_39b.get_activeIndex());
}
this._onDropDownValueSelected(_39b);
}else{
if(27==_399){
_39b.hide();
}
}
}
},_onToolBarClick:function(e){
var _39f=this._getSelectedTool(e);
if(_39f){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_39f)){
_39f.click(e);
}else{
if(false){
}else{
this._raiseEditorEvent(_39f);
}
}
}
var _3a0=this.get_editor();
if(_3a0.get_mode()!=Telerik.Web.UI.EditModes.Design){
$telerik.cancelRawEvent(e);
}
},_raiseEditorEvent:function(tool,_3a2){
var _3a3=this.get_events().getHandler("ToolClick");
if(_3a3){
var _3a4=tool.get_name?tool.get_name():"";
var _3a5=new Telerik.Web.UI.EditorCommandEventArgs(_3a4,tool,_3a2);
_3a3(tool,_3a5);
}
},_getPreviousTool:function(tool){
var _3a7=Array.indexOf(this._tools,tool);
return this._tools[_3a7-1];
},_getNextTool:function(tool){
var _3a9=Array.indexOf(this._tools,tool);
return this._tools[_3a9+1];
},_getSelectedTool:function(e){
var _3ab=Telerik.Web.UI.EditorButton.getToolRootNode(e.target);
if(null==_3ab){
return;
}
var _3ac=_3ab.control;
if(null==_3ac){
return;
}
if(_3ac.get_enabled&&_3ac.get_enabled()==false){
return;
}
if(e&&_3ac){
e.preventDefault();
e.stopPropagation();
}
return _3ac;
},_getToolBarElements:function(){
var _3ad=this.get_element();
var _3ae=_3ad.getElementsByTagName("ul");
return _3ae;
},get_toolbarHolder:function(){
return this._toolbarHolder;
},get_editor:function(){
return this._editor;
},set_editor:function(_3af){
if(this._editor!=_3af){
this._editor=_3af;
}
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_3b0){
this._toolJSON=_3b0;
},add_toolClick:function(_3b1){
this.get_events().addHandler("ToolClick",_3b1);
},remove_toolClick:function(_3b2){
this.get_events().removeHandler("ToolClick",_3b2);
}};
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(_3b3,_3b4,args){
function createSpellCheckEngine(){
if(!_3b4.get_ajaxSpellCheck()){
var _3b6={"editor":_3b4};
var _3b7=document.createElement("DIV");
var _3b8=$create(Telerik.Web.UI.Editor.AjaxSpellCheck,_3b6,null,null,_3b7);
var _3b9=_3b8.get_element();
var _3ba=$get(_3b4.get_id()+"Top");
if(_3ba){
_3ba.appendChild(_3b9);
}
_3b4.set_ajaxSpellCheck(_3b8);
}
var _3bb=_3b4.get_ajaxSpellCheck();
if(args&&args.value){
_3bb.set_language(args.value);
}
_3bb.spellCheck();
}
if(typeof (Telerik.Web.UI.Editor.AjaxSpellCheck)=="undefined"){
function OnWebRequestCompleted(_3bc,_3bd){
var _3be=_3bc.get_responseData();
Telerik.Web.UI.Editor.Utils.evalScriptCode(_3be);
createSpellCheckEngine();
}
var _3bf=_3b4.get_ajaxSpellCheckScriptReference();
var _3c0=new Sys.Net.WebRequest();
_3c0.set_url(_3bf);
_3c0.set_httpVerb("GET");
_3c0.add_completed(OnWebRequestCompleted);
_3c0.invoke();
}else{
createSpellCheckEngine();
}
return false;
};
this.ModuleManager=function(_3c1,_3c2,args){
var _3c4=args.value;
var _3c5=_3c2.get_modulesManager();
if(!_3c5){
return false;
}
var _3c6=_3c5.getModuleByName(_3c4);
if(_3c6){
_3c6.toggleVisibility();
_3c2._updateEditorSize(null,true);
}
return false;
};
this.ToggleScreenMode=function(_3c7,_3c8,args){
_3c8.toggleScreenMode();
return false;
};
this.InsertRowAbove=this.InsertRowBelow=function(_3ca,_3cb,args){
_3cb.executeCommand(new Telerik.Web.UI.Editor.TableInsertRow(_3cb.getLocalizedString(_3ca),null,_3ca=="InsertRowAbove"?"above":"below"));
};
this.InsertColumnLeft=this.InsertColumnRight=function(_3cd,_3ce,args){
_3ce.executeCommand(new Telerik.Web.UI.Editor.TableInsertColumn(_3ce.getLocalizedString(_3cd),null,_3cd=="InsertColumnLeft"?"left":"right"));
};
this.DeleteRow=function(_3d0,_3d1,args){
_3d1.executeCommand(new Telerik.Web.UI.Editor.TableDeleteRow(_3d1.getLocalizedString(_3d0)));
};
this.DeleteColumn=function(_3d3,_3d4,args){
_3d4.executeCommand(new Telerik.Web.UI.Editor.TableDeleteColumn(_3d4.getLocalizedString(_3d3)));
};
this.DeleteCell=function(_3d6,_3d7,args){
_3d7.executeCommand(new Telerik.Web.UI.Editor.TableDeleteCell(_3d7.getLocalizedString(_3d6)));
};
this.MergeColumns=function(_3d9,_3da,args){
_3da.executeCommand(new Telerik.Web.UI.Editor.TableMergeColumns(_3da.getLocalizedString(_3d9)));
};
this.MergeRows=function(_3dc,_3dd,args){
_3dd.executeCommand(new Telerik.Web.UI.Editor.TableMergeRows(_3dd.getLocalizedString(_3dc)));
};
this.SplitCell=function(_3df,_3e0,args){
_3e0.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(_3e0.getLocalizedString(_3df)));
};
this.DeleteTable=function(_3e2,_3e3,args){
var _3e5=args.value;
if(!_3e5){
_3e5=_3e3.getSelectedElement();
}
if(_3e5&&"TABLE"!=_3e5.tagName){
_3e5=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_3e5,"TABLE");
}
if(_3e5){
_3e3.selectElement(_3e5);
_3e3.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(_3e6,_3e7,args){
var _3e9=_3e6.substring(10);
var _3ea=new Telerik.Web.UI.EditorCommandEventArgs(_3e6,args.get_tool(),_3e9);
_3e7.fire("InsertFormElement",_3ea);
};
this.StripAll=this.StripCss=this.StripFont=this.StripSpan=this.StripWord=function(_3eb,_3ec,args){
var _3ee=_3eb.substring(5);
var _3ef=new Telerik.Web.UI.EditorCommandEventArgs(_3eb,args.get_tool(),_3ee.toUpperCase());
_3ec.fire("FormatStripper",_3ef);
};
this.FormatStripper=function(_3f0,_3f1,args){
var _3f3=args.value;
var _3f4="";
try{
_3f4=_3f1.getSelectionHtml();
}
catch(e){
}
var oSel=_3f1.get_document().selection?_3f1.get_document().selection:_3f1.get_contentWindow().getSelection();
var _3f6=oSel.type?oSel.type.toLowerCase()=="none":oSel.isCollapsed;
if(_3f6||_3f4==""||_3f1.get_html()==_3f4){
var _3f7=Telerik.Web.UI.Editor.Utils.stripFormatting(_3f1.get_html(),_3f3);
_3f1.set_html(_3f7,_3f1.getLocalizedString(_3f0)+" "+_3f3);
}else{
if(_3f4!=null){
var _3f7=Telerik.Web.UI.Editor.Utils.stripFormatting(_3f4,_3f3);
_3f1.pasteHtml(_3f7,_3f0);
}
}
};
this.InsertTable=function(_3f8,_3f9,args){
var _3fb=args.value;
if(_3fb){
var _3fc=Telerik.Web.UI.Editor.Utils.createTable(_3fb.rows,_3fb.cols);
var _3fd=Telerik.Web.UI.Editor.Utils.getOuterHtml(_3fc);
_3f9.pasteHtml(_3fd,_3f8);
}
};
this.InsertTab=function(_3fe,_3ff,_400){
var _401=_3ff.getSelectedElement();
if(_401.tagName=="LI"){
_3ff.fire("Indent");
}else{
_3ff.pasteHtml(" &nbsp;&nbsp;&nbsp;&nbsp;",_3fe);
}
return false;
};
this.SetToolFocus=function(_402,_403,_404){
var _405=_403.get_toolAdapter();
if(_405){
_405.setFocus();
}
return false;
};
this.ViewHtml=function(_406,_407,_408){
alert(_407.get_html(true));
return false;
};
this.Undo=this.Redo=function(_409,_40a,args){
var _40c=args?args.value:1;
if(!_40c){
_40c=1;
}
if(_409=="Redo"){
_40a.redo(_40c);
}else{
_40a.undo(_40c);
}
};
this.PastePlainText=function(_40d,_40e,_40f){
var _410=function(_411){
if(_411){
var _412=_411.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
_412=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(_412);
if(_412){
_40e.pasteHtml(_412,_40d);
}
}
};
if(_40e.isIE){
_410(window.clipboardData.getData("Text"));
}else{
var _413=function(_414,args){
_410(args.get_content());
};
_40e.showDialog("CleanPasteTextContent",{},_413);
return false;
}
};
this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(_416,_417,_418){
var _419=function(_41a,_41b){
var _41c="";
if(_416=="PasteFromWord"){
_41c=Telerik.Web.UI.Editor.Utils.stripFormatting(_41a,"WORD");
}else{
if(_416=="PasteFromWordNoFontsNoSizes"){
_41c=Telerik.Web.UI.Editor.Utils.stripFormatting(_41a,"WORD_ALL");
}else{
_41c=Telerik.Web.UI.Editor.Utils.convertText2Html(_41a);
}
}
if(_41b){
_41b.select();
}
if(_41c){
_417.pasteHtml(_41c,_416);
}
};
if(_417.isIE){
var _41d=_417.createRestorePoint();
var _41e=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
_419(_41e,_41d);
}else{
var _41f=function(_420,args){
_419(args.get_content());
};
_417.showDialog("CleanPasteHtmlContent",{},_41f);
}
};
this.Copy=function(_422,_423,args){
if(null!=args){
var _425=window.opera?false:true;
if(_425){
try{
document.queryCommandEnabled(_422);
}
catch(e){
_425=false;
}
}
if(_425){
_423.get_document().execCommand(_422,false,null);
}else{
alert(_423.getLocalizedString("UseCtrlC"));
}
}
};
this.Cut=this.Paste=function(_426,_427,args){
if(null!=args){
var _429=window.opera?false:true;
if(_429){
try{
if(!_427.isIE7){
document.queryCommandEnabled(_426);
}
}
catch(e){
_429=false;
}
}
if(_426=="Paste"&&_429&&_427.isIE7){
_427.get_document().body.fireEvent("onbeforepaste");
}
if(_429){
var oCmd=new Telerik.Web.UI.Editor.GenericCommand(_427.getLocalizedString(_426),_427.get_contentWindow());
_427.get_document().execCommand(_426,false,null);
_427.executeCommand(oCmd);
}else{
var id=(_426=="Cut"?"UseCtrlX":"UseCtrlV");
alert(_427.getLocalizedString(id));
}
}else{
_427._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(_427.getLocalizedString(_426),_427.get_contentWindow());
}
};
this.InsertParagraph=function(_42c,_42d,_42e){
_42d.executeBrowserCommand(_42c,true,"");
return true;
};
this.FormatBlock=function(_42f,_430,args){
_430.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(_430.getLocalizedString(_42f),_430.get_contentWindow(),args.value));
};
this.InsertOrderedList=this.InsertUnorderedList=function(_432,_433,args){
_433.setFocus();
_433.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(_433.getLocalizedString(_432),_433.get_contentWindow(),_433.get_newLineBr(),_432,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(_435,_436,_437){
_436.setActive();
var _438="SelectAll"!=_435;
if(_435=="Unlink"&&!_436.isIE){
var elem=_436.getSelectedElement();
if(elem&&elem.tagName=="A"){
_436.selectElement(elem,false);
}
}
_436.executeBrowserCommand(_435,_438,null,null);
return true;
};
this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(_43a,_43b,args){
var _43d=args.value;
_43b.executeBrowserCommand(_43a,true,_43d);
};
this.Zoom=function(_43e,_43f,args){
var _441=args.value;
var tool=args.get_tool?args.get_tool():null;
if(_441&&tool&&tool.updateValue){
tool.updateValue(_441);
}
_43f._contentArea.style.zoom=_441;
return false;
};
this.Print=function(_443,_444,args){
if(_444.isIE){
_444.get_document().execCommand(_443,false,null);
}else{
if(_444.get_contentWindow().print){
_444.get_contentWindow().print();
}
}
return false;
};
this.InsertSnippet=function(_446,_447,args){
_447.pasteHtml(args.value,_446);
};
this.InsertFormElement=function(_449,_44a,args){
var _44c=args.value;
_44c=_44c.toLowerCase();
var _44d=null;
switch(_44c){
case "form":
_44d=_44a.createElement("form","150px","150px");
_44d.innerHTML="&nbsp;";
break;
case "textarea":
_44d=_44a.createElement("textarea");
break;
case "select":
_44d=_44a.createElement("select","100px","22px");
break;
case "checkbox":
case "radio":
_44d=_44a.createElement("input");
_44d.setAttribute("type",_44c);
break;
case "button":
case "reset":
case "submit":
_44d=_44a.createElement("input","50px","22px");
_44d.setAttribute("type",_44c);
break;
case "hidden":
case "password":
case "text":
_44d=_44a.createElement("input","100px","22px");
_44d.setAttribute("type",_44c);
break;
}
if(_44d){
var id=Telerik.Web.UI.Editor.Utils.getUniqueID();
_44d.setAttribute("id",id);
var html=Telerik.Web.UI.Editor.Utils.getOuterHtml(_44d);
_44a.pasteHtml(html,_449);
var _450=_44a.get_document().getElementById(id);
if(_450){
_450.removeAttribute("id");
if(_450.setActive){
_450.setActive();
}
return false;
}
}
};
this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(_451,_452,args){
var _454="";
switch(_451){
case "InsertSymbol":
_454=args.value;
break;
case "InsertHorizontalRule":
_454="<hr>";
break;
case "InsertDate":
var now=new Date();
_454="&nbsp;"+now.toLocaleDateString();
break;
case "InsertTime":
var now=new Date();
_454="&nbsp;"+now.toLocaleTimeString();
break;
default:
_454="<fieldset style='WIDTH: 200px; HEIGHT: 76px'> <legend>Title</legend>Content... </fieldset> ";
}
_452.pasteHtml(_454,_451);
};
this.ImageManager=function(_456,_457,_458){
var _459=function(_45a,args){
_457.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_456);
};
var _45c=_457.getSelectedElement();
if(_45c&&_45c.tagName.toLowerCase()=="img"){
_457.get_dialogOpener().set_additionalQueryString("&PreselectedItemUrl="+_45c.src);
}
var args={editor:_457};
_457.showDialog("ImageManager",args,_459);
_457.get_dialogOpener().set_additionalQueryString("");
return false;
};
this.SilverlightManager=function(_45e,_45f,_460){
var _461=function(_462,args){
var html=args.Result;
var _465=_45f._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _466=_45f._filtersManager.getFilterByName("MozillaKeepFlashString");
html=(_465)?_465.getDesignContent(html):html;
html=(_466)?_466.getDesignContent(html):html;
_45f.pasteHtml(html,_45e);
};
var _467={};
var _468=_45f.getSelectedElement();
if(_468){
if($telerik.isIE&&_468.object&&_468.object.Movie){
var _469=_468.object.Movie;
_45f.get_dialogOpener().set_additionalQueryString("&PreselectedItemUrl="+_469);
_467.selectedItemUrl=_469;
_467.selectedObject=_468;
}
}
_45f.showDialog("SilverlightManager",_467,_461);
_45f.get_dialogOpener().set_additionalQueryString("");
return false;
};
this.FlashManager=function(_46a,_46b,_46c){
var _46d=function(_46e,args){
var _470=_46b._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _471=_46b._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_470)?_470.getDesignContent(html):html;
html=(_471)?_471.getDesignContent(html):html;
_46b.pasteHtml(html,_46a);
};
var _473={};
var _474=_46b.getSelectedElement();
if(_474){
if($telerik.isIE&&_474.object&&_474.object.Movie){
var _475=_474.object.Movie;
_46b.get_dialogOpener().set_additionalQueryString("&PreselectedItemUrl="+_475);
_473.selectedItemUrl=_475;
_473.selectedObject=_474;
}
}
_46b.showDialog("FlashManager",_473,_46d);
_46b.get_dialogOpener().set_additionalQueryString("");
return false;
};
this.MediaManager=function(_476,_477,_478){
var _479=function(_47a,args){
var _47c=_477._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var _47d=_477._filtersManager.getFilterByName("MozillaKeepFlashString");
var html=args.Result;
html=(_47c)?_47c.getDesignContent(html):html;
html=(_47d)?_47d.getDesignContent(html):html;
_477.pasteHtml(html,_476);
};
var _47f={};
var _480=_477.getSelectedElement();
if(_480){
if($telerik.isIE&&_480.object&&_480.object.FileName){
var _481=_480.object.FileName;
_477.get_dialogOpener().set_additionalQueryString("&PreselectedItemUrl="+_481);
_47f.selectedItemUrl=_481;
_47f.selectedObject=_480;
}
}
_477.showDialog("MediaManager",_47f,_479);
_477.get_dialogOpener().set_additionalQueryString("");
return false;
};
this.TemplateManager=function(_482,_483,_484){
var _485=function(_486,args){
_483.pasteHtml(args.Result,_482);
};
_483.showDialog("TemplateManager",{},_485);
return false;
};
this.AboutDialog=function(_488,_489,_48a){
_489.showDialog("AboutDialog");
return false;
};
this.Help=function(_48b,_48c,_48d){
_48c.showDialog("Help");
return false;
};
this.PageProperties=function(_48e,_48f,_490){
var _491=function(_492,args){
};
var _494={};
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_494,"BODY",_48f,_48e);
_48f.showDialog("PageProperties",_494,_491);
return false;
};
this.ImageMapDialog=function(_495,_496,args){
var _498=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(_496);
var _499=function(wnd,_49b){
Telerik.Web.UI.Editor.CommandList._setImageMapProperties(_496,_49b);
return false;
};
_496.showDialog("ImageMapDialog",_498,_499);
return false;
};
this._setImageMapProperties=function(_49c,args){
if(!args){
return;
}
var _49e=_49c.getSelectedElement();
var _49f;
if(_49e&&_49e.tagName=="IMG"){
_49f=_49e;
if(args.ImageSrc!=_49f.src){
_49f.src=args.ImageSrc;
}
}else{
if(!args.ImageSrc){
return;
}
_49c.pasteHtml("<img src=\""+args.ImageSrc+"\" id = \"__tmp__\">");
_49f=_49c.get_document().getElementById("__tmp__");
_49f.removeAttribute("id");
if(document.all){
var oRng=_49c.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_49f);
oRng.select();
}
}
var _4a1=document.createElement("SPAN");
_4a1.innerHTML=args.MapHtml;
var _4a2=_4a1.getElementsByTagName("map");
if(_4a2.length==0){
return;
}
var _4a3=_4a2[0].innerHTML;
_4a1=null;
if(!_4a3){
_49f.removeAttribute("useMap");
return;
}
var _4a4="";
var map=null;
var _4a6=_49f.getAttribute("useMap");
if(_4a6){
_4a4=_4a6.substr(1);
map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_49c,_4a4);
}
if(map==null){
var _4a7=new Date()-100;
var _4a4="rade_img_map_"+_4a7;
map=_49c.get_document().createElement("map");
map.id=_4a4;
this._setNameAttribute(map,_4a4);
map=_49c.get_document().body.appendChild(map);
_49f.setAttribute("useMap","#"+_4a4);
_49f.setAttribute("border","0");
}
map.innerHTML=_4a3;
};
this._setNameAttribute=function(_4a8,name){
_4a8.removeAttribute("name");
_4a8.removeAttribute("NAME");
_4a8.name=null;
_4a8.name=name;
_4a8["NAME"]=name;
};
this._getImageMapDialogArgument=function(_4aa){
var _4ab={};
_4ab._editor=_4aa;
var _4ac=_4aa.getSelectedElement();
if(_4ac&&_4ac.tagName=="IMG"){
_4ab.ImageSrc=_4ac.getAttribute("src",2);
_4ab.ImageWidth=(_4ac.style.width)?_4ac.style.width:_4ac.width;
_4ab.ImageHeight=(_4ac.style.height)?_4ac.style.height:_4ac.height;
if($telerik.isIE){
var oRng=_4aa.get_document().body.createTextRange();
oRng.collapse();
oRng.moveToElementText(_4ac);
oRng.select();
}
if(_4ac.useMap){
var _4ae=_4ac.getAttribute("useMap").substr(1);
var map=Telerik.Web.UI.Editor.CommandList._getImageMapByName(_4aa,_4ae);
if(map!=null){
_4ab.ImageMapHTML="<map name = \""+_4ae+"\">"+map.innerHTML+"</map>";
}else{
_4ab.ImageMapHTML="";
}
_4ac.style.width=_4ab.ImageWidth;
_4ac.style.height=_4ab.ImageHeight;
}
}
return _4ab;
};
this._getImageMapByName=function(_4b0,_4b1){
var _4b2=_4b0.get_document();
var map=_4b2.getElementById(_4b1);
if(map!=null){
return map;
}
var maps=_4b2.getElementsByTagName("map");
for(var i=0;i<maps.length;i++){
if(maps[i].getAttribute("name")==_4b1){
return maps[i];
}
}
return null;
};
this.DocumentManager=function(_4b6,_4b7,_4b8){
var _4b9={};
var _4ba=function(_4bb,args){
_4b7.pasteHyperLink(args.Result,_4b6);
};
var _4bd=_4b7.get_dialogOpener().get_additionalQueryString();
var _4be=_4b7.getSelectedElement();
if(_4be&&_4be.tagName.toLowerCase()=="a"){
_4b7.get_dialogOpener().set_additionalQueryString(_4bd+"&PreselectedItemUrl="+_4be.href);
}
_4b7.showDialog("DocumentManager",_4b9,_4ba);
_4b7.get_dialogOpener().set_additionalQueryString(_4bd);
return false;
};
this.TableWizard=function(_4bf,_4c0,_4c1){
var _4c2=Telerik.Web.UI.Editor.CommandList._getTableArgument(_4c0,null,true,false);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4c2,"TABLE",_4c0,_4bf);
var _4c3=function(_4c4,args){
_4c0.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_4bf);
};
_4c0.showDialog("TableWizard",_4c2,_4c3);
return false;
};
this.SetTableProperties=function(_4c6,_4c7,_4c8){
var _4c9=Telerik.Web.UI.Editor.CommandList._getTableArgument(_4c7,1,false,true);
if(!_4c9){
alert(_4c7.getLocalizedString("tablewarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4c9,"TABLE",_4c7,_4c6);
var _4ca=Telerik.Web.UI.Editor.CommandList._getParentTable(_4c7);
var _4cb=function(_4cc,args){
_4c7.selectElement(_4ca);
_4c7.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_4c6);
};
_4c7.showDialog("TableWizard",_4c9,_4cb);
return false;
};
this.SetCellProperties=function(_4ce,_4cf,_4d0){
var _4d1=Telerik.Web.UI.Editor.CommandList._getTableArgument(_4cf,2,false,true);
if(!_4d1){
alert(_4cf.getLocalizedString("cellwarning"));
return false;
}
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4d1,"TABLE",_4cf,_4ce);
var _4d2=Telerik.Web.UI.Editor.CommandList._getParentTable(_4cf);
var _4d3=function(_4d4,args){
_4cf.selectElement(_4d2);
_4cf.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.tableToModify),_4ce);
};
_4cf.showDialog("TableWizard",_4d1,_4d3);
return false;
};
this.FindAndReplace=function(_4d6,_4d7,_4d8){
var _4d9={};
_4d9._editor=_4d7;
var _4da=function(_4db,args){
};
_4d7.showDialog("FindAndReplace",_4d9,_4da);
return false;
};
this.StyleBuilder=function(_4dd,_4de,_4df){
var _4e0=function(_4e1,args){
_4de.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_4dd);
};
var _4e3={};
var _4e4=_4de.getSelection();
var _4e5=_4e4.getParentElement();
if(!_4e4.isControl()){
var _4e6=_4e4.getHtml();
if(_4e6!=""||(_4e5&&_4e5.tagName&&_4e5.tagName.toLowerCase()=="body")){
var _4e7=_4de.createElement("span");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_4e7,_4e6);
_4e5=_4e7;
}else{
_4de.selectElement(_4e5,false);
}
}
_4e3.htmlElement=_4e5;
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_4e3,"*",_4de,_4dd);
_4e3.fontNames=_4de.get_fontNames();
_4de.showDialog("StyleBuilder",_4e3,_4e0);
return false;
};
this.XhtmlValidator=function(_4e8,_4e9,_4ea){
var _4eb=_4e9;
var _4ec=function(_4ed,args){
};
_4e9.showDialog("XhtmlValidator",_4eb,_4ec);
return false;
};
this.TrackChangesDialog=function(_4ef,_4f0,_4f1){
var _4f2=_4f0;
var _4f3=function(_4f4,args){
};
_4f0.showDialog("TrackChangesDialog",_4f2,_4f3);
};
this.InsertCustomLink=function(_4f6,_4f7,args){
var link=args.value;
var _4fa=String.format("<a href='{1}' title='{3}' target='{2}'>{0}</a>",link.innerHTML,link.href,link.target,link.title);
var _4fb=Telerik.Web.UI.Editor.CommandList._getParentLink(_4f7);
if(_4fb){
var _4fc=_4fb.cloneNode(true);
if(link.href){
_4fc.setAttribute("href",link.href);
}
if(link.target){
_4fc.setAttribute("target",link.target);
}
if(link.title){
_4fc.setAttribute("title",link.title);
}
if(!_4fc.innerHTML){
_4fc.innerHTML=link.innerHTML;
}
_4fa=Telerik.Web.UI.Editor.Utils.getOuterHtml(_4fc);
}
_4f7.pasteHtml(_4fa,_4f6);
};
this._getDialogArguments=function(_4fd,_4fe,_4ff,_500){
_4fd.Colors=_4ff.get_colors();
if("TD"==_4fe||"TH"==_4fe||"TABLE"==_4fe){
_4fd.CssClasses=_4ff.getCssArray("TABLE");
_4fd.CellCssClasses=_4ff.getCssArray("TD");
}else{
if("A"==_4fe||"BODY"==_4fe||"IMG"==_4fe){
_4fd.CssClasses=_4ff.getCssArray(_4fe);
}
}
_4fd.Editor=_4ff;
};
this.SetLinkProperties=this.LinkManager=function(_501,_502,_503){
var _504=Telerik.Web.UI.Editor.CommandList._getLinkArgument(_502);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_504,"A",_502,_501);
var _505=function(_506,args){
_502.pasteHyperLink(args.realLink,_501);
};
_502.showDialog("LinkManager",_504,_505);
return false;
};
this.SetImageProperties=function(_508,_509,_50a){
var _50b={};
_50b.Element=_509.getSelectedElement();
Telerik.Web.UI.Editor.CommandList._getDialogArguments(_50b,"IMG",_509,_508);
var _50c=function(_50d,args){
_509.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(args.Result),_508);
};
_509.showDialog("ImageProperties",_50b,_50c);
return false;
};
this.FormatCodeBlock=function(_50f,_510,_511){
var _512={dirtyCode:_510.getSelectionHtml()};
if(_510.get_document().selection&&_510.get_document().selection){
var _513=_510.get_document().selection.type.toLowerCase();
if(_513=="control"||_513=="none"){
_512.dirtyCode="";
}
}
var _514=function(_515,args){
_510.pasteHtml(args.get_code(),_50f);
};
_510.showDialog("FormatCodeBlock",_512,_514);
return false;
};
this._getDocumentAnchors=function(_517){
var _518=_517.getElementsByTagName("A");
var _519=new Array();
for(var i=0;i<_518.length;i++){
if(_518[i].name){
_519[_519.length]=_518[i];
}
}
return _519;
};
this._getParentLink=function(_51b){
_51b.setFocus();
var _51c=_51b.getSelectedElement();
var _51d=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_51c,"A");
if(_51d){
_51b.selectElement(_51d);
}else{
var _51e="";
if(_51c&&_51c.tagName=="IMG"){
_51e=Telerik.Web.UI.Editor.Utils.getOuterHtml(_51c);
}else{
_51e=_51b.getSelection().getHtml();
}
_51d=_51b.get_document().createElement("A");
try{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_51d,_51e);
}
catch(e){
_51d.innerHTML=Telerik.Web.UI.Editor.Utils.stripFormatting(_51e,"ALL");
}
}
return _51d;
};
this._getLinkArgument=function(_51f,_520){
var _521=Telerik.Web.UI.Editor.CommandList._getParentLink(_51f);
return {selectedTabIndex:_520?_520:0,realLink:_521.cloneNode(true),showText:!Telerik.Web.UI.Editor.Utils.hasHtmlContent(_521.innerHTML),documentAnchors:Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(_51f.get_document())};
};
this._getParentTable=function(_522){
_522.setFocus();
var _523=_522.getSelectedElement();
var _524=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_523,"TABLE");
return _524;
};
this._getParentCell=function(_525){
_525.setFocus();
var _526=_525.getSelectedElement();
var _527=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_526,"TD");
return _527;
};
this._getTableArgument=function(_528,_529,_52a,_52b){
var _52c;
var _52d=null;
if(_52a){
_52c=Telerik.Web.UI.Editor.Utils.createTable(2,2,_528._document);
}else{
_52c=Telerik.Web.UI.Editor.CommandList._getParentTable(_528);
}
if(!_52a&&!_52c){
return null;
}
if(_52b){
_52d=Telerik.Web.UI.Editor.CommandList._getParentCell(_528);
}
var _52e=_52c.cloneNode(true);
var _52f=_52c;
return {selectedTabIndex:_529?_529:0,cellToModify:_52d,tableToModify:_52e,originalTable:_52f,tableDocument:(_52e.document)?_52e.document:_528.get_document()};
};
this.EnterParagraphMozilla=function(_530,_531,args){
var _533=_531.getSelectedElement();
if("LI"==_533.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_533,"LI")!=null){
_531.bubbleKeyEventToBrowser();
return false;
}
var _534=_531.get_contentWindow();
var oDoc=_534.document;
function checkParent(_536,_537){
_537[_537.length]=_536;
while(_536!=null&&_536.tagName!="P"){
if(_536.tagName=="TD"){
return null;
}
_536=_536.parentNode;
_537[_537.length]=_536;
}
return _536;
}
var _538=_534.getSelection();
var _539=_538.getRangeAt(0);
var _53a=_539.cloneRange();
_539.deleteContents();
var _53b=_539.startOffset;
var _53c=_539.startContainer;
var _53d="";
var _53e=[];
var inP=checkParent(_53c,_53e);
if(inP){
var _540=(inP.innerHTML=="");
var _541=_539.cloneRange();
_541.setStart(inP,0);
_541.setEnd(_53c,_53b);
var _542=_541.cloneContents();
var _543=_539.cloneRange();
_543.setStart(_53c,_53b);
if(inP.lastChild){
_543.setEndAfter(inP.lastChild);
}else{
_543.setEnd(inP,0);
}
var _544=_543.cloneContents();
_539.selectNode(inP);
_538.removeAllRanges();
_538.addRange(_539);
inP=inP.cloneNode(true);
inP.innerHTML="";
var _545=inP.cloneNode(true);
if(_540){
_545.innerHTML="&nbsp;";
}else{
_545.appendChild(_542);
}
endPar=inP.cloneNode(true);
endPar.appendChild(_544);
var newP=inP.cloneNode(true);
var _547=newP;
if(_53e.length>0){
for(var i=_53e.length;i>0;i--){
var _549=_53e[i];
var _54a=_549&&_549.cloneNode?_549.cloneNode(false):null;
if(_54a&&_54a.tagName!="P"){
_547.appendChild(_54a);
_547=_54a;
}
}
}
_547.innerHTML="&nbsp;";
_547.setAttribute("id","radETempNode");
var _54b=oDoc.createElement("div");
_54b.appendChild(_545);
_54b.appendChild(newP);
if(!_540){
_54b.appendChild(endPar);
}
_53d=_54b.innerHTML;
}else{
_53d="<p id='radETempNode'>&nbsp;</p>";
}
_531.pasteHtml(_53d,"Enter",false,false,false);
oP=oDoc.getElementById("radETempNode");
if(oP){
oP.removeAttribute("id",0);
var _538=_534.getSelection();
var _539=oDoc.createRange();
_539.selectNodeContents(oP);
_538.removeAllRanges();
_538.addRange(_539);
}
var ps=oDoc.getElementsByTagName("P");
for(var i=0;i<ps.length;i++){
var _54d=ps[i].innerHTML;
if(_54d==""||_54d.trim().toLowerCase()=="<br>"){
ps[i].parentNode.removeChild(ps[i]);
}
}
return false;
};
this.Enter=function(_54e,_54f,args){
var _551=_54f.getSelectedElement();
if("LI"==_551.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_551,"LI")!=null){
_54f.bubbleKeyEventToBrowser();
return false;
}
try{
var _552=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_54f.get_contentWindow());
var _553=_54f.get_document().selection.createRange();
if(_553.pasteHTML){
var tag=_551.tagName;
if(tag.charAt(0)=="H"&&parseInt(tag.charAt(1))>0){
var _555=_553.duplicate();
_555.moveToElementText(_551);
_54f.bubbleKeyEventToBrowser();
return false;
}
_553.pasteHTML("<br>");
_553.select();
_553.moveEnd("character",1);
_553.moveStart("character",1);
_553.collapse(false);
}else{
if(_553(0)){
_553.execCommand("Delete");
}
}
_54f.executeCommand(_552);
}
catch(exc){
alert(exc.message);
}
return false;
};
this.ShiftEnter=function(_556,_557,args){
var _559=_557.getSelectedElement();
if("LI"==_559.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(_559,"LI")!=null){
var _55a=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",_557.get_contentWindow());
var _55b=_557.get_document().selection.createRange();
_55b.pasteHTML("<br>");
_55b.select();
_55b.moveEnd("character",1);
_55b.moveStart("character",1);
_55b.collapse(false);
_557.executeCommand(_55a);
return false;
}
_557.bubbleKeyEventToBrowser();
return false;
};
this.ToggleTableBorder=function(_55c,_55d,args){
_55d.toggleEnhancedEdit();
return false;
};
this.RealFontSize=function(_55f,_560,args){
var _562=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_560);
var _563=_562.markedElements;
var _564=_560.createRestorePoint();
var _565=new Telerik.Web.UI.Editor.GenericCommand(_560.getLocalizedString(_55f),_560.get_contentWindow());
if(_563.length==0){
var _566=_560.getSelection().getParentElement();
if($telerik.isIE&&!_560.getSelection().getHtml()&&(_566.tagName=="FONT"||_566.tagName=="SPAN")){
_560._document.execCommand("RemoveFormat",null,false);
}
_560.pasteHtml("<font style='font-size:"+args.value+"' id='radERealFont'>&nbsp;</font>",_55f);
var _567=_560._document.getElementById("radERealFont");
_567.removeAttribute("id");
if($telerik.isIE){
_560.selectElement(_567);
_560.getSelection().collapse();
_567.innerHTML="";
}else{
if(_560._contentWindow.getSelection){
var oSel=_560._contentWindow.getSelection();
var _569=_560.getSelection().getRange();
oSel.removeAllRanges();
if(_569&&_569.selectNodeContents){
_569.selectNodeContents(_567);
}
oSel.addRange(_569);
}
}
}else{
for(var i=0;i<_563.length;i++){
_563[i].style.fontSize=args.value;
_563[i].removeAttribute("size");
}
if(_564){
_564.select();
}
_560.executeCommand(_565);
}
};
this.ConvertToUpper=this.ConvertToLower=function(_56b,_56c,args){
var _56e;
var endR;
if($telerik.isIE){
if(_56c._document.selection.type.toLowerCase()=="control"){
return;
}
var _570=_56c._document.selection.createRange();
_56e=_570.duplicate();
endR=_570.duplicate();
_56e.collapse();
endR.collapse(false);
}
var _571=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_56c);
var _572=_571.markedElements;
var _573=_571.newElements;
var _574=new Telerik.Web.UI.Editor.GenericCommand(_56c.getLocalizedString(_56b),_56c.get_contentWindow());
for(var i=0;i<_572.length;i++){
changeChildNodesCase(_572[i]);
}
for(var i=0;i<_573.length;i++){
if($telerik.isIE){
_573[i].removeNode(false);
}else{
var _576=document.createRange();
_576.selectNodeContents(_573[i]);
_573[i].parentNode.replaceChild(_576.extractContents(),_573[i]);
}
}
if($telerik.isIE){
var _577=_56c._document.selection.createRange();
_577.setEndPoint("StartToStart",_56e);
_577.setEndPoint("EndToEnd",endR);
_577.select();
}else{
var _578=_56c.get_contentWindow().getSelection();
var rng=_578.getRangeAt(0);
rng.collapse(true);
}
_56c.executeCommand(_574);
function changeChildNodesCase(_57a){
var _57b=_57a.childNodes;
for(var i=0;i<_57b.length;i++){
if(_57b[i].nodeType==3){
_57b[i].nodeValue=("ConvertToLower"==_56b)?_57b[i].nodeValue.toLowerCase():_57b[i].nodeValue.toUpperCase();
}else{
if(_57b[i].nodeType==1&&_57b[i].tagName.toUpperCase()!="FONT"){
changeChildNodesCase(_57b[i]);
}
}
}
}
};
this.ApplyClass=function(_57d,_57e,args){
var _580=args.value;
var _581=_57e.get_document();
var _582=_57e.createRestorePoint();
var _583=new Telerik.Web.UI.Editor.GenericCommand(_57e.getLocalizedString(_57d),_57e.get_contentWindow());
if(_57e.isIE){
var _584=_581.selection.createRange();
var _585=(_584.length>0?_584(0):_584.parentElement());
if(_585.tagName=="LI"){
var _586=_584.htmlText;
var _587=_586.match(/<LI\/?>/gi);
var _588=_587?_587.length:0;
if(_588>1){
_585=_585.parentNode;
}else{
if(_588==0&&(Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_585,_584.htmlText))&&_585.parentNode.childNodes.length==1){
_585=_585.parentNode;
}
}
}
if(_584.length>0||_585.tagName=="OL"||_585.tagName=="UL"){
_585.className=_580;
return;
}
}
var _589=Telerik.Web.UI.Editor.CommandList._markEditorSelection(_57e);
var _58a=_589.markedElements;
if(_58a.length==0){
var _58b=_57e.getSelection().getParentElement();
if($telerik.isIE&&!_57e.getSelection().getHtml()&&(_58b.tagName=="FONT"||_58b.tagName=="SPAN")){
_57e._document.execCommand("RemoveFormat",null,false);
}
_57e.pasteHtml("<font class='"+_580+"' id='radERealFont'>&nbsp;</font>",_57d);
var _58c=_57e._document.getElementById("radERealFont");
_58c.removeAttribute("id");
if($telerik.isIE){
_57e.selectElement(_58c);
_57e.getSelection().collapse();
_58c.innerHTML="";
}else{
if(_57e._contentWindow.getSelection){
var oSel=_57e._contentWindow.getSelection();
var _58e=_57e.getSelection().getRange();
oSel.removeAllRanges();
if(_58e&&_58e.selectNodeContents){
_58e.selectNodeContents(_58c);
}
oSel.addRange(_58e);
}
}
}else{
for(var i=0;i<_58a.length;i++){
_58a[i].className=_580;
}
if(_582){
_582.select();
}
_57e.executeCommand(_583);
}
};
this._markEditorSelection=function(_590){
if(_590.get_html()==""){
return {markedElements:[],newElements:[]};
}
var _591="AZBY";
var _592="_cm";
var _593=[];
var _594=[];
var _595=[];
var _596=$telerik.isSafari?"span":"font";
var _597=_590._contentArea;
var _598=_590.getSelection();
if(_598.isControl()){
var _599=_598.getParentElement();
var _59a=_590._document.createElement(_596);
_59a.appendChild(_599.cloneNode(true));
_599.parentNode.replaceChild(_59a,_599);
return {markedElements:[_59a],newElements:[_59a]};
}
if(!$telerik.isSafari){
keepFontNames();
}
if(!$telerik.isIE){
_597.ownerDocument.execCommand("UseCSS",false,true);
}
_597.ownerDocument.execCommand("FontName",false,_591);
var _59b=_597.getElementsByTagName(_596);
for(var i=0;i<_59b.length;i++){
var _59a=_59b[i];
if(_59a.getAttribute("face")==_591||_59a.style.fontFamily==_591){
_59a.removeAttribute("face");
if(_59a.style.fontFamily==_591){
_59a.style.fontFamily="";
}
_594.push(_59a);
var _59d=_59a.getElementsByTagName(_596);
for(var j=0;j<_59d.length;j++){
var _o=_59d[j];
if(_o.getAttribute("face")!=_591){
_594.push(_o);
}
}
if(!_59a.getAttribute(_592)){
_595.push(_59a);
}
}
_59a.removeAttribute(_592);
}
if(!$telerik.isSafari){
restoreFontNames();
}
if(!$telerik.isIE){
_597.ownerDocument.execCommand("UseCSS",false,false);
}
function keepFontNames(){
var _5a0=_590._contentArea.getElementsByTagName(_596);
for(var i=0;i<_5a0.length;i++){
var _5a2=_5a0[i];
if(_5a0[i].face){
_5a2.setAttribute("_face",_5a2.face);
_593.push(_5a2);
}
_5a2.setAttribute(_592,1);
}
}
function restoreFontNames(){
for(var i=0;i<_593.length;i++){
_593[i].face=_593[i].getAttribute("_face");
_593[i].removeAttribute("_face");
}
_593=[];
}
return {markedElements:_594,newElements:_595};
};
})();
if(typeof (RadEditorCommandList)=="undefined"){
var RadEditorCommandList=Telerik.Web.UI.Editor.CommandList;
}
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandsManager=function(_5a4){
this._commands=[];
this._currentCommandIndex=-1;
};
Telerik.Web.UI.Editor.CommandsManager.prototype={get_commands:function(){
return this._commands;
},execute:function(_5a5,_5a6){
if(_5a5&&_5a5.execute){
var _5a7=_5a5.execute();
if(false==_5a6){
return false;
}
if(_5a7&&_5a5._canUnexecute){
this._clearCommandsToRedo();
Array.add(this._commands,_5a5);
this._currentCommandIndex=this._commands.length-1;
return true;
}
}
return false;
},undo:function(_5a8){
if(_5a8>this._commands.length){
_5a8=this._commands.length;
}
var _5a9=0;
var _5aa=null;
while(0<_5a8--&&0<=this._currentCommandIndex&&this._currentCommandIndex<this._commands.length){
_5aa=this._commands[this._currentCommandIndex--];
if(_5aa){
_5aa.unexecute();
_5a9++;
}
}
},redo:function(_5ab){
if(_5ab>this._commands.length){
_5ab=this._commands.length;
}
var _5ac=0;
var _5ad=null;
var _5ae=this._currentCommandIndex+1;
while(0<_5ab--&&0<=_5ae&&_5ae<this._commands.length){
_5ad=this._commands[_5ae];
if(_5ad){
_5ad.execute();
this._currentCommandIndex=_5ae;
_5ac++;
}
_5ae++;
}
},removeCommandAt:function(_5af){
this._commands.splice(_5af,1);
if(this._currentCommandIndex>=_5af){
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 _5b0=this._commands[this._currentCommandIndex].clone();
this.execute(_5b0);
}
},_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,DefaultFilters:65533};
Telerik.Web.UI.EditorFilters.registerEnum("Telerik.Web.UI.EditorFilters",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={dispose:function(){
},getHtmlContent:function(_5b1){
return _5b1;
},getDesignContent:function(_5b2){
return _5b2;
},get_isDom:function(){
return this.IsDom;
},set_isDom:function(_5b3){
this.IsDom=_5b3;
},get_enabled:function(){
return this.Enabled;
},set_enabled:function(_5b4){
this.Enabled=_5b4;
},get_name:function(){
return this.Name;
},set_name:function(_5b5){
this.Name=_5b5;
},get_description:function(){
return this.Description;
},set_description:function(_5b6){
this.Description=_5b6;
}};
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(_5b7){
return this._performStripping(_5b7);
},getDesignContent:function(_5b8){
return this._performStripping(_5b8);
},_performStripping:function(_5b9){
var _5ba=_5b9.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
_5ba=_5ba.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
return _5ba;
}};
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(_5bb){
var _5bc=new RegExp("<!"+"--RADEDITORSAVEDTAG_([\\s\\S]*?)--"+">","ig");
var _5bd=new RegExp("--RADEDITORSAVEDTAGENDING>","ig");
var _5be=_5bb.replace(_5bc,"<$1>");
_5be=_5be.replace(_5bd,"--"+">");
return _5be;
},getDesignContent:function(_5bf){
var _5c0=function(_5c1,_5c2,_5c3,_5c4,_5c5){
var _5c6=_5c5.substring(0,_5c4).lastIndexOf("<!"+"--");
var _5c7=_5c5.substring(0,_5c4).lastIndexOf("--"+">");
if(_5c6>_5c7){
_5c6=_5c5.substring(_5c4,_5c5.length).indexOf("<!"+"--");
_5c7=_5c5.substring(_5c4,_5c5.length).indexOf("--"+">");
if((_5c6==-1&&_5c7>-1)||(_5c7<_5c6)){
return _5c1;
}
}
var _5c8=_5c3.replace("--"+">","--RADEDITORSAVEDTAGENDING>");
var _5c9="<!"+"--RADEDITORSAVEDTAG_"+_5c2+_5c8+"--"+">";
return _5c9;
};
var _5ca=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig");
var _5cb=_5bf.replace(_5ca,_5c0);
return _5cb;
}};
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(_5cc){
return this._performStripping(_5cc);
},_performStripping:function(_5cd){
var _5ce=_5cd;
_5ce=_5ce.replace(/<BR\s?\/?>\s*<\/(H1|H2|H3|H4|H5|H6|LI|P)/ig,"</$1");
_5ce=_5ce.replace(/<(H1|H2|H3|H4|H5|H6|LI|P)([^>]*)?><BR\s?\/?>/ig,"<$1 $2>");
return _5ce;
}};
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(_5cf,_5d0){
var _5d1=_5cf.getElementsByTagName(_5d0);
if(!_5d1){
_5d1=_5cf.ownerDocument.getElementsByTagName(_5d0);
}
return _5d1;
},fixLists:function(_5d2,_5d3){
var _5d4=this._getElements(_5d2,_5d3);
for(var i=_5d4.length-1;i>=0;i--){
var list=_5d4[i];
var _5d7=list.previousSibling;
if(_5d7&&_5d7.nodeType==3){
_5d7=_5d7.previousSibling;
}
if(_5d7&&"li"==list.previousSibling.nodeName.toLowerCase()){
_5d7.appendChild(list.cloneNode(true));
var _5d8=list.parentNode;
_5d8.removeChild(list);
_5d8=null;
}
}
},getHtmlContent:function(_5d9){
this.fixLists(_5d9,"OL");
this.fixLists(_5d9,"UL");
return _5d9;
}};
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(_5da,_5db){
var _5dc=_5da.getElementsByTagName(_5db);
if(!_5dc){
_5dc=_5da.ownerDocument.getElementsByTagName(_5db);
}
return _5dc;
},_replaceElementWithSpan:function(_5dd,_5de,_5df){
var _5e0=this._getElements(_5dd,_5de);
while(_5e0.length>0){
var _5e1=_5dd.ownerDocument.createElement("span");
_5e1.style.cssText=_5df;
var _5e2=_5e0[0].innerHTML;
if($telerik.isIE&&_5e2==" "){
_5e1.innerText=_5e2;
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_5e1,_5e2);
}
_5e0[0].parentNode.replaceChild(_5e1,_5e0[0]);
_5e0=this._getElements(_5dd,_5de);
}
},_replaceSpanWithElement:function(_5e3,_5e4,_5e5){
var _5e6=this._getElements(_5e3,"span");
var _5e7=_5e6.length-1;
while(_5e7>=0){
var _5e8=[];
var _5e9=_5e6[_5e7];
for(var i=0;i<_5e9.childNodes.length;i++){
Array.add(_5e8,_5e9.childNodes[i].cloneNode(true));
}
if(_5e9.style.cssText.toLowerCase()==_5e5||_5e9.style.cssText.toLowerCase()==(_5e5+";")){
var _5eb=_5e3.ownerDocument.createElement(_5e4);
for(var j=0;j<_5e8.length;j++){
_5eb.appendChild(_5e8[j]);
}
_5e9.parentNode.replaceChild(_5eb,_5e6[_5e7]);
_5e6=this._getElements(_5e3,"span");
_5e7=_5e6.length-1;
}else{
_5e7--;
}
}
},getHtmlContent:function(_5ed){
this._replaceElementWithSpan(_5ed,"u","text-decoration:underline;");
return _5ed;
},getDesignContent:function(_5ee){
this._replaceSpanWithElement(_5ee,"u","text-decoration: underline");
return _5ee;
}};
Telerik.Web.UI.Editor.FixUlBoldItalic.registerClass("Telerik.Web.UI.Editor.FixUlBoldItalic",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(_5ef){
var _5f0=new RegExp("<!"+"--RADEDITORSAVEDCOMMENT","ig");
var _5f1=_5ef.replace(_5f0,"<!--");
return _5f1;
},getDesignContent:function(_5f2){
var _5f3=new RegExp("<!"+"--(\\[[^]]+\\][\\s\\S]*?)-"+"->","ig");
var _5f4=_5f2.replace(_5f3,"<!-"+"-RADEDITORSAVEDCOMMENT$1-"+"->");
return _5f4;
}};
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(_5f5){
var _5f6=new RegExp("<param([\\s\\S]+?)?>","ig");
var _5f7=new RegExp("<rade_param([\\s>])","ig");
var _5f8=_5f5;
if(_5f6.test(_5f5)&&_5f7.test(_5f5)){
_5f8=_5f8.replace(_5f6,"");
}
_5f8=_5f8.replace(_5f7,"<param$1");
_5f8=_5f8.replace(/<\/rade_param>/gi,"");
return _5f8;
},getDesignContent:function(_5f9){
var _5fa=new RegExp("<param([\\s\\S]+?)/?>","ig");
var _5fb=_5f9.replace(_5fa,"<rade_param$1></rade_param><param$1>");
return _5fb;
}};
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={_removeNode:function(node){
var _5fd=node.parentNode;
if(_5fd!=null){
while(node.childNodes&&node.childNodes.length>0){
_5fd.insertBefore(node.childNodes[0],node);
}
_5fd.removeChild(node);
return _5fd;
}
return true;
},getHtmlContent:function(_5fe){
var _5ff=null;
if(_5fe.tagName.toLowerCase()=="html"){
_5ff=_5fe.getElementsByTagName("BODY")[0];
}else{
_5ff=_5fe;
}
if($telerik.isIE){
if(_5ff&&(_5ff.firstChild)&&("P"==_5ff.firstChild.tagName)&&(_5ff.childNodes.length==1)&&(_5ff.innerHTML.substring(0,3).toLowerCase()=="<p>")){
this._removeNode(_5ff.firstChild);
}
}else{
if(_5ff&&(_5ff.childNodes.length==1)&&(_5ff.firstChild.tagName)&&("br"==_5ff.firstChild.tagName.toLowerCase())){
_5ff.innerHTML="";
}
}
return _5fe;
}};
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(_600){
var re=new RegExp("(<p[^>]*>)(<\\/p>)","ig");
var _602=_600.replace(re,"$1&nbsp;$2");
return _602;
}};
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(_603){
var _604=document.location.href;
var re=new RegExp("(<A[^<>]*?(href)\\s*=\\s*['\"])("+_604+")(\\#[^'\"]*?['\"][^>]*?>)","ig");
var _606=_603.replace(re,"$1$4");
return _606;
}};
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(_607){
var _608=_607.replace(new RegExp("<b(\\s([^>])*?)?>","ig"),"<strong$1>");
_608=_608.replace(new RegExp("</b(\\s([^>])*?)?>","ig"),"</strong$1>");
_608=_608.replace(new RegExp("<i(\\s([^>])*?)?>","ig"),"<em$1>");
_608=_608.replace(new RegExp("</i(\\s([^>])*?)?>","ig"),"</em$1>");
return _608;
},getDesignContent:function(_609){
var _60a=_609.replace(new RegExp("<strong(\\s([^>])*?)?>","ig"),"<b$1>");
_60a=_60a.replace(new RegExp("</strong(\\s([^>])*?)?>","ig"),"</b$1>");
_60a=_60a.replace(new RegExp("<em(\\s([^>])*?)?>","ig"),"<i$1>");
_60a=_60a.replace(new RegExp("</em(\\s([^>])*?)?>","ig"),"</i$1>");
return _60a;
}};
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(_60b){
var self=this;
var _60d=function(_60e,_60f,_610,_611,_612){
var _613=_612.indexOf("</head>",_611);
if(_613!=-1&&_612.indexOf("<body",_613)!=-1){
return _60e;
}else{
self.markerCounter++;
var _614="RadEditorStyleKeeper"+self.markerCounter;
var _615="<div id='"+_614+"' style='display:none;'>&nbsp;</div><"+_60f+" reoriginalpositionmarker='"+_614+"'"+_610;
return _615;
}
};
var _616=new RegExp("<(link|style)([^>]*>)","gi");
var _617=_60b.replace(_616,_60d);
return _617;
}};
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(_618){
var _619=_618.getElementsByTagName("HEAD")[0];
var _61a=true;
if(!_619){
_619=_618.ownerDocument.getElementsByTagName("HEAD")[0];
_61a=false;
}
if(!_619){
return _618;
}
this._restoreElements(_619,_618,"STYLE");
this._restoreElements(_619,_618,"LINK");
var divs=_618.getElementsByTagName("DIV");
if(divs){
for(var j=divs.length-1;j>=0;j--){
var _61d=divs[j];
if(_61d.id.indexOf("RadEditorStyleKeeper")==0){
var _61e=_61d.parentNode;
_61e.removeChild(_61d);
}
}
}
divs=null;
if(_61a){
this._removeElements(_619,"STYLE");
this._removeElements(_619,"LINK");
}
this._removeMarkerAttributes(_618,"STYLE");
this._removeMarkerAttributes(_618,"LINK");
return _618;
},_restoreElements:function(_61f,_620,_621){
var _622;
_622=_61f.getElementsByTagName(_621);
this._divs=_620.getElementsByTagName("DIV");
var i=0;
while(_622.length>0&&i<_622.length){
this._restoreStyle(_622[i++]);
}
},_restoreStyle:function(_624){
var _625=_624.getAttribute("reoriginalpositionmarker");
if(_625){
j=0;
var _626=null;
while(j<this._divs.length&&!_626){
if(this._divs[j].id==_625){
_626=this._divs[j];
}
j++;
}
if(_626){
var _627=_624.cloneNode(true);
_627.removeAttribute("reoriginalpositionmarker");
var _628=_626.parentNode;
_628.replaceChild(_627,_626);
return true;
}
}
return false;
},_removeElements:function(_629,_62a){
var _62b=_629.getElementsByTagName(_62a);
if(_62b){
for(var j=_62b.length-1;j>=0;j--){
var _62d=_62b[j];
if(null!=_62d.getAttribute("reoriginalpositionmarker")){
var _62e=_62d.parentNode;
_62e.removeChild(_62d);
}
}
_62b=null;
}
},_removeMarkerAttributes:function(_62f,_630){
styles=_62f.getElementsByTagName(_630);
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(_632){
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=_632?_632:"FlashManager.gif";
};
Telerik.Web.UI.Editor.MozillaKeepFlashString.prototype={getDesignContent:function(_633){
var _634=this;
var _635=function(_636,gr1,gr2,gr3,str,_63b){
var _63c=String.format("<img isflash=\"true\" {0} />{1}",gr1,gr2);
_63c=_63c.replace(/\ssrc=/gi,String.format(" src=\"{0}\" flashSrc=",_634._flashImageSrc));
return _63c;
};
var _63d=new RegExp("<embed([^>]*)?>(.*)?(<\\/embed>)?","ig");
var _63e=_633.replace(_63d,_635);
return _63e;
}};
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(_63f){
if(!_63f){
return _63f;
}
var _640=_63f.getElementsByTagName("IMG");
for(var i=0;i<_640.length;i++){
var _642=_640[i];
var _643=_642.getAttribute("isflash");
if(_643!=null){
var _644=_642.getAttribute("flashSrc");
var _645=Telerik.Web.UI.Editor.Utils.getOuterHtml(_642);
_645=_645.replace(/<img/gi,"<embed");
var oDiv=_642.ownerDocument.createElement("DIV");
oDiv.innerHTML=_645;
newNode=oDiv.firstChild;
if(_644){
newNode.src=_644;
if($telerik.isSafari){
newNode.setAttribute("src",_644);
}
}
newNode.removeAttribute("flashSrc");
newNode.removeAttribute("isflash");
var _647=_642.parentNode;
_647.insertBefore(newNode,_642);
_647.removeChild(_642);
i--;
}
}
return _63f;
}};
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(_648){
var html=_648;
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={dispose:function(){
this._fontSizesPx=null;
this._fontSizesRevPx=null;
},getHtmlContent:function(_64b){
var _64c=_64b.ownerDocument;
var _64d=_64c.createElement("SPAN");
var span,font,_650;
var _651=_64b.getElementsByTagName("FONT");
while(_651.length>0){
font=_651[0];
_650=font.parentNode;
span=_64d.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);
}
_650.replaceChild(span,font);
_651=_64b.getElementsByTagName("FONT");
}
return _64b;
},getDesignContent:function(_653){
var _654=_653.ownerDocument;
var _655=_654.createElement("FONT");
var span,font,_658;
var _659=_653.getElementsByTagName("SPAN");
while(_659.length>0){
span=_659[0];
_658=span.parentNode;
font=_655.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 _65b=null;
if(-1!=span.style.fontSize.indexOf("px")){
_65b=this._fontSizesRevPx[parseInt(span.style.fontSize)];
}
if(typeof (_65b)!="undefined"&&null!=_65b){
font.size=_65b+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);
}
_658.replaceChild(font,span);
_659=_653.getElementsByTagName("SPAN");
}
return _653;
},_fixColorValue:function(_65c){
if(_65c.toLowerCase().indexOf("rgb")!=-1){
var _65d="#";
var _65e=function(val){
var _660=parseInt(val,10).toString(16);
_65d=_65d+(_660.length==1?"0"+_660:_660);
return val;
};
_65c=_65c.replace(/(\d+)/gi,_65e);
_65e=null;
return _65d;
}else{
return _65c;
}
},_removeElementStyleAttribute:function(_661,_662){
if(_661.style&&_661.style[_662]){
if(_661.style.removeAttribute){
_661.style.removeAttribute(_662);
}else{
if(_661.style.removeProperty){
_662=_662.replace(/([A-Z])/g,"-$1").toLowerCase();
_661.style.removeProperty(_662);
}
}
if(_661.style[_662]){
_661.style[_662]=null;
}
if(_661.style.cssText){
}else{
_661.removeAttribute("style");
}
}
}};
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.registerClass("Telerik.Web.UI.Editor.ConvertFontToSpanFilter",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={dispose:function(){
this._uniqueIds=null;
},getHtmlContent:function(_663){
if(!_663){
return "";
}
var sb=new Sys.StringBuilder("");
this._appendNodeXhtml(_663,sb);
return sb.toString();
},_convertAttribute:function(s){
return String(s).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
},_getAttributeValue:function(_666,_667,sb){
var name=_666.nodeName;
var _66a=_666.nodeValue;
if(name!="style"){
if($telerik.isIE&&(name=="type"||name=="value"||name=="selected")){
if(!_66a){
return;
}
}else{
if(!_666.specified){
if($telerik.isIE&&_66a==""&&typeof (_667[name])=="string"&&_667[name]!=""){
_66a=_667[name];
}else{
return;
}
}
}
if(!_66a){
return;
}
if(!isNaN(_66a)){
_66a=_667.getAttribute(name);
}
if($telerik.isIE&&(name=="href"||name=="src")){
_66a=_667.getAttribute(name,2);
}
sb.append(" "+(_666.expando?name:name.toLowerCase())+"=\""+this._convertAttribute(_66a)+"\"");
}else{
var _66b=_667.style.cssText;
if(_66b){
sb.append(" style=\""+this._convertAttribute(_66b.toLowerCase())+"\"");
}
}
},_canHaveChildren:function(node){
switch(node.tagName.toUpperCase()){
case "AREA":
case "BASE":
case "BASEFONT":
case "COL":
case "FRAME":
case "HR":
case "IMG":
case "BR":
case "INPUT":
case "ISINDEX":
case "LINK":
case "META":
case "PARAM":
return false;
}
return true;
},_appendElementNode:function(node,sb){
if(node.tagName.charAt(0)=="/"){
return;
}
if(node.nodeName=="!"){
sb.append(node.text);
return;
}
var name=node.nodeName;
if(node.scopeName){
if(node.scopeName=="HTML"){
name=name.toLowerCase();
}else{
name=node.scopeName+":"+name;
}
}else{
name=name.toLowerCase();
}
sb.append("<"+name);
if($telerik.isIE){
if("img"==name){
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(oImg.getAttribute("alt").length==0){
sb.append(" alt=\""+oImg.getAttribute("alt")+"\"");
}
}else{
if("area"==name||"a"==name){
if(node.shape){
sb.append(" shape=\""+node.shape.toLowerCase()+"\"");
}
if(node.coords){
sb.append(" coords=\""+node.getAttribute("coords")+"\"");
}
if(node.href){
var _671=node.getAttribute("href",2).replace("about:blank","");
_671=_671.replace("about:","");
_671=_671.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
sb.append(" href=\""+_671+"\"");
node.removeAttribute("href",0);
}
}
}
}
try{
var _672=node.attributes;
var l=_672.length;
for(var i=0;i<l;i++){
this._getAttributeValue(_672[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 _675="";
if(node.altHtml){
_675=node.altHtml;
}else{
_675=node.innerHTML;
}
if($telerik.isIE){
_675=_675.replace(/\soriginalAttribute="[^"]+"/gi,"");
_675=_675.replace(/\soriginalPath="[^"]+"/gi,"");
}
sb.append(_675);
sb.append("</object>");
break;
case "title":
case "style":
case "comment":
case "noscript":
var _675=node.innerHTML;
if($telerik.isIE&&_675.length==0){
_675=node.ownerDocument.title;
}
sb.append(">"+_675+"</"+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 _679=String(node.nodeValue);
var _67a=node.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(_67a=="style"||_67a=="script")){
sb.append(_679);
}else{
_679=_679.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if($telerik.isFirefox){
_679=_679.replace(/[\u00a0]/g,"&nbsp;");
}
sb.append(_679);
}
},_appendCDataNode:function(node,sb){
sb.append("<![CDA"+"TA[\n"+node.nodeValue+"\n]"+"]>");
},_appendCommentNode:function(node,sb){
var _67f=node.nodeValue;
if(!_67f&&node.text){
_67f=node.text;
}else{
_67f="<!--"+_67f+"-->";
}
sb.append(_67f);
},_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 _682="P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION";
var _683="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var _684=_683+"|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+_682+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+_682+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+_683+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+_684+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+_684+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={dispose:function(){
this._protectedData=[];
},getHtmlContent:function(html){
var _686=html.trim();
if(_686.indexOf("<body")==0){
_686=_686.substring(_686.indexOf(">")+1,_686.length-7);
}
this._protectedData=[];
var self=this;
var _688=function(_689,_68a,_68b,_68c,_68d,_68e){
Array.add(self._protectedData,_68b);
return _68a+"RADEDITORFORMATTED_"+self._protectedData.length+_68c;
};
_686=_686.replace(this._ignoreTags,_688);
var _68f="$&";
if($telerik.isSafari){
_68f="$0";
}
_686=_686.replace(this._tagsNLBefore,"\n"+_68f);
_686=_686.replace(this._tagsNLAfter,_68f+"\n");
_686=_686.replace(this._tagsNLNoCloseAfter,_68f+"\n");
_686=_686.replace(this._tagsNLBeforeAndAfter,"\n"+_68f+"\n");
var _690=_686.split(this._shrinkNL);
var _691=new Sys.StringBuilder("");
var _692="";
for(var i=0;i<_690.length;i++){
var line=_690[i];
if(line.length==0){
continue;
}
if(this._tagsDecIndent.test(line)){
if(_692.length>this._indentPattern.length){
_692=_692.substring(this._indentPattern.length);
}else{
_692="";
}
}
_691.append(_692);
_691.append(line);
_691.append("\n");
if(this._tagsIncIndent.test(line)){
_692+=this._indentPattern;
}
}
_686=_691.toString();
for(var i=0;i<this._protectedData.length;i++){
var _695=new RegExp("RADEDITORFORMATTED_"+(i+1));
_686=_686.replace(_695,this._protectedData[i]);
}
return _686;
}};
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(_696){
this._updateElements(_696,"A","href");
this._updateElements(_696,"AREA","href");
this._updateElements(_696,"IMG","src");
this._updateElements(_696,"EMBED","src");
return _696;
},_getElements:function(_697,_698){
var _699=_697.getElementsByTagName(_698);
if(!_699){
_699=_697.ownerDocument.getElementsByTagName(_698);
}
return _699;
},_updateElements:function(_69a,_69b,_69c){
var _69d=_69a.ownerDocument.createElement("div");
var _69e=this._getElements(_69a,_69b);
if(_69e){
for(var i=0;i<_69e.length;i++){
if("href"==_69c&&_69e[i].getAttribute("href",2)){
_69d.innerHTML="<a href=\""+_69e[i].getAttribute("href",2).replace(/\"/gi,"%22")+"\">test</a>";
if($telerik.isIE){
var _6a0=_69e[i].innerHTML;
}
_69e[i].setAttribute("href",_69d.childNodes[0].href);
if($telerik.isIE&&_6a0.indexOf("www.")==0&&_69e[i].innerHTML.match("[a-z]+://")){
_69e[i].innerHTML=_6a0;
}
}else{
if("src"==_69c&&_69e[i].getAttribute("src",2)){
_69d.innerHTML="<img src=\""+_69e[i].getAttribute("src",2).replace(/\"/gi,"%22")+"\" />";
_69e[i].setAttribute("src",_69d.childNodes[0].src);
}
}
}
}
_69d.innerHTML="";
_69d=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={dispose:function(){
this._filters=null;
this._convertToXhtmlFilter=null;
},clear:function(){
Array.clear(this._filters);
},get_enableXhtmlFilter:function(){
return this._enableXhtmlFilter;
},set_enableXhtmlFilter:function(_6a1){
this._enableXhtmlFilter=_6a1;
},add:function(_6a2){
Array.add(this._filters,_6a2);
},addAt:function(_6a3,_6a4){
Array.insert(this._filters,_6a4,_6a3);
},remove:function(_6a5){
Array.remove(this._filters,_6a5);
},removeAt:function(_6a6){
Array.removeAt(this._filters,_6a6);
},getFilterAt:function(_6a7){
return this._filters[_6a7];
},getFilterByName:function(name){
for(var i=0;i<this._filters.length;i++){
var _6aa=this._filters[i];
if(_6aa&&name==_6aa.get_name()){
return _6aa;
}
}
},getDesignContent:function(_6ab){
var _6ac=_6ab;
for(var i=0;i<this._filters.length;i++){
var _6ae=this._filters[i];
if((!_6ae.get_isDom())&&(false!=_6ae.get_enabled())&&_6ae.getDesignContent){
try{
_6ac=_6ae.getDesignContent(_6ac);
}
catch(exc){
alert("Error while executing filter "+_6ae.get_name()+" - "+exc.toString());
}
}
}
return _6ac;
},getDesignContentDom:function(_6af){
for(var i=0;i<this._filters.length;i++){
var _6b1=this._filters[i];
if((_6b1.get_isDom())&&(false!=_6b1.get_enabled())&&_6b1.getDesignContent){
try{
_6af=_6b1.getDesignContent(_6af);
}
catch(exc){
alert("Error while executing filter "+_6b1.get_name()+" - "+exc.toString());
}
}
}
return _6af;
},getHtmlContent:function(_6b2){
for(var i=0;i<this._filters.length;i++){
var _6b4=this._filters[i];
if((_6b4.get_isDom())&&(false!=_6b4.get_enabled())&&_6b4.getHtmlContent){
try{
_6b2=_6b4.getHtmlContent(_6b2);
}
catch(exc){
alert("Error while executing filter "+_6b4.get_name()+" - "+exc.toString());
}
}
}
var _6b5;
if(this.get_enableXhtmlFilter()){
try{
_6b5=this._convertToXhtmlFilter.getHtmlContent(_6b2);
}
catch(exc){
alert("Error while executing filter XHTML - "+exc.toString());
}
}else{
_6b5=_6b2.innerHTML;
}
_6b5=_6b5.replace(/<body\s*\/>/i,"<body></body>");
for(var i=0;i<this._filters.length;i++){
var _6b4=this._filters[i];
if((!_6b4.get_isDom())&&(false!=_6b4.get_enabled())&&_6b4.getHtmlContent){
try{
_6b5=_6b4.getHtmlContent(_6b5);
}
catch(exc){
alert("Error while executing filter "+_6b4.get_name()+" - "+exc.toString());
}
}
}
return _6b5;
}};
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(_6b6){
this.Window=_6b6;
this.Document=_6b6.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 _6b7=this.Document.selection.createRange();
if(_6b7.length){
this.SourceIndex=_6b7.item(0).sourceIndex;
}else{
this.StartBookmark=_6b7.getBookmark();
}
},restore:function(_6b8){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.Document.body,this.HtmlText);
this.select(_6b8);
},select:function(_6b9){
if(null!=this.SourceIndex){
var _6ba=this.Document.body.createControlRange();
_6ba.addElement(this.Document.all(this.SourceIndex));
_6ba.select();
}else{
if(null!=this.StartBookmark){
var _6ba=this.Document.body.createTextRange();
_6ba.moveToBookmark(this.StartBookmark);
_6ba.select();
if(true==_6b9&&_6ba.collapse){
_6ba.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(_6bb){
if(_6bb){
return {anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_6bb.anchorNode),anchorOffset:_6bb.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,_6bb.focusNode),focusOffset:_6bb.focusOffset,isCollapsed:_6bb.isCollapsed};
}else{
return {};
}
},_moveToBookmark:function(_6bc,_6bd){
var _6be=_6bd.anchorNodeBookmark.select();
var _6bf=_6bd.focusNodeBookmark.select();
_6bc.collapse(_6be,_6bd.anchorOffset);
if(!_6bd.isCollapsed){
_6bc.extend(_6bf,_6bd.focusOffset);
}
}};
}
Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(_6c0,node){
this.Window=_6c0;
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(_6c3,node){
var n,res;
for(var i=0;i<_6c3.childNodes.length;i++){
n=_6c3.childNodes[i];
res=this._findNodePath(n,node);
if(""!=res){
return ""+i+","+res;
}
if(n==node){
return ""+i;
}
}
return "";
},_findNode:function(_6c8,_6c9){
var arr=_6c9.split(",");
for(var i=0;i<arr.length;i++){
_6c8=_6c8.childNodes[arr[i]];
}
return _6c8;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Selection=function(_6cc){
this._window=_6cc;
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(_6cd,_6ce){
_6ce=(_6ce==true);
if($telerik.isIE){
return this._executeIE(_6cd,_6ce);
}else{
return this._executeMozilla(_6cd,_6ce);
}
},_executeIE:function(_6cf,_6d0){
var _6d1=this._window.document;
var _6d2=_6d1.selection;
if(_6d2.type.toLowerCase()!="none"){
_6d2.createRange().execCommand("Delete");
}
if(_6d2.type.toLowerCase()!="none"){
_6d1.execCommand("Delete");
}
_6d1.body.setActive();
selRange=_6d2.createRange();
if(selRange&&selRange.length){
var _6d3=selRange.item(0);
if(_6d3&&_6d3.tagName=="BODY"){
var _6d4=_6d3.getElementsByTagName("FORM")[0];
if(_6d4){
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(_6d4,_6d4.innerHTML+_6cf);
}
}
}else{
var _6d5=selRange.duplicate();
_6d5.collapse(true);
_6cf=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(_6cf);
selRange.pasteHTML(_6cf);
Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(selRange.parentElement());
if(_6d0){
_6d5.setEndPoint("EndToEnd",selRange);
_6d5.select();
}
}
return true;
},_executeMozilla:function(_6d6,_6d7){
var oDoc=this._window.document;
var _6d9=oDoc.createElement("SPAN");
_6d9.innerHTML=_6d6;
var _6da="radetempnode";
if(this.isOpera){
_6d9.setAttribute("id",_6da);
}
this._insertNodeAtSelection(this._window,_6d9,true);
if(this.isOpera){
var _6db=oDoc.createRange();
var _6dc=this._window.getSelection();
var span=oDoc.getElementById(_6da);
_6db.selectNodeContents(span);
var _6de=_6db.extractContents();
_6db.selectNode(span);
var _6df=_6db.extractContents();
_6db.insertNode(_6de);
_6dc.addRange(_6db);
return true;
}else{
if(!this.isSafari){
var _6db=oDoc.createRange();
_6db.selectNodeContents(_6d9);
var _6de=_6db.extractContents();
_6db.selectNode(_6d9);
_6db.deleteContents();
this._insertNodeAtSelection(this._window,_6de,_6d7);
}
}
return true;
},_insertNodeAtSelection:function(win,_6e1,_6e2){
var _6e3=win.getSelection();
if(_6e3.rangeCount==0){
win.document.body.appendChild(_6e1);
return;
}
var _6e4=null;
if(_6e3.getRangeAt){
_6e4=_6e3.getRangeAt(0);
}else{
_6e4=win.document.createRange();
_6e4.setStart(_6e3.anchorNode,_6e3.anchorOffset);
_6e4.setEnd(_6e3.focusNode,_6e3.focusOffset);
}
if(_6e3.removeAllRanges){
_6e3.removeAllRanges();
}
_6e4.deleteContents();
var _6e5=$telerik.isSafari&&!$telerik.isSafari3?_6e3.baseNode:_6e4.startContainer;
var _6e6=$telerik.isSafari&&!$telerik.isSafari3?_6e3.baseOffset:_6e4.startOffset;
if($telerik.isSafari&&null==_6e5){
_6e5=win.document.body;
}
_6e4=win.document.createRange();
if((_6e1.nodeType==3)&&(_6e5.nodeType==3)){
_6e5.insertData(_6e6,_6e1.nodeValue);
_6e4.setEnd(_6e5,_6e6+_6e1.length);
if(_6e2){
_6e4.setStart(_6e5,_6e6);
}else{
_6e4.setStart(_6e5,_6e6+_6e1.length);
}
}else{
var _6e7;
if(_6e5.nodeType==3){
var _6e8=_6e5;
_6e5=_6e8.parentNode;
var _6e9=_6e8.nodeValue;
var _6ea=_6e9.substr(0,_6e6);
var _6eb=_6e9.substr(_6e6);
var _6ec=win.document.createTextNode(_6ea);
var _6e7=win.document.createTextNode(_6eb);
_6e5.insertBefore(_6e7,_6e8);
_6e5.insertBefore(_6e1,_6e7);
try{
_6e5.insertBefore(_6ec,_6e1);
}
catch(exc){
}
_6e5.removeChild(_6e8);
}else{
if(_6e5.childNodes.length>0){
_6e7=_6e5.childNodes[_6e6];
_6e5.insertBefore(_6e1,_6e7);
}else{
if(_6e5.tagName!="BODY"){
_6e5=_6e5.parentNode;
}
_6e5.appendChild(_6e1);
}
}
try{
if(_6e2){
_6e4.setStart(_6e1,0);
_6e4.setEnd(_6e7,0);
}else{
_6e4.setEnd(_6e7,0);
_6e4.setStart(_6e7,0);
}
}
catch(exc){
}
}
try{
_6e3.addRange(_6e4);
}
catch(exc){
}
},selectRange:function(_6ed){
if(!_6ed){
return;
}
var _6ee=this._window;
if(_6ed.select){
_6ed.select();
}else{
if(_6ee.getSelection){
var _6ef=_6ee.getSelection();
if(_6ef.removeAllRanges){
_6ef.removeAllRanges();
_6ef.addRange(_6ed);
}else{
var base=_6ed.baseNode;
if(null==base){
base=_6ee.document.body;
}
var _6f1=_6ed.extentNode;
if(null==_6f1){
_6f1=_6ee.document.body;
}
_6ef.setBaseAndExtent(base,_6ed.startOffset,_6f1,_6ed.endOffset);
}
}
}
},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 _6f2=this._window.getSelection();
if(!_6f2||_6f2.rangeCount<1){
return null;
}
var rng=null;
if(_6f2.getRangeAt){
rng=_6f2.getRangeAt(0);
}else{
rng=this._window.document.createRange();
rng.setStart(_6f2.anchorNode,_6f2.anchorOffset);
rng.setEnd(_6f2.focusNode,_6f2.focusOffset);
}
return rng;
}
}
},getParentElement:function(){
var rng=this.getRange();
if(!rng){
return null;
}
if(rng.commonAncestorContainer){
var _6f5=this._window.getSelection();
var _6f6=rng.startContainer?rng.startContainer:_6f5.baseNode;
var _6f7=rng.endContainer?rng.endContainer:_6f5.extentNode;
var _6f8=rng.startOffset!=null?rng.startOffset:_6f5.baseOffset;
var _6f9=rng.endOffset!=null?rng.endOffset:_6f5.extentOffset;
if(_6f6==_6f7&&(_6f9-_6f8)==1){
return _6f5.anchorNode.childNodes[_6f5.anchorOffset];
}else{
if(!rng.commonAncestorContainer.tagName){
if(this._window.document==rng.commonAncestorContainer&&_6f5.baseNode){
return _6f5.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 _6fb=oSel.focusNode;
if(!_6fb||_6fb.nodeType==1){
return false;
}
return (_6fb.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 _6fe=this._window.getSelection();
var rng=null;
if(null==_6fe){
return "";
}
if(_6fe.getRangeAt&&typeof (_6fe.rangeCount)!="undefined"&&_6fe.rangeCount==0){
return "";
}
if(_6fe.getRangeAt){
rng=_6fe.getRangeAt(0);
var _6ff=this._window.document.createElement("div");
var _700=rng.cloneContents();
if(_700){
_6ff.appendChild(_700);
return _6ff.innerHTML;
}else{
return "";
}
}else{
return _6fe;
}
}else{
return "";
}
}
},collapse:function(_701){
_701=(_701==true);
if(this._window.document.selection){
var rng=this._window.document.selection.createRange();
if(rng.collapse){
rng.collapse(_701);
rng.select();
}
}else{
if(this._window.getSelection){
var _703=this._window.getSelection();
if(!_703.isCollapsed){
if(_701){
_703.collapseToStart();
}else{
_703.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(_704,_705){
var rs=new Telerik.Web.UI.EditorShortCut(_704,_705);
rs.HashValue=this._getShortCutHashValue(rs);
this._shortcuts[rs.HashValue]=rs;
},removeShortCut:function(_707){
var _708=this._findByName(_707);
if(_708){
this._shortcuts[_708.HashValue]=null;
}
},setShortCut:function(_709,_70a){
this.removeShortCut(_709);
this.addShortCut(_709,_70a);
},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(_70c,_70d,_70e,_70f,_710,_711,_712){
var _713=this._getHashValue(_70c,_70d,_70e,_70f,_710,_711,_712);
return this._shortcuts[_713];
},_getHashValue:function(_714,_715,_716,_717,_718,_719,_71a){
var _71b=_714&65535;
var _71c=0;
_71c|=(_715?(1<<0):0);
_71c|=(_717?(1<<2):0);
_71c|=(_719?(1<<4):0);
_71b|=(_71c<<16);
return _71b;
},_getShortCutHashValue:function(_71d){
return this._getHashValue(_71d.KeyCode,_71d.CtrlKey,_71d.LeftCtrlKey,_71d.ShiftKey,_71d.LeftShiftKey,_71d.AltKey,_71d.LeftAltKey);
},_findByName:function(_71e){
var _71f;
for(var _720 in this._shortcuts){
_71f=this._shortcuts[_720];
if(null!=_71f&&_71f._name==_71e){
return _71f;
}
}
return null;
}};
Telerik.Web.UI.EditorShortCut=function(_721,_722){
this._name=_721;
this.setShortCut(_722);
};
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(_723){
this._name=_723;
},setShortCut:function(_724){
this._parseShortcutString(_724);
},_parseShortcutString:function(_725){
if("string"==typeof (_725)){
this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
_725=_725.replace(/\s*/gi,"");
_725=_725.replace(/\+\+/gi,"+PLUS");
var _726=_725.split("+");
var _727="";
for(var i=0;i<_726.length;i++){
_727=_726[i].toUpperCase();
switch(_727){
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=_727.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(_729,_72a,_72b){
if(typeof (this._controls[_729])=="undefined"){
this._controls[_729]={};
}
if(typeof (this._controls[_729][_72a])=="undefined"){
this._controls[_729][_72a]={};
}
var _72c=this._controls[_729][_72a];
for(var _72d in _72b){
if(typeof (_72b[_72d])=="string"){
_72c[_72d]=_72b[_72d];
}
}
return _72c;
}};
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.EditorCommandEventArgs=function(_72e,tool,_730){
Telerik.Web.UI.EditorCommandEventArgs.initializeBase(this);
this._name=this._commandName=_72e;
this._tool=tool;
this._value=_730;
this.value=_730;
};
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);
Telerik.Web.UI.RadEditor=function(_732){
Telerik.Web.UI.RadEditor.initializeBase(this,[_732]);
this._rootElement=null;
this._bottomResizer=null;
this._tableElement=null;
this._document=null;
this._contentArea=null;
this._contentAreaElement=null;
this._contentHiddenTextarea=null;
this._contentTextArea=null;
this._contentWindow=null;
this._doctypeString=null;
this._fullPage=null;
this._originalHeight=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._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(_733){
this.get_events().addHandler("spellCheckLoaded",_733);
},remove_spellCheckLoaded:function(_734){
this.get_events().removeHandler("spellCheckLoaded",_734);
},get_ajaxSpellCheck:function(){
return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(_735){
this._ajaxSpellCheck=_735;
this.raiseEvent("spellCheckLoaded");
},get_ajaxSpellCheckScriptReference:function(){
return this._ajaxSpellCheckScriptReference;
},get_spellAllowAddCustom:function(){
return this._spellAllowAddCustom;
},set_spellAllowAddCustom:function(_736){
this._spellAllowAddCustom=_736;
},get_spellCheckJSON:function(){
return this._spellCheckJSON;
},set_spellCheckJSON:function(_737){
this._spellCheckJSON=_737;
},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(_739,args){
},raiseEvent:function(_73b,args){
if(_73b!="selectionChange"||this.get_mode()==Telerik.Web.UI.EditModes.Design){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"raiseEvent",[_73b,args]);
}
},initialize:function(){
Telerik.Web.UI.RadEditor.callBaseMethod(this,"initialize");
this.raiseEvent("init",Sys.EventArgs.Empty);
var _73d=$get(this.get_id()+"Wrapper");
this._originalHeight=_73d.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
this._createTools();
this._makeResizeable(true);
if(true){
var _73e=$get(this.get_id()+"ContentHiddenTextarea");
if(_73e){
_73e.setAttribute("id",this.get_id());
this._contentHiddenTextarea=_73e;
}
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);
}
}
var _73f=this;
window.setTimeout(function(){
if(_73f.isIE){
if($telerik.isOpera){
return;
}
var area=_73f.get_contentArea();
if(!area){
return;
}
try{
var r=area.createTextRange();
var _742=document.body.createTextRange();
_742.moveStart("textedit",_742.text.length);
_742.collapse(true);
_742.select();
}
catch(e){
}
}
},0);
this._fixIEVisibilityProblems(true);
this._fixMozillaDOMProblems(true);
if(this._modulesManager){
if(!this.isIE){
var _743=$get(this.get_id()+"Module");
_743.style.display="none";
var _744=this;
window.setTimeout(function(){
_744._modulesManager.initialize();
_743.style.display="";
},0);
}else{
this._modulesManager.initialize();
this._updateEditorSize(this._originalHeight);
}
}
if(this.get_autoResizeHeight()&&!this._getInvisibleParent()){
this._makeAutoResizeHeight();
}
this._initialContent=_73f.get_html(true);
this.raiseEvent("load",Sys.EventArgs.Empty);
},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);
Telerik.Web.UI.RadEditor.callBaseMethod(this,"dispose");
},_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 _746=this;
this.attachEventHandler("keydown",function(e){
if(!_746._isKeyUpButton(e)){
_746._resizeContentArea(e);
}
});
this.attachEventHandler("keyup",function(e){
if(_746._isKeyUpButton(e)||(e.keyCode==13&&!_746.isIE)){
_746._resizeContentArea(e);
}
});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
},_isKeyUpButton:function(e){
var _74a=e.keyCode;
if(_74a==8||_74a==46){
return true;
}
return false;
},_getCurrentFontSize:function(){
var o=this.getSelectedElement();
var _74c=parseInt($telerik.getCurrentStyle(o,"fontSize"));
return _74c;
},_resizeContentArea:function(e){
var body=this.isIE?this._document.body:this._document.documentElement;
var _74f=this._contentAreaElement;
var _750=_74f.parentNode;
var _751=this._initialContentHeight;
var _752=_74f.offsetHeight;
var _753=body.scrollHeight+(e&&e.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(_753==_752){
return;
}
if((_751==_752)&&(_753<=_751)){
return;
}
var _754=(_753>_751)?_753:_751;
_74f.style.height=_754+"px";
if(_753>_752){
_750.style.height=parseInt(_753)+"px";
}else{
var _755=this.get_element();
var _756=_755.offsetHeight-(_750.offsetHeight-_74f.offsetHeight);
if(_74f.style.height!="100%"){
_750.style.height="";
this._updateEditorSize(_756);
}
return;
}
this._updateEditorSize(null,true);
},_makeResizeable:function(_757){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_757){
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";
}
}
var _758={se:this._bottomResizer};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._rootElement,_758,this._tableElement);
},_getInvisibleParent:function(){
return Telerik.Web.UI.Editor.Utils.getInvisibleParent(this.get_element());
},_fixIEVisibilityProblems:function(_759){
if(!this.isIE){
return;
}
if(_759){
var _75a=this._getInvisibleParent();
if(_75a){
this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=_75a;
$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(_75b){
if(this.isIE){
return;
}
if(_75b){
var _75c=this._getInvisibleParent();
if(_75c){
this._invisibleParent=_75c;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
_75c.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"){
if(this._invisibleParent.style.display!="none"){
if(this.get_autoResizeHeight()){
this._makeAutoResizeHeight();
}
this._updateEditorSize();
this._fixIEVisibilityProblems(false);
}
}
},_onMozillaParentVisibilityChange:function(e){
if(e.attrName=="style"){
var _75f=e.target;
if(_75f.style.display!="none"){
if(this.get_autoResizeHeight()){
this._makeAutoResizeHeight();
}
this.set_editable(true);
}
}
},_onMozillaParentNodeChanged:function(e){
if(!e.target||!this.get_element()){
return;
}
var _761=$telerik.isDescendantOrSelf(e.target,this.get_element());
if(_761){
this.onParentNodeChanged();
}
},onParentNodeChanged:function(){
if(!$telerik.isIE){
var _762=this.get_html(true);
var _763=this.get_contentAreaElement();
this._contentWindow=_763.contentWindow;
this._setContentAreaHtml(_762,true);
this.set_editable(true);
}
},onResizeStart:function(){
this._resizeSelection=this.getSelection().getRange();
},onResizeEnd:function(){
if(!this.isIE){
return;
}
this.setActive();
if(this._resizeSelection){
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();
},selectElement:function(_764,_765){
if(Telerik.Web.UI.Editor.Utils.selectElement(this.get_contentWindow(),_764)&&false!=_765){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},undo:function(_766){
this._commandsManager.undo(_766);
},redo:function(_767){
this._commandsManager.redo(_767);
},executeCommand:function(_768,_769,_76a){
if(!_768.get_window()){
_768.set_window(this.get_contentWindow());
}
if(false!=_769&&!this.isOpera){
this.setFocus();
}
this._commandsManager.execute(_768,_76a);
},executeBrowserCommand:function(_76b,_76c,_76d,_76e){
var _76f=this._localization[_76b];
this.executeCommand(new Telerik.Web.UI.Editor.BrowserCommand(_76f,this._contentWindow,_76b,_76d));
this.setActive();
this.setFocus();
if(true==_76e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},createElement:function(_770,_771,_772,sId,_774,_775){
var _776=this._document.createElement(_770);
if(_771){
_776.style.width=_771;
}
if(_772){
_776.style.height=_772;
}
if(null!=sId){
_776.id=sId;
}
if(null!=_774){
_776.name=_774;
}
if(null!=_775){
_776.value=_775;
}
return _776;
},createRestorePoint:function(){
return new Telerik.Web.UI.Editor.RestorePoint(this._contentWindow);
},getToolState:function(_777){
if(_777=="Undo"){
return this.get_commandsManager().isUndoAvailable()?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
}else{
if(_777=="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[_777];
if(oCmd&&oCmd.getState){
return oCmd.getState(this._contentWindow);
}
}
}
},getToolValue:function(_779){
var oCmd=Telerik.Web.UI.Editor.UpdateCommandsArray[_779];
if(oCmd&&oCmd.getValue){
return oCmd.getValue(this._contentWindow);
}else{
if(_779=="RealFontSize"){
var o=this.getSelectedElement();
if(o){
var _77c=null;
try{
_77c=$telerik.getCurrentStyle(o,"fontSize","");
}
catch(exc){
}
if(_77c){
var _77d=parseFloat(_77c);
if(_77d>parseInt(_77c)){
if(_77c.indexOf("px")>-1){
_77c=parseInt(_77c)+"px";
}
}
}
return _77c;
}
}
}
},_addFilters:function(){
var _77e=this.get_filtersManager();
var _77f=this.get_contentFilters();
_77e.clear();
var _780=_77f&Telerik.Web.UI.EditorFilters.ConvertToXhtml;
_77e.set_enableXhtmlFilter(_780);
if(_77f&Telerik.Web.UI.EditorFilters.RemoveScripts){
_77e.add(new Telerik.Web.UI.Editor.StripScriptsFilter());
}
_77e.add(new Telerik.Web.UI.Editor.EncodeScriptsFilter());
if(_77f&Telerik.Web.UI.EditorFilters.FixUlBoldItalic){
_77e.add(new Telerik.Web.UI.Editor.FixUlBoldItalic());
}
_77e.add(new Telerik.Web.UI.Editor.FixNestedLists());
if(_77f&Telerik.Web.UI.EditorFilters.ConvertFontToSpan){
_77e.add(new Telerik.Web.UI.Editor.ConvertFontToSpanFilter());
}
if(_77f&Telerik.Web.UI.EditorFilters.FixEnclosingP){
_77e.add(new Telerik.Web.UI.Editor.FixEnclosingP());
}
if($telerik.isIE){
_77e.add(new Telerik.Web.UI.Editor.IEKeepObjectParamsFilter());
_77e.add(new Telerik.Web.UI.Editor.IEKeepCommentsFilter());
_77e.add(new Telerik.Web.UI.Editor.IEFixEmptyParagraphs());
if(_77f&Telerik.Web.UI.EditorFilters.IECleanAnchors){
_77e.add(new Telerik.Web.UI.Editor.IECleanAnchorsFilter());
}
}
if(!$telerik.isIE&&!$telerik.isOpera){
if(!$telerik.isSafari){
_77e.add(new Telerik.Web.UI.Editor.MozillaKeepFlashString(this.get_mozillaFlashOverlayImage()));
_77e.add(new Telerik.Web.UI.Editor.MozillaKeepFlash());
}
_77e.add(new Telerik.Web.UI.Editor.MozillaKeepStylesString());
_77e.add(new Telerik.Web.UI.Editor.MozillaKeepStylesDom());
if(_77f&Telerik.Web.UI.EditorFilters.MozEmStrong){
_77e.add(new Telerik.Web.UI.Editor.MozEmStrongFilter());
}
}
_77e.add(new Telerik.Web.UI.Editor.StripJunkFilter());
if(_77f&Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute){
_77e.add(new Telerik.Web.UI.Editor.MakeUrlsAbsolute());
}
_77e.add(new Telerik.Web.UI.Editor.RemoveExtraBrakes());
if(_77f&Telerik.Web.UI.EditorFilters.IndentHTMLContent){
_77e.add(new Telerik.Web.UI.Editor.IndentHTMLContentFilter());
}
},addShortCut:function(_781,_782){
if(this._shortCutManager){
this._shortCutManager.addShortCut(_781,_782);
}
},removeShortCut:function(_783){
if(this._shortCutManager){
this._shortCutManager.removeShortCut(_783);
}
},setShortCut:function(_784,_785){
if(this._shortCutManager){
this._shortCutManager.setShortCut(_784,_785);
}
},_addDefaultShortCuts:function(){
var _786=[["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<_786.length;i++){
this.addShortCut(_786[i][0],_786[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(_788,_789){
if(_788.startsWith("on")){
_788=_788.replace("on","");
}
$telerik.addExternalHandler(this._document,_788,_789);
var _78a=this._contentAreaEventHandlers;
if(!_78a[_788]){
_78a[_788]=[];
}
var _78b=_78a[_788];
_78b[_78b.length]=_789;
},detachEventHandler:function(_78c,_78d){
if(_78c.startsWith("on")){
_78c=_78c.replace("on","");
}
$telerik.removeExternalHandler(this._document,_78c,_78d);
},_detachEvents:function(){
var _78e=this._contentAreaEventHandlers;
for(var _78f in _78e){
var _790=_78e[_78f];
if(_790.length!=null){
for(var i=0;i<_790.length;i++){
var _792=_790[i];
if(typeof (_792)=="function"){
try{
this.detachEventHandler(_78f,_792);
}
catch(e){
}
}
}
_790=[];
}
}
this._contentAreaEventHandlers={};
this._attachIEBodyHandlers(false);
},get_TopZone:function(){
return $get(this.get_id()+"Top");
},_createTools:function(){
if(!this._toolAdapter){
var _793=this.get_TopZone().firstChild;
var _794=eval(this._toolAdapterType);
this._toolAdapter=$create(_794,{"editor":this,"toolJSON":this.get_toolJSON()},{"toolClick":this._onToolClickDelegate},null,_793);
if(this.isIE){
if(this.get_toolbarMode()==Telerik.Web.UI.EditorToolbarMode.Default){
_793.style.overflow="";
}
this._updateEditorSize();
}
}
},_onToolClick:function(tool,args){
this.fire(tool.get_name(),args);
},getContextMenuByTagName:function(_797){
if(this._toolAdapter&&this._toolAdapter.getContextMenuByTagName){
return this._toolAdapter.getContextMenuByTagName(_797);
}
},getToolByName:function(_798){
if(this._toolAdapter){
return this._toolAdapter.getToolByName(_798);
}
return null;
},getLocalizedString:function(name,_79a){
var str=this.get_localization()[name];
if(null==str){
str=this.get_localization()[name.toLowerCase()];
}
if(null==str){
str=_79a;
}
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 _79d=this.get_contentArea();
if(_79d&&_79d.setActive){
_79d.setActive();
}
},set_visible:function(_79e){
var _79f=this.get_element();
if(_79f){
_79f.style.display=_79e?"":"none";
}
this.set_editable(_79e);
},enableEditing:function(_7a0,_7a1,_7a2){
var _7a3=this.get_toolAdapter();
var _7a4=Telerik.Web.UI.EditingOptions;
var _7a5=function(){
};
if(!_7a1){
_7a1=Telerik.Web.UI.EditingOptions.All;
}
this._editingOptions=_7a1;
this._optionalIgnoredTools=_7a2;
if(_7a1&_7a4.ContextMenus){
if(_7a3){
_7a3.enableContextMenus(_7a0);
}
}
if(_7a1&_7a4.EditModes){
if(!_7a0){
this._originalEditModeRef=this.set_mode;
this.set_mode=_7a5;
}else{
if(this._originalEditModeRef){
this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}
}
}
if(_7a1&_7a4.Tools){
if(_7a3){
if(!_7a0){
_7a3.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Disabled);
if(_7a2){
var _7a6=[];
for(var item in _7a2){
var tool=_7a3.getToolByName(item);
if(tool){
_7a6[_7a6.length]=tool;
}
}
_7a3.setToolState(_7a6);
}
this._originalSetToolStateRef=_7a3.setToolState;
_7a3.setToolState=_7a5;
}else{
_7a3.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}
}
}
if(_7a1&_7a4.Modules){
var _7a9=this._modulesManager;
if(_7a9){
_7a9.setModulesVisible(_7a0);
}
}
if(_7a1&_7a4.Typing){
if(!_7a0){
this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{
if(this._disableTypingDelegate){
this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}
}
}
if(_7a1&_7a1.Tab){
if(!_7a0){
this.removeShortCut("InsertTab");
}else{
this.setShortCut("InsertTab","TAB");
}
}
if(_7a0){
if(_7a3){
_7a3.setToolState(null,Telerik.Web.UI.Editor.CommandStates.Off);
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
},set_editable:function(_7aa){
if($telerik.isIE||$telerik.isOpera){
var oEd=this;
window.setTimeout(function(){
try{
oEd._document.body.setAttribute("contentEditable",""+_7aa);
oEd._document.execCommand("2D-Position",false,true);
}
catch(ev){
}
},0);
}else{
var oEd=this;
window.setTimeout(function(){
try{
oEd._document["designMode"]=_7aa?"on":"off";
if(_7aa){
oEd._document.execCommand("UseCSS",false,true);
}
}
catch(e){
}
},0);
}
},get_editable:function(){
if($telerik.isIE||$telerik.isOpera){
return this._document.body.contentEditable;
}else{
return (this._document["designMode"]=="on");
}
},enableContentArea:function(_7ac){
if(this.isIE){
this.get_document().body.setAttribute("contentEditable",""+_7ac);
}
},showExternalDialog:function(url,_7ae,_7af,_7b0,_7b1,_7b2,_7b3,_7b4,_7b5,_7b6,_7b7){
var _7b8=this.getSelection().getRange();
var _7b9=this;
var _7ba=function(_7bb,args){
window.setTimeout(function(){
_7b9.getSelection().selectRange(_7b8);
if(_7b1){
var _7bd=_7b1(_7bb,args);
if(false==_7bd){
return;
}
_7b9.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_7b9.setFocus();
},50);
};
this.get_dialogOpener().openUrl(url,_7ae,_7af,_7b0,_7ba,_7b2,_7b3,_7b4,_7b5,_7b6,_7b7);
},showDialog:function(_7be,_7bf,_7c0){
this._currentRange=this.getSelection().getRange();
var _7c1=this;
var _7c2=function(_7c3,args){
window.setTimeout(function(){
_7c1.getSelection().selectRange(_7c1._currentRange);
if(_7c0){
var oRes=_7c0(_7c3,args);
if(false==oRes){
return;
}
_7c1.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
_7c1.setFocus();
},50);
};
this.get_dialogOpener().open(_7be,_7bf,_7c2);
if(this.isIE){
var wnd=this.get_dialogOpener()._getDialogContainer(_7be);
if(!wnd||wnd._DRAG_ATTACHED){
return;
}
wnd._DRAG_ATTACHED=true;
wnd.add_dragEnd(function(){
_7c1.getSelection().selectRange(_7c1._currentRange);
});
}
},_getModeButtonsWrapper:function(){
return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(_7c7){
if(_7c7){
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 _7c9=this.get_mode();
var _7ca=Telerik.Web.UI.Editor.Utils.getElementParentByTag(e.target,"LI");
if(_7ca){
var _7cb=Telerik.Web.UI.EditModes;
var _7cc=Sys.UI.DomElement;
var a=_7ca.getElementsByTagName("A")[0];
if(_7cc.containsCssClass(a,"rade_mode_html")){
_7c9=_7cb.Html;
}else{
if(_7cc.containsCssClass(a,"rade_mode_design")){
_7c9=_7cb.Design;
}else{
_7c9=_7cb.Preview;
}
}
}
if(_7c9!=this.get_mode()){
this.set_mode(_7c9);
}
return $telerik.cancelRawEvent(e);
},_changeModeUI:function(mode){
var _7cf=Sys.UI.DomElement;
var _7d0=Telerik.Web.UI.EditModes;
var _7d1="rade_mode_";
switch(mode){
case _7d0.Html:
_7d1+="html";
break;
case _7d0.Design:
_7d1+="design";
break;
case _7d0.Preview:
_7d1+="preview";
break;
}
var _7d2=this._getModeButtonsWrapper();
var as=_7d2.getElementsByTagName("A");
for(var i=0;i<as.length;i++){
var a=as[i];
_7cf.removeCssClass(a,"rade_mode_selected");
if(_7cf.containsCssClass(a,_7d1)){
_7cf.addCssClass(a,"rade_mode_selected");
}
}
},_isEditModeEnabled:function(_7d6){
return _7d6&this._editModes?true:false;
},get_mode:function(){
return this._mode;
},set_mode:function(_7d7){
this._setEditableDelegate=Function.createDelegate(this,function(){
this.remove_editReady(this._setEditableDelegate);
var _7d8=(this._mode==_7d9.Design);
this.set_editable(_7d8);
this.toggleEnhancedEdit(_7d8);
this._setEditableDelegate=null;
});
this.add_editReady(this._setEditableDelegate);
var _7da=this._mode;
var _7d9=Telerik.Web.UI.EditModes;
if(_7da==_7d9.Html||_7d7==_7d9.Html){
var html=this.get_html(true);
this._mode=_7d7;
this._showTextArea(this._mode==_7d9.Html);
this.set_html(html);
}else{
this._mode=_7d7;
this._showTextArea(this._mode==_7d9.Html);
}
this._changeModeUI(_7d7);
if(this._mode!=_7d9.Preview){
this.setFocus();
if(this.isFirefox&&(!this._document||!this._document.body)){
}else{
this.set_editable(true);
}
if(this._mode==_7d9.Design){
this.toggleEnhancedEdit(true);
}
}else{
this.set_editable(false);
this.toggleEnhancedEdit(false);
}
this.setFocus();
var _7dc=this.get_id();
var _7dd=$get(_7dc+"Wrapper");
var _7de=_7dd.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(_7de);
},_getTextIframe:function(){
if(!this._textIframe){
var _7df=this.get_contentAreaElement();
if(_7df){
this._textIframe=_7df.cloneNode(true);
this._textIframe.style.position="absolute";
var _7e0=this._textIframe.style;
_7e0.height="2px";
_7e0.width="2px";
_7df.parentNode.appendChild(this._textIframe);
var doc=this._textIframe.contentWindow.document;
doc.designMode="off";
var _7e2=doc.open("text/html","replace");
var _7e3="<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 (_7e2)=="undefined"){
_7e2=doc;
}
_7e2.write(_7e3);
_7e2.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(_7e5){
var area=this._getTextIframe();
var _7e7=this.get_contentAreaElement();
if(_7e5){
if($telerik.isSafari){
_7e7.style.width="0px";
_7e7.style.height="0px";
}else{
_7e7.style.display="none";
}
area.style.height="";
area.style.display="";
area.style.position="";
window.setTimeout(function(){
area.style.height=area.parentNode.offsetHeight+"px";
},0);
area.style.height="100%";
area.style.width="100%";
}else{
if($telerik.isSafari){
_7e7.style.width="100%";
_7e7.style.height="100%";
}else{
_7e7.style.display="";
}
area.style.display="none";
}
},_setContentAsText:function(_7e8){
var area=this._getTextArea();
if(area){
area.value=_7e8;
}
},_getContentAsText:function(){
var area=this._getTextArea();
if(area&&area.value){
var _7eb=area.value;
return _7eb;
}
return "";
},set_html:function(_7ec,_7ed,_7ee){
var _7ef=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_7ef.Html){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(_7ed?_7ed:"Set HTML",this.get_contentWindow());
this._setContentAreaHtml(_7ec);
this.executeCommand(cmd,_7ee);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}else{
this._setContentAsText(_7ec);
}
},get_html:function(_7f1){
var _7f2=null;
var _7f3="";
var mode=this.get_mode();
var _7f5=Telerik.Web.UI.EditModes;
if(mode==_7f5.Html){
return this._getContentAsText();
}else{
if(this.get_fullPage()){
if(this._document){
_7f2=this._document.getElementsByTagName("HTML")[0];
_7f2=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(_7f2);
var _7f6=this._getAllSheets(_7f2);
for(var i=0;i<_7f6.length;i++){
var _7f8=_7f6[i];
var _7f9=_7f8.getAttribute("id");
if(_7f9&&_7f9.indexOf("RADEDITORSTYLESHEET")==0){
_7f8.parentNode.removeChild(_7f8);
}
}
if($telerik.isIE||$telerik.isOpera){
_7f2.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}
}
}else{
if(this.get_contentArea()){
if(true==_7f1){
_7f2=Telerik.Web.UI.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
if($telerik.isIE||$telerik.isOpera){
_7f2.removeAttribute("contentEditable");
}
}else{
_7f2=this.get_contentArea();
}
}
}
}
if(_7f2){
if(true==_7f1){
_7f3=this.get_filtersManager().getHtmlContent(_7f2);
}else{
_7f3=_7f2.innerHTML;
}
}
if(_7f3.indexOf("<body")==0){
_7f3=_7f3.trim();
_7f3=_7f3.substring(_7f3.indexOf(">")+1,_7f3.length-7);
_7f3=_7f3.trim();
}
if(this.get_fullPage()&&this._doctypeString){
_7f3=this._doctypeString+"\n"+_7f3;
}
return _7f3;
},set_initialContent:function(){
this._initialContent=this.get_html(true);
},get_initialContent:function(){
return this._initialContent;
},get_text:function(){
var _7fa=Telerik.Web.UI.EditModes;
if(this.get_mode()!=_7fa.Html){
var _7fb="";
var _7fc=this.get_contentArea();
if(_7fc){
if(_7fc.innerText){
_7fb=_7fc.innerText;
}else{
if(_7fc.textContent!=null){
_7fb=_7fc.textContent;
}else{
_7fb=_7fc.innerHTML.replace(/<\/?[^>]*>/ig,"");
}
}
}
return _7fb;
}else{
return this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}
},_getUniqueStyleSheetId:function(i){
return "RADEDITORSTYLESHEET"+i;
},_getAllSheets:function(oDoc){
if(!oDoc){
alert("RadEditor._getAllSheets called with no document object provided");
}
var _7ff=oDoc.getElementsByTagName("link");
var _800=oDoc.getElementsByTagName("style");
var _801=[];
for(var x=0;_7ff[x];x++){
var rel=_7ff[x].rel?_7ff[x].rel:_7ff[x].getAttribute("rel");
if(typeof (rel)=="string"&&rel.toLowerCase().indexOf("style")+1){
Array.add(_801,_7ff[x]);
}
}
for(var x=0;_800[x];x++){
Array.add(_801,_800[x]);
}
return _801;
},_getClassName:function(rule){
var str=rule&&rule.selectorText?rule.selectorText:"";
var _806=str.lastIndexOf(".");
if(_806==-1){
return "";
}
var _807=str.indexOf(" ",_806);
if(-1==_807){
_807=str.indexOf(":",_806);
}
if(-1==_807){
_807=str.length;
}
return str.substring((_806+1),_807);
},_createCssFilterObject:function(){
if(this._cssClassesHash){
return;
}
var _808=this.get_cssClasses();
if(_808&&_808.length>0){
var obj={};
var _80a=_808.length;
for(var i=0;i<_80a;i++){
var oKey=_808[i][0];
var oVal=_808[i][1];
obj[oKey.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})]=oVal;
}
this._cssClassesHash=obj;
}
},_getFilteredCssClasses:function(_80f){
this._createCssFilterObject();
if(_80f&&this._cssClassesHash){
var _810=[];
var _811=_80f.length;
for(var _812=0;_812<_811;_812++){
var _813=_80f[_812];
if(outAlias=this._checkCssFilter(_813[1].selectorText)){
_813[2]=outAlias;
_810[_810.length]=_813;
}
}
return _810;
}else{
return _80f;
}
},_checkCssFilter:function(_814){
if(!_814||!this._cssClassesHash){
return null;
}
return this._cssClassesHash[_814.replace(/(.*?)\./ig,function($1){
return $1.toUpperCase();
})];
},getCssArray:function(_816){
var _817=this.get_document();
var _818=[];
for(var i=0;i<_817.styleSheets.length;i++){
var _81a=_817.styleSheets[i];
this._getStyleSheetRules(_818,_81a,_816);
}
_818=this._getFilteredCssClasses(_818);
return _818;
},_getStyleSheetRules:function(_81b,_81c,_81d){
var _81e=_81c.href;
if(_81e&&_81e.indexOf("WebResource.axd?")>-1){
return;
}
var _81f=(_81c.rules)?_81c.rules:_81c.cssRules;
if($telerik.isIE&&_81c.imports){
for(var k=0;k<_81c.imports.length;k++){
this._getStyleSheetRules(_81b,_81c.imports[k],_81d);
}
}
for(var j=0;j<_81f.length;j++){
var _822=_81f[j];
if(_822&&_822.cssText){
var text=_822.cssText.toLowerCase();
if(text.indexOf("@import")>=0&&_822.parentStyleSheet&&_822.styleSheet&&_822.parentStyleSheet!=_822.styleSheet){
this._getStyleSheetRules(_81b,_822.styleSheet,_81d);
continue;
}
}
var str=_822&&_822.selectorText?_822.selectorText:"";
var _825=str.lastIndexOf(".");
if(_825<0){
continue;
}
var _825=str.lastIndexOf(":");
if(_825>0){
continue;
}
var _826=this._getClassName(_822);
_81b[_81b.length]=[_826,_822];
}
},copyStyleSheets:function(_827,_828){
if(null==_827&&null==_828){
return;
}
var _829=0;
var _82a=null;
if(_828.styleSheets.length==0){
if(_828.createStyleSheet){
_828.createStyleSheet();
}else{
css=_828.createElement("style");
css.media="all";
css.type="text/css";
var _82b=_828.getElementsByTagName("head")[0];
_82b.appendChild(css);
_82a=css;
}
}
if(_828.styleSheets[0]){
_82a=_828.styleSheets[0];
}
for(var i=0;i<_827.styleSheets.length;i++){
try{
var _82d=_827.styleSheets[i];
var _82e=_82d.href;
var _82f=false;
if($telerik.isFirefox){
if(_82d.ownerNode&&_82d.ownerNode.tagName.toLowerCase()=="style"){
_82f=true;
}
}
if(_82e&&!_82f){
continue;
}
var _830=(_82d.rules)?_82d.rules:_82d.cssRules;
for(var j=0;j<_830.length;j++){
var _832=_830[j];
if(_82a.addRule){
var _833=_832.selectorText;
var oCss=_832.style.cssText;
if(oCss&&_833){
_82a.addRule(_833,oCss,_829);
}
}else{
if(_82a.insertRule){
_82a.insertRule(_832.cssText,_829);
}else{
var oCss=_832.selectorText+"{"+_832.style.cssText+"}";
var _835=_828.createTextNode(oCss);
_82a.appendChild(_835);
}
}
_829++;
}
}
catch(exc){
}
}
},_setContentAreaHtml:function(_836,_837){
var _838=this.get_filtersManager().getDesignContent(_836);
this.set_contentHiddenTextareaValue(_838);
var _839=null;
if(-1!=_838.toLowerCase().indexOf("<html")){
this.set_fullPage(true);
_839=_838;
var _83a=new RegExp("(<!DOCTYPE(.|\\n)*?>)(.|\\n)*?","g");
this._doctypeString=(_839.match(_83a))?_839.match(_83a)[0]:"";
}else{
this.set_fullPage(false);
}
if(null!=_839||true==_837){
var _83b=this;
var _83c=function(){
_83d=false;
try{
_83b._document=_83b._contentAreaElement.contentWindow.document;
_83b._contentWindow=_83b._contentAreaElement.contentWindow;
_83b._contentArea=_83b._document.body;
_83b.get_filtersManager().getDesignContentDom(_83b.get_contentArea());
var _83e=1;
Telerik.Web.UI.Editor.Utils.addStyleSheet(_83b.get_contentAreaCssFile(),_83b._document,_83b._getUniqueStyleSheetId(0));
var _83f=_83b.get_cssFiles();
if(_83f.length>0){
for(var i=0;i<_83f.length;i++){
var _841=_83b._getUniqueStyleSheetId(_83e++);
Telerik.Web.UI.Editor.Utils.addStyleSheet(_83f[i],_83b._document,_841);
}
}else{
if(!_83b._fullPage){
_83b.copyStyleSheets(document,_83b._document);
var _842=_83b._getAllSheets(document);
for(var i=0;i<_842.length;i++){
var _841=_83b._getUniqueStyleSheetId(_83e++);
var _843=_842[i];
if(_843.tagName=="LINK"){
var _844=_843.href;
if(_844&&_844.indexOf("WebResource.axd?")>-1){
continue;
}
if(_844){
Telerik.Web.UI.Editor.Utils.addStyleSheet(_843.getAttribute("href"),_83b._document,_841);
}
}else{
if(_843.tagName=="STYLE"){
}
}
}
}
}
var _845=Telerik.Web.UI.Editor.PopupController;
if(_845){
_845.detachFromDocument(_83b._document);
_845.attachToDocument(_83b._document);
}
_83b._initEvents();
if(_83b.get_mode()!=Telerik.Web.UI.EditModes.Preview){
_83b.set_editable(true);
}else{
_83b.set_editable(false);
}
_83b.toggleEnhancedEdit(true);
if(_83b._document&&_83b._document.body){
_83b.raiseEvent("editReady",Sys.EventArgs.Empty);
}
}
catch(e){
}
};
if($telerik.isFirefox){
$addHandler(this._contentAreaElement,"load",function(){
if(_83d){
_83c();
}
});
}
if(!_839){
_839="<head><style></style></head><body>"+_838+"</body>";
}
try{
var _846=this._contentAreaElement.contentWindow.document;
if(_846&&_846.body){
var _847=Telerik.Web.UI.Editor.PopupController;
if(_847){
_847.detachFromDocument(_846);
}
}
_846.open();
_846.write(_839);
_846.close();
var _83d=false;
if(_846.body){
_83c();
}else{
_83d=true;
}
}
catch(e){
}
}else{
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this._contentArea,_838);
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=$get(id+"Wrapper");
var _849=$get(id+"Center");
var _84a=this.get_contentAreaElement();
_84a.style.display="none";
_849.appendChild(_84a);
_84a.style.height="100%";
_84a.style.display="";
this._created=true;
},_updateEditorSize:function(_84b,_84c){
var _84d=this._tableElement;
var _84e=_84b?_84b:_84d.style.height;
if(true==_84c){
_84e=_84d.offsetHeight+"px";
}
if(parseInt(_84e)==0){
return;
}
_84d.style.height=_84e;
if(this.isIE){
this._fixIeHeight(_84d,_84e);
}else{
var _84f=this;
window.setTimeout(function(){
_84f._fixIeHeight(_84d,_84e);
},0);
}
_84d.parentNode.style.height=_84e;
},_fixIeHeight:function(_850,_851){
if("CSS1Compat"==document.compatMode){
var _852=(_850.offsetHeight-parseInt(_851));
if(_852>0){
var _853=(parseInt(_850.style.height)-_852);
if(_853>0){
_850.style.height=_853+"px";
}
}
}
},setSize:function(_854,_855){
var _854=parseInt(_854);
var _855=parseInt(_855);
var _856=this;
var _857=$get(_856.get_id()+"Wrapper");
_857.style.height="";
var _858=_857.parentNode;
_858.style.width=_854+"px";
_858.style.height=_855+"px";
_856._fixIeHeight(_858,_855);
if(_856.isIE){
_857.style.height=_855+"px";
_856._fixIeHeight(_857,_855);
}else{
_857.style.height="100%";
}
},pasteHtml:function(_859,_85a,_85b,_85c,_85d){
if(!this.get_editable()){
return;
}
var args=new Telerik.Web.UI.EditorCommandEventArgs(_85a,null,_859);
if(false==this._executeCommandEvent("pasteHtml",_85a,args)){
return;
}
if(_859!=args.get_value()){
_859=args.get_value();
}
var _85f=this.get_localization()[_85a];
if(_85f){
_85a=_85f;
}
var mode=this.get_mode();
if(Telerik.Web.UI.EditModes.Design==mode){
this.setFocus();
this.executeCommand(new Telerik.Web.UI.Editor.PasteHtmlCommand(_85a,this._contentWindow,_859,_85b),null,_85d);
if(_85c!=false){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
}else{
if(Telerik.Web.UI.EditModes.Html==mode){
var _861=this._getTextArea();
if(this.isIE){
_861.setActive();
var _862=document.selection.createRange();
_862.text=_859;
}else{
if(_861.setSelectionRange){
var _863=_861.selectionStart;
var _864=_861.selectionEnd;
var _865=_861.value.substring(_863,_864);
var _866=_859;
_861.value=_861.value.substring(0,_863)+_866+_861.value.substring(_864);
_861.setSelectionRange(_863+_866.length,_863+_866.length);
this.setFocus();
}
}
}
}
},fire:function(_867,args){
if(false==this._executeCommandEvent("commandExecuting",_867,args)){
return;
}
if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[_867]){
return;
}
this.setActive();
this._pendingTextTypeCmd=null;
var _869=Telerik.Web.UI.Editor.CommandList[_867];
var _86a=false;
if(_869){
_86a=(false!=_869(_867,this,args));
}else{
alert("The command "+_867+" is not implemented yet.");
}
if(_86a){
if(!$telerik.isOpera){
this.setFocus();
}
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}
this._executeCommandEvent("commandExecuted",_867,args);
},_executeCommandEvent:function(_86b,_86c,args){
if(!args){
args=new Telerik.Web.UI.EditorCommandEventArgs(_86c);
}
this.raiseEvent(_86b,args);
if(args.get_cancel&&args.get_cancel()){
return false;
}
return true;
},_onWindowResize:function(){
var _86e=this._getViewportBounds();
this.setSize(_86e.width,_86e.height,false);
},_registerWindowResizeHandler:function(_86f){
if(_86f){
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 _870=$telerik.getClientBounds();
var _871=document.documentElement.scrollLeft||document.body.scrollLeft;
var _872=document.documentElement.scrollTop||document.body.scrollTop;
_870.scrollLeft=_871;
_870.scrollTop=_872;
return _870;
},_handleParentsWithOverflow:function(_873){
if(false==_873){
if(!this._parentsWithOverflow){
return;
}
var _874=this._parentsWithOverflow;
var _875=_874.length;
for(var i=0;i<_875;i++){
var _877=_874[i];
if(_877[0]){
var node=_877[0];
node.style.overflow=_877[1];
node.style.height=_877[2];
if(_877[3]){
node.style.tableLayout=_877[3];
}
}
}
this._parentsWithOverflow=null;
}else{
this._parentsWithOverflow=[];
var _874=this._parentsWithOverflow;
var _879=this._getRootNode().parentNode;
while(_879&&_879.tagName!="BODY"){
var _87a=$telerik.getCurrentStyle(_879,"overflow");
var _87b=($telerik.isIE&&_879.tagName=="TABLE"?$telerik.getCurrentStyle(_879,"tableLayout"):"");
if(_87b){
_879.style.tableLayout="auto";
}
if(_87a){
var _87c=_879.style;
_874[_874.length]=[_879,_87c.overflow,_87c.height,_87c.tableLayout];
_879.style.overflow="visible";
_879.style.height="auto";
}
_879=_879.parentNode;
}
}
},_getRootNode:function(){
return $get(this.get_id()+"Wrapper").parentNode;
},isFullScreen:function(){
return this._isFullScreen;
},toggleScreenMode:function(){
var _87d=this;
if(!_87d._isFullScreen){
_87d._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){
_87d._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}
var _87e=_87d._getRootNode();
_87d._preFullScreenBounds=$telerik.getBounds(_87e);
_87d._handleParentsWithOverflow(true);
_87d._onWindowResize();
_87d._preFullScreenBrowserRect=_87d._getViewportBounds();
var _87f=$telerik.getLocation(_87e);
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_87f.x,_87f.y);
_87d._isFullScreen=true;
_87d._registerWindowResizeHandler(true);
}else{
_87d._registerWindowResizeHandler(false);
document.body.scroll=_87d._preFullScreenBodyStyle[0];
try{
document.body.style.margin=_87d._preFullScreenBodyStyle[1];
}
catch(e){
}
document.documentElement.style.overflow=_87d._preFullScreenBodyStyle[2];
_87d._isFullScreen=false;
_87d._handleParentsWithOverflow(false);
var _880=_87d._preFullScreenBounds;
_87d.setSize(_880.width,_880.height,false);
var _87f=_87d._preFullScreenBrowserRect;
Telerik.Web.UI.Editor.Utils.restoreBrowserPosition(_87f.scrollLeft,_87f.scrollTop);
}
_87d.set_editable(true);
_87d.setFocus();
var _881=_87d.getToolByName("ToggleScreenMode");
if(_881){
_881.setOn(_87d._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(_882){
if($telerik.isSafari&&this._contentHiddenTextarea.innerText!=null){
this._contentHiddenTextarea.innerText=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_882);
}else{
this._contentHiddenTextarea.value=Telerik.Web.UI.Editor.Utils.encodePostbackContent(_882);
}
},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";
this._contentAreaElement=elem;
}
return this._contentAreaElement;
},get_contentArea:function(){
return this._contentArea;
},get_contentTextArea:function(){
return this._contentTextArea;
},get_document:function(){
return this._document;
},get_contentWindow:function(){
return this._contentWindow;
},get_toolAdapter:function(){
return this._toolAdapter;
},set_toolAdapter:function(_884){
this._toolAdapter=_884;
},get_fullPage:function(){
return this._fullPage;
},set_fullPage:function(_885){
this._fullPage=_885;
},get_dialogOpener:function(){
return this._dialogOpener;
},set_dialogOpener:function(_886){
this._dialogOpener=_886;
},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(_887){
this._links=_887;
},get_language:function(){
if(null==this._language){
return "en-us";
}
return this._language.toLowerCase();
},set_language:function(_888){
this._language=_888;
},get_colors:function(){
if(null==this._colors){
return ["","#ffcccc","#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","#3366FF","#00CCCC","#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(_889){
this._colors=_889;
},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(_88a){
this._fontNames=_88a;
},get_fontSizes:function(){
if(null==this._fontSizes){
return [1,2,3,4,5,6,7];
}
return this._fontSizes;
},set_fontSizes:function(_88b){
this._fontSizes=_88b;
},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(_88c){
this._symbols=_88c;
},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(_88d){
this._realFontSizes=_88d;
},get_contextMenus:function(){
if(null==this._contextMenus){
return [];
}
return this._contextMenus;
},set_contextMenus:function(_88e){
this._contextMenus=_88e;
},get_snippets:function(){
if(null==this._snippets){
return [];
}
return this._snippets;
},set_snippets:function(_88f){
this._snippets=_88f;
},get_cssClasses:function(){
if(null==this._cssClasses){
return [];
}
return this._cssClasses;
},set_cssClasses:function(_890){
this._cssClasses=_890;
},get_cssFiles:function(){
if(null==this._cssFiles){
return [];
}
return this._cssFiles;
},set_cssFiles:function(_891){
this._cssFiles=_891;
},get_languages:function(){
if(null==this._languages){
return [];
}
return this._languages;
},set_languages:function(_892){
this._languages=_892;
},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(_893){
this._paragraphs=_893;
},get_autoResizeHeight:function(){
return this._autoResizeHeight;
},set_autoResizeHeight:function(_894){
this._autoResizeHeight=_894;
},get_toolbarMode:function(){
return this._toolbarMode;
},set_toolbarMode:function(_895){
this._toolbarMode=_895;
},get_editModes:function(){
return this._editModes;
},set_editModes:function(_896){
this._editModes=_896;
},get_stripFormattingOptions:function(){
return this._stripFormattingOptions;
},set_stripFormattingOptions:function(_897){
this._stripFormattingOptions=_897;
},get_contentFilters:function(){
return this._contentFilters;
},set_contentFilters:function(_898){
this._contentFilters=_898;
},get_newLineBr:function(){
return this._newLineBr;
},set_newLineBr:function(_899){
this._newLineBr=_899;
},get_contentAreaCssFile:function(){
return this._contentAreaCssFile;
},set_contentAreaCssFile:function(_89a){
this._contentAreaCssFile=_89a;
},get_mozillaFlashOverlayImage:function(){
return this._mozillaFlashOverlayImage;
},set_mozillaFlashOverlayImage:function(_89b){
this._mozillaFlashOverlayImage=_89b;
},get_toolAdapterType:function(){
return this._toolAdapterType;
},set_toolAdapterType:function(_89c){
this._toolAdapterType=_89c;
},get_toolJSON:function(){
return this._toolJSON;
},set_toolJSON:function(_89d){
this._toolJSON=_89d;
},get_modulesJSON:function(){
return this._modulesJSON;
},set_modulesJSON:function(_89e){
this._modulesJSON=_89e;
},get_contextMenusJSON:function(){
return this._contextMenusJSON;
},set_contextMenusJSON:function(_89f){
this._contextMenusJSON=_89f;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_8a0){
this._uniqueID=_8a0;
},get_skin:function(){
if(!this._skin){
return "Default";
}
return this._skin;
},get_qualifiedSkin:function(){
var skin=this.get_skin();
return "radeditor."+skin;
},set_skin:function(_8a2){
this._skin=_8a2;
},_registerClientValidation:function(){
if(typeof (Page_ClientValidate)=="function"){
var _8a3=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(_8a4){
var _8a5=this.get_element();
if(_8a5){
var _8a6=this.get_html(true);
this.set_contentHiddenTextareaValue(_8a6);
_8a5.value=_8a6;
_8a5.setAttribute("value",_8a6);
}
_8a5=null;
return _8a3(_8a4);
});
}
},_registerPostBackHandlers:function(){
this._saveContentDelegate=Function.createDelegate(this,function(e){
this.raiseEvent("submit",Sys.EventArgs.Empty);
var _8a8=this.get_html(true);
this.set_contentHiddenTextareaValue(_8a8);
});
var _8a9=this._contentHiddenTextarea.form;
$telerik.addExternalHandler(_8a9,"submit",this._saveContentDelegate);
if(typeof (__doPostBack)!="undefined"){
var _8aa=this._saveContentDelegate;
var _8ab=__doPostBack;
__doPostBack=function(_8ac,_8ad){
_8aa();
_8ab(_8ac,_8ad);
};
}
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;
}
_8a9=null;
},toggleEnhancedEdit:function(_8af){
if(!this.get_document()){
return false;
}
var _8b0=this.get_document().getElementById(this._getUniqueStyleSheetId(0));
if(_8b0){
if(_8af==null){
_8af=_8b0.disabled;
}
_8b0.disabled=!_8af;
var tool=this.getToolByName("ToggleTableBorder");
if(tool){
tool.setOn(_8af);
}
return _8af;
}else{
return false;
}
},pasteHyperLink:function(_8b2,_8b3){
if($telerik.isIE){
var sel=this.getSelectedElement();
if(sel.tagName=="IMG"&&sel.parentNode&&sel.parentNode.tagName=="A"){
var _8b5=sel.parentNode;
_8b5.parentNode.removeChild(_8b5);
}
if(sel.tagName=="IMG"){
_8b2.innerHTML=Telerik.Web.UI.Editor.Utils.getOuterHtml(sel);
}
}
if($telerik.isOpera){
var sel=this.getSelectedElement();
if(sel.tagName=="A"){
this.fire("Unlink");
}
}
if("DocumentManager"==_8b3){
var _8b6=this.getSelection().getText();
if(""!=_8b6.trim()){
_8b2.innerHTML=_8b6;
}
}
var _8b7=Telerik.Web.UI.Editor.Utils.getOuterHtml(_8b2);
this.pasteHtml(_8b7,_8b3);
},_saveTypedContent:function(_8b8,_8b9){
if(this._pendingTextTypeCmd){
this._pendingTextTypeCmd.update();
}
if(true!=_8b8){
this._pendingTextTypeCmd=null;
}
},_attachIEBodyHandlers:function(_8ba){
var body=null;
if(this._document&&this._document.body){
body=this._document.body;
}
if(!body){
return;
}
if(_8ba){
this._onResizeStartDelegate=Function.createDelegate(this,this._onResizeStart);
this._onResizeEndDelegate=Function.createDelegate(this,this._onResizeEnd);
this._onDropDelegate=Function.createDelegate(this,this._onDrop);
this._onDragEndDelegate=Function.createDelegate(this,this._onDragEnd);
this._onDragStartDelegate=Function.createDelegate(this,this._onDragStart);
this._onPasteDelegate=Function.createDelegate(this,this._onPaste);
this._onBeforePasteDelegate=Function.createDelegate(this,this._onBeforePaste);
$telerik.addExternalHandler(body,"resizestart",this._onResizeStartDelegate);
$telerik.addExternalHandler(body,"resizeend",this._onResizeEndDelegate);
$telerik.addExternalHandler(body,"drop",this._onDropDelegate);
$telerik.addExternalHandler(body,"dragend",this._onDragEndDelegate);
$telerik.addExternalHandler(body,"dragstart",this._onDragStartDelegate);
if(!this.isIE7){
$telerik.addExternalHandler(body,"paste",this._onPasteDelegate);
}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(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 _8bc=this;
var _8bd=_8bc.fire;
_8bc.fire=function(_8be,_8bf){
if(_8be!="Copy"){
_8bc._saveTypedContent(true,"editor.fire "+_8be+" executing");
}
_8bd.call(_8bc,_8be,_8bf);
try{
if(_8be=="Undo"&&!_8bc.isIE&&_8bc._document.body.toLowerCase().trim()=="<br>"){
_8bc._document.body.innerHTML="<br>";
}
}
catch(e){
}
};
this.attachEventHandler("onclick",function(e){
_8bc._saveTypedContent(false,"Saving typed content because of oclick (somewhere else)");
if(_8bc.getSelectionHtml()){
_8bc._pendingTextTypeCmd=new Telerik.Web.UI.Editor.TextTypeCommand(_8bc.get_localization()["Typing"],_8bc.get_contentWindow());
_8bc.executeCommand(_8bc._pendingTextTypeCmd,false);
}
});
if(!this.isIE){
this.attachEventHandler("keypress",function(e){
if(_8bc._onKeyPressed(e)){
e.preventDefault();
return false;
}
});
this.attachEventHandler("click",function(e){
if(!_8bc.isFirefox){
return;
}
if(!_8bc.get_editable()){
return;
}
if("on"==_8bc._document["designMode"]){
window.setTimeout(function(){
_8bc.set_editable(true);
_8bc.setFocus();
},100);
}
});
}
this.attachEventHandler("keydown",function(e){
if(_8bc.isOpera){
return _8bc._onKeyDown(e);
}else{
_8bc._onKeyDown(e);
}
});
this.attachEventHandler("onmousedown",function(){
_8bc._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var _8c4=Function.createDelegate(this,function(e){
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",_8c4);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachIEBodyHandlers(true);
},_onKeyDown:function(e){
var _8c7=e.keyCode;
switch(_8c7){
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 _8c8=this;
var _8c9=function(){
var _8ca=_8c8.getSelectedElement();
if(_8ca&&_8ca.tagName=="EMBED"){
_8ca.setAttribute("hidden","true");
_8ca.setAttribute("id","FileToDelete");
window.setTimeout(function(){
var _8cb=_8c8._document.getElementById("FileToDelete");
if(_8cb.parentNode&&_8cb.parentNode.removeChild){
_8cb.parentNode.removeChild(_8cb);
}
},100);
$telerik.cancelRawEvent(e);
return true;
}
};
var _8cc=_8c9();
if(_8cc){
return false;
}
try{
var _8cd=_8c8._document.selection.createRange();
var _8ce=null;
if(_8cd&&_8cd.duplicate){
_8ce=_8cd.duplicate();
}
if(8==e.keyCode){
_8cd.moveStart("character",-1);
}else{
_8cd.moveEnd("character",1);
}
if(_8cd.parentElement().tagName=="EMBED"){
_8cd.select();
_8c9();
if(_8ce&&_8ce.select){
_8ce.select();
}
}
}
catch(ex){
}
var _8cf=new Telerik.Web.UI.Editor.Selection(this._contentWindow);
if(_8cf&&_8cf.isControl()){
var _8d0=_8cf.getRange();
_8d0.execCommand("Delete");
$telerik.cancelRawEvent(e);
}
}
return;
}
var _8d1=e.target?e.target:e.srcElement;
if(_8d1&&"INPUT"!=_8d1.tagName){
var _8d2=this._shortCutManager.isShortCutHit(e);
if(null!=_8d2&&_8d2.get_name()=="Copy"){
this._shortcutHit=false;
return;
}
this._shortcutHit=(null!=_8d2);
if(this._shortcutHit){
this.fire(_8d2.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=_8d2.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(_8d6,_8d7,_8d8,_8d9){
var _8da=this;
var _8db=(this.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _8dc=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_8d7,_8da.get_stripFormattingOptions(),_8da.get_localization()["askwordcleaning"],_8db);
if(_8d6){
_8d6.select();
}
if(_8dc){
window.setTimeout(function(){
if(_8d9&&_8d6){
_8d6.select();
}
_8da.pasteHtml(_8dc);
},5);
return $telerik.cancelRawEvent(_8d8);
}
return true;
},_onPaste:function(_8dd){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _8de=this.createRestorePoint();
var _8df=this.getSelectionHtml()?true:false;
var _8e0=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
return this._insertPastedContent(_8de,_8e0,_8dd,_8df);
},_onBeforePaste:function(_8e1){
if(_8e1){
if(this.get_stripFormattingOptions()==Telerik.Web.UI.StripFormattingOptions.NoneSupressCleanMessage){
return;
}
var _8e2=new Telerik.Web.UI.Editor.GenericCommand("Paste",this._contentWindow);
var _8e3=this._document.getElementById("tmpPasteIE");
if(_8e3){
_8e3.removeAttribute("id");
return false;
}
var _8e4=this._document.selection.createRange();
var _8e5=Telerik.Web.UI.Editor.Utils.getUniqueID();
if(_8e4.pasteHTML){
_8e4.pasteHTML("&nbsp;<font id='"+_8e5+"'>&nbsp;</font>");
}
var _8e6=Telerik.Web.UI.Editor.Utils.getPasteContainer();
_8e6.innerHTML="";
_8e6.setActive();
var _8e7=this;
window.setTimeout(function(){
var _8e8=_8e6.innerHTML;
var _8e9=(_8e7.get_contentFilters()&Telerik.Web.UI.EditorFilters.RemoveScripts)>0;
var _8ea=Telerik.Web.UI.Editor.Utils.cleanPastedContent(_8e8,_8e7.get_stripFormattingOptions(),_8e7.get_localization()["askwordcleaning"],_8e9);
var _8eb=_8e7._document.getElementById(_8e5);
_8e7.setActive(true);
_8e7._pendingCutPasteCommand=null;
var _8ec=_8e7._document.body.createTextRange();
_8ec.moveToElementText(_8eb);
_8ec.moveStart("character",-1);
_8ec.select();
_8ec.pasteHTML(_8ea);
_8e7.executeCommand(_8e2);
_8e7.setActive(true);
_8e7.setFocus(true);
},0);
}else{
}
},_onResizeStart:function(e){
var _8ee=this.getSelectedElement();
if(_8ee==e.srcElement){
var _8ef=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new Telerik.Web.UI.Editor.GenericCommand(_8ef,this._contentWindow);
}
},_onResizeEnd:function(e){
if(this._pendingResizeCmd){
this.executeCommand(this._pendingResizeCmd);
}
},_onDragStart:function(e){
var _8f2=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new Telerik.Web.UI.Editor.GenericCommand(_8f2,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 _8f4=this._startRange.item(0);
if("IMG"==_8f4.tagName&&"A"==_8f4.parentNode.tagName&&_8f4.parentNode.childNodes.length==1){
_8f4=_8f4.parentNode;
}
rng.moveToElementText(_8f4);
this._startRange=rng;
}
}
},_onDragEnd:function(e){
if(this._pendingMoveCommand){
if(this._startRange){
var _8f6=this._contentWindow.document.selection.createRange();
if(_8f6.length){
var rng=this._contentWindow.document.body.createTextRange();
rng.moveToElementText(_8f6.item(0));
_8f6=rng;
}
try{
if(_8f6.compareEndPoints&&0!=_8f6.compareEndPoints("StartToStart",this._startRange)&&0!=_8f6.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 _8f9=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new Telerik.Web.UI.Editor.GenericCommand(_8f9,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(_8fb){
this.get_events().addHandler("toggleScreenMode",_8fb);
},remove_toggleScreenMode:function(_8fc){
this.get_events().removeHandler("toggleScreenMode",_8fc);
},add_modeChange:function(_8fd){
this.get_events().addHandler("modeChange",_8fd);
},remove_modeChange:function(_8fe){
this.get_events().removeHandler("modeChange",_8fe);
},add_load:function(_8ff){
this.get_events().addHandler("load",_8ff);
},remove_load:function(_900){
this.get_events().removeHandler("load",_900);
},add_init:function(_901){
this.get_events().addHandler("init",_901);
},remove_init:function(_902){
this.get_events().removeHandler("init",_902);
},add_selectionChange:function(_903){
this.get_events().addHandler("selectionChange",_903);
},remove_selectionChange:function(_904){
this.get_events().removeHandler("selectionChange",_904);
},add_commandExecuting:function(_905){
this.get_events().addHandler("commandExecuting",_905);
},remove_commandExecuting:function(_906){
this.get_events().removeHandler("commandExecuting",_906);
},add_commandExecuted:function(_907){
this.get_events().addHandler("commandExecuted",_907);
},remove_commandExecuted:function(_908){
this.get_events().removeHandler("commandExecuted",_908);
},add_submit:function(_909){
this.get_events().addHandler("submit",_909);
},remove_submit:function(_90a){
this.get_events().removeHandler("submit",_90a);
},add_editReady:function(_90b){
this.get_events().addHandler("editReady",_90b);
},remove_editReady:function(_90c){
this.get_events().removeHandler("editReady",_90c);
},add_pasteHtml:function(_90d){
this.get_events().addHandler("pasteHtml",_90d);
},remove_pasteHtml:function(_90e){
this.get_events().removeHandler("pasteHtml",_90e);
}};
Telerik.Web.UI.RadEditor.registerClass("Telerik.Web.UI.RadEditor",Telerik.Web.UI.RadWebControl);
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);

