(function(s){var at=s.telerik;at.scripts.push("telerik.editor.js");function G(a5){var a4={};for(var a3=0;a38){g=function(a4){if(a4.nodeType==1&&a4.firstChild){var a3=a4.firstChild,a5=a3;while(a5=a5.nextSibling){if(a5.nodeType==3&&a3.nodeType==3){a5.nodeValue=a3.nodeValue+a5.nodeValue;D.remove(a3)}a3=a5}}}}function p(a3){var a4=0;while(a3=a3.previousSibling){a4++}return a4}function af(a3){return a3&&a3.nodeValue!==null&&a3.data!==null}function k(a3,a4){try{return !af(a3)&&(s.contains(a3,af(a4)?a4.parentNode:a4)||a4.parentNode==a3)}catch(a5){return false}}function z(a4,a3){return k(a4,a3)||a4==a3}function aC(a4,a3){if(k(a4,a3)){while(a3&&a3.parentNode!=a4){a3=a3.parentNode}}return a3}function aH(a3){return af(a3)?a3.length:a3.childNodes.length}function aw(a3,a5){var a4=a3.cloneNode(false);a3.deleteData(a5,a3.length);a4.deleteData(0,a5);D.insertAfter(a4,a3)}function B(a4,a5){for(var a6 in a5){var a3=a4[a6];if(a6=="float"){a3=a4[s.support.cssFloat?"cssFloat":"styleFloat"]}if(typeof a3=="object"){if(!B(a3,a5[a6])){return false}}else{if(a3!=a5[a6]){return false}}}return true}var aE=/^\s+$/;var e=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;var ah=("color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height").split(",");var D={blockParentOrBody:function(a3){return D.parentOfType(a3,H)||a3.ownerDocument.body},normalize:g,toHex:function(a3){var a4=e.exec(a3);if(!a4){return a3}return"#"+s.map(a4.slice(1),function(a5){return a5=parseInt(a5).toString(16),a5.length>1?a5:"0"+a5}).join("")},encode:function(a3){return a3.replace(/&/g,"&").replace(//g,">").replace(/\u00a0/g," ")},name:function(a3){return a3.nodeName.toLowerCase()},significantChildNodes:function(a3){return s.grep(a3.childNodes,function(a4){return a4.nodeType!=3||!D.isWhitespace(a4)})},lastTextNode:function(a4){if(a4.nodeType==3){return a4}var a3=null;for(var a5=a4.lastChild;a5;a5=a5.previousSibling){if(a3=D.lastTextNode(a5)){return a3}}return a3},is:function(a3,a4){return D.name(a3)==a4},isMarker:function(a3){return a3.className=="t-marker"},isWhitespace:function(a3){return aE.test(a3.nodeValue)},isBlock:function(a3){return N[D.name(a3)]},isEmpty:function(a3){return aN[D.name(a3)]},isInline:function(a3){return aW[D.name(a3)]},scrollTo:function(a3){a3.ownerDocument.body.scrollTop=s(af(a3)?a3.parentNode:a3).offset().top},insertAt:function(a4,a3,a5){a4.insertBefore(a3,a4.childNodes[a5]||null)},insertBefore:function(a3,a4){if(a4.parentNode){return a4.parentNode.insertBefore(a3,a4)}else{return a4}},insertAfter:function(a3,a4){return a4.parentNode.insertBefore(a3,a4.nextSibling)},remove:function(a3){a3.parentNode.removeChild(a3)},trim:function(a4){for(var a3=a4.childNodes.length-1;a3>=0;a3--){var a5=a4.childNodes[a3];if(af(a5)){if(a5.nodeValue.replace(/\ufeff/g,"").length==0){D.remove(a5)}if(D.isWhitespace(a5)){D.insertBefore(a5,a4)}}else{if(a5.className!="t-marker"){D.trim(a5);if(a5.childNodes.length==0&&!D.isEmpty(a5)){D.remove(a5)}}}}return a4},parentOfType:function(a3,a4){do{a3=a3.parentNode}while(a3&&!(D.ofType(a3,a4)));return a3},ofType:function(a3,a4){return s.inArray(D.name(a3),a4)>=0},changeTag:function(a7,a4){var a6=D.create(a7.ownerDocument,a4);var ba=a7.attributes;for(var a5=0;a5]*>/i,x=/

<\/p>/i;function C(a5){var a8=[];var a7={"telerik:script":{start:function(a9){a8.push("")},end:function(){a8.push("")}},b:{start:function(){a8.push("")},end:function(){a8.push("")}},i:{start:function(){a8.push("")},end:function(){a8.push("")}},u:{start:function(){a8.push('')},end:function(){a8.push("")}},font:{start:function(bb){a8.push('')},end:function(a9){a8.push("")}}};function a4(ba){var bh=[],bp=ba.attributes,bm=s.trim;if(D.is(ba,"img")){var bs=ba.style.width,bi=ba.style.height,bg=s(ba);if(bs){bg.attr("width",parseInt(bs));D.unstyle(ba,{width:undefined})}if(bi){bg.attr("height",parseInt(bi));D.unstyle(ba,{height:undefined})}}for(var bf=0,bk=bp.length;bfbu.nodeName?1:bt.nodeName=0){a9=D.toHex(a9)}if(bb.indexOf("font-family")>=0){a9=a9.replace(K,"'")}a8.push(bb);a8.push(":");a8.push(a9);a8.push(";")}}}else{if(br=="src"||br=="href"){a8.push(ba.getAttribute(br,2))}else{a8.push(M[br]?br:bl)}}a8.push('"')}}function a3(a9,ba){for(var bb=a9.firstChild;bb;bb=bb.nextSibling){a6(bb,ba)}}function a6(bc,bd){var bg=bc.nodeType;if(bg==1){if(bc.attributes._moz_dirty&&D.is(bc,"br")){return}var ba=D.name(bc);var be=a7[ba];if(be){be.start(bc);a3(bc);be.end(bc);return}a8.push("<");a8.push(ba);a4(bc);if(aN[ba]){a8.push(" />")}else{a8.push(">");a3(bc,bd||D.is(bc,"pre"));a8.push("")}}else{if(bg==3){var a9=bc.nodeValue;if(!bd&&s.support.leadingWhitespace){var bf=bc.parentNode;var bb=(D.isInline(bf)?bf:bc).previousSibling;if(!bb||bb.innerHTML==""||D.isBlock(bb)){a9=a9.replace(/^[\r\n\v\f\t ]+/,"")}a9=a9.replace(/ +/," ")}a8.push(D.encode(a9))}else{if(bg==4){a8.push("")}else{if(bg==8){if(bc.data.indexOf("[CDATA[")<0){a8.push("")}else{a8.push("")}}}}}}a3(a5);a8=a8.join("");if(a8.replace(am,"").replace(x,"")==""){return""}return a8}var v=0,ar=1,a=2,T=3;function q(a4){var a3=a4.startContainer;return a3.nodeType==9?a3:a3.ownerDocument}function E(a3){if(s.browser.msie){return new ax(a3.document)}return a3.getSelection()}function al(a4){var a3=q(a4);return a1(a3)}function a1(a3){return E(aA(a3))}function aA(a3){return a3.defaultView||a3.parentWindow}function an(a3,a4,a6){function a5(a9){var a7=a3.cloneRange();a7.collapse(a9);a7[a9?"setStartBefore":"setEndAfter"](a4);var a8=a7.extractContents();if(a6){a8=D.trim(a8)}D[a9?"insertBefore":"insertAfter"](a8,a4)}a5(true);a5(false)}function O(a4){var a5=U.image(a4);if(a5){a4.setStartAfter(a5);a4.setEndAfter(a5)}var a3=al(a4);a3.removeAllRanges();a3.addRange(a4)}function L(a3){s.extend(this,{ownerDocument:a3,startContainer:a3,endContainer:a3,commonAncestorContainer:a3,startOffset:0,endOffset:0,collapsed:true})}L.prototype={setStart:function(a3,a4){this.startContainer=a3;this.startOffset=a4;w(this);u(this,true)},setEnd:function(a3,a4){this.endContainer=a3;this.endOffset=a4;w(this);u(this,false)},setStartBefore:function(a3){this.setStart(a3.parentNode,p(a3))},setStartAfter:function(a3){this.setStart(a3.parentNode,p(a3)+1)},setEndBefore:function(a3){this.setEnd(a3.parentNode,p(a3))},setEndAfter:function(a3){this.setEnd(a3.parentNode,p(a3)+1)},selectNode:function(a3){this.setStartBefore(a3);this.setEndAfter(a3)},selectNodeContents:function(a3){this.setStart(a3,0);this.setEnd(a3,a3[a3.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(a3){if(a3){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},deleteContents:function(){var a4=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(aC(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function a3(a5){while(a5.next()){a5.hasPartialSubtree()?a3(a5.getSubtreeIterator()):a5.remove()}})(new l(a4))},cloneContents:function(){var a3=q(this);return(function a4(a7){for(var a6,a5=a3.createDocumentFragment();a6=a7.next();){a6=a6.cloneNode(!a7.hasPartialSubtree());if(a7.hasPartialSubtree()){a6.appendChild(a4(a7.getSubtreeIterator()))}a5.appendChild(a6)}return a5})(new l(this))},extractContents:function(){var a4=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(aC(this.commonAncestorContainer,this.startContainer))}this.collapse(true);var a5=this;var a3=q(this);return(function a6(a9){for(var a8,a7=a3.createDocumentFragment();a8=a9.next();){a9.hasPartialSubtree()?a8=a8.cloneNode(false):a9.remove(a5.originalRange);if(a9.hasPartialSubtree()){a8.appendChild(a6(a9.getSubtreeIterator()))}a7.appendChild(a8)}return a7})(new l(a4))},insertNode:function(a3){if(af(this.startContainer)){if(this.startOffset!=this.startContainer.nodeValue.length){aw(this.startContainer,this.startOffset)}D.insertAfter(a3,this.startContainer)}else{D.insertAt(this.startContainer,a3,this.startOffset)}this.setStart(this.startContainer,this.startOffset)},cloneRange:function(){return s.extend(new L(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var a4=this.startContainer.nodeName,a3=this.endContainer.nodeName;return[a4=="#text"?this.startContainer.nodeValue:a4,"(",this.startOffset,") : ",a3=="#text"?this.endContainer.nodeValue:a3,"(",this.endOffset,")"].join("")}};function m(a5,a3,ba,a7){if(a5==a3){return a7-ba}var a9=a3;while(a9&&a9.parentNode!=a5){a9=a9.parentNode}if(a9){return p(a9)-ba}a9=a5;while(a9&&a9.parentNode!=a3){a9=a9.parentNode}if(a9){return a7-p(a9)-1}var a8=D.commonAncestor(a5,a3);var a6=a5;while(a6&&a6.parentNode!=a8){a6=a6.parentNode}if(!a6){a6=a8}var a4=a3;while(a4&&a4.parentNode!=a8){a4=a4.parentNode}if(!a4){a4=a8}if(a6==a4){return 0}return p(a4)-p(a6)}function u(a4,a5){function a3(a7){try{return m(a7.startContainer,a7.endContainer,a7.startOffset,a7.endOffset)<0}catch(a6){return true}}if(a3(a4)){if(a5){a4.commonAncestorContainer=a4.endContainer=a4.startContainer;a4.endOffset=a4.startOffset}else{a4.commonAncestorContainer=a4.startContainer=a4.endContainer;a4.startOffset=a4.endOffset}a4.collapsed=true}}function w(a4){a4.collapsed=a4.startContainer==a4.endContainer&&a4.startOffset==a4.endOffset;var a3=a4.startContainer;while(a3&&a3!=a4.endContainer&&!k(a3,a4.endContainer)){a3=a3.parentNode}a4.commonAncestorContainer=a3}function aR(a3){if(s.browser.msie){return new L(a3)}return a3.createRange()}function l(a4){s.extend(this,{range:a4,_current:null,_next:null,_end:null});if(a4.collapsed){return}var a3=a4.commonAncestorContainer;this._next=a4.startContainer==a3&&!af(a4.startContainer)?a4.startContainer.childNodes[a4.startOffset]:aC(a3,a4.startContainer);this._end=a4.endContainer==a3&&!af(a4.endContainer)?a4.endContainer.childNodes[a4.endOffset]:aC(a3,a4.endContainer).nextSibling}l.prototype={hasNext:function(){return !!this._next},next:function(){var a3=this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;if(af(this._current)){if(this.range.endContainer==this._current){(a3=a3.cloneNode(true)).deleteData(this.range.endOffset,a3.length-this.range.endOffset)}if(this.range.startContainer==this._current){(a3=a3.cloneNode(true)).deleteData(0,this.range.startOffset)}}return a3},traverse:function(a4){function a3(){this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;return this._current}var a5;while(a5=a3.call(this)){if(this.hasPartialSubtree()){this.getSubtreeIterator().traverse(a4)}else{a4(a5)}}return a5},remove:function(a8){var a7=this.range.startContainer==this._current;var a5=this.range.endContainer==this._current;if(af(this._current)&&(a7||a5)){var a4=a7?this.range.startOffset:0;var a3=a5?this.range.endOffset:this._current.length;var ba=a3-a4;if(a8&&(a7||a5)){if(this._current==a8.startContainer&&a4<=a8.startOffset){a8.startOffset-=ba}if(this._current==a8.endContainer&&a3<=a8.endOffset){a8.endOffset-=ba}}this._current.deleteData(a4,ba)}else{var a9=this._current.parentNode;if(a8&&(this.range.startContainer==a9||this.range.endContainer==a9)){var a6=p(this._current);if(a9==a8.startContainer&&a6<=a8.startOffset){a8.startOffset-=1}if(a9==a8.endContainer&&a60&&a6.previousSibling);a9.setEndPoint(a3?"EndToStart":"EndToEnd",a8);var a7=a6.nextSibling;if(!a7){a7=a6.previousSibling;if(a7&&af(a7)){a4.setEnd(a7,a7.nodeValue.length);D.remove(a6)}else{a4.selectNodeContents(a5);D.remove(a6);a4.endOffset-=1}return}D.remove(a6);if(af(a7)){a4[a3?"setStart":"setEnd"](a7,a9.text.length)}else{a4[a3?"setStartBefore":"setEndBefore"](a7)}}function aj(a3){this.enumerate=function(){var a5=[];function a4(a6){if(D.is(a6,"img")||(a6.nodeType==3&&!D.isWhitespace(a6))){a5.push(a6)}else{a6=a6.firstChild;while(a6){a4(a6);a6=a6.nextSibling}}}new l(a3).traverse(a4);return a5}}function j(a3){return new aj(a3).enumerate()}function Z(a7){var a3=[];for(var a4=0,a6=a7.length;a4'}a5.selectNodeContents(a9)}}a5.collapse(true)};this.add=function(a4,a6){if(a6&&a4.collapsed){this.addCaret(a4);a4=U.expand(a4)}var a5=a4.cloneRange();a5.collapse(false);this.end=D.create(q(a4),"span",{className:"t-marker"});a5.insertNode(this.end);a5=a4.cloneRange();a5.collapse(true);this.start=this.end.cloneNode(true);a5.insertNode(this.start);a4.setStartBefore(this.start);a4.setEndAfter(this.end);g(a4.commonAncestorContainer);return a4};this.remove=function(bb){var a4=this.start,bg=this.end;g(bb.commonAncestorContainer);while(!a4.nextSibling&&a4.parentNode){a4=a4.parentNode}while(!bg.previousSibling&&bg.parentNode){bg=bg.parentNode}var a6=(a4.previousSibling&&a4.previousSibling.nodeType==3)&&(a4.nextSibling&&a4.nextSibling.nodeType==3);var bc=(bg.previousSibling&&bg.previousSibling.nodeType==3)&&(bg.nextSibling&&bg.nextSibling.nodeType==3);a4=a4.nextSibling;bg=bg.previousSibling;var bf=false;var a9=false;if(a4==this.end){a9=!!this.start.previousSibling;a4=bg=this.start.previousSibling||this.end.nextSibling;bf=true}D.remove(this.start);D.remove(this.end);if(a4==null||bg==null){bb.selectNodeContents(bb.commonAncestorContainer);bb.collapse(true);return}var be=bf?af(a4)?a4.nodeValue.length:a4.childNodes.length:0;var a7=af(bg)?bg.nodeValue.length:bg.childNodes.length;if(a4.nodeType==3){while(a4.previousSibling&&a4.previousSibling.nodeType==3){a4=a4.previousSibling;be+=a4.nodeValue.length}}if(bg.nodeType==3){while(bg.previousSibling&&bg.previousSibling.nodeType==3){bg=bg.previousSibling;a7+=bg.nodeValue.length}}var ba=p(a4),bd=a4.parentNode;var a8=p(bg),a5=bg.parentNode;for(var bi=a4;bi.previousSibling;bi=bi.previousSibling){if(bi.nodeType==3&&bi.previousSibling.nodeType==3){ba--}}for(var bh=bg;bh.previousSibling;bh=bh.previousSibling){if(bh.nodeType==3&&bh.previousSibling.nodeType==3){a8--}}g(bd);if(a4.nodeType==3){a4=bd.childNodes[ba]}g(a5);if(bg.nodeType==3){bg=a5.childNodes[a8]}if(bf){if(a4.nodeType==3){bb.setStart(a4,be)}else{bb[a9?"setStartAfter":"setStartBefore"](a4)}bb.collapse(true)}else{if(a4.nodeType==3){bb.setStart(a4,be)}else{bb.setStartBefore(a4)}if(bg.nodeType==3){bb.setEnd(bg,a7)}else{bb.setEndAfter(bg)}}if(a3){this.removeCaret(bb)}}}var au=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;var U={nodes:function(a4){var a3=j(a4);if(!a3.length){a4.selectNodeContents(a4.commonAncestorContainer);a3=j(a4);if(!a3.length){a3=D.significantChildNodes(a4.commonAncestorContainer)}}return a3},image:function(a4){var a3=[];new l(a4).traverse(function(a5){if(D.is(a5,"img")){a3.push(a5)}});if(a3.length==1){return a3[0]}},expand:function(a4){var a5=a4.cloneRange();var a8=a5.startContainer.childNodes[a5.startOffset==0?0:a5.startOffset-1];var a9=a5.endContainer.childNodes[a5.endOffset];if(!af(a8)||!af(a9)){return a5}var a6=a8.nodeValue;var a7=a9.nodeValue;if(a6==""||a7==""){return a5}var a3=a6.split("").reverse().join("").search(au);var ba=a7.search(au);if(a3==0||ba==0){return a5}ba=ba==-1?a7.length:ba;a3=a3==-1?0:a6.length-a3;a5.setStart(a8,a3);a5.setEnd(a9,ba);return a5},isExpandable:function(a4){var a9=a4.startContainer;var a8=q(a4);if(a9==a8||a9==a8.body){return false}var a5=a4.cloneRange();var a3=a9.nodeValue;if(!a3){return false}var a6=a3.substring(0,a5.startOffset);var a7=a3.substring(a5.startOffset);var ba=0,bb=0;if(a6!=""){ba=a6.split("").reverse().join("").search(au)}if(a7!=""){bb=a7.search(au)}return ba!=0&&bb!=0}};function c(a4){var a5=new ao(a4.range);var a3=new ac();this.formatter=a4.formatter;this.getRange=function(){return a5.toRange()};this.lockRange=function(a6){return a3.add(this.getRange(),a6)};this.releaseRange=function(a6){a3.remove(a6);O(a6)};this.undo=function(){a5.body.innerHTML=a5.html;O(a5.toRange())};this.redo=function(){this.exec()};this.exec=function(){var a6=this.lockRange(true);this.formatter.editor=this.editor;this.formatter.toggle(a6);this.releaseRange(a6)}}function aY(a5,a4){var a3=a5.body;this.redo=function(){a3.innerHTML=a4.html;O(a4.toRange())};this.undo=function(){a3.innerHTML=a5.html;O(a5.toRange())}}function t(a3){c.call(this,a3);this.managesUndoRedo=true;this.exec=function(){var a5=this.editor;var a4=a5.getRange();var a6=new ao(a4);a5.clipboard.paste(a3.value||"");a5.undoRedoStack.push(new aY(a6,new ao(a5.getRange())));a5.focus()}}function aT(){X.call(this);this.command=function(a3){return new t(a3)};this.update=function(a3,a4){a3.data("tSelectBox").close()};this.init=function(a5,a3){var a4=a3.editor;a5.tSelectBox({data:a4.insertHtml,onItemCreate:function(a6){a6.html=''+a6.dataItem.Text+""},onChange:function(a6){X.exec(a4,"insertHtml",a6.value)},highlightFirst:false}).find(".t-input").html(a4.localization.insertHtml)}}function R(){var a4=[],a3=-1;this.push=function(a5){a4=a4.slice(0,a3+1);a3=a4.push(a5)-1};this.undo=function(){if(this.canUndo()){a4[a3--].undo()}};this.redo=function(){if(this.canRedo()){a4[++a3].redo()}};this.canUndo=function(){return a3>=0};this.canRedo=function(){return a3!=a4.length-1}}function aS(a3){this.keydown=function(a7){var a6=a3.keyboard;var a4=a6.isTypingKey(a7);if(a4&&!a6.typingInProgress()){var a5=a3.getRange();this.startRestorePoint=new ao(a5);a6.startTyping(s.proxy(function(){a3.selectionRestorePoint=this.endRestorePoint=new ao(a3.getRange());a3.undoRedoStack.push(new aY(this.startRestorePoint,this.endRestorePoint))},this));return true}return false};this.keyup=function(a4){var a5=a3.keyboard;if(a5.typingInProgress()){a5.endTyping();return true}return false}}function A(a4){var a3=false;this.createUndoCommand=function(){this.endRestorePoint=new ao(a4.getRange());a4.undoRedoStack.push(new aY(this.startRestorePoint,this.endRestorePoint));this.startRestorePoint=this.endRestorePoint};this.changed=function(){if(this.startRestorePoint){return this.startRestorePoint.html!=a4.body.innerHTML}return false};this.keydown=function(a5){var a6=a4.keyboard;if(a6.isModifierKey(a5)){if(a6.typingInProgress()){a6.endTyping(true)}this.startRestorePoint=new ao(a4.getRange());return true}if(a6.isSystem(a5)){a3=true;if(this.changed()){a3=false;this.createUndoCommand()}return true}return false};this.keyup=function(a5){if(a3&&this.changed()){a3=false;this.createUndoCommand(a5);return true}return false}}function aI(a4){var a6=false;var a9;var a5;function a3(ba){return(ba>=48&&ba<=90)||(ba>=96&&ba<=111)||(ba>=186&&ba<=192)||(ba>=219&&ba<=222)}this.toolFromShortcut=function(bc,be){var bb=String.fromCharCode(be.keyCode);for(var bd in bc){var ba=bc[bd];if((ba.key==bb||ba.key==be.keyCode)&&!!ba.ctrl==be.ctrlKey&&!!ba.alt==be.altKey&&!!ba.shift==be.shiftKey){return bd}}};this.isTypingKey=function(bb){var ba=bb.keyCode;return(a3(ba)&&!bb.ctrlKey&&!bb.altKey)||ba==32||ba==13||ba==8||(ba==46&&!bb.shiftKey&&!bb.ctrlKey&&!bb.altKey)};this.isModifierKey=function(bb){var ba=bb.keyCode;return(ba==17&&!bb.shiftKey&&!bb.altKey)||(ba==16&&!bb.ctrlKey&&!bb.altKey)||(ba==18&&!bb.ctrlKey&&!bb.shiftKey)};this.isSystem=function(ba){return ba.keyCode==46&&ba.ctrlKey&&!ba.altKey&&!ba.shiftKey};this.startTyping=function(ba){a5=ba;a6=true};function a7(){a6=false;a5()}this.endTyping=function(ba){this.clearTimeout();if(ba){a7()}else{a9=window.setTimeout(a7,1000)}};this.typingInProgress=function(){return a6};this.clearTimeout=function(){window.clearTimeout(a9)};function a8(bc,bb){for(var ba=0;ba$/g,"li>");bc=bc.replace(/"))}bb.insertNode(bi);bg=a5(a9,bh);if(bf){while(bh.parentNode!=bg){D.unwrap(bh.parentNode)}D.unwrap(bh.parentNode)}g(bb.commonAncestorContainer);bh.style.display="inline";D.scrollTo(bh);be.removeCaret(bb);O(bb)}}function f(){var a3=[//g,"",/mso-[^;"]*;?/ig,"",/<\/?(meta|link|style|o:|v:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:)[^>]*>)?/ig,""];this.applicable=function(a6){return/class="?Mso|style="[^"]*mso-/i.test(a6)};function a4(a6){if(/^[\u2022\u00b7\u00a7\u00d8o\-]\u00a0+/.test(a6)){return"ul"}if(/^\s*\w+[\.\)]\u00a0{2,}/.test(a6)){return"ol"}}function a5(bj){var bb=D.create(document,"div",{innerHTML:bj});var bi=s(H.join(","),bb);var bd=-1,a8,bh={ul:{},ol:{}},a6=bb;for(var be=0;be]*>/g,"").replace(/ /g,"\u00a0");var bc=a4(bj);if(!bc||D.name(a9)!="p"){if(a9.innerHTML==""){D.remove(a9)}else{bh={ul:{},ol:{}};a6=bb;bd=-1}continue}var bf=parseFloat(a9.style.marginLeft||0);var bg=bh[bc][bf];if(bf>bd||!bg){bg=D.create(document,bc);if(a6==bb){D.insertBefore(bg,a9)}else{a6.appendChild(bg)}bh[bc][bf]=bg}if(a8!=bc){for(var ba in bh){for(var a7 in bh[ba]){if(s.contains(bg,bh[ba][a7])){delete bh[ba][a7]}}}}D.remove(a9.firstChild);a6=D.create(document,"li",{innerHTML:a9.innerHTML});bg.appendChild(a6);D.remove(a9);bd=bf;a8=bc}return bb.innerHTML}this.clean=function(a7){for(var a6=0,a8=a3.length;a6]*"?/ig,"");return a7}}function i(a3){function a4(a7){var a5=0;for(var a6=a7.parentNode.firstChild;a6;a6=a6.nextSibling){if(a6!=a7&&a6.className!="t-marker"&&a6.nodeType==1){a5++}}return a5}this.findSuitable=function(a6,a5){if(!a5&&a4(a6)>0){return null}return D.parentOfType(a6,a3[0].tags)};this.findFormat=function(a9){for(var a5=0;a50){this.activate(a9,a8)}};this.apply=function(bb){var ba=[];for(var a8=0,a9=bb.length;a80){for(var a8=0,bb=bc.length;a81){var a8=ba.pop();var a9=ba[ba.length-1];if(a8.previousSibling&&a8.previousSibling.className=="t-marker"){a9.appendChild(a8.previousSibling)}if(a8.previousSibling==a9&&a8.style.cssText==a9.style.cssText){while(a8.firstChild){a9.appendChild(a8.firstChild)}D.remove(a8)}}}}function a2(a4,a3){i.call(this,a4);function a5(a9){var bk=a9.attributes,bh=s.trim;if(!bk){return}for(var a8=0,bf=bk.length;a8=0?D.toHex(a7):a7}}}}return}function a6(bb){var bc=s(af(bb)?bb.parentNode:bb);var ba=bc.parents().andSelf();for(var a8=0,a9=ba.length;a8'+bb.dataItem.Text+""}}}function a0(a5){X.call(this,a5);var a4=[{tags:["span"]}],a3=new a2(a4,a5.cssAttr);this.update=function(a6){a6.data("tColorPicker").close()};this.command=function(a6){return new aK(s.extend(a6,{formatter:function(){var a7={};a7[a5.domAttr]=a6.value;return new F(a4,{style:a7},a5.cssAttr)}}))};this.willDelayExecution=ad;this.init=function(a8,a6){var a7=a6.editor;a8.tColorPicker({selectedColor:"#000000",onChange:function(a9){X.exec(a7,a5.name,a9.value)}})}}function ab(){X.call(this);var a4=[{tags:["span"]}],a3=new a2(a4,"className");this.command=function(a5){return new aK(s.extend(a5,{formatter:function(){return new F(a4,{className:a5.value})}}))};this.update=function(a5,a7){var a6=a5.data("tSelectBox");a6.close();a6.value(a3.getFormat(a7))};this.init=function(a7,a5){var a6=a5.editor;a7.tSelectBox({data:a6.style,title:a6.localization.style,onItemCreate:function(a8){var a9=D.inlineStyle(a6.document,"span",{className:a8.dataItem.Value});a8.html=''+a8.html+""},onChange:function(a8){X.exec(a6,"style",a8.value)}})}}function y(a4){function a3(a7,a8){for(var a5=0;a5'+a8.dataItem.Text+""},onChange:function(a7){X.exec(a5,"formatBlock",a7.value)},highlightFirst:false})}}function aU(a3){c.call(this,a3);this.exec=function(){var a6=this.getRange(),bg=q(a6),a9,be=s.browser.msie?"":'
';var a8="p,h1,h2,h3,h4,h5,h6".split(","),bh=D.parentOfType(a6.startContainer,a8),a4=D.parentOfType(a6.endContainer,a8),a5=(bh&&!a4)||(!bh&&a4);a6.deleteContents();var bf=D.create(bg,"a");a6.insertNode(bf);g(bf.parentNode);var a7=D.parentOfType(bf,["li"]),bi=D.parentOfType(bf,"h1,h2,h3,h4,h5,h6".split(","));if(a7){var bb=a6.cloneRange();bb.selectNode(a7);if(j(bb).length==0){var bj=D.create(bg,"p");if(a7.nextSibling){an(bb,a7.parentNode)}D.insertAfter(bj,a7.parentNode);D.remove(a7.parentNode.childNodes.length==1?a7.parentNode:a7);bj.innerHTML=be;a9=bj}}else{if(bi&&!bf.nextSibling){var bj=D.create(bg,"p");D.insertAfter(bj,bi);bj.innerHTML=be;D.remove(bf);a9=bj}}if(!a9){if(!(a7||bi)){new W([{tags:["p"]}]).apply([bf])}a6.selectNode(bf);var ba=D.parentOfType(bf,[a7?"li":bi?D.name(bi):"p"]);an(a6,ba,a5);var bc=ba.previousSibling;if(D.is(bc,"li")&&bc.firstChild&&!D.is(bc.firstChild,"br")){bc=bc.firstChild}a9=ba.nextSibling;if(D.is(a9,"li")&&a9.firstChild&&!D.is(a9.firstChild,"br")){a9=a9.firstChild}D.remove(ba);function bd(bk){if(bk.firstChild&&D.is(bk.firstChild,"br")){D.remove(bk.firstChild)}if(af(bk)&&bk.nodeValue==""){bk=bk.parentNode}if(bk&&!D.is(bk,"img")&&bk.innerHTML==""){bk.innerHTML=be}}bd(bc);bd(a9);g(bc)}g(a9);if(!D.is(a9,"img")){a6.selectNodeContents(a9)}else{a6.setStartBefore(a9)}a6.collapse(true);D.scrollTo(a9);O(a6)}}function d(a3){c.call(this,a3);this.exec=function(){var a5=this.getRange();a5.deleteContents();var a4=D.create(q(a5),"br");a5.insertNode(a4);g(a4.parentNode);if(!s.browser.msie&&(!a4.nextSibling||D.isWhitespace(a4.nextSibling))){var a6=a4.cloneNode(true);a6.setAttribute("_moz_dirty","");D.insertAfter(a6,a4)}a5.setStartAfter(a4);a5.collapse(true);O(a5)}}function aq(a4){var a3=[a4=="ul"?"ol":"ul",a4];y.call(this,[{tags:a3}]);this.isFormatted=function(a8){var a5=[],a6;for(var a7=0;a71){D.insertAfter(a6[a6.length-1],a7);D.insertAfter(a6[1],a7);D[a5.length>0?"insertBefore":"insertAfter"](a6[0],a7)}}else{var a8=new b([{tags:["a"]}],a9);a8.finder=this.finder;a8.apply(a5)}}}function ap(a3){a3.formatter={toggle:function(a4){new b([{tags:["a"]}]).remove(j(a4))}};c.call(this,a3)}function aa(a4){c.call(this,a4);var a3;this.async=true;var a5=new aZ();this.exec=function(){var ba=this.getRange();var a8=ba.collapsed;ba=this.lockRange(true);var bd=j(ba);var bc=null;var a7=this;function be(bk){var bj=s("#t-editor-link-url",bb.element).val();if(bj&&bj!="http://"){a3={href:bj};var bg=s("#t-editor-link-title",bb.element).val();if(bg){a3.title=bg}var bh=s("#t-editor-link-text",bb.element).val();if(bh!==bc){a3.innerHTML=bh}var bi=s("#t-editor-link-target",bb.element).is(":checked");if(bi){a3.target="_blank"}a5.apply(ba,a3)}a9(bk);if(a7.change){a7.change()}}function a9(bg){bg.preventDefault();bb.destroy();aA(q(ba)).focus();a7.releaseRange(ba)}var bf=bd.length?a5.finder.findSuitable(bd[0]):null;var a6=bd.length<=1||(bd.length==2&&a8);var bb=at.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert link",html:new s.telerik.stringBuilder().cat('

').cat("
    ").cat('
  1. ').catIf('
  2. ',a6).cat('
  3. ').cat('
  4. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").cat("
").string(),onClose:a9})).hide().find(".t-dialog-insert").click(be).end().find(".t-dialog-close").click(a9).end().find(".t-form-text-row input").keydown(function(bg){if(bg.keyCode==13){be(bg)}else{if(bg.keyCode==27){a9(bg)}}}).end().find("#t-editor-link-url").val(bf?bf.getAttribute("href",2):"http://").end().find("#t-editor-link-text").val(bd.length>0?(bd.length==1?bd[0].nodeValue:bd[0].nodeValue+bd[1].nodeValue):"").end().find("#t-editor-link-title").val(bf?bf.title:"").end().find("#t-editor-link-target").attr("checked",bf?bf.target=="_blank":false).end().show().data("tWindow").center();if(a6&&bd.length>0){bc=s("#t-editor-link-text",bb.element).val()}s("#t-editor-link-url",bb.element).focus().select()},this.redo=function(){var a6=this.lockRange(true);a5.apply(a6,a3);this.releaseRange(a6)}}function aV(a4){X.call(this,s.extend(a4,{command:ap}));var a3=new i([{tags:["a"]}]);this.init=function(a5){a5.attr("unselectable","on").addClass("t-state-disabled")};this.update=function(a5,a6){a5.toggleClass("t-state-disabled",!a3.isFormatted(a6)).removeClass("t-state-hover")}}function aP(a4){c.call(this,a4);this.async=true;var a3;function a5(a6,a7){if(a3.src&&a3.src!="http://"){if(!a6){a6=D.create(q(a7),"img",a3);a6.onload=a6.onerror=function(){a6.removeAttribute("complete");a6.removeAttribute("width");a6.removeAttribute("height")};a7.deleteContents();a7.insertNode(a6);a7.setStartAfter(a6);a7.setEndAfter(a6);O(a7);return true}else{D.attr(a6,a3)}}return false}this.redo=function(){var a6=this.lockRange();if(!a5(U.image(a6),a6)){this.releaseRange(a6)}};this.exec=function(){var a9=this.lockRange();var a6=false;var bc=U.image(a9);var a7=this;function bd(bg){a3={src:s("#t-editor-image-url",ba.element).val(),alt:s("#t-editor-image-title",ba.element).val()};a6=a5(bc,a9);a8(bg);if(a7.change){a7.change()}}function a8(bg){bg.preventDefault();ba.destroy();aA(q(a9)).focus();if(!a6){a7.releaseRange(a9)}}var bb=this.editor.fileBrowser;var be=bb&&bb.selectUrl!==undefined;function bf(){if(be){new at.imageBrowser(s(this).find(".t-image-browser"),s.extend(bb,{apply:bd,element:a7.editor.element,localization:a7.editor.localization}))}}var ba=at.window.create(s.extend({width:750},this.editor.dialogOptions,{title:"Insert image",html:new s.telerik.stringBuilder().cat('
').catIf('
',be).cat("
    ").cat('
  1. ').cat('
  2. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").cat("
").string(),onClose:a8,onActivate:bf})).hide().find(".t-dialog-insert").click(bd).end().find(".t-dialog-close").click(a8).end().find(".t-form-text-row input").keydown(function(bg){if(bg.keyCode==13){bd(bg)}else{if(bg.keyCode==27){a8(bg)}}}).end().toggleClass("t-imagebrowser",be).find("#t-editor-image-url").val(bc?bc.getAttribute("src",2):"http://").end().find("#t-editor-image-title").val(bc?bc.alt:"").end().show().data("tWindow").center();s("#t-editor-image-url",ba.element).focus().select()}}at.selectbox=function(a3,a4){var bb;var a5=s(a3);var a7=a5.find(".t-input");var a8=this.dropDown=new at.dropDown({effects:at.fx.slide.defaults(),onItemCreate:a4.onItemCreate,onClick:function(bc){ba(a4.data[s(bc.item).index()].Value);a4.onChange({value:bb})}});function a6(){if(!a8.$items){a8.dataBind(a4.data)}}function a9(bc){a7.html(bc?bc:" ")}function ba(be){a6();var bd=-1;for(var bc=0,bf=a4.data.length;bc0?"rtl":"");s(document.documentElement).bind("mousedown",s.proxy(function(be){var bc=a8.$element;var bd=bc&&bc.parent().length>0;if(bd&&!s.contains(a3,be.target)&&!s.contains(bc.parent()[0],be.target)){a8.close()}},this))};s.fn.tSelectBox=function(a3){return at.create(this,{name:"tSelectBox",init:function(a4,a5){return new at.selectbox(a4,a5)},options:a3})};s.fn.tSelectBox.defaults={effects:at.fx.slide.defaults()};at.colorpicker=function(a3,a4){this.element=a3;var a5=s(a3);s.extend(this,a4);a5.bind("click",s.proxy(this.click,this)).find("*").attr("unselectable","on");if(this.selectedColor){a5.find(".t-selected-color").css("background-color",this.selectedColor)}s(a3.ownerDocument.documentElement).bind("mousedown",s.proxy(function(a6){if(!s(a6.target).closest(".t-colorpicker-popup").length){this.close()}},this));at.bind(this,{change:this.onChange,load:this.onLoad})};at.colorpicker.prototype={select:function(a3){if(a3){a3=D.toHex(a3);if(!at.trigger(this.element,"change",{value:a3})){this.value(a3);this.close()}}else{at.trigger(this.element,"change",{value:this.selectedColor})}},open:function(){var a3=this.popup();var a6=s(this.element);var a5=a6.offset();a5.top+=a6.outerHeight();if(a6.closest(".t-rtl").length){a5.left-=a3.outerWidth()-a6.outerWidth()}var a4="auto";a6.parents().andSelf().each(function(){a4=s(this).css("zIndex");if(Number(a4)){a4=Number(a4)+1;return false}});at.fx._wrap(a3).css(s.extend({position:"absolute",zIndex:a4},a5));a3.find(".t-item").bind("click",s.proxy(function(a8){var a7=s(a8.target,a8.target.ownerDocument).css("background-color");this.select(a7)},this));at.fx.play(this.effects,a3,{direction:"bottom"})},close:function(){if(!this.$popup){return}at.fx.rewind(this.effects,this.$popup,{direction:"bottom"},s.proxy(function(){D.remove(this.$popup[0].parentNode);this.$popup=null},this))},toggle:function(){if(!this.$popup||!this.$popup.is(":visible")){this.open()}else{this.close()}},click:function(a3){if(s(a3.target).closest(".t-tool-icon").length>0){this.select()}else{this.toggle()}},value:function(a3){if(!a3){return this.selectedColor}a3=D.toHex(a3);this.selectedColor=a3;s(".t-selected-color",this.element).css("background-color",a3)},popup:function(){if(!this.$popup){this.$popup=s(at.colorpicker.buildPopup(this)).hide().appendTo(document.body).find("*").attr("unselectable","on").end()}return this.$popup}};s.extend(at.colorpicker,{buildPopup:function(a3){var a6=new at.stringBuilder();a6.cat('
').cat('
    ');var a8=a3.data;var a5=(a3.value()||"").substring(1);for(var a4=0,a7=a8.length;a4')}a6.cat("
");return a6.string()}});s.fn.tColorPicker=function(a3){return at.create(this,{name:"tColorPicker",init:function(a4,a5){return new at.colorpicker(a4,a5)},options:a3})};s.fn.tColorPicker.defaults={data:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),selectedColor:null,effects:at.fx.slide.defaults()};function aX(){var a4=new y([{tags:H}]);function a3(a5){return a5.style.marginLeft||0}this.apply=function(ba){var a8=a4.findSuitable(ba);if(a8.length){var a7=[];for(var a6=0;a6ul")[0];if(!bd){bd=D.create(bb.ownerDocument,D.name(be));a9.append(bd)}while(bb&&bb.parentNode==be){bd.appendChild(bb);bb=a7.shift()}}else{var a5=parseInt(a3(bb))+30;D.style(bb,{marginLeft:a5})}}}else{var bc=new W([{tags:H}],{style:{marginLeft:30}});bc.apply(ba)}};this.remove=function(a7){var a9=a4.findSuitable(a7);for(var a5=0;a51)||(D.ofType(a6[a5],["ul","ol"])&&a9>0)}if(a7){a4.removeClass("t-state-disabled");return}}a4.addClass("t-state-disabled").removeClass("t-state-hover")}}function aF(a3){this.editor=a3;this.formats=[]}aF.prototype={apply:function(a7){if(!this.hasPending()){return}var a6=new ac();a6.addCaret(a7);var a3=a7.startContainer.childNodes[a7.startOffset];var a9=a3.previousSibling;if(!a9.nodeValue){a9=a9.previousSibling}a7.setStart(a9,a9.nodeValue.length-1);a6.add(a7);if(j(a7).length==0){a6.remove(a7);a7.collapse(true);this.editor.selectRange(a7);return}var a5=a6.end.previousSibling.previousSibling;var bb,a8=this.formats;for(var a4=0;a40},isPending:function(a3){return !!this.getPending(a3)},getPending:function(a4){var a5=this.formats;for(var a3=0;a3",{src:'javascript:""',frameBorder:"0"}).css("display","").addClass("t-content").insertBefore(a3)[0];var a4=a7.contentWindow||a7;var a6=a4.document||a7.contentDocument;var a5=a3.val().replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1").replace(/[\r\n\v\f\t ]+/ig," ");if(!a5.length&&s.browser.mozilla){a5='
'}a6.designMode="On";a6.open();a6.write(new at.stringBuilder().cat("").cat('').cat('").cat(s.map(a8,function(a9){return[''].join("")}).join("")).cat('').cat(a5).cat("").string());a6.close();return a4}function V(a3){at.trigger(a3.element,"selectionChange")}function aJ(a4){var a3=true;a4.window=ay(s(a4.textarea),a4.stylesheets);a4.document=a4.window.contentDocument||a4.window.document;a4.body=a4.document.body;s(a4.document).bind({keydown:function(a7){var a5=a4.keyboard.toolFromShortcut(a4.tools,a7);if(a5){a7.preventDefault();a4.exec(a5);return false}if(a4.keyboard.isTypingKey(a7)&&a4.pendingFormats.hasPending()){if(a3){a3=false}else{var a6=a4.getRange();a4.pendingFormats.apply(a6);a4.selectRange(a6)}}a4.keyboard.clearTimeout();a4.keyboard.keydown(a7)},keyup:function(a7){var a6=[8,9,33,34,35,36,37,38,39,40,40,45,46];if(s.browser.mozilla&&a7.keyCode==8){aL(a4,a7)}if(s.inArray(a7.keyCode,a6)>-1||(a7.keyCode==65&&a7.ctrlKey&&!a7.altKey&&!a7.shiftKey)){a4.pendingFormats.clear();V(a4)}if(a4.keyboard.isTypingKey(a7)){if(a4.pendingFormats.hasPending()){var a5=a4.getRange();a4.pendingFormats.apply(a5);a4.selectRange(a5)}}else{a3=true}a4.keyboard.keyup(a7)},mousedown:function(a5){a4.pendingFormats.clear();var a6=s(a5.target);if(!s.browser.gecko&&a5.which==2&&a6.is("a[href]")){window.open(a6.attr("href"),"_new")}},mouseup:function(){V(a4)}});s(a4.window).bind("blur",function(){var a5=a4.textarea.value,a6=a4.encodedValue();a4.update(a6);if(a6!=a5){at.trigger(a4.element,"change")}});s(a4.body).bind("cut paste",function(a5){a4.clipboard["on"+a5.type](a5)})}at.editor=function(a3,a4){if(/Mobile.*Safari/.test(navigator.userAgent)){return}var a5=this;this.element=a3;var a6=s(a3);a6.closest("form").bind("submit",function(){a5.update()});s.extend(this,a4);at.bind(this,{load:this.onLoad,selectionChange:this.onSelectionChange,change:this.onChange,execute:this.onExecute,error:this.onError,paste:this.onPaste});for(var a9 in this.tools){this.tools[a9].name=a9.toLowerCase()}this.textarea=a6.find("textarea").attr("autocomplete","off")[0];aJ(this);this.keyboard=new aI([new aS(this),new A(this)]);this.clipboard=new aB(this);this.pendingFormats=new aF(this);this.undoRedoStack=new R();function bd(be){var bf=s.grep(be.className.split(" "),function(bg){return !/^t-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(bg)});return bf[0]?bf[0].substring(2):"custom"}function ba(bf,be){if(!be.key){return bf}return new at.stringBuilder().cat(bf).cat(" (").catIf("Ctrl + ",be.ctrl).catIf("Shift + ",be.shift).catIf("Alt + ",be.alt).cat(be.key).cat(")").string()}var a8=".t-editor-toolbar > li > *",a7=".t-editor-button .t-tool-icon",bb=a7+":not(.t-state-disabled)",bc=a7+".t-state-disabled";a6.delegate(bb,"mouseenter",at.hover).delegate(bb,"mouseleave",at.leave).delegate(a7,"mousedown",at.preventDefault).delegate(bb,"click",at.stopAll(function(be){a5.exec(bd(this))})).delegate(bc,"click",function(be){be.preventDefault()}).find(a8).each(function(){var bi=bd(this),bf=a5.tools[bi],bh=a5.localization[bi],bg=s(this);if(!bf){return}if(bi=="fontSize"||bi=="fontName"){var be=a5.localization[bi+"Inherit"]||aQ[bi+"Inherit"];a5[bi][0].Text=be;bg.find("input").val(be).end().find("span.t-input").text(be).end()}bf.init(bg,{title:ba(bh,bf),editor:a5})}).end().bind("selectionChange",function(){var bf=a5.getRange();a5.selectionRestorePoint=new ao(bf);var be=j(bf);if(!be.length){be=[bf.startContainer]}a6.find(a8).each(function(){var bg=a5.tools[bd(this)];if(bg){bg.update(s(this),be,a5.pendingFormats)}})});s(document).bind("DOMNodeInserted",function(be){if(s.contains(be.target,a5.element)||a5.element==be.target){s(a5.element).find("iframe").remove();aJ(a5)}}).bind("mousedown",function(be){try{if(a5.keyboard.typingInProgress()){a5.keyboard.endTyping(true)}if(!a5.selectionRestorePoint){a5.selectionRestorePoint=new ao(a5.getRange())}}catch(be){}})};function aL(a3,a6){var a4=a3.getRange(),a7=a4.startContainer;if(a7==a3.body.firstChild||!D.isBlock(a7)||(a7.childNodes.length>0&&!(a7.childNodes.length==1&&D.is(a7.firstChild,"br")))){return}var a9=a7.previousSibling;while(a9&&!D.isBlock(a9)){a9=a9.previousSibling}if(!a9){return}var a8=a3.document.createTreeWalker(a9,NodeFilter.SHOW_TEXT,null,false);var a5;while(a5=a8.nextNode()){a9=a5}a4.setStart(a9,af(a9)?a9.nodeValue.length:0);a4.collapse(true);O(a4);D.remove(a7);a6.preventDefault()}s.extend(at.editor,{BlockFormatFinder:y,BlockFormatter:W,Dom:D,FormatCommand:aK,GenericCommand:aY,GreedyBlockFormatter:av,GreedyInlineFormatFinder:a2,GreedyInlineFormatter:F,ImageCommand:aP,IndentCommand:o,IndentFormatter:aX,InlineFormatFinder:i,InlineFormatter:b,InsertHtmlCommand:t,Keyboard:aI,LinkCommand:aa,LinkFormatFinder:I,LinkFormatter:aZ,ListCommand:az,ListFormatFinder:aq,ListFormatter:J,MSWordFormatCleaner:f,Marker:ac,NewLineCommand:d,OutdentCommand:S,ParagraphCommand:aU,PendingFormats:aF,RangeEnumerator:aj,RangeUtils:U,RestorePoint:ao,SystemHandler:A,TypingHandler:aS,UndoRedoStack:R,UnlinkCommand:ap});at.editor.prototype={value:function(a5){var a3=this.body;if(a5===undefined){return C(a3)}this.pendingFormats.clear();a5=a5.replace(//g,"");a5=a5.replace(/]*)>(.*)?<\/script>/ig,"$2");if(s.browser.mozilla){a5=a5.replace(/]*)>(\s*)?<\/p>/ig,'


')}if(s.browser.msie&&parseInt(s.browser.version)<9){a5="
"+a5;var a6="originalsrc",a4="originalhref";a5=a5.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a4+'="$1"');a5=a5.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a6+'="$1"');a3.innerHTML=a5;D.remove(a3.firstChild);s(a3).find("telerik\\:script,script,link,img,a").each(function(){var a7=this;if(a7[a4]){a7.setAttribute("href",a7[a4]);a7.removeAttribute(a4)}if(a7[a6]){a7.setAttribute("src",a7[a6]);a7.removeAttribute(a6)}})}else{a3.innerHTML=a5;if(s.browser.msie){g(a3)}}this.selectionRestorePoint=null;this.update()},focus:function(){this.window.focus()},update:function(a3){this.textarea.value=a3||this.encoded?this.encodedValue():this.value()},encodedValue:function(){return D.encode(this.value())},createRange:function(a3){return aR(a3||this.document)},getSelection:function(){return a1(this.document)},selectRange:function(a4){this.focus();var a3=this.getSelection();a3.removeAllRanges();a3.addRange(a4)},getRange:function(){var a4=this.getSelection();var a3=a4.rangeCount>0?a4.getRangeAt(0):this.createRange();if(a3.startContainer==this.document&&a3.endContainer==this.document&&a3.startOffset==0&&a3.endOffset==0){a3.setStart(this.body,0);a3.collapse(true)}return a3},selectedHtml:function(){return C(this.getRange().cloneContents())},paste:function(a3){this.clipboard.paste(a3)},exec:function(a6,a3){if(!this.keyboard.typingInProgress()){this.focus();if(this.selectionRestorePoint){this.selectRange(this.selectionRestorePoint.toRange());this.selectionRestorePoint=null}}a6=a6.toLowerCase();var a8="";for(var a5 in this.tools){if(a5.toLowerCase()==a6){a8=this.tools[a5];break}}if(a8){var a4=this.getRange();if(!/undo|redo/i.test(a6)&&a8.willDelayExecution(a4)){this.pendingFormats.toggle({name:a6,params:a3,command:a8.command});V(this);return}var a7=a8.command?a8.command(s.extend({range:a4},a3)):null;at.trigger(this.element,"execute",{name:a6,command:a7});if(/undo|redo/i.test(a6)){this.undoRedoStack[a6]()}else{if(a7){if(!a7.managesUndoRedo){this.undoRedoStack.push(a7)}a7.editor=this;a7.exec();if(a7.async){a7.change=s.proxy(function(){V(this)},this);return}}}V(this)}}};s.fn.tEditor=function(a3){return at.create(this,{name:"tEditor",init:function(a4,a5){return new at.editor(a4,a5)},options:a3})};var ak={bold:[{tags:["strong"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}],italic:[{tags:["em"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}],underline:[{tags:["span"],attr:{style:{textDecoration:"underline"}}}],strikethrough:[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}],justifyLeft:[{tags:H,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}],justifyCenter:[{tags:H,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}],justifyRight:[{tags:H,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}],justifyFull:[{tags:H,attr:{style:{textAlign:"justify"}}}]};function ae(a5,a4){for(var a3=0;a3=0){return a4[a3]}}}function X(a3){s.extend(this,a3);this.init=function(a4,a5){a4.attr({unselectable:"on",title:a5.title})};this.command=function(a4){return new a3.command(a4)};this.update=function(){};this.willDelayExecution=function(){return false}}X.exec=function(a4,a5,a3){a4.exec(a5,{value:a3})};function ai(a3){X.call(this,a3);this.command=function(a4){return new aK(s.extend(a4,{formatter:a3.formatter}))};this.update=function(a4,a8,a6){var a5=a6.isPending(this.name),a7=a3.finder.isFormatted(a8),a9=a5?!a7:a7;a4.toggleClass("t-state-active",a9)}}var Q=function(){return{isFormatted:function(){return false}}};var aQ={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",style:"Styles",emptyFolder:"Empty Folder",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found."};s.fn.tEditor.defaults={localization:aQ,formats:ak,encoded:true,stylesheets:[],dialogOptions:{modal:true,resizable:false,draggable:true,effects:{list:[{name:"toggle"}]}},fontName:[{Text:aQ.fontNameInherit,Value:"inherit"},{Text:"Arial",Value:"Arial,Helvetica,sans-serif"},{Text:"Courier New",Value:"'Courier New',Courier,monospace"},{Text:"Georgia",Value:"Georgia,serif"},{Text:"Impact",Value:"Impact,Charcoal,sans-serif"},{Text:"Lucida Console",Value:"'Lucida Console',Monaco,monospace"},{Text:"Tahoma",Value:"Tahoma,Geneva,sans-serif"},{Text:"Times New Roman",Value:"'Times New Roman',Times,serif"},{Text:"Trebuchet MS",Value:"'Trebuchet MS',Helvetica,sans-serif"},{Text:"Verdana",Value:"Verdana,Geneva,sans-serif"}],fontSize:[{Text:aQ.fontSizeInherit,Value:"inherit"},{Text:"1 (8pt)",Value:"xx-small"},{Text:"2 (10pt)",Value:"x-small"},{Text:"3 (12pt)",Value:"small"},{Text:"4 (14pt)",Value:"medium"},{Text:"5 (18pt)",Value:"large"},{Text:"6 (24pt)",Value:"x-large"},{Text:"7 (36pt)",Value:"xx-large"}],formatBlock:[{Text:"Paragraph",Value:"p"},{Text:"Quotation",Value:"blockquote"},{Text:"Heading 1",Value:"h1"},{Text:"Heading 2",Value:"h2"},{Text:"Heading 3",Value:"h3"},{Text:"Heading 4",Value:"h4"},{Text:"Heading 5",Value:"h5"},{Text:"Heading 6",Value:"h6"}],tools:{bold:new Y({key:"B",ctrl:true,format:ak.bold}),italic:new Y({key:"I",ctrl:true,format:ak.italic}),underline:new Y({key:"U",ctrl:true,format:ak.underline}),strikethrough:new Y({format:ak.strikethrough}),undo:{key:"Z",ctrl:true},redo:{key:"Y",ctrl:true},insertLineBreak:new X({key:13,shift:true,command:d}),insertParagraph:new X({key:13,command:aU}),justifyCenter:new P({format:ak.justifyCenter}),justifyLeft:new P({format:ak.justifyLeft}),justifyRight:new P({format:ak.justifyRight}),justifyFull:new P({format:ak.justifyFull}),insertUnorderedList:new aO({tag:"ul"}),insertOrderedList:new aO({tag:"ol"}),createLink:new X({key:"K",ctrl:true,command:aa}),unlink:new aV({key:"K",ctrl:true,shift:true}),insertImage:new X({command:aP}),indent:new X({command:o}),outdent:new ag(),insertHtml:new aT(),style:new ab(),fontName:new aD({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName"}),fontSize:new aD({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize"}),formatBlock:new n(),foreColor:new a0({cssAttr:"color",domAttr:"color",name:"foreColor"}),backColor:new a0({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor"})}}})(jQuery);