Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.Editor"); Telerik.Web.UI.Editor.Utils={setElementClassName:function(c,b){if(!c){return""; }if(!b){c.className=""; c.removeAttribute("class",0); c.removeAttribute("classname",0); }else{var a=c.className; c.className=b; return a; }},addElementsToSelection:function(c,f){if($telerik.isIE){Telerik.Web.UI.Editor.Utils.selectElement(c,f[0]); return 1; }var e=c.getSelection(); var d=new Telerik.Web.UI.Editor.Selection(c); var b=d.getRange(); if(!b||!b.selectNodeContents){return -1; }if(e.removeAllRanges){e.removeAllRanges(); }for(var a=0; a/gi); if(a.length==b.getElementsByTagName("LI").length){return true; }}return false; },_getFullySelectedElementIE:function(p){var k=new Telerik.Web.UI.Editor.Selection(p); var h=k.getRange(); var m=(h.length>0?h(0):h.parentElement()); if(h.length>0){return m; }else{if(m.tagName=="A"){var f=h.duplicate(); f.moveToElementText(m); if(h.inRange(f)){return m; }}else{if(Telerik.Web.UI.Editor.Utils._isListFullySelected(m,k.getHtml())){return m; }else{if(!h.htmlText){return null; }}}}var n=h.duplicate(); var e=h.duplicate(); n.collapse(true); e.collapse(false); var o=n.parentElement(); if(o.parentNode==m){o=m; }var c=e.parentElement(); if(o==c){var b=p.document; var g=b.body.createTextRange(); g.moveToElementText(o); var d=h.htmlText; var a=false; var l=o.outerHTML.replace(/[\r\n\t]/ig,""); var i=o.innerHTML.replace(/[\r\n\t]/ig,""); d=d.replace(/[\r\n\t]/ig,""); if(l==d||i==d){a=true; }if(a||(0==g.compareEndPoints("StartToStart",h)&&0==g.compareEndPoints("EndToEnd",h))){if("BODY"!=m.tagName){return m; }}}},_getFullySelectedElementMoz:function(n){var c=n.document; var l=n.getSelection(); if(l.rangeCount<1){return null; }var h=l.getRangeAt(0); var g=h.commonAncestorContainer; var k=g.parentNode; var i=new Telerik.Web.UI.Editor.Selection(n); if($telerik.isFirefox){var m=i.getHtml(); var b=document.createElement("div"); b.innerHTML=m; if(b.childNodes.length==1&&b.firstChild.nodeType==1){var e=b.firstChild.tagName; var a=h.startContainer; if(a.nodeType==1){if(a.tagName==e){return a; }else{if(a.getElementsByTagName){a=a.getElementsByTagName(e)[0]; if(a){return a; }}}}else{while(a){if(e==a.tagName){return a; }a=a.nextSibling; }}}}if(g.tagName=="BODY"){var f=i.getParentElement(); if(f&&f.tagName!="BODY"){return f; }}else{var d=c.createElement("span"); d.appendChild(h.cloneContents()); if(d.innerHTML==k.innerHTML&&k.tagName!="BODY"){return k; }}if(Telerik.Web.UI.Editor.Utils._isListFullySelected(g,i.getHtml())){return g; }},getInvisibleParent:function(a){while(a!=document){if("none"==$telerik.getCurrentStyle(a,"display","")){return a; }a=a.parentNode; }return null; },cleanPastedContent:function(e,a,b,c){var d=e; if(a==Telerik.Web.UI.StripFormattingOptions.None){if((e.match(/style="[^"]*?mso[^"]*?"/ig)||e.match(/class="?[^"]*?mso[^"]*?"?/ig))&&confirm(b)){e=Telerik.Web.UI.Editor.Utils.convertWordLists(e); d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD"); }}else{if(a&Telerik.Web.UI.StripFormattingOptions.All){d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"ALL"); }else{if(a&Telerik.Web.UI.StripFormattingOptions.AllExceptNewLines){d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"ALL_NO_BRAKES"); }else{if(a&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists){e=Telerik.Web.UI.Editor.Utils.convertWordLists(e); }if(a&Telerik.Web.UI.StripFormattingOptions.MSWordRemoveAll){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD_ALL"); }if(a&Telerik.Web.UI.StripFormattingOptions.MSWordNoFonts){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD_NO_FONTS"); }if(a&Telerik.Web.UI.StripFormattingOptions.MSWord){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD"); }if(a&Telerik.Web.UI.StripFormattingOptions.Css){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"CSS"); }if(a&Telerik.Web.UI.StripFormattingOptions.Font){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"FONT"); }if(a&Telerik.Web.UI.StripFormattingOptions.Span){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"SPAN"); }d=e; }}}if(null!=c&&false==c){d=Telerik.Web.UI.Editor.Utils.stripFormatting(d,"SCRIPT"); }return d; },isCursorMovingKey:function(a){if(a>=33&&a<=40){return true; }return false; },isSystemKey:function(a){if(a>=112&&a<=123){return true; }if(a>=8&&a<=27){return true; }if(a>=32&&a<=46){return true; }if(a==93){return true; }return false; },storeBrowserPosition:function(){var a=document.body; var b=document.documentElement; this._browserTop=a.scrollTop>b.scrollTop?a.scrollTop:b.scrollTop; this._browserLeft=a.scrollLeft>b.scrollLeft?a.scrollTop:b.scrollLeft; return{x:this._browserLeft,y:this._browserTop}; },restoreBrowserPosition:function(b,d){try{if(null==b){b=this._browserLeft; }if(null==d){d=this._browserTop; }var e=document.body; var c=document.documentElement; e.scrollTop=d; e.scrollLeft=b; c.scrollTop=d; c.scrollLeft=b; }catch(a){}},_getPasteIframe:function(a){a=a||document; if(!this._pasteIframe){if($telerik.isSafari){this._pasteIframe=a.createElement("div"); this._pasteIframe.id="radePasteHelper"; var c=this._pasteIframe.style; c.position="absolute"; c.left=-10000; c.border="0px solid red"; c.top=a.body.scrollTop; c.width=1; c.height=1; c.overflow="hidden"; a.body.appendChild(this._pasteIframe); }else{this._pasteIframe=document.createElement("iframe"); var b=this._pasteIframe.style; b.width="1px"; b.height="1px"; b.border="0px solid red"; b.overflow="hidden"; b.position="absolute"; a.body.appendChild(this._pasteIframe); try{var g=this._pasteIframe.contentWindow.document; var f=g.open("text/html","replace"); var d="New Document"; f.write(d); f.close(); }catch(h){}}}return this._pasteIframe; },getPasteContainer:function(a){var b=this._getPasteIframe(a); return $telerik.isSafari?b:b.contentWindow.document.body; },clearPasteContainer:function(){this._pasteIframe.parentNode.removeChild(this._pasteIframe); this._pasteIframe=null; },getClipboardAsHtml:function(){var b=this.getPasteContainer(); b.innerHTML=""; if(b.setActive){b.setActive(); }document.execCommand("Paste",null); var a=b.innerHTML; b.innerHTML=""; return a; },convertWordLists:function(h){var s=function(p,u){if(!p){return 0; }if(typeof(p.length)!="undefined"){for(var w=0,v=p.length; w/gi,"_TELERIK_I_"); h=h.replace(/(]+:\s*symbol[^>]+>)/gi,"$1_TELERIK_I_"); h=h.replace(/(]+mso-list:[^>]+>)/gi,"$1_TELERIK_I_"); var c=document.createElement("div"); c.innerHTML=h; var e=c.getElementsByTagName("P"); for(var m=e.length-1; m>=0; m--){var k=e[m]; if(!k.innerHTML){k.parentNode.removeChild(k); }}var d,a,l=-1,n,q=[],g,t="",b=[]; s(e,function(y){if(!y){return; }var z="",B,L="",I="",x; for(var H=y.firstChild; H&&H.nodeType==3; H=H.nextSibling){z+=H.nodeValue; }z=y.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0"); if(/^(_TELERIK_I_)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(z)){B="ul"; y.innerHTML=y.innerHTML.replace(/(]+style="font[^>]+>)/gi,"$1_TELERIK_I_"); }if(/^_TELERIK_I_\s*\w+\.\s*\u00a0{2,}/.test(z)){B="ol"; }if(B){n=parseFloat(y.style.marginLeft||0); if(n>l){q.push(n); }if(!d||B!=g){d=document.createElement(B); var C=y.parentNode; var u=y.nextSibling; if(u){C.insertBefore(d,u); }else{C.appendChild(d); }}else{if(n>l){d=a.appendChild(document.createElement(B)); }else{if(n0){if(!$telerik.isFirefox){firstChild=y.childNodes[0]; if(firstChild.tagName=="SPAN"){if(firstChild.style.color){I=firstChild.style.color; }for(var D=1; D0){var A=M[0]; if(A.style.color){I=A.style.color; }}var E=y.innerHTML; var K=E.split(""); if(K.length==2){L=K[1].replace("",""); }}}if(!L){if(B=="ul"){L=z.replace(/_TELERIK_I_/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,""); }else{L=z.replace(/_TELERIK_I_/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,""); }}sElements=y.getElementsByTagName("SPAN"); if(sElements.length>0){var J=[]; s(sElements,function(i){if(!i){return; }var p=i.innerHTML; if(/^_TELERIK_I_[\s\S]*[?o]/.test(p)){J.push(i); }if(B!="ul"&&/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){J.push(i); }}); for(var D=0,v=J.length; D]*)>[\\s\\S]*?]*)>","ig"),""); b=b.replace(new RegExp("","ig"),""); b=b.replace(/<\/?[^>]*>/ig,""); break; case"ALL_NO_BRAKES":b=b.replace(/]*)?\/?>/ig,"~RADEDITORBRAKE~"); b=b.replace(new RegExp("<(SCRIPT|STYLE)([^>]*)>[\\s\\S]*?]*)>","ig"),""); b=b.replace(new RegExp("","ig"),""); b=b.replace(/<\/?[^>]*>/ig,""); b=b.replace(/~RADEDITORBRAKE~/ig,"
"); b=b.replace(/\n/ig,"
"); b=b.replace(/\r/ig,""); break; case"WORD":case"WORD_ALL":case"WORD_NO_FONTS":b=this.stripWordFormatting(b,a); break; case"CSS":b=b.replace(new RegExp("(<[^>]+) class=[^ |^>]*([^>]*>)","ig"),"$1 $2"); b=b.replace(/(<[^>]+) style="[^"]*"([^>]*>)/ig,"$1 $2"); break; case"FONT":b=b.replace(/<\/?font[^>]*>/ig,""); break; case"SPAN":b=b.replace(/<\/?span[^>]*>/ig,""); break; case"SCRIPT":b=b.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),""); b=b.replace(new RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?]*)>","ig"),""); break; default:break; }return b; },replaceNewLineWithBr:function(b){try{b=b.replace(/\n/g,"
"); return b; }catch(a){}},convertText2Html:function(a){try{a=a.replace(//g,">"); a=a.replace(/\n/g,"
"); return a; }catch(b){}},clearWordAttributesInElement:function(g,b){var e=$telerik.isIE?g.all:g.getElementsByTagName("*"); for(var a=0; a=0; j--){var d=c.attributes[j]; if("null"!=d.value&&""!=d.value){if(f.exec(d.name)||f.exec(d.value)){c.removeAttribute(d.name); }}}}}},stripWordFormatting:function(d,b){var c=d; if(b=="WORD_ALL"){var e=/]*?>([\s\S]*?)<\/SPAN[^>]*?>/ig; while(c.match(e)){c=c.replace(e,"$1"); }var a=/]*?>([\s\S]*?)<\/FONT[^>]*?>/ig; while(c.match(a)){c=c.replace(a,"$1"); }}c=c.replace(/([^<>]+)<\/span>/gi,"$1"); c=c.replace(/([^<>]+)<\/font>/gi,"$1"); if($telerik.isFirefox){c=c.replace(/<(?:link|meta) [^>]+>/ig,""); c=c.replace(//ig,""); c=c.replace(/]*?>[\s\S]*?<\/style>/ig,""); }c=c.replace(/ <\/o:p>/gi,""); c=c.replace(/<\/?o:[^>]*>/gi,""); c=c.replace(/ class=\"(mso[^\"]*)\"/gi,""); c=c.replace(/ class=(mso\w+)/gi,""); c=c.replace(//gi,""); c=c.replace(/<\\?\?xml[^>]*>/gi,""); c=c.replace(/^(?:\s| )+/i,""); c=c.replace(/(?:\s| )+$/i,""); var f=document.createElement("div"); Telerik.Web.UI.Editor.Utils.setElementInnerHtml(f,c); this.clearWordAttributesInElement(f,b); c=f.innerHTML; c=c.replace(/\t/g," "); c=c.replace(/<\/?\w+:[^>]*>/gi,""); c=c.replace(/<\\?\??xml[^>]>/gi,""); c=c.replace(/

 <\/p>/gi,"

