(function(s){var ar=s.telerik;function G(a2){var a1={};for(var a0=0;a08){g=function(a1){if(a1.nodeType==1&&a1.firstChild){var a0=a1.firstChild,a2=a0;while(a2=a2.nextSibling){if(a2.nodeType==3&&a0.nodeType==3){a2.nodeValue=a0.nodeValue+a2.nodeValue;D.remove(a0)}a0=a2}}}}function p(a0){var a1=0;while(a0=a0.previousSibling){a1++}return a1}function af(a0){return a0&&a0.nodeValue!==null&&a0.data!==null}function k(a0,a1){try{return !af(a0)&&(s.contains(a0,af(a1)?a1.parentNode:a1)||a1.parentNode==a0)}catch(a2){return false}}function z(a1,a0){return k(a1,a0)||a1==a0}function aB(a1,a0){if(k(a1,a0)){while(a0&&a0.parentNode!=a1){a0=a0.parentNode}}return a0}function aG(a0){return af(a0)?a0.length:a0.childNodes.length}function av(a0,a2){var a1=a0.cloneNode(false);a0.deleteData(a2,a0.length);a1.deleteData(0,a2);D.insertAfter(a1,a0)}function B(a1,a2){for(var a3 in a2){var a0=a1[a3];if(a3=="float"){a0=a1[s.support.cssFloat?"cssFloat":"styleFloat"]}if(typeof a0=="object"){if(!B(a0,a2[a3])){return false}}else{if(a0!=a2[a3]){return false}}}return true}var aD=/^\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(a0){return D.parentOfType(a0,H)||a0.ownerDocument.body},normalize:g,toHex:function(a0){var a1=e.exec(a0);if(!a1){return a0}return"#"+s.map(a1.slice(1),function(a2){return a2=parseInt(a2).toString(16),a2.length>1?a2:"0"+a2}).join("")},encode:function(a0){return a0.replace(/&/g,"&").replace(//g,">").replace(/\u00a0/g," ")},name:function(a0){return a0.nodeName.toLowerCase()},significantChildNodes:function(a0){return s.grep(a0.childNodes,function(a1){return a1.nodeType!=3||!D.isWhitespace(a1)})},lastTextNode:function(a1){if(a1.nodeType==3){return a1}var a0=null;for(var a2=a1.lastChild;a2;a2=a2.previousSibling){if(a0=D.lastTextNode(a2)){return a0}}return a0},is:function(a0,a1){return D.name(a0)==a1},isMarker:function(a0){return a0.className=="t-marker"},isWhitespace:function(a0){return aD.test(a0.nodeValue)},isBlock:function(a0){return N[D.name(a0)]},isEmpty:function(a0){return aL[D.name(a0)]},isInline:function(a0){return aT[D.name(a0)]},scrollTo:function(a0){a0.ownerDocument.body.scrollTop=s(af(a0)?a0.parentNode:a0).offset().top},insertAt:function(a1,a0,a2){a1.insertBefore(a0,a1.childNodes[a2]||null)},insertBefore:function(a0,a1){if(a1.parentNode){return a1.parentNode.insertBefore(a0,a1)}else{return a1}},insertAfter:function(a0,a1){return a1.parentNode.insertBefore(a0,a1.nextSibling)},remove:function(a0){a0.parentNode.removeChild(a0)},trim:function(a1){for(var a0=a1.childNodes.length-1;a0>=0;a0--){var a2=a1.childNodes[a0];if(af(a2)){if(a2.nodeValue.replace(/\ufeff/g,"").length==0){D.remove(a2)}if(D.isWhitespace(a2)){D.insertBefore(a2,a1)}}else{if(a2.className!="t-marker"){D.trim(a2);if(a2.childNodes.length==0&&!D.isEmpty(a2)){D.remove(a2)}}}}return a1},parentOfType:function(a0,a1){do{a0=a0.parentNode}while(a0&&!(D.ofType(a0,a1)));return a0},ofType:function(a0,a1){return s.inArray(D.name(a0),a1)>=0},changeTag:function(a4,a1){var a3=D.create(a4.ownerDocument,a1);var a7=a4.attributes;for(var a2=0;a2")},end:function(){a5.push("")}},b:{start:function(){a5.push("")},end:function(){a5.push("")}},i:{start:function(){a5.push("")},end:function(){a5.push("")}},u:{start:function(){a5.push('')},end:function(){a5.push("")}},font:{start:function(a8){a5.push('')},end:function(a6){a5.push("")}}};function a1(a7){var be=[],bm=a7.attributes,bj=s.trim;if(D.is(a7,"img")){var bp=a7.style.width,bf=a7.style.height,bd=s(a7);if(bp){bd.attr("width",parseInt(bp));D.unstyle(a7,{width:undefined})}if(bf){bd.attr("height",parseInt(bf));D.unstyle(a7,{height:undefined})}}for(var bc=0,bh=bm.length;bcbr.nodeName?1:bq.nodeName=0){a6=D.toHex(a6)}if(a8.indexOf("font-family")>=0){a6=a6.replace(K,"'")}a5.push(a8);a5.push(":");a5.push(a6);a5.push(";")}}}else{if(bo=="src"||bo=="href"){a5.push(a7.getAttribute(bo,2))}else{a5.push(M[bo]?bo:bi)}}a5.push('"')}}function a0(a6,a7){for(var a8=a6.firstChild;a8;a8=a8.nextSibling){a3(a8,a7)}}function a3(a9,ba){var bd=a9.nodeType;if(bd==1){if(a9.attributes._moz_dirty&&D.is(a9,"br")){return}var a7=D.name(a9);var bb=a4[a7];if(bb){bb.start(a9);a0(a9);bb.end(a9);return}a5.push("<");a5.push(a7);a1(a9);if(aL[a7]){a5.push(" />")}else{a5.push(">");a0(a9,ba||D.is(a9,"pre"));a5.push("")}}else{if(bd==3){var a6=a9.nodeValue;if(!ba&&s.support.leadingWhitespace){var bc=a9.parentNode;var a8=(D.isInline(bc)?bc:a9).previousSibling;if(!a8||a8.innerHTML==""||D.isBlock(a8)){a6=a6.replace(/^[\r\n\v\f\t ]+/,"")}a6=a6.replace(/ +/," ")}a5.push(D.encode(a6))}else{if(bd==4){a5.push("")}else{if(bd==8){if(a9.data.indexOf("[CDATA[")<0){a5.push("")}else{a5.push("")}}}}}}a0(a2);return a5.join("")}var v=0,aq=1,a=2,T=3;function q(a1){var a0=a1.startContainer;return a0.nodeType==9?a0:a0.ownerDocument}function E(a0){if(s.browser.msie){return new aw(a0.document)}return a0.getSelection()}function al(a1){var a0=q(a1);return aY(a0)}function aY(a0){return E(az(a0))}function az(a0){return a0.defaultView||a0.parentWindow}function am(a0,a1,a3){function a2(a6){var a4=a0.cloneRange();a4.collapse(a6);a4[a6?"setStartBefore":"setEndAfter"](a1);var a5=a4.extractContents();if(a3){a5=D.trim(a5)}D[a6?"insertBefore":"insertAfter"](a5,a1)}a2(true);a2(false)}function O(a1){var a2=U.image(a1);if(a2){a1.setStartAfter(a2);a1.setEndAfter(a2)}var a0=al(a1);a0.removeAllRanges();a0.addRange(a1)}function L(a0){s.extend(this,{ownerDocument:a0,startContainer:a0,endContainer:a0,commonAncestorContainer:a0,startOffset:0,endOffset:0,collapsed:true})}L.prototype={setStart:function(a0,a1){this.startContainer=a0;this.startOffset=a1;w(this);u(this,true)},setEnd:function(a0,a1){this.endContainer=a0;this.endOffset=a1;w(this);u(this,false)},setStartBefore:function(a0){this.setStart(a0.parentNode,p(a0))},setStartAfter:function(a0){this.setStart(a0.parentNode,p(a0)+1)},setEndBefore:function(a0){this.setEnd(a0.parentNode,p(a0))},setEndAfter:function(a0){this.setEnd(a0.parentNode,p(a0)+1)},selectNode:function(a0){this.setStartBefore(a0);this.setEndAfter(a0)},selectNodeContents:function(a0){this.setStart(a0,0);this.setEnd(a0,a0[a0.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(a0){if(a0){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},deleteContents:function(){var a1=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(aB(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function a0(a2){while(a2.next()){a2.hasPartialSubtree()?a0(a2.getSubtreeIterator()):a2.remove()}})(new l(a1))},cloneContents:function(){var a0=q(this);return(function a1(a4){for(var a3,a2=a0.createDocumentFragment();a3=a4.next();){a3=a3.cloneNode(!a4.hasPartialSubtree());if(a4.hasPartialSubtree()){a3.appendChild(a1(a4.getSubtreeIterator()))}a2.appendChild(a3)}return a2})(new l(this))},extractContents:function(){var a1=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(aB(this.commonAncestorContainer,this.startContainer))}this.collapse(true);var a2=this;var a0=q(this);return(function a3(a6){for(var a5,a4=a0.createDocumentFragment();a5=a6.next();){a6.hasPartialSubtree()?a5=a5.cloneNode(false):a6.remove(a2.originalRange);if(a6.hasPartialSubtree()){a5.appendChild(a3(a6.getSubtreeIterator()))}a4.appendChild(a5)}return a4})(new l(a1))},insertNode:function(a0){if(af(this.startContainer)){if(this.startOffset!=this.startContainer.nodeValue.length){av(this.startContainer,this.startOffset)}D.insertAfter(a0,this.startContainer)}else{D.insertAt(this.startContainer,a0,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 a1=this.startContainer.nodeName,a0=this.endContainer.nodeName;return[a1=="#text"?this.startContainer.nodeValue:a1,"(",this.startOffset,") : ",a0=="#text"?this.endContainer.nodeValue:a0,"(",this.endOffset,")"].join("")}};function m(a2,a0,a7,a4){if(a2==a0){return a4-a7}var a6=a0;while(a6&&a6.parentNode!=a2){a6=a6.parentNode}if(a6){return p(a6)-a7}a6=a2;while(a6&&a6.parentNode!=a0){a6=a6.parentNode}if(a6){return a4-p(a6)-1}var a5=D.commonAncestor(a2,a0);var a3=a2;while(a3&&a3.parentNode!=a5){a3=a3.parentNode}if(!a3){a3=a5}var a1=a0;while(a1&&a1.parentNode!=a5){a1=a1.parentNode}if(!a1){a1=a5}if(a3==a1){return 0}return p(a1)-p(a3)}function u(a1,a2){function a0(a4){try{return m(a4.startContainer,a4.endContainer,a4.startOffset,a4.endOffset)<0}catch(a3){return true}}if(a0(a1)){if(a2){a1.commonAncestorContainer=a1.endContainer=a1.startContainer;a1.endOffset=a1.startOffset}else{a1.commonAncestorContainer=a1.startContainer=a1.endContainer;a1.startOffset=a1.endOffset}a1.collapsed=true}}function w(a1){a1.collapsed=a1.startContainer==a1.endContainer&&a1.startOffset==a1.endOffset;var a0=a1.startContainer;while(a0&&a0!=a1.endContainer&&!k(a0,a1.endContainer)){a0=a0.parentNode}a1.commonAncestorContainer=a0}function aP(a0){if(s.browser.msie){return new L(a0)}return a0.createRange()}function l(a1){s.extend(this,{range:a1,_current:null,_next:null,_end:null});if(a1.collapsed){return}var a0=a1.commonAncestorContainer;this._next=a1.startContainer==a0&&!af(a1.startContainer)?a1.startContainer.childNodes[a1.startOffset]:aB(a0,a1.startContainer);this._end=a1.endContainer==a0&&!af(a1.endContainer)?a1.endContainer.childNodes[a1.endOffset]:aB(a0,a1.endContainer).nextSibling}l.prototype={hasNext:function(){return !!this._next},next:function(){var a0=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){(a0=a0.cloneNode(true)).deleteData(this.range.endOffset,a0.length-this.range.endOffset)}if(this.range.startContainer==this._current){(a0=a0.cloneNode(true)).deleteData(0,this.range.startOffset)}}return a0},traverse:function(a1){function a0(){this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;return this._current}var a2;while(a2=a0.call(this)){if(this.hasPartialSubtree()){this.getSubtreeIterator().traverse(a1)}else{a1(a2)}}return a2},remove:function(a5){var a4=this.range.startContainer==this._current;var a2=this.range.endContainer==this._current;if(af(this._current)&&(a4||a2)){var a1=a4?this.range.startOffset:0;var a0=a2?this.range.endOffset:this._current.length;var a7=a0-a1;if(a5&&(a4||a2)){if(this._current==a5.startContainer&&a1<=a5.startOffset){a5.startOffset-=a7}if(this._current==a5.endContainer&&a0<=a5.endOffset){a5.endOffset-=a7}}this._current.deleteData(a1,a7)}else{var a6=this._current.parentNode;if(a5&&(this.range.startContainer==a6||this.range.endContainer==a6)){var a3=p(this._current);if(a6==a5.startContainer&&a3<=a5.startOffset){a5.startOffset-=1}if(a6==a5.endContainer&&a30&&a3.previousSibling);a6.setEndPoint(a0?"EndToStart":"EndToEnd",a5);var a4=a3.nextSibling;if(!a4){a4=a3.previousSibling;if(a4&&af(a4)){a1.setEnd(a4,a4.nodeValue.length);D.remove(a3)}else{a1.selectNodeContents(a2);D.remove(a3);a1.endOffset-=1}return}D.remove(a3);if(af(a4)){a1[a0?"setStart":"setEnd"](a4,a6.text.length)}else{a1[a0?"setStartBefore":"setEndBefore"](a4)}}function aj(a0){this.enumerate=function(){var a2=[];function a1(a3){if(D.is(a3,"img")||(a3.nodeType==3&&!D.isWhitespace(a3))){a2.push(a3)}else{a3=a3.firstChild;while(a3){a1(a3);a3=a3.nextSibling}}}new l(a0).traverse(a1);return a2}}function j(a0){return new aj(a0).enumerate()}function Z(a4){var a0=[];for(var a1=0,a3=a4.length;a1'}a2.selectNodeContents(a6)}}a2.collapse(true)};this.add=function(a1,a3){if(a3&&a1.collapsed){this.addCaret(a1);a1=U.expand(a1)}var a2=a1.cloneRange();a2.collapse(false);this.end=D.create(q(a1),"span",{className:"t-marker"});a2.insertNode(this.end);a2=a1.cloneRange();a2.collapse(true);this.start=this.end.cloneNode(true);a2.insertNode(this.start);a1.setStartBefore(this.start);a1.setEndAfter(this.end);g(a1.commonAncestorContainer);return a1};this.remove=function(a8){var a1=this.start,bd=this.end;g(a8.commonAncestorContainer);while(!a1.nextSibling&&a1.parentNode){a1=a1.parentNode}while(!bd.previousSibling&&bd.parentNode){bd=bd.parentNode}var a3=(a1.previousSibling&&a1.previousSibling.nodeType==3)&&(a1.nextSibling&&a1.nextSibling.nodeType==3);var a9=(bd.previousSibling&&bd.previousSibling.nodeType==3)&&(bd.nextSibling&&bd.nextSibling.nodeType==3);a1=a1.nextSibling;bd=bd.previousSibling;var bc=false;var a6=false;if(a1==this.end){a6=!!this.start.previousSibling;a1=bd=this.start.previousSibling||this.end.nextSibling;bc=true}D.remove(this.start);D.remove(this.end);if(a1==null||bd==null){a8.selectNodeContents(a8.commonAncestorContainer);a8.collapse(true);return}var bb=bc?af(a1)?a1.nodeValue.length:a1.childNodes.length:0;var a4=af(bd)?bd.nodeValue.length:bd.childNodes.length;if(a1.nodeType==3){while(a1.previousSibling&&a1.previousSibling.nodeType==3){a1=a1.previousSibling;bb+=a1.nodeValue.length}}if(bd.nodeType==3){while(bd.previousSibling&&bd.previousSibling.nodeType==3){bd=bd.previousSibling;a4+=bd.nodeValue.length}}var a7=p(a1),ba=a1.parentNode;var a5=p(bd),a2=bd.parentNode;for(var bf=a1;bf.previousSibling;bf=bf.previousSibling){if(bf.nodeType==3&&bf.previousSibling.nodeType==3){a7--}}for(var be=bd;be.previousSibling;be=be.previousSibling){if(be.nodeType==3&&be.previousSibling.nodeType==3){a5--}}g(ba);if(a1.nodeType==3){a1=ba.childNodes[a7]}g(a2);if(bd.nodeType==3){bd=a2.childNodes[a5]}if(bc){if(a1.nodeType==3){a8.setStart(a1,bb)}else{a8[a6?"setStartAfter":"setStartBefore"](a1)}a8.collapse(true)}else{if(a1.nodeType==3){a8.setStart(a1,bb)}else{a8.setStartBefore(a1)}if(bd.nodeType==3){a8.setEnd(bd,a4)}else{a8.setEndAfter(bd)}}if(a0){this.removeCaret(a8)}}}var at=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;var U={nodes:function(a1){var a0=j(a1);if(!a0.length){a1.selectNodeContents(a1.commonAncestorContainer);a0=j(a1);if(!a0.length){a0=D.significantChildNodes(a1.commonAncestorContainer)}}return a0},image:function(a1){var a0=[];new l(a1).traverse(function(a2){if(D.is(a2,"img")){a0.push(a2)}});if(a0.length==1){return a0[0]}},expand:function(a1){var a2=a1.cloneRange();var a5=a2.startContainer.childNodes[a2.startOffset==0?0:a2.startOffset-1];var a6=a2.endContainer.childNodes[a2.endOffset];if(!af(a5)||!af(a6)){return a2}var a3=a5.nodeValue;var a4=a6.nodeValue;if(a3==""||a4==""){return a2}var a0=a3.split("").reverse().join("").search(at);var a7=a4.search(at);if(a0==0||a7==0){return a2}a7=a7==-1?a4.length:a7;a0=a0==-1?0:a3.length-a0;a2.setStart(a5,a0);a2.setEnd(a6,a7);return a2},isExpandable:function(a1){var a6=a1.startContainer;var a5=q(a1);if(a6==a5||a6==a5.body){return false}var a2=a1.cloneRange();var a0=a6.nodeValue;if(!a0){return false}var a3=a0.substring(0,a2.startOffset);var a4=a0.substring(a2.startOffset);var a7=0,a8=0;if(a3!=""){a7=a3.split("").reverse().join("").search(at)}if(a4!=""){a8=a4.search(at)}return a7!=0&&a8!=0}};function c(a1){var a2=new an(a1.range);var a0=new ac();this.formatter=a1.formatter;this.getRange=function(){return a2.toRange()};this.lockRange=function(a3){return a0.add(this.getRange(),a3)};this.releaseRange=function(a3){a0.remove(a3);O(a3)};this.undo=function(){a2.body.innerHTML=a2.html;O(a2.toRange())};this.redo=function(){this.exec()};this.exec=function(){var a3=this.lockRange(true);this.formatter.editor=this.editor;this.formatter.toggle(a3);this.releaseRange(a3)}}function aV(a2,a1){var a0=a2.body;this.redo=function(){a0.innerHTML=a1.html;O(a1.toRange())};this.undo=function(){a0.innerHTML=a2.html;O(a2.toRange())}}function t(a0){c.call(this,a0);this.managesUndoRedo=true;this.exec=function(){var a2=this.editor;var a1=a2.getRange();var a3=new an(a1);a2.clipboard.paste(a0.value||"");a2.undoRedoStack.push(new aV(a3,new an(a2.getRange())));a2.focus()}}function x(){X.call(this);this.command=function(a0){return new t(a0)};this.update=function(a0,a1){a0.data("tSelectBox").close()};this.init=function(a2,a0){var a1=a0.editor;a2.tSelectBox({data:a1.insertHtml,onItemCreate:function(a3){a3.html=''+a3.dataItem.Text+""},onChange:function(a3){X.exec(a1,"insertHtml",a3.value)},highlightFirst:false}).find(".t-input").html(a1.localization.insertHtml)}}function R(){var a1=[],a0=-1;this.push=function(a2){a1=a1.slice(0,a0+1);a0=a1.push(a2)-1};this.undo=function(){if(this.canUndo()){a1[a0--].undo()}};this.redo=function(){if(this.canRedo()){a1[++a0].redo()}};this.canUndo=function(){return a0>=0};this.canRedo=function(){return a0!=a1.length-1}}function aQ(a0){this.keydown=function(a4){var a3=a0.keyboard;var a1=a3.isTypingKey(a4);if(a1&&!a3.typingInProgress()){var a2=a0.getRange();this.startRestorePoint=new an(a2);a3.startTyping(s.proxy(function(){a0.selectionRestorePoint=this.endRestorePoint=new an(a0.getRange());a0.undoRedoStack.push(new aV(this.startRestorePoint,this.endRestorePoint))},this));return true}return false};this.keyup=function(a1){var a2=a0.keyboard;if(a2.typingInProgress()){a2.endTyping();return true}return false}}function A(a1){var a0=false;this.createUndoCommand=function(){this.endRestorePoint=new an(a1.getRange());a1.undoRedoStack.push(new aV(this.startRestorePoint,this.endRestorePoint));this.startRestorePoint=this.endRestorePoint};this.changed=function(){if(this.startRestorePoint){return this.startRestorePoint.html!=a1.body.innerHTML}return false};this.keydown=function(a2){var a3=a1.keyboard;if(a3.isModifierKey(a2)){if(a3.typingInProgress()){a3.endTyping(true)}this.startRestorePoint=new an(a1.getRange());return true}if(a3.isSystem(a2)){a0=true;if(this.changed()){a0=false;this.createUndoCommand()}return true}return false};this.keyup=function(a2){if(a0&&this.changed()){a0=false;this.createUndoCommand(a2);return true}return false}}function aH(a1){var a3=false;var a6;var a2;function a0(a7){return(a7>=48&&a7<=90)||(a7>=96&&a7<=111)||(a7>=186&&a7<=192)||(a7>=219&&a7<=222)}this.toolFromShortcut=function(a9,bb){var a8=String.fromCharCode(bb.keyCode);for(var ba in a9){var a7=a9[ba];if((a7.key==a8||a7.key==bb.keyCode)&&!!a7.ctrl==bb.ctrlKey&&!!a7.alt==bb.altKey&&!!a7.shift==bb.shiftKey){return ba}}};this.isTypingKey=function(a8){var a7=a8.keyCode;return(a0(a7)&&!a8.ctrlKey&&!a8.altKey)||a7==32||a7==13||a7==8||(a7==46&&!a8.shiftKey&&!a8.ctrlKey&&!a8.altKey)};this.isModifierKey=function(a8){var a7=a8.keyCode;return(a7==17&&!a8.shiftKey&&!a8.altKey)||(a7==16&&!a8.ctrlKey&&!a8.altKey)||(a7==18&&!a8.ctrlKey&&!a8.shiftKey)};this.isSystem=function(a7){return a7.keyCode==46&&a7.ctrlKey&&!a7.altKey&&!a7.shiftKey};this.startTyping=function(a7){a2=a7;a3=true};function a4(){a3=false;a2()}this.endTyping=function(a7){this.clearTimeout();if(a7){a4()}else{a6=window.setTimeout(a4,1000)}};this.typingInProgress=function(){return a3};this.clearTimeout=function(){window.clearTimeout(a6)};function a5(a9,a8){for(var a7=0;a7$/g,"li>");var a6=a0(a9);var a8=a4.getRange();a8.deleteContents();if(a8.startContainer==a4.document){a8.selectNodeContents(a4.body)}var ba=new ac();var bd=ba.addCaret(a8);var bc=a2(a6,bd);var bb=false;if(!/body|td/.test(D.name(bc))&&(a6||D.isInline(bc))){a8.selectNode(bd);am(a8,bc,true);bb=true}var be=a1(a9);a8.insertNode(be);bc=a2(a6,bd);if(bb){while(bd.parentNode!=bc){D.unwrap(bd.parentNode)}D.unwrap(bd.parentNode)}g(a8.commonAncestorContainer);bd.style.display="inline";D.scrollTo(bd);ba.removeCaret(a8);O(a8)}}function f(){var a0=[//g,"",/mso-[^;"]*;?/ig,"",/<\/?(meta|link|style|o:|v:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:)[^>]*>)?/ig,""];this.applicable=function(a3){return/class="?Mso|style="[^"]*mso-/i.test(a3)};function a1(a3){if(/^[\u2022\u00b7\u00a7\u00d8o\-]\u00a0+/.test(a3)){return"ul"}if(/^\s*\w+[\.\)]\u00a0{2,}/.test(a3)){return"ol"}}function a2(bg){var a8=D.create(document,"div",{innerHTML:bg});var bf=s(H.join(","),a8);var ba=-1,a5,be={ul:{},ol:{}},a3=a8;for(var bb=0;bb]*>/g,"").replace(/ /g,"\u00a0");var a9=a1(bg);if(!a9||D.name(a6)!="p"){if(a6.innerHTML==""){D.remove(a6)}else{be={ul:{},ol:{}};a3=a8;ba=-1}continue}var bc=parseFloat(a6.style.marginLeft||0);var bd=be[a9][bc];if(bc>ba||!bd){bd=D.create(document,a9);if(a3==a8){D.insertBefore(bd,a6)}else{a3.appendChild(bd)}be[a9][bc]=bd}if(a5!=a9){for(var a7 in be){for(var a4 in be[a7]){if(s.contains(bd,be[a7][a4])){delete be[a7][a4]}}}}D.remove(a6.firstChild);a3=D.create(document,"li",{innerHTML:a6.innerHTML});bd.appendChild(a3);D.remove(a6);ba=bc;a5=a9}return a8.innerHTML}this.clean=function(a4){for(var a3=0,a5=a0.length;a3]*"?/ig,"");return a4}}function i(a0){function a1(a4){var a2=0;for(var a3=a4.parentNode.firstChild;a3;a3=a3.nextSibling){if(a3!=a4&&a3.className!="t-marker"&&a3.nodeType==1){a2++}}return a2}this.findSuitable=function(a3,a2){if(!a2&&a1(a3)>0){return null}return D.parentOfType(a3,a0[0].tags)};this.findFormat=function(a6){for(var a2=0;a20){this.activate(a6,a5)}};this.apply=function(a8){var a7=[];for(var a5=0,a6=a8.length;a50){for(var a5=0,a8=a9.length;a51){var a5=a7.pop();var a6=a7[a7.length-1];if(a5.previousSibling&&a5.previousSibling.className=="t-marker"){a6.appendChild(a5.previousSibling)}if(a5.previousSibling==a6&&a5.style.cssText==a6.style.cssText){while(a5.firstChild){a6.appendChild(a5.firstChild)}D.remove(a5)}}}}function aZ(a1,a0){i.call(this,a1);function a2(a6){var bh=a6.attributes,be=s.trim;if(!bh){return}for(var a5=0,bc=bh.length;a5=0?D.toHex(a4):a4}}}}return}function a3(a8){var a9=s(af(a8)?a8.parentNode:a8);var a7=a9.parents().andSelf();for(var a5=0,a6=a7.length;a5'+a8.dataItem.Text+""}}}function aX(a2){X.call(this,a2);var a1=[{tags:["span"]}],a0=new aZ(a1,a2.cssAttr);this.update=function(a3){a3.data("tColorPicker").close()};this.command=function(a3){return new aI(s.extend(a3,{formatter:function(){var a4={};a4[a2.domAttr]=a3.value;return new F(a1,{style:a4},a2.cssAttr)}}))};this.willDelayExecution=ad;this.init=function(a5,a3){var a4=a3.editor;a5.tColorPicker({selectedColor:"#000000",onChange:function(a6){X.exec(a4,a2.name,a6.value)}})}}function ab(){X.call(this);var a1=[{tags:["span"]}],a0=new aZ(a1,"className");this.command=function(a2){return new aI(s.extend(a2,{formatter:function(){return new F(a1,{className:a2.value})}}))};this.update=function(a2,a4){var a3=a2.data("tSelectBox");a3.close();a3.value(a0.getFormat(a4))};this.init=function(a4,a2){var a3=a2.editor;a4.tSelectBox({data:a3.style,title:a3.localization.style,onItemCreate:function(a5){var a6=D.inlineStyle(a3.document,"span",{className:a5.dataItem.Value});a5.html=''+a5.html+""},onChange:function(a5){X.exec(a3,"style",a5.value)}})}}function y(a1){function a0(a4,a5){for(var a2=0;a2'+a5.dataItem.Text+""},onChange:function(a4){X.exec(a2,"formatBlock",a4.value)},highlightFirst:false})}}function aR(a0){c.call(this,a0);this.exec=function(){var a3=this.getRange(),bd=q(a3),a6,bb=s.browser.msie?"":'
';var a5="p,h1,h2,h3,h4,h5,h6".split(","),be=D.parentOfType(a3.startContainer,a5),a1=D.parentOfType(a3.endContainer,a5),a2=(be&&!a1)||(!be&&a1);a3.deleteContents();var bc=D.create(bd,"a");a3.insertNode(bc);g(bc.parentNode);var a4=D.parentOfType(bc,["li"]),bf=D.parentOfType(bc,"h1,h2,h3,h4,h5,h6".split(","));if(a4){var a8=a3.cloneRange();a8.selectNode(a4);if(j(a8).length==0){var bg=D.create(bd,"p");if(a4.nextSibling){am(a8,a4.parentNode)}D.insertAfter(bg,a4.parentNode);D.remove(a4.parentNode.childNodes.length==1?a4.parentNode:a4);bg.innerHTML=bb;a6=bg}}else{if(bf&&!bc.nextSibling){var bg=D.create(bd,"p");D.insertAfter(bg,bf);bg.innerHTML=bb;D.remove(bc);a6=bg}}if(!a6){if(!(a4||bf)){new W([{tags:["p"]}]).apply([bc])}a3.selectNode(bc);var a7=D.parentOfType(bc,[a4?"li":bf?D.name(bf):"p"]);am(a3,a7,a2);var a9=a7.previousSibling;if(D.is(a9,"li")&&a9.firstChild&&!D.is(a9.firstChild,"br")){a9=a9.firstChild}a6=a7.nextSibling;if(D.is(a6,"li")&&a6.firstChild&&!D.is(a6.firstChild,"br")){a6=a6.firstChild}D.remove(a7);function ba(bh){if(bh.firstChild&&D.is(bh.firstChild,"br")){D.remove(bh.firstChild)}if(af(bh)&&bh.nodeValue==""){bh=bh.parentNode}if(bh&&!D.is(bh,"img")&&bh.innerHTML==""){bh.innerHTML=bb}}ba(a9);ba(a6);g(a9)}g(a6);if(!D.is(a6,"img")){a3.selectNodeContents(a6)}else{a3.setStartBefore(a6)}a3.collapse(true);D.scrollTo(a6);O(a3)}}function d(a0){c.call(this,a0);this.exec=function(){var a2=this.getRange();a2.deleteContents();var a1=D.create(q(a2),"br");a2.insertNode(a1);g(a1.parentNode);if(!s.browser.msie&&(!a1.nextSibling||D.isWhitespace(a1.nextSibling))){var a3=a1.cloneNode(true);a3.setAttribute("_moz_dirty","");D.insertAfter(a3,a1)}a2.setStartAfter(a1);a2.collapse(true);O(a2)}}function ap(a1){var a0=[a1=="ul"?"ol":"ul",a1];y.call(this,[{tags:a0}]);this.isFormatted=function(a5){var a2=[],a3;for(var a4=0;a41){D.insertAfter(a3[a3.length-1],a4);D.insertAfter(a3[1],a4);D[a2.length>0?"insertBefore":"insertAfter"](a3[0],a4)}}else{var a5=new b([{tags:["a"]}],a6);a5.finder=this.finder;a5.apply(a2)}}}function ao(a0){a0.formatter={toggle:function(a1){new b([{tags:["a"]}]).remove(j(a1))}};c.call(this,a0)}function aa(a1){c.call(this,a1);var a0;this.async=true;var a2=new aW();this.exec=function(){var a7=this.getRange();var a5=a7.collapsed;a7=this.lockRange(true);var ba=j(a7);var a9=null;var a4=this;function bb(bh){var bg=s("#t-editor-link-url",a8.element).val();if(bg&&bg!="http://"){a0={href:bg};var bd=s("#t-editor-link-title",a8.element).val();if(bd){a0.title=bd}var be=s("#t-editor-link-text",a8.element).val();if(be!==a9){a0.innerHTML=be}var bf=s("#t-editor-link-target",a8.element).is(":checked");if(bf){a0.target="_blank"}a2.apply(a7,a0)}a6(bh);if(a4.change){a4.change()}}function a6(bd){bd.preventDefault();a8.destroy();az(q(a7)).focus();a4.releaseRange(a7)}var bc=ba.length?a2.finder.findSuitable(ba[0]):null;var a3=ba.length<=1||(ba.length==2&&a5);var a8=ar.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert link",html:new s.telerik.stringBuilder().cat('
').cat("
    ").cat('
  1. ').catIf('
  2. ',a3).cat('
  3. ').cat('
  4. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").cat("
").string(),onClose:a6})).hide().find(".t-dialog-insert").click(bb).end().find(".t-dialog-close").click(a6).end().find(".t-form-text-row input").keydown(function(bd){if(bd.keyCode==13){bb(bd)}else{if(bd.keyCode==27){a6(bd)}}}).end().find("#t-editor-link-url").val(bc?bc.getAttribute("href",2):"http://").end().find("#t-editor-link-text").val(ba.length>0?(ba.length==1?ba[0].nodeValue:ba[0].nodeValue+ba[1].nodeValue):"").end().find("#t-editor-link-title").val(bc?bc.title:"").end().find("#t-editor-link-target").attr("checked",bc?bc.target=="_blank":false).end().show().data("tWindow").center();if(a3&&ba.length>0){a9=s("#t-editor-link-text",a8.element).val()}s("#t-editor-link-url",a8.element).focus().select()},this.redo=function(){var a3=this.lockRange(true);a2.apply(a3,a0);this.releaseRange(a3)}}function aS(a1){X.call(this,s.extend(a1,{command:ao}));var a0=new i([{tags:["a"]}]);this.init=function(a2){a2.attr("unselectable","on").addClass("t-state-disabled")};this.update=function(a2,a3){a2.toggleClass("t-state-disabled",!a0.isFormatted(a3)).removeClass("t-state-hover")}}function aN(a1){c.call(this,a1);this.async=true;var a0;function a2(a3,a4){if(a0.src&&a0.src!="http://"){if(!a3){a3=D.create(q(a4),"img",a0);a3.onload=a3.onerror=function(){a3.removeAttribute("complete");a3.removeAttribute("width");a3.removeAttribute("height")};a4.deleteContents();a4.insertNode(a3);a4.setStartAfter(a3);a4.setEndAfter(a3);O(a4);return true}else{D.attr(a3,a0)}}return false}this.redo=function(){var a3=this.lockRange();if(!a2(U.image(a3),a3)){this.releaseRange(a3)}};this.exec=function(){var a6=this.lockRange();var a3=false;var a9=U.image(a6);var a4=this;function ba(bd){a0={src:s("#t-editor-image-url",a7.element).val(),alt:s("#t-editor-image-title",a7.element).val()};a3=a2(a9,a6);a5(bd);if(a4.change){a4.change()}}function a5(bd){bd.preventDefault();a7.destroy();az(q(a6)).focus();if(!a3){a4.releaseRange(a6)}}var a8=this.editor.fileBrowser;var bb=a8&&a8.selectUrl!==undefined;function bc(){if(bb){new ar.imageBrowser(s(this).find(".t-image-browser"),s.extend(a8,{apply:ba,element:a4.editor.element,localization:a4.editor.localization}))}}var a7=ar.window.create(s.extend({width:750},this.editor.dialogOptions,{title:"Insert image",html:new s.telerik.stringBuilder().cat('
').catIf('
',bb).cat("
    ").cat('
  1. ').cat('
  2. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").cat("
").string(),onClose:a5,onActivate:bc})).hide().find(".t-dialog-insert").click(ba).end().find(".t-dialog-close").click(a5).end().find(".t-form-text-row input").keydown(function(bd){if(bd.keyCode==13){ba(bd)}else{if(bd.keyCode==27){a5(bd)}}}).end().toggleClass("t-imagebrowser",bb).find("#t-editor-image-url").val(a9?a9.getAttribute("src",2):"http://").end().find("#t-editor-image-title").val(a9?a9.alt:"").end().show().data("tWindow").center();s("#t-editor-image-url",a7.element).focus().select()}}ar.selectbox=function(a0,a1){var a8;var a2=s(a0);var a4=a2.find(".t-input");var a5=this.dropDown=new ar.dropDown({effects:ar.fx.slide.defaults(),onItemCreate:a1.onItemCreate,onClick:function(a9){a7(a1.data[s(a9.item).index()].Value);a1.onChange({value:a8})}});function a3(){if(!a5.$items){a5.dataBind(a1.data)}}function a6(a9){a4.html(a9?a9:" ")}function a7(bb){a3();var ba=-1;for(var a9=0,bc=a1.data.length;a90?"rtl":"");s(document.documentElement).bind("mousedown",s.proxy(function(bb){var a9=a5.$element;var ba=a9&&a9.parent().length>0;if(ba&&!s.contains(a0,bb.target)&&!s.contains(a9.parent()[0],bb.target)){a5.close()}},this))};s.fn.tSelectBox=function(a0){return ar.create(this,{name:"tSelectBox",init:function(a1,a2){return new ar.selectbox(a1,a2)},options:a0})};s.fn.tSelectBox.defaults={effects:ar.fx.slide.defaults()};ar.colorpicker=function(a0,a1){this.element=a0;var a2=s(a0);s.extend(this,a1);a2.bind("click",s.proxy(this.click,this)).find("*").attr("unselectable","on");if(this.selectedColor){a2.find(".t-selected-color").css("background-color",this.selectedColor)}s(a0.ownerDocument.documentElement).bind("mousedown",s.proxy(function(a3){if(!s(a3.target).closest(".t-colorpicker-popup").length){this.close()}},this));ar.bind(this,{change:this.onChange,load:this.onLoad})};ar.colorpicker.prototype={select:function(a0){if(a0){a0=D.toHex(a0);if(!ar.trigger(this.element,"change",{value:a0})){this.value(a0);this.close()}}else{ar.trigger(this.element,"change",{value:this.selectedColor})}},open:function(){var a0=this.popup();var a3=s(this.element);var a2=a3.offset();a2.top+=a3.outerHeight();if(a3.closest(".t-rtl").length){a2.left-=a0.outerWidth()-a3.outerWidth()}var a1="auto";a3.parents().andSelf().each(function(){a1=s(this).css("zIndex");if(Number(a1)){a1=Number(a1)+1;return false}});ar.fx._wrap(a0).css(s.extend({position:"absolute",zIndex:a1},a2));a0.find(".t-item").bind("click",s.proxy(function(a5){var a4=s(a5.target,a5.target.ownerDocument).css("background-color");this.select(a4)},this));ar.fx.play(this.effects,a0,{direction:"bottom"})},close:function(){if(!this.$popup){return}ar.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(a0){if(s(a0.target).closest(".t-tool-icon").length>0){this.select()}else{this.toggle()}},value:function(a0){if(!a0){return this.selectedColor}a0=D.toHex(a0);this.selectedColor=a0;s(".t-selected-color",this.element).css("background-color",a0)},popup:function(){if(!this.$popup){this.$popup=s(ar.colorpicker.buildPopup(this)).hide().appendTo(document.body).find("*").attr("unselectable","on").end()}return this.$popup}};s.extend(ar.colorpicker,{buildPopup:function(a0){var a3=new ar.stringBuilder();a3.cat('
').cat('
    ');var a5=a0.data;var a2=(a0.value()||"").substring(1);for(var a1=0,a4=a5.length;a1')}a3.cat("
");return a3.string()}});s.fn.tColorPicker=function(a0){return ar.create(this,{name:"tColorPicker",init:function(a1,a2){return new ar.colorpicker(a1,a2)},options:a0})};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:ar.fx.slide.defaults()};function aU(){var a1=new y([{tags:H}]);function a0(a2){return a2.style.marginLeft||0}this.apply=function(a7){var a5=a1.findSuitable(a7);if(a5.length){var a4=[];for(var a3=0;a3ul")[0];if(!ba){ba=D.create(a8.ownerDocument,D.name(bb));a6.append(ba)}while(a8&&a8.parentNode==bb){ba.appendChild(a8);a8=a4.shift()}}else{var a2=parseInt(a0(a8))+30;D.style(a8,{marginLeft:a2})}}}else{var a9=new W([{tags:H}],{style:{marginLeft:30}});a9.apply(a7)}};this.remove=function(a4){var a6=a1.findSuitable(a4);for(var a2=0;a21)||(D.ofType(a3[a2],["ul","ol"])&&a6>0)}if(a4){a1.removeClass("t-state-disabled");return}}a1.addClass("t-state-disabled").removeClass("t-state-hover")}}function aE(a0){this.editor=a0;this.formats=[]}aE.prototype={apply:function(a4){if(!this.hasPending()){return}var a3=new ac();a3.addCaret(a4);var a0=a4.startContainer.childNodes[a4.startOffset];var a6=a0.previousSibling;if(!a6.nodeValue){a6=a6.previousSibling}a4.setStart(a6,a6.nodeValue.length-1);a3.add(a4);if(j(a4).length==0){a3.remove(a4);a4.collapse(true);this.editor.selectRange(a4);return}var a2=a3.end.previousSibling.previousSibling;var a8,a5=this.formats;for(var a1=0;a10},isPending:function(a0){return !!this.getPending(a0)},getPending:function(a1){var a2=this.formats;for(var a0=0;a0",{src:'javascript:""',frameBorder:"0",className:"t-content"}).css("display","").insertBefore(a0)[0];var a1=a4.contentWindow||a4;var a3=a1.document||a4.contentDocument;var a2=a0.val().replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1");if(!a2.length&&s.browser.mozilla){a2='
'}a3.designMode="On";a3.open();a3.write(new ar.stringBuilder().cat("").cat('').cat('").cat(s.map(a5,function(a6){return[''].join("")}).join("")).cat('').cat(a2).cat("").string());a3.close();return a1}function V(a0){ar.trigger(a0.element,"selectionChange")}ar.editor=function(a0,a1){if(/Mobile.*Safari/.test(navigator.userAgent)){return}var a2=this;this.element=a0;var a3=s(a0);a3.closest("form").bind("submit",function(){a2.update()});s.extend(this,a1);ar.bind(this,{load:this.onLoad,selectionChange:this.onSelectionChange,change:this.onChange,execute:this.onExecute,error:this.onError});for(var a6 in this.tools){this.tools[a6].name=a6.toLowerCase()}this.textarea=a3.find("textarea").attr("autocomplete","off")[0];this.window=ax(s(this.textarea),this.stylesheets);this.document=this.window.contentDocument||this.window.document;this.body=this.document.body;this.keyboard=new aH([new aQ(this),new A(this)]);this.clipboard=new aA(this);this.pendingFormats=new aE(this);this.undoRedoStack=new R();function bb(bc){var bd=s.grep(bc.className.split(" "),function(be){return !/^t-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(be)});return bd[0]?bd[0].substring(2):"custom"}function a7(bd,bc){if(!bc.key){return bd}return new ar.stringBuilder().cat(bd).cat(" (").catIf("Ctrl + ",bc.ctrl).catIf("Shift + ",bc.shift).catIf("Alt + ",bc.alt).cat(bc.key).cat(")").string()}s(this.window).bind("blur",function(){var bc=a2.textarea.value,bd=a2.encodedValue();a2.update(bd);if(bd!=bc){ar.trigger(a2.element,"change")}});var a5=".t-editor-toolbar > li > *",a4=".t-editor-button .t-tool-icon",a8=a4+":not(.t-state-disabled)",ba=a4+".t-state-disabled";a3.delegate(a8,"mouseenter",ar.hover).delegate(a8,"mouseleave",ar.leave).delegate(a4,"mousedown",ar.preventDefault).delegate(a8,"click",ar.stopAll(function(bc){a2.focus();a2.exec(bb(this))})).delegate(ba,"click",function(bc){bc.preventDefault()}).find(a5).each(function(){var bg=bb(this),bd=a2.tools[bg],bf=a2.localization[bg],be=s(this);if(!bd){return}if(bg=="fontSize"||bg=="fontName"){var bc=a2.localization[bg+"Inherit"]||aO[bg+"Inherit"];a2[bg][0].Text=bc;be.find("input").val(bc).end().find("span.t-input").text(bc).end()}bd.init(be,{title:a7(bf,bd),editor:a2})}).end().bind("selectionChange",function(){var bd=a2.getRange();a2.selectionRestorePoint=new an(bd);var bc=j(bd);if(!bc.length){bc=[bd.startContainer]}a3.find(a5).each(function(){var be=a2.tools[bb(this)];if(be){be.update(s(this),bc,a2.pendingFormats)}})});s(document).bind("DOMNodeInserted",function(bc){if(s.contains(bc.target,a2.element)||a2.element==bc.target){s(a2.element).find("iframe").remove();a2.window=ax(s(a2.textarea),a2.stylesheets);a2.document=a2.window.contentDocument||a2.window.document;a2.body=a2.document.body}});var a9=true;s(this.document).bind({keydown:function(be){var bc=a2.keyboard.toolFromShortcut(a2.tools,be);if(bc){be.preventDefault();a2.exec(bc);return false}if(a2.keyboard.isTypingKey(be)&&a2.pendingFormats.hasPending()){if(a9){a9=false}else{var bd=a2.getRange();a2.pendingFormats.apply(bd);a2.selectRange(bd)}}a2.keyboard.clearTimeout();a2.keyboard.keydown(be)},keyup:function(be){var bd=[8,9,33,34,35,36,37,38,39,40,40,45,46];if(s.browser.mozilla&&be.keyCode==8){aJ(a2,be)}if(s.inArray(be.keyCode,bd)>-1||(be.keyCode==65&&be.ctrlKey&&!be.altKey&&!be.shiftKey)){a2.pendingFormats.clear();V(a2)}if(a2.keyboard.isTypingKey(be)){var bc=a2.getRange();a2.pendingFormats.apply(bc);a2.selectRange(bc)}else{a9=true}a2.keyboard.keyup(be)},mousedown:function(bc){a2.pendingFormats.clear();var bd=s(bc.target);if(!s.browser.gecko&&bc.which==2&&bd.is("a[href]")){window.open(bd.attr("href"),"_new")}},mouseup:function(){V(a2)}});s(this.body).bind("focusout",function(bc){if(a2.keyboard.typingInProgress()){a2.keyboard.endTyping(true)}try{if(!a2.selectionRestorePoint){a2.selectionRestorePoint=new an(a2.getRange())}}catch(bc){}}).bind("cut paste",function(bc){a2.clipboard["on"+bc.type](bc)})};function aJ(a0,a3){var a1=a0.getRange(),a4=a1.startContainer;if(a4==a0.body.firstChild||!D.isBlock(a4)||(a4.childNodes.length>0&&!(a4.childNodes.length==1&&D.is(a4.firstChild,"br")))){return}var a6=a4.previousSibling;while(a6&&!D.isBlock(a6)){a6=a6.previousSibling}if(!a6){return}var a5=a0.document.createTreeWalker(a6,NodeFilter.SHOW_TEXT,null,false);var a2;while(a2=a5.nextNode()){a6=a2}a1.setStart(a6,af(a6)?a6.nodeValue.length:0);a1.collapse(true);O(a1);D.remove(a4);a3.preventDefault()}s.extend(ar.editor,{BlockFormatFinder:y,BlockFormatter:W,Dom:D,FormatCommand:aI,GenericCommand:aV,GreedyBlockFormatter:au,GreedyInlineFormatFinder:aZ,GreedyInlineFormatter:F,ImageCommand:aN,IndentCommand:o,IndentFormatter:aU,InlineFormatFinder:i,InlineFormatter:b,InsertHtmlCommand:t,Keyboard:aH,LinkCommand:aa,LinkFormatFinder:I,LinkFormatter:aW,ListCommand:ay,ListFormatFinder:ap,ListFormatter:J,MSWordFormatCleaner:f,Marker:ac,NewLineCommand:d,OutdentCommand:S,ParagraphCommand:aR,PendingFormats:aE,RangeEnumerator:aj,RangeUtils:U,RestorePoint:an,SystemHandler:A,TypingHandler:aQ,UndoRedoStack:R,UnlinkCommand:ao});ar.editor.prototype={value:function(a2){var a0=this.body;if(a2===undefined){return C(a0)}this.pendingFormats.clear();a2=a2.replace(//g,"");a2=a2.replace(/]*)>(.*)?<\/script>/ig,"$2");if(s.browser.mozilla){a2=a2.replace(/]*)>(\s*)?<\/p>/ig,'


')}if(s.browser.msie&&parseInt(s.browser.version)<9){a2="
"+a2;var a3="originalsrc",a1="originalhref";a2=a2.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a1+'="$1"');a2=a2.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a3+'="$1"');a0.innerHTML=a2;D.remove(a0.firstChild);s(a0).find("telerik\\:script,script,link,img,a").each(function(){var a4=this;if(a4[a1]){a4.setAttribute("href",a4[a1]);a4.removeAttribute(a1)}if(a4[a3]){a4.setAttribute("src",a4[a3]);a4.removeAttribute(a3)}})}else{a0.innerHTML=a2;if(s.browser.msie){g(a0)}}this.update()},focus:function(){this.window.focus()},update:function(a0){this.textarea.value=a0||this.encoded?this.encodedValue():this.value()},encodedValue:function(){return D.encode(this.value())},createRange:function(a0){return aP(a0||this.document)},getSelection:function(){return aY(this.document)},selectRange:function(a1){var a0=this.getSelection();a0.removeAllRanges();a0.addRange(a1)},getRange:function(){var a1=this.getSelection();var a0=a1.rangeCount>0?a1.getRangeAt(0):this.createRange();if(a0.startContainer==this.document&&a0.endContainer==this.document&&a0.startOffset==0&&a0.endOffset==0){a0.setStart(this.body,0);a0.collapse(true)}return a0},selectedHtml:function(){return C(this.getRange().cloneContents())},paste:function(a0){this.clipboard.paste(a0)},exec:function(a3,a0){a3=a3.toLowerCase();var a5="";for(var a2 in this.tools){if(a2.toLowerCase()==a3){a5=this.tools[a2];break}}if(a5){var a1=this.getRange();if(!/undo|redo/i.test(a3)&&a5.willDelayExecution(a1)){this.pendingFormats.toggle({name:a3,params:a0,command:a5.command});V(this);return}var a4=a5.command?a5.command(s.extend({range:a1},a0)):null;ar.trigger(this.element,"execute",{name:a3,command:a4});if(/undo|redo/i.test(a3)){this.undoRedoStack[a3]()}else{if(a4){if(!a4.managesUndoRedo){this.undoRedoStack.push(a4)}a4.editor=this;a4.exec();if(a4.async){a4.change=s.proxy(function(){V(this)},this);return}}}V(this)}}};s.fn.tEditor=function(a0){return ar.create(this,{name:"tEditor",init:function(a1,a2){return new ar.editor(a1,a2)},options:a0})};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(a2,a1){for(var a0=0;a0=0){return a1[a0]}}}function X(a0){s.extend(this,a0);this.init=function(a1,a2){a1.attr({unselectable:"on",title:a2.title})};this.command=function(a1){return new a0.command(a1)};this.update=function(){};this.willDelayExecution=function(){return false}}X.exec=function(a1,a2,a0){a1.focus();if(a1.selectionRestorePoint){a1.selectRange(a1.selectionRestorePoint.toRange());a1.selectionRestorePoint=null}a1.exec(a2,{value:a0})};function ai(a0){X.call(this,a0);this.command=function(a1){return new aI(s.extend(a1,{formatter:a0.formatter}))};this.update=function(a1,a5,a3){var a2=a3.isPending(this.name),a4=a0.finder.isFormatted(a5),a6=a2?!a4:a4;a1.toggleClass("t-state-active",a6)}}var Q=function(){return{isFormatted:function(){return false}}};var aO={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:aO,formats:ak,encoded:true,stylesheets:[],dialogOptions:{modal:true,resizable:false,draggable:true,effects:{list:[{name:"toggle"}]}},fontName:[{Text:aO.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:aO.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:aR}),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 aM({tag:"ul"}),insertOrderedList:new aM({tag:"ol"}),createLink:new X({key:"K",ctrl:true,command:aa}),unlink:new aS({key:"K",ctrl:true,shift:true}),insertImage:new X({command:aN}),indent:new X({command:o}),outdent:new ag(),insertHtml:new x(),style:new ab(),fontName:new aC({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName"}),fontSize:new aC({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize"}),formatBlock:new n(),foreColor:new aX({cssAttr:"color",domAttr:"color",name:"foreColor"}),backColor:new aX({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor"})}}})(jQuery);