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


')}if(s.browser.msie){a1="
"+a1;var a2="originalsrc",a0="originalhref";a1=a1.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a0+'="$1"');a1=a1.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a2+'="$1"');aZ.innerHTML=a1;C.remove(aZ.firstChild);s(aZ).find("telerik\\:script,script,link,img,a").each(function(){var a3=this;if(a3[a0]){a3.setAttribute("href",a3[a0]);a3.removeAttribute(a0)}if(a3[a2]){a3.setAttribute("src",a3[a2]);a3.removeAttribute(a2)}})}else{aZ.innerHTML=a1}this.update()},focus:function(){this.window.focus()},update:function(aZ){this.textarea.value=aZ||this.encoded?this.encodedValue():this.value()},encodedValue:function(){return C.encode(this.value())},createRange:function(aZ){return aO(aZ||this.document)},getSelection:function(){return aX(this.document)},selectRange:function(a0){var aZ=this.getSelection();aZ.removeAllRanges();aZ.addRange(a0)},getRange:function(){var aZ=this.getSelection();return aZ.rangeCount>0?aZ.getRangeAt(0):this.createRange()},selectedHtml:function(){return B(this.getRange().cloneContents())},paste:function(aZ){this.clipboard.paste(aZ)},exec:function(a2,aZ){a2=a2.toLowerCase();var a4="";for(var a1 in this.tools){if(a1.toLowerCase()==a2){a4=this.tools[a1];break}}if(a4){var a0=this.getRange();if(!/undo|redo/i.test(a2)&&a4.willDelayExecution(a0)){this.pendingFormats.toggle({name:a2,params:aZ,command:a4.command});T(this);return}var a3=a4.command?a4.command(s.extend({range:a0},aZ)):null;ap.trigger(this.element,"execute",{name:a2,command:a3});if(/undo|redo/i.test(a2)){this.undoRedoStack[a2]()}else{if(a3){if(!a3.managesUndoRedo){this.undoRedoStack.push(a3)}a3.editor=this;a3.exec();if(a3.async){a3.change=s.proxy(function(){T(this)},this);return}}}T(this)}}};s.fn.tEditor=function(aZ){return ap.create(this,{name:"tEditor",init:function(a0,a1){return new ap.editor(a0,a1)},options:aZ})};var ai={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:G,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}],justifyCenter:[{tags:G,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}],justifyRight:[{tags:G,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}],justifyFull:[{tags:G,attr:{style:{textAlign:"justify"}}}]};function ac(a1,a0){for(var aZ=0;aZ=0){return a0[aZ]}}}function V(aZ){s.extend(this,aZ);this.init=function(a0,a1){a0.attr({unselectable:"on",title:a1.title})};this.command=function(a0){return new aZ.command(a0)};this.update=function(){};this.willDelayExecution=function(){return false}}V.exec=function(a0,a1,aZ){a0.focus();if(a0.selectionRestorePoint){a0.selectRange(a0.selectionRestorePoint.toRange());a0.selectionRestorePoint=null}a0.exec(a1,{value:aZ})};function ag(aZ){V.call(this,aZ);this.command=function(a0){return new aG(s.extend(a0,{formatter:aZ.formatter}))};this.update=function(a0,a4,a2){var a1=a2.isPending(this.name),a3=aZ.finder.isFormatted(a4),a5=a1?!a3:a3;a0.toggleClass("t-state-active",a5)}}var O=function(){return{isFormatted:function(){return false}}};var aN={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"};s.fn.tEditor.defaults={localization:aN,formats:ai,encoded:true,stylesheets:[],dialogOptions:{modal:true,resizable:false,draggable:true,effects:{list:[{name:"toggle"}]}},fontName:[{Text:aN.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:aN.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 W({key:"B",ctrl:true,format:ai.bold}),italic:new W({key:"I",ctrl:true,format:ai.italic}),underline:new W({key:"U",ctrl:true,format:ai.underline}),strikethrough:new W({format:ai.strikethrough}),undo:{key:"Z",ctrl:true},redo:{key:"Y",ctrl:true},insertLineBreak:new V({key:13,shift:true,command:d}),insertParagraph:new V({key:13,command:aQ}),justifyCenter:new N({format:ai.justifyCenter}),justifyLeft:new N({format:ai.justifyLeft}),justifyRight:new N({format:ai.justifyRight}),justifyFull:new N({format:ai.justifyFull}),insertUnorderedList:new aK({tag:"ul"}),insertOrderedList:new aK({tag:"ol"}),createLink:new V({key:"K",ctrl:true,command:Y}),unlink:new aR({key:"K",ctrl:true,shift:true}),insertImage:new V({command:aL}),indent:new V({command:o}),outdent:new ae(),insertHtml:new w(),style:new Z(),fontName:new aA({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName"}),fontSize:new aA({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize"}),formatBlock:new n(),foreColor:new aW({cssAttr:"color",domAttr:"color",name:"foreColor"}),backColor:new aW({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor"})}}})(jQuery);