"); c=c.replace(/[ ]+/g," "); c=c.replace(//gi,""); c=c.replace(/([^<>]+)<\/font>/gi,"$1"); c=c.replace(/([^<>]+)<\/span>/gi,"$1"); c=c.replace(/[\s]+EditorSaved=[\'\"]true[\'\"]/gi,""); c=this.cleanStylesOnStripWordFormatting(c); c=c.replace(/style=(""|'')/ig,""); c=c.replace(/class=(""|'')/ig,""); c=c.replace(/v:shape="[^"]+"/ig,""); c=c.replace(/]*>\s*<\/span[^>]*>/ig," "); c=c.replace(/]*>\s*<\/font[^>]*>/ig," "); c=c.replace(/\s+/ig," "); return c; },cleanStylesOnStripWordFormatting:function(a){var b=a+""; b=b.replace(/(<[^>]*style=["'])([^"']*)(["'][^>]*>)/gi,function(d,e,f,c,g,h){var i=e; f=f.replace(/(background|-webkit-background)-?[a-z]*: initial;/gi,""); if($telerik.isFirefox){f=f.replace(/(background:) none repeat scroll 0% 0%/gi,"$1"); }f=f.replace(/line-height: normal;?/gi,""); f=f.replace(/margin: 0[a-z]{2} 0[a-z]{2} 0[a-z]{2};?/gi,""); if(!$telerik.isIe){f=f.replace(/margin-?[a-z]*: 0.0001[a-z]{2};?/gi,""); }i+=f; i+=c; return i; }); return b; },createTable:function(g,d,b){if(!b){b=document; }var a=b.createElement("table"); for(var e=0; e0){b.insertBefore(a.childNodes[0],a); }b.removeChild(a); return b; }return true; },getStoredOriginalPathsAndAttributes:function(d){var a=function(l,o,p,f,g,h,i,m,k){if(!f){f=""; g=g+i; var n=g.search(/(\s|>)/gi); if(n>0){i=g.substring(n,g.length); g=g.substring(0,n); if(g=='""'){g=""; f='"'; }}else{return l; }}return o+" "+p+"="+f+g+f+' originalAttribute="'+p+'" originalPath="'+g+'"'+i; }; var e=new RegExp("(<[^>]*?)\\s(href|src)\\s*=\\s*('|\")?([^>]+?)(\\3)([^>]*?>)","ig"); d=d.replace(e,a); var c=new RegExp('()]+) originalAttribute="(?:href|src)" originalPath="[^"]+"([\\s\\S]*?-->)',"ig"); var b=d.length+1; while(d.length","!",'"',"#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+"); var c=b; var e; if(a){for(e=0; e=0; e--){c=c.replace(new RegExp("%"+d[e].charCodeAt(0).toString(16),"ig"),d[e]); }}return c; },encodePostbackContent:function(a){return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(a,true); },decodePostbackContent:function(a){return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(a,false); },makeUrlAbsolute:function(b){b=b.split("&").join("&").split('"').join(""").split("<").join("<"); var a=document.createElement("div"); a.innerHTML='a'; return a.childNodes[0].href; },addStyleSheet:function(a,f,c){if(!a){return; }f=f||document; var b=f.createElement("link"); b.setAttribute("href",a,0); if($telerik.isIE&&b.href.indexOf("https://")==0&&a.indexOf("https://")!=0){b.setAttribute("href",b.href); }else{if($telerik.isIE7&&a.indexOf("https://")!=0&&b.href.indexOf("https://")!=0&&window.location.protocol=="https:"){b.setAttribute("href",Telerik.Web.UI.Editor.Utils.makeUrlAbsolute(a),0); }}b.setAttribute("type","text/css"); if(c){b.setAttribute("id",c); }else{c=""; }b.setAttribute("rel","stylesheet",0); var e=f.getElementsByTagName("head")[0]; if($telerik.isSafari){var d=function(){e.appendChild(b); }; window.setTimeout(d,200); }else{e.appendChild(b); }},_copyElementsBetweenNodes:function(h,e,d){var f=h.getElementsByTagName(d); var g=e.getElementsByTagName(d); for(var a=0; a"); if(k>0){b=b.substr(0,k)+">"+c+b.substr(k+1); g[a].outerHTML=b; }}}break; default:Telerik.Web.UI.Editor.Utils.setElementInnerHtml(g[a],f[a].innerHTML); break; }}},cloneNodeWithChildren:function(b){if(!b){return null; }if($telerik.isIE&&b.getElementsByTagName){var a=b.cloneNode(true); if(typeof(a.innerHTML)!="string"){this.setElementInnerHtml(a,b.innerHTML); }this._copyElementsBetweenNodes(b,a,"script"); this._copyElementsBetweenNodes(b,a,"map"); this._copyElementsBetweenNodes(b,a,"style"); this._copyElementsBetweenNodes(b,a,"title"); this._copyElementsBetweenNodes(b,a,"select"); this._copyElementsBetweenNodes(b,a,"iframe"); return a; }else{return b.cloneNode(true); }},escapeRegExSpecialChars:function(a){var b=new RegExp("[.*+?|()\\[\\]{}\\\\]","g"); return a.replace(b,"\\$&"); },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 a=window.RadEditor_uniqueSeed-window.RadEditor_uniqueIdCounter; return"UniqueID"+a; },getTextContent:function(a){if(!a){return null; }if(a.innerText!=null){return a.innerText; }if(a.textContent!=null){var b=a.textContent; b=b.replace(//gi,""); return b; }return null; },_rgbToHex:function(a){if(a.toLowerCase().indexOf("rgb")!=-1){var c="#"; var b=function(d){var e=parseInt(d,10).toString(16); c=c+(e.length==1?"0"+e:e); return d; }; a=a.replace(/(\d+)/gi,b); b=null; return c; }else{return a; }}}; 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(c,b,a){this.isSafari=$telerik.isSafari; this.isIE=$telerik.isIE; this.isOpera=$telerik.isOpera; this.isFirefox=$telerik.isFirefox; this._title=c; this._window=b; this._isExecuted=false; this._canUnexecute=(a!=false); }; Telerik.Web.UI.Editor.CommandBase.prototype={get_argument:function(){return null; },getState:function(a){return Telerik.Web.UI.Editor.CommandStates.Off; },getValue:function(a){return null; },set_window:function(a){this._window=a; },get_window:function(){return this._window; },get_title:function(){return this._title; },set_title:function(a){this._title=a; },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(a){}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(a){}}}; Telerik.Web.UI.Editor.CommandBase.registerClass("Telerik.Web.UI.Editor.CommandBase",null); Telerik.Web.UI.Editor.PasteHtmlCommand=function(c,b,a,d){Telerik.Web.UI.Editor.PasteHtmlCommand.initializeBase(this,[(c||"Insert Html"),b,true]); this.HtmlText=a; this.SelectText=(true==d); }; 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 a=new Telerik.Web.UI.Editor.Selection(this.get_window()); a.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(b,a){Telerik.Web.UI.Editor.GenericCommand.initializeBase(this,[b,a,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(b,a){Telerik.Web.UI.Editor.TextTypeCommand.initializeBase(this,[(b||"Typing"),a]); }; 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(d,c,a,b){var e=true; switch(this.CommandID){case"Copy":case"SelectAll":case"Print":e=false; break; }Telerik.Web.UI.Editor.BrowserCommand.initializeBase(this,[(d||a),c,e]); this.CommandID=a; this.Value=b; }; Telerik.Web.UI.Editor.BrowserCommand.prototype={get_argument:function(){return this.Value; },clone:function(){return new Telerik.Web.UI.Editor.BrowserCommand(this._title,this.get_window(),this.CommandID,this.Value); },getState:function(c){try{c=c||this.get_window(); var a=c.document; if(null==a){return Telerik.Web.UI.Editor.CommandStates.Disabled; }var d=true; if(!$telerik.isIE7||"Paste"!=this.CommandID){d=a.queryCommandEnabled(this.CommandID); }if(!this.isOpera&&!d){if(!this.isSafari||!this.CommandID=="RealFontSize"){return Telerik.Web.UI.Editor.CommandStates.Disabled; }}var e=null; if(!$telerik.isIE7||"Paste"!=this.CommandID){e=a.queryCommandState(this.CommandID); }return e?Telerik.Web.UI.Editor.CommandStates.On:Telerik.Web.UI.Editor.CommandStates.Off; }catch(b){return Telerik.Web.UI.Editor.CommandStates.Off; }},getValue:function(a){try{a=a||this.get_window(); return a.document.queryCommandValue(this.CommandID); }catch(b){}return null; },onExecute:function(){var f=this.get_window(); if(!f){return false; }var a=f.document; if("AbsolutePosition"==this.CommandID){a.execCommand("2D-Position",false,true); }var c=true; if(this.CommandID=="BackColor"&&(this.isOpera||this.isFirefox)){this.CommandID="HiliteColor"; c=false; }if(this.CommandID=="FontSize"&&this.isSafari2){var b=parseInt(this.Value); switch(b){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{a.execCommand("UseCSS",false,(false!=c)); a.execCommand("styleWithCSS",false,(false==c)); }catch(d){}if(!this.isIE&&!this.Value&&(this.CommandID=="ForeColor"||this.CommandID=="BackColor"||this.CommandID=="HiliteColor")){this.removeColorMozilla(this.CommandID); }var g=a.execCommand(this.CommandID,false,this.Value); try{a.execCommand("UseCSS",false,true); a.execCommand("styleWithCSS",false,false); }catch(d){}return g; },removeColorMozilla:function(b){var e=new Telerik.Web.UI.Editor.Selection(); e._window=this._window; var a=e.getHtml(); if(a!=""){var h=e.GetParentElement(); if(h.innerHTML.trim()==a.trim()){this.removeNodeColor(h,b); }var d=window.document.createElement("div"); d.innerHTML=a; for(var c=0,f=d.childNodes.length; c"==a.toLowerCase()&&!$telerik.isOpera){p.execCommand("FormatBlock",false,"Normal"); }var o=true; var g=this._getTagName(); var n=new Telerik.Web.UI.Editor.Selection(this._window); var s=n.getHtml(); var q=p.body.childNodes; if(s&&!(q.length==1&&q[0].tagName=="P")){var d=Telerik.Web.UI.Editor.CommandList._markEditorSelection(c); var r=d.newElements; var k=d.oldElements; var j=Function.createDelegate(this,function(i,x){var v=i.parentNode; if(!$telerik.isFireFox&&x&&v.tagName=="A"&&v.childNodes.length==1){var u=p.createElement(i.tagName); Telerik.Web.UI.Editor.Utils.removeNode(i); v.parentNode.insertBefore(u,v); u.appendChild(v); i=u; v=i.parentNode; }var u=p.createElement(g); u.innerHTML=(x)?i.innerHTML:$telerik.getOuterHtml(i); v.replaceChild(u,i); if(/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(v.tagName)){$telerik.mergeElementAttributes(v,u,false); if(v.childNodes.length==1){Telerik.Web.UI.Editor.Utils.removeNode(v); }else{var w=v.parentNode; if(!u.previousSibling){w.insertBefore(u,v); }else{if(!u.nextSibling){var l=v.nextSibling; if(l){w.insertBefore(u,l); }else{w.appendChild(u); }}else{var t=v.cloneNode(false); while(u.nextSibling){t.appendChild(u.nextSibling); }var l=v.nextSibling; if(l){v.parentNode.insertBefore(u,l); v.parentNode.insertBefore(t,l); }else{v.parentNode.appendChild(u); v.parentNode.appendChild(t); }}}}}this._applyAttributes(u); }); for(var f=0,m=r.length; f"); }var n=new Telerik.Web.UI.Editor.Selection(this._window); var e=n.getParentElement(); if(e.tagName!=g){n.collapse(true); n=new Telerik.Web.UI.Editor.Selection(this._window); e=n.getParentElement(); }var b=$telerik.getPreviousHtmlNode(e); if(b&&b.tagName=="BR"){b.parentNode.removeChild(b); }var h=$telerik.getNextHtmlNode(e); if(h&&h.tagName=="BR"){h.parentNode.removeChild(h); }if(s){Telerik.Web.UI.Editor.Utils.selectElement(this._window,e); n=new Telerik.Web.UI.Editor.Selection(this._window); n.collapse(false); }return o; },_getTagName:function(){var a=this.FormatValue.replace(/.*?<([^\s]+)(\s|\/|>).*/i,"$1"); return a.toUpperCase(); },_applyAttributes:function(c){if(!c){return; }var a=this.FormatValue; var d=document.createElement("div"); d.innerHTML=a+""; if(d.firstChild){var b=d.firstChild; if(b.className){c.className=b.className; }if(b.style.cssText){c.style.cssText=b.style.cssText; }}}}; Telerik.Web.UI.Editor.FormatBlockCommand.registerClass("Telerik.Web.UI.Editor.FormatBlockCommand",Telerik.Web.UI.Editor.CommandBase); Telerik.Web.UI.Editor.InsertListCommand=function(d,b,c,e,a){Telerik.Web.UI.Editor.InsertListCommand.initializeBase(this,[(d||"Insert List"),b,true]); this._newLineBr=(c==true); this._commandName=e; this._listType=(e=="InsertOrderedList")?"OL":"UL"; this._listStyle=a; this._document=this._window.document; }; Telerik.Web.UI.Editor.InsertListCommand.prototype={_insertList:function(){return this._document.execCommand(this._commandName,false,false); },OnExecuteMoz:function(){return this._insertList(); },OnExecuteIE:function(){if(!this._newLineBr){return this._insertList(); }var m=new Telerik.Web.UI.Editor.Selection(this._window); var a=m.getParentElement(); var f=Telerik.Web.UI.Editor.Utils.getElementParentByTag; if("OL"==a.tagName||"UL"==a.tagName||f(a,"UL")||f(a,"OL")){var w=this._insertList(); var m=new Telerik.Web.UI.Editor.Selection(this._window); var z=m.getHtml(); var y=m.getParentElement(); if(y.tagName=="P"){z=y.outerHTML; }var o=this._document.createElement("span"); o.innerHTML=z; if(o.getElementsByTagName("P").length>0){var x=new RegExp("

([\\s\\S]+?)

","gi"); z=z.replace(x,"$1
"); if(y.tagName=="P"){y.innerHTML=""; }m.pasteHtml(z,true); var m=new Telerik.Web.UI.Editor.Selection(this._window); var a=m.getParentElement(); if(a.tagName=="P"){var s=a.parentNode; while(a.childNodes.length>0){s.insertBefore(a.childNodes[0],a); }s.removeChild(a); }}return true; }var z=(m.getBrowserSelection().type=="None")?"":m.getHtml(); if(a.tagName=="P"&&z.match(/^\s*]*>/i)&&z.match(/<\/p>\s*$/i)){var c=z.replace(/^\s*]*>/i,""); c=c.replace(/<\/p>\s*$/i,""); if(a.innerHTML==c){z=c; }}if(z.toLowerCase().trim()=="

 

"){return this._insertList(); }else{if(!z){var t=m.getRange(); var s=t.parentElement(); if(!s.currentStyle.hasLayout){while(!s.currentStyle.hasLayout&&s.tagName!="P"){s=s.parentNode; }}var n=t.duplicate(); var l=t.duplicate(); var v=s.children; var q=0; if(v.length==0){n.moveToElementText(s); n.collapse(true); }else{for(q=0; q0){if(q==0){n.moveToElementText(s); n.collapse(true); break; }var u=v[q-1]; n.moveToElementText(u); n.collapse(false); n.move("character",1); n.move("character",-1); break; }}}}var k=null; if(q==v.length){q=0; }for(; q0){k=d; break; }}if(!k){k=s; }l.moveToElementText(k); if(k!=s){l.collapse(true); l.move("character",-1); l.move("character",1); }else{l.collapse(false); }n.setEndPoint("EndToStart",l); n.select(); z=n.htmlText; var h=n.parentElement(); n.execCommand("Delete",null,false); if(n.parentElement()!=h){n.move("character",-1); n.select(); }else{if(n.htmlText){n.text=""; if(n.parentElement()!=h){n.move("character",-1); n.select(); }}}z=z.replace(/^\s*/i,""); }}var e=this.getLiElementsHtml(z); e="<"+this._listType+">"+e+""; m.pasteHtml(e,true); var g=m.getParentElement(); if(g.tagName!=this._listType){g=Telerik.Web.UI.Editor.Utils.getElementParentByTag(g,this._listType); }var p=g.nextSibling; if(p&&p.tagName=="BR"){p.parentNode.removeChild(p); }var b=g.getElementsByTagName("LI"); var j=b.length; if(j>0){var r=b[j-1]; n.moveToElementText(r); n.collapse(false); n.select(); }return true; },getLiElementsHtml:function(d){d+=""; var b=""; var g=d.split("
"); var f=g.length; if(f>1){var c=this._document.createElement("div"); c.innerHTML=d.trim(); if(c.childNodes.length==1){b+="
  • "+d+"
  • "; }else{for(var a=0; a"+e+""; }}}}else{b+="
  • "+d+"
  • "; }return b; }}; Telerik.Web.UI.Editor.InsertListCommand.registerClass("Telerik.Web.UI.Editor.InsertListCommand",Telerik.Web.UI.Editor.CommandBase); Type.registerNamespace("Telerik.Web.UI.Editor"); Telerik.Web.UI.Editor.TableCommandBase=function(b,a){Telerik.Web.UI.Editor.TableCommandBase.initializeBase(this,[(b||"Table Command"),a,true]); }; Telerik.Web.UI.Editor.TableCommandsBase_Static={}; Telerik.Web.UI.Editor.TableCommandBase.prototype={getLayoutBuilderEngine:function(b,c){if(!Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder){Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder=new Telerik.Web.UI.LayoutBuilderEngine(); }var a=Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder; a.set_selectedTable(b); a.set_selectedCell(c); return a; },configureLayoutBuilderEngine:function(){var c=this.getSelectedCell(); if(!c){return false; }var a=c.parentNode; var b=this.getParentTable(a); return this.getLayoutBuilderEngine(b,c); },getState:function(a){return this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled; },getSelectedCell:function(b){var c=new Telerik.Web.UI.Editor.Selection(b||this._window); var a; if(c){a=c.getParentElement(); }while(null!=a&&a.tagName!="TD"&&a.tagName!="TH"&&a.tagName!="BODY"){a=a.parentNode; }if(!a||!a.tagName){return null; }return(a.tagName=="TD"||a.tagName=="TH"?a:null); },getSelectedRow:function(b){var c=new Telerik.Web.UI.Editor.Selection(this._window||b); var a; if(c){a=c.getParentElement(); }if(!a){return null; }while(null!=a&&a.tagName!="TR"&&a.tagName!="BODY"){a=a.parentNode; }return(a&&a.tagName=="TR"?a:null); },getParentTable:function(a){if(!a){return null; }while(null!=a&&a.parentNode!=a&&"TABLE"!=a.tagName){a=a.parentNode; }return(a&&a.tagName=="TABLE"?a:null); }}; Telerik.Web.UI.Editor.TableCommandBase.registerClass("Telerik.Web.UI.Editor.TableCommandBase",Telerik.Web.UI.Editor.CommandBase); Telerik.Web.UI.Editor.TableInsertRow=function(b,a,c){Telerik.Web.UI.Editor.TableInsertRow.initializeBase(this,[(b||"Insert row"),a,true]); this._direction=c||"above"; }; Telerik.Web.UI.Editor.TableInsertRow.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableInsertRow(this._title,this._window,this._direction); },getState:function(a){return(this.getSelectedRow(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled); },onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand(("below"==this._direction)?"insertRowBelow":"insertRowAbove"); }}; Telerik.Web.UI.Editor.TableInsertRow.registerClass("Telerik.Web.UI.Editor.TableInsertRow",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableDeleteRow=function(b,a){Telerik.Web.UI.Editor.TableDeleteRow.initializeBase(this,[(b||"Delete Row"),a,true]); }; Telerik.Web.UI.Editor.TableDeleteRow.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableDeleteRow(this._title,this._window); },getState:function(a){return(this.getSelectedRow(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled); },onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand("deleteRow"); }}; Telerik.Web.UI.Editor.TableDeleteRow.registerClass("Telerik.Web.UI.Editor.TableDeleteRow",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableInsertColumn=function(b,a,c){Telerik.Web.UI.Editor.TableInsertColumn.initializeBase(this,[(b||"Insert column"),a,true]); this._direction=c||"left"; }; Telerik.Web.UI.Editor.TableInsertColumn.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableInsertColumn(this._title,this._window,this._direction); },getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled); },onExecute:function(){var a=this.configureLayoutBuilderEngine(); if($telerik.isRightToLeft(a._selectedTable)){this._direction=("right"==this._direction)?"left":"right"; }return a.executeCommand(("right"==this._direction)?"insertColumnToTheRight":"insertColumnToTheLeft"); }}; Telerik.Web.UI.Editor.TableInsertColumn.registerClass("Telerik.Web.UI.Editor.TableInsertColumn",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableDeleteColumn=function(b,a){Telerik.Web.UI.Editor.TableDeleteColumn.initializeBase(this,[(b||"Delete column"),a,true]); }; Telerik.Web.UI.Editor.TableDeleteColumn.prototype={clone:function(){return Telerik.Web.UI.Editor.TableDeleteColumn.New(this._title,this._window); },getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled); },onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand("deleteColumn"); }}; Telerik.Web.UI.Editor.TableDeleteColumn.registerClass("Telerik.Web.UI.Editor.TableDeleteColumn",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableMergeRows=function(b,a){Telerik.Web.UI.Editor.TableMergeRows.initializeBase(this,[(b||"Merge rows"),a,true]); }; Telerik.Web.UI.Editor.TableMergeRows.prototype={clone:function(){return Telerik.Web.UI.Editor.TableMergeRows.New(this._title,this._window); },getState:function(f){var e=this.getSelectedCell(f); var c=false; if(e){var b=e.parentNode; var a=this.getParentTable(b); var d=this.getLayoutBuilderEngine(a,e); c=d.canMergeDown(); }if(c){return Telerik.Web.UI.Editor.CommandStates.Off; }else{return Telerik.Web.UI.Editor.CommandStates.Disabled; }},onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand("mergeDown"); },getLowerCell:function(f){if(!f){return null; }var c=this.getParentTable(f); var d=f.parentNode; var a=c.rows[d.rowIndex+f.rowSpan]; if(!a){return null; }var e=a.cells[f.cellIndex]; if(!e){for(var b=a.cells.length-1; b>=0; b--){if(a.cells[b].offsetLeft==f.offsetLeft){return a.cells[b]; }}}return e; }}; Telerik.Web.UI.Editor.TableMergeRows.registerClass("Telerik.Web.UI.Editor.TableMergeRows",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableMergeColumns=function(b,a){Telerik.Web.UI.Editor.TableMergeColumns.initializeBase(this,[(b||"Merge columns"),a,true]); }; Telerik.Web.UI.Editor.TableMergeColumns.prototype={clone:function(){return Telerik.Web.UI.Editor.TableMergeColumns.New(this._title,this._window); },getState:function(f){var e=this.getSelectedCell(f); var c=false; if(e){var b=e.parentNode; var a=this.getParentTable(b); var d=this.getLayoutBuilderEngine(a,e); c=d.canMergeRight(); }if(c){return Telerik.Web.UI.Editor.CommandStates.Off; }else{return Telerik.Web.UI.Editor.CommandStates.Disabled; }},getNextSiblingCell:function(c){if(!c){return null; }var a=c.parentNode; var b=a.cells[c.cellIndex+1]; if(null!=b&&c.rowSpan==b.rowSpan){return b; }else{return null; }},onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand("mergeRight"); }}; Telerik.Web.UI.Editor.TableMergeColumns.registerClass("Telerik.Web.UI.Editor.TableMergeColumns",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableSplitCell=function(b,a,c){Telerik.Web.UI.Editor.TableSplitCell.initializeBase(this,[(b||"Split cell"),a,true]); this._direction=c||"vertical"; }; Telerik.Web.UI.Editor.TableSplitCell.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableSplitCell(this._title,this._window); },getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled); },onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand(("vertical"==this._direction)?"splitCellVertically":"splitCellHorizontally"); },getRealCellIndex:function(e){if(!e){return 0; }var a=e.parentNode; var b=0; var c=0; while(a.cells.length>b&&a.cells[b]!=e){var d=a.cells[b]; if(d.colSpan>1){c+=d.colSpan; }else{c++; }b++; }return c; }}; Telerik.Web.UI.Editor.TableSplitCell.registerClass("Telerik.Web.UI.Editor.TableSplitCell",Telerik.Web.UI.Editor.TableCommandBase); Telerik.Web.UI.Editor.TableDeleteCell=function(b,a){Telerik.Web.UI.Editor.TableDeleteCell.initializeBase(this,[(b||"Delete cell"),a,true]); }; Telerik.Web.UI.Editor.TableDeleteCell.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableDeleteCell(this._title,this._window); },getState:function(f){var e=this.getSelectedCell(f); var c=false; if(e){var b=e.parentNode; var a=this.getParentTable(b); var d=this.getLayoutBuilderEngine(a,e); c=d.canDeleteCell(); }if(c){return Telerik.Web.UI.Editor.CommandStates.Off; }else{return Telerik.Web.UI.Editor.CommandStates.Disabled; }},onExecute:function(){var a=this.configureLayoutBuilderEngine(); return a.executeCommand("deleteCell"); }}; Telerik.Web.UI.Editor.TableDeleteCell.registerClass("Telerik.Web.UI.Editor.TableDeleteCell",Telerik.Web.UI.Editor.TableCommandBase); Type.registerNamespace("Telerik.Web.UI"); (function(){var b=$telerik.$; var a=Telerik.Web.UI; a.EditorButton=function(c){a.EditorButton.initializeBase(this,[c]); this._enabled=true; this._text=""; this._isOn=false; }; a.EditorButton.createToolWrapper=function(d,e){var c=document.createElement("ul"); var f=document.createElement("li"); f.innerHTML=" "; f.className="reGrip grip_first"; c.appendChild(f); c.className="reToolbar "+e; f=document.createElement("li"); c.appendChild(f); var g=d.get_element(); f.appendChild(g); f=document.createElement("li"); f.innerHTML=" "; f.className="reGrip grip_last"; c.appendChild(f); return c; }; a.EditorButton.getToolRootNode=function(c){while(c&&c.tagName!="A"){c=c.parentNode; }return c; }; a.EditorButton._createButton=function(e){var c=document.createElement("a"); c.className=e.showText==true?"reTool_text":"reTool"; var f=e.text; c.title=f?f:e.name; c.href="#"; c.setAttribute("unselectable","on"); if(e.showIcon!=false){var d=document.createElement("span"); d.className=e.name; d.innerHTML=" "; d.setAttribute("unselectable","on"); c.appendChild(d); }if(e.showText==true){var d=document.createElement("span"); d.className="reButton_text"; d.innerHTML=e.text?e.text:e.name; d.setAttribute("unselectable","on"); c.appendChild(d); }return c; }; a.EditorButton.createTool=function(d,j,h,c,g){if(!h){h=a.EditorButton; }if(!c){c=a.EditorButton._createButton(d); if(c.tagName=="A"){var i=c; if(h==a.EditorSplitButton||h.inheritsFrom(a.EditorSplitButton)){Sys.UI.DomElement.addCssClass(i,"reSplitButton"); var f=document.createElement("span"); f.className="split_arrow"; f.innerHTML=" "; i.appendChild(f); }else{if(h==a.EditorDropDown||h.inheritsFrom(a.EditorDropDown)){Sys.UI.DomElement.removeCssClass(i,"reTool"); Sys.UI.DomElement.addCssClass(i,"reDropdown"); i.innerHTML=""; var f=document.createElement("span"); f.innerHTML=" "; var e=d.width?d.width:"50px"; f.style.width=e; i.appendChild(f); }}}}var k=$create(h,d,j,null,c); if(g&&g.appendChild){g.appendChild(c); }return k; }; a.EditorButton.prototype={initialize:function(){var c=this.getAnchorElement(); if(c){c.setAttribute("unselectable","on"); }var e=this.getSpanElement(); if(e){e.setAttribute("unselectable","on"); }if(this.get_addClickHandler()){var d=this.get_element(); $addHandlers(d,{click:this.click},this); }},dispose:function(){var c=this.get_element(); if(c){$clearHandlers(c); }a.EditorButton.callBaseMethod(this,"dispose"); },click:function(c){this.raiseEvent("valueSelected"); return $telerik.cancelRawEvent(c); },add_valueSelected:function(c){this.get_events().addHandler("valueSelected",c); },remove_valueSelected:function(c){this.get_events().removeHandler("valueSelected",c); },raiseEvent:function(d,e){var c=this.get_events().getHandler(d); if(c){if(!e){e=Sys.EventArgs.Empty; }c(this,e); }},set_width:function(d){var c=this.getSpanElement(); if(c){c.style.width=d; }},get_width:function(){return this.get_element().offsetWidth; },set_height:function(d){var c=this.getSpanElement(); if(c){c.style.height=d; }},get_height:function(){return this.get_element().offsetHeight; },isTarget:function(c){return $telerik.isDescendantOrSelf(this.get_element(),c.target); },setState:function(c){this.set_enabled(c!=a.Editor.CommandStates.Disabled); this.setOn(c==a.Editor.CommandStates.On); },setFocus:function(){var c=this.getAnchorElement(); if(c&&c.focus){c.focus(); }},get_enabled:function(){return this._enabled; },set_enabled:function(d){if(this._enabled!=d){this._enabled=d; var c=this.getAnchorElement(); if(!this._enabled){this._addAnchorCssClass("reTool_disabled"); c.setAttribute("disabled","disabled"); }else{this._removeAnchorCssClass("reTool_disabled"); c.removeAttribute("disabled"); }}},isOn:function(){return this._isOn; },setOn:function(c){if(this._isOn!=c){this._isOn=c; if(this._isOn){this._addAnchorCssClass("reTool_selected"); }else{this._removeAnchorCssClass("reTool_selected"); }}},get_text:function(){if(this._text){return this._text; }var c=this.getAnchorElement(); if(c&&c.getAttribute("title")){return c.getAttribute("title"); }return this.get_name(); },set_text:function(c){if(this._text!=c){this._text=c; if(this.get_showText()){this.getSpanElement().innerHTML=c; }}},_addAnchorCssClass:function(c){Sys.UI.DomElement.addCssClass(this.getAnchorElement(),c); },_removeAnchorCssClass:function(c){Sys.UI.DomElement.removeCssClass(this.getAnchorElement(),c); },getAnchorElement:function(){return this.get_element(); },getSpanElement:function(){var d=this.getAnchorElement(); var c=d.firstChild; while(c!=null&&(c.tagName==null||c.tagName.toLowerCase()!="span")){c=c.nextSibling; }return c; }}; b.registerControlProperties(a.EditorButton,{clientStateFieldID:null,attributes:{},addClickHandler:false,autoPostBack:false,name:"",shortCut:"",showIcon:true,showText:false,skin:"",type:null,clientTypeName:"Telerik.Web.UI.EditorButton"}); b.registerControlEvents(a.EditorButton,["valueSelected"]); a.EditorButton.registerClass("Telerik.Web.UI.EditorButton",Sys.UI.Control); Telerik.Web.UI.EditorSpinBoxEventArgs=function(d,c){Telerik.Web.UI.EditorSpinBoxEventArgs.initializeBase(this); this._newValue=d; this._oldValue=c; }; 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(c){Telerik.Web.UI.EditorSpinBox.initializeBase(this,[c]); this._width="50px"; this._className="reSpinBox"; this._selectedItem=""; this._initialValue=""; this._visibleInput=true; this._enabledIncrease=true; this._enabledDecrease=true; }; Telerik.Web.UI.EditorSpinBox.prototype={dispose:function(){this._inputElement.onchange=null; this._inputElement.onkeypress=null; this._inputElement.onclick=null; this._inputElement=null; this._increaseButton.onclick=null; this._increaseButton=null; this._decreaseButton.onclick=null; this._decreaseButton=null; Telerik.Web.UI.EditorSpinBox.callBaseMethod(this,"dispose"); },initialize:function(){this._createControls(); },_createControls:function(){var d=document.createElement("table"); d.cellSpacing=0; d.cellPadding=0; d.className=this.get_visibleInput()?this._className:"reTableWizardSpinBox"; d.insertRow(-1); var f=d.rows[0].insertCell(-1); var g=document.createElement("input"); g.className="radfd_skipme"; g.type="text"; g.onclick=function(j){this.focus(); }; g.onkeypress=Function.createDelegate(this,this._onKeyPressHandler); g.onchange=Function.createDelegate(this,this._onChangeHandler); this._inputElement=g; f.appendChild(g); if(!this.get_visibleInput()){this.set_visibleInput(false); }if(this.get_visibleInput()){f=d.rows[0].insertCell(-1); var e=document.createElement("table"); e.cellSpacing=0; e.cellPadding=0; e.insertRow(-1); var h=e.rows[0].insertCell(-1); var i=this._createAnchorElement("Increase"); this._increaseButton=i; h.appendChild(i); e.insertRow(-1); h=e.rows[1].insertCell(-1); i=this._createAnchorElement("Decrease"); this._decreaseButton=i; h.appendChild(i); f.appendChild(e); }else{f=d.rows[0].insertCell(-1); var i=this._createAnchorElement_noinput("Increase"); this._increaseButton=i; f.appendChild(i); f=d.rows[0].insertCell(-1); i=this._createAnchorElement_noinput("Decrease"); this._decreaseButton=i; f.appendChild(i); }var c=this.get_element(); c.appendChild(d); c.style.width=this.get_width(); },_createAnchorElement:function(e){var c=document.createElement("a"); var d=typeof(localization)!="undefined"&&localization[e]?localization[e]:e; c.title=d; c.href="javascript:void(0);"; c.innerHTML=d; c.className="reSpinBox"+e; c.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler); return c; },_createAnchorElement_noinput:function(e){var c=document.createElement("a"); var d=typeof(localization)!="undefined"&&localization[e]?localization[e]:e; c.title=d; c.href="javascript:void(0);"; c.innerHTML=""+d+""; c.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler); return c; },_executeFunction:function(h,f,d){if(d){if(f.Executed){f.Executed=false; return $telerik.cancelRawEvent(h); }}f.Executed=true; var c=(this._selectedItem!="")?this._selectedItem:this._initialValue; this._selectedItem=f.value; var g=new Telerik.Web.UI.EditorSpinBoxEventArgs(f.value,c); this.raiseEvent("valueSelected",g); },_onPlusMinusClickHandler:function(h){var d=null; if(!h){d=window.event.srcElement; }else{d=h.target; }while(d&&d.tagName.toLowerCase()!="a"){d=d.parentNode; }if(!d){return; }var c=this.get_value(); c=c.replace(/^0+(\d)/ig,"$1"); if(""==c){c="0"; }var g=parseInt(c); var f=g+""; if(isNaN(g)){return; }else{f=c.substring(f.length); }if(d==this._increaseButton){if(this._enabledIncrease){g++; }else{return; }}else{if(d==this._decreaseButton){if(this._enabledDecrease){g--; }else{return; }}else{d=null; }}if(d&&g>=0){this.set_value(g+f); this._executeFunction(h,this._inputElement); }return false; },_onChangeHandler:function(c){if(!c){c=window.event; }this._executeFunction(c,this._inputElement); },_onKeyPressHandler:function(c){if(!c){c=window.event; }if(c.keyCode==13){this._executeFunction(c,this._inputElement); return $telerik.cancelRawEvent(c); }},_onKeyDownHandler:function(c){if(!c){var c=window.event; }c.returnValue=this._isKeyValid(c); },_onKeyUpHandler:function(g){if(!g){var g=window.event; }if(this._isKeyValid(g,true)){var c=this._selectedItem; var d=this.get_value(); var f=new Telerik.Web.UI.EditorSpinBoxEventArgs(d,c); this.raiseEvent("valueSelected",f); }},_isKeyValid:function(g,f){try{if(!f){f=false; }if(!g){g=window.event; }var d=((48<=g.keyCode&&g.keyCode<=57)||(96<=g.keyCode&&g.keyCode<=105)||(13==g.keyCode)||(8==g.keyCode)||(46==g.keyCode)||(9==g.keyCode)); if(!f){d|=((35<=g.keyCode&&g.keyCode<=40)); }return d; }catch(c){return true; }},get_selectedItem:function(){return this._selectedItem; },get_value:function(){return this._inputElement.value; },set_value:function(c){if(null==c){c=""; }this._inputElement.value=c; if(this._initialValue==""){this._initialValue=c; }},get_width:function(){return this._width; },set_width:function(d){this._width=d; var c=this.get_element(); c.style.width=this._width; },get_enabledIncrease:function(){return this._enabledIncrease; },set_enabledIncrease:function(c){this._enabledIncrease=c; this._setButtonState(this._increaseButton,c); },get_enabledDecrease:function(){return this._enabledDecrease; },set_enabledDecrease:function(c){this._enabledDecrease=c; this._setButtonState(this._decreaseButton,c); },_setButtonState:function(c,d){if(!d){Sys.UI.DomElement.addCssClass(c,"disabled-button"); }else{Sys.UI.DomElement.removeCssClass(c,"disabled-button"); }},get_visibleInput:function(){return this._visibleInput; },set_visibleInput:function(c){this._visibleInput=c; if(this._inputElement){if(!this._visibleInput){this._inputElement.style.display="none"; }else{this._inputElement.style.display=""; }}}}; Telerik.Web.UI.EditorSpinBox.registerClass("Telerik.Web.UI.EditorSpinBox",Telerik.Web.UI.EditorButton); Telerik.Web.UI.EditorCheckBox=function(c){Telerik.Web.UI.EditorCheckBox.initializeBase(this,[c]); 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(c){if(this._inputElement.checked!=c){this._inputElement.checked=c; }},initialize:function(){var c=document.createElement("input"); c.setAttribute("type","CHECKBOX"); c.Parent=this; c.onclick=function(d){var f=this.Parent; f._selectedItem=!f._selectedItem; this.checked=f._selectedItem; f._selectedItem=this.checked; f.raiseEvent("valueSelected"); }; this._inputElement=c; this.get_element().appendChild(c); }}; Telerik.Web.UI.EditorCheckBox.registerClass("Telerik.Web.UI.EditorCheckBox",Telerik.Web.UI.EditorButton); Telerik.Web.UI.EditorTextBox=function(c){Telerik.Web.UI.EditorTextBox.initializeBase(this,[c]); this._width="100px"; 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(c){this._width=c; },initialize:function(){var e=document.createElement("input"); e.style.width=this.get_width(); e.Parent=this; var d=this.get_name(); var c=function(h,g,f){if(f){if(g.Executed){g.Executed=false; return $telerik.cancelRawEvent(h); }}g.Executed=true; g.Parent._selectedItem=g.value; g.Parent.raiseEvent("valueSelected"); return $telerik.cancelRawEvent(h); }; e.onchange=function(f){if(!f){f=window.event; }return c(f,this,true); }; e.onclick=function(f){this.focus(); }; e.onkeypress=function(f){if(!f){f=window.event; }if(f.keyCode==13){return c(f,this); }}; this._inputElement=e; this.get_element().appendChild(e); },get_selectedItem:function(){return this._selectedItem; },get_value:function(){return this._inputElement.value; },set_value:function(c){if(null==c){c=""; }this._inputElement.value=c; }}; Telerik.Web.UI.EditorTextBox.registerClass("Telerik.Web.UI.EditorTextBox",Telerik.Web.UI.EditorButton); a.ImageDialogCaller=function(c){a.ImageDialogCaller.initializeBase(this,[c]); }; a.ImageDialogCaller.prototype={dispose:function(){this._inputElement=null; var c=this.get_pushButton(); if(c){c.onclick=null; }this.set_pushButton(null); this.set_editor(null); a.ImageDialogCaller.callBaseMethod(this,"dispose"); },initialize:function(){var c=this.get_element(); this._inputElement=c.getElementsByTagName("INPUT")[0]; var d=c.getElementsByTagName("A")[0]; this.set_pushButton(d); if(d){d.onclick=Function.createDelegate(this,this._onButtonClickHandler); }},_onButtonClickHandler:function(c){this.callImageDialog(); },_dialogCallbackFunction:function(f,d){var e=d&&d.get_value?d.get_value():null; var c=""; if(e&&e.getAttribute){c=e.getAttribute("src",2); }if(c){this._inputElement.value=c; this.raiseEvent("valueSelected"); }},callImageDialog:function(){var d=Function.createDelegate(this,this._dialogCallbackFunction); var c=this.get_editor(); var h=null; if(c){h=c.get_dialogOpener(); }else{if(a.Dialogs&&a.Dialogs.CommonDialogScript&&a.Dialogs.CommonDialogScript.get_windowReference()){h=a.Dialogs.CommonDialogScript.get_windowReference().get_dialogOpener(); }}var k=null; if(h){var e=h.get_additionalQueryString(); var j=this._inputElement.value; if(j){var f=j; h.set_additionalQueryString(e+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(f)); var i=c?c.get_document():document; k=i.createElement("img"); k.setAttribute("src",f); }}var g=new a.EditorCommandEventArgs("ImageManager",null,k); a.Editor.CommandList._getDialogArguments(g,"IMG",c,"ImageManager"); if(c){c.showDialog("ImageManager",g,d); }else{if(h){h.open("ImageManager",g,d); }}if(h){h.set_additionalQueryString(e); }},get_value:function(){return this._inputElement.value; },set_value:function(c){if(null==c){c=""; }this._inputElement.value=c; }}; b.registerControlProperties(a.ImageDialogCaller,{pushButton:null,editor:null,width:""}); a.ImageDialogCaller.registerClass("Telerik.Web.UI.ImageDialogCaller",a.EditorButton); })(); Type.registerNamespace("Telerik.Web.UI"); (function(){var b=$telerik.$; var a=Telerik.Web.UI; a.EditorDropDown=function(c){a.EditorDropDown.initializeBase(this,[c]); 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; }; a.EditorDropDown.prototype={click:function(c){this.show(); return $telerik.cancelRawEvent(c); },dispose:function(){a.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 c=false; if(!this._rendered){this.render(); c=true; }this.raiseEvent("show"); if(!this._childrenRendered){this.renderChildren(); this._childrenRendered=true; c=true; }if(c){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(c){var d=this.resolveActiveIndex(c); if(d>-1){this.set_activeIndex(d,c); }$telerik.cancelRawEvent(c); },_onPopupClick:function(c){var d=this.resolveActiveIndex(c); $telerik.cancelRawEvent(c); if(d>-1){this._selectedIndex=d; this.hide(); this.raiseEvent("valueSelected"); }},get_activeIndex:function(){return this._activeIndex; },set_activeIndex:function(d,c){this._activeIndex=d; this.selectUIItem(c); },selectPreviousItem:function(){var c=this.get_activeIndex(); if(c-1>=0){this.set_activeIndex(c-1); }},selectNextItem:function(){var c=this.get_activeIndex(); if(c+1(d/2)){f.style.height=c; }}this._popupBehavior.show(); this._getPopupVisibilityController().set_activePopup(this); f.style.zIndex="100000"; if(e){f.style.overflowY=g; }this._popupVisible=true; },_getQuirksModeHeight:function(g,e){try{if($telerik.quirksMode){var f=$telerik.getBorderBox(g); var d=$telerik.getPaddingBox(g); var c=parseInt(e)+(f.top*2); c+=d.top+d.bottom; e=c+"px"; }}catch(i){}return e; },_getPopupChildrenWidth:function(){var f=this.get_popupElement().childNodes; var e=0; for(var c=0; ce){e=d; }}return e+"px"; },_getPopupChildrenHeight:function(){var d=this.get_popupElement().childNodes; var c=0; for(var e=0; e-1){var c=this._items[this._selectedIndex]; var d=((true==this._isArrayCollection)||(c instanceof Array))?c[0]:c; return d; }return null; },get_selectedIndex:function(){return this._selectedIndex; },set_selectedIndex:function(c){this._selectedIndex=c; this.set_activeIndex(c); },get_items:function(){return this._items; },set_items:function(c){this.disposeChildren(); this._items=c; }}; b.registerControlProperties(a.EditorDropDown,{popupheight:"200px",popupwidth:"200px",rootpopupclassname:"reDropDownBody",popupclassname:"",sizetofit:false,itemsperrow:1,clearSelectedOnShow:true}); b.registerControlEvents(a.EditorDropDown,["show","hide"]); a.EditorDropDown.registerClass("Telerik.Web.UI.EditorDropDown",a.EditorButton); Telerik.Web.UI.EditorUpdateableDropDown=function(c){Telerik.Web.UI.EditorUpdateableDropDown.initializeBase(this,[c]); }; Telerik.Web.UI.EditorUpdateableDropDown.prototype={updateValue:function(c){if(null==c){return; }try{if(!c){c=this.get_text(); }var f=this.getSpanElement(); if(f){this._value=c; f.innerHTML=(""+c).replace(/\s+/ig," "); }}catch(d){}},get_value:function(){if(!this._value||this._value==this.get_text()){return""; }return this._value; },set_value:function(c){this.updateValue(c); }}; Telerik.Web.UI.EditorUpdateableDropDown.registerClass("Telerik.Web.UI.EditorUpdateableDropDown",Telerik.Web.UI.EditorDropDown); Telerik.Web.UI.EditorSelfUpdateableDropDown=function(c){Telerik.Web.UI.EditorSelfUpdateableDropDown.initializeBase(this,[c]); this._clientStateFieldID=null; }; Telerik.Web.UI.EditorSelfUpdateableDropDown.prototype={_onPopupClick:function(f){var d=this.resolveActiveIndex(f); $telerik.cancelRawEvent(f); if(d>-1){this._selectedIndex=d; this.hide(); var c=this.get_selectedItem(); if(c){this.updateValue(c); }this.raiseEvent("valueSelected"); }}}; Telerik.Web.UI.EditorSelfUpdateableDropDown.registerClass("Telerik.Web.UI.EditorSelfUpdateableDropDown",Telerik.Web.UI.EditorUpdateableDropDown); Telerik.Web.UI.EditorSplitButton=function(c){Telerik.Web.UI.EditorSplitButton.initializeBase(this,[c]); this._updateHeader=true; }; Telerik.Web.UI.EditorSplitButton.prototype={click:function(f){var d=this.isArrowClicked(f.target); if(d||!this._updateHeader){this.show(); }else{var c=this.get_selectedItem(); if(null==c){this.show(); }else{this.raiseEvent("valueSelected"); }}return $telerik.cancelRawEvent(f); },initialize:function(){Telerik.Web.UI.EditorSplitButton.callBaseMethod(this,"initialize"); this.set_clearSelectedOnShow(false); },isArrowClicked:function(c){var d=this._getArrowElement(); if(c==d){return true; }return false; },_getArrowElement:function(){var d=this.getAnchorElement().getElementsByTagName("SPAN"); var c=d[d.length-1]; return c; },get_updateHeader:function(){return this._updateHeader; },set_updateHeader:function(c){this._updateHeader=c; }}; Telerik.Web.UI.EditorSplitButton.registerClass("Telerik.Web.UI.EditorSplitButton",Telerik.Web.UI.EditorUpdateableDropDown); Telerik.Web.UI.EditorToolStrip=function(c){Telerik.Web.UI.EditorToolStrip.initializeBase(this,[c]); this._tools=[]; }; Telerik.Web.UI.EditorToolStrip.prototype={selectUIItem:function(f){for(var c=0; c1&&d>1&&(d%this.get_itemsperrow()==0)){g=document.createElement("ul"); g.className="reToolbar "+this.get_skin(); this._itemRootElement.appendChild(g); }var e=f[d]; if(null==e.showText){e.showText=true; }var c=document.createElement("li"); g.appendChild(c); var h=Telerik.Web.UI.EditorButton.createTool(e,null,null,null,c); this._items[this._items.length]=h; }},_resolveSelectedTool:function(f){for(var c=0; c",itemName)+b+"
    "]; }}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(a){Telerik.Web.UI.Editor.FontSizeDropDown.initializeBase(this,[a]); }; Telerik.Web.UI.Editor.FontSizeDropDown.prototype={renderChildren:function(){var c=this._items; if(c&&c[0]&&!(c[0] instanceof Array)){for(var a=0; a",b)+b+""]; }}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(a){Telerik.Web.UI.Editor.InsertCustomLinkDropDown.initializeBase(this,[a]); }; Telerik.Web.UI.Editor.InsertCustomLinkDropDown.prototype={renderItemRoot:function(){var a=document.createElement("ul"); a.className="reCustomLinks"; this._itemRootElement=a; return this._itemRootElement; },show:function(){this._linkCounter=0; return Telerik.Web.UI.Editor.InsertCustomLinkDropDown.callBaseMethod(this,"show"); },renderChildren:function(){this.FlatLinksArray=[]; for(var b=0; b0){return; }var m=null; switch(l){case"ApplyClass":m=f.getCssArray(); break; case"FontName":m=f.get_fontNames(); break; case"FontSize":m=f.get_fontSizes(); break; case"InsertSymbol":m=f.get_symbols(); if(($telerik.isIE||$telerik.isSafari)&&m&&m.length){for(var k=0; k/g,">"); g=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(g); if(g){d.pasteHtml(g,e); }}}; if(d.isIE){b(window.clipboardData.getData("Text")); }else{var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){b(g.get_content()); }); d.showDialog("CleanPasteTextContent",{},a); return false; }}; this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(g,a,f){var e=function(h,j){var i=""; var k=a.get_stripFormattingOptions(); if(g=="PasteFromWord"){if(k==Telerik.Web.UI.StripFormattingOptions.None||(k&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists)){h=Telerik.Web.UI.Editor.Utils.convertWordLists(h); }i=Telerik.Web.UI.Editor.Utils.stripFormatting(h,"WORD"); }else{if(g=="PasteFromWordNoFontsNoSizes"){if(k==Telerik.Web.UI.StripFormattingOptions.None||(k&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists)){h=Telerik.Web.UI.Editor.Utils.convertWordLists(h); }i=Telerik.Web.UI.Editor.Utils.stripFormatting(h,"WORD_ALL"); }else{i=Telerik.Web.UI.Editor.Utils.convertText2Html(h); }}if(j){j.select(); }if(i){a.pasteHtml(i,g); }}; if(a.isIE){var d=a.createRestorePoint(); d.useOldRange=true; var b=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml(); e(b,d); }else{var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(h,i){e(i.get_content()); }); a.showDialog("CleanPasteHtmlContent",{dialogTitle:a.getLocalizedString(g)},c); }}; this.PasteHtml=function(d,c,b){var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(b,function(f,e){var g=e.get_content(); g=c.applyFiltersForEmbedContent(g); c.pasteHtml(g); }); c.showDialog("PasteHtml",{dialogTitle:c.getLocalizedString(d),commandName:"PasteHtml"},a); }; this.Copy=function(f,d,b){if(null!=b){var a=window.opera?false:true; if(a){try{document.queryCommandEnabled(f); }catch(c){a=false; }}if(a){d.get_document().execCommand(f,false,null); }else{alert(d.getLocalizedString("UseCtrlC")); }}}; this.Cut=this.Paste=function(i,a,d){if(null!=d){var f=window.opera?false:true; if(f){try{if(!a.isIE7){document.queryCommandEnabled(i); }}catch(g){f=false; }}if(i=="Paste"&&f&&a.isIE7){a.get_contentArea().fireEvent("onbeforepaste"); }if(f){var c=new Telerik.Web.UI.Editor.GenericCommand(a.getLocalizedString(i),a.get_contentWindow()); var h=a.get_document().execCommand(i,false,null); if(h!=false){a.executeCommand(c); }else{f=false; }}if(!f){var b=(i=="Cut"?"UseCtrlX":"UseCtrlV"); alert(a.getLocalizedString(b)); }}else{a._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(a.getLocalizedString(i),a.get_contentWindow()); }}; this.InsertParagraph=function(c,b,a){b.executeBrowserCommand(c,true,""); return true; }; this.FormatBlock=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(b.getLocalizedString(c),b.get_contentWindow(),a.value,b)); }; this.InsertOrderedList=this.InsertUnorderedList=function(c,b,a){b.setFocus(); b.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(b.getLocalizedString(c),b.get_contentWindow(),b.get_newLineBr(),c,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(e,d,a){d.setActive(); var b="SelectAll"!=e; if(e=="Unlink"&&!d.isIE){var c=d.getSelectedElement(); if(c&&c.tagName=="A"){d.selectElement(c,false); }}d.executeBrowserCommand(e,b,null,null); return true; }; this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(d,c,b){var a=b.value; c.executeBrowserCommand(d,true,a); }; this.Zoom=function(f,b,d){var a=d.value; var e=d.get_tool?d.get_tool():null; if(a&&e&&e.updateValue){e.updateValue(a); }b.get_contentArea().style.zoom=a; if(($telerik.isFirefox||$telerik.isOpera)&&a.indexOf("%")!=-1){a=parseInt(a,10)/100; }if($telerik.isFirefox){b.get_contentArea().style.MozTransform=a==1?"":"translate("+(b.get_contentArea().offsetWidth*((a-1)/2))+"px, "+(b.get_contentArea().offsetHeight*((a-1)/2))+"px) scale("+a+")"; }if($telerik.isOpera){var c=a==1?"":"translate("+(b.get_contentArea().offsetWidth*((a-1)/2.04))+"px, "+(b.get_contentArea().offsetHeight*((a-1)))+"px) scale("+a+")"; b.get_contentArea().style.OTransform=c; }return false; }; this.Print=function(c,b,a){if(b.isIE){b.get_document().execCommand(c,false,null); }else{if(b.get_contentWindow().print){b.get_contentWindow().print(); }}return false; }; this.InsertSnippet=function(c,b,a){b.pasteHtml(a.value,c); }; this.InsertFormElement=function(h,b,g){var a=g.value; a=a.toLowerCase(); var c=null; switch(a){case"form":c=b.createElement("form","150px","150px"); c.innerHTML=" "; break; case"textarea":c=b.createElement("textarea"); break; case"select":c=b.createElement("select","100px","22px"); break; case"checkbox":case"radio":c=b.createElement("input"); c.setAttribute("type",a); break; case"button":case"reset":case"submit":c=b.createElement("input","50px","22px"); c.setAttribute("type",a); break; case"hidden":case"password":case"text":c=b.createElement("input","100px","22px"); c.setAttribute("type",a); break; }if(c){var f=Telerik.Web.UI.Editor.Utils.getUniqueID(); c.setAttribute("id",f); var e=Telerik.Web.UI.Editor.Utils.getOuterHtml(c); b.pasteHtml(e,h); var d=b.get_document().getElementById(f); if(d){d.removeAttribute("id"); if(d.setActive){d.setActive(); }return false; }}}; this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(f,b,d){var a=""; switch(f){case"InsertSymbol":a=d.value; break; case"InsertHorizontalRule":a="
    "; break; case"InsertDate":var e=new Date(); a=" "+e.toLocaleDateString(); break; case"InsertTime":var c=new Date(); a=" "+c.toLocaleTimeString(); break; default:a="
    TitleContent...
    "; }b.pasteHtml(a,f); }; this.ImageManager=function(h,a,f){var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(k,j){var i=j.get_value(); a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(i),h); }); var c=a.get_dialogOpener().get_additionalQueryString(); var d=a.getSelectedElement(); if(d&&d.tagName=="IMG"){var g=d.getAttribute("src",2); a.get_dialogOpener().set_additionalQueryString(c+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(g)); }else{d=null; }var e=new Telerik.Web.UI.EditorCommandEventArgs(h,null,d); Telerik.Web.UI.Editor.CommandList._getDialogArguments(e,"IMG",a,h); a.showDialog("ImageManager",e,b); a.get_dialogOpener().set_additionalQueryString(c); return false; }; this.SilverlightManager=this.FlashManager=this.MediaManager=function(h,a,f){var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(j,i){var k=i.get_value(); if(!k){k=i.Result; }k=a.applyFiltersForEmbedContent(k); a.pasteHtml(k,h); }); var e={}; var d=a.get_dialogOpener().get_additionalQueryString(); var b=a.getSelectedElement(); if(b){if($telerik.isIE&&b.object){var g="MediaManager"==h?b.object.FileName:b.object.Movie; if(g){a.get_dialogOpener().set_additionalQueryString(d+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(g)); e.selectedItemUrl=g; e.selectedObject=b; }}}a.showDialog(h,e,c); a.get_dialogOpener().set_additionalQueryString(d); return false; }; this.TemplateManager=function(d,c,b){var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(b,function(f,e){var g=e.get_value(); if(!g){g=e.Result; }c.pasteHtml(g,d); }); c.showDialog("TemplateManager",{},a); return false; }; this.AboutDialog=function(c,b,a){b.showDialog("AboutDialog"); return false; }; this.Help=function(c,b,a){b.showDialog("Help"); return false; }; this.PageProperties=function(e,d,c){var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){}); var a={}; Telerik.Web.UI.Editor.CommandList._getDialogArguments(a,"BODY",d,e); d.showDialog("PageProperties",a,b); return false; }; this.ImageMapDialog=function(e,d,c){var a=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(d); var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){Telerik.Web.UI.Editor.CommandList._setImageMapProperties(d,g); return false; }); d.showDialog("ImageMapDialog",a,b); return false; }; this._setImageMapProperties=function(a,d){if(!d){return; }var i=a.getSelectedElement(); var h; if(i&&i.tagName=="IMG"){h=i; if(d.ImageSrc!=h.src){h.src=d.ImageSrc; }}else{if(!d.ImageSrc){return; }a.pasteHtml(''); h=a.get_document().getElementById("__tmp__"); h.removeAttribute("id"); if(document.all){var c=a.get_document().body.createTextRange(); c.collapse(); c.moveToElementText(h); c.select(); }}var j=document.createElement("span"); j.innerHTML=d.MapHtml; var n=j.getElementsByTagName("map"); if(n.length==0){return; }var k=n[0].innerHTML; j=null; if(!k){var f=h.getAttribute("useMap",2); if(f){var e=Telerik.Web.UI.Editor.CommandList._getImageMapByName(a,f); if(e){e.parentNode.removeChild(e); }}h.removeAttribute("useMap"); return; }var m=null; var g=h.getAttribute("useMap",2); if(g){m=Telerik.Web.UI.Editor.CommandList._getImageMapByName(a,g); }if(m==null){var b=new Date()-100; var l="rade_img_map_"+b; m=a.get_document().createElement("map"); m.id=l; this._setNameAttribute(m,l); m=a.get_contentArea().appendChild(m); h.setAttribute("useMap","#"+l); h.setAttribute("border","0"); }m.innerHTML=k; }; this._setNameAttribute=function(a,b){a.removeAttribute("name"); a.removeAttribute("NAME"); a.name=null; a.name=b; a.NAME=b; }; this._getImageMapDialogArgument=function(b){var f={}; f.editor=b; var d=b.getSelectedElement(); if(d&&d.tagName=="IMG"){f.ImageSrc=d.getAttribute("src",2); f.ImageWidth=(d.style.width)?d.style.width:d.width; f.ImageHeight=(d.style.height)?d.style.height:d.height; if($telerik.isIE){var e=b.get_document().body.createTextRange(); e.collapse(); e.moveToElementText(d); e.select(); }if(d.useMap){var a=d.getAttribute("useMap",2); var c=Telerik.Web.UI.Editor.CommandList._getImageMapByName(b,a); if(c!=null){f.ImageMapHTML=''+c.innerHTML+""; }else{f.ImageMapHTML=""; }d.style.width=f.ImageWidth; d.style.height=f.ImageHeight; }}return f; }; this._getImageMapByName=function(b,a){a=a.substr(1); var e=b.get_document(); var d=e.getElementById(a); if(d!=null){return d; }var f=e.getElementsByTagName("map"); for(var c=0; c1; if(!c||f){alert(a.getLocalizedString("cellwarning")); return false; }Telerik.Web.UI.Editor.CommandList._getDialogArguments(c,"TABLE",a,g); var d=Telerik.Web.UI.Editor.CommandList._getParentTable(a); var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(j,i){a.selectElement(d); var h=""; if(i.styleSheetToImport){h=Telerik.Web.UI.Editor.CommandList.get_ImportStyleSheetHTML(g,a,i.styleSheetToImport); }a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(i.tableToModify)+h,g); if(i.styleSheetToRemove){Telerik.Web.UI.Editor.CommandList._removeStyleSheet(a,i.styleSheetToRemove); }}); a.showDialog("TableWizard",c,b); return false; }; this.FindAndReplace=function(e,d,c){var a={}; a.editor=d; var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){}); d.showDialog("FindAndReplace",a,b); return false; }; this.StyleBuilder=function(j,a,i){var b=null; var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(i,function(m,p){var l=Telerik.Web.UI.Editor.Utils.getOuterHtml(p.get_value()); if(b){var n=""; var k=new RegExp("style=(\"|')(.+?)\\1","gi"); l.replace(k,function(s,r,q){n=q; }); if(n){var o=new Telerik.Web.UI.Editor.AttributeCommand(j+"set Style Attribute",a.get_contentWindow(),b,"style",n); a.executeCommand(o); }}else{a.pasteHtml(l,j); }}); var h=a.getSelection(); var e=h.getParentElement(); if(!$telerik.isIE||!h.isControl()){var g=h.getText(); if(g||e.tagName=="BODY"){var f=a.createElement("span"); Telerik.Web.UI.Editor.Utils.setElementInnerHtml(f,g); e=f; }else{b=e; a.selectElement(e,false); }}var d=new Telerik.Web.UI.EditorCommandEventArgs("StyleBuilder",null,e.cloneNode(true)); Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"*",a,j); d.fontNames=a.get_fontNames(); a.showDialog("StyleBuilder",d,c); return false; }; this.XhtmlValidator=function(e,d,c){var a=d; var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){}); d.showDialog("XhtmlValidator",a,b); return false; }; this.TrackChangesDialog=function(e,d,c){var a=d; var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){}); d.showDialog("TrackChangesDialog",a,b); }; this.InsertCustomLink=function(g,a,d){var c=d.value; var e=String.format("{0}",c.innerHTML,c.href,c.target,c.title); var f=Telerik.Web.UI.Editor.CommandList._getParentLink(a); if(f){var b=f.cloneNode(true); if(c.href){b.setAttribute("href",c.href); }if(c.target){b.setAttribute("target",c.target); }if(c.title){b.setAttribute("title",c.title); }if(!b.innerHTML){b.innerHTML=c.innerHTML; }e=Telerik.Web.UI.Editor.Utils.getOuterHtml(b); }a.pasteHtml(e,g); }; this._getDialogArguments=function(c,b,a,d){if(!a){c.Colors=[]; c.CssClasses=[]; c.CellCssClasses=[]; c.tableLayoutCssFile=""; c.editor=null; return; }c.Colors=a.get_colors(); if("TD"==b||"TH"==b||"TABLE"==b){c.CssClasses=a.getCssArray("TABLE"); c.CellCssClasses=a.getCssArray("TD"); c.tableLayoutCssFile=a.get_tableLayoutCssFile(); }else{if("A"==b||"BODY"==b||"IMG"==b){c.CssClasses=a.getCssArray(b); }}c.editor=a; }; this.DocumentManager=this.SetLinkProperties=this.LinkManager=function(f,b,e){var a=f=="DocumentManager"?"DocumentManager":"LinkManager"; var d=Telerik.Web.UI.Editor.CommandList._getLinkArgument(b); Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"A",b,f); var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value(); if(!g){g=h.Result; }if(!g){g=h.realLink; }b.pasteHyperLink(g,f); }); b.showDialog(a,d,c); return false; }; this.InsertLink=function(f,b,e){var a="InsertLink"; var d=Telerik.Web.UI.Editor.CommandList._getLinkArgument(b); d._name=d._commandName="InsertLink"; Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"A",b,f); var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value(); b.pasteHyperLink(g,f); }); b.showDialog(a,d,c); return false; }; this.SetImageProperties=function(f,a,e){var c=a.getSelectedElement(); if(c.nodeName.toLowerCase()!="img"){c=null; }var d=new Telerik.Web.UI.EditorCommandEventArgs("SetImageProperties",null,c); Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"IMG",a,f); d.Element=c; var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value?h.get_value():h.Result; if(!g){return; }if(c&&c.parentNode){c.parentNode.replaceChild(g,c); }else{a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(g),f); }}); a.showDialog("ImageProperties",d,b); return false; }; this.InsertImage=function(f,a,e){var c=a.getSelectedElement(); if(c.nodeName.toLowerCase()!="img"){c=null; }var d=new Telerik.Web.UI.EditorCommandEventArgs("InsertImage",null,c); Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"IMG",a,f); var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value?h.get_value():h.Result; if(!g){return; }if(c&&c.parentNode){c.parentNode.replaceChild(g,c); }else{a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(g),f); }}); a.showDialog("InsertImage",d,b); return false; }; this.FormatCodeBlock=function(f,b,e){var d=new Telerik.Web.UI.EditorCommandEventArgs("FormatCodeBlock",null,b.getSelectionHtml()); d.dirtyCode=b.getSelectionHtml(); if(b.get_document().selection&&b.get_document().selection){var a=b.get_document().selection.type.toLowerCase(); if(a=="control"||a=="none"){d.set_value(""); }}var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(g,h){b.pasteHtml(h.get_value?h.get_value():h.get_code(),f); }); b.showDialog("FormatCodeBlock",d,c); return false; }; this._getDocumentAnchors=function(a){var b=a.getElementsByTagName("A"); var c=new Array(); for(var d=0; d 

    "){f.innerHTML=" "; e=false; }}var d=new Telerik.Web.UI.EditorCommandEventArgs("LinkManager",null,f.cloneNode(true)); d.selectedTabIndex=b?b:0; d.showText=!e; d.documentAnchors=Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(a.get_document()); d.realLink=d.get_value(); return d; }; this._getParentTable=function(c){c.setFocus(); var b=c.getSelectedElement(); var a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TABLE"); return a; }; this._getParentCell=function(c){c.setFocus(); var b=c.getSelectedElement(); var a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TD"); if(!a){a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TH"); }return a; }; this._getTableArgument=function(b,c,f,a){var g; var d=null; if(f){g=Telerik.Web.UI.Editor.Utils.createTable(2,2,b._document); }else{g=Telerik.Web.UI.Editor.CommandList._getParentTable(b); }if(!f&&!g){return null; }if(a){d=Telerik.Web.UI.Editor.CommandList._getParentCell(b); }var h=g.cloneNode(true); var e=g; return{selectedTabIndex:c?c:0,cellToModify:d,tableToModify:h,originalTable:e,tableDocument:(h.document)?h.document:b.get_document()}; }; this.EnterParagraphMozilla=function(m,b,d){var c=b.getSelectedElement(); if(c.tagName=="A"||"LI"==c.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(c,"LI")!=null){b.bubbleKeyEventToBrowser(); return false; }function g(p){if(!p){return null; }var n=p; var o=n.tagName; while(o!="TD"&&o!="BODY"){o=n.tagName; if(!o){o=""; }if(o=="P"||(o.charAt(0)=="H"&&!isNaN(parseInt(o.charAt(1))))||o=="ADDRESS"||o=="PRE"){return n; }n=n.parentNode; if(!n){return null; }}}var j=g(c); if(j&&j.tagName!="P"){b.bubbleKeyEventToBrowser(); return false; }if(!j){b.get_document().execCommand("InsertParagraph",null,false); j=g(b.getSelectedElement()); }var f=new Telerik.Web.UI.Editor.GenericCommand("Enter",b.get_contentWindow()); var h=b.getSelection().getRange(); h.deleteContents(); var a=h.startOffset; var i=h.startContainer; var e=h.cloneRange(); e.setStart(j,0); e.setEnd(i,a); var k=e.extractContents(); var l=j.cloneNode(false); l.appendChild(k); j.parentNode.insertBefore(l,j); if(!Telerik.Web.UI.Editor.Utils.getTextContent(l)){l.innerHTML=" "; }b.executeCommand(f); return false; }; this.Enter=function(i,a,g){var f=a.getSelectedElement(); if("LI"==f.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(f,"LI")!=null){a.bubbleKeyEventToBrowser(); return false; }try{var c=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",a.get_contentWindow()); var h=a.get_document().selection.createRange(); if(h.pasteHTML){var e=f.tagName; if(e.charAt(0)=="H"&&parseInt(e.charAt(1))>0){var b=h.duplicate(); b.moveToElementText(f); a.bubbleKeyEventToBrowser(); return false; }else{if(e.toLowerCase()=="textarea"){a.bubbleKeyEventToBrowser(); return false; }}h.pasteHTML("
    "); h.select(); h.moveEnd("character",1); h.moveStart("character",1); h.collapse(false); }else{if(h(0)){h.execCommand("Delete"); }}a.executeCommand(c); }catch(d){alert(d.message); }return false; }; this.ShiftEnter=function(f,a,d){var c=a.getSelectedElement(); if("LI"==c.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(c,"LI")!=null){var b=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",a.get_contentWindow()); var e=a.get_document().selection.createRange(); e.pasteHTML("
    "); e.select(); e.moveEnd("character",1); e.moveStart("character",1); e.collapse(false); a.executeCommand(b); return false; }a.bubbleKeyEventToBrowser(); return false; }; this.EnterSafari=function(d,c,b){var a=c.getSelectedElement(); if("LI"==a.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(a,"LI")!=null){c.bubbleKeyEventToBrowser(); return false; }c.executeBrowserCommand("InsertLineBreak",true,""); return false; }; this.ToggleTableBorder=function(c,b,a){b.toggleEnhancedEdit(); return false; }; this.ConvertToUpper=this.ConvertToLower=function(q,g,f){var o; var j; if($telerik.isIE){if(g._document.selection.type.toLowerCase()=="control"){return; }var e=g._document.selection.createRange(); o=e.duplicate(); j=e.duplicate(); o.collapse(); j.collapse(false); }var c=Telerik.Web.UI.Editor.CommandList._markEditorSelection(g); var n=c.markedElements; var p=c.newElements; var a=new Telerik.Web.UI.Editor.GenericCommand(g.getLocalizedString(q),g.get_contentWindow()); for(var k=0; k0){for(var g=0; g0){for(var c=0; c 
    "); var c=a.get_document().getElementById("radERealFont"); c.removeAttribute("id"); if($telerik.isIE){a.selectElement(c); a.getSelection().collapse(); c.innerHTML=""; }else{if(i.getSelection){var h=i.getSelection(); var b=a.getSelection().getRange(); h.removeAllRanges(); c.innerHTML=""; if(b&&b.selectNodeContents){b.selectNodeContents(c); }h.addRange(b); }}},this._markEditorSelection=function(c){if(c.get_html()==""){return{markedElements:[],newElements:[],oldElements:[]}; }var a="AZBY"; var b="_cm"; var v=[]; var p=[]; var e=[]; var h=[]; var g=$telerik.isSafari2||$telerik.isSafari3; var m=g?"span":"font"; var d=c.get_contentArea(); if(g){var n=new Telerik.Web.UI.Editor.OptimizeSpans(); n.getHtmlContent(d); }var t=c.getSelection(); if(t.isControl()){var s=t.getParentElement(); var r=c._document.createElement(m); r.appendChild(s.cloneNode(true)); s.parentNode.replaceChild(r,s); return{markedElements:[r],newElements:[r]}; }q(); if(!$telerik.isIE){d.ownerDocument.execCommand("UseCSS",false,true); d.ownerDocument.execCommand("styleWithCSS",false,false); }d.ownerDocument.execCommand("FontName",false,a); var u=d.getElementsByTagName(m); for(var o=0; othis._commands.length){b=this._commands.length; }var c=0; var a=null; while(0this._commands.length){b=this._commands.length; }var c=0; var a=null; var d=this._currentCommandIndex+1; while(0=a){this._currentCommandIndex--; }},isUndoAvailable:function(){return(-1]*)/>","ig"),""); b=b.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?]*)>","ig"),""); return b; }}; 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(a){var e=new RegExp("","ig"); var b=new RegExp("RADEDITORSAVEDTAGENDING","ig"); var d=new RegExp("RADEDITORSAVEDTAGBEGINNING","ig"); var c=a.replace(e,"<$1>"); c=c.replace(b,"-->"); c=c.replace(d,""); if(f>q){f=n.substring(o,n.length).indexOf(""); if((f==-1&&q>-1)||(q","ig"); var e=new RegExp(""; return p; }; var d=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig"); var b=a.replace(d,c); return b; }}; 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 brakes inside some tags like p, h1, etc."; }; Telerik.Web.UI.Editor.RemoveExtraBrakes.prototype={getHtmlContent:function(a){return this._performStripping(a); },_performStripping:function(a){var b=a; if($telerik.isFirefox||$telerik.isOpera){b=b.replace(/\s*