﻿try{if(Sys.Browser.agent==Sys.Browser.InternetExplorer){document.execCommand("BackgroundImageCache",false,true);
}}catch(err){}Type.registerNamespace("Telerik.Web.UI");
window.$telerik=window.TelerikCommonScripts=Telerik.Web.CommonScripts={cloneJsObject:function(b,a){if(!a){a={};
}for(var c in b){var d=b[c];
a[c]=(d instanceof Array)?Array.clone(d):d;
}return a;
},isCloned:function(){return this._isCloned;
},cloneControl:function(a,c,b){if(!a){return null;
}if(!c){c=Object.getType(a);
}var d=a.__clonedProperties__;
if(null==d){d=a.__clonedProperties__=$telerik._getPropertiesParameter(a,c);
}if(!b){b=a.get_element().cloneNode(true);
b.removeAttribute("control");
b.removeAttribute("id");
}var f=$create(c,d,null,null,b);
var e=$telerik.cloneJsObject(a.get_events());
f._events=e;
f._events._list=$telerik.cloneJsObject(f._events._list);
f._isCloned=true;
f.isCloned=$telerik.isCloned;
return f;
},_getPropertiesParameter:function(a,g){var c={};
var d=g.prototype;
for(var h in d){var e=a[h];
if(typeof(e)=="function"&&h.indexOf("get_")==0){var b=h.substring(4);
if(null==a["set_"+b]){continue;
}var f=e.call(a);
if(null==f){continue;
}c[b]=f;
}}delete c.clientStateFieldID;
delete c.id;
return c;
},getOuterSize:function(c){var b=$telerik.getSize(c);
var a=$telerik.getMarginBox(c);
return{width:b.width+a.left+a.right,height:b.height+a.top+a.bottom};
},getOuterBounds:function(c){var b=$telerik.getBounds(c);
var a=$telerik.getMarginBox(c);
return{x:b.x-a.left,y:b.y-a.top,width:b.width+a.left+a.right,height:b.height+a.top+a.bottom};
},getInvisibleParent:function(a){while(a&&a!=document){if("none"==$telerik.getCurrentStyle(a,"display","")){return a;
}a=a.parentNode;
}return null;
},scrollIntoView:function(a){if(!a||!a.parentNode){return;
}var b=null;
var c=0;
var d=a.parentNode;
while(d!=null){if(d.tagName=="BODY"){var e=d.ownerDocument;
if(!$telerik.isIE&&e.defaultView&&e.defaultView.frameElement){c=e.defaultView.frameElement.offsetHeight;
}b=d;
break;
}var f=$telerik.getCurrentStyle(d,"overflowY");
if(f=="scroll"||f=="auto"){b=d;
break;
}d=d.parentNode;
}if(!b){return;
}if(!c){c=b.offsetHeight;
}if(c<a.offsetTop+a.offsetHeight){b.scrollTop=(a.offsetTop+a.offsetHeight)-c;
}else{if(a.offsetTop<b.scrollTop){b.scrollTop=a.offsetTop;
}}},isRightToLeft:function(a){while(a&&a.nodeType!==9){var b=$telerik.getCurrentStyle(a,"direction");
if(a.dir=="rtl"||b=="rtl"){return true;
}if(a.dir=="ltr"||b=="ltr"){return false;
}a=a.parentNode;
}return false;
},getCorrectScrollLeft:function(a){if($telerik.isRightToLeft(a)){return -(a.scrollWidth-a.offsetWidth-Math.abs(a.scrollLeft));
}else{return a.scrollLeft;
}},_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],radControls:[],registerControl:function(a){if(!Array.contains(this.radControls,a)){Array.add(this.radControls,a);
}},unregisterControl:function(a){Array.remove(this.radControls,a);
},repaintChildren:function(a){var b=a.get_element?a.get_element():a;
for(var e=0,c=this.radControls.length;
e<c;
e++){var d=this.radControls[e];
if(d.repaint&&this.isDescendant(b,d.get_element())){d.repaint();
}}},_borderThickness:function(){$telerik._borderThicknesses={};
var a=document.createElement("div");
var b=document.createElement("div");
a.style.visibility="hidden";
a.style.position="absolute";
a.style.fontSize="1px";
b.style.height="0px";
b.style.overflow="hidden";
document.body.appendChild(a).appendChild(b);
var c=a.offsetHeight;
b.style.borderTop="solid black";
b.style.borderTopWidth="thin";
$telerik._borderThicknesses.thin=a.offsetHeight-c;
b.style.borderTopWidth="medium";
$telerik._borderThicknesses.medium=a.offsetHeight-c;
b.style.borderTopWidth="thick";
$telerik._borderThicknesses.thick=a.offsetHeight-c;
if(typeof(a.removeChild)!=="undefined"){a.removeChild(b);
}document.body.removeChild(a);
if(!$telerik.isSafari){b.outerHTML=null;
}if(!$telerik.isSafari){a.outerHTML=null;
}a=null;
b=null;
},getCurrentStyle:function(d,e,c){var b=null;
if(d){if(d.currentStyle){b=d.currentStyle[e];
}else{if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(d,null);
if(a){b=a[e];
}}}if(!b&&d.style.getPropertyValue){b=d.style.getPropertyValue(e);
}else{if(!b&&d.style.getAttribute){b=d.style.getAttribute(e);
}}}if((!b||b==""||typeof(b)==="undefined")){if(typeof(c)!="undefined"){b=c;
}else{b=null;
}}return b;
},getLocation:function(a){var v=a&&a.ownerDocument?a.ownerDocument:document;
if(a===v.documentElement){return new Sys.UI.Point(0,0);
}if(Sys.Browser.agent==Sys.Browser.InternetExplorer){if(a.window===a||a.nodeType===9||!a.getClientRects||!a.getBoundingClientRect||a.parentElement==null){return new Sys.UI.Point(0,0);
}var F=a.getClientRects();
if(!F||!F.length){return new Sys.UI.Point(0,0);
}var j=F[0];
var G=0;
var z=0;
var y=false;
try{y=a.ownerDocument.parentWindow.frameElement;
}catch(f){y=true;
}if(y){var c=a.getBoundingClientRect();
if(!c){return new Sys.UI.Point(0,0);
}var D=j.left;
var s=j.top;
for(var l=1;
l<F.length;
l++){var o=F[l];
if(o.left<D){D=o.left;
}if(o.top<s){s=o.top;
}}G=D-c.left;
z=s-c.top;
}var C=a.document.documentElement;
var e=0;
if(Sys.Browser.version<8||$telerik.quirksMode){var I=1;
if(y&&y.getAttribute){var g=y.getAttribute("frameborder");
if(g!=null){I=parseInt(g,10);
if(isNaN(I)){I=g.toLowerCase()=="no"?0:1;
}}}e=2*I;
}var M=new Sys.UI.Point(j.left-e-G+$telerik.getCorrectScrollLeft(C),j.top-e-z+C.scrollTop);
if($telerik.quirksMode){M.x+=$telerik.getCorrectScrollLeft(document.body);
M.y+=document.body.scrollTop;
}return M;
}var M=Sys.UI.DomElement.getLocation(a);
if($telerik.isOpera){var d=$telerik.getCurrentStyle(a,"display");
if(d!="inline"){var E=a.parentNode;
}else{var E=a.offsetParent;
}while(E){var b=E.tagName.toUpperCase();
if(b=="BODY"||b=="HTML"){break;
}if(b=="TABLE"&&E.parentNode&&E.parentNode.style.display=="inline-block"){var J=E.offsetLeft;
var h=E.style.display;
E.style.display="inline-block";
if(E.offsetLeft>J){M.x+=E.offsetLeft-J;
}E.style.display=h;
}M.x-=$telerik.getCorrectScrollLeft(E);
M.y-=E.scrollTop;
if(d!="inline"){E=E.parentNode;
}else{E=E.offsetParent;
}}}var q=Math.max(v.documentElement.scrollTop,v.body.scrollTop);
var t=Math.max(v.documentElement.scrollLeft,v.body.scrollLeft);
if(!$telerik.isOpera){var K=a;
while(K){if($telerik.getCurrentStyle(K,"position")=="fixed"){M.y+=q;
M.x+=t;
q=0;
t=0;
break;
}K=K.offsetParent;
}}if($telerik.isSafari){if(q>0||t>0){var A=v.documentElement.getElementsByTagName("form");
if(A&&A.length>0){var k=Sys.UI.DomElement.getLocation(A[0]);
if(k.y&&k.y<0){M.y+=q;
}if(k.x&&k.x<0){M.x+=t;
}}else{var n=a.parentNode,m=false,H=false;
while(n&&n.tagName){var B=Sys.UI.DomElement.getLocation(n);
if(B.y<0){m=true;
}if(B.x<0){H=true;
}n=n.parentNode;
}if(m){M.y+=q;
}if(H){M.x+=t;
}}}var E=a.parentNode;
var u=null;
var w=null;
while(E&&E.tagName.toUpperCase()!="BODY"&&E.tagName.toUpperCase()!="HTML"){if(E.tagName.toUpperCase()=="TD"){u=E;
}else{if(E.tagName.toUpperCase()=="TABLE"){w=E;
}else{var p=$telerik.getCurrentStyle(E,"position");
if(p=="absolute"||p=="relative"){var x=$telerik.getCurrentStyle(E,"borderTopWidth",0);
var L=$telerik.getCurrentStyle(E,"borderLeftWidth",0);
M.x+=parseInt(x);
M.y+=parseInt(L);
}}}var p=$telerik.getCurrentStyle(E,"position");
if(p=="absolute"||p=="relative"){M.x-=E.scrollLeft;
M.y-=E.scrollTop;
}if(u&&w){M.x+=parseInt($telerik.getCurrentStyle(w,"borderTopWidth"),0);
M.y+=parseInt($telerik.getCurrentStyle(w,"borderLeftWidth",0));
if($telerik.getCurrentStyle(w,"borderCollapse")!="collapse"){M.x+=parseInt($telerik.getCurrentStyle(u,"borderTopWidth",0));
M.y+=parseInt($telerik.getCurrentStyle(u,"borderLeftWidth",0));
}u=null;
w=null;
}else{if(w){if($telerik.getCurrentStyle(w,"borderCollapse")!="collapse"){M.x+=parseInt($telerik.getCurrentStyle(w,"borderTopWidth",0));
M.y+=parseInt($telerik.getCurrentStyle(w,"borderLeftWidth",0));
}w=null;
}}E=E.parentNode;
}}return M;
},setLocation:function(a,b){Sys.UI.DomElement.setLocation(a,b.x,b.y);
},findControl:function(e,d){var c=e.getElementsByTagName("*");
for(var a=0,b=c.length;
a<b;
a++){var f=c[a].id;
if(f&&f.endsWith(d)){return $find(f);
}}return null;
},findElement:function(e,d){var c=e.getElementsByTagName("*");
for(var a=0,b=c.length;
a<b;
a++){var f=c[a].id;
if(f&&f.endsWith(d)){return $get(f);
}}return null;
},getContentSize:function(d){if(!d){throw Error.argumentNull("element");
}var c=$telerik.getSize(d);
var b=$telerik.getBorderBox(d);
var a=$telerik.getPaddingBox(d);
return{width:c.width-b.horizontal-a.horizontal,height:c.height-b.vertical-a.vertical};
},getSize:function(a){if(!a){throw Error.argumentNull("element");
}return{width:a.offsetWidth,height:a.offsetHeight};
},setContentSize:function(d,c){if(!d){throw Error.argumentNull("element");
}if(!c){throw Error.argumentNull("size");
}if($telerik.getCurrentStyle(d,"MozBoxSizing")=="border-box"||$telerik.getCurrentStyle(d,"BoxSizing")=="border-box"){var b=$telerik.getBorderBox(d);
var a=$telerik.getPaddingBox(d);
c={width:c.width+b.horizontal+a.horizontal,height:c.height+b.vertical+a.vertical};
}d.style.width=c.width.toString()+"px";
d.style.height=c.height.toString()+"px";
},setSize:function(e,c){if(!e){throw Error.argumentNull("element");
}if(!c){throw Error.argumentNull("size");
}var b=$telerik.getBorderBox(e);
var a=$telerik.getPaddingBox(e);
var d={width:c.width-b.horizontal-a.horizontal,height:c.height-b.vertical-a.vertical};
$telerik.setContentSize(e,d);
},getBounds:function(a){var b=$telerik.getLocation(a);
return new Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0);
},setBounds:function(a,b){if(!a){throw Error.argumentNull("element");
}if(!b){throw Error.argumentNull("bounds");
}$telerik.setSize(a,b);
$telerik.setLocation(a,b);
},getClientBounds:function(){var b;
var a;
switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:b=document.documentElement.clientWidth;
a=document.documentElement.clientHeight;
if(b==0&&a==0){b=document.body.clientWidth;
a=document.body.clientHeight;
}break;
case Sys.Browser.Safari:b=window.innerWidth;
a=window.innerHeight;
break;
case Sys.Browser.Opera:if(Sys.Browser.version>=9.5){b=Math.min(window.innerWidth,document.documentElement.clientWidth);
a=Math.min(window.innerHeight,document.documentElement.clientHeight);
}else{b=Math.min(window.innerWidth,document.body.clientWidth);
a=Math.min(window.innerHeight,document.body.clientHeight);
}break;
default:b=Math.min(window.innerWidth,document.documentElement.clientWidth);
a=Math.min(window.innerHeight,document.documentElement.clientHeight);
break;
}return new Sys.UI.Bounds(0,0,b,a);
},getMarginBox:function(a){if(!a){throw Error.argumentNull("element");
}var b={top:$telerik.getMargin(a,Telerik.Web.BoxSide.Top),right:$telerik.getMargin(a,Telerik.Web.BoxSide.Right),bottom:$telerik.getMargin(a,Telerik.Web.BoxSide.Bottom),left:$telerik.getMargin(a,Telerik.Web.BoxSide.Left)};
b.horizontal=b.left+b.right;
b.vertical=b.top+b.bottom;
return b;
},getPaddingBox:function(a){if(!a){throw Error.argumentNull("element");
}var b={top:$telerik.getPadding(a,Telerik.Web.BoxSide.Top),right:$telerik.getPadding(a,Telerik.Web.BoxSide.Right),bottom:$telerik.getPadding(a,Telerik.Web.BoxSide.Bottom),left:$telerik.getPadding(a,Telerik.Web.BoxSide.Left)};
b.horizontal=b.left+b.right;
b.vertical=b.top+b.bottom;
return b;
},getBorderBox:function(a){if(!a){throw Error.argumentNull("element");
}var b={top:$telerik.getBorderWidth(a,Telerik.Web.BoxSide.Top),right:$telerik.getBorderWidth(a,Telerik.Web.BoxSide.Right),bottom:$telerik.getBorderWidth(a,Telerik.Web.BoxSide.Bottom),left:$telerik.getBorderWidth(a,Telerik.Web.BoxSide.Left)};
b.horizontal=b.left+b.right;
b.vertical=b.top+b.bottom;
return b;
},isBorderVisible:function(c,b){if(!c){throw Error.argumentNull("element");
}if(b<Telerik.Web.BoxSide.Top||b>Telerik.Web.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,b,"Telerik.Web.BoxSide"));
}var a=$telerik._borderStyleNames[b];
var d=$telerik.getCurrentStyle(c,a);
return d!="none";
},getMargin:function(c,b){if(!c){throw Error.argumentNull("element");
}if(b<Telerik.Web.BoxSide.Top||b>Telerik.Web.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,b,"Telerik.Web.BoxSide"));
}var a=$telerik._marginWidthNames[b];
var d=$telerik.getCurrentStyle(c,a);
try{return $telerik.parsePadding(d);
}catch(e){return 0;
}},getBorderWidth:function(c,b){if(!c){throw Error.argumentNull("element");
}if(b<Telerik.Web.BoxSide.Top||b>Telerik.Web.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,b,"Telerik.Web.BoxSide"));
}if(!$telerik.isBorderVisible(c,b)){return 0;
}var a=$telerik._borderWidthNames[b];
var d=$telerik.getCurrentStyle(c,a);
return $telerik.parseBorderWidth(d);
},getPadding:function(c,b){if(!c){throw Error.argumentNull("element");
}if(b<Telerik.Web.BoxSide.Top||b>Telerik.Web.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,b,"Telerik.Web.BoxSide"));
}var a=$telerik._paddingWidthNames[b];
var d=$telerik.getCurrentStyle(c,a);
return $telerik.parsePadding(d);
},parseBorderWidth:function(b){if(b){switch(b){case"thin":case"medium":case"thick":return $telerik._borderThicknesses[b];
case"inherit":return 0;
}var a=$telerik.parseUnit(b);
return a.size;
}return 0;
},parsePadding:function(b){if(b){if(b=="auto"||b=="inherit"){return 0;
}var a=$telerik.parseUnit(b);
return a.size;
}return 0;
},parseUnit:function(a){if(!a){throw Error.argumentNull("value");
}a=a.trim().toLowerCase();
var c=a.length;
var g=-1;
for(var b=0;
b<c;
b++){var d=a.substr(b,1);
if((d<"0"||d>"9")&&d!="-"&&d!="."&&d!=","){break;
}g=b;
}if(g==-1){throw Error.create("No digits");
}var f;
var e;
if(g<(c-1)){f=a.substring(g+1).trim();
}else{f="px";
}e=parseFloat(a.substr(0,g+1));
if(f=="px"){e=Math.floor(e);
}return{size:e,type:f};
},containsPoint:function(c,b,a){return b>=c.x&&b<=(c.x+c.width)&&a>=c.y&&a<=(c.y+c.height);
},isDescendant:function(c,a){try{for(var d=a.parentNode;
d!=null;
d=d.parentNode){if(d==c){return true;
}}}catch(b){}return false;
},isDescendantOrSelf:function(a,b){if(a===b){return true;
}return $telerik.isDescendant(a,b);
},addCssClasses:function(c,a){for(var b=0;
b<a.length;
b++){Sys.UI.DomElement.addCssClass(c,a[b]);
}},removeCssClasses:function(c,a){for(var b=0;
b<a.length;
b++){Sys.UI.DomElement.removeCssClass(c,a[b]);
}},getScrollOffset:function(a,c){var d=0;
var e=0;
var b=a;
var f=a&&a.ownerDocument?a.ownerDocument:document;
while(b!=null&&b.scrollLeft!=null){d+=$telerik.getCorrectScrollLeft(b);
e+=b.scrollTop;
if(!c||(b==f.body&&(b.scrollLeft!=0||b.scrollTop!=0))){break;
}b=b.parentNode;
}return{x:d,y:e};
},getElementByClassName:function(c,g,d){var a=null;
if(d){a=c.getElementsByTagName(d);
}else{a=c.getElementsByTagName("*");
}for(var b=0,f=a.length;
b<f;
b++){var e=a[b];
if(Sys.UI.DomElement.containsCssClass(e,g)){return e;
}}return null;
},addExternalHandler:function(c,b,a){if(!c){return;
}if(c.addEventListener){c.addEventListener(b,a,false);
}else{if(c.attachEvent){c.attachEvent("on"+b,a);
}}},removeExternalHandler:function(c,b,a){if(!c){return;
}if(c.addEventListener){c.removeEventListener(b,a,false);
}else{if(c.detachEvent){c.detachEvent("on"+b,a);
}}},cancelRawEvent:function(a){if(!a){return false;
}if(a.preventDefault){a.preventDefault();
}if(a.stopPropagation){a.stopPropagation();
}a.cancelBubble=true;
a.returnValue=false;
return false;
},getOuterHtml:function(b){if(b.outerHTML){return b.outerHTML;
}else{var a=b.cloneNode(true);
var c=b.ownerDocument.createElement("div");
c.appendChild(a);
return c.innerHTML;
}},setVisible:function(a,b){if(!a){return;
}if(b!=$telerik.getVisible(a)){if(b){if(a.style.removeAttribute){a.style.removeAttribute("display");
}else{a.style.removeProperty("display");
}}else{a.style.display="none";
}a.style.visibility=b?"visible":"hidden";
}},getVisible:function(a){if(!a){return false;
}return(("none"!=$telerik.getCurrentStyle(a,"display"))&&("hidden"!=$telerik.getCurrentStyle(a,"visibility")));
},getViewPortSize:function(){var b=0;
var a=0;
var c=document.body;
if(!$telerik.quirksMode&&!$telerik.isSafari){c=document.documentElement;
}if(window.innerWidth){b=window.innerWidth;
a=window.innerHeight;
}else{b=c.clientWidth;
a=c.clientHeight;
}b+=c.scrollLeft;
a+=c.scrollTop;
return{width:b-6,height:a-6};
},elementOverflowsTop:function(c,a){var b=a||$telerik.getLocation(c);
return b.y<0;
},elementOverflowsLeft:function(c,a){var b=a||$telerik.getLocation(c);
return b.x<0;
},elementOverflowsBottom:function(c,d,a){var e=a||$telerik.getLocation(d);
var b=e.y+d.offsetHeight;
return b>c.height;
},elementOverflowsRight:function(c,d,a){var e=a||$telerik.getLocation(d);
var b=e.x+d.offsetWidth;
return b>c.width;
},getDocumentRelativeCursorPosition:function(f){var c=document.documentElement;
var a=document.body;
var b=f.clientX+($telerik.getCorrectScrollLeft(c)+$telerik.getCorrectScrollLeft(a));
var d=f.clientY+(c.scrollTop+a.scrollTop);
if($telerik.isIE&&Sys.Browser.version<8){b-=2;
d-=2;
}return{left:b,top:d};
},evalScriptCode:function(c){if($telerik.isSafari){c=c.replace(/^\s*<!--((.|\n)*)-->\s*$/mi,"$1");
}var b=document.createElement("script");
b.setAttribute("type","text/javascript");
b.text=c;
var a=document.getElementsByTagName("head")[0];
a.appendChild(b);
b.parentNode.removeChild(b);
},isScriptRegistered:function(a,b){if(!a){return 0;
}if(!b){b=document;
}if($telerik._uniqueScripts==null){$telerik._uniqueScripts={};
}var f=document.getElementsByTagName("script");
var g=0;
var k=a.indexOf("?d=");
var j=a.indexOf("&");
var d=k>0&&j>k?a.substring(k+3,j):a;
if($telerik._uniqueScripts[d]!=null){return 2;
}for(var c=0,e=f.length;
c<e;
c++){var h=f[c];
if(h.src){if(h.getAttribute("src",2).indexOf(d)!=-1){$telerik._uniqueScripts[d]=true;
if(!$telerik.isDescendant(b,h)){g++;
}}}}return g;
},evalScripts:function(b,d){$telerik.registerSkins(b);
var h=b.getElementsByTagName("script");
var g=0,e=0;
var m=function(o,n){if(o-e>0&&($telerik.isIE||$telerik.isSafari)){window.setTimeout(function(){m(o,n);
},5);
}else{var i=document.createElement("script");
i.setAttribute("type","text/javascript");
document.getElementsByTagName("head")[0].appendChild(i);
i.loadFinished=false;
i.onload=function(){if(!this.loadFinished){this.loadFinished=true;
e++;
}};
i.onreadystatechange=function(){if("loaded"===this.readyState&&!this.loadFinished){this.loadFinished=true;
e++;
}};
i.setAttribute("src",n);
}};
var j=[];
for(var c=0,f=h.length;
c<f;
c++){var k=h[c];
if(k.src){var a=k.getAttribute("src",2);
if(!$telerik.isScriptRegistered(a,b)){m(g++,a);
}}else{Array.add(j,k.innerHTML);
}}var l=function(){if(g-e>0){window.setTimeout(l,20);
}else{for(var i=0;
i<j.length;
i++){$telerik.evalScriptCode(j[i]);
}if(d){d();
}}};
l();
},registerSkins:function(b){if(!b){b=document.body;
}var g=b.getElementsByTagName("link");
if(g&&g.length>0){var a=document.getElementsByTagName("head")[0];
if(a){for(var c=0,h=g.length;
c<h;
c++){var f=g[c];
if(f.className=="Telerik_stylesheet"){var l=a.getElementsByTagName("link");
if(f.href.indexOf("ie7CacheFix")>=0){try{f.href=f.href.replace("&ie7CacheFix","");
f.href=f.href.replace("?ie7CacheFix","");
}catch(k){}}if(l&&l.length>0){var d=l.length-1;
while(d>=0&&l[d--].href!=f.href){}if(d>=0){continue;
}}if($telerik.isIE){f.parentNode.removeChild(f);
f=f.cloneNode(true);
}a.appendChild(f);
if(h>g.length){h=g.length;
c--;
}}}}}},getFirstChildByTagName:function(d,b,c){if(!d||!d.childNodes){return null;
}var a=d.childNodes[c]||d.firstChild;
while(a){if(a.nodeType==1&&a.tagName.toLowerCase()==b){return a;
}a=a.nextSibling;
}return null;
},getChildByClassName:function(a,d,c){var b=a.childNodes[c]||a.firstChild;
while(b){if(b.nodeType==1&&b.className.indexOf(d)>-1){return b;
}b=b.nextSibling;
}return null;
},getChildrenByTagName:function(b,d){var a=new Array();
var e=b.childNodes;
if($telerik.isIE){e=b.children;
}for(var c=0,g=e.length;
c<g;
c++){var f=e[c];
if(f.nodeType==1&&f.tagName.toLowerCase()==d){Array.add(a,f);
}}return a;
},getChildrenByClassName:function(d,g){var a=new Array();
var b=d.childNodes;
if($telerik.isIE){b=d.children;
}for(var c=0,f=b.length;
c<f;
c++){var e=b[c];
if(e.nodeType==1&&e.className.indexOf(g)>-1){Array.add(a,e);
}}return a;
},mergeElementAttributes:function(d,b,a){if(!d||!b){return;
}if(d.mergeAttributes){b.mergeAttributes(d,a);
}else{for(var c=0;
c<d.attributes.length;
c++){var e=d.attributes[c].nodeValue;
b.setAttribute(d.attributes[c].nodeName,e);
}if(""==b.getAttribute("style")){b.removeAttribute("style");
}}},isMouseOverElement:function(c,d){var b=$telerik.getBounds(c);
var a=$telerik.getDocumentRelativeCursorPosition(d);
return $telerik.containsPoint(b,a.left,a.top);
},isMouseOverElementEx:function(a,g){var d=null;
try{d=$telerik.getOuterBounds(a);
}catch(g){return false;
}if(g&&g.target){var c=g.target.tagName;
if(c=="SELECT"||c=="OPTION"){return true;
}if(g.clientX<0||g.clientY<0){return true;
}}var b=$telerik.getDocumentRelativeCursorPosition(g);
d.x+=2;
d.y+=2;
d.width-=4;
d.height-=4;
var f=$telerik.containsPoint(d,b.left,b.top);
return f;
},getPreviousHtmlNode:function(a){if(!a||!a.previousSibling){return null;
}while(a.previousSibling){if(a.previousSibling.nodeType==1){return a.previousSibling;
}a=a.previousSibling;
}},getNextHtmlNode:function(a){if(!a||!a.nextSibling){return null;
}while(a.nextSibling){if(a.nextSibling.nodeType==1){return a.nextSibling;
}a=a.nextSibling;
}},disposeElement:function(a){if(typeof(Sys.WebForms)=="undefined"){return;
}var b=Sys.WebForms.PageRequestManager.getInstance();
if(b&&b._destroyTree){b._destroyTree(a);
}else{if(Sys.Application.disposeElement){Sys.Application.disposeElement(a,true);
}}}};
if(typeof(Sys.Browser.WebKit)=="undefined"){Sys.Browser.WebKit={};
}if(typeof(Sys.Browser.Chrome)=="undefined"){Sys.Browser.Chrome={};
}if(navigator.userAgent.indexOf("Chrome")>-1){Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
Sys.Browser.agent=Sys.Browser.Chrome;
Sys.Browser.name="Chrome";
}else{if(navigator.userAgent.indexOf("WebKit/")>-1){Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
if(Sys.Browser.version<500){Sys.Browser.agent=Sys.Browser.Safari;
Sys.Browser.name="Safari";
}else{Sys.Browser.agent=Sys.Browser.WebKit;
Sys.Browser.name="WebKit";
}}}$telerik.isMobileSafari=(navigator.userAgent.search(/like\sMac\sOS\sX;.*Mobile\/\S+/)!=-1);
$telerik.isChrome=Sys.Browser.agent==Sys.Browser.Chrome;
$telerik.isSafari4=Sys.Browser.agent==Sys.Browser.WebKit&&Sys.Browser.version>=526;
$telerik.isSafari3=Sys.Browser.agent==Sys.Browser.WebKit&&Sys.Browser.version<526&&Sys.Browser.version>500;
$telerik.isSafari2=Sys.Browser.agent==Sys.Browser.Safari;
$telerik.isSafari=$telerik.isSafari2||$telerik.isSafari3||$telerik.isSafari4||$telerik.isChrome;
$telerik.isIE=Sys.Browser.agent==Sys.Browser.InternetExplorer;
$telerik.isIE6=$telerik.isIE&&Sys.Browser.version<7;
$telerik.isIE7=$telerik.isIE&&(Sys.Browser.version==7||(document.documentMode&&document.documentMode<8));
$telerik.isIE8=$telerik.isIE&&Sys.Browser.version==8&&document.documentMode&&document.documentMode==8;
$telerik.isIE9=$telerik.isIE&&Sys.Browser.version==9&&document.documentMode&&document.documentMode==9;
$telerik.isOpera=Sys.Browser.agent==Sys.Browser.Opera;
$telerik.isFirefox=Sys.Browser.agent==Sys.Browser.Firefox;
$telerik.isFirefox2=$telerik.isFirefox&&Sys.Browser.version<3;
$telerik.isFirefox3=$telerik.isFirefox&&Sys.Browser.version>=3;
$telerik.quirksMode=$telerik.isIE&&document.compatMode!="CSS1Compat";
$telerik.standardsMode=!$telerik.quirksMode;
Sys.Application.add_init(function(){try{$telerik._borderThickness();
}catch(a){}});
Telerik.Web.UI.Orientation=function(){throw Error.invalidOperation();
};
Telerik.Web.UI.Orientation.prototype={Horizontal:0,Vertical:1};
Telerik.Web.UI.Orientation.registerEnum("Telerik.Web.UI.Orientation",false);
Telerik.Web.UI.RadWebControl=function(a){Telerik.Web.UI.RadWebControl.initializeBase(this,[a]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.RadWebControl.prototype={initialize:function(){Telerik.Web.UI.RadWebControl.callBaseMethod(this,"initialize");
$telerik.registerControl(this);
if(!this.get_clientStateFieldID()){return;
}var a=$get(this.get_clientStateFieldID());
if(!a){return;
}a.setAttribute("autocomplete","off");
},dispose:function(){$telerik.unregisterControl(this);
var b=this.get_element();
Telerik.Web.UI.RadWebControl.callBaseMethod(this,"dispose");
if(b){b.control=null;
var a=true;
if(b._events){for(var c in b._events){if(b._events[c].length>0){a=false;
break;
}}if(a){b._events=null;
}}}},raiseEvent:function(b,c){var a=this.get_events().getHandler(b);
if(a){if(!c){c=Sys.EventArgs.Empty;
}a(this,c);
}},updateClientState:function(){this.set_clientState(this.saveClientState());
},saveClientState:function(){return null;
},get_clientStateFieldID:function(){return this._clientStateFieldID;
},set_clientStateFieldID:function(a){if(this._clientStateFieldID!=a){this._clientStateFieldID=a;
this.raisePropertyChanged("ClientStateFieldID");
}},get_clientState:function(){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);
if(a){return a.value;
}}return null;
},set_clientState:function(b){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);
if(a){a.value=b;
}}},_getChildElement:function(a){return $get(this.get_id()+"_"+a);
},_findChildControl:function(a){return $find(this.get_id()+"_"+a);
}};
Telerik.Web.UI.RadWebControl.registerClass("Telerik.Web.UI.RadWebControl",Sys.UI.Control);
Telerik.Web.Timer=function(){Telerik.Web.Timer.initializeBase(this);
this._interval=1000;
this._enabled=false;
this._timer=null;
this._timerCallbackDelegate=Function.createDelegate(this,this._timerCallback);
};
Telerik.Web.Timer.prototype={get_interval:function(){return this._interval;
},set_interval:function(a){if(this._interval!==a){this._interval=a;
this.raisePropertyChanged("interval");
if(!this.get_isUpdating()&&(this._timer!==null)){this._stopTimer();
this._startTimer();
}}},get_enabled:function(){return this._enabled;
},set_enabled:function(a){if(a!==this.get_enabled()){this._enabled=a;
this.raisePropertyChanged("enabled");
if(!this.get_isUpdating()){if(a){this._startTimer();
}else{this._stopTimer();
}}}},add_tick:function(a){this.get_events().addHandler("tick",a);
},remove_tick:function(a){this.get_events().removeHandler("tick",a);
},dispose:function(){this.set_enabled(false);
this._stopTimer();
Telerik.Web.Timer.callBaseMethod(this,"dispose");
},updated:function(){Telerik.Web.Timer.callBaseMethod(this,"updated");
if(this._enabled){this._stopTimer();
this._startTimer();
}},_timerCallback:function(){var a=this.get_events().getHandler("tick");
if(a){a(this,Sys.EventArgs.Empty);
}},_startTimer:function(){this._timer=window.setInterval(this._timerCallbackDelegate,this._interval);
},_stopTimer:function(){window.clearInterval(this._timer);
this._timer=null;
}};
Telerik.Web.Timer.registerClass("Telerik.Web.Timer",Sys.Component);
Telerik.Web.BoxSide=function(){};
Telerik.Web.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};
Telerik.Web.BoxSide.registerEnum("Telerik.Web.BoxSide",false);
Telerik.Web.UI.WebServiceLoaderEventArgs=function(a){Telerik.Web.UI.WebServiceLoaderEventArgs.initializeBase(this);
this._context=a;
};
Telerik.Web.UI.WebServiceLoaderEventArgs.prototype={get_context:function(){return this._context;
}};
Telerik.Web.UI.WebServiceLoaderEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderEventArgs",Sys.EventArgs);
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs=function(a,b){Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.initializeBase(this,[b]);
this._data=a;
};
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.prototype={get_data:function(){return this._data;
}};
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderSuccessEventArgs",Telerik.Web.UI.WebServiceLoaderEventArgs);
Telerik.Web.UI.WebServiceLoaderErrorEventArgs=function(a,b){Telerik.Web.UI.WebServiceLoaderErrorEventArgs.initializeBase(this,[b]);
this._message=a;
};
Telerik.Web.UI.WebServiceLoaderErrorEventArgs.prototype={get_message:function(){return this._message;
}};
Telerik.Web.UI.WebServiceLoaderErrorEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderErrorEventArgs",Telerik.Web.UI.WebServiceLoaderEventArgs);
Telerik.Web.UI.WebServiceLoader=function(a){this._webServiceSettings=a;
this._events=null;
this._onWebServiceSuccessDelegate=Function.createDelegate(this,this._onWebServiceSuccess);
this._onWebServiceErrorDelegate=Function.createDelegate(this,this._onWebServiceError);
this._currentRequest=null;
};
Telerik.Web.UI.WebServiceLoader.prototype={get_webServiceSettings:function(){return this._webServiceSettings;
},get_events:function(){if(!this._events){this._events=new Sys.EventHandlerList();
}return this._events;
},loadData:function(c,a){var b=this.get_webServiceSettings();
this.invokeMethod(this._webServiceSettings.get_method(),c,a);
},invokeMethod:function(e,a,d){var c=this.get_webServiceSettings();
if(c.get_isEmpty()){alert("Please, specify valid web service and method.");
return;
}this._raiseEvent("loadingStarted",new Telerik.Web.UI.WebServiceLoaderEventArgs(d));
var f=c.get_path();
var b=c.get_useHttpGet();
this._currentRequest=Sys.Net.WebServiceProxy.invoke(f,e,b,a,this._onWebServiceSuccessDelegate,this._onWebServiceErrorDelegate,d);
},add_loadingStarted:function(a){this.get_events().addHandler("loadingStarted",a);
},add_loadingError:function(a){this.get_events().addHandler("loadingError",a);
},add_loadingSuccess:function(a){this.get_events().addHandler("loadingSuccess",a);
},_serializeDictionaryAsKeyValuePairs:function(a){var b=[];
for(var c in a){b[b.length]={Key:c,Value:a[c]};
}return b;
},_onWebServiceSuccess:function(b,a){var c=new Telerik.Web.UI.WebServiceLoaderSuccessEventArgs(b,a);
this._raiseEvent("loadingSuccess",c);
},_onWebServiceError:function(c,a){var b=new Telerik.Web.UI.WebServiceLoaderErrorEventArgs(c.get_message(),a);
this._raiseEvent("loadingError",b);
},_raiseEvent:function(b,c){var a=this.get_events().getHandler(b);
if(a){if(!c){c=Sys.EventArgs.Empty;
}a(this,c);
}}};
Telerik.Web.UI.WebServiceLoader.registerClass("Telerik.Web.UI.WebServiceLoader");
Telerik.Web.UI.WebServiceSettings=function(a){this._path=null;
this._method=null;
this._useHttpGet=false;
if(!a){a={};
}if(typeof(a.path)!="undefined"){this._path=a.path;
}if(typeof(a.method)!="undefined"){this._method=a.method;
}if(typeof(a.useHttpGet)!="undefined"){this._useHttpGet=a.useHttpGet;
}};
Telerik.Web.UI.WebServiceSettings.prototype={get_isWcf:function(){return/\.svc$/.test(this._path);
},get_path:function(){return this._path;
},set_path:function(a){this._path=a;
},get_method:function(){return this._method;
},set_method:function(a){this._method=a;
},get_useHttpGet:function(){return this._useHttpGet;
},set_useHttpGet:function(a){this._useHttpGet=a;
},get_isEmpty:function(){var a=this.get_path();
var b=this.get_method();
return(!(a&&b));
}};
Telerik.Web.UI.WebServiceSettings.registerClass("Telerik.Web.UI.WebServiceSettings");
Telerik.Web.UI.ActionsManager=function(a){Telerik.Web.UI.ActionsManager.initializeBase(this);
this._actions=[];
this._currentActionIndex=-1;
};
Telerik.Web.UI.ActionsManager.prototype={get_actions:function(){return this._actions;
},shiftPointerLeft:function(){this._currentActionIndex--;
},shiftPointerRight:function(){this._currentActionIndex++;
},get_currentAction:function(){return this.get_actions()[this._currentActionIndex];
},get_nextAction:function(){return this.get_actions()[this._currentActionIndex+1];
},addAction:function(a){if(a){var b=new Telerik.Web.UI.ActionsManagerEventArgs(a);
this.raiseEvent("executeAction",b);
this._clearActionsToRedo();
Array.add(this._actions,a);
this._currentActionIndex=this._actions.length-1;
return true;
}return false;
},undo:function(c){if(c==null){c=1;
}if(c>this._actions.length){c=this._actions.length;
}var d=0;
var b=null;
while(0<c--&&0<=this._currentActionIndex&&this._currentActionIndex<this._actions.length){b=this._actions[this._currentActionIndex--];
if(b){var a=new Telerik.Web.UI.ActionsManagerEventArgs(b);
this.raiseEvent("undoAction",a);
d++;
}}},redo:function(c){if(c==null){c=1;
}if(c>this._actions.length){c=this._actions.length;
}var d=0;
var b=null;
var e=this._currentActionIndex+1;
while(0<c--&&0<=e&&e<this._actions.length){b=this._actions[e];
if(b){var a=new Telerik.Web.UI.ActionsManagerEventArgs(b);
this.raiseEvent("redoAction",a);
this._currentActionIndex=e;
d++;
}e++;
}},removeActionAt:function(a){this._actions.splice(a,1);
if(this._currentActionIndex>=a){this._currentActionIndex--;
}},canUndo:function(){return(-1<this._currentActionIndex);
},canRedo:function(){return(this._currentActionIndex<this._actions.length-1);
},getActionsToUndo:function(){if(this.canUndo()){return(this._actions.slice(0,this._currentActionIndex+1)).reverse();
}return[];
},getActionsToRedo:function(){if(this.canRedo()){return this._actions.slice(this._currentActionIndex+1);
}return[];
},_clearActionsToRedo:function(){if(this.canRedo()){var a=this._currentActionIndex+2;
if(a<this._actions.length){this._actions.splice(a,this._actions.length-a);
}}},add_undoAction:function(a){this.get_events().addHandler("undoAction",a);
},remove_undoAction:function(a){this.get_events().removeHandler("undoAction",a);
},add_redoAction:function(a){this.get_events().addHandler("redoAction",a);
},remove_redoAction:function(a){this.get_events().removeHandler("redoAction",a);
},add_executeAction:function(a){this.get_events().addHandler("executeAction",a);
},remove_executeAction:function(a){this.get_events().removeHandler("executeAction",a);
},raiseEvent:function(b,c){var a=this.get_events().getHandler(b);
if(a){a(this,c);
}}};
Telerik.Web.UI.ActionsManager.registerClass("Telerik.Web.UI.ActionsManager",Sys.Component);
Telerik.Web.UI.ActionsManagerEventArgs=function(a){Telerik.Web.UI.ActionsManagerEventArgs.initializeBase(this);
this._action=a;
};
Telerik.Web.UI.ActionsManagerEventArgs.prototype={get_action:function(){return this._action;
}};
Telerik.Web.UI.ActionsManagerEventArgs.registerClass("Telerik.Web.UI.ActionsManagerEventArgs",Sys.CancelEventArgs);
Telerik.Web.StringBuilder=function(a){this._buffer=a||[];
},Telerik.Web.StringBuilder.prototype={append:function(b){for(var a=0;
a<arguments.length;
a++){this._buffer[this._buffer.length]=arguments[a];
}return this;
},toString:function(){return this._buffer.join("");
},get_buffer:function(){return this._buffer;
}};

Type.registerNamespace("Telerik.Web");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.ModalExtender=function(a){this._windowResizeDelegate=null;
this._windowScrollDelegate=null;
this._xCoordinate=-1;
this._yCoordinate=-1;
this._backgroundElement=null;
this._foregroundElement=a;
this._saveTabIndexes=new Array();
this._saveDesableSelect=new Array();
this._tagWithTabIndex=new Array("A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME");
};
Telerik.Web.UI.ModalExtender.prototype={dispose:function(){this.hide();
this._backgroundElement=null;
this._foregroundElement=null;
},show:function(){var c=this._getModalOverlay();
if($telerik.getVisible(c)){return;
}this._attachWindowHandlers(true);
var b=this._foregroundElement;
b.parentNode.appendChild(c);
var a=$telerik.getCurrentStyle(b,"zIndex");
if(!isNaN(parseInt(a))){c.style.zIndex=a-1;
}c.style.display="";
this._disableTab();
this._updatePageLayout();
this._updatePageLayout();
},_storeBrowserPosition:function(){var a=document.body;
var b=document.documentElement;
this._browserTop=a.scrollTop>b.scrollTop?a.scrollTop:b.scrollTop;
this._browserLeft=a.scrollLeft>b.scrollLeft?a.scrollTop:b.scrollLeft;
},_restoreBrowserPosition:function(b,d){try{if(null==b){b=this._browserLeft;
}if(null==d){d=this._browserTop;
}var e=document.body;
var c=document.documentElement;
e.scrollTop=d;
e.scrollLeft=b;
c.scrollTop=d;
c.scrollLeft=b;
}catch(a){}},hide:function(){this._restoreTab();
this._attachWindowHandlers(false);
var a=this._backgroundElement;
if(a){if(a.parentNode){a.parentNode.removeChild(a);
}this._backgroundElement=null;
}},_enableScroll:function(a){if(a){document.body.style.overflow=null!=this._overflow?this._overflow:"";
document.documentElement.style.overflow=null!=this._documentOverflow?this._documentOverflow:"";
document.body.style.marginRight="";
}else{this._overflow=document.body.style.overflow;
document.body.style.overflow="hidden";
this._documentOverflow=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
document.body.style.marginRight="18px";
}},_getModalOverlay:function(){if(!this._backgroundElement){var a=document.createElement("div");
a.style.display="none";
a.style.position="absolute";
if($telerik.isRightToLeft(this._foregroundElement)){a.style.right="0px";
}else{a.style.left="0px";
}a.style.top="0px";
a.style.zIndex=10000;
a.style.backgroundColor="#aaaaaa";
a.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50)";
a.style.opacity=".5";
a.style.MozOpacity=".5";
a.setAttribute("unselectable","on");
a.className="TelerikModalOverlay";
this._backgroundElement=a;
}return this._backgroundElement;
},_attachWindowHandlers:function(b){var a=window;
if(true==b){this._windowResizeDelegate=Function.createDelegate(this,this._updatePageLayout);
$addHandler(a,"resize",this._windowResizeDelegate);
this._windowScrollDelegate=Function.createDelegate(this,this._updatePageLayout);
$addHandler(a,"scroll",this._windowScrollDelegate);
}else{if(this._windowResizeDelegate){$removeHandler(a,"resize",this._windowResizeDelegate);
}this._windowResizeDelegate=null;
if(this._windowScrollDelegate){$removeHandler(a,"scroll",this._windowScrollDelegate);
}this._windowScrollDelegate=null;
}},_updatePageLayout:function(){var f=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body));
var e=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
var c=$telerik.getClientBounds();
var a=c.width;
var d=c.height;
var b=this._getModalOverlay();
b.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),a)+"px";
b.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),d)+"px";
},_disableTab:function(){var d=0;
var a;
var f=new Array();
Array.clear(this._saveTabIndexes);
for(var b=0;
b<this._tagWithTabIndex.length;
b++){a=this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[b]);
for(var c=0;
c<a.length;
c++){f[d]=a[c];
d++;
}}d=0;
for(var b=0;
b<this._tagWithTabIndex.length;
b++){a=document.getElementsByTagName(this._tagWithTabIndex[b]);
for(var c=0;
c<a.length;
c++){if(Array.indexOf(f,a[c])==-1){this._saveTabIndexes[d]={tag:a[c],index:a[c].tabIndex};
a[c].tabIndex="-1";
d++;
}}}d=0;
if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){var e=new Array();
for(var b=0;
b<this._tagWithTabIndex.length;
b++){a=this._foregroundElement.getElementsByTagName("SELECT");
for(var c=0;
c<a.length;
c++){e[d]=a[c];
d++;
}}d=0;
Array.clear(this._saveDesableSelect);
a=document.getElementsByTagName("SELECT");
for(var c=0;
c<a.length;
c++){if(Array.indexOf(e,a[c])==-1){this._saveDesableSelect[d]={tag:a[c],visib:$telerik.getCurrentStyle(a[c],"visibility")};
a[c].style.visibility="hidden";
d++;
}}}},_restoreTab:function(){for(var b=0;
b<this._saveTabIndexes.length;
b++){this._saveTabIndexes[b].tag.tabIndex=this._saveTabIndexes[b].index;
}if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){for(var a=0;
a<this._saveDesableSelect.length;
a++){this._saveDesableSelect[a].tag.style.visibility=this._saveDesableSelect[a].visib;
}}}};
Telerik.Web.UI.ModalExtender.registerClass("Telerik.Web.UI.ModalExtender",null);
Type.registerNamespace("Telerik.Web");
Telerik.Web.PositioningMode=function(){throw Error.invalidOperation();
};
Telerik.Web.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5};
Telerik.Web.PositioningMode.registerEnum("Telerik.Web.PositioningMode");
Telerik.Web.PopupBehavior=function(a){Telerik.Web.PopupBehavior.initializeBase(this,[a]);
this._x=0;
this._y=0;
this._positioningMode=Telerik.Web.PositioningMode.Absolute;
this._parentElement=null;
this._parentElementID=null;
this._moveHandler=null;
this._firstPopup=true;
this._originalParent=null;
this._overlay=false;
this._keepInScreenBounds=true;
this._manageVisibility=true;
};
Telerik.Web.PopupBehavior._ie6pinnedList={};
Telerik.Web.PopupBehavior.prototype={getPageOffset:function(){var a={x:($telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body)),y:(document.documentElement.scrollTop||document.body.scrollTop)};
return a;
},pin:function(c){var a=this.get_elementToShow();
var d=this.getPageOffset();
if($telerik.isIE6){var e=this.get_id();
if(c){if(Telerik.Web.PopupBehavior._ie6pinnedList[e]){return;
}var b=$telerik.getBounds(a);
Telerik.Web.PopupBehavior._ie6pinnedList[e]=window.setInterval(Function.createDelegate(this,function(){var h=this.getPageOffset();
var j=b.x-d.x+h.x;
var k=b.y-d.y+h.y;
if(this.get_x()==j&&this.get_y()==k){return;
}var i=this.get_parentElement();
this.set_parentElement(document.documentElement);
this.set_x(j);
this.set_y(k);
this.show();
this.set_parentElement(i);
}),130);
}else{var g=Telerik.Web.PopupBehavior._ie6pinnedList[e];
if(g){window.clearInterval(g);
}delete Telerik.Web.PopupBehavior._ie6pinnedList[e];
}}else{var f=c?"fixed":"absolute";
if(a.style.position==f){return;
}var b=$telerik.getBounds(a);
if(c&&(d.x||d.y)){this._x=b.x-d.x;
this._y=b.y-d.y;
$telerik.setLocation(a,{x:this._x,y:this._y});
}a.style.position=f;
}},center:function(){var c=this.get_elementToShow();
if(this._manageVisibility){$telerik.setVisible(c,true);
}var d=$telerik.getClientBounds();
var f=$telerik.getBounds(c);
var a=parseInt((d.width-f.width)/2);
var b=parseInt((d.height-f.height)/2);
var e=this.get_parentElement();
this.set_parentElement(document.documentElement);
this.set_x(a);
this.set_y(b);
this.show();
this.set_parentElement(e);
},get_parentElement:function(){if(!this._parentElement&&this._parentElementID){this.set_parentElement($get(this._parentElementID));
Sys.Debug.assert(this._parentElement!=null,String.format('Couldn\'t find parent element "{0}"',this._parentElementID));
}return this._parentElement;
},set_parentElement:function(a){this._parentElement=a;
},get_parentElementID:function(){if(this._parentElement){return this._parentElement.id;
}return this._parentElementID;
},set_parentElementID:function(a){this._parentElementID=a;
if(this.get_isInitialized()){this.set_parentElement($get(a));
}},get_positioningMode:function(){return this._positioningMode;
},set_positioningMode:function(a){this._positioningMode=a;
},get_x:function(){return this._x;
},set_x:function(a){if(a!=this._x){this._x=a;
if($telerik.getVisible(this.get_elementToShow())&&this._manageVisibility){this.show();
}}},get_y:function(){return this._y;
},set_y:function(a){if(a!=this._y){this._y=a;
if($telerik.getVisible(this.get_elementToShow())&&this._manageVisibility){this.show();
}}},get_overlay:function(){return this._overlay;
},set_overlay:function(a){this._overlay=a;
this._attachWindowHandlers(false);
if(this._overlay){this._attachWindowHandlers(true);
}else{if(!((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7))){var c=this.get_elementToShow();
var b=c._hideWindowedElementsIFrame;
if(b){b.style.display="none";
}}}},get_manageVisibility:function(){return this._manageVisibility;
},set_manageVisibility:function(a){this._manageVisibility=a;
},get_keepInScreenBounds:function(){return this._keepInScreenBounds;
},set_keepInScreenBounds:function(a){this._keepInScreenBounds=a;
},get_elementToShow:function(){return this._elementToShow?this._elementToShow:this.get_element();
},set_elementToShow:function(a){if(this._elementToShow){this._detachElementToShow();
}this._elementToShow=a;
},_detachElementToShow:function(){var c=this.get_elementToShow();
if(this._moveHandler){$telerik.removeExternalHandler(c,"move",this._moveHandler);
this._moveHandler=null;
}var d=c._hideWindowedElementsIFrame;
if(d){var a=d.parentNode;
var b=d.nextSibling;
if(a){a.removeChild(d);
if(b){a.insertBefore(document.createElement("span"),b);
}else{a.appendChild(document.createElement("span"));
}}}},hide:function(){var b=this.get_elementToShow();
if(this._manageVisibility){$telerik.setVisible(b,false);
}if(b.originalWidth){b.style.width=b.originalWidth+"px";
b.originalWidth=null;
}if(Sys.Browser.agent===Sys.Browser.InternetExplorer||this._overlay){var a=b._hideWindowedElementsIFrame;
if(a){a.style.display="none";
}}},show:function(){var a=this.get_elementToShow();
a.style.position="absolute";
var j=document.documentElement;
if($telerik.isFirefox){var l=$telerik.getCurrentStyle(j,"overflow");
if("hidden"==l){a.style.left=j.scrollLeft+"px";
a.style.top=j.scrollLeft+"px";
}}var i=this._manageVisibility;
if(i){$telerik.setVisible(a,true);
}var h=a.offsetParent||j;
if(i){$telerik.setVisible(a,false);
}var f;
var e;
if(this._parentElement){e=$telerik.getBounds(this._parentElement);
var k=this._getOffsetParentLocation(h);
f={x:e.x-k.x,y:e.y-k.y};
}else{e=$telerik.getBounds(h);
f={x:0,y:0};
}if(i){$telerik.setVisible(a,true);
}var c=a.offsetWidth-(a.clientLeft?a.clientLeft*2:0);
var b=a.offsetHeight-(a.clientTop?a.clientTop*2:0);
var g;
switch(this._positioningMode){case Telerik.Web.PositioningMode.Center:g={x:Math.round(e.width/2-c/2),y:Math.round(e.height/2-b/2)};
break;
case Telerik.Web.PositioningMode.BottomLeft:g={x:0,y:e.height};
break;
case Telerik.Web.PositioningMode.BottomRight:g={x:e.width-c,y:e.height};
break;
case Telerik.Web.PositioningMode.TopLeft:g={x:0,y:-a.offsetHeight};
break;
case Telerik.Web.PositioningMode.TopRight:g={x:e.width-c,y:-a.offsetHeight};
break;
default:g={x:0,y:0};
}g.x+=this._x+f.x;
g.y+=this._y+f.y;
$telerik.setLocation(a,g);
if(this._firstPopup){a.style.width=c+"px";
}this._firstPopup=false;
var d=this._fixPositionInBounds();
this._createOverlay(d);
},_getViewportBounds:function(){var c=$telerik.getClientBounds();
var b=document.documentElement;
var a=document.body;
c.scrollLeft=($telerik.getCorrectScrollLeft(b)||$telerik.getCorrectScrollLeft(a));
c.scrollTop=(b.scrollTop||a.scrollTop);
return c;
},_getOffsetParentLocation:function(b){if(b&&b.tagName.toUpperCase()!="BODY"&&b.tagName.toUpperCase()!="HTML"){var a=$telerik.getLocation(b);
var c=$telerik.getBorderBox(b);
a.x+=c.top;
a.y+=c.left;
a.x-=$telerik.getCorrectScrollLeft(b);
a.y-=b.scrollTop;
return a;
}return{x:0,y:0};
},_fixPositionInBounds:function(){var c=this.get_elementToShow();
var l=$telerik.getBounds(c);
if(!this._keepInScreenBounds){return l;
}var k=this._getViewportBounds();
var a=false;
var j=(k.width>l.width);
var m=(k.height>l.height);
var d=k.scrollTop;
var i=k.height+d;
var b=k.scrollLeft;
var e=k.width+b;
if(($telerik.isIE8||$telerik.isOpera||$telerik.isSafari)&&$telerik.isRightToLeft(document.body)){var g=c.style.display;
if($telerik.isOpera){c.style.display="none";
}var f=document.documentElement.scrollWidth;
e=f?f:document.body.scrollWidth;
if($telerik.isOpera){c.style.display=g;
}}if(l.x<b||!j){l.x=b;
a=true;
}if(l.y<d||!m){l.y=d;
a=true;
}if(j&&(l.x+l.width>e)){l.x=e-l.width;
a=true;
}if(m&&(i<l.y+l.height)){l.y=i-l.height;
a=true;
}if(a){var h=this._getOffsetParentLocation(c.offsetParent);
l.y-=h.y;
l.x-=h.x;
$telerik.setLocation(c,l);
}return l;
},_createOverlay:function(a){if(!$telerik.isIE6&&!this._overlay){return;
}var d=this.get_elementToShow();
var b=d._hideWindowedElementsIFrame;
if(!b){b=document.createElement("iframe");
b.src="javascript:'<html></html>';";
b.style.position="absolute";
b.style.display="none";
b.scrolling="no";
b.frameBorder="0";
b.tabIndex="-1";
b.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
d.parentNode.insertBefore(b,d);
d._hideWindowedElementsIFrame=b;
this._moveHandler=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(d,"move",this._moveHandler);
}$telerik.setBounds(b,a);
if($telerik.isFirefox){var e=this._getViewportBounds();
b.style.top=parseInt(a.y)-e.scrollTop+"px";
b.style.left=parseInt(a.x)-e.scrollLeft+"px";
b.style.position="fixed";
if($telerik.isFirefox3){b.style.backgroundColor="#fff";
}}if($telerik.quirksMode){return;
}b.style.display=d.style.display;
var c=$telerik.getCurrentStyle(d,"zIndex");
if(c){b.style.zIndex=c;
}},_setCoordinates:function(b,c){var a=false;
if(b!=this._x){this._x=b;
a=true;
}if(c!=this._y){this._y=c;
a=true;
}if($telerik.getVisible(this.get_elementToShow())&&a&&this._manageVisibility){this.show();
}},initialize:function(){Telerik.Web.PopupBehavior.callBaseMethod(this,"initialize");
this.hide();
},dispose:function(){var a=this.get_elementToShow();
if(a){this._attachWindowHandlers(false);
if($telerik.getVisible(a)&&this._manageVisibility){this.hide();
}if(this._originalParent){a.parentNode.removeChild(a);
this._originalParent.appendChild(a);
this._originalParent=null;
}this._detachElementToShow();
}this._parentElement=null;
Telerik.Web.PopupBehavior.callBaseMethod(this,"dispose");
if(a&&a._behaviors&&a._behaviors.length==0){a._behaviors=null;
}a=null;
},_onMove:function(){var a=this.get_elementToShow();
var b=a._hideWindowedElementsIFrame;
if(b){if(Sys.Browser.agent===Sys.Browser.Firefox){var c=this._getViewportBounds();
b.style.top=parseInt(a.style.top)-c.scrollTop+"px";
b.style.left=parseInt(a.style.left)-c.scrollLeft+"px";
b.style.position="fixed";
}else{b.style.top=a.style.top;
b.style.left=a.style.left;
}}},_handleElementResize:function(){var b=this.get_elementToShow();
var c=b._hideWindowedElementsIFrame;
if(c){var a=$telerik.getBounds(b);
$telerik.setBounds(c,a);
}},_attachWindowHandlers:function(b){if(!Sys.Browser.agent===Sys.Browser.Firefox){return;
}var a=window;
if(true==b){this._windowResizeDelegate=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(a,"resize",this._windowResizeDelegate);
this._windowScrollDelegate=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(a,"scroll",this._windowScrollDelegate);
}else{if(this._windowResizeDelegate){$telerik.removeExternalHandler(a,"resize",this._windowResizeDelegate);
}this._windowResizeDelegate=null;
if(this._windowScrollDelegate){$telerik.removeExternalHandler(a,"scroll",this._windowScrollDelegate);
}this._windowScrollDelegate=null;
}}};
Telerik.Web.PopupBehavior.registerClass("Telerik.Web.PopupBehavior",Sys.UI.Behavior);
Type.registerNamespace("Telerik.Web");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.ResizeExtender=function(d,b,c,f,e,a,g){this._document=e?e:document;
this._documentMouseMoveDelegate=null;
this._documentMouseUpDelegate=null;
this._element=null;
this._tableElement=null;
this._moveCursorType="move";
this._enabled=true;
this._jsOwner=null;
this._hideIframes=true;
this._autoScrollEnabled=true;
this._saveDelegates={};
this._iframeToSkip=null;
this.makeResizable(d,b,c,f,a,g);
};
Telerik.Web.UI.ResizeExtender.containsBounds=function(a,b){if(!a||!b){return false;
}var c=$telerik.containsPoint(a,b.x,b.y);
if(c){var d=b.x+b.width;
var e=b.y+b.height;
c=$telerik.containsPoint(a,d,e);
}return c;
};
Telerik.Web.UI.ResizeExtender.prototype={dispose:function(){this._attachDocumentHandlers(false);
this._configureHandleElements(false);
this._iframeToSkip=null;
this._jsOwner=null;
},enable:function(a){this._enabled=a;
},set_hideIframes:function(a){this._hideIframes=a;
},get_hideIframes:function(){return this._hideIframes;
},set_iframeToSkip:function(a){this._iframeToSkip=a;
},get_iframeToSkip:function(){return this._iframeToSkip;
},makeResizable:function(c,d,b,f,a,e){if(!d){return;
}if(this._element){alert("Element "+d.getAttribute("id")+" cannot be made resizable, as the resizeExtender already has the element "+this._element.getAttribute("id")+" associated with it. You must create a new extender resizer object");
return;
}this._jsOwner=c;
this._element=d;
this._tableElement=f;
this._resizeHandles=b;
if(a){this._moveCursorType=a;
}if(e!=null){this._autoScrollEnabled=e;
}this._startX=0;
this._startY=0;
this._cancelResize=true;
this._configureHandleElements(true);
},_raiseDragEvent:function(c,d,b){if(this._jsOwner&&this._jsOwner["on"+c]){var a=d;
if(!a){a={};
}a.element=this._element;
a.ownerEvent=b;
return this._jsOwner["on"+c](a);
}return true;
},_raiseEvent:function(b,a){if(this._jsOwner&&this._jsOwner["on"+b]){if(!a){a=new Sys.EventArgs();
}else{if(b=="Resize"){a=this._resizeDir;
}else{if(b=="Resizing"){a=this._getProposedBounds(a);
}}}return this._jsOwner["on"+b](a);
}return true;
},_getProposedBounds:function(a){var b=$telerik.getBounds(this._element);
return{x:a.x||b.x,y:a.y||b.y,width:a.width||b.width,height:a.height||b.height};
},_resize:function(i){if(!this._enabled||this._cancelResize){return false;
}var b=0;
var c=0;
var h=0;
var f=0;
var d=this._originalBounds;
var g=this._resizeDir.move;
if(g){h=d.x+(i.clientX-this._startX);
f=d.y+(i.clientY-this._startY);
}else{if(this._resizeDir.east){b=d.width+(i.clientX-this._startX);
}else{if(this._resizeDir.west){h=i.clientX-this._leftHandleMouseDelta;
b=d.width-(i.clientX-this._startX);
}}if(this._resizeDir.south){c=d.height+(i.clientY-this._startY);
}else{if(this._resizeDir.north){f=d.y+(i.clientY-this._startY);
c=d.height-(i.clientY-this._startY);
}}}if(this._offsetLocation){h-=this._offsetLocation.x;
f-=this._offsetLocation.y;
}var a=new Sys.UI.Bounds(h,f,b,c);
var j=g?this._raiseDragEvent("Drag",a,i):this._raiseEvent("Resizing",a);
if(false==j){return true;
}if(g||a.x>0){this._element.style.left=a.x+"px";
}if(g||a.y>0){this._element.style.top=a.y+"px";
}if(a.width>0){this._element.style.width=a.width+"px";
}if(a.height>0){this._element.style.height=a.height+"px";
}if(!g){this._updateInnerTableSize();
}return true;
},getPositionedParent:function(){var a=this._element.parentNode;
while(a&&a!=document){if("static"!=$telerik.getCurrentStyle(a,"position","static")){return a;
}a=a.parentNode;
}return null;
},_storeStartCoords:function(f){if(!this._enabled){return;
}this._cancelResize=false;
this._startX=f.clientX;
this._startY=f.clientY;
var g=$telerik.getBounds(this._element);
var h=false;
if(this._element.id!=null&&Telerik.Web.UI.RadDock&&Telerik.Web.UI.RadDock.isInstanceOfType($find(this._element.id))){h=true;
}if($telerik.isIE&&h!=true){var i=this.getPositionedParent();
if(i){g.x+=i.scrollLeft;
g.y+=i.scrollTop;
}}this._originalBounds=g;
var d=f.target?f.target:f.srcElement;
if(d&&d.type==3){d=d.parentNode;
}this._resizeType=$telerik.getCurrentStyle(d,"cursor");
if(!this._resizeType&&f.currentTarget){this._resizeType=$telerik.getCurrentStyle(f.currentTarget,"cursor");
}this._resizeDir={north:this._resizeType.match(/n.?-/)?1:0,east:this._resizeType.match(/e-/)?1:0,south:this._resizeType.match(/s.?-/)?1:0,west:this._resizeType.match(/w-/)?1:0,move:new RegExp(this._moveCursorType).test(this._resizeType)?1:0};
this._leftHandleMouseDelta=0;
if(this._resizeDir.west){this._leftHandleMouseDelta=Math.abs(g.x-this._startX);
}var b=this._resizeDir.move?this._raiseDragEvent("DragStart",null,f):this._raiseEvent("ResizeStart");
this._cancelResize=(b==false);
var a=$telerik.getCurrentStyle(this._element.parentNode,"position");
var c=("relative"==a)||("absolute"==a);
this._offsetLocation=c?$telerik.getLocation(this._element.parentNode):null;
if(!this._cancelResize){this._clearSelection();
this._setIframesVisible(false);
this._attachDocumentHandlers(false);
this._attachDocumentHandlers(true);
}},_updateInnerTableSize:function(){var a=this._resizeDir;
if(a.south||a.north){var b=this._element.style.height;
var c=this._tableElement;
if(c){c.style.height=b;
this._fixIeHeight(c,b);
}}},_setIframesVisible:function(c){if(!this._hideIframes){return;
}var f=this._document.getElementsByTagName("IFRAME");
var e=this.get_iframeToSkip();
for(var a=0;
a<f.length;
a++){var d=f[a];
if(e&&(e===d||e==d)){continue;
}d.style.visibility=c?"":"hidden";
if($telerik.isIE){try{d.contentWindow.document.body.style.visibility=c?"":"hidden";
}catch(b){}}}},_configureHandleElements:function(d){var e=["nw","n","ne","w","e","sw","s","se",this._moveCursorType];
for(var a=0;
a<e.length;
a++){var c=e[a];
var f=this._resizeHandles[c];
if(f){if(f instanceof Array){for(var b=0;
b<f.length;
b++){this._configureHandle("id"+a+"_"+b,d,f[b],c);
}}else{this._configureHandle("id"+a,d,f,c);
}}}if(!d){this._saveDelegates={};
}},_configureHandle:function(c,b,e,a){if(b){var f=Function.createDelegate(this,this._onHandleMouseDown);
$telerik.addExternalHandler(e,"mousedown",f);
this._saveDelegates[c]={delegate:f,element:e};
var d=(a==this._moveCursorType?this._moveCursorType:a+"-resize");
e.style.cursor=d;
}else{$telerik.removeExternalHandler(e,"mousedown",this._saveDelegates[c].delegate);
e.style.cursor="";
}},_attachDocumentHandlers:function(b){var a=this._document;
if(true==b){this._documentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove);
$telerik.addExternalHandler(a,"mousemove",this._documentMouseMoveDelegate);
this._documentMouseUpDelegate=Function.createDelegate(this,this._onDocumentMouseUp);
$telerik.addExternalHandler(a,"mouseup",this._documentMouseUpDelegate);
}else{if(this._documentMouseMoveDelegate){$telerik.removeExternalHandler(a,"mousemove",this._documentMouseMoveDelegate);
}this._documentMouseMoveDelegate=null;
if(this._documentMouseUpDelegate){$telerik.removeExternalHandler(a,"mouseup",this._documentMouseUpDelegate);
}this._documentMouseUpDelegate=null;
}},_onDocumentMouseMove:function(b){var a=this._resize(b);
if(this._autoScrollEnabled){this._autoScroll(b);
}if(a){return $telerik.cancelRawEvent(b);
}},_onDocumentMouseUp:function(b){var a=!this._cancelResize;
this._cancelResize=true;
if(a){this._clearSelection();
this._setIframesVisible(true);
if(this._resizeDir&&this._resizeDir.move){this._raiseDragEvent("DragEnd",null,b);
}else{this._raiseEvent("ResizeEnd");
}this._attachDocumentHandlers(false);
if(this._scroller){this._scroller.set_enabled(false);
}}},_onHandleMouseDown:function(a){this._storeStartCoords(a);
return $telerik.cancelRawEvent(a);
},_clearSelection:function(){if(this._document.selection&&this._document.selection.empty){try{this._document.selection.empty();
}catch(a){}}},_fixIeHeight:function(b,a){if("CSS1Compat"==document.compatMode){var c=(b.offsetHeight-parseInt(a));
if(c>0){var d=(parseInt(b.style.height)-c);
if(d>0){b.style.height=d+"px";
}}}},_initializeAutoScroll:function(){if(this._autoScrollInitialized){return;
}this._scrollEdgeConst=40;
this._scrollByConst=10;
this._scroller=null;
this._scrollDeltaX=0;
this._scrollDeltaY=0;
this._scrollerTickHandler=Function.createDelegate(this,this._onScrollerTick);
this._scroller=new Telerik.Web.Timer();
this._scroller.set_interval(10);
this._scroller.add_tick(this._scrollerTickHandler);
this._autoScrollInitialized=true;
},_autoScroll:function(b){this._initializeAutoScroll();
var c=$telerik.getClientBounds();
if(c.width>0){this._scrollDeltaX=this._scrollDeltaY=0;
if(b.clientX<c.x+this._scrollEdgeConst){this._scrollDeltaX=-this._scrollByConst;
}else{if(b.clientX>c.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst;
}}if(b.clientY<c.y+this._scrollEdgeConst){this._scrollDeltaY=-this._scrollByConst;
}else{if(b.clientY>c.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst;
}}var a=this._scroller;
if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._originalStartX=this._startX;
this._originalStartY=this._startY;
a.set_enabled(true);
}else{if(a.get_enabled()){this._startX=this._originalStartX;
this._startY=this._originalStartY;
}a.set_enabled(false);
}}},_onScrollerTick:function(){var c=document.documentElement.scrollLeft||document.body.scrollLeft;
var g=document.documentElement.scrollTop||document.body.scrollTop;
window.scrollBy(this._scrollDeltaX,this._scrollDeltaY);
var i=document.documentElement.scrollLeft||document.body.scrollLeft;
var h=document.documentElement.scrollTop||document.body.scrollTop;
var f=i-c;
var b=h-g;
var a=this._element;
var d={x:parseInt(a.style.left)+f,y:parseInt(a.style.top)+b};
this._startX-=f;
this._startY-=b;
try{$telerik.setLocation(a,d);
}catch(e){}}};
Telerik.Web.UI.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null);

/*!
 * jQuery JavaScript Library v1.4.2
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Sat Feb 13 22:33:48 2010 -0500
 */
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);

// Move jQuery to $telerik
$telerik.$ = jQuery.noConflict(true);

if(typeof $telerik.$==="undefined"){$telerik.$=jQuery;
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright ? 2008 George McGinley Smith
 * All rights reserved.
*/
/*
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright ? 2001 Robert Penner
 * All rights reserved.
 */
}(function(a){a.easing.jswing=a.easing.swing;
a.extend(a.easing,{def:"easeOutQuad",swing:function(i,g,f,h,e){return a.easing[a.easing.def](i,g,f,h,e);
},easeLinear:function(i,g,f,h,e){return h*g/e+f;
},easeInQuad:function(i,g,f,h,e){return h*(g/=e)*g+f;
},easeOutQuad:function(i,g,f,h,e){return -h*(g/=e)*(g-2)+f;
},easeInOutQuad:function(i,g,f,h,e){if((g/=e/2)<1){return h/2*g*g+f;
}return -h/2*((--g)*(g-2)-1)+f;
},easeInCubic:function(i,g,f,h,e){return h*(g/=e)*g*g+f;
},easeOutCubic:function(i,g,f,h,e){return h*((g=g/e-1)*g*g+1)+f;
},easeInOutCubic:function(i,g,f,h,e){if((g/=e/2)<1){return h/2*g*g*g+f;
}return h/2*((g-=2)*g*g+2)+f;
},easeInQuart:function(i,g,f,h,e){return h*(g/=e)*g*g*g+f;
},easeOutQuart:function(i,g,f,h,e){return -h*((g=g/e-1)*g*g*g-1)+f;
},easeInOutQuart:function(i,g,f,h,e){if((g/=e/2)<1){return h/2*g*g*g*g+f;
}return -h/2*((g-=2)*g*g*g-2)+f;
},easeInQuint:function(i,g,f,h,e){return h*(g/=e)*g*g*g*g+f;
},easeOutQuint:function(i,g,f,h,e){return h*((g=g/e-1)*g*g*g*g+1)+f;
},easeInOutQuint:function(i,g,f,h,e){if((g/=e/2)<1){return h/2*g*g*g*g*g+f;
}return h/2*((g-=2)*g*g*g*g+2)+f;
},easeInSine:function(i,g,f,h,e){return -h*Math.cos(g/e*(Math.PI/2))+h+f;
},easeOutSine:function(i,g,f,h,e){return h*Math.sin(g/e*(Math.PI/2))+f;
},easeInOutSine:function(i,g,f,h,e){return -h/2*(Math.cos(Math.PI*g/e)-1)+f;
},easeInExpo:function(i,g,f,h,e){return(g==0)?f:h*Math.pow(2,10*(g/e-1))+f;
},easeOutExpo:function(i,g,f,h,e){return(g==e)?f+h:h*(-Math.pow(2,-10*g/e)+1)+f;
},easeInOutExpo:function(i,g,f,h,e){if(g==0){return f;
}if(g==e){return f+h;
}if((g/=e/2)<1){return h/2*Math.pow(2,10*(g-1))+f;
}return h/2*(-Math.pow(2,-10*--g)+2)+f;
},easeInCirc:function(i,g,f,h,e){return -h*(Math.sqrt(1-(g/=e)*g)-1)+f;
},easeOutCirc:function(i,g,f,h,e){return h*Math.sqrt(1-(g=g/e-1)*g)+f;
},easeInOutCirc:function(i,g,f,h,e){if((g/=e/2)<1){return -h/2*(Math.sqrt(1-g*g)-1)+f;
}return h/2*(Math.sqrt(1-(g-=2)*g)+1)+f;
},easeInElastic:function(e,j,g,h,i){var k=1.70158;
var f=0;
var l=h;
if(j==0){return g;
}if((j/=i)==1){return g+h;
}if(!f){f=i*0.3;
}if(l<Math.abs(h)){l=h;
var k=f/4;
}else{var k=f/(2*Math.PI)*Math.asin(h/l);
}return -(l*Math.pow(2,10*(j-=1))*Math.sin((j*i-k)*(2*Math.PI)/f))+g;
},easeOutElastic:function(e,j,g,h,i){var k=1.70158;
var f=0;
var l=h;
if(j==0){return g;
}if((j/=i)==1){return g+h;
}if(!f){f=i*0.3;
}if(l<Math.abs(h)){l=h;
var k=f/4;
}else{var k=f/(2*Math.PI)*Math.asin(h/l);
}return l*Math.pow(2,-10*j)*Math.sin((j*i-k)*(2*Math.PI)/f)+h+g;
},easeInOutElastic:function(e,j,g,h,i){var k=1.70158;
var f=0;
var l=h;
if(j==0){return g;
}if((j/=i/2)==2){return g+h;
}if(!f){f=i*(0.3*1.5);
}if(l<Math.abs(h)){l=h;
var k=f/4;
}else{var k=f/(2*Math.PI)*Math.asin(h/l);
}if(j<1){return -0.5*(l*Math.pow(2,10*(j-=1))*Math.sin((j*i-k)*(2*Math.PI)/f))+g;
}return l*Math.pow(2,-10*(j-=1))*Math.sin((j*i-k)*(2*Math.PI)/f)*0.5+h+g;
},easeInBack:function(e,i,f,g,h,j){if(j==undefined){j=1.70158;
}return g*(i/=h)*i*((j+1)*i-j)+f;
},easeOutBack:function(e,i,f,g,h,j){if(j==undefined){j=1.70158;
}return g*((i=i/h-1)*i*((j+1)*i+j)+1)+f;
},easeInOutBack:function(e,i,f,g,h,j){if(j==undefined){j=1.70158;
}if((i/=h/2)<1){return g/2*(i*i*(((j*=(1.525))+1)*i-j))+f;
}return g/2*((i-=2)*i*(((j*=(1.525))+1)*i+j)+2)+f;
},easeInBounce:function(i,g,f,h,e){return h-a.easing.easeOutBounce(i,e-g,0,h,e)+f;
},easeOutBounce:function(i,g,f,h,e){if((g/=e)<(1/2.75)){return h*(7.5625*g*g)+f;
}else{if(g<(2/2.75)){return h*(7.5625*(g-=(1.5/2.75))*g+0.75)+f;
}else{if(g<(2.5/2.75)){return h*(7.5625*(g-=(2.25/2.75))*g+0.9375)+f;
}else{return h*(7.5625*(g-=(2.625/2.75))*g+0.984375)+f;
}}}},easeInOutBounce:function(i,g,f,h,e){if(g<e/2){return a.easing.easeInBounce(i,g*2,0,h,e)*0.5+f;
}return a.easing.easeOutBounce(i,g*2-e,0,h,e)*0.5+h*0.5+f;
}});
})($telerik.$);
(function(c){c.fx.step.height=function(d){var f=$telerik.quirksMode?1:0;
var e=d.now>f?d.now:f;
d.elem.style[d.prop]=Math.round(e)+d.unit;
};
function a(e,d){return["live",e,d.replace(/\./g,"`").replace(/ /g,"|")].join(".");
}function b(d,e){c.each(e,function(f,g){if(f.indexOf("et_")>0){d[f]=g;
return;
}if(f=="domEvent"&&g){d["get_"+f]=function(){return new Sys.UI.DomEvent(g.originalEvent||g.rawEvent||g);
};
}else{d["get_"+f]=function(h){return function(){return h;
};
}(g);
}});
return d;
}c.extend({registerControlEvents:function(e,d){c.each(d,function(f,g){e.prototype["add_"+g]=function(h){this.get_events().addHandler(g,h);
};
e.prototype["remove_"+g]=function(h){this.get_events().removeHandler(g,h);
};
});
},registerControlProperties:function(e,d){c.each(d,function(f,g){e.prototype["get_"+f]=function(){var h=this["_"+f];
return typeof h=="undefined"?g:h;
};
e.prototype["set_"+f]=function(h){this["_"+f]=h;
};
});
},registerEnum:function(e,f,d){e[f]=function(){};
e[f].prototype=d;
e[f].registerEnum(e.getName()+"."+f);
},raiseControlEvent:function(e,f,g){var d=e.get_events().getHandler(f);
if(d){d(e,b(new Sys.EventArgs(),g));
}},raiseCancellableControlEvent:function(e,g,h){var d=e.get_events().getHandler(g);
if(d){var f=b(new Sys.CancelEventArgs(),h);
d(e,f);
return f.get_cancel();
}return false;
},isBogus:function(f){try{var e=f.parentNode;
return false;
}catch(d){return true;
}}});
c.eachCallback=function(g,e){var f=0;
function d(){if(g.length==0){return;
}var h=g[f];
e.apply(h);
f++;
if(f<g.length){setTimeout(d,1);
}}setTimeout(d,1);
};
c.fn.eachCallback=function(f){var g=0;
var d=this;
function e(){if(d.length==0){return;
}var h=d.get(g);
f.apply(h);
g++;
if(g<d.length){setTimeout(e,1);
}}setTimeout(e,1);
};
})($telerik.$);

Type.registerNamespace("Telerik.Web.UI.Animations");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.Animations.playJQueryAnimation=function(d,e,m,o,n,g,p,j){if(!d){return;
}if(!e){e=2;
}if(!m){m=new Sys.UI.Bounds(1,1,1,1);
}if(!o){o=new Sys.UI.Bounds(1,1,1,1);
}var i=j?j:500;
if(!n){n=32;
}n+="";
var h=parseInt(n.substr(0,1));
var k=parseInt(n.substr(1,1));
if(g){g();
}b(d).stop(false,true);
if(e==2){b(d).css({left:o.x,top:o.y}).fadeIn(i,p);
return;
}if(e==8){var f=$telerik.getClientBounds();
var l=$telerik.getClientBounds();
m.x=l.width/2;
m.y=l.height;
switch(k){case 2:m.x=o.x;
break;
case 3:m.x=f.width;
break;
case 1:m.x=f.x;
}switch(h){case 2:m.y=o.y;
break;
case 1:m.y=f.y-o.height;
break;
case 3:m.y=f.height;
}}else{if(e==4){m.x=o.x;
m.y=o.y;
m.width=o.width;
m.height=1;
switch(k){case 2:m.x=o.x;
break;
case 3:m.x=o.x;
break;
case 1:var c=o.x;
if(2==h){c+=o.width;
}m.x=c;
}switch(h){case 2:m.y=o.y;
m.height=o.height;
m.width=1;
break;
case 1:m.y=o.y+o.height;
break;
case 3:m.y=o.y;
}}else{if(e==1){}}}b(d).css({width:m.width,height:m.height,left:m.x,top:m.y,opacity:0.1,filter:"alpha(opacity=10)"}).show().animate({width:o.width,height:o.height,left:o.x,top:o.y,opacity:1},i,null,p);
};
b.fx.prototype.oldstep=b.fx.prototype.step;
b.fx.prototype.step=function(e){var c=this.prop;
if(c=="left"||c=="top"||c=="telerikCarouselAngle"){if(this.elem.getAttribute("paused")){if(!this.elem.getAttribute("elapsedTime")){var d=(+new Date)-this.startTime;
this.elem.setAttribute("elapsedTime",d);
}return true;
}if(this.elem.getAttribute("elapsedTime")){this.startTime=(+new Date)-this.elem.getAttribute("elapsedTime");
this.elem.removeAttribute("elapsedTime");
}}return this.oldstep(e);
};
a.Animations.jMoveBase=function(c,d,e,f){a.Animations.jMoveBase.initializeBase(this);
this._owner=c;
this._element=d;
this._duration=e;
this._events=null;
this._animationEndedDelegate=null;
this._isPlaying=false;
this._isPaused=false;
this._isCyclic=false;
this._easing=f;
this._isDisposed=false;
};
a.Animations.jMoveBase.prototype={initialize:function(){a.Animations.jMoveBase.callBaseMethod(this,"initialize");
this._animationEndedDelegate=Function.createDelegate(this,this._animationEnded);
},dispose:function(){if(this._isDisposed){return;
}this._getAnimationQuery().stop(true,false);
this._owner=null;
this._element=null;
this._animationEndedDelegate=null;
a.Animations.jMoveBase.callBaseMethod(this,"dispose");
this._isDisposed=true;
},get_isPlaying:function(){return this._isPlaying;
},get_isCyclic:function(){return this._isCyclic;
},set_isCyclic:function(c){this._isCyclic=c;
},get_easing:function(){return this._easing;
},set_easing:function(c){this._easing=c;
},get_isActive:function(){return true;
},play:function(c){var h=this._getAnimationQuery();
var d=h.attr("paused");
h.removeAttr("paused");
if(d&&h.attr("elapsedTime")){this._isPlaying=true;
this._isPaused=false;
}else{var f=this._owner;
var g=f.get_frameDuration();
if(this._isPaused&&this._isCyclic&&(g>0&&!c)&&f._setAnimationTimeout){f._setAnimationTimeout(g);
}else{var e=this._animationStarted();
if(e!=false){this._playAnimation();
this._isPlaying=true;
this._isPaused=false;
}}}},stop:function(){this._getAnimationQuery().stop(false,true);
this._isPlaying=false;
},pause:function(){if(this._isPlaying){this._getAnimationQuery().attr("paused",true);
}this._isPlaying=false;
this._isPaused=true;
},add_started:function(c){this.get_events().addHandler("started",c);
},remove_started:function(c){this.get_events().removeHandler("started",c);
},add_ended:function(c){this.get_events().addHandler("ended",c);
},remove_ended:function(c){this.get_events().removeHandler("ended",c);
},_getAnimationQuery:function(){return b(this._element);
},_playAnimation:function(){},_animationStarted:function(){var c=new Sys.CancelEventArgs();
this._raiseEvent("started",c);
return !c.get_cancel();
},_animationEnded:function(){this._isPlaying=false;
this._raiseEvent("ended",Sys.EventArgs.Empty);
},_raiseEvent:function(d,e){var c=this.get_events().getHandler(d);
if(c){if(!e){e=Sys.EventArgs.Empty;
}c(this,e);
}}};
a.Animations.jMoveBase.registerClass("Telerik.Web.UI.Animations.jMoveBase",Sys.Component);
a.Animations.jMove=function(f,c,e,h,g,d){a.Animations.jMove.initializeBase(this,[f,c,e,d]);
this._horizontal=(typeof(h)=="undefined"||h==null)?0:h;
this._vertical=(typeof(g)=="undefined"||g==null)?0:g;
};
a.Animations.jMove.prototype={initialize:function(){a.Animations.jMove.callBaseMethod(this,"initialize");
},dispose:function(){a.Animations.jMove.callBaseMethod(this,"dispose");
},get_vertical:function(){return this._vertical;
},set_vertical:function(c){this._vertical=c;
},get_horizontal:function(){return this._horizontal;
},set_horizontal:function(c){this._horizontal=c;
},_getFinalPosition:function(){return(isNaN(parseInt(this._vertical)))?this._horizontal:this._vertical;
},_getAnimatedProperty:function(){return(isNaN(parseInt(this._vertical)))?"left":"top";
},_getPosition:function(){return this._element.style[this._getAnimatedProperty()];
},_playAnimation:function(){var c=this._getFinalPosition();
var d=this._getAnimationQuery();
var e=this._getAnimatedProperty();
var f={queue:true};
f[e]=c;
d.stop(true,!this._isCyclic).animate(f,this._duration,this._easing,this._animationEndedDelegate);
}};
a.Animations.jMove.registerClass("Telerik.Web.UI.Animations.jMove",a.Animations.jMoveBase);
a.Animations.jCarousel=function(f,c,g,e,d,h){a.Animations.jCarousel.initializeBase(this,[f,c,e,h]);
this._items=g;
this._minScale=d.minScale;
this._x=d.xO;
this._y=d.yO;
this._xRadius=d.xR;
this._yRadius=d.yR;
this._angle=Math.PI/2;
};
a.Animations.jCarousel.prototype={initialize:function(){a.Animations.jCarousel.callBaseMethod(this,"initialize");
},dispose:function(){a.Animations.jCarousel.callBaseMethod(this,"dispose");
this._items=null;
},get_angle:function(){return this._angle;
},set_angle:function(c){this._angle=c;
},_getFinalPosition:function(){return this._angle;
},_getAnimatedProperty:function(){return"telerikCarouselAngle";
},_getAnimationQuery:function(){var c;
b.each(this._items,function(e,d){var f=this.element;
if(!c){c=b(f);
}else{c=c.add(f);
}});
return c;
},_playAnimation:function(){this._getAnimationQuery().stop(true,!this._isCyclic);
var f=this._minScale;
var d=(1-f)/2;
var h=this._items;
var e=(h.length>0)?((Math.PI*2)/h.length):0;
var c=this._angle;
var g=this;
b.each(h,function(i,j){b(this.element).stop(true,false).animate({queue:true,telerikCarouselAngle:c},{xO:g._x,yO:g._y,xR:g._xRadius,yR:g._yRadius,minScale:f,width:this.width,height:this.height,duration:g._duration,easing:g._easing,complete:g._animationEndedDelegate});
c+=e;
});
}};
a.Animations.jCarousel.registerClass("Telerik.Web.UI.Animations.jCarousel",a.Animations.jMoveBase);
b.fx.step.telerikCarouselAngle=function(i){var f=i.now;
var e=i.options;
var k=Math.sin(f);
var h=e.minScale;
var j=h+(k+1)*((1-h)/2);
var d=e.xO+(((Math.cos(f+Math.PI)*e.xR)-e.width/2)*j);
var g=e.yO+((k*e.yR)*j);
i.elem.telerikCarouselAngle=i.now;
var c="px";
b(i.elem).css("display","none").css({width:e.width*j+c,height:e.height*j+c,left:d+c,top:g+c,zIndex:parseInt(j*100)}).css("display","");
};
})();

Type.registerNamespace("Telerik.Web.UI");
(function(){$telerik.toToolTip=function(tooltip){return tooltip;
};
$telerik.findToolTip=$find;
var $=$telerik.$;
var $T=Telerik.Web.UI;
$T.RadToolTipControllerClass=function(){this._tooltipToShow=null;
this._activeToolTip=null;
this._registerGlobalBodyEventHandlers();
};
$T.RadToolTipControllerClass.prototype={_registerGlobalBodyEventHandlers:function(){var escHandler=Function.createDelegate(this,function(e){if(e.keyCode==27){if(this._activeToolTip&&!this._activeToolTip.isModal()){this._hideCurrentToolTipNoAnimation();
}}});
var clickHandler=Function.createDelegate(this,function(e){this._hideOnBodyClick(e);
});
Sys.Application.add_init(function(){$addHandler(document.body,"keydown",escHandler);
$addHandler(document.body,"click",clickHandler);
});
Sys.Application.add_unload(function(){$removeHandler(document.body,"keydown",escHandler);
$removeHandler(document.body,"click",clickHandler);
});
},_hideOnBodyClick:function(e){var wasHidden=false;
if(this._activeToolTip!=null&&!this._activeToolTip.isModal()){var tooltip=this._activeToolTip;
if($telerik.isMouseOverElementEx(tooltip._tableElement,e)){return;
}wasHidden=this._activeToolTip._hideIfNotManualCloseOrFromCode();
}if(wasHidden){this._activeToolTip=null;
}},_cancelLastShowRequest:function(){if(this._tooltipToShow){var tooltip=this._tooltipToShow;
this._tooltipToShow=null;
tooltip.cancelShowDelay();
}},_hideCurrentToolTipNoAnimation:function(){this._cancelLastShowRequest();
if(this._activeToolTip!=null){this._activeToolTip._hideNoAnimation();
}this._activeToolTip=null;
},requestShow:function(newToolTip){this._cancelLastShowRequest();
var active=this._activeToolTip;
if(active==newToolTip){return;
}else{if(active){active._hideIfNotManualCloseOrFromCode();
}}this._tooltipToShow=newToolTip;
},cancelSpecificShowRequest:function(tooltip){if(this._tooltipToShow==tooltip){this._cancelLastShowRequest();
}},showTooltip:function(newToolTip){if(!newToolTip||newToolTip.isVisible()){return;
}this._cancelLastShowRequest();
this.set_activeToolTip(newToolTip);
newToolTip.show();
},notifyToolTipClosed:function(newToolTip){if(this._activeToolTip==newToolTip){this._activeToolTip=null;
}},set_activeToolTip:function(newToolTip){var active=this._activeToolTip;
if(active&&newToolTip!=active){this._hideCurrentToolTipNoAnimation();
}this._activeToolTip=newToolTip;
},get_activeToolTip:function(){return this._activeToolTip;
},getInstance:function(){return this;
}};
$T.RadToolTipControllerClass.registerClass("Telerik.Web.UI.RadToolTipControllerClass",null);
if(!$T.RadToolTipController){$T.RadToolTipController=new $T.RadToolTipControllerClass();
}$.registerEnum($T,"ToolTipPosition",{TopLeft:11,TopCenter:12,TopRight:13,MiddleLeft:21,Center:22,MiddleRight:23,BottomLeft:31,BottomCenter:32,BottomRight:33});
$.registerEnum($T,"ToolTipHorizontalPosition",{Left:1,Center:2,Right:3});
$.registerEnum($T,"ToolTipVerticalPosition",{Top:1,Middle:2,Bottom:3});
$.registerEnum($T,"ToolTipRelativeDisplay",{Mouse:0,Element:1,BrowserWindow:2});
$.registerEnum($T,"ToolTipScrolling",{Auto:0,None:1,X:2,Y:3,Both:4,Default:5});
$.registerEnum($T,"ToolTipAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8});
$.registerEnum($T,"ToolTipShowEvent",{OnMouseOver:1,OnClick:2,OnRightClick:4,OnFocus:8,FromCode:16});
$.registerEnum($T,"ToolTipHideEvent",{Default:1,LeaveToolTip:2,ManualClose:4,LeaveTargetAndToolTip:8,FromCode:16});
Type.registerNamespace("Telerik.Web.UI");
$T.RadToolTip=function(element){$T.RadToolTip.initializeBase(this,[element]);
this._position=$T.ToolTipPosition.BottomCenter;
this._horizontalPosition=null;
this._verticalPosition=null;
this._targetControlID=null;
this._targetControl=null;
this._popupElement=null;
this._tableElement=null;
this._contentCell=null;
this._titleElement=null;
this._contentElement=null;
this._calloutElement=null;
this._closeLink=null;
this._manualCloseButton=null;
this._popupBehavior=null;
this._modal=false;
this._overlay=false;
this._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._title="";
this._text="";
this._manualCloseButtonText="";
this._mouseTrailing=false;
this._showDelayRef=null;
this._autoCloseRef=null;
this._zIndex=8000;
this._cssClass=null;
};
$T.RadToolTip.getCurrent=function(){var controller=$T.RadToolTipController.getInstance();
if(!controller){return null;
}return controller.get_activeToolTip();
};
$T.RadToolTip.prototype={get_zIndex:function(){return this._zIndex;
},set_zIndex:function(value){var zIndex=parseInt(value);
if(isNaN(value)){return;
}if(this._zIndex!=value){this._zIndex=value;
}},initialize:function(){$T.RadToolTip.callBaseMethod(this,"initialize");
this.set_position(this._position);
this._getToolTipAltText(this._targetControl);
var declarativeIndex=$telerik.getCurrentStyle(this.get_element(),"zIndex");
if(null!=declarativeIndex){this.set_zIndex(declarativeIndex);
}if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show();
}),0);
}},dispose:function(){var tooltipController=this._getToolTipController();
if(this==tooltipController.get_activeToolTip()){tooltipController.set_activeToolTip(null);
}if(this._showRef){window.clearTimeout(this._showRef);
this._showRef=null;
}if(this._popupBehavior){this._popupBehavior.dispose();
this._popupBehavior=null;
}this._registerPopupHandlers(false);
this._registerMouseHandlers(this._targetControl,false);
this._makeModal(false);
if(this._closeLinkHandler&&this._closeLink){$clearHandlers(this._closeLink);
this._closeLinkHandler=null;
}if(this._popupElement){var thisId=this.get_id();
if(thisId){var serverElement=$get(thisId);
if(serverElement){serverElement.appendChild(this._popupElement);
}}}$T.RadToolTip.callBaseMethod(this,"dispose");
},isCreated:function(){return this._popupElement!=null;
},get_leaveTargetAndToolTip:function(){return this.isHideEventEnabled($T.ToolTipHideEvent.LeaveTargetAndToolTip);
},isHideEventEnabled:function(hideEventValue){return hideEventValue&this.get_hideEvent();
},hide:function(){this._hideUnconditionally();
},_hideIfNotManualCloseOrFromCode:function(){var fromCode=this.isHideEventEnabled($T.ToolTipHideEvent.FromCode);
var manualClose=this.get_manualClose();
if(manualClose||fromCode){return false;
}this._hideUnconditionally();
return true;
},_hideUnconditionally:function(){if(!this.isVisible()){return;
}this._hide();
},_hideNoAnimation:function(){this._hide(false);
},_hide:function(playAnimation){if(this.get_animation()!=$T.ToolTipAnimation.None){$telerik.$(this._popupElement).stop();
}this.cancelHideDelay();
this.cancelShowDelay();
this.cancelAutoCloseDelay();
var popupElement=this._popupElement;
if(!popupElement){return;
}var cancelArgs=new Sys.CancelEventArgs();
this.raiseEvent("beforeHide",cancelArgs);
if(cancelArgs.get_cancel()){return;
}if(this.get_animation()!=$T.ToolTipAnimation.None&&playAnimation!=false){if(this._enableShadow&&$telerik.isIE){Sys.UI.DomElement.removeCssClass(this._tableElement,"rtShadow");
Sys.UI.DomElement.removeCssClass(popupElement,"rtShadow");
}var callout=this._calloutElement;
if(callout){callout.style.visibility="hidden";
}var fnc=Function.createDelegate(this,this._afterHide);
$telerik.$(popupElement).fadeOut(this.get_animationDuration(),fnc);
}else{this._afterHide();
}},_afterHide:function(){try{if(this._popupBehavior){this._popupBehavior.hide();
this._popupBehavior.pin(false);
}}catch(ex){}this._getToolTipController().notifyToolTipClosed(this);
this.raiseEvent("hide");
this._registerPopupHandlers(false);
},clone:function(id){var span=document.createElement("span");
if(id){span.setAttribute("id",id);
}return $telerik.cloneControl(this,$T.RadToolTip,span);
},show:function(){if(!this.get_element()){return;
}this._createUI();
var cancelArgs=new Sys.CancelEventArgs();
this.raiseEvent("beforeShow",cancelArgs);
if(cancelArgs.get_cancel()){return;
}this._popupBehavior.pin(false);
this._showRef=window.setTimeout(Function.createDelegate(this,function(){this._getToolTipController().set_activeToolTip(this);
if(this.get_animation()==$T.ToolTipAnimation.None){this._show();
this._afterShow();
}else{window.setTimeout(Function.createDelegate(this,function(){this._playAnimation();
}),100);
}}),0);
},updateLocation:function(){this._show();
},showLoadingMessage:function(toShow){var skinName=this._getFullSkinName();
var loading="rtLoading";
if(toShow){Sys.UI.DomElement.addCssClass(this._contentCell,skinName);
Sys.UI.DomElement.addCssClass(this._contentCell,loading);
}else{Sys.UI.DomElement.removeCssClass(this._contentCell,skinName);
Sys.UI.DomElement.removeCssClass(this._contentCell,loading);
}},_getToolTipAltText:function(target){var targetControl=target?target:this.get_targetControl();
if(targetControl){var title=targetControl.getAttribute("title");
var ignoreAlt=this.get_ignoreAltAttribute();
var alt=ignoreAlt?null:targetControl.getAttribute("alt");
if(title||alt){if(!ignoreAlt){targetControl.removeAttribute("alt");
}targetControl.removeAttribute("title");
if(!this.get_text()){var content=title?title:alt;
this.set_text(content);
}}}},isModal:function(){return this._modal;
},set_contentElement:function(contentElement){this._contentCell.innerHTML="";
if(contentElement.parentNode&&contentElement.parentNode.removeChild){contentElement.parentNode.removeChild(contentElement);
}this._contentCell.appendChild(contentElement);
contentElement.style.display="";
this._contentElement=contentElement;
this._setOverflow();
this.showLoadingMessage(false);
},get_contentElement:function(){return this._contentElement;
},set_content:function(text){this._text=text;
if(this.isCreated()){var textElement=document.createElement("div");
textElement.innerHTML=text;
this.set_contentElement(textElement);
}},get_content:function(){return this._contentElement?this._contentElement.innerHTML:"";
},cancelHideDelay:function(){if(this._hideDelayRef){window.clearTimeout(this._hideDelayRef);
this._hideDelayRef=0;
}},cancelAutoCloseDelay:function(){if(this._autoCloseRef){window.clearTimeout(this._autoCloseRef);
this._autoCloseRef=0;
}},cancelShowDelay:function(){if(this._showDelayRef){window.clearTimeout(this._showDelayRef);
this._showDelayRef=null;
}this._getToolTipController().cancelSpecificShowRequest(this);
},_getToolTipController:function(){return $T.RadToolTipController.getInstance();
},_resetAutoCloseDelay:function(){this.cancelAutoCloseDelay();
if(this.get_manualClose()||this.get_sticky()){return;
}if(this.get_autoCloseDelay()){this._autoCloseRef=window.setTimeout(Function.createDelegate(this,function(){this._hideIfNotManualCloseOrFromCode();
}),this.get_autoCloseDelay());
}},_resetShowDelay:function(){this.cancelShowDelay();
var fnRef=Function.createDelegate(this,function(){this._getToolTipController().showTooltip(this);
this.cancelShowDelay();
});
this._showDelayRef=window.setTimeout(fnRef,this.get_showDelay());
},_resetHideDelay:function(){this.cancelHideDelay();
if(this.get_hideDelay()>0){this._hideDelayRef=window.setTimeout(Function.createDelegate(this,function(){this._hideIfNotManualCloseOrFromCode();
}),this.get_hideDelay());
}else{this._hideIfNotManualCloseOrFromCode();
}},_show:function(){var bounds=null;
try{bounds=this.getToolTipBounds();
}catch(e){var _this=this;
window.setTimeout(function(){_this._addToolTipToDocument();
},10);
return;
}this._setPopupVisible(bounds.x,bounds.y);
var contentElem=this.get_contentElement();
if(contentElem){$telerik.repaintChildren(contentElem);
}},_afterShow:function(){this._registerPopupHandlers(true);
this._popupBehavior.pin(this._isRelativeToBrowserWindow());
this._resetAutoCloseDelay();
if(this.get_animation()==$T.ToolTipAnimation.None){this._adjustCallout();
}this.raiseEvent("show");
},_isRelativeToBrowserWindow:function(){if(!this._targetControl||this.get_relativeTo()==$T.ToolTipRelativeDisplay.BrowserWindow){return true;
}return false;
},_playAnimation:function(){if(this!=$T.RadToolTip.getCurrent()){return;
}var commonResizeAnimationConfiguration=Function.createDelegate(this,function(){var relativeBounds=this.getToolTipBounds();
this._setPopupVisible(relativeBounds.x,relativeBounds.y);
this._adjustCallout();
var endBounds=$telerik.getBounds(this._tableElement);
$telerik.$(this._popupElement).hide();
return endBounds;
});
var endBounds=commonResizeAnimationConfiguration();
var onAnimationStart=Function.createDelegate(this,function(){if(this._isRelativeToBrowserWindow()){this._documentOverflowX=document.documentElement.style.overflowX;
document.documentElement.style.overflowX="hidden";
}if(this.get_showCallout()&&this._calloutElement){this._calloutElement.style.visibility="hidden";
}if(this._enableShadow&&$telerik.isIE){Sys.UI.DomElement.removeCssClass(this._tableElement,"rtShadow");
Sys.UI.DomElement.removeCssClass(this.get_popupElement(),"rtShadow");
}});
var onAnimationEnd=Function.createDelegate(this,function(){var popupElement=this.get_popupElement();
popupElement.style.filter="";
popupElement.style.opacity="";
if(this.get_showCallout()&&this._calloutElement){this._calloutElement.style.visibility="";
}if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){Sys.UI.DomElement.addCssClass(this._tableElement,"rtShadow");
Sys.UI.DomElement.addCssClass(popupElement,"rtShadow");
}this._show();
if(null!=this._documentOverflowX){document.documentElement.style.overflowX=this._documentOverflowX;
this._documentOverflowX=null;
}this._afterShow();
});
var animatedElement=this.get_popupElement();
var animationType=this.get_animation();
var position=""+this._position;
var relativeToBrowser=this._isRelativeToBrowserWindow();
if(relativeToBrowser&&this._verticalPosition!=2){vp=(this._verticalPosition==1?3:1);
position=parseInt(vp+""+this._horizontalPosition);
}var sourceElement=relativeToBrowser?document.documentElement:this._targetControl;
var startBounds=sourceElement?$telerik.getBounds(sourceElement):new Sys.UI.Bounds(1,1,1,1);
var animationDuration=this.get_animationDuration();
window.setTimeout(function(){$T.Animations.playJQueryAnimation(animatedElement,animationType,startBounds,endBounds,position,onAnimationStart,onAnimationEnd,animationDuration);
},0);
},_makeModal:function(bModal){if(this._onModalShowHandler){this.remove_show(this._onModalShowHandler);
this._onModalShowHandler=null;
}if(this._onModalCloseHandler){this.remove_hide(this._onModalCloseHandler);
this._onModalCloseHandler=null;
}if(this._modalExtender){this._modalExtender.dispose();
this._modalExtender=null;
}if(!bModal){return;
}this._onModalShowHandler=function(sender){if(!sender._modalExtender){sender._modalExtender=new $T.ModalExtender(sender._popupElement);
}sender._modalExtender.show();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(sender){if(sender._modalExtender){sender._modalExtender.hide();
}};
this.add_hide(this._onModalCloseHandler);
},_onMouseOver:function(e){this._logMousePosition(e);
this._resetShowDelay();
this.cancelHideDelay();
this.cancelAutoCloseDelay();
this._getToolTipController().requestShow(this);
},_onMouseMove:function(e){this._logMousePosition(e);
this._resetAutoCloseDelay();
if(this._mouseTrailing&&this.isVisible()){this._show();
}},_onMouseOut:function(e){if(!this.isVisible()){this.cancelShowDelay();
return;
}var toKeep=$telerik.isMouseOverElementEx(this._targetControl,e);
if(!toKeep){this.cancelShowDelay();
if(!this.get_sticky()){this._resetHideDelay();
}}},_onClick:function(e){this._onMouseOver(e);
return $telerik.cancelRawEvent(e);
},_onRightClick:function(e){this._onMouseOver(e);
return $telerik.cancelRawEvent(e);
},_registerMouseHandlers:function(targetElement,attachEvent){if(true==attachEvent){var handlers={};
var showEnum=$T.ToolTipShowEvent;
var showEvent=this.get_showEvent();
if(showEvent==showEnum.OnMouseOver){this._onMouseOverDelegate=Function.createDelegate(this,this._onMouseOver);
this._onMouseMoveDelegate=Function.createDelegate(this,this._onMouseMove);
this._onMouseOutDelegate=Function.createDelegate(this,this._onMouseOut);
$telerik.addExternalHandler(targetElement,"mouseover",this._onMouseOverDelegate);
$telerik.addExternalHandler(targetElement,"mousemove",this._onMouseMoveDelegate);
$telerik.addExternalHandler(targetElement,"mouseout",this._onMouseOutDelegate);
}if(showEvent==showEnum.OnClick){this._onClickDelegate=Function.createDelegate(this,this._onClick);
$telerik.addExternalHandler(targetElement,"click",this._onClickDelegate);
}if(showEvent==showEnum.OnRightClick){this._onRightClickDelegate=Function.createDelegate(this,this._onRightClick);
$telerik.addExternalHandler(targetElement,"contextmenu",this._onRightClickDelegate);
}if(showEvent==showEnum.OnFocus){this._onFocusDelegate=Function.createDelegate(this,this._onMouseOver);
this._onBlurDelegate=Function.createDelegate(this,this._onMouseOut);
$telerik.addExternalHandler(targetElement,"focus",this._onFocusDelegate);
$telerik.addExternalHandler(targetElement,"blur",this._onBlurDelegate);
}}else{if(targetElement){var handlersArray=[["mouseover",this._onMouseOverDelegate],["mousemove",this._onMouseMoveDelegate],["mouseout",this._onMouseOutDelegate],["click",this._onClickDelegate],["contextmenu",this._onRightClickDelegate],["focus",this._onFocusDelegate],["blur",this._onBlurDelegate]];
for(var i=0;
i<handlersArray.length;
i++){var item=handlersArray[i];
try{if(null!=item[1]){$telerik.removeExternalHandler(targetElement,item[0],item[1]);
}}catch(e){}}this._onMouseOverDelegate=null;
this._onMouseMoveDelegate=null;
this._onMouseOutDelegate=null;
this._onClickDelegate=null;
this._onRightClickDelegate=null;
this._onFocusDelegate=null;
this._onBlurDelegate=null;
}}},_registerPopupHandlers:function(attachEvent){if(true==attachEvent){if(this.get_sticky()){this._popupStickyHandler=Function.createDelegate(this,this._onPopupStickyMouseOut);
$addHandler(this._tableElement,"mouseout",this._popupStickyHandler);
}else{if(this.get_leaveTargetAndToolTip()){this._popupEnterHandler=Function.createDelegate(this,this._onPopupEnterToolTip);
$addHandler(this._tableElement,"mouseover",this._popupEnterHandler);
this._popupLeaveHandler=Function.createDelegate(this,this._onPopupLeaveToolTip);
$addHandler(this._tableElement,"mouseout",this._popupLeaveHandler);
}}}else{if(this._popupStickyHandler||this._popupEnterHandler||this._popupLeaveHandler){$clearHandlers(this._tableElement);
this._popupStickyHandler=null;
this._popupEnterHandler=null;
this._popupLeaveHandler=null;
}}},_onPopupStickyMouseOut:function(e){var toKeep=$telerik.isMouseOverElementEx(this._tableElement,e);
if(!toKeep){this._hideIfNotManualCloseOrFromCode();
}},_onPopupEnterToolTip:function(e){var toKeep=$telerik.isMouseOverElementEx(this._tableElement,e);
if(toKeep){this.cancelHideDelay();
this.cancelAutoCloseDelay();
}},_onPopupLeaveToolTip:function(e){var toKeep=$telerik.isMouseOverElementEx(this._tableElement,e);
if(!toKeep){this._resetHideDelay();
this._resetAutoCloseDelay();
}},_getPosRelativeToMouse:function(targetBounds){var elemX=targetBounds.x;
var elemY=targetBounds.y;
var pos=this._getMousePosition();
var mouseX=pos.clientX;
var mouseY=pos.clientY;
var standard=$telerik.standardsMode;
if(!$telerik.isIE&&document.compatMode!="CSS1Compat"){standard=false;
}else{if($telerik.isSafari){standard=false;
}}if(standard){elemX-=$telerik.getCorrectScrollLeft(document.documentElement);
elemY-=document.documentElement.scrollTop;
}else{elemX-=$telerik.getCorrectScrollLeft(document.body);
elemY-=document.body.scrollTop;
}var deltaX=mouseX-elemX;
var deltaY=mouseY-elemY;
return{x:deltaX,y:deltaY};
},_logMousePosition:function(e){if(!e){return;
}this._mouseX=e.clientX;
this._mouseY=e.clientY;
},_getMousePosition:function(){var obj={};
obj.clientX=this._mouseX;
obj.clientY=this._mouseY;
return obj;
},_getCalloutBounds:function(){var bounds={width:0,height:0,marginLeft:0,marginTop:0};
if(this.get_showCallout()&&this._calloutElement){bounds.marginLeft=parseInt($telerik.getCurrentStyle(this._calloutElement,"marginLeft"));
bounds.marginTop=parseInt($telerik.getCurrentStyle(this._calloutElement,"marginTop"));
if(isNaN(bounds.marginLeft)){bounds.marginLeft=0;
}if(isNaN(bounds.marginTop)){bounds.marginTop=0;
}var calloutBounds=$telerik.getBounds(this._calloutElement);
if(calloutBounds){if(calloutBounds.width){bounds.width=calloutBounds.width;
}if(calloutBounds.height){bounds.height=calloutBounds.height;
}}}return bounds;
},_getBoundsRelativeToBrowser:function(popupBounds,calloutBounds,targetBounds){var horSide=this._horizontalPosition;
var verSide=this._verticalPosition;
var x=0;
var y=0;
var offsetX=this.get_offsetX();
var offsetY=this.get_offsetY();
if(!targetBounds){targetBounds=$telerik.getClientBounds();
}var scrolls=$telerik.getScrollOffset(document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body);
if("fixed"!=this._popupElement.style.position){x+=scrolls.x;
y+=scrolls.y;
}switch(horSide){case 2:x+=-parseInt(popupBounds.width/2-targetBounds.width/2);
x+=offsetX;
break;
case 3:x+=targetBounds.width;
x-=popupBounds.width;
x-=offsetX;
break;
case 1:default:x+=-popupBounds.width;
x+=(-calloutBounds.width-calloutBounds.marginLeft);
x+=offsetX;
break;
}switch(verSide){case 2:y+=-parseInt((popupBounds.height-targetBounds.height)/2);
break;
case 1:y+=offsetY;
break;
case 3:default:y+=targetBounds.height;
y-=offsetY;
y-=popupBounds.height;
break;
}return new Sys.UI.Bounds(x,y,popupBounds.width,popupBounds.height);
},_getBoundsRelativeToElement:function(popupBounds,calloutBounds,targetBounds){var horSide=this._horizontalPosition;
var verSide=this._verticalPosition;
var x=0;
var y=0;
var offsetX=this.get_offsetX();
var offsetY=this.get_offsetY();
if(!targetBounds){targetBounds=$telerik.getBounds(this._targetControl);
}switch(horSide){case 2:x+=-parseInt(popupBounds.width/2-targetBounds.width/2);
x+=offsetX;
break;
case 3:x+=targetBounds.width;
x-=calloutBounds.marginLeft;
x+=offsetX;
break;
case 1:default:x+=-popupBounds.width;
x+=(-calloutBounds.width-calloutBounds.marginLeft);
x-=offsetX;
break;
}switch(verSide){case 2:y+=-parseInt(popupBounds.height/2-targetBounds.height/2);
y+=offsetY;
break;
case 1:y-=popupBounds.height;
y-=calloutBounds.height+calloutBounds.marginTop;
y-=offsetY;
break;
case 3:default:y+=targetBounds.height;
y-=calloutBounds.marginTop;
y+=offsetY;
break;
}return new Sys.UI.Bounds(x,y,popupBounds.width,popupBounds.height);
},_getBoundsRelativeToMouse:function(popupBounds,calloutBounds,targetBounds){var targetBounds=this._targetControl?$telerik.getBounds(this._targetControl):$telerik.getClientBounds();
var pos=this._getPosRelativeToMouse(targetBounds);
if(isNaN(pos.x)){pos.x=0;
pos.y=0;
}else{targetBounds.width=0;
targetBounds.height=0;
}var relativeToElement=this._getBoundsRelativeToElement(popupBounds,calloutBounds,targetBounds);
var bounds=new Sys.UI.Bounds(pos.x+relativeToElement.x,pos.y+relativeToElement.y,popupBounds.width,popupBounds.height);
return bounds;
},getToolTipBounds:function(){var popupElement=this._popupElement;
var tempHide=(popupElement.style.display=="none")?true:false;
if(tempHide){popupElement.style.visibility="hidden";
}popupElement.style.display="";
this._setOverflow();
if(this._firstShow!=true){this._fixIeHeight(this._tableElement,this.get_height());
this._firstShow=true;
}var parent=this._isRelativeToBrowserWindow()?document.documentElement:this._targetControl;
this._popupBehavior.set_parentElement(parent);
var popupBounds=$telerik.getBounds(this._tableElement);
var calloutBounds=this._getCalloutBounds();
if(tempHide){this._popupElement.style.display="none";
popupElement.style.visibility="";
}var displayEnum=$T.ToolTipRelativeDisplay;
var showEnum=$T.ToolTipShowEvent;
var bounds=null;
if(this.get_relativeTo()==displayEnum.BrowserWindow){bounds=this._getBoundsRelativeToBrowser(popupBounds,calloutBounds);
}else{if(!this._targetControl&&this.get_showEvent()==showEnum.FromCode){bounds=this._getBoundsRelativeToBrowser(popupBounds,calloutBounds);
}else{if(this._targetControl&&this.get_showEvent()==showEnum.FromCode){bounds=this._getBoundsRelativeToElement(popupBounds,calloutBounds);
}else{if((this._mouseTrailing||this.get_relativeTo()==displayEnum.Mouse)){bounds=this._getBoundsRelativeToMouse(popupBounds,calloutBounds);
}else{if(this.get_relativeTo()==displayEnum.Element){bounds=this._getBoundsRelativeToElement(popupBounds,calloutBounds);
}}}}}return bounds;
},_fixIeHeight:function(oElem,height){if("CSS1Compat"==document.compatMode){var difference=(oElem.offsetHeight-parseInt(height));
if(difference>0){var newHeight=(parseInt(oElem.style.height)-difference);
if(newHeight>0){oElem.style.height=newHeight+"px";
}}}},_refreshTitle:function(){if(null==this._titleElement){return;
}this._titleElement.innerHTML=this._title;
this._titleElement.style.display=(this._title)?"":"none";
},getManualCloseButton:function(){return this._manualCloseButton;
},_createManualCloseButton:function(titleCell){if(this.get_manualClose()){var _closeElement=document.createElement("a");
_closeElement.href="javascript: void(0);";
_closeElement.className="rtCloseButton";
this._closeLinkHandler=Function.createDelegate(this,function(e){this._hideUnconditionally();
return $telerik.cancelRawEvent(e);
});
$addHandler(_closeElement,"click",this._closeLinkHandler);
this._closeLink=_closeElement;
var _span=document.createElement("span");
_span.innerHTML=this._manualCloseButtonText;
_closeElement.title=this._manualCloseButtonText;
this._manualCloseButton=_closeElement;
_closeElement.appendChild(_span);
titleCell.appendChild(_closeElement);
}},_createUI:function(){if(!this._popupElement){var tooltipId=this.get_id();
var wrapperId="RadToolTipWrapper_"+tooltipId;
var rootDiv=document.createElement("div");
rootDiv.id=wrapperId;
var element=this.get_element();
var rtlElement=element.parentNode?element:this._getDefaultParent();
var isRightToLeft=$telerik.isRightToLeft(rtlElement);
rootDiv.className=this._getFullSkinName()+(this.get_showCallout()?" rtVisibleCallout":"")+(isRightToLeft?" RadToolTip_rtl":"")+(this._cssClass?" "+this._cssClass:" ");
rootDiv.setAttribute("unselectable","on");
this._popupElement=rootDiv;
var childDiv=document.createElement("div");
childDiv.className="rtCallout "+this._getCalloutPosition(this._position);
childDiv.innerHTML="&nbsp;";
this._calloutElement=childDiv;
var table=document.createElement("table");
table.className="rtWrapper";
table.style.width=this.get_width();
table.style.height=this.get_height();
this._tableElement=table;
var classNames=[];
if(isRightToLeft){classNames=["rtWrapperTopRight","rtWrapperTopCenter","rtWrapperTopLeft","rtWrapperRightMiddle","rtWrapperContent","rtWrapperLeftMiddle","rtWrapperBottomRight","rtWrapperBottomCenter","rtWrapperBottomLeft"];
}else{classNames=["rtWrapperTopLeft","rtWrapperTopCenter","rtWrapperTopRight","rtWrapperLeftMiddle","rtWrapperContent","rtWrapperRightMiddle","rtWrapperBottomLeft","rtWrapperBottomCenter","rtWrapperBottomRight"];
}if(this._enableShadow&&!$telerik.isIE6){Sys.UI.DomElement.addCssClass(this._tableElement,"rtShadow");
Sys.UI.DomElement.addCssClass(rootDiv,"rtShadow");
}var index=0;
for(var i=1;
i<=3;
i++){var _row=table.insertRow(-1);
for(var j=1;
j<=3;
j++){var cell=_row.insertCell(-1);
cell.innerHTML="&nbsp;";
cell.className=classNames[index];
index++;
}}var titleCell=table.rows[0].cells[1];
titleCell.innerHTML="";
if(isRightToLeft){this._createManualCloseButton(titleCell);
}var titleElement=document.createElement("div");
titleElement.className="rtTitlebar";
titleElement.style.display="none";
this._titleElement=titleElement;
this._refreshTitle();
titleCell.appendChild(titleElement);
if(!isRightToLeft){this._createManualCloseButton(titleCell);
}var contentCell=table.rows[1].cells[1];
contentCell.vAlign="top";
contentCell.innerHTML="";
this._contentCell=contentCell;
var serverElement=null;
var serverElement=null;
if(this._text){this.set_content(this._text);
}else{var thisId=this.get_id();
if(thisId){serverElement=$get(thisId);
}if(serverElement&&serverElement.innerHTML){var newElem=this._transferNodeChildren(serverElement);
this.set_contentElement(newElem);
}}rootDiv.appendChild(childDiv);
rootDiv.appendChild(table);
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
this._addToolTipToDocument(serverElement);
}if(!this._popupBehavior){this._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:(new Date()-100)+"PopupBehavior",parentElement:this._targetControl,overlay:this._overlay},null,null,this._popupElement);
}},_transferNodeChildren:function(elem){if(!elem){return null;
}var newElem=elem.ownerDocument.createElement(elem.tagName);
var childIndexToMove=0;
while(elem.childNodes&&elem.childNodes.length>childIndexToMove){var curElem=elem.childNodes[childIndexToMove];
if(this._clientStateFieldID&&curElem.id==this._clientStateFieldID){childIndexToMove=1;
continue;
}elem.removeChild(curElem);
newElem.appendChild(curElem);
}return newElem;
},_getDefaultParent:function(){var formID=this.get_formID();
var parent=formID?document.getElementById(formID):null;
if(!parent){if(document.forms&&document.forms.length>0){parent=document.forms[0];
}else{parent=document.body;
}}return parent;
},_addToolTipToDocument:function(elem){if(null!=elem&&!this.get_renderInPageRoot()){elem.parentNode.insertBefore(this._popupElement,elem);
return;
}var parent=this._getDefaultParent();
parent.appendChild(this._popupElement);
},_getParentByTagName:function(elem,tagName){var parent=elem;
tagName=tagName.toUpperCase();
while(parent.tagName.toUpperCase()!=tagName){parent=parent.parentNode;
if(!parent){break;
}}return parent;
},_getFullSkinName:function(){return"RadToolTip RadToolTip_"+this.get_skin();
},_getUniqueString:function(){return""+(new Date()-100);
},_getCalloutPosition:function(oPos){with($T.ToolTipPosition){switch(oPos){case TopLeft:return"rtCalloutBottomRight";
case TopCenter:return"rtCalloutBottomCenter";
case TopRight:return"rtCalloutBottomLeft";
case MiddleLeft:return"rtCalloutMiddleRight";
case Center:return"rtCalloutCenter";
case MiddleRight:return"rtCalloutMiddleLeft";
case BottomLeft:return"rtCalloutTopRight";
case BottomCenter:return"rtCalloutTopCenter";
case BottomRight:return"rtCalloutTopLeft";
}}return"";
},_getHorizontalSide:function(oPos){return parseInt((oPos+"").charAt(1));
},_getVerticalSide:function(oPos){return parseInt((oPos+"").charAt(0));
},_setPopupVisible:function(x,y){this._popupElement.style.zIndex=this._zIndex;
this._popupBehavior.set_x(x);
this._popupBehavior.set_y(y);
this._popupBehavior.show();
if(!this.get_width()){this._popupElement.style.width="";
}},_reSetToolTipPosition:function(){var bounds=this.getToolTipBounds();
this._setPopupVisible(bounds.x,bounds.y);
},_setOverflow:function(){var flow=this.get_contentScrolling();
if(flow==$T.ToolTipScrolling.Default){return;
}var el=this._contentElement;
if(!el||el.parentNode!=this._contentCell||((!el.document||!el.document.documentElement)&&$telerik.isIE)){return;
}var overflow="";
with($T.ToolTipScrolling){switch(flow){case Auto:overflow="auto";
break;
case None:overflow="hidden";
break;
case X:overflow="";
el.style.overflowX="scroll";
el.style.overflowY="hidden";
break;
case Y:overflow="";
el.style.overflowY="scroll";
el.style.overflowX="hidden";
break;
case Both:overflow="scroll";
}}var parent=el.parentNode;
el.style.display="none";
var paddingBox=$telerik.getPaddingBox(el);
var bounds=$telerik.getBounds(parent);
el.style.width=Math.abs(bounds.width-paddingBox.vertical)+"px";
el.style.height=Math.abs(bounds.height-paddingBox.horizontal)+"px";
if(!el.style.overflowX&&!el.style.overflowY){el.style.overflow=overflow;
}el.style.display="";
},_getLeftOffset:function(){var posEnum=$T.ToolTipPosition;
var offsetX=this.get_offsetX();
if(posEnum.Left==this._position){return(-1*this._targetControl.offsetWidth)+offsetX;
}else{if(posEnum.Right==this._position){return this._targetControl.offsetWidth+offsetX;
}else{return offsetX;
}}},_getTopOffset:function(){var yoffSet;
var posEnum=$T.ToolTipPosition;
var offsetY=this.get_offsetY();
if(posEnum.Top==this._position){yoffSet=(-1*this._targetControl.offsetHeight)+offsetY;
}else{if(posEnum.Bottom==this._position){yoffSet=this._targetControl.offsetHeight+offsetY;
}else{yoffSet=offsetY;
}}return yoffSet;
},_adjustCallout:function(){if(this._originalPosition){this.set_position(this._originalPosition);
this.updateLocation();
this._originalPosition=null;
}if(this.get_showCallout()&&this.get_position()!=22&&this.get_relativeTo()==$T.ToolTipRelativeDisplay.Element){var targetControl=this.get_targetControl();
if(!targetControl){return;
}var targetBounds=$telerik.getBounds(targetControl);
var popup=this.get_popupElement();
var callout=popup.getElementsByTagName("DIV")[0];
callout.style.left="";
callout.style.top="";
var calloutBounds=$telerik.getBounds(callout);
var viewPort=$telerik.getViewPortSize();
var visibleHeight=Math.min(viewPort.height-targetBounds.y,targetBounds.height);
var visibleWidth=Math.min(viewPort.width-targetBounds.x,targetBounds.width);
callout.style.visibility="hidden";
this._fixToolTipPosition(targetBounds,calloutBounds,visibleWidth,visibleHeight,true);
calloutBounds=$telerik.getBounds(callout);
this._fixToolTipPosition(targetBounds,calloutBounds,visibleWidth,visibleHeight,false);
callout.style.visibility="visible";
this._fixCalloutPosition(targetBounds,visibleWidth,visibleHeight);
}},_fixCalloutPosition:function(targetBounds,visibleWidth,visibleHeight){var popup=this.get_popupElement();
var callout=popup.getElementsByTagName("DIV")[0];
callout.style.left="";
callout.style.top="";
var calloutBounds=$telerik.getBounds(callout);
var toolPos=$telerik.getBounds(popup);
var left=null;
var top=null;
if(this._verticalPosition==$T.ToolTipVerticalPosition.Middle){top=Math.floor(targetBounds.y+visibleHeight/2-toolPos.y+calloutBounds.width/2);
}else{var hpos=this._horizontalPosition;
if(hpos!=$T.ToolTipHorizontalPosition.Center){return;
}left=Math.floor(targetBounds.x+visibleWidth/2-toolPos.x+calloutBounds.width/2);
}if(top){callout.style.top=top+"px";
}if(left){callout.style.left=left+"px";
}},_fixToolTipPosition:function(targetBounds,calloutBounds,visibleWidth,visibleHeight,isHorizontal){var toReposition=false;
var position=this.get_position();
var delta;
var boolExp1;
var boolExp2;
if(isHorizontal){delta=2;
boolExp1=(targetBounds.x+visibleWidth>calloutBounds.x&&this._horizontalPosition==$T.ToolTipHorizontalPosition.Right);
boolExp2=(targetBounds.x<calloutBounds.x&&this._horizontalPosition==$T.ToolTipHorizontalPosition.Left);
}else{delta=20;
boolExp1=(targetBounds.y+visibleHeight>calloutBounds.y&&this._verticalPosition==$T.ToolTipVerticalPosition.Bottom);
boolExp2=(targetBounds.y<calloutBounds.y&&this._verticalPosition==$T.ToolTipVerticalPosition.Top);
}if(boolExp1){toReposition=true;
delta=(-1)*(delta);
}if(boolExp2){toReposition=true;
}if(toReposition){position+=delta;
this._originalPosition=this.get_position();
this.set_position(position);
this.updateLocation();
}},isVisible:function(){var popup=this._popupElement;
return(popup&&popup.style.display!="none");
},get_targetControlID:function(){return this._targetControlID;
},set_targetControlID:function(value){if(this._targetControlID!=value){this._targetControlID=value;
var targetControl=(this._targetControlID?$get(this._targetControlID):null);
this.set_targetControl(targetControl);
}},get_value:function(){return this.get_serverValue();
},set_value:function(value){this.set_serverValue(value);
},get_position:function(){return this._position;
},set_position:function(value){if(this._position!=value){this._position=value;
if(this._calloutElement){this._calloutElement.className="rtCallout "+this._getCalloutPosition(this._position);
}}this._horizontalPosition=this._getHorizontalSide(this._position);
this._verticalPosition=this._getVerticalSide(this._position);
},get_title:function(){return this._title;
},set_title:function(value){if(this._title!=value){this._title=value;
}this._refreshTitle();
},get_text:function(){return this._text;
},set_text:function(value){if(this._text!=value){this._text=value;
}if(this.isCreated()){this.set_content(this._text);
}},get_sticky:function(){return this.isHideEventEnabled($T.ToolTipHideEvent.LeaveToolTip);
},set_sticky:function(value){if(value){this.set_hideEvent($T.ToolTipHideEvent.LeaveToolTip);
}},get_manualClose:function(){return this.isHideEventEnabled($T.ToolTipHideEvent.ManualClose);
},set_manualClose:function(value){if(value){this.set_hideEvent($T.ToolTipHideEvent.ManualClose);
}},get_mouseTrailing:function(){return this._mouseTrailing;
},set_mouseTrailing:function(value){if(this._mouseTrailing!=value){this._mouseTrailing=value;
if(true==value){this.set_relativeTo($T.ToolTipRelativeDisplay.Mouse);
}}},get_modal:function(){return this._modal;
},set_modal:function(value){if(this._modal!=value){this._modal=value;
}this._makeModal(this._modal);
},get_overlay:function(){return this._overlay;
},set_overlay:function(value){this._overlay=value;
if(this._popupBehavior){this._popupBehavior.set_overlay(this._overlay);
}if(this.isVisible()){this._reSetToolTipPosition();
}},get_targetControl:function(){return this._targetControl;
},set_targetControl:function(value){if(this._targetControl!=value){if(this._targetControl&&(this._targetControl!=value)){this._registerMouseHandlers(this._targetControl,false);
}var targetControl=this._ensureRadControlsCompatTarget(value);
this._targetControl=targetControl;
if(targetControl){this._getToolTipAltText(targetControl);
this._registerMouseHandlers(targetControl,true);
if(this._popupBehavior){this._popupBehavior.set_parentElement(targetControl);
}}}},_ensureRadControlsCompatTarget:function(target){var decoratedID=null;
if(target!=null){this._getToolTipAltText(target);
decoratedID=target.getAttribute("_rfddecoratedID");
if(decoratedID){target=$get(decoratedID);
}}var targetID=decoratedID?decoratedID:this.get_targetControlID();
var realInput=$get(targetID+"_text");
if(realInput&&targetID){var targetObject=$find(targetID);
if(targetObject&&Object.getType(targetObject).inheritsFrom($T.RadInputControl)){target=$get(targetID+"_text");
}}return target;
},get_popupElement:function(){return this._popupElement;
}};
$.registerControlProperties($T.RadToolTip,{serverTargetControlID:null,serverValue:"",formID:null,offsetX:0,offsetY:6,width:"",height:"",relativeTo:$T.ToolTipRelativeDisplay.Mouse,contentScrolling:$T.ToolTipScrolling.Default,showCallout:true,renderInPageRoot:false,showDelay:400,autoCloseDelay:3000,hideDelay:300,visibleOnPageLoad:false,animation:$T.ToolTipAnimation.None,animationDuration:500,showEvent:$T.ToolTipShowEvent.OnMouseOver,hideEvent:$T.ToolTipHideEvent.Default,skin:"Default",enableShadow:false,ignoreAltAttribute:false});
$.registerControlEvents($T.RadToolTip,["beforeShow","show","beforeHide","hide"]);
$T.RadToolTip.registerClass("Telerik.Web.UI.RadToolTip",$T.RadWebControl);
})();

Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.LayoutBuilderEngine=function(a){this._selectedTable=null;
this._selectedCell=null;
this._selectedRow=null;
this._selectedRowCells=[];
this._selectedRowIndex=null;
this._tableState=[];
this._tableStateRowsCount=0;
this._tableStateColsCount=0;
this._tableStateId="LayoutBuilder_tableState_dump";
this._tableStateTableStyle="radtblder_stateMatrixTable";
this._tableStateCellStyle="radtblder_stateMatrixCell";
this._selectedCellClassName="";
this._states=[];
this._currentStateIndex=-1;
this.set_selectedTable(a);
if(this._selectedTable){this.set_selectedCell();
}if(!a){a=document.createElement("table");
}Telerik.Web.UI.LayoutBuilderEngine.initializeBase(this,[a]);
};
Telerik.Web.UI.LayoutBuilderEngine.prototype={get_selectedTable:function(){return this._selectedTable;
},set_selectedTable:function(a){this._selectedTable=null;
if(a&&a.tagName=="TABLE"){this._selectedTable=a;
this._setTableState();
}},get_selectedCell:function(){return this._selectedCell;
},set_selectedCell:function(b,a){if(!this._selectedTable||this._selectedTable.tagName!="TABLE"){return;
}if(!b){b=this._selectedTable.rows[0].cells[0];
}if(b.tagName=="TD"||b.tagName=="TH"){if(this._selectedCell!=b){this._selectedCellClassName=b.className;
}this._selectedCell=b;
}else{this._selectedCell=null;
}if(this._selectedCell){this.set_selectedRow();
}if(this._selectedCell&&(false!=a)&&this._currentStateIndex==-1){if(this._states.length==1&&this._states[0]["commandName"]=="selection"){this._states=[];
}var c={commandName:"selection",selectedColIndex:this._selectedCell.cellIndex,selectedRowIndex:this._selectedRowIndex,nextSelectedColIndex:this._selectedCell.cellIndex,nextSelectedRowIndex:this._selectedRowIndex};
this._storeState(c);
}},set_selectedRow:function(){if(this._selectedCell){this._selectedRow=this._selectedCell.parentNode;
if(this._selectedRow){this._selectedRowCells=this._selectedRow.cells;
this._selectedRowIndex=this._selectedRow.rowIndex;
}else{this._selectedRowCells=null;
this._selectedRowIndex=null;
}}},_raiseException:function(a){},_initializesTableStateCounts:function(){var h=this._selectedTable.rows;
var e=h.length;
var d=0;
for(var b=0;
b<e;
b++){var f=0;
var g=h[b].cells;
var a=g.length;
for(var c=0;
c<a;
c++){f+=this._getColSpan(g[c]);
}if(d<f){d=f;
}}this._tableStateRowsCount=e;
this._tableStateColsCount=d;
},dumpState:function(){var c=document.createElement("Table");
var e=$get(this._tableStateId);
if(e){e.parentNode.removeChild(e);
}c.id=this._tableStateId;
c.className=this._tableStateTableStyle;
var f=this._tableState.length;
for(i=0;
i<f;
i++){var d=this._tableState[i].length;
var a=c.insertRow(i);
for(j=0;
j<d;
j++){var b=a.insertCell(j);
b.className=this._tableStateCellStyle;
b.innerHTML=this._tableState[i][j];
}}this._selectedTable.parentNode.appendChild(c);
},_initializesTableState:function(d,c){for(var a=0;
a<d;
a++){this._tableState[a]=[];
for(var b=0;
b<c;
b++){this._tableState[a][b]="";
}}},_processTD:function(b,f,g){var e=this._getRowSpan(b);
var d=this._getColSpan(b);
for(var a=0;
a<e;
a++){for(var c=0;
c<d;
c++){this._tableState[f+a][g+c]=b.parentNode.rowIndex+","+b.cellIndex;
}}},_setTableState:function(){this._tableState=[];
this._initializesTableStateCounts();
this._initializesTableState(this._tableStateRowsCount,this._tableStateColsCount);
var g=this._selectedTable.rows;
var b=g.length;
for(var f=0;
f<b;
f++){var a=0;
var e=g[f].cells;
var c=e.length;
for(var d=0;
d<c;
d++){while(this._tableState[f][a]){a++;
}this._processTD(e[d],f,a);
}}},_getStateValueIndexes:function(a,d){var e={};
var c=this._tableState[a][d];
if(c){var b=c.split(",");
if(b.length==2){e.rowIndex=parseInt(b[0]);
e.colIndex=parseInt(b[1]);
}}return e;
},_getSelectedTableCellByStateIndexes:function(a,d){var c=this._getStateValueIndexes(a,d);
var b=c.rowIndex;
var a=this._selectedTable.rows[b];
return a.cells[c.colIndex];
},_getLeftTopStateIndexes:function(f,g){var e={};
var d=f+","+g;
for(var b=0;
b<this._tableStateRowsCount;
b++){var c=false;
for(var a=0;
a<this._tableStateColsCount;
a++){if(this._tableState[b][a]==d){e.rowIndex=b;
e.colIndex=a;
c=true;
break;
}}if(c){break;
}}return e;
},_getRightTopStateIndexes:function(f,g){var e={};
var d=f+","+g;
for(var b=0;
b<this._tableStateRowsCount;
b++){var c=false;
for(var a=this._tableStateColsCount-1;
a>-1;
a--){if(this._tableState[b][a]==d){e.rowIndex=b;
e.colIndex=a;
c=true;
break;
}}if(c){break;
}}return e;
},_getLeftBottomStateIndexes:function(f,g){var e={};
var d=f+","+g;
for(var b=(this._tableStateRowsCount-1);
b>-1;
b--){var c=false;
for(var a=0;
a<this._tableStateColsCount;
a++){if(this._tableState[b][a]==d){e.rowIndex=b;
e.colIndex=a;
c=true;
break;
}}if(c){break;
}}return e;
},_insertRow:function(a){var b=null;
if(this._selectedCell.tagName=="TH"){if(this._selectedRow){b=this._selectedRow.parentNode.insertRow(a);
}}else{b=this._selectedTable.insertRow(a);
}return b;
},_insertCell:function(c,g,b,d){if(!g){g=0;
}var f=null;
if(c&&c.tagName=="TR"){var e=c.parentNode;
if(e.tagName=="THEAD"){var h=c.document?c.document:c.ownerDocument;
f=h.createElement("th");
if(b){f.innerHTML=b;
}if(c.cells.length==g){c.appendChild(f);
}else{var a=c.cells[g];
if(a){c.insertBefore(f,a);
}}}else{f=c.insertCell(g);
if(b){f.innerHTML=b;
}}$telerik.mergeElementAttributes(d,f);
this._cleanNewCellAttributes(f);
}return f;
},_cleanNewCellAttributes:function(a){if(!a){return;
}a.removeAttribute("rowSpan");
a.removeAttribute("colSpan");
a.removeAttribute("name");
a.removeAttribute("ID");
},_getRowSpan:function(a){if(a){var b=parseInt(a.getAttribute("rowSpan"));
if(isNaN(b)){b=1;
}return b;
}return 0;
},_getColSpan:function(a){if(a){var b=parseInt(a.getAttribute("colSpan"));
if(isNaN(b)){b=1;
}return b;
}return 0;
},_setRowSpan:function(a,b){if(!a){return;
}b=parseInt(b);
if(isNaN(b)||b<2){a.removeAttribute("rowSpan");
}else{a.setAttribute("rowSpan",b);
}},_setColSpan:function(a,b){if(!a){return;
}b=parseInt(b);
if(isNaN(b)||b<2){a.removeAttribute("colSpan");
}else{a.setAttribute("colSpan",b);
}},_alterRowSpan:function(c,d){var b=this._getRowSpan(c)+d;
var a=true;
if(b>0){this._setRowSpan(c,b);
}else{a=false;
}return a;
},canUndo:function(){return(0<this._currentStateIndex);
},canRedo:function(){return(this._currentStateIndex<this._states.length-1);
},undo:function(){var d=this._currentStateIndex-1;
var c=this._states[this._currentStateIndex];
if(d<this._states.length){var b=this._states[d];
if(b){this._replaceSelectedTable(b);
this._currentStateIndex--;
var a={commandName:"undo "+c.commandName,selectedColIndex:c.selectedColIndex,selectedRowIndex:c.selectedRowIndex};
this._raiseEvent("onCommand",a);
}}},redo:function(){var d=this._currentStateIndex+1;
var c=this._states[this._currentStateIndex];
if(d<this._states.length){var b=this._states[d];
if(b){this._replaceSelectedTable(b);
this._currentStateIndex++;
var a={commandName:"redo "+c.commandName,selectedColIndex:c.selectedColIndex,selectedRowIndex:c.selectedRowIndex};
this._raiseEvent("onCommand",a);
}}},_replaceSelectedTable:function(d){var b=this._selectedTable.parentNode;
var a=d.table.cloneNode(true);
b.insertBefore(a,this._selectedTable);
b.removeChild(this._selectedTable);
this.set_selectedTable(a);
var c=a.rows[d.nextSelectedRowIndex].cells[d.nextSelectedColIndex];
this._selectedCellClassName=d.selectedCellClassName;
this.set_selectedCell(c,false);
},_storeState:function(b){if(!this._selectedTable){return false;
}this._currentStateIndex++;
if(this._states.length!=0){this._states=this._states.slice(0,this._currentStateIndex);
}var a={table:this._selectedTable.cloneNode(true),selectedRowIndex:b.selectedRowIndex,selectedColIndex:b.selectedColIndex,nextSelectedRowIndex:b.nextSelectedRowIndex,nextSelectedColIndex:b.nextSelectedColIndex,selectedCellClassName:this._selectedCellClassName,commandName:b.commandName};
this._states.push(a);
},_removeEptyTrElements:function(){if(!this._selectedTable){return false;
}var e=this._selectedTable.rows;
var m=e.length;
var d=[];
var a=0;
for(var k=0;
k<m;
k++){var c=e[k];
var f=c.cells.length;
if(f==0){d[a++]=c;
if(k!=0){var n=e[k-1];
var g=n.cells;
var b=g.length;
for(var l=0;
l<b;
l++){var o=g[l];
var h=this._getRowSpan(o);
if(h>1){this._setRowSpan(o,h-1);
}}}}}for(var k=0;
k<a;
k++){var c=d[0];
c.parentNode.removeChild(c);
}},executeCommand:function(d,b){if(!this._selectedTable||!this._selectedCell||!d){return false;
}var a=true;
var c={commandName:d,selectedColIndex:this._selectedCell.cellIndex,selectedRowIndex:this._selectedRowIndex,nextSelectedColIndex:this._selectedCell.cellIndex,nextSelectedRowIndex:this._selectedRowIndex};
switch(d){case"deleteColumn":case"deleteRow":case"deleteCell":case"insertRowAbove":case"insertRowBelow":case"insertColumnToTheLeft":case"insertColumnToTheRight":case"mergeLeft":case"mergeTop":case"mergeRight":case"mergeDown":case"setAsContentCell":case"splitCellHorizontally":case"splitCellVertically":a=this[d](b);
break;
default:this._raiseException(d+" is not implemented!");
return false;
break;
}if(a){this._setTableState();
this._raiseEvent("onCommand",c);
this.set_selectedRow();
if(d!="deleteColumn"&&d!="deleteRow"&&d!="deleteCell"){c.nextSelectedColIndex=this._selectedCell.cellIndex;
c.nextSelectedColIndex=this._selectedRowIndex;
}this._storeState(c);
this._removeEptyTrElements();
}return a;
},_alterNonCurrentRowCellsRowspan:function(f,a){var b=";";
var h="";
for(var e=0;
e<this._tableStateColsCount;
e++){var c=this._getStateValueIndexes(f,e);
var g=c.rowIndex;
var d=c.colIndex;
if(c.rowIndex!=f){var h=g+","+d+";";
if(b.indexOf(";"+h)==-1){b+=h;
this._alterRowSpan(this._selectedTable.rows[g].cells[d],a);
}}}},_getNewCellIndex:function(l,m,b){var c=l+1;
var k=l+","+m;
var f=(b)?b:0;
for(var h=0;
h<this._tableStateColsCount;
h++){if(this._tableState[c][h]==k){if(h!=0){var g=h-1;
for(var a=g;
a>0;
a--){var e=this._getStateValueIndexes(c,g);
var d=e.rowIndex;
if(d==c){var h=e.colIndex;
f=parseInt(h);
break;
}}}break;
}}return f;
},deleteRow:function(q){if(!this._selectedTable){return false;
}var b=this._getLeftTopStateIndexes(this._selectedRowIndex,this._selectedCell.cellIndex);
var c=b.rowIndex;
var d=c-1;
var r=this._selectedRowIndex+1;
var a=this._selectedTable.rows[r];
if(typeof(c)!="undefined"&&typeof(b.colIndex)!="undefined"){var l=";";
var g=0;
for(var n=0;
n<this._tableStateColsCount;
n++){var e=this._tableState[c][n]+";";
if(l.indexOf(";"+e)==-1){l+=e;
var s=this._getSelectedTableCellByStateIndexes(c,n);
var f=this._getRowSpan(s);
if(f==1){}else{if(d>=0&&this._tableState[c][n]==this._tableState[d][n]){var m=this._getSelectedTableCellByStateIndexes(d,n);
this._alterRowSpan(m,-1);
}else{for(var h=n;
h>-1;
h--){var k=this._getStateValueIndexes(r,h);
if(r==k.rowIndex){g=parseInt(k.colIndex)+1;
break;
}}var p=this._insertCell(a,g,s.innerHTML,s);
this._setColSpan(p,this._getColSpan(s));
this._setRowSpan(p,f-1);
g++;
}}}}var o=this._selectedRow.parentNode;
if(o){o.removeChild(this._selectedRow);
}return true;
}},insertRowBelow:function(f){if(!this._selectedTable){return false;
}var l=this._getLeftBottomStateIndexes(this._selectedRowIndex,this._selectedCell.cellIndex);
if(typeof(l.rowIndex)!="undefined"&&typeof(l.colIndex)!="undefined"){var d=l.rowIndex;
var k=d+1;
var e=this._insertRow(k);
$telerik.mergeElementAttributes(this._selectedRow,e);
var g=";";
for(var a=0;
a<this._tableStateColsCount;
a++){stateValue=this._tableState[d][a];
if(g.indexOf(";"+stateValue+";")==-1){g+=stateValue+";";
var h=this._getSelectedTableCellByStateIndexes(d,a);
if(this._getRowSpan(h)>1&&k!=this._tableStateRowsCount&&this._tableState[d][a]==this._tableState[k][a]){this._alterRowSpan(h,1);
}else{var c=this._insertCell(e,e.cells.length,"&nbsp;",h);
var b=this._getColSpan(h);
if(b>1){this._setColSpan(c,b);
}}}}}return true;
},insertRowAbove:function(h){if(!this._selectedTable){return false;
}var d=this._insertRow(this._selectedRowIndex);
$telerik.mergeElementAttributes(this._selectedRow,d);
var b=0;
var f=this._selectedRowCells.length;
this._alterNonCurrentRowCellsRowspan(this._selectedRowIndex,1);
for(var a=0;
a<f;
a++){var g=this._selectedRowCells[a];
var e=this._getColSpan(this._selectedRowCells[a]);
var c=this._insertCell(d,b++,"&nbsp;",g);
if(e>1){this._setColSpan(c,e);
}}return true;
},insertColumnToTheLeft:function(e){if(!this._selectedTable){return false;
}var b=this._getLeftTopStateIndexes(this._selectedRowIndex,this._selectedCell.cellIndex);
if(typeof(b.colIndex)!="undefined"){var m=parseInt(b.colIndex);
if(isNaN(m)){m=0;
}for(var g=0;
g<this._tableStateRowsCount;
g++){var f=this._selectedTable.rows[g];
var n=this._getStateValueIndexes(g,m);
var l=n.rowIndex;
var a=n.colIndex;
if(l==g){var d=false;
if(m==0){d=true;
}else{var q=this._selectedTable.rows[l].cells[a];
var h=this._getColSpan(q);
if(this._tableState[g][m]==this._tableState[g][m-1]&&h>1&&g!=this._selectedRowIndex){q.setAttribute("colSpan",h+1);
var c=this._getRowSpan(q);
if(c>1){for(var k=1;
k<c;
k++){g++;
}}}else{d=true;
}}if(d){var o=this._insertCell(f,a,"&nbsp;",f.cells[a]);
}}else{var p=0;
for(var k=m-1;
k>-1;
k--){var n=this._getStateValueIndexes(g,k);
if(n.rowIndex==g){p=n.colIndex+1;
break;
}}var q=this._getSelectedTableCellByStateIndexes(g,m);
var o=this._insertCell(f,p,"&nbsp;",q);
}}}return true;
},insertColumnToTheRight:function(e){if(!this._selectedTable){return false;
}var b=this._getRightTopStateIndexes(this._selectedRowIndex,this._selectedCell.cellIndex);
if(typeof(b.colIndex)!="undefined"){var m=parseInt(b.colIndex);
if(isNaN(m)){m=0;
}for(var g=0;
g<this._tableStateRowsCount;
g++){var f=this._selectedTable.rows[g];
var n=this._getStateValueIndexes(g,m);
var l=n.rowIndex;
var a=parseInt(n.colIndex);
if(isNaN(a)){a=0;
}if(l==g){var d=false;
if(m==this._tableStateColsCount-1){d=true;
}else{var q=this._selectedTable.rows[l].cells[a];
var h=this._getColSpan(q);
if(this._tableState[g][m]==this._tableState[g][m+1]&&h>1&&g!=this._selectedRowIndex){q.setAttribute("colSpan",h+1);
var c=this._getRowSpan(q);
if(c>1){for(var k=1;
k<c;
k++){g++;
}}}else{d=true;
}}if(d){var o=this._insertCell(f,a+1,"&nbsp;",f.cells[a]);
}}else{var p=this._selectedTable.rows[g].cells.length;
for(var k=m+1;
k<this._tableStateColsCount;
k++){var n=this._getStateValueIndexes(g,k);
if(n.rowIndex==g){p=parseInt(n.colIndex);
if(isNaN(p)){p=0;
}break;
}}var q=this._getSelectedTableCellByStateIndexes(g,m);
var o=this._insertCell(f,p,"&nbsp;",q);
}}}return true;
},deleteColumn:function(e){if(!this._selectedTable){return false;
}var m=this._getLeftTopStateIndexes(this._selectedRowIndex,this._selectedCell.cellIndex);
var f=m.colIndex;
if(typeof(f)!="undefined"){for(var c=0;
c<this._tableStateRowsCount;
c++){var g=this._selectedTable.rows[c];
var k=this._getStateValueIndexes(c,f);
var a=parseInt(k.colIndex);
var h=g.cells[a];
var d=this._getRowSpan(h);
var l=this._getColSpan(h);
if(l>1){this._setColSpan(h,l-1);
}else{g.removeChild(h);
}if(d>1){for(var b=1;
b<d;
b++){c++;
}}}return true;
}return false;
},canMergeLeft:function(g){if(!g){g=this._selectedCell;
}if(!g||!g.parentNode){return false;
}var c=true;
var e=g.cellIndex;
var h=g.parentNode;
var f=h.rowIndex;
if(e==0||e==-1){c=false;
}else{var k=this._getLeftTopStateIndexes(f,e);
if(typeof(k.rowIndex)=="undefined"||typeof(k.colIndex)=="undefined"){return false;
}var a=this._getSelectedTableCellByStateIndexes(k.rowIndex,k.colIndex-1);
if(a){var b=a.parentNode.rowIndex;
var d=this._getRowSpan(a);
if(b!=f||this._getRowSpan(g)!=this._getRowSpan(a)){c=false;
}}}return c;
},mergeLeft:function(c){var d=(c&&c.cell)?c.cell:this._selectedCell;
if(!d||!d.parentNode){return false;
}var b=true;
var e=d.parentNode;
if(this.canMergeLeft(d)){var f=e.cells[d.cellIndex-1];
this._setColSpan(d,this._getColSpan(d)+this._getColSpan(f));
var a=f.innerHTML;
if(a!=" "&&a!="&nbsp;"){d.innerHTML=a+"<br />"+d.innerHTML;
}e.removeChild(f);
}else{this._raiseException("The cell can not be merged left!");
b=false;
}return b;
},canMergeTop:function(e){if(!e){e=this._selectedCell;
}if(!e||!e.parentNode){return false;
}var a=true;
var b=e.parentNode.rowIndex;
if(b==0){a=false;
}else{var c=this._getLeftTopStateIndexes(b,e.cellIndex);
if(typeof(c.rowIndex)=="undefined"||typeof(c.colIndex)=="undefined"){return false;
}var d=this._getSelectedTableCellByStateIndexes(c.rowIndex-1,c.colIndex);
a=this.canMergeDown(d);
}return a;
},mergeTop:function(c){var d=(c&&c.cell)?c.cell:this._selectedCell;
if(!d||!d.parentNode){return false;
}var a=true;
if(this.canMergeTop(d)){var f=d.parentNode;
var g=this._getLeftTopStateIndexes(f.rowIndex,d.cellIndex);
var e=this._getSelectedTableCellByStateIndexes(g.rowIndex-1,g.colIndex);
var b=d.innerHTML;
if(b!=" "&&b!="&nbsp;"){e.innerHTML+="<br />"+b;
}this.set_selectedCell(e,false);
this._alterRowSpan(e,this._getRowSpan(d));
f.removeChild(d);
}else{this._raiseException("The cell cannot be merged top!");
a=false;
}return a;
},canMergeRight:function(e){if(!e){e=this._selectedCell;
}if(!e||!e.parentNode){return false;
}var a=true;
var d=e.cellIndex;
var b=e.parentNode;
var f=b.rowIndex;
if(typeof(f)=="undefined"){return false;
}var g=b.cells.length;
if(d==g-1){a=false;
}else{var h=this._getRightTopStateIndexes(f,d);
if(typeof(h.rowIndex)=="undefined"||typeof(h.colIndex)=="undefined"){return false;
}var c=this._getSelectedTableCellByStateIndexes(h.rowIndex,h.colIndex+1);
if(c&&(c.parentNode.rowIndex!=f||this._getRowSpan(e)!=this._getRowSpan(c))){a=false;
}}return a;
},mergeRight:function(f){var d=(f&&f.cell)?f.cell:this._selectedCell;
if(!d||!d.parentNode){return false;
}var a=true;
if(this.canMergeRight(d)){var c=d.parentNode;
var b=c.cells[d.cellIndex+1];
var e=b.innerHTML;
if(e!=" "&&e!="&nbsp;"){d.innerHTML+="<br />"+e;
}this._setColSpan(d,this._getColSpan(d)+this._getColSpan(b));
c.removeChild(b);
}else{this._raiseException("The cell can not be merged right!");
a=false;
}return a;
},canMergeDown:function(o){if(!o){o=this._selectedCell;
}if(!o||!o.parentNode){return false;
}var e=true;
var n=this._getRowSpan(o);
var d=this._getColSpan(o);
var g=o.parentNode.rowIndex;
var c=g+n;
if(c==this._tableStateRowsCount){e=false;
}else{var b=this._getLeftTopStateIndexes(g,o.cellIndex);
if(typeof(b.colIndex)!="undefined"){var l=b.colIndex;
var m=this._getStateValueIndexes(c,l);
var f=m.rowIndex;
var a=parseInt(m.colIndex);
var h=this._selectedTable.rows[f].cells[a];
if(h.parentNode.parentNode.tagName!=o.parentNode.parentNode.tagName){return false;
}var k=this._getColSpan(h);
if(d!=k){e=false;
}else{if(l!=0){if(this._tableState[c][l-1]==this._tableState[c][l]){e=false;
}}}}}return e;
},mergeDown:function(f){var d=(f&&f.cell)?f.cell:this._selectedCell;
if(!d||!d.parentNode){return false;
}var b=true;
if(this.canMergeDown(d)){var a=this._getLeftBottomStateIndexes(d.parentNode.rowIndex,d.cellIndex);
var e=this._getSelectedTableCellByStateIndexes(a.rowIndex+1,a.colIndex);
var c=e.innerHTML;
if(c!=" "&&c!="&nbsp;"){d.innerHTML+="<br />"+c;
}this._alterRowSpan(d,this._getRowSpan(e));
e.parentNode.removeChild(e);
}else{this._raiseException("The cell can not be merged down!");
b=false;
}return b;
},canDeleteCell:function(g){if(!g){g=this._selectedCell;
}if(!g||!g.parentNode){return false;
}var h=0;
var a=this._getRowSpan(g);
var b=this._getColSpan(g);
var e=g.parentNode.rowIndex;
var d=g.cellIndex;
var f=this._getLeftTopStateIndexes(e,d);
var c=this._getLeftBottomStateIndexes(e,d);
if(a==this._tableStateRowsCount){h=1;
}else{if(b==this._tableStateColsCount){h=2;
}else{if(this.canMergeLeft(g)){h=3;
}else{if(this.canMergeRight(g)){h=4;
}else{if(this.canMergeDown(g)){h=5;
}else{if(this.canMergeTop(g)){h=6;
}}}}}}return h;
},deleteCell:function(f){var g=(f&&f.cell)?f.cell:this._selectedCell;
if(!g||!g.parentNode){return false;
}var a=true;
var c=g.parentNode;
var l=this.canDeleteCell(g);
switch(l){case 1:c.removeChild(g);
break;
case 2:c.parentNode.removeChild(c);
break;
case 3:var d=c.cells[g.cellIndex-1];
this.set_selectedCell(d,false);
a=this.mergeRight();
break;
case 4:var e=c.cells[g.cellIndex+1];
this.set_selectedCell(e,false);
a=this.mergeLeft();
break;
case 5:var b=this._getLeftBottomStateIndexes(c.rowIndex,g.cellIndex);
var k=this._getSelectedTableCellByStateIndexes(b.rowIndex+1,b.colIndex);
this.set_selectedCell(k,false);
a=this.mergeTop();
break;
case 6:var b=this._getLeftBottomStateIndexes(c.rowIndex,g.cellIndex);
var h=this._getSelectedTableCellByStateIndexes(b.rowIndex-1,b.colIndex);
this.set_selectedCell(h,false);
a=this.mergeDown();
break;
default:this._raiseException("The cell can not be deleted!");
a=false;
break;
}if(a&&c&&c.cells.length==0){c.parentNode.removeChild(c);
}return a;
},splitCellHorizontally:function(g){if(!this._selectedCell){return false;
}var u=this._selectedCell;
var l=true;
var m=this._getColSpan(u);
var e=u.cellIndex;
var h=this._selectedRow;
var c=this._selectedRowIndex;
var f=c+","+e;
var t=this._insertCell(h,e+1,"&nbsp;",u);
this._setRowSpan(t,this._getRowSpan(u));
if(m==1){var s=this._getLeftTopStateIndexes(c,e);
var d=s.colIndex;
var p=";";
for(var o=0;
o<this._tableStateRowsCount;
o++){var a=this._tableState[o][d];
if(o!=c&&a!=f&&p.indexOf(";"+a+";")){p+=a+";";
var n=this._getSelectedTableCellByStateIndexes(o,d);
this._setColSpan(n,this._getColSpan(n)+1);
}}}else{var b=(g)?parseInt(g.rightColSpan):null;
if(!b||isNaN(b)||b>=m){var q=Math.ceil(m/2);
var k,r;
if(m%2==0){k=q;
r=q;
}else{k=q;
r=q-1;
}}else{k=m-b;
r=b;
}this._setColSpan(u,k);
this._setColSpan(t,r);
}return l;
},splitCellVertically:function(e){var s=this._selectedCell;
if(!s){return false;
}if(!s.parentNode){return false;
}var h=true;
var l=this._getRowSpan(s);
var d=s.cellIndex;
var g=this._selectedRow;
var c=this._selectedRowIndex;
var q=this._selectedRowCells;
var n=q.length;
var m=";";
var k=null;
var r=[];
if(l==1){for(var o=0;
o<this._tableStateColsCount;
o++){k=this._getSelectedTableCellByStateIndexes(c,o);
stateValue=this._tableState[c][o];
r=this._getStateValueIndexes(c,o);
if((k.cellIndex!=d||c!=r.rowIndex)&&m.indexOf(";"+stateValue+";")==-1){m+=stateValue+";";
this._alterRowSpan(k,1);
}}newRow=this._insertRow(c+1);
$telerik.mergeElementAttributes(g,newRow);
newCell=this._insertCell(newRow,newRow.cells.length,"&nbsp;",s);
this._setColSpan(newCell,this._getColSpan(s));
}else{var a=Math.ceil(l/2),f,b;
var p=(e)?parseInt(e.downRowSpan):null;
if(!p||isNaN(p)||p>=l){if(l%2==0){f=a;
b=a;
}else{f=a;
b=a-1;
}}else{f=l-p;
b=p;
}this._setRowSpan(s,f);
arStateIndexes=this._getLeftTopStateIndexes(c,d);
alterRowIndex=c+f;
newCellColIndex=0;
for(var o=arStateIndexes.colIndex;
o>-1;
o--){r=this._getStateValueIndexes(alterRowIndex,o);
if(r.rowIndex==alterRowIndex){newCellColIndex=r.colIndex+1;
break;
}}newCell=this._insertCell(this._selectedTable.rows[alterRowIndex],newCellColIndex,"&nbsp;",s);
this._setColSpan(newCell,this._getColSpan(s));
this._setRowSpan(newCell,b);
}return h;
},setAsContentCell:function(b){var a=this._selectedCell;
if(!a){return false;
}if(!a.parentNode){return false;
}a.style.width="100%";
a.style.height="100%";
return true;
},add_onCommand:function(a){this.get_events().addHandler("onCommand",a);
},_raiseEvent:function(b,c){var a=this.get_events().getHandler(b);
if(a){if(!c){c=Sys.EventArgs.Empty;
}a(this,c);
}}};
Telerik.Web.UI.LayoutBuilderEngine.registerClass("Telerik.Web.UI.LayoutBuilderEngine",Telerik.Web.UI.RadWebControl);

Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.Utils={setElementClassName:function(c,b){if(!c){return"";
}if(!b){c.className="";
c.removeAttribute("class",0);
c.removeAttribute("classname",0);
}else{var a=c.className;
c.className=b;
return a;
}},addElementsToSelection:function(c,f){if($telerik.isIE){Telerik.Web.UI.Editor.Utils.selectElement(c,f[0]);
return 1;
}var e=c.getSelection();
var d=new Telerik.Web.UI.Editor.Selection(c);
var b=d.getRange();
if(!b||!b.selectNodeContents){return -1;
}if(e.removeAllRanges){e.removeAllRanges();
}for(var a=0;
a<f.length;
a++){b.selectNodeContents(f[a]);
e.addRange(b);
}return f.length;
},getFullySelectedElement:function(a){return $telerik.isIE?Telerik.Web.UI.Editor.Utils._getFullySelectedElementIE(a):Telerik.Web.UI.Editor.Utils._getFullySelectedElementMoz(a);
},_isListFullySelected:function(b,c){if(b.tagName=="UL"||b.tagName=="OL"){var a=c.match(/<LI\/?>/gi);
if(a.length==b.getElementsByTagName("LI").length){return true;
}}return false;
},_getFullySelectedElementIE:function(p){var k=new Telerik.Web.UI.Editor.Selection(p);
var h=k.getRange();
var m=(h.length>0?h(0):h.parentElement());
if(h.length>0){return m;
}else{if(m.tagName=="A"){var f=h.duplicate();
f.moveToElementText(m);
if(h.inRange(f)){return m;
}}else{if(Telerik.Web.UI.Editor.Utils._isListFullySelected(m,k.getHtml())){return m;
}else{if(!h.htmlText){return null;
}}}}var n=h.duplicate();
var e=h.duplicate();
n.collapse(true);
e.collapse(false);
var o=n.parentElement();
if(o.parentNode==m){o=m;
}var c=e.parentElement();
if(o==c){var b=p.document;
var g=b.body.createTextRange();
g.moveToElementText(o);
var d=h.htmlText;
var a=false;
var l=o.outerHTML.replace(/[\r\n\t]/ig,"");
var i=o.innerHTML.replace(/[\r\n\t]/ig,"");
d=d.replace(/[\r\n\t]/ig,"");
if(l==d||i==d){a=true;
}if(a||(0==g.compareEndPoints("StartToStart",h)&&0==g.compareEndPoints("EndToEnd",h))){if("BODY"!=m.tagName){return m;
}}}},_getFullySelectedElementMoz:function(n){var c=n.document;
var l=n.getSelection();
if(l.rangeCount<1){return null;
}var h=l.getRangeAt(0);
var g=h.commonAncestorContainer;
var k=g.parentNode;
var i=new Telerik.Web.UI.Editor.Selection(n);
if($telerik.isFirefox){var m=i.getHtml();
var b=document.createElement("div");
b.innerHTML=m;
if(b.childNodes.length==1&&b.firstChild.nodeType==1){var e=b.firstChild.tagName;
var a=h.startContainer;
if(a.nodeType==1){if(a.tagName==e){return a;
}else{if(a.getElementsByTagName){a=a.getElementsByTagName(e)[0];
if(a){return a;
}}}}else{while(a){if(e==a.tagName){return a;
}a=a.nextSibling;
}}}}if(g.tagName=="BODY"){var f=i.getParentElement();
if(f&&f.tagName!="BODY"){return f;
}}else{var d=c.createElement("span");
d.appendChild(h.cloneContents());
if(d.innerHTML==k.innerHTML&&k.tagName!="BODY"){return k;
}}if(Telerik.Web.UI.Editor.Utils._isListFullySelected(g,i.getHtml())){return g;
}},getInvisibleParent:function(a){while(a!=document){if("none"==$telerik.getCurrentStyle(a,"display","")){return a;
}a=a.parentNode;
}return null;
},cleanPastedContent:function(e,a,b,c){var d=e;
if(a==Telerik.Web.UI.StripFormattingOptions.None){if((e.match(/style="[^"]*?mso[^"]*?"/ig)||e.match(/class="?[^"]*?mso[^"]*?"?/ig))&&confirm(b)){e=Telerik.Web.UI.Editor.Utils.convertWordLists(e);
d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD");
}}else{if(a&Telerik.Web.UI.StripFormattingOptions.All){d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"ALL");
}else{if(a&Telerik.Web.UI.StripFormattingOptions.AllExceptNewLines){d=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"ALL_NO_BRAKES");
}else{if(a&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists){e=Telerik.Web.UI.Editor.Utils.convertWordLists(e);
}if(a&Telerik.Web.UI.StripFormattingOptions.MSWordRemoveAll){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD_ALL");
}if(a&Telerik.Web.UI.StripFormattingOptions.MSWordNoFonts){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD_NO_FONTS");
}if(a&Telerik.Web.UI.StripFormattingOptions.MSWord){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"WORD");
}if(a&Telerik.Web.UI.StripFormattingOptions.Css){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"CSS");
}if(a&Telerik.Web.UI.StripFormattingOptions.Font){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"FONT");
}if(a&Telerik.Web.UI.StripFormattingOptions.Span){e=Telerik.Web.UI.Editor.Utils.stripFormatting(e,"SPAN");
}d=e;
}}}if(null!=c&&false==c){d=Telerik.Web.UI.Editor.Utils.stripFormatting(d,"SCRIPT");
}return d;
},isCursorMovingKey:function(a){if(a>=33&&a<=40){return true;
}return false;
},isSystemKey:function(a){if(a>=112&&a<=123){return true;
}if(a>=8&&a<=27){return true;
}if(a>=32&&a<=46){return true;
}if(a==93){return true;
}return false;
},storeBrowserPosition:function(){var a=document.body;
var b=document.documentElement;
this._browserTop=a.scrollTop>b.scrollTop?a.scrollTop:b.scrollTop;
this._browserLeft=a.scrollLeft>b.scrollLeft?a.scrollTop:b.scrollLeft;
return{x:this._browserLeft,y:this._browserTop};
},restoreBrowserPosition:function(b,d){try{if(null==b){b=this._browserLeft;
}if(null==d){d=this._browserTop;
}var e=document.body;
var c=document.documentElement;
e.scrollTop=d;
e.scrollLeft=b;
c.scrollTop=d;
c.scrollLeft=b;
}catch(a){}},_getPasteIframe:function(a){a=a||document;
if(!this._pasteIframe){if($telerik.isSafari){this._pasteIframe=a.createElement("div");
this._pasteIframe.id="radePasteHelper";
var c=this._pasteIframe.style;
c.position="absolute";
c.left=-10000;
c.border="0px solid red";
c.top=a.body.scrollTop;
c.width=1;
c.height=1;
c.overflow="hidden";
a.body.appendChild(this._pasteIframe);
}else{this._pasteIframe=document.createElement("iframe");
this._pasteIframe.setAttribute("title","Paste helper element.");
var b=this._pasteIframe.style;
b.width="1px";
b.height="1px";
b.border="0px solid red";
b.overflow="hidden";
b.position="absolute";
a.body.appendChild(this._pasteIframe);
try{var g=this._pasteIframe.contentWindow.document;
var f=g.open("text/html","replace");
var d="<html><head><title>New Document</title></head><body contentEditable='true' style='overflow:hidden;margin:0px;padding:0px;height:100%'></html>";
f.write(d);
f.close();
}catch(h){}}}return this._pasteIframe;
},getPasteContainer:function(a){var b=this._getPasteIframe(a);
return $telerik.isSafari?b:b.contentWindow.document.body;
},clearPasteContainer:function(){this._pasteIframe.parentNode.removeChild(this._pasteIframe);
this._pasteIframe=null;
},getClipboardAsHtml:function(){var b=this.getPasteContainer();
b.innerHTML="";
if(b.setActive){b.setActive();
}document.execCommand("Paste",null);
var a=b.innerHTML;
b.innerHTML="";
return a;
},convertWordLists:function(h){var s=function(p,u){if(!p){return 0;
}if(typeof(p.length)!="undefined"){for(var w=0,v=p.length;
w<v;
w++){if(u.call(p,p[w],w,p)===false){return 0;
}}}return 1;
};
var r=function(u,p){if(u){for(var w=0,v=u.length;
w<v;
w++){if(u[w]===p){return w;
}}}return -1;
};
var o=function(v,u){var p=[];
if(v&&u){var i=v.parentNode;
while(i){if(i.tagName&&i.tagName.toLowerCase()==u.toLowerCase()){p.push(i);
}i=i.parentNode;
}}return p;
};
h=h.replace(/<!--\[if !supportLists\]-->/gi,"_TELERIK_I_");
h=h.replace(/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1_TELERIK_I_");
h=h.replace(/(<span[^>]+mso-list:[^>]+>)/gi,"$1_TELERIK_I_");
var c=document.createElement("div");
c.innerHTML=h;
var e=c.getElementsByTagName("P");
for(var m=e.length-1;
m>=0;
m--){var k=e[m];
if(!k.innerHTML){k.parentNode.removeChild(k);
}}var d,a,l=-1,n,q=[],g,t="",b=[];
s(e,function(y){if(!y){return;
}var z="",B,L="",I="",x;
for(var H=y.firstChild;
H&&H.nodeType==3;
H=H.nextSibling){z+=H.nodeValue;
}z=y.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");
if(/^(_TELERIK_I_)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(z)){B="ul";
y.innerHTML=y.innerHTML.replace(/(<span[^>]+style="font[^>]+>)/gi,"$1_TELERIK_I_");
}if(/^_TELERIK_I_\s*\w+\.\s*\u00a0{2,}/.test(z)){B="ol";
}if(B){n=parseFloat(y.style.marginLeft||0);
if(n>l){q.push(n);
}if(!d||B!=g){d=document.createElement(B);
var C=y.parentNode;
var u=y.nextSibling;
if(u){C.insertBefore(d,u);
}else{C.appendChild(d);
}}else{if(n>l){d=a.appendChild(document.createElement(B));
}else{if(n<l){var w=o(d.parentNode,B);
d=w[w.length-1-r(q,n)]||d;
}}}pChildsLength=y.childNodes.length;
if(pChildsLength>0){if(!$telerik.isFirefox){firstChild=y.childNodes[0];
if(firstChild.tagName=="SPAN"){if(firstChild.style.color){I=firstChild.style.color;
}for(var D=1;
D<pChildsLength;
D++){var F=$telerik.getOuterHtml(y.childNodes[D]);
L+=F;
}}}else{var M=y.getElementsByTagName("SPAN");
if(M.length>0){var A=M[0];
if(A.style.color){I=A.style.color;
}}var E=y.innerHTML;
var K=E.split("<!--[endif]-->");
if(K.length==2){L=K[1].replace("<o:p></o:p>","");
}}}if(!L){if(B=="ul"){L=z.replace(/_TELERIK_I_/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*(&nbsp;|\u00a0)+\s*/,"");
}else{L=z.replace(/_TELERIK_I_/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"");
}}sElements=y.getElementsByTagName("SPAN");
if(sElements.length>0){var J=[];
s(sElements,function(i){if(!i){return;
}var p=i.innerHTML;
if(/^_TELERIK_I_[\s\S]*[?o]/.test(p)){J.push(i);
}if(B!="ul"&&/^[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){J.push(i);
}});
for(var D=0,v=J.length;
D<v;
D++){var G=J[D];
if(G&&G.parentNode){G.parentNode.removeChild(G);
}}}a=document.createElement("li");
if(I){a.style.color=I;
}a.innerHTML=L;
d.appendChild(a);
b.push(y);
l=n;
g=B;
}else{d=l=0;
}});
for(var m=0;
m<b.length;
m++){var f=b[m];
f.parentNode.removeChild(f);
}return c.innerHTML.replace(/_TELERIK_I_/g,"");
},stripFormatting:function(b,a){switch(a){case"ALL":b=b.replace(new RegExp("<(SCRIPT|STYLE)([^>]*)>[\\s\\S]*?</(\\1)([^>]*)>","ig"),"");
b=b.replace(new RegExp("<!--[\\s\\S]*?-->","ig"),"");
b=b.replace(/<\/?[^>]*>/ig,"");
break;
case"ALL_NO_BRAKES":b=b.replace(/<BR(\s[^>]*)?\/?>/ig,"~RADEDITORBRAKE~");
b=b.replace(new RegExp("<(SCRIPT|STYLE)([^>]*)>[\\s\\S]*?</(\\1)([^>]*)>","ig"),"");
b=b.replace(new RegExp("<!--[\\s\\S]*?-->","ig"),"");
b=b.replace(/<\/?[^>]*>/ig,"");
b=b.replace(/~RADEDITORBRAKE~/ig,"<br/>");
b=b.replace(/\n/ig,"<br/>");
b=b.replace(/\r/ig,"");
break;
case"WORD":case"WORD_ALL":case"WORD_NO_FONTS":b=this.stripWordFormatting(b,a);
break;
case"CSS":b=b.replace(new RegExp("(<[^>]+) class=[^ |^>]*([^>]*>)","ig"),"$1 $2");
b=b.replace(/(<[^>]+) style="[^"]*"([^>]*>)/ig,"$1 $2");
break;
case"FONT":b=b.replace(/<\/?font[^>]*>/ig,"");
break;
case"SPAN":b=b.replace(/<\/?span[^>]*>/ig,"");
break;
case"SCRIPT":b=b.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
b=b.replace(new RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
break;
default:break;
}return b;
},replaceNewLineWithBr:function(b){try{b=b.replace(/\n/g,"<br>");
return b;
}catch(a){}},convertText2Html:function(a){try{a=a.replace(/</g,"&lt;");
a=a.replace(/>/g,"&gt;");
a=a.replace(/\n/g,"<br>");
return a;
}catch(b){}},clearWordAttributesInElement:function(g,b){var e=$telerik.isIE?g.all:g.getElementsByTagName("*");
for(var a=0;
a<e.length;
a++){var c=e[a];
var f=new RegExp("mso","gi");
if(c.nodeType==1){if(f.exec(c.className)){c.className="";
}c.removeAttribute("lang","",0);
c.removeAttribute("stylw","",0);
c.style.cssText=c.style.cssText.replace(/(([\w-]*?mso[\w-]*?):(.+?)([;^$]|$))/gi,"");
if($telerik.isIE){c.style.removeAttribute("tab-stops",0);
c.style.removeAttribute("textIndent",0);
}if($telerik.isIE&&(b=="WORD_NO_FONTS"||b=="WORD_ALL")){c.style.removeAttribute("fontFamily",0);
c.removeAttribute("face",0);
}if(c.style&&c.style.fontFamily){c.style.fontFamily=c.style.fontFamily.replace(/('|"|&quot;)/g,"");
}for(j=c.attributes.length-1;
j>=0;
j--){var d=c.attributes[j];
if("null"!=d.value&&""!=d.value){if(f.exec(d.name)||f.exec(d.value)){c.removeAttribute(d.name);
}}}}}},stripWordFormatting:function(d,b){var c=d;
if(b=="WORD_ALL"){var e=/<SPAN[^>]*?>([\s\S]*?)<\/SPAN[^>]*?>/ig;
while(c.match(e)){c=c.replace(e,"$1");
}var a=/<FONT[^>]*?>([\s\S]*?)<\/FONT[^>]*?>/ig;
while(c.match(a)){c=c.replace(a,"$1");
}}c=c.replace(/<span>([^<>]+)<\/span>/gi,"<span EditorSaved='true'>$1</span>");
c=c.replace(/<font>([^<>]+)<\/font>/gi,"<font EditorSaved='true'>$1</font>");
if($telerik.isFirefox){c=c.replace(/<(?:link|meta) [^>]+>/ig,"");
c=c.replace(/<!--\[if [^\]]+]>[\s\S]+?<!\[endif\]-->/ig,"");
c=c.replace(/<style[^>]*?>[\s\S]*?<\/style>/ig,"");
}c=c.replace(/<o:p>&nbsp;<\/o:p>/gi,"");
c=c.replace(/<\/?o:[^>]*>/gi,"");
c=c.replace(/ class=\"(mso[^\"]*)\"/gi,"");
c=c.replace(/ class=(mso\w+)/gi,"");
c=c.replace(/<!--[\s\S]+?-->/gi,"");
c=c.replace(/<\\?\?xml[^>]*>/gi,"");
c=c.replace(/^(?:\s|&nbsp;)+/i,"");
c=c.replace(/(?:\s|&nbsp;)+$/i,"");
var f=document.createElement("div");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(f,c);
this.clearWordAttributesInElement(f,b);
c=f.innerHTML;
c=c.replace(/\t/g," ");
c=c.replace(/<\/?\w+:[^>]*>/gi,"");
c=c.replace(/<\\?\??xml[^>]>/gi,"");
c=c.replace(/<p>&nbsp;<\/p>/gi,"<BR><BR>");
c=c.replace(/[ ]+/g," ");
c=c.replace(/<st1:.*?>/gi,"");
c=c.replace(/<font>([^<>]+)<\/font>/gi,"$1");
c=c.replace(/<span>([^<>]+)<\/span>/gi,"$1");
c=c.replace(/[\s]+EditorSaved=[\'\"]true[\'\"]/gi,"");
c=this.cleanStylesOnStripWordFormatting(c);
c=c.replace(/style=(""|'')/ig,"");
c=c.replace(/class=(""|'')/ig,"");
c=c.replace(/v:shape="[^"]+"/ig,"");
c=c.replace(/<span[^>]*>\s*<\/span[^>]*>/ig," ");
c=c.replace(/<font[^>]*>\s*<\/font[^>]*>/ig," ");
c=c.replace(/\s+/ig," ");
return c;
},cleanStylesOnStripWordFormatting:function(a){var b=a+"";
b=b.replace(/(<[^>]*style=["'])([^"']*)(["'][^>]*>)/gi,function(d,e,f,c,g,h){var i=e;
f=f.replace(/(background|-webkit-background)-?[a-z]*: initial;/gi,"");
if($telerik.isFirefox){f=f.replace(/(background:) none repeat scroll 0% 0%/gi,"$1");
}f=f.replace(/line-height: normal;?/gi,"");
f=f.replace(/margin: 0[a-z]{2} 0[a-z]{2} 0[a-z]{2};?/gi,"");
if(!$telerik.isIe){f=f.replace(/margin-?[a-z]*: 0.0001[a-z]{2};?/gi,"");
}i+=f;
i+=c;
return i;
});
return b;
},createTable:function(g,d,b){if(!b){b=document;
}var a=b.createElement("table");
for(var e=0;
e<g;
e++){oRow=a.insertRow(-1);
for(var f=0;
f<d;
f++){oCell=oRow.insertCell(-1);
oCell.innerHTML="&nbsp;";
}}return a;
},getElementParentByTag:function(b,a){if(null==b){return null;
}if(null==a){return b;
}try{while(b&&null!=b.tagName&&b.tagName!=a){if(this.isEditorContentArea(b)){break;
}b=b.parentNode;
}return((b.tagName==a)?b:null);
}catch(c){return null;
}},isEditorContentArea:function(a){var b=(a&&(a.tagName=="BODY"||(a.tagName=="DIV"&&Sys.UI.DomElement.containsCssClass(a,"reContentArea"))))?true:false;
return b;
},selectElement:function(f,e){if(!e){return;
}var b=f.document;
var c=null;
if($telerik.isIE){switch(e.tagName){case"TABLE":case"IMG":case"HR":case"INPUT":c=b.body.createControlRange();
c.add(e);
break;
case"UL":case"OL":c=b.body.createTextRange();
c.moveToElementText(e);
var g=c.parentElement();
if(g.tagName!="UL"||g.tagName!="OL"){c.moveEnd("character",-1);
}break;
default:c=b.body.createTextRange();
c.moveToElementText(e);
break;
}if(c){try{c.select();
return true;
}catch(d){return false;
}}}else{if(f.getSelection){c=b.createRange();
c.selectNode(e);
if(window.opera){c.selectNodeContents(e);
}var a=f.getSelection();
if($telerik.isSafari){if(e.tagName!="TD"&&e.tagName!="TH"){a.setBaseAndExtent(c.startContainer,c.startOffset,c.endContainer,c.endOffset);
}}else{a.removeAllRanges();
a.addRange(c);
}return true;
}}return false;
},getOuterHtml:function(a){return $telerik.getOuterHtml(a);
},setElementInnerHtml:function(c,a){var b=$telerik.isIE?this.getStoredOriginalPathsAndAttributes(a):a;
c.innerHTML="<span>&nbsp;</span>"+b;
c.removeChild(c.firstChild);
if($telerik.isIE){this.restoreOriginalPathsAndAttributes(c);
}},removeNode:function(a){var b=a.parentNode;
if(b!=null){while(a.childNodes&&a.childNodes.length>0){b.insertBefore(a.childNodes[0],a);
}b.removeChild(a);
return b;
}return true;
},getStoredOriginalPathsAndAttributes:function(d){var a=function(l,o,p,f,g,h,i,m,k){if(!f){f="";
g=g+i;
var n=g.search(/(\s|>)/gi);
if(n>0){i=g.substring(n,g.length);
g=g.substring(0,n);
if(g=='""'){g="";
f='"';
}}else{return l;
}}return o+" "+p+"="+f+g+f+' originalAttribute="'+p+'" originalPath="'+g+'"'+i;
};
var e=new RegExp("(<[^>]*?)\\s(href|src)\\s*=\\s*('|\")?([^>]+?)(\\3)([^>]*?>)","ig");
d=d.replace(e,a);
var c=new RegExp('(<!--[^(-->)]+) originalAttribute="(?:href|src)" originalPath="[^"]+"([\\s\\S]*?-->)',"ig");
var b=d.length+1;
while(d.length<b){b=d.length;
d=d.replace(c,"$1$2");
}return d;
},restoreOriginalPathsAndAttributes:function(d){var a=d.getElementsByTagName("*");
for(var b=0;
b<a.length;
b++){var f=a[b];
var e=f.getAttribute("originalPath");
var c=f.getAttribute("originalAttribute");
if(e!=null&&c!=null){f.removeAttribute("originalPath");
f.removeAttribute("originalAttribute");
if(e.toLowerCase().indexOf("mailto:")==0){continue;
}e=e.replace(window.location.href+"#","#");
var g=f.innerHTML;
f.setAttribute(c,e,0);
if(g!=f.innerHTML){f.innerHTML=g;
}}}},_encodeHtmlContent:function(b,a){var d=new Array("%","<",">","!",'"',"#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+");
var c=b;
var e;
if(a){for(e=0;
e<d.length;
e++){c=c.replace(new RegExp("\\x"+d[e].charCodeAt(0).toString(16),"ig"),"%"+d[e].charCodeAt(0).toString(16));
}}else{for(e=d.length-1;
e>=0;
e--){c=c.replace(new RegExp("%"+d[e].charCodeAt(0).toString(16),"ig"),d[e]);
}}return c;
},encodePostbackContent:function(a){return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(a,true);
},decodePostbackContent:function(a){return Telerik.Web.UI.Editor.Utils._encodeHtmlContent(a,false);
},makeUrlAbsolute:function(b){b=b.split("&").join("&amp;").split('"').join("&quot;").split("<").join("&lt;");
var a=document.createElement("div");
a.innerHTML='<a href="'+b+'">a</a>';
return a.childNodes[0].href;
},addStyleSheet:function(a,f,c){if(!a){return;
}f=f||document;
var b=f.createElement("link");
b.setAttribute("href",a,0);
if($telerik.isIE&&b.href.indexOf("https://")==0&&a.indexOf("https://")!=0){b.setAttribute("href",b.href);
}else{if($telerik.isIE7&&a.indexOf("https://")!=0&&b.href.indexOf("https://")!=0&&window.location.protocol=="https:"){b.setAttribute("href",Telerik.Web.UI.Editor.Utils.makeUrlAbsolute(a),0);
}}b.setAttribute("type","text/css");
if(c){b.setAttribute("id",c);
}else{c="";
}b.setAttribute("rel","stylesheet",0);
var e=f.getElementsByTagName("head")[0];
if($telerik.isSafari){var d=function(){e.appendChild(b);
};
window.setTimeout(d,200);
}else{e.appendChild(b);
}},_copyElementsBetweenNodes:function(h,e,d){var f=h.getElementsByTagName(d);
var g=e.getElementsByTagName(d);
for(var a=0;
a<f.length;
a++){switch(d){case"script":case"title":g[a].text=f[a].text;
break;
case"style":if(g[a].innerHTML!=f[a].innerHTML){g[a].styleSheet.cssText=f[a].styleSheet.cssText;
}break;
case"select":g[a].selectedIndex=f[a].selectedIndex;
break;
case"iframe":var c=f[a].innerHTML;
if(c){var b=g[a].outerHTML;
if(b){var k=b.indexOf(">");
if(k>0){b=b.substr(0,k)+">"+c+b.substr(k+1);
g[a].outerHTML=b;
}}}break;
default:Telerik.Web.UI.Editor.Utils.setElementInnerHtml(g[a],f[a].innerHTML);
break;
}}},cloneNodeWithChildren:function(b){if(!b){return null;
}if($telerik.isIE&&b.getElementsByTagName){var a=b.cloneNode(true);
if(typeof(a.innerHTML)!="string"){this.setElementInnerHtml(a,b.innerHTML);
}this._copyElementsBetweenNodes(b,a,"script");
this._copyElementsBetweenNodes(b,a,"map");
this._copyElementsBetweenNodes(b,a,"style");
this._copyElementsBetweenNodes(b,a,"title");
this._copyElementsBetweenNodes(b,a,"select");
this._copyElementsBetweenNodes(b,a,"iframe");
return a;
}else{return b.cloneNode(true);
}},escapeRegExSpecialChars:function(a){var b=new RegExp("[.*+?|()\\[\\]{}\\\\]","g");
return a.replace(b,"\\$&");
},getUniqueID:function(){if(!window.RadEditor_uniqueSeed){window.RadEditor_uniqueSeed=new Date()-101;
}if(!window.RadEditor_uniqueIdCounter){window.RadEditor_uniqueIdCounter=1;
}else{window.RadEditor_uniqueIdCounter++;
}var a=window.RadEditor_uniqueSeed-window.RadEditor_uniqueIdCounter;
return"UniqueID"+a;
},getTextContent:function(a){if(!a){return null;
}if(a.innerText!=null){return a.innerText;
}if(a.textContent!=null){var b=a.textContent;
b=b.replace(/<!--(.|\s)*?-->/gi,"");
return b;
}return null;
},execDocumentCommand:function(f,h,a){if(!f||!h){return false;
}try{return f.execCommand(h,false,a);
}catch(e){var b=new Telerik.Web.UI.Editor.Selection(window);
var g=b.getParentElement();
var c=f.createElement("div");
g.insertBefore(c,g.firstChild);
var d=f.execCommand(h,false,a);
g.removeChild(g.firstChild);
return d;
}},_rgbToHex:function(a){if(a.toLowerCase().indexOf("rgb")!=-1){var c="#";
var b=function(d){var e=parseInt(d,10).toString(16);
c=c+(e.length==1?"0"+e:e);
return d;
};
a=a.replace(/(\d+)/gi,b);
b=null;
return c;
}else{return a;
}}};
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandBase=function(c,b,a,d){this.isSafari=$telerik.isSafari;
this.isIE=$telerik.isIE;
this.isOpera=$telerik.isOpera;
this.isFirefox=$telerik.isFirefox;
this._title=c;
this._window=b;
this._isExecuted=false;
this._canUnexecute=(a!=false);
this._editor=d;
};
Telerik.Web.UI.Editor.CommandBase.prototype={get_argument:function(){return null;
},getState:function(a){return Telerik.Web.UI.Editor.CommandStates.Off;
},getValue:function(a){return null;
},set_window:function(a){this._window=a;
},get_window:function(){return this._window;
},get_title:function(){return this._title;
},set_title:function(a){this._title=a;
},get_editor:function(){if(Telerik.Web.UI.RadEditor.isInstanceOfType(this._editor)){return this._editor;
}else{return null;
}},set_editor:function(a){this._editor=a;
},get_editorContentArea:function(){var b=this.get_editor();
var a=(b)?b.get_contentArea():null;
return a;
},get_enableUndoRedo:function(){var a=this.get_editor();
if(a){return a.get_enableUndoRedo();
}else{return true;
}},execute:function(){this._isExecuted=false;
if(null==this.onExecute||null==this.get_window()){return false;
}try{if(this.get_enableUndoRedo()){if(!this.RestorePoint1){this.RestorePoint1=new Telerik.Web.UI.Editor.RestorePoint(this.get_window(),this.get_editorContentArea());
}else{this.RestorePoint1.select();
}}return(this._isExecuted=this.onExecute());
}catch(a){}return false;
},onExecute:function(){if(this.isIE&&null!=this.OnExecuteIE){return this.OnExecuteIE();
}else{if(null!=window.getSelection&&null!=this.OnExecuteMoz){return this.OnExecuteMoz();
}}return false;
},unexecute:function(){try{if(this._canUnexecute&&this._isExecuted){this.RestorePoint1.restore();
}}catch(a){}}};
Telerik.Web.UI.Editor.CommandBase.registerClass("Telerik.Web.UI.Editor.CommandBase",null);
Telerik.Web.UI.Editor.PasteHtmlCommand=function(c,b,a,e,d){Telerik.Web.UI.Editor.PasteHtmlCommand.initializeBase(this,[(c||"Insert Html"),b,true,d]);
this.HtmlText=a;
this.SelectText=(true==e);
this.editor=d;
};
Telerik.Web.UI.Editor.PasteHtmlCommand.prototype={clone:function(){return new Telerik.Web.UI.Editor.PasteHtmlCommand(this.get_title(),this.get_window(),this.HtmlText,null,this.get_editor());
},onExecute:function(){var a=new Telerik.Web.UI.Editor.Selection(this.get_window());
a.pasteHtml(this.HtmlText,this.SelectText);
return true;
}};
Telerik.Web.UI.Editor.PasteHtmlCommand.registerClass("Telerik.Web.UI.Editor.PasteHtmlCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.GenericCommand=function(b,a,c){Telerik.Web.UI.Editor.GenericCommand.initializeBase(this,[b,a,true,c]);
if(this.get_enableUndoRedo()){this.RestorePoint1=new Telerik.Web.UI.Editor.RestorePoint(this.get_window(),this.get_editorContentArea());
}};
Telerik.Web.UI.Editor.GenericCommand.prototype={execute:function(){if(this.get_enableUndoRedo()){if(null==this.RestorePoint2){this.RestorePoint2=new Telerik.Web.UI.Editor.RestorePoint(this.get_window(),this.get_editorContentArea());
}else{this.RestorePoint2.restore();
}}return true;
},unexecute:function(){if(this.get_enableUndoRedo()){this.RestorePoint1.restore(true);
}}};
Telerik.Web.UI.Editor.GenericCommand.registerClass("Telerik.Web.UI.Editor.GenericCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TextTypeCommand=function(b,a,c){Telerik.Web.UI.Editor.TextTypeCommand.initializeBase(this,[(b||"Typing"),a,c]);
};
Telerik.Web.UI.Editor.TextTypeCommand.prototype={update:function(){if(this.RestorePoint2){this.RestorePoint2.update();
}}};
Telerik.Web.UI.Editor.TextTypeCommand.registerClass("Telerik.Web.UI.Editor.TextTypeCommand",Telerik.Web.UI.Editor.GenericCommand);
Telerik.Web.UI.Editor.BrowserCommand=function(e,f,c,a,b){var d=true;
switch(this.CommandID){case"Copy":case"SelectAll":case"Print":d=false;
break;
}Telerik.Web.UI.Editor.BrowserCommand.initializeBase(this,[(e||c),f,d,b]);
this.CommandID=c;
this.Value=a;
};
Telerik.Web.UI.Editor.BrowserCommand.prototype={get_argument:function(){return this.Value;
},clone:function(){return new Telerik.Web.UI.Editor.BrowserCommand(this._title,this.get_window(),this.CommandID,this.Value);
},getState:function(c){try{c=c||this.get_window();
var a=c.document;
if(null==a){return Telerik.Web.UI.Editor.CommandStates.Disabled;
}var d=true;
if(!$telerik.isIE7||"Paste"!=this.CommandID){d=a.queryCommandEnabled(this.CommandID);
}if(!this.isOpera&&!d){if(!this.isSafari||!this.CommandID=="RealFontSize"){return Telerik.Web.UI.Editor.CommandStates.Disabled;
}}var e=null;
if(!$telerik.isIE7||"Paste"!=this.CommandID){e=a.queryCommandState(this.CommandID);
}return e?Telerik.Web.UI.Editor.CommandStates.On:Telerik.Web.UI.Editor.CommandStates.Off;
}catch(b){return Telerik.Web.UI.Editor.CommandStates.Off;
}},getValue:function(a){try{a=a||this.get_window();
return a.document.queryCommandValue(this.CommandID);
}catch(b){}return null;
},onExecute:function(){var f=this.get_window();
if(!f){return false;
}var a=f.document;
if("AbsolutePosition"==this.CommandID){a.execCommand("2D-Position",false,true);
}var c=true;
if(this.CommandID=="BackColor"&&(this.isOpera||this.isFirefox)){this.CommandID="HiliteColor";
c=false;
}if(this.CommandID=="FontSize"&&this.isSafari2){var b=parseInt(this.Value);
switch(b){case 1:this.Value="8pt";
break;
case 2:this.Value="10pt";
break;
case 3:this.Value="12pt";
break;
case 4:this.Value="14pt";
break;
case 5:this.Value="18pt";
break;
case 6:this.Value="24pt";
break;
case 7:this.Value="36pt";
break;
}}try{a.execCommand("UseCSS",false,(false!=c));
a.execCommand("styleWithCSS",false,(false==c));
}catch(d){}if(!this.isIE&&!this.Value&&(this.CommandID=="ForeColor"||this.CommandID=="BackColor"||this.CommandID=="HiliteColor")){this.removeColorMozilla(this.CommandID);
}var g=Telerik.Web.UI.Editor.Utils.execDocumentCommand(a,this.CommandID,this.Value);
if($telerik.isFirefox&&(this.CommandID=="BackColor"||this.CommandID=="HiliteColor")&&this._editor.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div){this.mozFixContentAreaBackColor();
}try{a.execCommand("UseCSS",false,true);
a.execCommand("styleWithCSS",false,false);
}catch(d){}return g;
},mozFixContentAreaBackColor:function(){var c=this._editor.get_contentArea();
var h=c.style.backgroundColor;
if(h!=""){c.style.backgroundColor="";
var a=document.evaluate('.//text()[normalize-space(.) != ""]',c,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var b=0,d=a.snapshotLength;
b<d;
b++){var g=a.snapshotItem(b);
var e=document.createElement("span");
e.innerHTML=g.nodeValue;
e.style.backgroundColor=h;
var f=g.parentNode;
f.insertBefore(e,g);
f.removeChild(g);
}}},removeColorMozilla:function(b){var e=new Telerik.Web.UI.Editor.Selection();
e._window=this._window;
var a=e.getHtml();
if(a!=""){var h=e.GetParentElement();
if(h.innerHTML.trim()==a.trim()){this.removeNodeColor(h,b);
}var d=window.document.createElement("div");
d.innerHTML=a;
for(var c=0,f=d.childNodes.length;
c<f;
c++){var g=d.childNodes[c];
this.removeNodeColor(g,b);
}e.PasteHtml(d.innerHTML);
}},removeNodeColor:function(a,b){switch(b){case"ForeColor":if(a.style){a.style.color="";
}if(a.removeAttribute){a.removeAttribute("color");
}break;
case"BackColor":case"HiliteColor":if(a.style){a.style.backgroundColor="";
}if(a.removeAttribute){a.removeAttribute("bgColor");
}break;
}}};
Telerik.Web.UI.Editor.BrowserCommand.registerClass("Telerik.Web.UI.Editor.BrowserCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.StyleRuleCommand=function(c,f,d,e,g,a){Telerik.Web.UI.Editor.StyleRuleCommand.initializeBase(this,[(c||sCmdID),f,true,a]);
if(!d){var b=new Telerik.Web.UI.Editor.Selection(this._window);
d=b.getParentElement();
}this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,d);
this._styleAttributeName=e;
this._newValue=g;
};
Telerik.Web.UI.Editor.StyleRuleCommand.prototype={get_argument:function(){return this._newValue;
},clone:function(){return new Telerik.Web.UI.Editor.StyleRuleCommand(this._title,this._window,null,this._styleAttributeName,this._newValue);
},execute:function(){var a=this._nodeBookmark.select();
if(!a){return false;
}if(!this._isExecuted){this._oldValue=a.style[this._styleAttributeName];
}a.style[this._styleAttributeName]=this._newValue;
this._isExecuted=true;
return true;
},unexecute:function(){var a=this._nodeBookmark.select();
a.style[this._styleAttributeName]=this._oldValue;
}};
Telerik.Web.UI.Editor.StyleRuleCommand.registerClass("Telerik.Web.UI.Editor.StyleRuleCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.AttributeCommand=function(c,f,e,d,g,a){Telerik.Web.UI.Editor.AttributeCommand.initializeBase(this,[(c||sCmdID),f,true,a]);
if(!e){var b=new Telerik.Web.UI.Editor.Selection(this._window);
e=b.getParentElement();
}this._nodeBookmark=new Telerik.Web.UI.Editor.SelectionBookmark(this._window,e);
this._attribName=d;
this._newValue=g;
};
Telerik.Web.UI.Editor.AttributeCommand.prototype={get_argument:function(){return this._newValue;
},clone:function(){return new Telerik.Web.UI.Editor.AttributeCommand(this._title,this._window,null,this._attribName,this._newValue);
},execute:function(){var a=this._nodeBookmark.select();
if(!a){return false;
}if(!this._isExecuted){if(this._attribName=="style"){this._oldValue=a.style.cssText;
}else{this._oldValue=a.getAttribute(this._attribName);
}}if(this._attribName&&this._attribName.toLowerCase()=="name"&&document.all){a.name=this._newValue;
a.removeAttribute("name");
a.removeAttribute("NAME");
}var b=this._newValue.trim();
if(""==b){a.removeAttribute(this._attribName,0);
if("className"==this._attribName){a.removeAttribute("class",0);
}}else{if(this._attribName=="style"){a.style.cssText=this._newValue;
}else{a[this._attribName]=this._newValue;
if(this._attribName.toLowerCase()=="nowrap"||this._attribName=="borderColor"){a.setAttribute(this._attribName,this._newValue);
}}}this._isExecuted=true;
return true;
},unexecute:function(){var a=this._nodeBookmark.select();
if(this._attribName=="style"){a.style.cssText=this._oldValue;
}else{a[this._attribName]=this._oldValue;
}}};
Telerik.Web.UI.Editor.AttributeCommand.registerClass("Telerik.Web.UI.Editor.AttributeCommand",Telerik.Web.UI.Editor.CommandBase);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.ClassNameCommand=function(c,b,a,d){Telerik.Web.UI.Editor.ClassNameCommand.initializeBase(this,[(c||"Classname"),b,true,d]);
};
Telerik.Web.UI.Editor.ClassNameCommand.prototype={getValue:function(a){a=a||this._window;
if($telerik.isIE){return this._getValueIE(a);
}else{return this._getValueMoz(a);
}},_getValueIE:function(b){var c=new Telerik.Web.UI.Editor.Selection(b);
var a=c.getParentElement();
if(Telerik.Web.UI.Editor.Utils.isEditorContentArea(a)){return"";
}else{return(""==a.className?"":a.className);
}},_getValueMoz:function(f){if(!f){return"";
}var g=f.getSelection();
if(!g){return"";
}if(g.rangeCount!=1){return"";
}var b=(g.focusNode.nodeType!=3?g.focusNode:g.focusNode.parentNode);
var e=(g.anchorNode.nodeType!=3?g.anchorNode:g.anchorNode.parentNode);
if(b!=e){return"";
}var c=new Telerik.Web.UI.Editor.Selection(f);
var a="",d;
if(null!=c&&null!=(d=c.getParentElement())){a=d.className;
}return(""==a?"":a);
}};
Telerik.Web.UI.Editor.ClassNameCommand.registerClass("Telerik.Web.UI.Editor.ClassNameCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.FormatBlockCommand=function(c,b,a,d){Telerik.Web.UI.Editor.FormatBlockCommand.initializeBase(this,[(c||"Format Block"),b,true,d]);
this.FormatValue=a;
this._editor=d;
};
Telerik.Web.UI.Editor.FormatBlockCommand.prototype={get_argument:function(){try{return this.FormatValue.substring(1,this.FormatValue.length-1).toUpperCase();
}catch(a){}},clone:function(){return new Telerik.Web.UI.Editor.FormatBlockCommand(this.Title,this._window,this.FormatValue,this._editor);
},getValue:function(b){try{b=b||this._window;
var a=b.document.queryCommandValue("FormatBlock");
if(!document.all){switch(a){case"x":case"":a="Normal";
break;
}}return a;
}catch(c){}return null;
},onExecute:function(){var p=this._window.document;
var a=this.FormatValue;
var c=this._editor;
if("<p>"==a.toLowerCase()&&!$telerik.isOpera){p.execCommand("FormatBlock",false,"Normal");
}var o=true;
var g=this._getTagName();
var n=new Telerik.Web.UI.Editor.Selection(this._window);
var s=n.getHtml();
var q=p.body.childNodes;
if(s&&!(q.length==1&&q[0].tagName=="P")){var d=Telerik.Web.UI.Editor.CommandList._markEditorSelection(c);
var r=d.newElements;
var k=d.oldElements;
var j=Function.createDelegate(this,function(i,x){var v=i.parentNode;
if(!$telerik.isFireFox&&x&&v.tagName=="A"&&v.childNodes.length==1){var u=p.createElement(i.tagName);
Telerik.Web.UI.Editor.Utils.removeNode(i);
v.parentNode.insertBefore(u,v);
u.appendChild(v);
i=u;
v=i.parentNode;
}var u=p.createElement(g);
u.innerHTML=(x)?i.innerHTML:$telerik.getOuterHtml(i);
v.replaceChild(u,i);
if(/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(v.tagName)&&true!=Telerik.Web.UI.Editor.Utils.isEditorContentArea(v)){$telerik.mergeElementAttributes(v,u,false);
if(v.childNodes.length==1){Telerik.Web.UI.Editor.Utils.removeNode(v);
}else{var w=v.parentNode;
if(!u.previousSibling){w.insertBefore(u,v);
}else{if(!u.nextSibling){var l=v.nextSibling;
if(l){w.insertBefore(u,l);
}else{w.appendChild(u);
}}else{var t=v.cloneNode(false);
while(u.nextSibling){t.appendChild(u.nextSibling);
}var l=v.nextSibling;
if(l){v.parentNode.insertBefore(u,l);
v.parentNode.insertBefore(t,l);
}else{v.parentNode.appendChild(u);
v.parentNode.appendChild(t);
}}}}}this._applyAttributes(u);
});
for(var f=0,m=r.length;
f<m;
f++){j(r[f],true);
}for(var f=0,m=k.length;
f<m;
f++){j(k[f],false);
}}else{o=p.execCommand("FormatBlock",false,"<"+g+">");
}var n=new Telerik.Web.UI.Editor.Selection(this._window);
var e=n.getParentElement();
if(e.tagName!=g){n.collapse(true);
n=new Telerik.Web.UI.Editor.Selection(this._window);
e=n.getParentElement();
}var b=$telerik.getPreviousHtmlNode(e);
if(b&&b.tagName=="BR"){b.parentNode.removeChild(b);
}var h=$telerik.getNextHtmlNode(e);
if(h&&h.tagName=="BR"){h.parentNode.removeChild(h);
}if(s){Telerik.Web.UI.Editor.Utils.selectElement(this._window,e);
n=new Telerik.Web.UI.Editor.Selection(this._window);
n.collapse(false);
}return o;
},_getTagName:function(){var a=this.FormatValue.replace(/.*?<([^\s]+)(\s|\/|>).*/i,"$1");
return a.toUpperCase();
},_applyAttributes:function(c){if(!c){return;
}var a=this.FormatValue;
var d=document.createElement("div");
d.innerHTML=a+"</"+this._getTagName()+">";
if(d.firstChild){var b=d.firstChild;
if(b.className){c.className=b.className;
}if(b.style.cssText){c.style.cssText=b.style.cssText;
}}}};
Telerik.Web.UI.Editor.FormatBlockCommand.registerClass("Telerik.Web.UI.Editor.FormatBlockCommand",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.InsertListCommand=function(d,c,e,f,b,a){Telerik.Web.UI.Editor.InsertListCommand.initializeBase(this,[(d||"Insert List"),c,true,a]);
this._newLineBr=(e==true);
this._commandName=f;
this._listType=(f=="InsertOrderedList")?"OL":"UL";
this._listStyle=b;
this._document=this._window.document;
};
Telerik.Web.UI.Editor.InsertListCommand.prototype={_insertList:function(){return Telerik.Web.UI.Editor.Utils.execDocumentCommand(this._document,this._commandName);
},OnExecuteMoz:function(){return this._insertList();
},OnExecuteIE:function(){if(!this._newLineBr){return this._insertList();
}var m=new Telerik.Web.UI.Editor.Selection(this._window);
var a=m.getParentElement();
var f=Telerik.Web.UI.Editor.Utils.getElementParentByTag;
if("OL"==a.tagName||"UL"==a.tagName||f(a,"UL")||f(a,"OL")){var w=this._insertList();
var m=new Telerik.Web.UI.Editor.Selection(this._window);
var z=m.getHtml();
var y=m.getParentElement();
if(y.tagName=="P"){z=y.outerHTML;
}var o=this._document.createElement("span");
o.innerHTML=z;
if(o.getElementsByTagName("P").length>0){var x=new RegExp("<p>([\\s\\S]+?)</p>","gi");
z=z.replace(x,"$1<br/>");
if(y.tagName=="P"){y.innerHTML="";
}m.pasteHtml(z,true);
var m=new Telerik.Web.UI.Editor.Selection(this._window);
var a=m.getParentElement();
if(a.tagName=="P"){var s=a.parentNode;
while(a.childNodes.length>0){s.insertBefore(a.childNodes[0],a);
}s.removeChild(a);
}}return true;
}var z=(m.getBrowserSelection().type=="None")?"":m.getHtml();
if(a.tagName=="P"&&z.match(/^\s*<p[^>]*>/i)&&z.match(/<\/p>\s*$/i)){var c=z.replace(/^\s*<p[^>]*>/i,"");
c=c.replace(/<\/p>\s*$/i,"");
if(a.innerHTML==c){z=c;
}}if(z.toLowerCase().trim()=="<p>&nbsp;</p>"){return this._insertList();
}else{if(!z){var t=m.getRange();
var s=t.parentElement();
if(!s.currentStyle.hasLayout){while(!s.currentStyle.hasLayout&&s.tagName!="P"){s=s.parentNode;
}}var n=t.duplicate();
var l=t.duplicate();
var v=s.children;
var q=0;
if(v.length==0){n.moveToElementText(s);
n.collapse(true);
}else{for(q=0;
q<v.length;
q++){var d=v[q];
l.moveToElementText(d);
if(l.inRange(t)){n.moveToElementText(d);
n.collapse(true);
break;
}else{if(l.compareEndPoints("StartToStart",t)>0){if(q==0){n.moveToElementText(s);
n.collapse(true);
break;
}var u=v[q-1];
n.moveToElementText(u);
n.collapse(false);
n.move("character",1);
n.move("character",-1);
break;
}}}}var k=null;
if(q==v.length){q=0;
}for(;
q<v.length;
q++){var d=v[q];
l.moveToElementText(d);
if(l.compareEndPoints("StartToStart",t)>0){k=d;
break;
}}if(!k){k=s;
}l.moveToElementText(k);
if(k!=s){l.collapse(true);
l.move("character",-1);
l.move("character",1);
}else{l.collapse(false);
}n.setEndPoint("EndToStart",l);
n.select();
z=n.htmlText;
var h=n.parentElement();
n.execCommand("Delete",null,false);
if(n.parentElement()!=h){n.move("character",-1);
n.select();
}else{if(n.htmlText){n.text="";
if(n.parentElement()!=h){n.move("character",-1);
n.select();
}}}z=z.replace(/^\s*<br\s*\/?\s*>/i,"");
}}var e=this.getLiElementsHtml(z);
e="<"+this._listType+">"+e+"</"+this._listType+">";
m.pasteHtml(e,true);
var g=m.getParentElement();
if(g.tagName!=this._listType){g=Telerik.Web.UI.Editor.Utils.getElementParentByTag(g,this._listType);
}var p=g.nextSibling;
if(p&&p.tagName=="BR"){p.parentNode.removeChild(p);
}var b=g.getElementsByTagName("LI");
var j=b.length;
if(j>0){var r=b[j-1];
n.moveToElementText(r);
n.collapse(false);
n.select();
}return true;
},getLiElementsHtml:function(d){d+="";
var b="";
var g=d.split("<BR>");
var f=g.length;
if(f>1){var c=this._document.createElement("div");
c.innerHTML=d.trim();
if(c.childNodes.length==1){b+="<li>"+d+"</li>";
}else{for(var a=0;
a<f;
a++){var e=g[a];
if(e||a==0){b+="<li>"+e+"</li>";
}}}}else{b+="<li>"+d+"</li>";
}return b;
}};
Telerik.Web.UI.Editor.InsertListCommand.registerClass("Telerik.Web.UI.Editor.InsertListCommand",Telerik.Web.UI.Editor.CommandBase);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.TableCommandBase=function(b,a,c){Telerik.Web.UI.Editor.TableCommandBase.initializeBase(this,[(b||"Table Command"),a,true,c]);
};
Telerik.Web.UI.Editor.TableCommandsBase_Static={};
Telerik.Web.UI.Editor.TableCommandBase.prototype={getLayoutBuilderEngine:function(b,c){if(!Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder){Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder=new Telerik.Web.UI.LayoutBuilderEngine();
}var a=Telerik.Web.UI.Editor.TableCommandsBase_Static._tableBuilder;
a.set_selectedTable(b);
a.set_selectedCell(c);
return a;
},configureLayoutBuilderEngine:function(){var c=this.getSelectedCell();
if(!c){return false;
}var a=c.parentNode;
var b=this.getParentTable(a);
return this.getLayoutBuilderEngine(b,c);
},getState:function(a){return this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled;
},getSelectedCell:function(b){var c=new Telerik.Web.UI.Editor.Selection(b||this._window);
var a;
if(c){a=c.getParentElement();
}while(null!=a&&a.tagName!="TD"&&a.tagName!="TH"&&a.tagName!="BODY"){a=a.parentNode;
}if(!a||!a.tagName){return null;
}return(a.tagName=="TD"||a.tagName=="TH"?a:null);
},getSelectedRow:function(b){var c=new Telerik.Web.UI.Editor.Selection(this._window||b);
var a;
if(c){a=c.getParentElement();
}if(!a){return null;
}while(null!=a&&a.tagName!="TR"&&a.tagName!="BODY"){a=a.parentNode;
}return(a&&a.tagName=="TR"?a:null);
},getParentTable:function(a){if(!a){return null;
}while(null!=a&&a.parentNode!=a&&"TABLE"!=a.tagName){a=a.parentNode;
}return(a&&a.tagName=="TABLE"?a:null);
}};
Telerik.Web.UI.Editor.TableCommandBase.registerClass("Telerik.Web.UI.Editor.TableCommandBase",Telerik.Web.UI.Editor.CommandBase);
Telerik.Web.UI.Editor.TableInsertRow=function(b,a,d,c){Telerik.Web.UI.Editor.TableInsertRow.initializeBase(this,[(b||"Insert row"),a,c]);
this._direction=d||"above";
};
Telerik.Web.UI.Editor.TableInsertRow.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableInsertRow(this._title,this._window,this._direction);
},getState:function(a){return(this.getSelectedRow(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand(("below"==this._direction)?"insertRowBelow":"insertRowAbove");
}};
Telerik.Web.UI.Editor.TableInsertRow.registerClass("Telerik.Web.UI.Editor.TableInsertRow",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteRow=function(b,a,c){Telerik.Web.UI.Editor.TableDeleteRow.initializeBase(this,[(b||"Delete Row"),a,c]);
};
Telerik.Web.UI.Editor.TableDeleteRow.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableDeleteRow(this._title,this._window);
},getState:function(a){return(this.getSelectedRow(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand("deleteRow");
}};
Telerik.Web.UI.Editor.TableDeleteRow.registerClass("Telerik.Web.UI.Editor.TableDeleteRow",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableInsertColumn=function(b,a,d,c){Telerik.Web.UI.Editor.TableInsertColumn.initializeBase(this,[(b||"Insert column"),a,c]);
this._direction=d||"left";
};
Telerik.Web.UI.Editor.TableInsertColumn.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableInsertColumn(this._title,this._window,this._direction);
},getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){var a=this.configureLayoutBuilderEngine();
if($telerik.isRightToLeft(a._selectedTable)){this._direction=("right"==this._direction)?"left":"right";
}return a.executeCommand(("right"==this._direction)?"insertColumnToTheRight":"insertColumnToTheLeft");
}};
Telerik.Web.UI.Editor.TableInsertColumn.registerClass("Telerik.Web.UI.Editor.TableInsertColumn",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteColumn=function(b,a,c){Telerik.Web.UI.Editor.TableDeleteColumn.initializeBase(this,[(b||"Delete column"),a,c]);
};
Telerik.Web.UI.Editor.TableDeleteColumn.prototype={clone:function(){return Telerik.Web.UI.Editor.TableDeleteColumn.New(this._title,this._window);
},getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand("deleteColumn");
}};
Telerik.Web.UI.Editor.TableDeleteColumn.registerClass("Telerik.Web.UI.Editor.TableDeleteColumn",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeRows=function(b,a,c){Telerik.Web.UI.Editor.TableMergeRows.initializeBase(this,[(b||"Merge rows"),a,c]);
};
Telerik.Web.UI.Editor.TableMergeRows.prototype={clone:function(){return Telerik.Web.UI.Editor.TableMergeRows.New(this._title,this._window);
},getState:function(f){var e=this.getSelectedCell(f);
var c=false;
if(e){var b=e.parentNode;
var a=this.getParentTable(b);
var d=this.getLayoutBuilderEngine(a,e);
c=d.canMergeDown();
}if(c){return Telerik.Web.UI.Editor.CommandStates.Off;
}else{return Telerik.Web.UI.Editor.CommandStates.Disabled;
}},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand("mergeDown");
},getLowerCell:function(f){if(!f){return null;
}var c=this.getParentTable(f);
var d=f.parentNode;
var a=c.rows[d.rowIndex+f.rowSpan];
if(!a){return null;
}var e=a.cells[f.cellIndex];
if(!e){for(var b=a.cells.length-1;
b>=0;
b--){if(a.cells[b].offsetLeft==f.offsetLeft){return a.cells[b];
}}}return e;
}};
Telerik.Web.UI.Editor.TableMergeRows.registerClass("Telerik.Web.UI.Editor.TableMergeRows",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableMergeColumns=function(b,a,c){Telerik.Web.UI.Editor.TableMergeColumns.initializeBase(this,[(b||"Merge columns"),a,c]);
};
Telerik.Web.UI.Editor.TableMergeColumns.prototype={clone:function(){return Telerik.Web.UI.Editor.TableMergeColumns.New(this._title,this._window);
},getState:function(f){var e=this.getSelectedCell(f);
var c=false;
if(e){var b=e.parentNode;
var a=this.getParentTable(b);
var d=this.getLayoutBuilderEngine(a,e);
c=d.canMergeRight();
}if(c){return Telerik.Web.UI.Editor.CommandStates.Off;
}else{return Telerik.Web.UI.Editor.CommandStates.Disabled;
}},getNextSiblingCell:function(c){if(!c){return null;
}var a=c.parentNode;
var b=a.cells[c.cellIndex+1];
if(null!=b&&c.rowSpan==b.rowSpan){return b;
}else{return null;
}},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand("mergeRight");
}};
Telerik.Web.UI.Editor.TableMergeColumns.registerClass("Telerik.Web.UI.Editor.TableMergeColumns",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableSplitCell=function(b,a,d,c){Telerik.Web.UI.Editor.TableSplitCell.initializeBase(this,[(b||"Split cell"),a,c]);
this._direction=d||"vertical";
};
Telerik.Web.UI.Editor.TableSplitCell.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableSplitCell(this._title,this._window);
},getState:function(a){return(this.getSelectedCell(a)?Telerik.Web.UI.Editor.CommandStates.Off:Telerik.Web.UI.Editor.CommandStates.Disabled);
},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand(("vertical"==this._direction)?"splitCellVertically":"splitCellHorizontally");
},getRealCellIndex:function(e){if(!e){return 0;
}var a=e.parentNode;
var b=0;
var c=0;
while(a.cells.length>b&&a.cells[b]!=e){var d=a.cells[b];
if(d.colSpan>1){c+=d.colSpan;
}else{c++;
}b++;
}return c;
}};
Telerik.Web.UI.Editor.TableSplitCell.registerClass("Telerik.Web.UI.Editor.TableSplitCell",Telerik.Web.UI.Editor.TableCommandBase);
Telerik.Web.UI.Editor.TableDeleteCell=function(b,a,c){Telerik.Web.UI.Editor.TableDeleteCell.initializeBase(this,[(b||"Delete cell"),a,c]);
};
Telerik.Web.UI.Editor.TableDeleteCell.prototype={clone:function(){return new Telerik.Web.UI.Editor.TableDeleteCell(this._title,this._window);
},getState:function(f){var e=this.getSelectedCell(f);
var c=false;
if(e){var b=e.parentNode;
var a=this.getParentTable(b);
var d=this.getLayoutBuilderEngine(a,e);
c=d.canDeleteCell();
}if(c){return Telerik.Web.UI.Editor.CommandStates.Off;
}else{return Telerik.Web.UI.Editor.CommandStates.Disabled;
}},onExecute:function(){var a=this.configureLayoutBuilderEngine();
return a.executeCommand("deleteCell");
}};
Telerik.Web.UI.Editor.TableDeleteCell.registerClass("Telerik.Web.UI.Editor.TableDeleteCell",Telerik.Web.UI.Editor.TableCommandBase);
Type.registerNamespace("Telerik.Web.UI");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.EditorButton=function(c){a.EditorButton.initializeBase(this,[c]);
this._enabled=true;
this._text="";
this._isOn=false;
this._contentAreaMode="";
};
a.EditorButton.createToolWrapper=function(d,e){var c=document.createElement("ul");
var f=document.createElement("li");
f.innerHTML="&nbsp;";
f.className="reGrip grip_first";
c.appendChild(f);
c.className="reToolbar "+e;
f=document.createElement("li");
c.appendChild(f);
var g=d.get_element();
f.appendChild(g);
f=document.createElement("li");
f.innerHTML="&nbsp;";
f.className="reGrip grip_last";
c.appendChild(f);
return c;
};
a.EditorButton.getToolRootNode=function(c){while(c&&c.tagName!="A"){c=c.parentNode;
}return c;
};
a.EditorButton._createButton=function(e){var c=document.createElement("a");
c.className=e.showText==true?"reTool_text":"reTool";
var f=e.text;
c.title=f?f:e.name;
c.href="#";
c.setAttribute("unselectable","on");
if(e.showIcon!=false){var d=document.createElement("span");
d.className=e.name;
d.innerHTML="&nbsp;";
d.setAttribute("unselectable","on");
c.appendChild(d);
}if(e.showText==true){var d=document.createElement("span");
d.className="reButton_text";
d.innerHTML=e.text?e.text:e.name;
d.setAttribute("unselectable","on");
c.appendChild(d);
}return c;
};
a.EditorButton.createTool=function(d,j,h,c,g){if(!h){h=a.EditorButton;
}if(!c){c=a.EditorButton._createButton(d);
if(c.tagName=="A"){var i=c;
if(h==a.EditorSplitButton||h.inheritsFrom(a.EditorSplitButton)){Sys.UI.DomElement.addCssClass(i,"reSplitButton");
var f=document.createElement("span");
f.className="split_arrow";
f.innerHTML="&nbsp;";
i.appendChild(f);
}else{if(h==a.EditorDropDown||h.inheritsFrom(a.EditorDropDown)){Sys.UI.DomElement.removeCssClass(i,"reTool");
Sys.UI.DomElement.addCssClass(i,"reDropdown");
i.innerHTML="";
var f=document.createElement("span");
f.innerHTML="&nbsp;";
var e=d.width?d.width:"50px";
f.style.width=e;
i.appendChild(f);
}}}}var k=$create(h,d,j,null,c);
if(g&&g.appendChild){g.appendChild(c);
}return k;
};
a.EditorButton.prototype={initialize:function(){var c=this.getAnchorElement();
if(c){c.setAttribute("unselectable","on");
}var e=this.getSpanElement();
if(e){e.setAttribute("unselectable","on");
}if(this.get_addClickHandler()){var d=this.get_element();
$addHandlers(d,{click:this.click},this);
}},dispose:function(){var c=this.get_element();
if(c){$clearHandlers(c);
}a.EditorButton.callBaseMethod(this,"dispose");
},click:function(c){this.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(c);
},add_valueSelected:function(c){this.get_events().addHandler("valueSelected",c);
},remove_valueSelected:function(c){this.get_events().removeHandler("valueSelected",c);
},raiseEvent:function(d,e){var c=this.get_events().getHandler(d);
if(c){if(!e){e=Sys.EventArgs.Empty;
}c(this,e);
}},set_width:function(d){var c=this.getSpanElement();
if(c){c.style.width=d;
}},get_width:function(){return this.get_element().offsetWidth;
},set_height:function(d){var c=this.getSpanElement();
if(c){c.style.height=d;
}},get_height:function(){return this.get_element().offsetHeight;
},isTarget:function(c){return $telerik.isDescendantOrSelf(this.get_element(),c.target);
},setState:function(c){this.set_enabled(c!=a.Editor.CommandStates.Disabled);
this.setOn(c==a.Editor.CommandStates.On);
},setFocus:function(){var c=this.getAnchorElement();
if(c&&c.focus){c.focus();
}},get_enabled:function(){return this._enabled;
},set_enabled:function(d){if(this._enabled!=d){this._enabled=d;
var c=this.getAnchorElement();
if(!this._enabled){this._addAnchorCssClass("reTool_disabled");
c.setAttribute("disabled","disabled");
}else{this._removeAnchorCssClass("reTool_disabled");
c.removeAttribute("disabled");
}}},isOn:function(){return this._isOn;
},setOn:function(c){if(this._isOn!=c){this._isOn=c;
if(this._isOn){this._addAnchorCssClass("reTool_selected");
}else{this._removeAnchorCssClass("reTool_selected");
}}},get_text:function(){if(this._text){return this._text;
}var c=this.getAnchorElement();
if(c&&c.getAttribute("title")){return c.getAttribute("title");
}return this.get_name();
},set_text:function(c){if(this._text!=c){this._text=c;
if(this.get_showText()){this.getSpanElement().innerHTML=c;
}}},get_contentAreaMode:function(){if(this._contentAreaMode!=""){return this._contentAreaMode;
}else{return a.EditorContentAreaMode.Iframe;
}},set_contentAreaMode:function(c){this._contentAreaMode=c;
},_addAnchorCssClass:function(c){Sys.UI.DomElement.addCssClass(this.getAnchorElement(),c);
},_removeAnchorCssClass:function(c){Sys.UI.DomElement.removeCssClass(this.getAnchorElement(),c);
},getAnchorElement:function(){return this.get_element();
},getSpanElement:function(){var d=this.getAnchorElement();
var c=d.firstChild;
while(c!=null&&(c.tagName==null||c.tagName.toLowerCase()!="span")){c=c.nextSibling;
}return c;
}};
b.registerControlProperties(a.EditorButton,{clientStateFieldID:null,attributes:{},addClickHandler:false,autoPostBack:false,name:"",shortCut:"",showIcon:true,showText:false,skin:"",type:null,clientTypeName:"Telerik.Web.UI.EditorButton"});
b.registerControlEvents(a.EditorButton,["valueSelected"]);
a.EditorButton.registerClass("Telerik.Web.UI.EditorButton",Sys.UI.Control);
Telerik.Web.UI.EditorSpinBoxEventArgs=function(d,c){Telerik.Web.UI.EditorSpinBoxEventArgs.initializeBase(this);
this._newValue=d;
this._oldValue=c;
};
Telerik.Web.UI.EditorSpinBoxEventArgs.prototype={get_oldValue:function(){return this._oldValue;
},get_newValue:function(){return this._newValue;
}};
Telerik.Web.UI.EditorSpinBoxEventArgs.registerClass("Telerik.Web.UI.EditorSpinBoxEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.EditorSpinBox=function(c){Telerik.Web.UI.EditorSpinBox.initializeBase(this,[c]);
this._width="50px";
this._className="reSpinBox";
this._selectedItem="";
this._initialValue="";
this._visibleInput=true;
this._enabledIncrease=true;
this._enabledDecrease=true;
};
Telerik.Web.UI.EditorSpinBox.prototype={dispose:function(){this._inputElement.onchange=null;
this._inputElement.onkeypress=null;
this._inputElement.onclick=null;
this._inputElement=null;
this._increaseButton.onclick=null;
this._increaseButton=null;
this._decreaseButton.onclick=null;
this._decreaseButton=null;
Telerik.Web.UI.EditorSpinBox.callBaseMethod(this,"dispose");
},initialize:function(){this._createControls();
},_createControls:function(){var d=document.createElement("table");
d.cellSpacing=0;
d.cellPadding=0;
d.className=this.get_visibleInput()?this._className:"reTableWizardSpinBox";
d.insertRow(-1);
var f=d.rows[0].insertCell(-1);
var g=document.createElement("input");
g.className="radfd_skipme";
g.type="text";
g.onclick=function(j){this.focus();
};
g.onkeypress=Function.createDelegate(this,this._onKeyPressHandler);
g.onchange=Function.createDelegate(this,this._onChangeHandler);
this._inputElement=g;
f.appendChild(g);
if(!this.get_visibleInput()){this.set_visibleInput(false);
}if(this.get_visibleInput()){f=d.rows[0].insertCell(-1);
var e=document.createElement("table");
e.cellSpacing=0;
e.cellPadding=0;
e.insertRow(-1);
var h=e.rows[0].insertCell(-1);
var i=this._createAnchorElement("Increase");
this._increaseButton=i;
h.appendChild(i);
e.insertRow(-1);
h=e.rows[1].insertCell(-1);
i=this._createAnchorElement("Decrease");
this._decreaseButton=i;
h.appendChild(i);
f.appendChild(e);
}else{f=d.rows[0].insertCell(-1);
var i=this._createAnchorElement_noinput("Increase");
this._increaseButton=i;
f.appendChild(i);
f=d.rows[0].insertCell(-1);
i=this._createAnchorElement_noinput("Decrease");
this._decreaseButton=i;
f.appendChild(i);
}var c=this.get_element();
c.appendChild(d);
c.style.width=this.get_width();
},_createAnchorElement:function(e){var c=document.createElement("a");
var d=typeof(localization)!="undefined"&&localization[e]?localization[e]:e;
c.title=d;
c.href="javascript:void(0);";
c.innerHTML=d;
c.className="reSpinBox"+e;
c.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return c;
},_createAnchorElement_noinput:function(e){var c=document.createElement("a");
var d=typeof(localization)!="undefined"&&localization[e]?localization[e]:e;
c.title=d;
c.href="javascript:void(0);";
c.innerHTML="<span class='reTableWizardSpinBox_"+e+"'>"+d+"</span>";
c.onclick=Function.createDelegate(this,this._onPlusMinusClickHandler);
return c;
},_executeFunction:function(h,f,d){if(d){if(f.Executed){f.Executed=false;
return $telerik.cancelRawEvent(h);
}}f.Executed=true;
var c=(this._selectedItem!="")?this._selectedItem:this._initialValue;
this._selectedItem=f.value;
var g=new Telerik.Web.UI.EditorSpinBoxEventArgs(f.value,c);
this.raiseEvent("valueSelected",g);
},_onPlusMinusClickHandler:function(h){var d=null;
if(!h){d=window.event.srcElement;
}else{d=h.target;
}while(d&&d.tagName.toLowerCase()!="a"){d=d.parentNode;
}if(!d){return;
}var c=this.get_value();
c=c.replace(/^0+(\d)/ig,"$1");
if(""==c){c="0";
}var g=parseInt(c);
var f=g+"";
if(isNaN(g)){return;
}else{f=c.substring(f.length);
}if(d==this._increaseButton){if(this._enabledIncrease){g++;
}else{return;
}}else{if(d==this._decreaseButton){if(this._enabledDecrease){g--;
}else{return;
}}else{d=null;
}}if(d&&g>=0){this.set_value(g+f);
this._executeFunction(h,this._inputElement);
}return false;
},_onChangeHandler:function(c){if(!c){c=window.event;
}this._executeFunction(c,this._inputElement);
},_onKeyPressHandler:function(c){if(!c){c=window.event;
}if(c.keyCode==13){this._executeFunction(c,this._inputElement);
return $telerik.cancelRawEvent(c);
}},_onKeyDownHandler:function(c){if(!c){var c=window.event;
}c.returnValue=this._isKeyValid(c);
},_onKeyUpHandler:function(g){if(!g){var g=window.event;
}if(this._isKeyValid(g,true)){var c=this._selectedItem;
var d=this.get_value();
var f=new Telerik.Web.UI.EditorSpinBoxEventArgs(d,c);
this.raiseEvent("valueSelected",f);
}},_isKeyValid:function(g,f){try{if(!f){f=false;
}if(!g){g=window.event;
}var d=((48<=g.keyCode&&g.keyCode<=57)||(96<=g.keyCode&&g.keyCode<=105)||(13==g.keyCode)||(8==g.keyCode)||(46==g.keyCode)||(9==g.keyCode));
if(!f){d|=((35<=g.keyCode&&g.keyCode<=40));
}return d;
}catch(c){return true;
}},get_selectedItem:function(){return this._selectedItem;
},get_value:function(){return this._inputElement.value;
},set_value:function(c){if(null==c){c="";
}this._inputElement.value=c;
if(this._initialValue==""){this._initialValue=c;
}},get_width:function(){return this._width;
},set_width:function(d){this._width=d;
var c=this.get_element();
c.style.width=this._width;
},get_enabledIncrease:function(){return this._enabledIncrease;
},set_enabledIncrease:function(c){this._enabledIncrease=c;
this._setButtonState(this._increaseButton,c);
},get_enabledDecrease:function(){return this._enabledDecrease;
},set_enabledDecrease:function(c){this._enabledDecrease=c;
this._setButtonState(this._decreaseButton,c);
},_setButtonState:function(c,d){if(!d){Sys.UI.DomElement.addCssClass(c,"disabled-button");
}else{Sys.UI.DomElement.removeCssClass(c,"disabled-button");
}},get_visibleInput:function(){return this._visibleInput;
},set_visibleInput:function(c){this._visibleInput=c;
if(this._inputElement){if(!this._visibleInput){this._inputElement.style.display="none";
}else{this._inputElement.style.display="";
}}}};
Telerik.Web.UI.EditorSpinBox.registerClass("Telerik.Web.UI.EditorSpinBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorCheckBox=function(c){Telerik.Web.UI.EditorCheckBox.initializeBase(this,[c]);
this._selectedItem=false;
};
Telerik.Web.UI.EditorCheckBox.prototype={dispose:function(){this._inputElement.onclick=null;
this._inputElement.Parent=null;
this._inputElement=null;
Telerik.Web.UI.EditorCheckBox.callBaseMethod(this,"dispose");
},get_selectedItem:function(){return this._selectedItem;
},set_value:function(c){if(this._inputElement.checked!=c){this._inputElement.checked=c;
}},initialize:function(){var c=document.createElement("input");
c.setAttribute("type","CHECKBOX");
c.Parent=this;
c.onclick=function(d){var f=this.Parent;
f._selectedItem=!f._selectedItem;
this.checked=f._selectedItem;
f._selectedItem=this.checked;
f.raiseEvent("valueSelected");
};
this._inputElement=c;
this.get_element().appendChild(c);
}};
Telerik.Web.UI.EditorCheckBox.registerClass("Telerik.Web.UI.EditorCheckBox",Telerik.Web.UI.EditorButton);
Telerik.Web.UI.EditorTextBox=function(c){Telerik.Web.UI.EditorTextBox.initializeBase(this,[c]);
this._width="100px";
this._selectedItem="";
};
Telerik.Web.UI.EditorTextBox.prototype={dispose:function(){this._inputElement.onchange=null;
this._inputElement.onkeypress=null;
this._inputElement.onclick=null;
this._inputElement.Parent=null;
this._inputElement=null;
Telerik.Web.UI.EditorTextBox.callBaseMethod(this,"dispose");
},get_width:function(){return this._width;
},set_width:function(c){this._width=c;
},initialize:function(){var e=document.createElement("input");
e.style.width=this.get_width();
e.Parent=this;
var d=this.get_name();
var c=function(h,g,f){if(f){if(g.Executed){g.Executed=false;
return $telerik.cancelRawEvent(h);
}}g.Executed=true;
g.Parent._selectedItem=g.value;
g.Parent.raiseEvent("valueSelected");
return $telerik.cancelRawEvent(h);
};
e.onchange=function(f){if(!f){f=window.event;
}return c(f,this,true);
};
e.onclick=function(f){this.focus();
};
e.onkeypress=function(f){if(!f){f=window.event;
}if(f.keyCode==13){return c(f,this);
}};
this._inputElement=e;
this.get_element().appendChild(e);
},get_selectedItem:function(){return this._selectedItem;
},get_value:function(){return this._inputElement.value;
},set_value:function(c){if(null==c){c="";
}this._inputElement.value=c;
}};
Telerik.Web.UI.EditorTextBox.registerClass("Telerik.Web.UI.EditorTextBox",Telerik.Web.UI.EditorButton);
a.ImageDialogCaller=function(c){a.ImageDialogCaller.initializeBase(this,[c]);
};
a.ImageDialogCaller.prototype={dispose:function(){this._inputElement=null;
var c=this.get_pushButton();
if(c){c.onclick=null;
}this.set_pushButton(null);
this.set_editor(null);
a.ImageDialogCaller.callBaseMethod(this,"dispose");
},initialize:function(){var c=this.get_element();
this._inputElement=c.getElementsByTagName("INPUT")[0];
var d=c.getElementsByTagName("A")[0];
this.set_pushButton(d);
if(d){d.onclick=Function.createDelegate(this,this._onButtonClickHandler);
}},_onButtonClickHandler:function(c){this.callImageDialog();
},_dialogCallbackFunction:function(f,d){var e=d&&d.get_value?d.get_value():null;
var c="";
if(e&&e.getAttribute){c=e.getAttribute("src",2);
}if(c){this._inputElement.value=c;
this.raiseEvent("valueSelected");
}},callImageDialog:function(){var d=Function.createDelegate(this,this._dialogCallbackFunction);
var c=this.get_editor();
var h=null;
if(c){h=c.get_dialogOpener();
}else{if(a.Dialogs&&a.Dialogs.CommonDialogScript&&a.Dialogs.CommonDialogScript.get_windowReference()){h=a.Dialogs.CommonDialogScript.get_windowReference().get_dialogOpener();
}}var k=null;
if(h){var e=h.get_additionalQueryString();
var j=this._inputElement.value;
if(j){var f=j;
h.set_additionalQueryString(e+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(f));
var i=c?c.get_document():document;
k=i.createElement("img");
k.setAttribute("src",f);
}}var g=new a.EditorCommandEventArgs("ImageManager",null,k);
a.Editor.CommandList._getDialogArguments(g,"IMG",c,"ImageManager");
if(c){c.showDialog("ImageManager",g,d);
}else{if(h){h.open("ImageManager",g,d);
}}if(h){h.set_additionalQueryString(e);
}},get_value:function(){return this._inputElement.value;
},set_value:function(c){if(null==c){c="";
}this._inputElement.value=c;
}};
b.registerControlProperties(a.ImageDialogCaller,{pushButton:null,editor:null,width:""});
a.ImageDialogCaller.registerClass("Telerik.Web.UI.ImageDialogCaller",a.EditorButton);
})();
Type.registerNamespace("Telerik.Web.UI");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.EditorDropDown=function(c){a.EditorDropDown.initializeBase(this,[c]);
this.isIE=$telerik.isIE;
this._popupVisible=false;
this._rendered=false;
this._childrenRendered=false;
this._popupElement=null;
this._itemRootElement=null;
this._onPopupClickDelegate=null;
this._onPopupMouseDownDelegate=null;
this._onPopupMouseOverDelegate=null;
this._items=[];
this._isArrayCollection=false;
this._selectedIndex=-1;
this._activeIndex=-1;
};
a.EditorDropDown.prototype={click:function(c){this.show();
return $telerik.cancelRawEvent(c);
},dispose:function(){a.EditorDropDown.callBaseMethod(this,"dispose");
this.disposeChildren();
this.detachEventHandlers();
},isExpanded:function(){return this._popupVisible;
},show:function(){if(this._popupVisible){return;
}if(this.get_clearSelectedOnShow()){this.set_selectedIndex(-1);
}var c=false;
if(!this._rendered){this.render();
c=true;
}this.raiseEvent("show");
if(!this._childrenRendered){this.renderChildren();
this._childrenRendered=true;
c=true;
}if(c){this._makeAllItemsUnselectable();
}this._show();
},configurePopupPropertiesBeforeShow:function(){this._popupBehavior.set_positioningMode(Telerik.Web.PositioningMode.BottomLeft);
},hide:function(){if(this._popupBehavior){this._popupBehavior.hide(true);
}this._popupVisible=false;
this._getPopupVisibilityController().notifyPopupClosed(this);
this.raiseEvent("hide");
},onPopupMouseOver:function(c){var d=this.resolveActiveIndex(c);
if(d>-1){this.set_activeIndex(d,c);
}$telerik.cancelRawEvent(c);
},_onPopupClick:function(c){var d=this.resolveActiveIndex(c);
$telerik.cancelRawEvent(c);
if(d>-1){this._selectedIndex=d;
this.hide();
this.raiseEvent("valueSelected");
}},get_activeIndex:function(){return this._activeIndex;
},set_activeIndex:function(d,c){this._activeIndex=d;
this.selectUIItem(c);
},selectPreviousItem:function(){var c=this.get_activeIndex();
if(c-1>=0){this.set_activeIndex(c-1);
}},selectNextItem:function(){var c=this.get_activeIndex();
if(c+1<this._items.length){this.set_activeIndex(c+1);
}},selectUIItem:function(l,g){if(!this._popupElement){return;
}var j=this._popupElement.getElementsByTagName("TD");
var h=j.length;
var f=this.get_activeIndex();
var k=null;
for(var c=0;
c<h;
c++){var d=j[c];
if(d.item_index==f){d.className="reItemOver";
k=d;
}else{if(g&&d.item_index<=f){d.className="reItemOver";
}else{d.className="";
}}}if(k&&!l){this._scrollIntoView(k);
}return k;
},_scrollIntoView:function(c){$telerik.scrollIntoView(c);
},attachEventHandlers:function(){if(!this._popupElement){return;
}this.detachEventHandlers();
this._onPopupMouseOverDelegate=Function.createDelegate(this,this.onPopupMouseOver);
$addHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupClickDelegate=Function.createDelegate(this,this._onPopupClick);
if($telerik.isIE||this.get_contentAreaMode()==a.EditorContentAreaMode.Div){$addHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
}else{$addHandler(this._popupElement,"click",this._onPopupClickDelegate);
}},detachEventHandlers:function(){if(null!=this._onPopupMouseOverDelegate){$removeHandler(this._popupElement,"mouseover",this._onPopupMouseOverDelegate);
this._onPopupMouseOverDelegate=null;
}if(null!=this._onPopupClickDelegate){if($telerik.isIE){$removeHandler(this._popupElement,"mousedown",this._onPopupClickDelegate);
}else{$removeHandler(this._popupElement,"click",this._onPopupClickDelegate);
}this._onPopupClickDelegate=null;
}},disposeChildren:function(){this._childrenRendered=false;
if(this._itemRootElement&&this._itemRootElement.parentNode){var c=this._itemRootElement;
this.renderItemRoot();
c.parentNode.replaceChild(this._itemRootElement,c);
}},render:function(){this._createUI();
this.renderHeader();
this.renderChildren();
this.renderFooter();
this._rendered=true;
this._childrenRendered=true;
},renderHeader:function(){},renderFooter:function(){},renderItemRoot:function(){this._itemRootElement=this._getTable();
return this._itemRootElement;
},renderNewRow:function(){return(this._itemRootElement.insertRow(-1));
},renderItemContainer:function(){var d=this._itemRootElement.rows[this._itemRootElement.rows.length-1];
var c=d.insertCell(-1);
return c;
},renderChildren:function(){for(var d=0;
d<this._items.length;
d++){if(0==(d%this.get_itemsperrow())){this.renderNewRow();
}var c=this.renderItemContainer();
this.markItemContainer(c,d);
this.renderChild(c,this._items[d],d);
}},renderChild:function(e,g,h){var d=document.createElement("span");
if(g){var c=null;
var i=null;
if(g instanceof Array){c=g[1];
i=g[2];
}else{c=g;
}if(i){var f=document.createElement("span");
f.innerHTML="&nbsp;";
f.className=i;
d.appendChild(f);
}if(c){d.innerHTML+=c;
d.noWrap=true;
}}e.innerHTML=d.innerHTML;
},resolveActiveIndex:function(f){var d=f.target;
var c=-1;
while(d&&d!=this._itemRootElement){if(null!=d.item_index){c=d.item_index;
break;
}d=d.parentNode;
}return c;
},markItemContainer:function(d,c){d.item_index=c;
},_makeAllItemsUnselectable:function(){if(!this._popupElement){return;
}this._popupElement.setAttribute("unselectable","on");
var e=this._popupElement.getElementsByTagName("*");
var d=e.length;
for(var c=0;
c<d;
c++){e[c].unselectable="on";
}},_show:function(){this.configurePopupPropertiesBeforeShow();
var f=this._popupElement;
var e=this.get_sizetofit();
var g=f.style.overflow;
if(e){f.style.overflowY="hidden";
}f.style.width=this.get_popupwidth();
f.style.height=this.get_popupheight();
this._itemRootElement.style.width="100%";
this._popupBehavior.show();
var c=this._getPopupChildrenHeight();
if(c!="0px"){c=this._getQuirksModeHeight(f,c);
}if(e){f.style.width=this._getPopupChildrenWidth();
f.style.height=c;
}else{var h=parseInt(c);
var d=parseInt(f.style.height);
if(h<d&&h>(d/2)){f.style.height=c;
}}this._popupBehavior.show();
this._getPopupVisibilityController().set_activePopup(this);
f.style.zIndex="100000";
if(e){f.style.overflowY=g;
}this._popupVisible=true;
},_getQuirksModeHeight:function(g,e){try{if($telerik.quirksMode){var f=$telerik.getBorderBox(g);
var d=$telerik.getPaddingBox(g);
var c=parseInt(e)+(f.top*2);
c+=d.top+d.bottom;
e=c+"px";
}}catch(i){}return e;
},_getPopupChildrenWidth:function(){var f=this.get_popupElement().childNodes;
var e=0;
for(var c=0;
c<f.length;
c++){var d=f[c].offsetWidth;
if(d&&d>e){e=d;
}}return e+"px";
},_getPopupChildrenHeight:function(){var d=this.get_popupElement().childNodes;
var c=0;
for(var e=0;
e<d.length;
e++){if(d[e].offsetHeight){c+=d[e].offsetHeight;
}}return c+"px";
},_getPopupVisibilityController:function(){return a.Editor.PopupController;
},getUniqueID:function(){if(!window.RadEditor_uniqueSeed){window.RadEditor_uniqueSeed=new Date()-101;
}if(!window.RadEditor_uniqueIdCounter){window.RadEditor_uniqueIdCounter=1;
}else{window.RadEditor_uniqueIdCounter++;
}var c=window.RadEditor_uniqueSeed-window.RadEditor_uniqueIdCounter;
return"UniqueID"+c;
},_createUI:function(){if(this._popupBehavior){return;
}var d=this.get_element();
if(!this._popupElement){var c=document.createElement("div");
$telerik.addCssClasses(c,[this.get_skin(),this.get_rootpopupclassname(),this.get_popupclassname()]);
this._popupElement=c;
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
document.body.appendChild(this._popupElement);
}this.renderItemRoot();
this._popupElement.appendChild(this._itemRootElement);
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:this.getUniqueID(),parentElement:d},null,null,this._popupElement);
this.attachEventHandlers();
},_getTable:function(){var c=document.createElement("table");
c.border=0;
c.cellPadding=0;
c.setAttribute("unselectable","on");
c.style.cursor="default";
return c;
},get_popupElement:function(){return this._popupElement;
},get_selectedItem:function(){if(this._items&&this._selectedIndex>-1){var c=this._items[this._selectedIndex];
var d=((true==this._isArrayCollection)||(c instanceof Array))?c[0]:c;
return d;
}return null;
},get_selectedIndex:function(){return this._selectedIndex;
},set_selectedIndex:function(c){this._selectedIndex=c;
this.set_activeIndex(c);
},get_items:function(){return this._items;
},set_items:function(c){this.disposeChildren();
this._items=c;
}};
b.registerControlProperties(a.EditorDropDown,{popupheight:"200px",popupwidth:"200px",rootpopupclassname:"reDropDownBody",popupclassname:"",sizetofit:false,itemsperrow:1,clearSelectedOnShow:true});
b.registerControlEvents(a.EditorDropDown,["show","hide"]);
a.EditorDropDown.registerClass("Telerik.Web.UI.EditorDropDown",a.EditorButton);
Telerik.Web.UI.EditorUpdateableDropDown=function(c){Telerik.Web.UI.EditorUpdateableDropDown.initializeBase(this,[c]);
};
Telerik.Web.UI.EditorUpdateableDropDown.prototype={updateValue:function(c){if(null==c){return;
}try{if(!c){c=this.get_text();
}var f=this.getSpanElement();
if(f){this._value=c;
f.innerHTML=(""+c).replace(/\s+/ig,"&nbsp;");
}}catch(d){}},get_value:function(){if(!this._value||this._value==this.get_text()){return"";
}return this._value;
},set_value:function(c){this.updateValue(c);
}};
Telerik.Web.UI.EditorUpdateableDropDown.registerClass("Telerik.Web.UI.EditorUpdateableDropDown",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.EditorSelfUpdateableDropDown=function(c){Telerik.Web.UI.EditorSelfUpdateableDropDown.initializeBase(this,[c]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.EditorSelfUpdateableDropDown.prototype={_onPopupClick:function(f){var d=this.resolveActiveIndex(f);
$telerik.cancelRawEvent(f);
if(d>-1){this._selectedIndex=d;
this.hide();
var c=this.get_selectedItem();
if(c){this.updateValue(c);
}this.raiseEvent("valueSelected");
}}};
Telerik.Web.UI.EditorSelfUpdateableDropDown.registerClass("Telerik.Web.UI.EditorSelfUpdateableDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorSplitButton=function(c){Telerik.Web.UI.EditorSplitButton.initializeBase(this,[c]);
this._updateHeader=true;
};
Telerik.Web.UI.EditorSplitButton.prototype={click:function(f){var d=this.isArrowClicked(f.target);
if(d||!this._updateHeader){this.show();
}else{var c=this.get_selectedItem();
if(null==c){this.show();
}else{this.raiseEvent("valueSelected");
}}return $telerik.cancelRawEvent(f);
},initialize:function(){Telerik.Web.UI.EditorSplitButton.callBaseMethod(this,"initialize");
this.set_clearSelectedOnShow(false);
},isArrowClicked:function(c){var d=this._getArrowElement();
if(c==d){return true;
}return false;
},_getArrowElement:function(){var d=this.getAnchorElement().getElementsByTagName("SPAN");
var c=d[d.length-1];
return c;
},get_updateHeader:function(){return this._updateHeader;
},set_updateHeader:function(c){this._updateHeader=c;
}};
Telerik.Web.UI.EditorSplitButton.registerClass("Telerik.Web.UI.EditorSplitButton",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.EditorToolStrip=function(c){Telerik.Web.UI.EditorToolStrip.initializeBase(this,[c]);
this._tools=[];
};
Telerik.Web.UI.EditorToolStrip.prototype={selectUIItem:function(f){for(var c=0;
c<this._items.length;
c++){var d=this._items[c];
if(c==this._activeIndex&&d.get_enabled()){d.setOn(true);
}else{d.setOn(false);
}}},set_selectedIndex:function(i){Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"set_selectedIndex",[i]);
if(this.get_updateHeader()){var h=this.get_selectedItem();
if(!h||!h.getSpanElement){return;
}var e=h.getSpanElement();
if(e){var f=e.cloneNode(true);
var c=this.getSpanElement();
var g=c.parentNode;
g.replaceChild(f,c);
var d=h.getAnchorElement();
if(d){g.setAttribute("title",d.getAttribute("title"));
}}}},hide:function(){Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"hide");
if(this.isIE){var d=this.get_selectedItem();
if(!d||!d.get_element){return;
}var c=d.get_element();
if(c){var e=c.cloneNode(true);
c.replaceNode(e);
d._element=e;
}}},show:function(){var f=this._items;
for(var c=0,e=f.length;
c<e;
c++){var d=f[c];
d.setOn(false);
}Telerik.Web.UI.EditorToolStrip.callBaseMethod(this,"show");
},_onPopupClick:function(f){var c=this._resolveSelectedTool(f);
$telerik.cancelRawEvent(f);
if(c){var d=Array.indexOf(this._items,c);
if($telerik.isSafari){this._selectedIndex=d;
this.set_activeIndex(d);
}else{this.set_selectedIndex(d);
}this.hide();
this.raiseEvent("valueSelected");
}},renderItemRoot:function(){var c=document.createElement("div");
c.className="reTlbVertical";
c.style.cssFloat="left";
c.style.width="100%";
this._itemRootElement=c;
return this._itemRootElement;
},renderChildren:function(){var j=this.get_itemsperrow();
var f=this.get_tools();
var g=document.createElement("ul");
g.setAttribute("onmousedown","return false;");
g.className="reToolbar "+this.get_skin();
this._itemRootElement.appendChild(g);
for(var d=0;
d<f.length;
d++){if(j>1&&d>1&&(d%this.get_itemsperrow()==0)){g=document.createElement("ul");
g.className="reToolbar "+this.get_skin();
this._itemRootElement.appendChild(g);
}var e=f[d];
if(null==e.showText){e.showText=true;
}var c=document.createElement("li");
g.appendChild(c);
var h=Telerik.Web.UI.EditorButton.createTool(e,null,null,null,c);
this._items[this._items.length]=h;
}},_resolveSelectedTool:function(f){for(var c=0;
c<this._items.length;
c++){var d=this._items[c];
if(d.isTarget(f)){if(d.get_enabled()){return d;
}else{return null;
}}}},get_tools:function(){return this._tools;
},set_tools:function(c){this._tools=Array.clone(c);
}};
Telerik.Web.UI.EditorToolStrip.registerClass("Telerik.Web.UI.EditorToolStrip",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.EditorContextMenu=function(c){Telerik.Web.UI.EditorContextMenu.initializeBase(this,[c]);
this._parentElement=null;
this._eventObject=null;
};
Telerik.Web.UI.EditorContextMenu.prototype={initialize:function(){this.set_updateHeader(false);
this.set_clearSelectedOnShow(true);
},show:function(){this.set_activeIndex(-1);
Telerik.Web.UI.EditorContextMenu.callBaseMethod(this,"show");
},configurePopupPropertiesBeforeShow:function(){var d=this._popupBehavior;
d.set_positioningMode(Telerik.Web.PositioningMode.Absolute);
var c=this.get_parentElement();
if(c){if(Telerik.Web.UI.Editor.Utils.isEditorContentArea(c)&&c.tagName=="DIV"){c=document.body;
}d.set_parentElement(c);
}var f=this._eventObject;
if(f){d.set_x(f.clientX+10);
d.set_y(f.clientY+10);
}},set_eventObject:function(c){this._eventObject=c;
},get_tagName:function(){return this._tagName;
},set_tagName:function(c){this._tagName=c;
},get_parentElement:function(){return this._parentElement;
},set_parentElement:function(c){this._parentElement=c;
}};
Telerik.Web.UI.EditorContextMenu.registerClass("Telerik.Web.UI.EditorContextMenu",Telerik.Web.UI.EditorToolStrip);
})();
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.AlignmentSelector=function(a){Telerik.Web.UI.Editor.AlignmentSelector.initializeBase(this,[a]);
this._tagName="TD";
this._selectedTuple=null;
this._noAlignmentIndex=0;
this._onValueSelectedDelegate=null;
this._clientStateFieldID=null;
};
Telerik.Web.UI.Editor.AlignmentSelector.prototype={initialize:function(){Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"initialize");
this.set_popupwidth("78px");
this.set_popupheight("100px");
this.set_popupclassname("reAlignmentSelector");
this.set_itemsperrow(3);
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this.add_valueSelected(this._onValueSelectedDelegate);
this.setTagName(this._tagName);
},dispose:function(){this.remove_valueSelected(this._onValueSelectedDelegate);
Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"dispose");
},_imgAlignment:[["",""],["none",""],["",""],["",""],["top",""],["",""],["left",""],["absmiddle",""],["right",""],["",""],["bottom",""],["",""]],_cellAlignment:[["",""],["none",""],["",""],["left","top"],["center","top"],["right","top"],["left","middle"],["center","middle"],["right","middle"],["left","bottom"],["center","bottom"],["right","bottom"]],_tableAlignment:[["",""],["none",""],["",""],["left",""],["center",""],["right",""],["",""],["",""],["",""],["",""],["",""],["",""]],_captionAlignment:[["",""],["none",""],["",""],["left","top"],["center","top"],["right","top"],["",""],["",""],["",""],["left","bottom"],["center","bottom"],["right","bottom"]],_alignmentClassName:["reNoAlignment","reNoAlignment","reNoAlignment","reTopLeft","reTopCenter","reTopRight","reMiddleLeft","reMiddleCenter","reMiddleRight","reBottomLeft","reBottomCenter","reBottomRight"],_getLookupTableByTagName:function(a){switch(a.toUpperCase()){case"IMG":return this._imgAlignment;
case"TABLE":return this._tableAlignment;
case"TD":return this._cellAlignment;
case"TH":return this._cellAlignment;
case"CAPTION":return this._captionAlignment;
default:return null;
}},_configureAlignmentTable:function(d){if(!this._rendered){this.render();
}var c=this._itemRootElement;
var e=0;
for(var a=0;
a<c.rows.length;
a++){var f=false;
for(var b=0;
b<c.rows[a].cells.length;
b++){var h=c.rows[a].cells[b];
var g=this._isAvailable(e++);
h.style.visibility=g?"visible":"hidden";
f|=g;
}if(null!=document.all){c.rows[a].style.display=f?"":"none";
}}},_isAvailable:function(a){var b=false;
if(this._items){var c=this._items[a];
b=((null!=c)&&(""!=c[0]||""!=c[1]));
}return b;
},renderChild:function(b,c,a){var d=document.createElement("div");
if(c){d.innerHTML="&nbsp;";
d.className=this._alignmentClassName[a];
}b.appendChild(d);
},_onDropDownValueSelected:function(){this.set_selectedIndex(this.get_selectedIndex());
},_selectAlignment:function(f,e){f=(""==f||!f)?"none":f.toUpperCase();
e=!e?"":e.toUpperCase();
if(this._items){var d=-1;
for(var a=0;
a<this._items.length;
a++){if(this._isAvailable(a)){var c=this._items[a][0].toUpperCase();
var b=this._items[a][1].toUpperCase();
if(-1==d){d=a;
}if((f==c||f==b)&&(e==c||e==b)){this.set_selectedIndex(a);
return;
}}}this.set_selectedIndex(d);
}},set_selectedIndex:function(a){Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"set_selectedIndex",[a]);
var c=this.getSpanElement();
var b=this._alignmentClassName[a];
c.className=b;
},setTagName:function(a){this._tagName=a;
this._items=this._getLookupTableByTagName(this._tagName);
this.set_selectedIndex(this._noAlignmentIndex);
},updateValue:function(a,b){this._selectAlignment(a,b);
},getAlign:function(){var b=this._items[this._selectedIndex];
var a=(b?b[0]:"");
if("none"==a){a="";
}return a;
},getVAlign:function(){var b=this._items[this._selectedIndex];
var a=(b?b[1]:"");
if("none"==a){a="";
}return a;
},show:function(){Telerik.Web.UI.Editor.AlignmentSelector.callBaseMethod(this,"show");
this._itemRootElement.cellSpacing=0;
this._configureAlignmentTable(this._tagName);
},get_clientStateFieldID:function(){return this._clientStateFieldID;
},set_clientStateFieldID:function(a){this._clientStateFieldID=a;
}};
Telerik.Web.UI.Editor.AlignmentSelector.registerClass("Telerik.Web.UI.Editor.AlignmentSelector",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.InsertTableHelper=function(a){Telerik.Web.UI.Editor.InsertTableHelper.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.InsertTableHelper.prototype={initialize:function(){var a=new Array(this.get_itemsperrow()*this.get_itemsperrow());
for(var b=0;
b<a.length;
b++){a[b]=b;
}this._items=a;
},hide:function(){},renderChild:function(c,d,a){var e=document.createElement("div");
e.innerHTML="&nbsp;";
c.appendChild(e);
var b=this._getDimensionByIndex(a);
c.setAttribute("title"," "+b.rows+" x "+b.cols+" ");
},_getDimensionByIndex:function(b){var d=0;
var e=0;
var f=this.get_itemsperrow();
for(var a=0;
a<this._items.length;
a++){if(a%f==0){d++;
e=0;
}e++;
if(b==a){break;
}}var c={rows:d,cols:e};
return c;
},get_selectedItem:function(){var a=this.get_selectedIndex();
return this._getDimensionByIndex(a);
},selectUIItem:function(k,f){var h=this._popupElement.getElementsByTagName("TD");
var g=h.length;
var d=this.get_activeIndex();
var l=this._getDimensionByIndex(d);
var j=l.cols;
for(var a=0;
a<g;
a++){var c=h[a];
var b=c.item_index;
if(b<=d&&c.cellIndex<j){c.className="reItemOver";
}else{c.className="";
}}}};
Telerik.Web.UI.Editor.InsertTableHelper.registerClass("Telerik.Web.UI.Editor.InsertTableHelper",Telerik.Web.UI.EditorDropDown);
Telerik.Web.UI.Editor.InsertTable=function(a){Telerik.Web.UI.Editor.InsertTable.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.InsertTable.prototype={initialize:function(){Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"initialize");
this._onTableHelperValueSelectedDelegate=Function.createDelegate(this,this._onTableHelperValueSelected);
this._tableHelper=null;
this._tableHelperItemsPerRow=this.get_itemsperrow();
this.set_itemsperrow(6);
this.set_popupwidth("140px");
this.set_updateHeader(false);
var a=this.get_tools();
this._longTool=a[0];
Array.removeAt(a,0);
for(var b=0;
b<a.length;
b++){a[b].showText=false;
}},show:function(){Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"show");
this._tableHelper.set_selectedIndex(-1);
},_onPopupClick:function(a){this._tableHelperClicked=false;
Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"_onPopupClick",[a]);
},_onTableHelperValueSelected:function(){this._tableHelperClicked=true;
this.set_selectedIndex(-1);
var a=this.getSpanElement();
a.className="InsertTable";
this.hide();
this.raiseEvent("valueSelected");
},get_selectedItem:function(){if(this._tableHelperClicked){return this._tableHelper.get_selectedItem();
}else{return Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"get_selectedItem");
}},renderHeader:function(){var c={skin:this.get_skin(),itemsperrow:this._tableHelperItemsPerRow,sizetofit:true};
var a={valueSelected:this._onTableHelperValueSelectedDelegate};
var b=$create(Telerik.Web.UI.Editor.InsertTableHelper,c,a,null,document.createElement("div"));
b.set_rootpopupclassname("");
this._tableHelper=b;
b.render();
var e=b.get_popupElement();
e.style.display="";
e.style.visibility="visible";
e.style.position="";
e.style.cssFloat="left";
var d=this.get_popupElement();
d.insertBefore(e,d.firstChild);
},renderChildren:function(){Telerik.Web.UI.Editor.InsertTable.callBaseMethod(this,"renderChildren");
var d=this._itemRootElement;
if(this._longTool){var b=document.createElement("ul");
d.insertBefore(b,d.firstChild);
this._longTool.showText=true;
var c=document.createElement("li");
b.appendChild(c);
var a=Telerik.Web.UI.EditorButton.createTool(this._longTool,null,null,null,c);
a.get_element().style.width="auto";
this._items[this._items.length]=a;
}}};
Telerik.Web.UI.Editor.InsertTable.registerClass("Telerik.Web.UI.Editor.InsertTable",Telerik.Web.UI.EditorToolStrip);
Telerik.Web.UI.Editor.ColorPicker=function(a){Telerik.Web.UI.Editor.ColorPicker.initializeBase(this,[a]);
this._clientStateFieldID=null;
this._addCustomColorText="Add Custom Color";
};
Telerik.Web.UI.Editor.ColorPicker.prototype={initialize:function(){Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"initialize");
this.set_popupclassname("reColorPicker");
this.set_sizetofit(true);
this.set_itemsperrow(10);
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this.add_valueSelected(this._onValueSelectedDelegate);
},dispose:function(){this.remove_valueSelected(this._onValueSelectedDelegate);
Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"dispose");
},_onDropDownValueSelected:function(){var a=this.get_selectedItem();
this.set_color(a);
},get_value:function(){return this.get_color();
},set_value:function(a){this.set_color(a);
},set_color:function(c){if(!c){c="";
}var b=this.getSpanElement();
b.style.borderBottom="0px";
b.style.height="";
if(c){var a=b.offsetHeight;
if(a){b.style.height=(a-3)+"px";
}try{b.style.borderBottom="3px solid "+c;
}catch(d){}}this._color=c;
},get_color:function(){return this._color;
},onPopupMouseOver:function(c){Telerik.Web.UI.Editor.ColorPicker.callBaseMethod(this,"onPopupMouseOver",[c]);
var b=this.get_activeIndex();
var a=this._items[b];
if(null==a){return;
}if(this._infoSpan1){this._infoSpan1.innerHTML=a;
this._infoSpan1.style.backgroundColor=a;
}if(this._infoSpan2){this._infoSpan2.innerHTML=a;
this._infoSpan2.style.color=a;
}},_customColorClicked:function(f){var a=prompt(this.get_addCustomColorText(),"#");
if(a){var c=document.createElement("a");
try{c.style.borderBottom="3px solid "+a;
}catch(f){a="";
}finally{c=null;
}}if(a){this._items[this._items.length]=a;
var b=(this._items.length-1);
if(0==(b%this.get_itemsperrow())){this.renderNewRow();
}var d=this.renderItemContainer();
this.markItemContainer(d,b);
this.renderChild(d,this._items[b],b);
this.set_selectedIndex(b);
this.hide();
this.raiseEvent("valueSelected");
}$telerik.cancelRawEvent(f);
},renderFooter:function(){var e=document.createElement("div");
e.style.textAlign="center";
var b=document.createElement("a");
b.className="reCustomColor";
b.setAttribute("href","#");
b.innerHTML=this.get_addCustomColorText();
$addHandlers(b,{click:this._customColorClicked},this);
e.appendChild(b);
this.get_popupElement().appendChild(e);
var c=document.createElement("div");
c.className="reColorPickerFooter";
var d=document.createElement("span");
d.className="reDarkColor";
var a=document.createElement("span");
a.className="reLightColor";
d.innerHTML=a.innerHTML="&nbsp";
c.appendChild(d);
c.appendChild(a);
this.get_popupElement().appendChild(c);
this._infoSpan1=d;
this._infoSpan2=a;
},renderChild:function(b,c,a){var d=document.createElement("div");
if(null!=c){d.style.backgroundColor=c;
d.setAttribute("title",c);
d.innerHTML="&nbsp;";
}b.appendChild(d);
},get_clientStateFieldID:function(){return this._clientStateFieldID;
},set_clientStateFieldID:function(a){this._clientStateFieldID=a;
},get_addCustomColorText:function(){return this._addCustomColorText;
},set_addCustomColorText:function(a){this._addCustomColorText=a;
}};
Telerik.Web.UI.Editor.ColorPicker.registerClass("Telerik.Web.UI.Editor.ColorPicker",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.UndoRedoDropDown=function(a){Telerik.Web.UI.Editor.UndoRedoDropDown.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.UndoRedoDropDown.prototype={renderFooter:function(){},get_selectedItem:function(){var a=Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"get_selectedItem");
if(!a){a=1;
}return a;
},selectUIItem:function(a,b){return Telerik.Web.UI.Editor.UndoRedoDropDown.callBaseMethod(this,"selectUIItem",[a,true]);
}};
Telerik.Web.UI.Editor.UndoRedoDropDown.registerClass("Telerik.Web.UI.Editor.UndoRedoDropDown",Telerik.Web.UI.EditorSplitButton);
Telerik.Web.UI.Editor.ApplyClassDropDown=function(a){Telerik.Web.UI.Editor.ApplyClassDropDown.initializeBase(this,[a]);
this._onValueSelectedDelegate=null;
this._clientStateFieldID=null;
this._clearclasstext="Clear Class";
this._isArrayCollection=true;
};
Telerik.Web.UI.Editor.ApplyClassDropDown.prototype={initialize:function(){Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"initialize");
this.set_popupclassname("reApplyClass");
this._onValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this.add_valueSelected(this._onValueSelectedDelegate);
this._cssClassRegex=/[^\{]*\{([^\}]+)\}/gi;
},dispose:function(){this.remove_valueSelected(this._onValueSelectedDelegate);
Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"dispose");
},_onDropDownValueSelected:function(){this.updateValue(this.get_selectedItem());
},_getClassIcon:function(b){if(!b){b="";
}else{b=b.toLowerCase();
}var a=document.createElement("span");
a.innerHTML="&nbsp;"+b;
a.className="reClass_"+b;
return a;
},_getClassTag:function(a){var b=a&&a.selectorText?a.selectorText:"";
var d=b.lastIndexOf(".");
if(d==0){return"ALL";
}var c=b.lastIndexOf(" ",d);
return b.substring((c+1),d);
},_getClassCss:function(a){var b=this._cssClassRegex;
var c="";
if(null!=a.cssText){c=a.cssText;
c=c.replace(b,"$1");
}else{c=a.style.cssText;
}return c;
},_getDisplayName:function(c){if(!c||!c.selectorText){return"";
}var d=c.selectorText;
var a=d.indexOf(".");
if(-1==a){a=0;
}else{a+=1;
}var b=d.indexOf(":");
if(-1==b){b=d.length;
}return d.substring(a,b);
},_getClassName:function(a){var b=a&&a.selectorText?a.selectorText:"";
var d=b.lastIndexOf(".");
if(d==-1){return"";
}var c=b.indexOf(" ",d);
if(-1==c){c=b.indexOf(":",d);
}if(-1==c){c=b.length;
}return b.substring((d+1),c);
},_getChild:function(b,c,e){var d=document.createElement("div");
if(c.toLowerCase()=="a"){d=document.createElement("a");
d.href="#";
d.onmouseover="window.status = ''; return false;";
d.onclick=new Function("return false;");
d.style.cursor="default";
}if(null!=d.style.cssText){d.style.cssText=b;
}d.setAttribute("style",b);
d.innerHTML=e;
var a=d.style;
a.visibility="visible";
a.marginLeft="0px";
a.overflowX="hidden";
a.clear="none";
a.position="";
a.cssFloat="";
a.styleFloat="";
a.width="";
return d;
},set_items:function(a){Telerik.Web.UI.Editor.ApplyClassDropDown.callBaseMethod(this,"set_items",[a]);
if(this._items.length==0||this._items[0][0]!=""){this._items.splice(0,0,["",{cssText:"",selectorText:this.get_clearclasstext()}]);
}},renderChild:function(h,e,i){var a=e[1];
if(a){var d=this._getClassTag(a);
var b=this._getClassCss(a);
var f=e[2]?e[2]:this._getDisplayName(a);
h.setAttribute("title",a.selectorText);
var g=this._getClassIcon(d);
h.appendChild(g);
var c=this._getChild(b,d,f);
h.appendChild(c);
}},get_clientStateFieldID:function(){return this._clientStateFieldID;
},set_clientStateFieldID:function(a){this._clientStateFieldID=a;
},get_clearclasstext:function(){return this._clearclasstext;
},set_clearclasstext:function(a){this._clearclasstext=a;
}};
Telerik.Web.UI.Editor.ApplyClassDropDown.registerClass("Telerik.Web.UI.Editor.ApplyClassDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontNameDropDown=function(a){Telerik.Web.UI.Editor.FontNameDropDown.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.FontNameDropDown.prototype={updateValue:function(a){try{if(!a){a=this.get_text();
}if(null==a||"AZBY"==a){return;
}var c=this.getSpanElement();
if(c){this._value=(""+a).replace(/\s+/ig,"&nbsp;");
c.innerHTML=this._value;
}}catch(b){}},renderChildren:function(){var c=this._items;
if(c&&c[0]&&!(c[0] instanceof Array)){for(var a=0;
a<c.length;
a++){var b=itemName=c[a];
if(itemName=="Wingdings"||itemName=="Webdings"){itemName="Arial";
}c[a]=[b,String.format("<span style='font:normal 13px {0};'>",itemName)+b+"</span>"];
}}return Telerik.Web.UI.Editor.FontNameDropDown.callBaseMethod(this,"renderChildren");
}};
Telerik.Web.UI.Editor.FontNameDropDown.registerClass("Telerik.Web.UI.Editor.FontNameDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.FontSizeDropDown=function(a){Telerik.Web.UI.Editor.FontSizeDropDown.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.FontSizeDropDown.prototype={renderChildren:function(){var c=this._items;
if(c&&c[0]&&!(c[0] instanceof Array)){for(var a=0;
a<c.length;
a++){var b=c[a];
c[a]=[b,String.format("<font size={0}>",b)+b+"</font>"];
}}return Telerik.Web.UI.Editor.FontSizeDropDown.callBaseMethod(this,"renderChildren");
}};
Telerik.Web.UI.Editor.FontSizeDropDown.registerClass("Telerik.Web.UI.Editor.FontSizeDropDown",Telerik.Web.UI.EditorUpdateableDropDown);
Telerik.Web.UI.Editor.InsertCustomLinkDropDown=function(a){Telerik.Web.UI.Editor.InsertCustomLinkDropDown.initializeBase(this,[a]);
};
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.prototype={renderItemRoot:function(){var a=document.createElement("ul");
a.className="reCustomLinks";
this._itemRootElement=a;
return this._itemRootElement;
},show:function(){this._linkCounter=0;
return Telerik.Web.UI.Editor.InsertCustomLinkDropDown.callBaseMethod(this,"show");
},renderChildren:function(){this.FlatLinksArray=[];
for(var b=0;
b<this._items.length;
b++){var a=this._items[b];
this._parseSubtree(a,this._itemRootElement);
}},get_selectedItem:function(){var a=this.FlatLinksArray[this.get_selectedIndex()];
return{innerHTML:a.name,href:a.href,target:a.target,title:a.toolTip};
},_parseSubtree:function(h,l){var d=this._linkCounter;
this.FlatLinksArray[d]=h;
var m=document.createElement("li");
l.appendChild(m);
var k=h.childLinks&&h.childLinks.length;
var f=document.createElement("span");
f.innerHTML="&nbsp;";
f.className=k?"reCustomLinksIcon reIcon_plus":"reCustomLinksIcon reIcon_empty";
if(k){function b(p){var q=Sys.UI.DomElement.containsCssClass(this,"reIcon_plus");
var i=this.parentNode.getElementsByTagName("UL")[0];
if(i){i.style.display=q?"":"none";
var o=q?"reIcon_plus":"reIcon_minus";
var n=q?"reIcon_minus":"reIcon_plus";
Sys.UI.DomElement.removeCssClass(this,o);
Sys.UI.DomElement.addCssClass(this,n);
}return false;
}$addHandler(f,"click",b);
}m.appendChild(f);
var g=null;
if(h.href){g=document.createElement("a");
g.href="#";
g.innerHTML=h.name;
m.appendChild(g);
this.markItemContainer(g,this._linkCounter);
}else{g=document.createElement("span");
g.innerHTML=h.name;
m.appendChild(g);
}this._linkCounter++;
if(k){var j=document.createElement("ul");
m.appendChild(j);
var a=h.childLinks;
for(var c=0;
c<h.childLinks.length;
c++){var e=a[c];
this._parseSubtree(e,j);
}j.style.display="none";
}}};
Telerik.Web.UI.Editor.InsertCustomLinkDropDown.registerClass("Telerik.Web.UI.Editor.InsertCustomLinkDropDown",Telerik.Web.UI.EditorDropDown);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor._PopupController=function(){this._activePopup=null;
this._registerGlobalBodyEventHandlers();
};
Telerik.Web.UI.Editor._PopupController.prototype={_registerGlobalBodyEventHandlers:function(){function b(f,h){var j=window.frames;
for(var d=0;
d<j.length;
d++){var g=null;
try{g=j[d].window.document;
}catch(c){}if(!g){continue;
}try{if(false!=f){h.attachToDocument(g);
}else{h.detachFromDocument(g);
}}catch(c){}}}var a=Function.createDelegate(null,function(c){if(c.keyCode==27){Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}});
$telerik.addExternalHandler(document.body,"keydown",a);
b(true,this);
$telerik.addExternalHandler(document.body,"mousedown",this._hideHandler);
Sys.Application.add_unload(function(){b(false,Telerik.Web.UI.Editor.PopupController);
$telerik.removeExternalHandler(document.body,"mousedown",Telerik.Web.UI.Editor.PopupController._hideHandler);
$telerik.removeExternalHandler(document.body,"keydown",a);
});
},attachToDocument:function(a){$telerik.addExternalHandler(a,"mousedown",this._hideHandler);
},detachFromDocument:function(a){try{$telerik.removeExternalHandler(a,"mousedown",this._hideHandler);
}catch(b){}},_hideHandler:function(a){Telerik.Web.UI.Editor.PopupController._hideIfOutsidePopup(a);
},hideActivePopup:function(){if(this._activePopup!=null){this._activePopup.hide();
this._activePopup=null;
}},_hideIfOutsidePopup:function(b){if(this._activePopup!=null){if(!this._activePopup.get_popupElement){return;
}var a=this._activePopup.get_popupElement();
if(!this._isMouseOverElement(b,a)){this.hideActivePopup();
}}},_isMouseOverElement:function(d,c){var b=null;
try{b=$telerik.getBounds(c);
}catch(d){return false;
}if(d&&d.target&&d.target.tagName=="SELECT"&&d.clientX<0){return true;
}var a=$telerik.getDocumentRelativeCursorPosition(d);
return $telerik.containsPoint(b,a.left,a.top);
},notifyPopupClosed:function(a){if(this._activePopup==a){this._activePopup=null;
}},set_activePopup:function(a){if(this._activePopup&&(a!=this._activePopup)){this._activePopup.hide();
}this._activePopup=a;
},get_activePopup:function(){return this._activePopup;
}};
Telerik.Web.UI.Editor._PopupController.registerClass("Telerik.Web.UI.Editor._PopupController",null);
if(!Telerik.Web.UI.Editor.PopupController){var createEditorPopupController=function(){window.setTimeout(function(){Telerik.Web.UI.Editor.PopupController=new Telerik.Web.UI.Editor._PopupController();
},100);
};
createEditorPopupController();
}Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.DefaultToolAdapter=function(a){Telerik.Web.UI.Editor.DefaultToolAdapter.initializeBase(this,[a]);
this._editor=null;
this._toolJSON=[];
this._tools=[];
this._contextMenusEnabled=true;
this.isIE=$telerik.isIE;
this._editorIEFirstShow=false;
this._contentAreaMode="";
};
Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=null;
Telerik.Web.UI.Editor.DefaultToolAdapter.prototype={initialize:function(){this._onEditorSelectionChangeDelegate=Function.createDelegate(this,this._onEditorSelectionChange);
this._onEditorModeChangeDelegate=Function.createDelegate(this,this._onEditorModeChange);
this._onToolAdapterClickDelegate=Function.createDelegate(this,this._onToolBarClick);
this._onToolAdapterKeyDownDelegate=Function.createDelegate(this,this._onKeyDownHandler);
this._onDropDownValueSelectedDelegate=Function.createDelegate(this,this._onDropDownValueSelected);
this._onDropDownBeforeShowDelegate=Function.createDelegate(this,this._onDropDownBeforeShow);
this._onDropDownHideDelegate=Function.createDelegate(this,this._onDropDownHide);
this._initContextMenus();
this._registerEditorHandlers();
var b=Telerik.Web.UI.EditorToolbarMode;
var a=this.get_editor();
switch(a.get_toolbarMode()){case b.Default:a.add_firstShow(Function.createDelegate(this,function(){this._hookToolbarJson2Html();
var d=this.get_editor();
var c=d.get_element().style.height;
d._updateEditorSize(c);
}));
break;
case b.Floating:this._createFloatingButton();
break;
case b.PageTop:case b.ShowOnFocus:this._hookToolbarModeEventHandlers();
break;
}},_hookToolbarJson2Html:function(){if(this._initializedToolbars){return;
}this._initializedToolbars=true;
var l=this.get_toolJSON();
var k=this._getToolBarElements();
var f=[];
for(var h=0;
h<l.length;
h++){var e=l[h];
var c=k[h];
this._initializeToolbar(e,c);
var a=e.attributes;
var g=a?a.dockingzone:null;
if(g){f[f.length]=[g,c];
}}if($telerik.isIE){var d=this.get_element();
d.style.height="";
}var b=this.get_editor();
var j=b.get_id();
for(var h=0;
h<f.length;
h++){var n=f[h][0];
var g=n.charAt(0).toUpperCase()+n.substring(1);
var m=$get(j+g);
if(!m){m=$get(n);
}if(m){if(m.innerHTML=="&nbsp;"){m.innerHTML="";
}m.appendChild(f[h][1]);
}}},_initNonDefaultToolbarMode:function(){var d=this.get_editor();
var c=Telerik.Web.UI.EditorToolbarMode;
var b=d.get_toolbarMode();
var a=this._toolbarHolder;
var e=Telerik.Web.UI.WindowBehaviors;
switch(b){case c.ShowOnFocus:a.set_behaviors(e.None);
a.set_visibleTitlebar(false);
break;
case c.PageTop:a.set_behaviors(e.None);
a.set_visibleTitlebar(false);
break;
default:a.set_behaviors(e.Move+e.Close+e.Pin);
break;
}this.get_element().style.visibility="visible";
},_showToolbarHolder:function(b){if(!b){if(this._toolbarHolder){this._toolbarHolder.hide();
}return;
}else{if($telerik.isIE&&!this._editorIEFirstShow){if(this.get_editor().get_toolbarMode()!=Telerik.Web.UI.EditorToolbarMode.Floating){this._editorIEFirstShow=true;
return;
}}}if(this.get_editor().isFullScreen()){return;
}var a=Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper;
if(a==this&&a._toolbarHolder&&a._toolbarHolder.isVisible()){a.get_toolbarHolder().setActive(true);
return;
}if(a&&a._showToolbarHolder){a._showToolbarHolder(false);
}Telerik.Web.UI.Editor.DefaultToolAdapter._visibleWrapper=this;
this.get_window();
this._initNonDefaultToolbarMode();
this._toolbarHolder.show();
},_positionWindow:function(){var b=Telerik.Web.UI.EditorToolbarMode;
var c=this.get_editor();
var a=c.get_toolbarMode();
if(a==b.ShowOnFocus){this._positionToolbarAboveEditor();
}else{if(a==b.PageTop){this._positionOnPageTop();
}else{if(a==b.Floating){if(!this._wasShown){this._positionToolbarAboveEditor();
this._wasShown=true;
}}}}},get_window:function(){if(!this._toolbarHolder){var e=this.get_editor();
var a=e.get_dialogOpener();
if(!a){return;
}var b=a.get_container().clone(e.get_id()+"_toolbarMode");
b.set_visibleStatusbar(false);
var d=this.get_element();
var c=d.offsetWidth;
b.setSize(c+10,"");
b.add_show(Function.createDelegate(this,function(j,l){var f=j.get_contentElement();
if(!f){return;
}var i=j.get_popupElement();
i.style.zIndex="10000";
j.setActive(true);
Sys.UI.DomElement.addCssClass(i,"reToolbarWindow");
this._hookToolbarJson2Html();
f.style.overflow="";
f.style.height="";
var h=f.offsetWidth;
f.style.width=h+"px";
var k=e.get_toolsWidth();
if(!k){var g=j.getWindowBounds();
k=g.width;
}j.setSize(k,null);
f.style.width="100%";
this._positionWindow();
}));
this._toolbarHolder=b;
this._moveToolbarsToEditor(false);
}return this._toolbarHolder;
},_moveToolbarsToEditor:function(e){var b=this.get_element();
if(!e){if(!this._fakeToolbarParentCreated){var d=b.ownerDocument.createElement("div");
d.control=b.control;
b.parentNode.appendChild(d);
this._fakeToolbarParentCreated=true;
b.control=null;
var a=d.style;
a.height=a.fontSize=a.lineHeight="1px";
a.border="1px solid red";
a.visibility="hidden";
if(!$telerik.isIE){a.display="none";
}}var c=this.get_toolbarHolder();
c.set_contentElement(b);
b.style.width="100%";
}else{b.style.width="";
var f=this.get_editor().get_TopZone();
f.appendChild(b);
}},_positionToolbarAboveEditor:function(){var c=this._toolbarHolder;
var a=this.get_editor();
var f=$telerik.getBounds(a.get_element());
var b=f.x;
var e=$telerik.getBounds(c.get_popupElement()).height;
var d=f.y-e;
c.moveTo(b,d);
},_positionOnPageTop:function(){var b=this._toolbarHolder;
var d=b._getViewportBounds();
var c=d.scrollLeft;
var e=d.scrollTop;
b.moveTo(c,e);
var a=this.get_editor().get_toolsWidth();
if(a&&a.indexOf("%")==-1){b.set_width(a);
}else{b.set_width("");
}if(!b.isPinned()){b.togglePin();
}},_createFloatingButton:function(){this._onToggleFloatingToolbarDelegate=Function.createDelegate(this,this._onToggleFloatingToolbar);
var b=this.get_editor();
var d=b.get_skin();
var c={name:"ToggleFloatingToolbar",addClickHandler:true,skin:d};
var g={valueSelected:this._onToggleFloatingToolbarDelegate};
var a=Telerik.Web.UI.EditorButton.createTool(c,g);
var e=Telerik.Web.UI.EditorButton.createToolWrapper(a,d);
var f=$get(b.get_id()+"Top");
if(f){f.appendChild(e);
}},_onToggleFloatingToolbar:function(){var a=!this._toolbarHolder||!this._toolbarHolder.isVisible();
this._showToolbarHolder(a);
},_hookToolbarModeEventHandlers:function(){var c=this;
var a=function(){c._showToolbarHolder(true);
};
var b=this.get_editor();
if(b.isIE){this.get_editor().add_editReady(function(){b.attachEventHandler("beforeeditfocus",a);
});
}else{b.add_selectionChange(a);
}b.add_modeChange(function(){c._showToolbarHolder(c.get_editor().get_mode()==Telerik.Web.UI.EditModes.Design);
});
b.add_submit(function(){c._showToolbarHolder(false);
});
b.add_toggleScreenMode(function(){var f=c.get_editor();
var e=f.isFullScreen();
c._moveToolbarsToEditor(e);
if(f.get_toolbarMode()!=Telerik.Web.UI.EditorToolbarMode.Default){f._updateEditorSize(f.get_element().style.height);
}var d=c.get_toolbarHolder();
if(e){d.hide();
}else{d.show();
}});
this._bodyClickDelegate=Function.createDelegate(this,this._onBodyClick);
$telerik.addExternalHandler(document.body,"click",this._bodyClickDelegate);
},_disposeToolbarModeHandlers:function(){if(this._bodyClickDelegate){$telerik.removeExternalHandler(document.body,"click",this._bodyClickDelegate);
this._bodyClickDelegate=null;
}},onContextMenu:function(h){if(!this._contextMenusEnabled){return;
}var a=this.get_editor();
if(a.get_mode()!=Telerik.Web.UI.EditModes.Design){return;
}this.createContextMenus();
var b=h.srcElement?h.srcElement:h.target;
var i=b.tagName;
var c=this._contextMenus[i];
if("TH"==i&&!c){c=this._contextMenus.TD;
}var d="";
if(!c){var g=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"A");
if(!g){g=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TD");
}if(!g){g=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TABLE");
}if(g){d=g.tagName;
b=g;
}else{d="*";
}c=this._contextMenus[d];
}if(c&&i=="IMG"&&b&&"true"==b.getAttribute("isflash")){c=null;
}if(!this.isIE&&d=="*"){return;
}if(c){c.set_eventObject(h);
c.show();
if($telerik.isSafari){try{a.selectElement(b);
}catch(f){}}}return $telerik.cancelRawEvent(h);
},enableContextMenus:function(a){this._contextMenusEnabled=a;
},_initContextMenus:function(){var a=Function.createDelegate(this,this.onContextMenu);
var b=this.get_editor();
b.add_editReady(function(){b.attachEventHandler("contextmenu",a);
});
},createContextMenus:function(){if(this._contextMenus){return;
}this._contextMenus={};
var a=this.get_editor();
var c=a.get_skin();
var f=a.get_contextMenusJSON();
var d={valueSelected:this._onDropDownValueSelectedDelegate,show:this._onDropDownBeforeShowDelegate,hide:this._onDropDownHideDelegate};
for(var b=0;
b<f.length;
b++){var h=f[b];
h.sizetofit=true;
h.parentElement=a.get_contentAreaElement();
h.skin=c;
var g=$create(Telerik.Web.UI.EditorContextMenu,h,d,null,document.createElement("span"));
var e=h.tagName?h.tagName:"*";
this._contextMenus[e]=g;
}},dispose:function(){var c=this._getToolBarElements();
for(var a=0;
a<c.length;
a++){$clearHandlers(c[a]);
}this._tools=[];
this._disposeToolbarModeHandlers();
var b=this._toolbarHolder;
if(b&&b.dispose){b.dispose();
}Telerik.Web.UI.Editor.DefaultToolAdapter.callBaseMethod(this,"dispose");
},setFocus:function(){var a=this._tools[0];
window.setTimeout(function(){if(a){a.setFocus();
}},100);
return false;
},getContextMenuByTagName:function(a){this.createContextMenus();
return this._contextMenus[a];
},getToolByName:function(c){for(var a=0;
a<this._tools.length;
a++){var b=this._tools[a];
if(b&&b.get_name()==c){return b;
}}return null;
},setToolState:function(f,g){if(!f){f=this._tools;
}var b=this.get_editor();
for(var a=0;
a<f.length;
a++){var e=f[a];
var d=e.get_name();
if(e.setState){var c=g;
if(null==c){c=b.getToolState(d);
}if(null!=c){e.setState(c);
}}if(e.updateValue){e.updateValue(b.getToolValue(d));
}}},_convertCommandsArray:function(f){var d=[];
for(var a=0;
a<f.length;
a++){var e=f[a];
var c=(a+1)+". "+e.get_title();
if(e.get_argument){var b=e.get_argument();
if(b){c+=' ["'+b+'"]';
}}d[a]=[a+1,c];
}return d;
},_onDropDownHide:function(c,b){var a=this.get_editor();
a.enableContentArea(true);
},_onDropDownBeforeShow:function(e,d){var f=this.get_editor();
if(Telerik.Web.UI.EditorToolStrip.isInstanceOfType(e)){this.setToolState(e.get_items());
}if(!f.getSelection().isControl()&&!Telerik.Web.UI.EditorContextMenu.isInstanceOfType(e)){f.enableContentArea(false);
}var l=e.get_name();
if(l=="Undo"){var b=f.get_commandsManager().getCommandsToUndo();
b=this._convertCommandsArray(b);
e.set_items(b);
}else{if(l=="Redo"){var o=f.get_commandsManager().getCommandsToRedo();
o=this._convertCommandsArray(o);
e.set_items(o);
}else{if(l=="ModuleManager"){var g=f.get_modulesManager();
if(!g){return;
}var a=g.get_modules();
var p=[];
for(var k=0;
k<a.length;
k++){var j=a[k];
var c=j.get_name();
var n=j.get_title();
if(!n){n=c;
}cssClass=j.get_visible()?"reModule_visible_icon":"reModule_hidden_icon";
p[k]=[c,n,cssClass];
}e.set_updateHeader(false);
e.set_items(p);
}}}var h=e.get_items();
if(h&&h.length>0){return;
}var m=null;
switch(l){case"ApplyClass":m=f.getCssArray();
break;
case"FontName":m=f.get_fontNames();
break;
case"FontSize":m=f.get_fontSizes();
break;
case"InsertSymbol":m=f.get_symbols();
if(($telerik.isIE||$telerik.isSafari)&&m&&m.length){for(var k=0;
k<m.length;
k++){if(m[k]=="<"){m[k]="&lt;";
}}}break;
case"BackColor":case"ForeColor":m=f.get_colors();
break;
case"RealFontSize":m=f.get_realFontSizes();
break;
case"InsertSnippet":m=f.get_snippets();
break;
case"Zoom":m=["10%","20%","50%","100%","150%","200%","300%","500%"];
break;
case"FormatBlock":m=f.get_paragraphs();
break;
case"InsertCustomLink":m=f.get_links();
break;
case"AjaxSpellCheck":case"SpellCheck":m=f.get_languages();
break;
}if(m){e.set_items(m);
}},_initializeToolbar:function(s,b){var l=b.getElementsByTagName("li");
var v=s.tools;
var a=this.get_editor();
var k=a.get_skin();
var w=0;
if(v){var e=0;
var j=v.length;
for(var n=0;
n<j;
n++){var u=l[n+1];
var d=u.firstChild;
e+=u.offsetWidth;
var f=v[n];
var y=f.type;
var o=f.name;
var h=Telerik.Web.UI.EditorToolType;
var m=Telerik.Web.UI.EditorButton;
var t=null;
var q=false;
if(y){switch(y){case h.Button:break;
case h.Separator:if(!w){w+=parseInt($telerik.getCurrentStyle(u,"marginLeft"));
w+=parseInt($telerik.getCurrentStyle(u,"marginRight"));
}e+=w;
m=null;
break;
case h.DropDown:m=Telerik.Web.UI.EditorDropDown;
if(o=="FontName"){m=Telerik.Web.UI.Editor.FontNameDropDown;
}else{if(o=="FontSize"){m=Telerik.Web.UI.Editor.FontSizeDropDown;
}else{if(o=="FormatBlock"||o=="RealFontSize"||o=="Zoom"){m=Telerik.Web.UI.EditorUpdateableDropDown;
}else{if(o=="ApplyClass"){m=Telerik.Web.UI.Editor.ApplyClassDropDown;
}else{if(o=="InsertCustomLink"){m=Telerik.Web.UI.Editor.InsertCustomLinkDropDown;
}}}}}q=true;
break;
case h.SplitButton:m=Telerik.Web.UI.EditorSplitButton;
if(o=="ForeColor"||o=="BackColor"){m=Telerik.Web.UI.Editor.ColorPicker;
f.addCustomColorText=a.getLocalizedString("AddCustomColor");
}else{if(o=="Undo"||o=="Redo"){m=Telerik.Web.UI.Editor.UndoRedoDropDown;
}}q=true;
break;
case h.ToolStrip:m=Telerik.Web.UI.EditorToolStrip;
if(o=="InsertTable"){m=Telerik.Web.UI.Editor.InsertTable;
}q=true;
break;
case h.Custom:break;
}}if(f.attributes){for(var x in f.attributes){f[x.toLowerCase()]=f.attributes[x];
}}if(m){var r=null;
if(q){r={valueSelected:this._onDropDownValueSelectedDelegate,show:this._onDropDownBeforeShowDelegate,hide:this._onDropDownHideDelegate};
f.skin=k;
}t=$create(m,f,r,null,d);
if(this.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div){t.set_contentAreaMode(Telerik.Web.UI.EditorContentAreaMode.Div);
}}if(t){Array.add(this._tools,t);
var g=t.get_shortCut();
if(g){var c=t.get_name();
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(t)&&c!="Undo"&&c!="Redo"){c="reToolAdapter_"+c;
Telerik.Web.UI.Editor.CommandList[c]=this._toolAdapterDropDownExpander;
}a.setShortCut(c,g);
}}}var p=b;
if(this.isIE&&p&&e){p.style.width=(e+(l[0].offsetWidth)*2)+"px";
}if($telerik.isSafari){p.setAttribute("onmousedown","return false;");
}$addHandlers(b,{click:this._onToolAdapterClickDelegate,keydown:this._onToolAdapterKeyDownDelegate},this);
}},_toolAdapterDropDownExpander:function(c,b){var a=b.getToolByName(c.replace("reToolAdapter_",""));
a.setFocus();
a.show();
a.selectNextItem();
return false;
},_onEditorModeChange:function(d,c){var e=Telerik.Web.UI.EditModes;
var a=d.get_mode();
this._setEnabled(a==e.Design);
if(!$telerik.isFirefox&&!$telerik.isOpera&&a==e.Html){var b=this.getToolByName("FindAndReplace");
if(b){b.set_enabled(true);
}}},_onEditorSelectionChange:function(a,b){this.setToolState();
},_setEnabled:function(b){var c=this._tools;
for(var d=0;
d<c.length;
d++){var a=c[d];
a.set_enabled(b);
}},_registerEditorHandlers:function(){var a=this.get_editor();
a.add_selectionChange(this._onEditorSelectionChangeDelegate);
a.add_modeChange(this._onEditorModeChangeDelegate);
},_onBodyClick:function(c){var b=this.get_editor();
if(b&&b.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div){if(!c){c=window.event;
}var a=(c.srcElement)?c.srcElement:c.originalTarget;
if(Telerik.Web.UI.Editor.Utils.isEditorContentArea(a)||$telerik.isDescendant(this.get_editor().get_contentArea(),a)){this._preventToolbarFromHiding=true;
}}if(this._preventToolbarFromHiding){this._preventToolbarFromHiding=false;
return;
}this._showToolbarHolder(false);
},_onDropDownValueSelected:function(b,c){this._preventToolbarFromHiding=true;
var a=b.get_selectedItem();
if(Telerik.Web.UI.EditorButton.isInstanceOfType(a)){this._raiseEditorEvent(a,null);
}else{this._raiseEditorEvent(b,a);
}},_onKeyDownHandler:function(f){var d=f.keyCode;
if(9==d||37==d||39==d||121==d){if(Telerik.Web.UI.Editor.PopupController){Telerik.Web.UI.Editor.PopupController.hideActivePopup();
}}if(121==d){var a=this.get_editor();
window.setTimeout(function(){if(a){a.setFocus();
}},100);
if(f.rawEvent){$telerik.cancelRawEvent(f.rawEvent);
}return $telerik.cancelRawEvent(f);
}if(9==d){return;
}var b=this._getSelectedTool(f);
if(!Telerik.Web.UI.EditorButton.isInstanceOfType(b)){return;
}if(37==d||39==d){var g=b;
while(true){g=(37==d)?this._getPreviousTool(g):this._getNextTool(g);
if(null==g){break;
}if(g.get_enabled()){break;
}}if(g&&g.get_enabled()){g.setFocus();
}}if(13==d&&b&&!b.get_selectedItem){this._raiseEditorEvent(b,null);
return;
}if(!Telerik.Web.UI.EditorDropDown.isInstanceOfType(b)){return;
}if(38==d||40==d){var c=false;
if(!b.isExpanded()){b.show();
c=true;
}if(c||40==d){b.selectNextItem();
}else{b.selectPreviousItem();
}}else{if(13==d){b.hide();
if(b.get_activeIndex){b.set_selectedIndex(b.get_activeIndex());
}this._onDropDownValueSelected(b);
}else{if(27==d){b.hide();
}}}},_onToolBarClick:function(b){var a=this._getSelectedTool(b);
if(a){if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(a)){a.click(b);
}else{if(false){}else{this._raiseEditorEvent(a);
}}}$telerik.cancelRawEvent(b);
},_raiseEditorEvent:function(b,a){var c=this.get_events().getHandler("ToolClick");
if(c){var e=b.get_name?b.get_name():"";
var d=new Telerik.Web.UI.EditorCommandEventArgs(e,b,a);
c(b,d);
}},_getPreviousTool:function(a){var b=Array.indexOf(this._tools,a);
return this._tools[b-1];
},_getNextTool:function(a){var b=Array.indexOf(this._tools,a);
return this._tools[b+1];
},_getSelectedTool:function(c){var a=Telerik.Web.UI.EditorButton.getToolRootNode(c.target);
if(null==a){return;
}var b=a.control;
if(null==b){return;
}if(b.get_enabled&&b.get_enabled()==false){return;
}if(c&&b){c.preventDefault();
c.stopPropagation();
}return b;
},_getToolBarElements:function(){var b=this.get_element();
var a=b.getElementsByTagName("ul");
return a;
},get_tools:function(){return this._tools;
},get_toolbarHolder:function(){return this.get_window();
},get_editor:function(){return this._editor;
},set_editor:function(a){if(this._editor!=a){this._editor=a;
}},get_contentAreaMode:function(){return(this._contentAreaMode!="")?this._contentAreaMode:Telerik.Web.UI.EditorContentAreaMode.Iframe;
},set_contentAreaMode:function(a){if(this._contentAreaMode!=a){this._contentAreaMode=a;
}},get_toolJSON:function(){return this._toolJSON;
},set_toolJSON:function(a){this._toolJSON=a;
},add_toolClick:function(a){this.get_events().addHandler("ToolClick",a);
},remove_toolClick:function(a){this.get_events().removeHandler("ToolClick",a);
}};
Telerik.Web.UI.Editor.DefaultToolAdapter.registerClass("Telerik.Web.UI.Editor.DefaultToolAdapter",Sys.UI.Control);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
with(Telerik.Web.UI.Editor){Telerik.Web.UI.Editor.UpdateCommandsArray={InsertOrderedList:new BrowserCommand(null,null,"InsertOrderedList",null),InsertUnorderedList:new BrowserCommand(null,null,"InsertUnorderedList",null),Unlink:new BrowserCommand(null,null,"Unlink",null),Bold:new BrowserCommand(null,null,"Bold",null),Italic:new BrowserCommand(null,null,"Italic",null),Underline:new BrowserCommand(null,null,"Underline",null),FontName:new BrowserCommand(null,null,"FontName",null),FontSize:new BrowserCommand(null,null,"FontSize",null),Paste:new BrowserCommand(null,null,"Paste",null),Cut:new BrowserCommand(null,null,"Cut",null),Copy:new BrowserCommand(null,null,"Copy",null),JustifyLeft:new BrowserCommand(null,null,"JustifyLeft",null),JustifyRight:new BrowserCommand(null,null,"JustifyRight",null),JustifyCenter:new BrowserCommand(null,null,"JustifyCenter",null),JustifyNone:new BrowserCommand(null,null,"JustifyNone",null),JustifyFull:new BrowserCommand(null,null,"JustifyFull",null),Indent:new BrowserCommand(null,null,"Indent",null),Outdent:new BrowserCommand(null,null,"Outdent",null),Subscript:new BrowserCommand(null,null,"Subscript",null),Superscript:new BrowserCommand(null,null,"Superscript",null),StrikeThrough:new BrowserCommand(null,null,"StrikeThrough",null),AbsolutePosition:new BrowserCommand(null,null,"AbsolutePosition",null),FormatBlock:new FormatBlockCommand(null,null,null,null),InsertRowAbove:new TableInsertRow(null,null,"above",null),InsertRowBelow:new TableInsertRow(null,null,"below",null),InsertColumnLeft:new TableInsertColumn(null,null,"left",null),InsertColumnRight:new TableInsertColumn(null,null,"right",null),DeleteRow:new TableDeleteRow(null,null,null),DeleteColumn:new TableDeleteColumn(null,null,null),DeleteCell:new TableDeleteCell(null,null,null),MergeColumns:new TableMergeColumns(null,null,null),MergeRows:new TableMergeRows(null,null,null),SplitCell:new TableSplitCell(null,null,"vertical",null),SplitCellHorizontal:new TableSplitCell(null,null,"horizontal",null),ApplyClass:new ClassNameCommand(null,null,null)};
}Telerik.Web.UI.Editor.CommandList=new (function(){this.getCallbackFunction=function(b,a){return(b&&b._callbackFunction&&typeof(b._callbackFunction)=="function")?b._callbackFunction:a;
};
this.AjaxSpellCheck=function(g,a,c){function e(){if(!a.get_ajaxSpellCheck()){var i={editor:a};
var h=document.createElement("div");
var l=$create(Telerik.Web.UI.Editor.AjaxSpellCheck,i,null,null,h);
var k=l.get_element();
var j=$get(a.get_id()+"Top");
if(j){j.appendChild(k);
}a.set_ajaxSpellCheck(l);
}var m=a.get_ajaxSpellCheck();
if(c&&c.value){m.set_language(c.value);
}m.spellCheck();
}if(typeof(Telerik.Web.UI.Editor.AjaxSpellCheck)=="undefined"){function b(h,j){var i=h.get_responseData();
$telerik.evalScriptCode(i);
e();
}var f=a.get_ajaxSpellCheckScriptReference();
var d=new Sys.Net.WebRequest();
d.set_url(f);
d.set_httpVerb("GET");
d.add_completed(b);
d.invoke();
}else{e();
}return false;
};
this.ModuleManager=function(f,a,d){var c=d.value;
var e=a.get_modulesManager();
if(!e){return false;
}var b=e.getModuleByName(c);
if(b){b.toggleVisibility();
a._updateEditorSize(null,true);
}return false;
};
this.ToggleScreenMode=function(c,b,a){b.toggleScreenMode();
return false;
};
this.InsertRowAbove=this.InsertRowBelow=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableInsertRow(b.getLocalizedString(c),null,c=="InsertRowAbove"?"above":"below",b));
};
this.InsertColumnLeft=this.InsertColumnRight=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableInsertColumn(b.getLocalizedString(c),null,c=="InsertColumnLeft"?"left":"right",b));
};
this.DeleteRow=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableDeleteRow(b.getLocalizedString(c),null,b));
};
this.DeleteColumn=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableDeleteColumn(b.getLocalizedString(c),null,b));
};
this.DeleteCell=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableDeleteCell(b.getLocalizedString(c),null,b));
};
this.MergeColumns=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableMergeColumns(b.getLocalizedString(c),null,b));
};
this.MergeRows=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableMergeRows(b.getLocalizedString(c),null,b));
};
this.SplitCell=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(b.getLocalizedString(c),null,"vertical",b));
};
this.SplitCellHorizontal=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.TableSplitCell(b.getLocalizedString(c),null,"horizontal",b));
};
this.DeleteTable=function(d,c,a){var b=a.value;
if(!b){b=c.getSelectedElement();
}if(b&&"TABLE"!=b.tagName){b=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TABLE");
}if(b){c.selectElement(b);
c.executeBrowserCommand("Delete");
}};
this.InsertFormForm=this.InsertFormButton=this.InsertFormCheckbox=this.InsertFormHidden=this.InsertFormImageButton=this.InsertFormPassword=this.InsertFormRadio=this.InsertFormReset=this.InsertFormSelect=this.InsertFormSubmit=this.InsertFormTextarea=this.InsertFormText=function(e,d,c){var a=e.substring(10);
var b=new Telerik.Web.UI.EditorCommandEventArgs(e,c.get_tool(),a);
d.fire("InsertFormElement",b);
};
this.StripAll=this.StripCss=this.StripFont=this.StripSpan=this.StripWord=function(e,d,c){var a=e.substring(5);
var b=new Telerik.Web.UI.EditorCommandEventArgs(e,c.get_tool(),a.toUpperCase());
d.fire("FormatStripper",b);
};
this.FormatStripper=function(t,c,h){var l=h.value;
var n=c._filtersManager.getFilterByName("ConvertFontToSpanFilter");
if(c.get_mode()==Telerik.Web.UI.EditModes.Design&&l=="SPAN"&&n&&n.get_enabled()){l="FONT";
}var j="";
try{j=c.getSelectionHtml();
}catch(r){}var m=c.getSelection().getBrowserSelection();
var s=m.type?m.type.toLowerCase()=="none":m.isCollapsed;
var o=c.get_contentArea().innerHTML;
if(s||j==""||o==j){var b=Telerik.Web.UI.Editor.Utils.stripFormatting(o,l);
var i=new Telerik.Web.UI.Editor.GenericCommand(c.getLocalizedString(t)+" "+l,c.get_contentWindow(),c);
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(c.get_contentArea(),b);
c.executeCommand(i);
}else{if(j!=null){var b=Telerik.Web.UI.Editor.Utils.stripFormatting(j,l);
var f=true;
if($telerik.isSafari&&l=="ALL"){var g=c.getSelection().getParentElement();
var d=function(e){var p=false;
switch(e){case"I":case"B":case"U":case"SPAN":case"FONT":case"EM":case"STRONG":p=true;
break;
}return p;
};
if(g.innerHTML.trim()==j.trim()&&d(g.tagName)){var q=true;
while(q){var k=g.parentNode;
if(k.childNodes.length==1&&d(k.tagName)){g=k;
}else{q=false;
}}var k=g.parentNode;
var a=c.get_document().createTextNode(b);
k.insertBefore(a,g);
k.removeChild(g);
c.selectElement(a);
f=false;
}}if(f){c.pasteHtml(b,t);
}}}};
this.InsertTable=function(f,a,c){var d=c.value;
if(d){var b=Telerik.Web.UI.Editor.Utils.createTable(d.rows,d.cols);
var e=Telerik.Web.UI.Editor.Utils.getOuterHtml(b);
a.pasteHtml(e,f);
}};
this.InsertTab=function(e,d,a){var c=d.getSelectedElement();
var b=c.tagName;
if(b=="UL"||b=="OL"||b=="LI"||(c.parentNode&&c.parentNode.tagName=="LI")){d.fire("Indent");
}else{d.pasteHtml(" &nbsp;&nbsp;&nbsp;&nbsp;",e);
}return false;
};
this.SetToolFocus=function(d,c,a){var b=c.get_toolAdapter();
if(b){b.setFocus();
}return false;
};
this.Undo=this.Redo=function(d,c,b){var a=b?b.value:1;
if(!a){a=1;
}if(d=="Redo"){c.redo(a);
}else{c.undo(a);
}};
this.PastePlainText=function(e,d,c){var b=function(f){if(f){var g=f.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
g=Telerik.Web.UI.Editor.Utils.replaceNewLineWithBr(g);
if(g){d.pasteHtml(g,e);
}}};
if(d.isIE){b(window.clipboardData.getData("Text"));
}else{var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){b(g.get_content());
});
d.showDialog("CleanPasteTextContent",{},a);
return false;
}};
this.PasteFromWord=this.PasteFromWordNoFontsNoSizes=this.PasteAsHtml=function(g,a,f){var e=function(h,j){var i="";
var k=a.get_stripFormattingOptions();
if(g=="PasteFromWord"){if(k==Telerik.Web.UI.StripFormattingOptions.None||(k&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists)){h=Telerik.Web.UI.Editor.Utils.convertWordLists(h);
}i=Telerik.Web.UI.Editor.Utils.stripFormatting(h,"WORD");
}else{if(g=="PasteFromWordNoFontsNoSizes"){if(k==Telerik.Web.UI.StripFormattingOptions.None||(k&Telerik.Web.UI.StripFormattingOptions.ConvertWordLists)){h=Telerik.Web.UI.Editor.Utils.convertWordLists(h);
}i=Telerik.Web.UI.Editor.Utils.stripFormatting(h,"WORD_ALL");
}else{i=Telerik.Web.UI.Editor.Utils.convertText2Html(h);
}}if(j){j.select();
}if(i){a.pasteHtml(i,g);
}};
if(a.isIE){var d=a.createRestorePoint();
d.useOldRange=true;
var b=Telerik.Web.UI.Editor.Utils.getClipboardAsHtml();
e(b,d);
}else{var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(h,i){e(i.get_content());
});
a.showDialog("CleanPasteHtmlContent",{dialogTitle:a.getLocalizedString(g)},c);
}};
this.PasteHtml=function(d,c,b){var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(b,function(f,e){var g=e.get_content();
g=c.applyFiltersForEmbedContent(g);
c.pasteHtml(g);
});
c.showDialog("PasteHtml",{dialogTitle:c.getLocalizedString(d),commandName:"PasteHtml"},a);
};
this.Copy=function(f,d,b){if(null!=b){var a=(window.opera||(d.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div&&!$telerik.isIE))?false:true;
if(a){try{document.queryCommandEnabled(f);
}catch(c){a=false;
}}if(a){d.get_document().execCommand(f,false,null);
}else{alert(d.getLocalizedString("UseCtrlC"));
}}};
this.Cut=this.Paste=function(i,a,d){if(null!=d){var f=(window.opera||(a.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div&&!$telerik.isIE))?false:true;
if(f){try{if(!a.isIE7){document.queryCommandEnabled(i);
}}catch(g){f=false;
}}if(i=="Paste"&&f&&a.isIE7){a.get_contentArea().fireEvent("onbeforepaste");
}if(f){var c=new Telerik.Web.UI.Editor.GenericCommand(a.getLocalizedString(i),a.get_contentWindow(),a);
var h=a.get_document().execCommand(i,false,null);
if(h!=false){a.executeCommand(c);
}else{f=false;
}}if(!f){var b=(i=="Cut"?"UseCtrlX":"UseCtrlV");
alert(a.getLocalizedString(b));
}}else{a._pendingCutPasteCommand=new Telerik.Web.UI.Editor.GenericCommand(a.getLocalizedString(i),a.get_contentWindow(),a);
}};
this.InsertParagraph=function(c,b,a){b.executeBrowserCommand(c,true,"");
return true;
};
this.FormatBlock=function(c,b,a){b.executeCommand(new Telerik.Web.UI.Editor.FormatBlockCommand(b.getLocalizedString(c),b.get_contentWindow(),a.value,b));
};
this.InsertOrderedList=this.InsertUnorderedList=function(c,b,a){b.setFocus();
b.executeCommand(new Telerik.Web.UI.Editor.InsertListCommand(b.getLocalizedString(c),b.get_contentWindow(),b.get_newLineBr(),c,null,b));
};
this.Bold=this.Italic=this.Underline=this.JustifyLeft=this.JustifyRight=this.JustifyCenter=this.JustifyNone=this.Indent=this.Outdent=this.SelectAll=this.Unlink=this.JustifyFull=this.StrikeThrough=this.Subscript=this.Superscript=this.AbsolutePosition=function(e,d,a){d.setActive();
var b="SelectAll"!=e;
if(e=="Unlink"&&!d.isIE){var c=d.getSelectedElement();
if(c&&c.tagName=="A"){d.selectElement(c,false);
}}d.executeBrowserCommand(e,b,null,null);
return true;
};
this.ForeColor=this.BackColor=this.FontName=this.FontSize=function(d,c,b){var a=b.value;
c.executeBrowserCommand(d,true,a);
};
this.Zoom=function(f,b,d){var a=d.value;
var e=d.get_tool?d.get_tool():null;
if(a&&e&&e.updateValue){e.updateValue(a);
}b.get_contentArea().style.zoom=a;
if(($telerik.isFirefox||$telerik.isOpera)&&a.indexOf("%")!=-1){a=parseInt(a,10)/100;
}if($telerik.isFirefox){b.get_contentArea().style.MozTransform=a==1?"":"translate("+(b.get_contentArea().offsetWidth*((a-1)/2))+"px, "+(b.get_contentArea().offsetHeight*((a-1)/2))+"px) scale("+a+")";
}if($telerik.isOpera){var c=a==1?"":"translate("+(b.get_contentArea().offsetWidth*((a-1)/2.04))+"px, "+(b.get_contentArea().offsetHeight*((a-1)))+"px) scale("+a+")";
b.get_contentArea().style.OTransform=c;
}return false;
};
this.Print=function(c,b,a){if(b.isIE){b.get_document().execCommand(c,false,null);
}else{if(b.get_contentWindow().print){b.get_contentWindow().print();
}}return false;
};
this.InsertSnippet=function(c,b,a){b.pasteHtml(a.value,c);
};
this.InsertFormElement=function(h,b,g){var a=g.value;
a=a.toLowerCase();
var c=null;
switch(a){case"form":if(b.get_contentAreaMode()==Telerik.Web.UI.EditorContentAreaMode.Div){alert("Error! Form elements are only supported when the content area is set to Iframe!");
g.set_cancel(true);
return false;
}else{c=b.createElement("form","150px","150px");
c.innerHTML="&nbsp;";
}break;
case"textarea":c=b.createElement("textarea");
break;
case"select":c=b.createElement("select","100px","22px");
break;
case"checkbox":case"radio":c=b.createElement("input");
c.setAttribute("type",a);
break;
case"button":case"reset":case"submit":c=b.createElement("input","50px","22px");
c.setAttribute("type",a);
break;
case"hidden":case"password":case"text":c=b.createElement("input","100px","22px");
c.setAttribute("type",a);
break;
}if(c){var f=Telerik.Web.UI.Editor.Utils.getUniqueID();
c.setAttribute("id",f);
var e=Telerik.Web.UI.Editor.Utils.getOuterHtml(c);
b.pasteHtml(e,h);
var d=b.get_document().getElementById(f);
if(d){d.removeAttribute("id");
if(d.setActive){d.setActive();
}return false;
}}};
this.InsertGroupbox=this.InsertDate=this.InsertTime=this.InsertSymbol=this.InsertHorizontalRule=function(f,b,d){var a="";
switch(f){case"InsertSymbol":a=d.value;
break;
case"InsertHorizontalRule":a="<hr>";
break;
case"InsertDate":var e=new Date();
a="&nbsp;"+e.toLocaleDateString();
break;
case"InsertTime":var c=new Date();
a="&nbsp;"+c.toLocaleTimeString();
break;
default:a="<fieldset style='WIDTH: 200px; HEIGHT: 76px'> <legend>Title</legend>Content... </fieldset> ";
}b.pasteHtml(a,f);
};
this.ImageManager=function(h,a,f){var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(k,j){var i=j.get_value();
a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(i),h);
});
var c=a.get_dialogOpener().get_additionalQueryString();
var d=a.getSelectedElement();
if(d&&d.tagName=="IMG"){var g=d.getAttribute("src",2);
a.get_dialogOpener().set_additionalQueryString(c+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(g));
}else{d=null;
}var e=new Telerik.Web.UI.EditorCommandEventArgs(h,null,d);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(e,"IMG",a,h);
a.showDialog("ImageManager",e,b);
a.get_dialogOpener().set_additionalQueryString(c);
return false;
};
this.SilverlightManager=this.FlashManager=this.MediaManager=function(h,a,f){var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(f,function(j,i){var k=i.get_value();
if(!k){k=i.Result;
}k=a.applyFiltersForEmbedContent(k);
a.pasteHtml(k,h);
});
var e={};
var d=a.get_dialogOpener().get_additionalQueryString();
var b=a.getSelectedElement();
if(b){if($telerik.isIE&&b.object){var g="MediaManager"==h?b.object.FileName:b.object.Movie;
if(g){a.get_dialogOpener().set_additionalQueryString(d+"&rndnum="+(new Date()-100)+"&PreselectedItemUrl="+encodeURIComponent(g));
e.selectedItemUrl=g;
e.selectedObject=b;
}}}a.showDialog(h,e,c);
a.get_dialogOpener().set_additionalQueryString(d);
return false;
};
this.TemplateManager=function(d,c,b){var a=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(b,function(f,e){var g=e.get_value();
if(!g){g=e.Result;
}c.pasteHtml(g,d);
});
c.showDialog("TemplateManager",{},a);
return false;
};
this.AboutDialog=function(c,b,a){b.showDialog("AboutDialog");
return false;
};
this.Help=function(c,b,a){b.showDialog("Help");
return false;
};
this.PageProperties=function(e,d,c){var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){});
var a={};
Telerik.Web.UI.Editor.CommandList._getDialogArguments(a,"BODY",d,e);
d.showDialog("PageProperties",a,b);
return false;
};
this.ImageMapDialog=function(e,d,c){var a=Telerik.Web.UI.Editor.CommandList._getImageMapDialogArgument(d);
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){Telerik.Web.UI.Editor.CommandList._setImageMapProperties(d,g,e);
return false;
});
d.showDialog("ImageMapDialog",a,b);
return false;
};
this._setImageMapProperties=function(a,d,o){if(!d){return;
}var i=a.getSelectedElement();
var h;
if(i&&i.tagName=="IMG"){h=i;
if(d.ImageSrc!=h.src){h.src=d.ImageSrc;
}}else{if(!d.ImageSrc){return;
}a.pasteHtml('<img src="'+d.ImageSrc+'" id = "__tmp__">',o);
h=a.get_document().getElementById("__tmp__");
h.removeAttribute("id");
if(document.all){var c=a.get_document().body.createTextRange();
c.collapse();
c.moveToElementText(h);
c.select();
}}var j=document.createElement("span");
j.innerHTML=d.MapHtml;
var n=j.getElementsByTagName("map");
if(n.length==0){return;
}var k=n[0].innerHTML;
j=null;
if(!k){var f=h.getAttribute("useMap",2);
if(f){var e=Telerik.Web.UI.Editor.CommandList._getImageMapByName(a,f);
if(e){e.parentNode.removeChild(e);
}}h.removeAttribute("useMap");
return;
}var m=null;
var g=h.getAttribute("useMap",2);
if(g){m=Telerik.Web.UI.Editor.CommandList._getImageMapByName(a,g);
}if(m==null){var b=new Date()-100;
var l="rade_img_map_"+b;
m=a.get_document().createElement("map");
m.id=l;
this._setNameAttribute(m,l);
m=a.get_contentArea().appendChild(m);
h.setAttribute("useMap","#"+l);
h.setAttribute("border","0");
}m.innerHTML=k;
};
this._setNameAttribute=function(a,b){a.removeAttribute("name");
a.removeAttribute("NAME");
a.name=null;
a.name=b;
a.NAME=b;
};
this._getImageMapDialogArgument=function(b){var f={};
f.editor=b;
var d=b.getSelectedElement();
if(d&&d.tagName=="IMG"){f.ImageSrc=d.getAttribute("src",2);
f.ImageWidth=(d.style.width)?d.style.width:d.width;
f.ImageHeight=(d.style.height)?d.style.height:d.height;
if($telerik.isIE){var e=b.get_document().body.createTextRange();
e.collapse();
e.moveToElementText(d);
e.select();
}if(d.useMap){var a=d.getAttribute("useMap",2);
var c=Telerik.Web.UI.Editor.CommandList._getImageMapByName(b,a);
if(c!=null){f.ImageMapHTML='<map name = "'+a.substr(1)+'">'+c.innerHTML+"</map>";
}else{f.ImageMapHTML="";
}d.style.width=f.ImageWidth;
d.style.height=f.ImageHeight;
}}return f;
};
this._getImageMapByName=function(b,a){a=a.substr(1);
var e=b.get_document();
var d=e.getElementById(a);
if(d!=null){return d;
}var f=e.getElementsByTagName("map");
for(var c=0;
c<f.length;
c++){if(f[c].getAttribute("name")==a){return f[c];
}}return null;
};
this.get_ImportStyleSheetHTML=function(e,d,b){var a="";
if(b){var c=d.get_document().getElementById(b.id);
if(!c){a=Telerik.Web.UI.Editor.Utils.getOuterHtml(b);
}}return a;
};
this._removeStyleSheet=function(a,k){if(k){var g=a.get_document();
var c=true;
var f=g.getElementsByTagName("Table");
var d=f.length;
var j=k.id;
if(j){for(var b=0;
b<d;
b++){var h=f[b];
if(h.className==j){c=false;
break;
}}if(c){var e=g.getElementById(j);
if(e){e.parentNode.removeChild(e);
}}}}};
this.TableWizard=function(e,d,c){var a=Telerik.Web.UI.Editor.CommandList._getTableArgument(d,null,true,false);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(a,"TABLE",d,e);
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(h,g){var f="";
if(g.styleSheetToImport){f=Telerik.Web.UI.Editor.CommandList.get_ImportStyleSheetHTML(e,d,g.styleSheetToImport);
}d.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(g.tableToModify)+f,e);
if(g.styleSheetToRemove){Telerik.Web.UI.Editor.CommandList._removeStyleSheet(d,g.styleSheetToRemove);
}});
d.showDialog("TableWizard",a,b);
return false;
};
this.InsertTableLight=this.SetTableProperties=function(f,a,e){var c=Telerik.Web.UI.Editor.CommandList._getTableArgument(a,1,false,true);
if(f=="SetTableProperties"&&!c){alert(a.getLocalizedString("tablewarning"));
return false;
}var d=Telerik.Web.UI.Editor.CommandList._getParentTable(a);
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){a.selectElement(d);
var g="";
if(h.styleSheetToImport){g=Telerik.Web.UI.Editor.CommandList.get_ImportStyleSheetHTML(f,a,h.styleSheetToImport);
}a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(h.tableToModify)+g,f);
if(h.styleSheetToRemove){Telerik.Web.UI.Editor.CommandList._removeStyleSheet(a,h.styleSheetToRemove);
}});
if(a.get_document().selection&&a.get_document().selection.empty&&f!="InsertTableLight"){a.get_document().selection.empty();
}if(f=="SetTableProperties"){Telerik.Web.UI.Editor.CommandList._getDialogArguments(c,"TABLE",a,f);
a.showDialog("TableWizard",c,b);
}else{if(!c){c=new Telerik.Web.UI.EditorCommandEventArgs("InsertTableLight",null,null);
}c._name=c._commandName="InsertTableLight";
c.editor=a;
a.showDialog("InsertTableLight",c,b);
}return false;
};
this.SetCellProperties=function(g,a,e){var c=Telerik.Web.UI.Editor.CommandList._getTableArgument(a,2,false,true);
var f=$telerik.isFirefox&&a.get_contentWindow().getSelection().rangeCount>1;
if(!c||f){alert(a.getLocalizedString("cellwarning"));
return false;
}Telerik.Web.UI.Editor.CommandList._getDialogArguments(c,"TABLE",a,g);
var d=Telerik.Web.UI.Editor.CommandList._getParentTable(a);
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(j,i){a.selectElement(d);
var h="";
if(i.styleSheetToImport){h=Telerik.Web.UI.Editor.CommandList.get_ImportStyleSheetHTML(g,a,i.styleSheetToImport);
}a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(i.tableToModify)+h,g);
if(i.styleSheetToRemove){Telerik.Web.UI.Editor.CommandList._removeStyleSheet(a,i.styleSheetToRemove);
}});
a.showDialog("TableWizard",c,b);
return false;
};
this.FindAndReplace=function(e,d,c){var a={};
a.editor=d;
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){});
d.showDialog("FindAndReplace",a,b);
return false;
};
this.StyleBuilder=function(j,a,i){var b=null;
var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(i,function(m,p){var l=Telerik.Web.UI.Editor.Utils.getOuterHtml(p.get_value());
if(b){var n="";
var k=new RegExp("style=(\"|')(.+?)\\1","gi");
l.replace(k,function(s,r,q){n=q;
});
if(n){var o=new Telerik.Web.UI.Editor.AttributeCommand(j+"set Style Attribute",a.get_contentWindow(),b,"style",n,a);
a.executeCommand(o);
}}else{a.pasteHtml(l,j);
}});
var h=a.getSelection();
var e=h.getParentElement();
if(!$telerik.isIE||!h.isControl()){var g=h.getText();
if(g||e.tagName=="BODY"){var f=a.createElement("span");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(f,g);
e=f;
}else{b=e;
a.selectElement(e,false);
}}var d=new Telerik.Web.UI.EditorCommandEventArgs("StyleBuilder",null,e.cloneNode(true));
Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"*",a,j);
d.fontNames=a.get_fontNames();
a.showDialog("StyleBuilder",d,c);
return false;
};
this.XhtmlValidator=function(e,d,c){var a=d;
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){});
d.showDialog("XhtmlValidator",a,b);
return false;
};
this.TrackChangesDialog=function(e,d,c){var a=d;
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(c,function(f,g){});
d.showDialog("TrackChangesDialog",a,b);
};
this.InsertCustomLink=function(g,a,d){var c=d.value;
var e=String.format("<a href='{1}' title='{3}' target='{2}'>{0}</a>",c.innerHTML,c.href,c.target,c.title);
var f=Telerik.Web.UI.Editor.CommandList._getParentLink(a);
if(f){var b=f.cloneNode(true);
if(c.href){b.setAttribute("href",c.href);
}if(c.target){b.setAttribute("target",c.target);
}if(c.title){b.setAttribute("title",c.title);
}if(!b.innerHTML){b.innerHTML=c.innerHTML;
}e=Telerik.Web.UI.Editor.Utils.getOuterHtml(b);
}a.pasteHtml(e,g);
};
this._getDialogArguments=function(c,b,a,d){if(!a){c.Colors=[];
c.CssClasses=[];
c.CellCssClasses=[];
c.tableLayoutCssFile="";
c.editor=null;
return;
}c.Colors=a.get_colors();
if("TD"==b||"TH"==b||"TABLE"==b){c.CssClasses=a.getCssArray("TABLE");
c.CellCssClasses=a.getCssArray("TD");
c.tableLayoutCssFile=a.get_tableLayoutCssFile();
}else{if("A"==b||"BODY"==b||"IMG"==b){c.CssClasses=a.getCssArray(b);
}}c.editor=a;
};
this.DocumentManager=this.SetLinkProperties=this.LinkManager=function(f,b,e){var a=f=="DocumentManager"?"DocumentManager":"LinkManager";
var d=Telerik.Web.UI.Editor.CommandList._getLinkArgument(b);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"A",b,f);
var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value();
if(!g){g=h.Result;
}if(!g){g=h.realLink;
}b.pasteHyperLink(g,f);
});
b.showDialog(a,d,c);
return false;
};
this.InsertLink=function(f,b,e){var a="InsertLink";
var d=Telerik.Web.UI.Editor.CommandList._getLinkArgument(b);
d._name=d._commandName="InsertLink";
Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"A",b,f);
var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value();
b.pasteHyperLink(g,f);
});
b.showDialog(a,d,c);
return false;
};
this.InsertImage=this.SetImageProperties=function(f,a,e){var c=a.getSelectedElement();
if(c.nodeName.toLowerCase()!="img"){c=null;
}var d=new Telerik.Web.UI.EditorCommandEventArgs(f,null,c);
Telerik.Web.UI.Editor.CommandList._getDialogArguments(d,"IMG",a,f);
d.Element=c;
var b=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(i,h){var g=h.get_value?h.get_value():h.Result;
if(!g){return;
}if(c&&c.parentNode){c.parentNode.replaceChild(g,c);
}else{a.pasteHtml(Telerik.Web.UI.Editor.Utils.getOuterHtml(g),f);
}});
if(f=="SetImageProperties"){a.showDialog("ImageProperties",d,b);
}else{a.showDialog("InsertImage",d,b);
}return false;
};
this.FormatCodeBlock=function(f,b,e){var d=new Telerik.Web.UI.EditorCommandEventArgs("FormatCodeBlock",null,b.getSelectionHtml());
d.dirtyCode=b.getSelectionHtml();
if(b.get_document().selection&&b.get_document().selection){var a=b.get_document().selection.type.toLowerCase();
if(a=="control"||a=="none"){d.set_value("");
}}var c=Telerik.Web.UI.Editor.CommandList.getCallbackFunction(e,function(g,h){b.pasteHtml(h.get_value?h.get_value():h.get_code(),f);
});
b.showDialog("FormatCodeBlock",d,c);
return false;
};
this._getDocumentAnchors=function(a){var b=a.getElementsByTagName("A");
var c=new Array();
for(var d=0;
d<b.length;
d++){if(b[d].name){c[c.length]=b[d];
}}return c;
};
this._getParentLink=function(a){var i=a.getSelectedElement();
var h=Telerik.Web.UI.Editor.Utils.getElementParentByTag(i,"A");
if(h){a.selectElement(h);
}else{var d="";
var b=(i&&i.tagName)?i.tagName:"";
if(b=="IMG"){d=Telerik.Web.UI.Editor.Utils.getOuterHtml(i);
}else{if($telerik.isIE&&a.getSelectionHtml()){if(b=="BODY"||b=="TD"||b=="TABLE"||b=="P"||b=="LI"||b=="UL"||b=="OL"){var c=a.getSelection().getRange();
if(c.collapse){c.collapse(false);
var f=c.parentElement();
if($telerik.isDescendant(i,f)){d=f.innerHTML;
c.moveToElementText(f);
c.select();
}}}}}if(!d){d=a.getSelectionHtml();
}h=a.get_document().createElement("a");
try{Telerik.Web.UI.Editor.Utils.setElementInnerHtml(h,d);
}catch(g){h.innerHTML=Telerik.Web.UI.Editor.Utils.stripFormatting(d,"ALL");
}}return h;
};
this._getLinkArgument=function(a,b){var f=Telerik.Web.UI.Editor.CommandList._getParentLink(a);
var c=f.innerHTML;
var e=!c?false:c.match(/</);
if($telerik.isIE&&e){if(c.trim().toLowerCase()=="<p>&nbsp;</p>"){f.innerHTML=" ";
e=false;
}}var d=new Telerik.Web.UI.EditorCommandEventArgs("LinkManager",null,f.cloneNode(true));
d.selectedTabIndex=b?b:0;
d.showText=!e;
d.documentAnchors=Telerik.Web.UI.Editor.CommandList._getDocumentAnchors(a.get_document());
d.realLink=d.get_value();
return d;
};
this._getParentTable=function(c){c.setFocus();
var b=c.getSelectedElement();
var a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TABLE");
return a;
};
this._getParentCell=function(c){c.setFocus();
var b=c.getSelectedElement();
var a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TD");
if(!a){a=Telerik.Web.UI.Editor.Utils.getElementParentByTag(b,"TH");
}return a;
};
this._getTableArgument=function(b,c,f,a){var g;
var d=null;
if(f){g=Telerik.Web.UI.Editor.Utils.createTable(2,2,b.get_document());
}else{g=Telerik.Web.UI.Editor.CommandList._getParentTable(b);
}if(!f&&!g){return null;
}if(a){d=Telerik.Web.UI.Editor.CommandList._getParentCell(b);
}var h=g.cloneNode(true);
var e=g;
return{selectedTabIndex:c?c:0,cellToModify:d,tableToModify:h,originalTable:e,tableDocument:(h.document)?h.document:b.get_document()};
};
this.EnterParagraphMozilla=function(m,b,d){var c=b.getSelectedElement();
if(c.tagName=="A"||"LI"==c.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(c,"LI")!=null){b.bubbleKeyEventToBrowser();
return false;
}function g(p){if(!p){return null;
}var n=p;
var o=n.tagName;
while(o!="TD"&&o!="BODY"){o=n.tagName;
if(!o){o="";
}if(o=="P"||(o.charAt(0)=="H"&&!isNaN(parseInt(o.charAt(1))))||o=="ADDRESS"||o=="PRE"){return n;
}n=n.parentNode;
if(!n){return null;
}}}var j=g(c);
if(j&&j.tagName!="P"){b.bubbleKeyEventToBrowser();
return false;
}if(!j){b.get_document().execCommand("InsertParagraph",null,false);
j=g(b.getSelectedElement());
}var f=new Telerik.Web.UI.Editor.GenericCommand("Enter",b.get_contentWindow(),b);
var h=b.getSelection().getRange();
h.deleteContents();
var a=h.startOffset;
var i=h.startContainer;
var e=h.cloneRange();
e.setStart(j,0);
e.setEnd(i,a);
var k=e.extractContents();
var l=j.cloneNode(false);
l.appendChild(k);
j.parentNode.insertBefore(l,j);
if(!Telerik.Web.UI.Editor.Utils.getTextContent(l)){l.innerHTML="&nbsp;";
}b.executeCommand(f);
return false;
};
this.Enter=function(i,a,g){var f=a.getSelectedElement();
if("LI"==f.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(f,"LI")!=null){a.bubbleKeyEventToBrowser();
return false;
}try{var c=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",a.get_contentWindow(),a);
var h=a.get_document().selection.createRange();
if(h.pasteHTML){var e=f.tagName;
if(e.charAt(0)=="H"&&parseInt(e.charAt(1))>0){var b=h.duplicate();
b.moveToElementText(f);
a.bubbleKeyEventToBrowser();
return false;
}else{if(e.toLowerCase()=="textarea"){a.bubbleKeyEventToBrowser();
return false;
}}h.pasteHTML("<br>");
h.select();
h.moveEnd("character",1);
h.moveStart("character",1);
h.collapse(false);
}else{if(h(0)){h.execCommand("Delete");
}}a.executeCommand(c);
}catch(d){alert(d.message);
}return false;
};
this.ShiftEnter=function(f,a,d){var c=a.getSelectedElement();
if("LI"==c.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(c,"LI")!=null){var b=new Telerik.Web.UI.Editor.GenericCommand("Enter Pressed",a.get_contentWindow(),a);
var e=a.get_document().selection.createRange();
e.pasteHTML("<br>");
e.select();
e.moveEnd("character",1);
e.moveStart("character",1);
e.collapse(false);
a.executeCommand(b);
return false;
}a.bubbleKeyEventToBrowser();
return false;
};
this.EnterSafari=function(d,c,b){var a=c.getSelectedElement();
if("LI"==a.tagName||Telerik.Web.UI.Editor.Utils.getElementParentByTag(a,"LI")!=null){c.bubbleKeyEventToBrowser();
return false;
}c.executeBrowserCommand("InsertLineBreak",true,"");
return false;
};
this.ToggleTableBorder=function(c,b,a){b.toggleEnhancedEdit();
return false;
};
this.ConvertToUpper=this.ConvertToLower=function(q,g,f){var o;
var j;
if($telerik.isIE){if(g.get_document().selection.type.toLowerCase()=="control"){return;
}var e=g.get_document().selection.createRange();
o=e.duplicate();
j=e.duplicate();
o.collapse();
j.collapse(false);
}var c=Telerik.Web.UI.Editor.CommandList._markEditorSelection(g);
var n=c.markedElements;
var p=c.newElements;
var a=new Telerik.Web.UI.Editor.GenericCommand(g.getLocalizedString(q),g.get_contentWindow(),g);
for(var k=0;
k<n.length;
k++){b(n[k]);
}for(var k=0;
k<p.length;
k++){if($telerik.isIE){p[k].removeNode(false);
}else{var l=document.createRange();
l.selectNodeContents(p[k]);
p[k].parentNode.replaceChild(l.extractContents(),p[k]);
}}if($telerik.isIE){var d=g.get_document().selection.createRange();
d.setEndPoint("StartToStart",o);
d.setEndPoint("EndToEnd",j);
d.select();
}else{var h=g.get_contentWindow().getSelection();
var m=h.getRangeAt(0);
m.collapse(true);
}g.executeCommand(a);
function b(t){var s=t.childNodes;
for(var r=0;
r<s.length;
r++){if(s[r].nodeType==3){s[r].nodeValue=("ConvertToLower"==q)?s[r].nodeValue.toLowerCase():s[r].nodeValue.toUpperCase();
}else{if(s[r].nodeType==1&&s[r].tagName.toUpperCase()!="FONT"){b(s[r]);
}}}}};
this.ApplyClass=function(n,e,d){var m=true;
var f=d.get_value();
var j=e.get_contentWindow();
var h=e.get_document();
var a=new Telerik.Web.UI.Editor.GenericCommand(e.getLocalizedString(n)+' ["'+f+'"]',e.get_contentWindow(),e);
var l=Telerik.Web.UI.Editor.Utils.getFullySelectedElement(j);
if(l){Telerik.Web.UI.Editor.Utils.setElementClassName(l,f);
m=false;
}else{if(!f){h.execCommand("RemoveFormat",false,null);
m=false;
}}if(m){var b=Telerik.Web.UI.Editor.CommandList._markEditorSelection(e);
var k=b.markedElements;
if(k.length>0){for(var g=0;
g<k.length;
g++){var c=k[g];
if(c.className&&c.className!="Apple-style-span"){continue;
}else{c.className=f;
}}if(!$telerik.isIE){Telerik.Web.UI.Editor.Utils.addElementsToSelection(e.get_contentWindow(),k);
}}else{Telerik.Web.UI.Editor.CommandList._completeEditorSelection(e,"class='"+f+"'");
}}e.executeCommand(a);
},this.RealFontSize=function(h,b,f){var a=f.get_value();
var d=new Telerik.Web.UI.Editor.GenericCommand(b.getLocalizedString(h)+' ["'+a+'"]',b.get_contentWindow(),b);
var g=Telerik.Web.UI.Editor.CommandList._markEditorSelection(b);
var e=g.markedElements;
if(e.length>0){for(var c=0;
c<e.length;
c++){e[c].style.fontSize=a;
e[c].removeAttribute("size");
}if(!$telerik.isIE){Telerik.Web.UI.Editor.Utils.addElementsToSelection(b.get_contentWindow(),e);
}}else{Telerik.Web.UI.Editor.CommandList._completeEditorSelection(b,"style='font-size:"+a+"'");
}b.executeCommand(d);
},this._completeEditorSelection=function(a,e){if(!e){e="";
}var i=a.get_contentWindow();
var d=a.get_document();
var g=a.getSelection().getParentElement().tagName;
if($telerik.isIE&&!a.getSelectionHtml()&&(g=="FONT"||g=="SPAN")){d.execCommand("RemoveFormat",null,false);
}var f=a.getSelection();
f.pasteHtml("<font "+e+" id='radERealFont'>&nbsp;</font>");
var c=a.get_document().getElementById("radERealFont");
c.removeAttribute("id");
if($telerik.isIE){a.selectElement(c);
a.getSelection().collapse();
c.innerHTML="";
}else{if(i.getSelection){var h=i.getSelection();
var b=a.getSelection().getRange();
h.removeAllRanges();
c.innerHTML="";
if(b&&b.selectNodeContents){b.selectNodeContents(c);
}h.addRange(b);
}}},this._markEditorSelection=function(c){if(c.get_html()==""){return{markedElements:[],newElements:[],oldElements:[]};
}var a="AZBY";
var b="_cm";
var v=[];
var p=[];
var e=[];
var h=[];
var g=$telerik.isSafari2||$telerik.isSafari3;
var m=g?"span":"font";
var d=c.get_contentArea();
if(g){var n=new Telerik.Web.UI.Editor.OptimizeSpans();
n.getHtmlContent(d);
}var t=c.getSelection();
if(t.isControl()){var s=t.getParentElement();
var r=c.get_document().createElement(m);
r.appendChild(s.cloneNode(true));
s.parentNode.replaceChild(r,s);
return{markedElements:[r],newElements:[r]};
}q();
if(!$telerik.isIE){d.ownerDocument.execCommand("UseCSS",false,true);
d.ownerDocument.execCommand("styleWithCSS",false,false);
}d.ownerDocument.execCommand("FontName",false,a);
var u=d.getElementsByTagName(m);
for(var o=0;
o<u.length;
o++){var r=u[o];
if(r.getAttribute("face")==a||r.style.fontFamily==a){r.removeAttribute("face");
if(r.style.fontFamily==a){r.style.fontFamily="";
if(r.className=="Apple-style-span"){r.className="";
}}p.push(r);
var w=r.getElementsByTagName(m);
for(var k=0;
k<w.length;
k++){var l=w[k];
if(l.getAttribute("face")!=a){p.push(l);
}}if(!r.getAttribute(b)){e.push(r);
}else{h.push(r);
}}r.removeAttribute(b);
}f();
if(!$telerik.isIE){d.ownerDocument.execCommand("UseCSS",false,false);
d.ownerDocument.execCommand("styleWithCSS",false,true);
}function q(){var x=c.get_contentArea().getElementsByTagName(m);
for(var j=0;
j<x.length;
j++){var y=x[j];
if(x[j].face){y.setAttribute("_face",y.face);
v.push(y);
}else{if(g){y.setAttribute("_face",y.style.fontFamily);
v.push(y);
}}y.setAttribute(b,1);
}}function f(){for(var j=0;
j<v.length;
j++){if(g){v[j].style.fontFamily=v[j].getAttribute("_face");
}else{v[j].face=v[j].getAttribute("_face");
}v[j].removeAttribute("_face");
}v=[];
}return{markedElements:p,newElements:e,oldElements:h};
};
})();
if(typeof(RadEditorCommandList)=="undefined"){var RadEditorCommandList=Telerik.Web.UI.Editor.CommandList;
}Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.CommandsManager=function(a){this._commands=[];
this._currentCommandIndex=-1;
};
Telerik.Web.UI.Editor.CommandsManager.prototype={get_commands:function(){return this._commands;
},execute:function(a,c){if(a&&a.execute){var b=a.execute();
if(false==c){return false;
}if(b&&a._canUnexecute){this._clearCommandsToRedo();
Array.add(this._commands,a);
this._currentCommandIndex=this._commands.length-1;
return true;
}}return false;
},undo:function(b){if(b>this._commands.length){b=this._commands.length;
}var c=0;
var a=null;
while(0<b--&&0<=this._currentCommandIndex&&this._currentCommandIndex<this._commands.length){a=this._commands[this._currentCommandIndex--];
if(a){a.unexecute();
c++;
}}},redo:function(b){if(b>this._commands.length){b=this._commands.length;
}var c=0;
var a=null;
var d=this._currentCommandIndex+1;
while(0<b--&&0<=d&&d<this._commands.length){a=this._commands[d];
if(a){a.execute();
this._currentCommandIndex=d;
c++;
}d++;
}},removeCommandAt:function(a){this._commands.splice(a,1);
if(this._currentCommandIndex>=a){this._currentCommandIndex--;
}},isUndoAvailable:function(){return(-1<this._currentCommandIndex);
},isRedoAvailable:function(){return(this._currentCommandIndex<this._commands.length-1);
},getCommandsToUndo:function(){if(this.isUndoAvailable()){return(this._commands.slice(0,this._currentCommandIndex+1)).reverse();
}else{return[];
}},getCommandsToRedo:function(){if(this.isRedoAvailable()){return this._commands.slice(this._currentCommandIndex+1);
}else{return[];
}},canRepeatLastCommand:function(){return((this._currentCommandIndex==this._commands.length-1)&&null!=this._commands[this._currentCommandIndex]&&("function"==typeof(this._commands[this._currentCommandIndex].clone)));
},repeatLastCommand:function(){if(this.canRepeatLastCommand()){var a=this._commands[this._currentCommandIndex].clone();
this.execute(a);
}},_clearCommandsToRedo:function(){if(this.isRedoAvailable()){this._commands.splice(this._currentCommandIndex+1,this._commands.length-this._currentCommandIndex);
}}};
Telerik.Web.UI.Editor.CommandsManager.registerClass("Telerik.Web.UI.Editor.CommandsManager",null);
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
b.registerEnum(a.Editor,"CommandStates",{Disabled:-1,Off:0,On:1});
b.registerEnum(a,"EditingOptions",{Typing:1,Tools:2,ContextMenus:4,Tab:8,Modules:16,EditModes:32,All:63});
b.registerEnum(a,"StripFormattingOptions",{None:0,NoneSupressCleanMessage:1,MSWord:2,MSWordNoFonts:4,MSWordRemoveAll:8,Css:16,Font:32,Span:64,AllExceptNewLines:128,ConvertWordLists:256,All:512});
b.registerEnum(a,"EditorToolbarMode",{Default:1,Floating:2,PageTop:4,ShowOnFocus:8});
b.registerEnum(a,"EditorFilters",{None:0,RemoveScripts:1,MakeUrlsAbsolute:2,FixUlBoldItalic:4,FixEnclosingP:8,IECleanAnchors:16,MozEmStrong:32,ConvertFontToSpan:64,ConvertToXhtml:128,IndentHTMLContent:256,EncodeScripts:512,OptimizeSpans:1024,ConvertCharactersToEntities:2048,PdfExportFilter:4096,DefaultFilters:61437});
b.registerEnum(a,"EditorToolType",{Button:1,DropDown:2,SplitButton:4,Separator:8,ToolStrip:16,Custom:32});
b.registerEnum(a,"EditModes",{Design:1,Html:2,Preview:4,All:7});
b.registerEnum(a,"EditorContentAreaMode",{Iframe:1,Div:2});
})();
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Editor");
$telerik.toEditorFilter=function(a){return a;
};
$telerik.findEditorFilter=$find;
Telerik.Web.UI.Editor.Filter=function(){Telerik.Web.UI.Editor.Filter.initializeBase(this);
this.IsDom=false;
this.Enabled=false;
this.Name="RadEditor filter";
this.Description="RadEditor filter description";
};
Telerik.Web.UI.Editor.Filter.prototype={getHtmlContent:function(a){return a;
},getDesignContent:function(a){return a;
},get_isDom:function(){return this.IsDom;
},set_isDom:function(a){this.IsDom=a;
},get_enabled:function(){return this.Enabled;
},set_enabled:function(a){this.Enabled=a;
},get_name:function(){return this.Name;
},set_name:function(a){this.Name=a;
},get_description:function(){return this.Description;
},set_description:function(a){this.Description=a;
}};
Telerik.Web.UI.Editor.Filter.registerClass("Telerik.Web.UI.Editor.Filter",Sys.Component);
Telerik.Web.UI.Editor.StripScriptsFilter=function(){Telerik.Web.UI.Editor.StripScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="StripScriptsFilter";
this.Description="This filter strips all script tags from the content.";
};
Telerik.Web.UI.Editor.StripScriptsFilter.prototype={getHtmlContent:function(a){return this._performStripping(a);
},getDesignContent:function(a){return this._performStripping(a);
},_performStripping:function(a){var b=a.replace(new RegExp("<(SCRIPT)([^>]*)/>","ig"),"");
b=b.replace(RegExp("<(SCRIPT)([^>]*)>[\\s\\S]*?</(SCRIPT)([^>]*)>","ig"),"");
return b;
}};
Telerik.Web.UI.Editor.StripScriptsFilter.registerClass("Telerik.Web.UI.Editor.StripScriptsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.EncodeScriptsFilter=function(){Telerik.Web.UI.Editor.EncodeScriptsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="EncodeScriptsFilter";
this.Description="This filter encodes all script tags from the content.";
};
Telerik.Web.UI.Editor.EncodeScriptsFilter.prototype={getHtmlContent:function(a){var e=new RegExp("<!--RADEDITORSAVEDTAG_([\\s\\S]*?)-->","ig");
var b=new RegExp("RADEDITORSAVEDTAGENDING","ig");
var d=new RegExp("RADEDITORSAVEDTAGBEGINNING","ig");
var c=a.replace(e,"<$1>");
c=c.replace(b,"-->");
c=c.replace(d,"<!--");
return c;
},getDesignContent:function(a){var c=function(h,i,k,o,n){var f=n.substring(0,o).lastIndexOf("<!--");
var q=n.substring(0,o).lastIndexOf("-->");
if(f>q){f=n.substring(o,n.length).indexOf("<!--");
q=n.substring(o,n.length).indexOf("-->");
if((f==-1&&q>-1)||(q<f)){return h;
}}var m=new RegExp("-->","ig");
var e=new RegExp("<!--","ig");
var g=k.replace(m,"RADEDITORSAVEDTAGENDING");
var g=g.replace(e,"RADEDITORSAVEDTAGBEGINNING");
var p="<!--RADEDITORSAVEDTAG_"+i+g+"-->";
return p;
};
var d=new RegExp("<(script|noscript)([\\s\\S]*?<\\/\\1)>","ig");
var b=a.replace(d,c);
return b;
}};
Telerik.Web.UI.Editor.EncodeScriptsFilter.registerClass("Telerik.Web.UI.Editor.EncodeScriptsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.RemoveExtraBrakes=function(){Telerik.Web.UI.Editor.RemoveExtraBrakes.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="RemoveExtraBrakes";
this.Description="This filter strips all extra brakes inside some tags like p, h1, etc.";
};
Telerik.Web.UI.Editor.RemoveExtraBrakes.prototype={getHtmlContent:function(a){return this._performStripping(a);
},_performStripping:function(a){var b=a;
if($telerik.isFirefox||$telerik.isOpera){b=b.replace(/<BR\s?\/?>\s*<SCRIPT/ig,"<script");
}b=b.replace(/<BR\s?\/?>\s*<\/(H1|H2|H3|H4|H5|H6|LI|P)/ig,function(f,c,e,d){if(!d.substr(0,e).match(/<BR\s?\/?>\s*$/gi)){f="</"+c;
}return f;
});
b=b.replace(/<(H1|H2|H3|H4|H5|H6|LI|P)([^>]*)?><BR\s?\/?>/ig,"<$1 $2>");
if($telerik.isSafari){b=b.replace(/<p><\/p>/ig,"<p><br /></p>");
}return b;
}};
Telerik.Web.UI.Editor.RemoveExtraBrakes.registerClass("Telerik.Web.UI.Editor.RemoveExtraBrakes",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixNestedLists=function(){Telerik.Web.UI.Editor.FixNestedLists.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixNestedLists";
this.Description="This filter produces valid XHTML from nested lists";
};
Telerik.Web.UI.Editor.FixNestedLists.prototype={_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},fixLists:function(g,c){var d=this._getElements(g,c);
for(var a=d.length-1;
a>=0;
a--){var e=d[a];
var b=e.previousSibling;
if(b&&b.nodeType==3){b=b.previousSibling;
}if(b&&"li"==e.previousSibling.nodeName.toLowerCase()){b.appendChild(e.cloneNode(true));
var f=e.parentNode;
f.removeChild(e);
f=null;
}}},getHtmlContent:function(a){this.fixLists(a,"OL");
this.fixLists(a,"UL");
return a;
}};
Telerik.Web.UI.Editor.FixNestedLists.registerClass("Telerik.Web.UI.Editor.FixNestedLists",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixUlBoldItalic=function(){Telerik.Web.UI.Editor.FixUlBoldItalic.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixUlBoldItalic";
this.Description="This filter changes u, b, i tags to spans with CSS";
};
Telerik.Web.UI.Editor.FixUlBoldItalic.prototype={_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},_replaceElementWithSpan:function(a,m,k){var g=this._getElements(a,m);
var n=[];
for(var b=g.length-1;
b>=0;
b--){Array.add(n,g[b]);
}for(var c=0,f=n.length;
c<f;
c++){var h=a.ownerDocument.createElement("span");
h.style.cssText=k;
var d=n[c];
var e=d.innerHTML;
if($telerik.isIE&&e==" "){h.innerText=e;
}else{Telerik.Web.UI.Editor.Utils.setElementInnerHtml(h,e);
}d.parentNode.replaceChild(h,d);
}},_replaceSpanWithElement:function(e,n,d){var a=this._getElements(e,"span");
var o=[];
for(var g=a.length-1;
g>=0;
g--){Array.add(o,a[g]);
}for(var f=0,b=o.length;
f<b;
f++){var q=[];
var c=o[f];
for(var h=0;
h<c.childNodes.length;
h++){Array.add(q,c.childNodes[h].cloneNode(true));
}if(c.style.cssText.toLowerCase()==d||c.style.cssText.toLowerCase()==(d+";")){var p=e.ownerDocument.createElement(n);
for(var m=0;
m<q.length;
m++){p.appendChild(q[m]);
}c.parentNode.replaceChild(p,c);
}}},getHtmlContent:function(a){this._replaceElementWithSpan(a,"u","text-decoration:underline;");
return a;
},getDesignContent:function(a){this._replaceSpanWithElement(a,"u","text-decoration: underline");
return a;
}};
Telerik.Web.UI.Editor.FixUlBoldItalic.registerClass("Telerik.Web.UI.Editor.FixUlBoldItalic",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.OptimizeSpans=function(){Telerik.Web.UI.Editor.OptimizeSpans.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="OptimizeSpans";
this.Description="This filter changes removes unneeded span elements";
};
Telerik.Web.UI.Editor.OptimizeSpans.prototype={_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},_singleChild:function(f){if(f==null||f.parentNode==null){return false;
}var d=f.parentNode;
var b=0;
for(var a=0,c=d.childNodes.length;
a<c&&b<2;
a++){var e=d.childNodes[a];
if(e.nodeType==3&&String(e.nodeValue).trim()==""){continue;
}b++;
}return(b==1);
},_optimizeElement:function(e){var h=e.parentNode;
var k=e.innerHTML;
var m=["align","dir","lang","title","class","id"];
var n=true;
for(var a=0,c=m.length;
a<c;
a++){n|=this._checkAttribute(e,h,m[a]);
}if(!n){return;
}for(var a=0,c=m.length;
a<c;
a++){var f=m[a];
var d=e.getAttribute(f,2);
if(d){h.setAttribute(f,d);
}}var g=$telerik.isIE?e.style.cssText:e.getAttribute("style",2);
if(g){var b=$telerik.isIE?h.style.cssText:h.getAttribute("style",2);
b=b?b+";":"";
if($telerik.isIE){h.style.cssText=b+g;
}else{h.setAttribute("style",b+g);
}}Telerik.Web.UI.Editor.Utils.removeNode(e);
},_checkAttribute:function(b,c,a){var d=b.getAttribute(a,2);
var e=c.getAttribute(a,2);
return(d==null||e==null||d==e);
},getHtmlContent:function(g){var c=this._getElements(g,"span");
if(c){var a,d=c.length;
var h=[];
for(a=0;
a<d;
a++){var e=c[a];
var f=e.tagName.toLowerCase();
if(e.parentNode.tagName.toLowerCase()==f){if(this._singleChild(e)){h[h.length]=e;
}else{var b=Telerik.Web.UI.Editor.Utils.getOuterHtml(e).toLowerCase();
if(b.indexOf("<"+f+">")==0){h[h.length]=e;
}}}}d=h.length;
for(a=0;
a<d;
a++){this._optimizeElement(h[a]);
}}return g;
}};
Telerik.Web.UI.Editor.OptimizeSpans.registerClass("Telerik.Web.UI.Editor.OptimizeSpans",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEKeepCommentsFilter=function(){Telerik.Web.UI.Editor.IEKeepCommentsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEKeepCommentsFilter";
this.Description="This filter keeps the conditional comments in IE.";
};
Telerik.Web.UI.Editor.IEKeepCommentsFilter.prototype={getHtmlContent:function(b){var a=new RegExp("<!--RADEDITORSAVEDCOMMENT","ig");
var c=b.replace(a,"<!--");
return c;
},getDesignContent:function(b){var a=new RegExp("<!--(\\[[^\\]]+\\][\\s\\S]*?)-->","ig");
var c=b.replace(a,"<!--RADEDITORSAVEDCOMMENT$1-->");
return c;
}};
Telerik.Web.UI.Editor.IEKeepCommentsFilter.registerClass("Telerik.Web.UI.Editor.IEKeepCommentsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter=function(){Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEKeepObjectParamsFilter";
this.Description="This filter keeps the params of object tags when going to html mode and back.";
this._paramRegex=new RegExp("<param([\\s\\S]+?)/?>","ig");
};
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.prototype={getHtmlContent:function(d){var a=new RegExp("<rade_param","ig");
var e=this._paramRegex.test(d);
var c=a.test(d);
var b=d;
if(e&&c){b=b.replace(this._paramRegex,"");
}if(c){b=b.replace(a,"<param");
b=b.replace(/>\s*<\/rade_param>/gi,"/>");
b=b.replace(this._paramRegex,"<param$1/>");
}return b;
},getDesignContent:function(a){var b=a.replace(this._paramRegex,"<rade_param$1></rade_param><param$1/>");
return b;
}};
Telerik.Web.UI.Editor.IEKeepObjectParamsFilter.registerClass("Telerik.Web.UI.Editor.IEKeepObjectParamsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEKeepObjectDesignFilter=function(){Telerik.Web.UI.Editor.IEKeepObjectDesignFilter.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="IEKeepObjectDesignFilter";
this.Description="This filter keeps the browser from automatically changing object tags when going to html mode and back.";
};
Telerik.Web.UI.Editor.IEKeepObjectDesignFilter.prototype={getHtmlContent:function(b){var a=b.getElementsByTagName("object");
for(var c=0,d=a.length;
c<d;
c++){var g=a[c];
var f=g.getAttribute("data",2);
var e=g.getAttribute("type",2);
if(f&&e&&e.toLowerCase().indexOf("silverlight")!=-1&&f.toLowerCase().indexOf("base64")!=-1){g.setAttribute("data","data:"+e+",");
}}return b;
}};
Telerik.Web.UI.Editor.IEKeepObjectDesignFilter.registerClass("Telerik.Web.UI.Editor.IEKeepObjectDesignFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.FixEnclosingP=function(){Telerik.Web.UI.Editor.FixEnclosingP.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="FixEnclosingP";
this.Description="This filter removes a parent paragraph tag if the whole content is inside it.";
};
Telerik.Web.UI.Editor.FixEnclosingP.prototype={getHtmlContent:function(a){var b=null;
if(a.tagName.toLowerCase()=="html"){b=a.getElementsByTagName("BODY")[0];
}else{b=a;
}if($telerik.isIE){if(b&&(b.firstChild)&&("P"==b.firstChild.tagName)&&(b.childNodes.length==1)&&(b.innerHTML.substring(0,3).toLowerCase()=="<p>")){Telerik.Web.UI.Editor.Utils.removeNode(b.firstChild);
}}return a;
}};
Telerik.Web.UI.Editor.FixEnclosingP.registerClass("Telerik.Web.UI.Editor.FixEnclosingP",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IEFixEmptyParagraphs=function(){Telerik.Web.UI.Editor.IEFixEmptyParagraphs.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IEFixEmptyParagraphs";
this.Description="This filter inserts a non-braking space in empty paragraph tags so they are rendered correctly in IE.";
};
Telerik.Web.UI.Editor.IEFixEmptyParagraphs.prototype={getHtmlContent:function(a){var c=new RegExp("(<p[^>]*>)(<\\/p>)","ig");
var b=a.replace(c,"$1&nbsp;$2");
return b;
}};
Telerik.Web.UI.Editor.IEFixEmptyParagraphs.registerClass("Telerik.Web.UI.Editor.IEFixEmptyParagraphs",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IECleanAnchorsFilter=function(){Telerik.Web.UI.Editor.IECleanAnchorsFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="IECleanAnchorsFilter";
this.Description="This filter removse the current page href from all anchor (#) links .";
};
Telerik.Web.UI.Editor.IECleanAnchorsFilter.prototype={getHtmlContent:function(d){var a=Telerik.Web.UI.Editor.Utils.escapeRegExSpecialChars(document.location.href);
var c=new RegExp("(<A[^<>]*?(href)\\s*=\\s*['\"])("+a+")(\\#[^'\"]*?['\"][^>]*?>)","ig");
var b=d.replace(c,"$1$4");
return b;
}};
Telerik.Web.UI.Editor.IECleanAnchorsFilter.registerClass("Telerik.Web.UI.Editor.IECleanAnchorsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozEmStrongFilter=function(){Telerik.Web.UI.Editor.MozEmStrongFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="MozEmStrongFilter";
this.Description="This filter changes b,strong and i,em in Mozilla browsers.";
};
Telerik.Web.UI.Editor.MozEmStrongFilter.prototype={getHtmlContent:function(a){var b=a.replace(new RegExp("<b(\\s([^>])*?)?>","ig"),"<strong$1>");
b=b.replace(new RegExp("</b(\\s([^>])*?)?>","ig"),"</strong$1>");
b=b.replace(new RegExp("<i(\\s([^>])*?)?>","ig"),"<em$1>");
b=b.replace(new RegExp("</i(\\s([^>])*?)?>","ig"),"</em$1>");
return b;
},getDesignContent:function(a){var b=a.replace(new RegExp("<strong(\\s([^>])*?)?>","ig"),"<b$1>");
b=b.replace(new RegExp("</strong(\\s([^>])*?)?>","ig"),"</b$1>");
b=b.replace(new RegExp("<em(\\s([^>])*?)?>","ig"),"<i$1>");
b=b.replace(new RegExp("</em(\\s([^>])*?)?>","ig"),"</i$1>");
return b;
}};
Telerik.Web.UI.Editor.MozEmStrongFilter.registerClass("Telerik.Web.UI.Editor.MozEmStrongFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepStylesString=function(){Telerik.Web.UI.Editor.MozillaKeepStylesString.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="MozillaKeepStylesString";
this.Description="This filter remembers the positions of link tags in the html content (part 1).";
this.markerCounter=0;
};
Telerik.Web.UI.Editor.MozillaKeepStylesString.prototype={getDesignContent:function(a){var d=this;
var c=function(f,i,h,m,g){var o=g.indexOf("</head>",m);
if(o!=-1&&g.indexOf("<body",o)!=-1){return f;
}else{d.markerCounter++;
var k="RadEditorStyleKeeper"+d.markerCounter;
var n="<div id='"+k+"' style='display:none;'>&nbsp;</div><"+i+" reoriginalpositionmarker='"+k+"'"+h;
return n;
}};
var e=new RegExp("<(link|style)([^>]*>)","gi");
var b=a.replace(e,c);
return b;
},getHtmlContent:function(a){var d=new RegExp("<(link|style) reoriginalpositionmarker='RadEditorStyleKeeper[^']+'([^>]*>)","gi");
var b=a.replace(d,"<$1$2");
var c=new RegExp("<div id='RadEditorStyleKeeper[^']+' style='display:none;'>&nbsp;</div>","gi");
b=b.replace(c,"");
return b;
}};
Telerik.Web.UI.Editor.MozillaKeepStylesString.registerClass("Telerik.Web.UI.Editor.MozillaKeepStylesString",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepStylesDom=function(){Telerik.Web.UI.Editor.MozillaKeepStylesDom.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="MozillaKeepStylesDom";
this.Description="This filter remembers the positions of link tags in the html content(part 2).";
this._divs=[];
};
Telerik.Web.UI.Editor.MozillaKeepStylesDom.prototype={getHtmlContent:function(a){var e=a.getElementsByTagName("HEAD")[0];
var g=true;
if(!e){e=a.ownerDocument.getElementsByTagName("HEAD")[0];
g=false;
}if(!e){return a;
}this._restoreElements(e,a,"STYLE");
this._restoreElements(e,a,"LINK");
var f=a.getElementsByTagName("DIV");
if(f){for(var b=f.length-1;
b>=0;
b--){var d=f[b];
if(d.id.indexOf("RadEditorStyleKeeper")==0){var c=d.parentNode;
c.removeChild(d);
}}}f=null;
if(g){this._removeElements(e,"STYLE");
this._removeElements(e,"LINK");
}this._removeMarkerAttributes(a,"STYLE");
this._removeMarkerAttributes(a,"LINK");
return a;
},_restoreElements:function(a,d,b){var c;
c=a.getElementsByTagName(b);
this._divs=d.getElementsByTagName("DIV");
var e=0;
while(c.length>0&&e<c.length){this._restoreStyle(c[e++]);
}},_restoreStyle:function(d){var c=d.getAttribute("reoriginalpositionmarker");
if(c){j=0;
var b=null;
while(j<this._divs.length&&!b){if(this._divs[j].id==c){b=this._divs[j];
}j++;
}if(b){var a=d.cloneNode(true);
a.removeAttribute("reoriginalpositionmarker");
var e=b.parentNode;
e.replaceChild(a,b);
return true;
}}return false;
},_removeElements:function(d,c){var a=d.getElementsByTagName(c);
if(a){for(var b=a.length-1;
b>=0;
b--){var f=a[b];
if(null!=f.getAttribute("reoriginalpositionmarker")){var e=f.parentNode;
e.removeChild(f);
}}a=null;
}},_removeMarkerAttributes:function(c,b){var d=c.getElementsByTagName(b);
if(d){for(var a=d.length-1;
a>=0;
a--){d[a].removeAttribute("reoriginalpositionmarker");
}}d=null;
}};
Telerik.Web.UI.Editor.MozillaKeepStylesDom.registerClass("Telerik.Web.UI.Editor.MozillaKeepStylesDom",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MozillaKeepFlash=function(a){Telerik.Web.UI.Editor.MozillaKeepFlash.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="MozillaKeepFlash";
this.Description="This filter replaces the flash/media objects with static images in design mode.";
this._flashImageSrc=a?a:"FlashManager.gif";
};
Telerik.Web.UI.Editor.MozillaKeepFlash.prototype={_saveFlashObject:function(e){var d=e.ownerDocument.createElement("img");
d.setAttribute("isflash","true");
d.setAttribute("src",this._flashImageSrc);
d.setAttribute("alt","");
var c=e.getAttribute("width",2);
if(c){d.setAttribute("width",c);
}var b=e.getAttribute("height",2);
if(b){d.setAttribute("height",b);
}var f=$telerik.getOuterHtml(e);
f=f.replace(/\n/gi,"<flashcr />").replace(/\r/gi,"<flashlf />");
d.setAttribute("originalCode",Telerik.Web.UI.Editor.Utils.encodePostbackContent(f));
var a=e.parentNode;
a.insertBefore(d,e);
a.removeChild(e);
e=null;
},_restoreFlashObject:function(g){var c=Telerik.Web.UI.Editor.Utils.decodePostbackContent(g.getAttribute("originalCode"));
c=c.replace(/\<flashcr\s*\/\>/gi,"\n").replace(/\<flashlf\s*\/\>/gi,"\r");
var e=g.ownerDocument.createElement("div");
e.innerHTML=c;
var f=e.firstChild;
var d=g.getAttribute("width",2);
if(d){f.setAttribute("width",d);
}var b=g.getAttribute("height",2);
if(b){f.setAttribute("height",b);
}var a=g.parentNode;
a.insertBefore(f,g);
a.removeChild(g);
g=null;
},getDesignContent:function(d){var b;
var c=d.getElementsByTagName("object");
for(b=0;
b<c.length;
b++){var a=c[b];
this._saveFlashObject(a);
b--;
}var c=d.getElementsByTagName("embed");
for(b=0;
b<c.length;
b++){var a=c[b];
this._saveFlashObject(a);
b--;
}return d;
},getHtmlContent:function(b){var d=b.getElementsByTagName("img");
for(var e=0;
e<d.length;
e++){var a=d[e];
var c=a.getAttribute("isflash",2);
if(c!=null){this._restoreFlashObject(a);
e--;
}}return b;
}};
Telerik.Web.UI.Editor.MozillaKeepFlash.registerClass("Telerik.Web.UI.Editor.MozillaKeepFlash",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.StripJunkFilter=function(){Telerik.Web.UI.Editor.StripJunkFilter.initializeBase(this);
this.IsDom=false;
this.Enabled=true;
this.Name="StripJunkFilter";
this.Description="This filter strips extra content, added by the Safari/Firefox browsers.";
};
Telerik.Web.UI.Editor.StripJunkFilter.prototype={getHtmlContent:function(a){var b=a;
if($telerik.isSafari){b=b.replace(new RegExp(' class="khtml-block-placeholder"',"ig"),"");
b=b.replace(new RegExp(' class="Apple-style-span"',"ig"),"");
b=b.replace(new RegExp(' class="webkit-block-placeholder"',"ig"),"");
}if($telerik.isFirefox){b=b.replace(new RegExp('\\s?<br type="_moz" \\/>',"ig")," ");
b=b.replace(new RegExp(' _moz_[a-z_]*="[^"]*"',"ig"),"");
b=b.replace(new RegExp(' type="_moz"',"ig"),"");
}return b;
}};
Telerik.Web.UI.Editor.StripJunkFilter.registerClass("Telerik.Web.UI.Editor.StripJunkFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.ConvertFontToSpanFilter=function(){Telerik.Web.UI.Editor.ConvertFontToSpanFilter.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="ConvertFontToSpanFilter";
this.Description="This filter changes deprecated font tags to compliant span tags.";
this._fontSizesPx=["10px","13px","16px","18px","24px","32px","48px"];
this._fontSizesRevPx=[];
for(var a=0;
a<this._fontSizesPx.length;
a++){this._fontSizesRevPx[parseInt(this._fontSizesPx[a])]=a;
}};
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.prototype={getHtmlContent:function(i){var g=i.ownerDocument;
var c=g.createElement("span");
var d,h,e;
var b=i.getElementsByTagName("FONT");
while(b.length>0){h=b[0];
e=h.parentNode;
d=c.cloneNode(false);
$telerik.mergeElementAttributes(h,d,false);
if(h.style.cssText&&h.style.cssText!=""){d.style.cssText=h.style.cssText;
}if(h.className){d.className=h.className;
}if(h.face){d.style.fontFamily=h.face;
if(d.getAttribute("face")!=null){d.removeAttribute("face");
}}var a=0;
if(h.style.fontSize){d.style.fontSize=h.style.fontSize;
}else{if(!isNaN(a=parseInt(h.size))&&h.size!="+0"){try{if(a<0){a=a+4;
}d.style.fontSize=this._fontSizesPx[a-1];
}catch(f){d.style.fontSize=this._fontSizesPx[3];
}if(d.getAttribute("size")!=null){d.removeAttribute("size");
}}}if(h.color){d.style.color=h.color;
if(d.getAttribute("color")!=null){d.removeAttribute("color");
}}if($telerik.isIE&&h.innerHTML==" "){d.innerText=h.innerHTML;
}else{Telerik.Web.UI.Editor.Utils.setElementInnerHtml(d,h.innerHTML);
}e.replaceChild(d,h);
b=i.getElementsByTagName("FONT");
}return i;
},getDesignContent:function(i){if($telerik.isSafari2||$telerik.isSafari3){return i;
}var e=i.ownerDocument;
var f=e.createElement("font");
var c,h,d;
var b=i.getElementsByTagName("SPAN");
while(b.length>0){c=b[0];
d=c.parentNode;
h=f.cloneNode(false);
$telerik.mergeElementAttributes(c,h,false);
if(c.style.cssText&&c.style.cssText!=""){h.style.cssText=c.style.cssText;
}if(c.className){h.className=c.className;
}if(c.style.fontFamily){h.face=c.style.fontFamily;
this._removeElementStyleAttribute(h,"fontFamily");
}if(c.style.fontSize){var a=3;
var g=null;
if(-1!=c.style.fontSize.indexOf("px")){g=this._fontSizesRevPx[parseInt(c.style.fontSize)];
}if(typeof(g)!="undefined"&&null!=g){h.size=g+1;
this._removeElementStyleAttribute(h,"fontSize");
}}if(c.style.color){h.color=Telerik.Web.UI.Editor.Utils._rgbToHex(c.style.color);
this._removeElementStyleAttribute(h,"color");
}if($telerik.isIE&&c.innerHTML==" "){h.innerText=c.innerHTML;
}else{Telerik.Web.UI.Editor.Utils.setElementInnerHtml(h,c.innerHTML);
}d.replaceChild(h,c);
b=i.getElementsByTagName("SPAN");
}return i;
},_removeElementStyleAttribute:function(a,b){if(a.style&&a.style[b]){if(a.style.removeAttribute){a.style.removeAttribute(b);
}else{if(a.style.removeProperty){b=b.replace(/([A-Z])/g,"-$1").toLowerCase();
a.style.removeProperty(b);
}}if(a.style[b]){a.style[b]=null;
}if(a.style.cssText){}else{a.removeAttribute("style");
}}}};
Telerik.Web.UI.Editor.ConvertFontToSpanFilter.registerClass("Telerik.Web.UI.Editor.ConvertFontToSpanFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.CleanAttributesFilter=function(){Telerik.Web.UI.Editor.CleanAttributesFilter.initializeBase(this);
this.IsDom=true;
this.Enabled=true;
this.Name="CleanAttributesFilter";
this.Description="This filter fixes deprecated attributes to make the content XHTML compliant.";
};
Telerik.Web.UI.Editor.CleanAttributesFilter.prototype={_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},getHtmlContent:function(d){var c=d;
var a;
var e=c.getElementsByTagName("body");
var f=e.length;
for(a=0;
a<f;
a++){var h=e[a];
this.convertAttribute(h,"bgColor","backgroundColor");
this.convertAttribute(h,"background","backgroundImage");
}var e=c.getElementsByTagName("p");
var f=e.length;
for(a=0;
a<f;
a++){this.convertAttribute(e[a],"align","textAlign");
}for(var b=1;
b<7;
b++){var e=c.getElementsByTagName("H"+b);
for(a=0,l=e.length;
a<l;
a++){this.convertAttribute(e[a],"align","textAlign");
}}var e=c.getElementsByTagName("div");
var f=e.length;
for(a=0;
a<f;
a++){this.convertAttribute(e[a],"align","textAlign");
}e=c.getElementsByTagName("table");
f=e.length;
for(a=0;
a<f;
a++){var h=e[a];
this.convertAttribute(h,"bgColor","backgroundColor");
this.convertAttribute(h,"background","backgroundImage");
}e=c.getElementsByTagName("td");
f=e.length;
for(a=0;
a<f;
a++){var h=e[a];
this.convertAttribute(h,"bgColor","backgroundColor");
this.convertAttribute(h,"background","backgroundImage");
this.convertAttribute(h,"borderColor","borderColor");
this.convertAttribute(h,"width","width");
this.convertAttribute(h,"height","height");
this.convertAttribute(h,"noWrap","whiteSpace");
}e=c.getElementsByTagName("img");
f=e.length;
for(a=0;
a<f;
a++){var h=e[a];
this.convertImgAlignAttribute(h);
var g=new Array("marginLeft","marginRight");
this.convertAttribute(h,"hspace",g);
g=new Array("marginTop","marginBottom");
this.convertAttribute(h,"vspace",g);
this.convertBorderAttribute(h);
}e=c.getElementsByTagName("ul");
f=e.length;
for(a=0;
a<f;
a++){this.convertTypeAttribute(e[a]);
}e=c.getElementsByTagName("ol");
f=e.length;
for(a=0;
a<f;
a++){this.convertTypeAttribute(e[a]);
}return c;
},getDesignContent:function(d){var c=d;
var a;
var e=c.getElementsByTagName("p");
var f=e.length;
for(a=0;
a<f;
a++){this.convertCSSProperty(e[a],"align","textAlign");
}for(var b=1;
b<7;
b++){var e=c.getElementsByTagName("H"+b);
for(a=0,l=e.length;
a<l;
a++){this.convertCSSProperty(e[a],"align","textAlign");
}}e=c.getElementsByTagName("div");
f=e.length;
for(a=0;
a<f;
a++){this.convertCSSProperty(e[a],"align","textAlign");
}return c;
},convertAttribute:function(g,d,f){var c=g.getAttribute(d);
var e=c;
if(d=="background"){c=g.getAttribute(d,2);
e="url("+c+")";
}else{if(d=="width"||d=="height"||d=="vspace"||d=="hspace"){if(!(typeof(e)=="string"&&e.match("%"))){e=parseInt(e)+"px";
}}else{if(d=="noWrap"){c=g.noWrap;
e="nowrap";
}}}if(c){if(typeof(f)=="object"){var b=f.length;
for(var a=0;
a<b;
a++){pValue=g.style[f[a]];
if(!pValue){g.style[f[a]]=e;
}}}else{pValue=g.style[f];
if(!pValue){g.style[f]=e;
}}g.removeAttribute(d);
}},convertCSSProperty:function(h,e,g){var d=h.getAttribute(e);
var a=h.style[g];
var f=a;
if(g=="backgroundImage"){f=a.slice(4,a.length-1);
}else{if(g=="width"||g=="height"){if(a&&!a.match("%")){f=parseInt(a);
}}else{if(g=="whiteSpace"){d=h.noWrap;
f="nowrap";
}else{if(e=="vspace"||e=="hspace"){var b=g.length;
for(var c=0;
c<b;
c++){if(c==0){a=h.style[g[c]];
f=parseInt(a);
}else{if(a!=h.style[g[c]]){a=false;
break;
}}}}}}}if(a&&!d){h.setAttribute(e,f);
if(typeof(g)=="object"){b=g.length;
for(var c=0;
c<b;
c++){h.style[g[c]]="";
}}else{h.style[g]="";
}}},convertImgAlignAttribute:function(c){var b=c.getAttribute("align");
var a=($telerik.isIE)?"styleFloat":"cssFloat";
if(b){b=b.toLowerCase();
c.style.verticalAlign="";
c.style[a]="";
switch(b){case"left":c.style[a]="left";
break;
case"right":c.style[a]="right";
break;
case"bottom":case"baseline":case"absbottom":c.style[a]="";
c.style.verticalAlign="text-bottom";
break;
case"middle":case"absmiddle":c.style[a]="";
c.style.verticalAlign="middle";
break;
case"top":case"texttop":c.style[a]="";
c.style.verticalAlign="top";
break;
}}c.removeAttribute("align");
},convertTypeAttribute:function(a){var b=a.getAttribute("type");
if(b){if(!a.style.listStyleType){switch(b){case"1":a.style.listStyleType="decimal";
break;
case"a":a.style.listStyleType="lower-alpha";
break;
case"A":a.style.listStyleType="upper-alpha";
break;
case"i":a.style.listStyleType="lower-roman";
break;
case"I":a.style.listStyleType="upper-roman";
break;
case"disc":a.style.listStyleType="disc";
break;
case"circle":a.style.listStyleType="circle";
break;
case"square":a.style.listStyleType="square";
break;
}}a.removeAttribute("type");
}},convertListStyleTypeStyle:function(c){var b=c.style.listStyleType;
var a=c.getAttribute("type");
if(b&&!a){switch(b){case"decimal":c.type="1";
break;
case"lower-alpha":c.type="a";
break;
case"upper-alpha":c.type="A";
break;
case"lower-roman":c.type="i";
break;
case"upper-roman":c.type="I";
break;
case"disc":c.type="disc";
break;
case"circle":c.type="circle";
break;
case"square":c.type="square";
break;
default:c.type=b;
break;
}c.style.listStyleType="";
}},convertBorderAttribute:function(c){var a=c.getAttribute("border");
if(a){if(!c.style.borderWidth){c.style.borderWidth=a+"px";
}if(!c.style.borderStyle){c.style.borderStyle="solid";
}c.removeAttribute("border");
}}};
Telerik.Web.UI.Editor.CleanAttributesFilter.registerClass("Telerik.Web.UI.Editor.CleanAttributesFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.ConvertToXhtmlFilter=function(){Telerik.Web.UI.Editor.ConvertToXhtmlFilter.initializeBase(this);
this._uniqueIds={};
this.Name="ConvertToXhtmlFilter";
this.Description="This filter converts the HTML from the editor content area to valid XHTML";
this.Enabled=true;
this.IsDom=true;
};
Telerik.Web.UI.Editor.ConvertToXhtmlFilter.prototype={getHtmlContent:function(a){if(!a){return"";
}this._removeLastBr(a);
var b=new Telerik.Web.StringBuilder();
this._appendNodeXhtml(a,b);
return b.toString();
},_removeLastBr:function(b){if(!b||$telerik.isIE){return;
}var a=(b.tagName=="HTML")?b.getElementsByTagName("BODY")[0]:b;
var c=(a.lastChild)?a.lastChild:null;
if(c&&c.tagName&&"BR"==c.tagName){Telerik.Web.UI.Editor.Utils.removeNode(c);
}},_convertAttribute:function(a){return String(a).replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
},_getAttributeValue:function(c,d,f){var e=c.nodeName;
var a=c.nodeValue;
if(e!="style"){if(($telerik.isIE8&&e=="complete"&&a=="complete")||($telerik.isIE8&&e=="shape"&&d.nodeName.toLowerCase()=="a"&&d[e]!=d.getAttribute(e))||($telerik.isIE8&&e.toLowerCase()=="althtml"&&d.nodeName.toLowerCase()=="object")){return;
}if($telerik.isIE&&(e=="type"||e=="value"||e=="selected")){if(!a){return;
}}else{if(!c.specified){if($telerik.isIE&&a==""&&typeof(d[e])=="string"&&d[e]!=""){a=d[e];
}else{return;
}}}if(!a){return;
}if(!isNaN(a)){a=d.getAttribute(e);
}if($telerik.isIE&&(e=="href"||e=="src")){a=d.getAttribute(e,2);
}f.append(" "+(c.expando?e:e.toLowerCase())+'="'+this._convertAttribute(a)+'"');
}else{var b=d.style.cssText;
if(b){b=this._convertRgbToHex(b);
b=this._stripBorderRepetition(b);
b=this._convertAttribute(b.toLowerCase());
b=b.replace(/(url\s*\(\s*)&quot;(.*)&quot;\s*\)/ig,"$1$2)");
f.append(' style="'+b+'"');
}}},_convertRgbToHex:function(a){if($telerik.isFirefox||$telerik.isSafari){a=a.replace(/rgb *\( *\d+ *, *\d+ *, *\d+ *\)/gi,function(d,b,c){return Telerik.Web.UI.Editor.Utils._rgbToHex(d);
});
}return a;
},_replaceBorderRepetition:function(e,d,b){var c=e.match(d);
if(c&&c.length==4){var a=c[0].substring(c[0].indexOf(":"));
if(a==c[1].substring(c[1].indexOf(":"))&&a==c[2].substring(c[2].indexOf(":"))&&a==c[3].substring(c[3].indexOf(":"))){e=e.replace(d,"").replace(/^\s+|\s+$/g,"");
e+=b+a;
}}return e;
},_combineBorderStyles:function(f){var d=new RegExp(/border-(width|style|color):([^;]*);/gi);
var c=f.match(d);
if(c&&c.length==3){var e="border:";
var b=[];
b[0]=c[0].substring(c[0].indexOf(":")+1).trim();
b[1]=c[1].substring(c[1].indexOf(":")+1).trim();
b[2]=c[2].substring(c[2].indexOf(":")+1).trim();
if(b[0].match(/\s/)||b[1].match(/\s/)||b[2].match(/\s/)){return f;
}var a=function(g){for(var h=0;
h<3;
h++){if(c[h].indexOf(g)==0){e+=b[h]+" ";
break;
}}};
a("border-width");
a("border-style");
a("border-color");
e=e.replace(/;/g,"").replace(/currentcolor/gi,"").replace(/initial/gi,"").replace("s[s]+"," ").replace(/^\s+|\s+$/g,"");
e+=";";
f=f.replace(d,"");
f=e+f;
}return f;
},_stripBorderRepetition:function(b){if(!b){return;
}if(!b.match(/; *$/)){b+=";";
}var a=new RegExp(/border(?:-(top|bottom|left|right))-width:([^;]*);/gi);
b=this._replaceBorderRepetition(b,a,"border-width");
var a=new RegExp(/border(?:-(top|bottom|left|right))-style:([^;]*);/gi);
b=this._replaceBorderRepetition(b,a,"border-style");
var a=new RegExp(/border(?:-(top|bottom|left|right))-color:([^;]*);/gi);
b=this._replaceBorderRepetition(b,a,"border-color");
var a=new RegExp(/border-(top|bottom|left|right):([^;]*);/gi);
b=this._replaceBorderRepetition(b,a,"border");
b=this._combineBorderStyles(b);
return b.replace(/^\s+|\s+$/g,"");
},_canHaveChildren:function(a){switch(a.tagName.toUpperCase()){case"AREA":case"BASE":case"BASEFONT":case"COL":case"FRAME":case"HR":case"IMG":case"BR":case"INPUT":case"ISINDEX":case"LINK":case"META":case"PARAM":return false;
}return true;
},_appendElementNode:function(b,a){if(b.tagName.charAt(0)=="/"){if($telerik.isIE6&&b.nodeName=="/ABBR"){a.append("</abbr>");
}return;
}if(b.nodeName=="!"){a.append(b.text);
return;
}var d=b.nodeName;
if(b.scopeName){if(b.scopeName=="HTML"){d=d.toLowerCase();
}else{d=b.scopeName+":"+d;
}}else{d=d.toLowerCase();
}if($telerik.isFirefox&&d=="br"&&b.parentNode.nodeName.toLowerCase()=="pre"){if(b.getAttribute("_moz_dirty")==""){a.append("\r\n");
return;
}}a.append("<"+d);
if("img"==d){if($telerik.isIE6||$telerik.isIE7){var o=document.createElement("img");
o.mergeAttributes(b);
if(o.width){a.append(' width="'+b.getAttribute("width",2)+'"');
}if(o.height){a.append(' height="'+b.getAttribute("height",2)+'"');
}}if(!b.getAttribute("alt",2)){a.append(' alt=""');
}}if($telerik.isIE&&("area"==d||"a"==d)){if(b.shape&&d=="area"&&!document.documentMode){a.append(' shape="'+b.shape.toLowerCase()+'"');
}if(b.coords&&d=="area"&&!document.documentMode){a.append(' coords="'+b.getAttribute("coords")+'"');
}var n=b.getAttribute("href",2);
if(n){n=n.replace("about:blank","");
n=n.replace("about:","");
n=n.replace(/&amp;/gi,"&").replace(/&/gi,"&amp;");
a.append(' href="'+n+'"');
b.removeAttribute("href",0);
}}if($telerik.isIE8&&"option"==d&&b.selected){a.append(' selected="selected"');
}try{var e=b.attributes;
var h=e.length;
for(var g=0;
g<h;
g++){this._getAttributeValue(e[g],b,a);
}}catch(k){if($telerik.isIE&&k.message.indexOf("Not enough storage is available to complete this operation")!=-1){var c=b.outerHTML.replace(/^\s+/gi,"");
c=c.replace(/^([^\s]+)([^>]+?)>[\s\S]+$/gi,"$2");
a.append(c);
}}switch(d){case"script":a.append(">"+b.text+"</"+d+">");
break;
case"textarea":a.append(">"+b.value+"</"+d+">");
break;
case"iframe":var f=b.innerHTML;
if($telerik.isIE){f=f.replace(/\soriginalAttribute="[^"]+"/gi,"");
f=f.replace(/\soriginalPath="[^"]+"/gi,"");
}if($telerik.isFirefox){f=f.replace(/\&amp;/g,"&").replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&quot;/g,'"');
}a.append(">"+f+"</iframe>");
break;
case"object":a.append(">");
var p="";
if(b.altHtml){p=b.altHtml;
}else{p=b.innerHTML;
}if($telerik.isIE){p=p.replace(/\soriginalAttribute="[^"]+"/gi,"");
p=p.replace(/\soriginalPath="[^"]+"/gi,"");
}a.append(p);
a.append("</object>");
break;
case"title":case"style":case"comment":case"noscript":var p=b.innerHTML;
if($telerik.isIE&&p.length==0){p=b.ownerDocument.title;
}a.append(">"+p+"</"+d+">");
break;
default:if(b.hasChildNodes()||(true==b.canHaveChildren||(b.canHaveChildren==null&&this._canHaveChildren(b)))){a.append(">");
var m=b.childNodes;
h=m.length;
for(var g=0;
g<h;
g++){this._appendNodeXhtml(m[g],a);
}a.append("</"+d+">");
}else{if($telerik.isIE6&&d=="abbr"){a.append(">");
}else{a.append(" />");
}}break;
}},_appendTextNode:function(b,c){var a=String(b.nodeValue);
var d=b.parentNode.nodeName.toLowerCase();
if(!$telerik.isIE&&(d=="style"||d=="script")){c.append(a);
}else{a=a.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
a=a.replace(/[\u00a0]/g,"&nbsp;");
c.append(a);
}},_appendCDataNode:function(a,b){b.append("<![CDATA[\n"+a.nodeValue+"\n]]>");
},_appendCommentNode:function(c,d){var a="";
try{a=c.nodeValue;
}catch(b){}if(!a&&c.text){a=c.text;
}else{a="<!--"+a+"-->";
}d.append(a);
},_appendNodeXhtml:function(a,b){if(a.uniqueID){if(this._uniqueIds[a.uniqueID]){return;
}else{this._uniqueIds[a.uniqueID]=true;
}}switch(a.nodeType){case 1:this._appendElementNode(a,b);
break;
case 3:this._appendTextNode(a,b);
break;
case 4:this._appendCDataNode(a,b);
break;
case 8:this._appendCommentNode(a,b);
break;
}}};
Telerik.Web.UI.Editor.ConvertToXhtmlFilter.registerClass("Telerik.Web.UI.Editor.ConvertToXhtmlFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.IndentHTMLContentFilter=function(){Telerik.Web.UI.Editor.IndentHTMLContentFilter.initializeBase(this);
this.Name="IndentHTMLContentFilter";
this.Description="This filter indents the HTML content so it is more readable when you view the code";
this.Enabled=true;
this.IsDom=false;
this._indentPattern="    ";
this._protectedData=null;
var c="P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION";
var a="HTML|HEAD|BODY|STYLE|FORM|TABLE|TBODY|THEAD|TR";
var b=a+"|DL|UL|OL";
this._ignoreTags=new RegExp("(<PRE[^>]*>|<!--|<SCRIPT[^>]*>)([\\s\\S]*?)(<\\/PRE>|-->|<\\/SCRIPT>)","gi");
this._tagsNLBefore=new RegExp("<("+c+")[^>]*>","gi");
this._tagsNLAfter=new RegExp("<\\/("+c+")[^>]*>","gi");
this._tagsNLNoCloseAfter=new RegExp("<(BR|HR)[^>]*\\/?>","gi");
this._tagsNLBeforeAndAfter=new RegExp("<\\/?("+a+")[^>]*>","gi");
this._tagsIncIndent=new RegExp("^<("+b+")[\\s\\/>]","i");
this._tagsDecIndent=new RegExp("^<\\/("+b+")[\\s\\>]","i");
this._shrinkNL=new RegExp("\\s*\\n+\\s*","gi");
};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.prototype={getHtmlContent:function(e){var b=e.trim();
if(b.indexOf("<body")==0){b=b.substring(b.indexOf(">")+1,b.length-7);
}this._protectedData=[];
var c=this;
var n=function(p,q,r,i,s,t){Array.add(c._protectedData,r);
return q+"RADEDITORFORMATTED_"+c._protectedData.length+i;
};
b=b.replace(this._ignoreTags,n);
var d="$&";
if($telerik.isSafari2){d="$0";
}b=b.replace(this._tagsNLBefore,"\n"+d);
b=b.replace(this._tagsNLAfter,d+"\n");
b=b.replace(this._tagsNLNoCloseAfter,d+"\n");
b=b.replace(this._tagsNLBeforeAndAfter,"\n"+d+"\n");
var g=b.split(this._shrinkNL);
var o=new Telerik.Web.StringBuilder();
var m="";
for(var a=0;
a<g.length;
a++){var f=g[a];
if(f.length==0){continue;
}if(this._tagsDecIndent.test(f)){if(m.length>this._indentPattern.length){m=m.substring(this._indentPattern.length);
}else{m="";
}}o.append(m);
o.append(f);
o.append("\n");
if(this._tagsIncIndent.test(f)){m+=this._indentPattern;
}}b=o.toString();
for(var a=0;
a<this._protectedData.length;
a++){var h=new RegExp("RADEDITORFORMATTED_"+(a+1));
var k=this._protectedData[a].replace(/\$/gi,"$$$$");
b=b.replace(h,k);
}return b;
}};
Telerik.Web.UI.Editor.IndentHTMLContentFilter.registerClass("Telerik.Web.UI.Editor.IndentHTMLContentFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.MakeUrlsAbsolute=function(){Telerik.Web.UI.Editor.MakeUrlsAbsolute.initializeBase(this);
this.Name="MakeUrlsAbsolute";
this.Description="This filter makes all src and href attributes in the editor content have absolute URLs";
this.Enabled=true;
this.IsDom=true;
};
Telerik.Web.UI.Editor.MakeUrlsAbsolute.prototype={getHtmlContent:function(c){this._updateElements(c,"A","href");
this._updateElements(c,"AREA","href");
this._updateElements(c,"IMG","src");
this._updateElements(c,"EMBED","src");
var a=new Telerik.Web.UI.Editor.IECleanAnchorsFilter();
if(c.tagName=="HTML"){var b=(typeof(c.document)!="undefined")?c.document:c.ownerDocument;
b.body.innerHTML=a.getHtmlContent(b.body.innerHTML);
}else{c.innerHTML=a.getHtmlContent(c.innerHTML);
}return c;
},_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},_updateElements:function(a,c,f){var e=a.ownerDocument.createElement("div");
var g=this._getElements(a,c);
if(g){for(var b=0;
b<g.length;
b++){var d=g[b].getAttribute(f,2);
if("href"==f&&d){e.innerHTML='<a href="'+d.replace(/\"/gi,"%22")+'">test</a>';
if($telerik.isIE){var h=g[b].innerHTML;
}g[b].setAttribute("href",e.childNodes[0].href);
if($telerik.isIE){if((h.indexOf("www.")==0&&g[b].innerHTML.match("[a-z]+://"))||(h.indexOf("mailto:")==-1&&g[b].innerHTML.match("mailto:"))){g[b].innerHTML=h;
}}}else{if("src"==f&&d){e.innerHTML='<img src="'+d.replace(/\"/gi,"%22")+'" />';
g[b].setAttribute("src",e.childNodes[0].src);
}}}}e.innerHTML="";
e=null;
}};
Telerik.Web.UI.Editor.MakeUrlsAbsolute.registerClass("Telerik.Web.UI.Editor.MakeUrlsAbsolute",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.StripPathsFilter=function(a){Telerik.Web.UI.Editor.StripPathsFilter.initializeBase(this);
this.Name="StripPathsFilter";
this.Description="This filter strips a specific part from URLs (href, src attributes)";
this.Enabled=true;
this.IsDom=true;
this._pathsToStrip=a;
};
Telerik.Web.UI.Editor.StripPathsFilter.prototype={getHtmlContent:function(a){this._updateElements(a,"A","href");
this._updateElements(a,"AREA","href");
this._updateElements(a,"IMG","src");
this._updateElements(a,"EMBED","src");
return a;
},_getElements:function(b,a){var c=b.getElementsByTagName(a);
if(!c){c=b.ownerDocument.getElementsByTagName(a);
}return c;
},_updateElements:function(a,d,h){var n=this._getElements(a,d);
if(n){for(var b=0;
b<n.length;
b++){var c=n[b];
var e=$telerik.isIE?c.getAttribute(h,2):c[h];
if(e){var f=e.length;
for(var g=0,m=this._pathsToStrip.length;
g<m;
g++){var k=this._pathsToStrip[g];
if(k&&e.toLowerCase().indexOf(k.toLowerCase())==0){e=e.substring(k.length);
}}if(f>e.length){c.setAttribute(h,e);
}}}}}};
Telerik.Web.UI.Editor.StripPathsFilter.registerClass("Telerik.Web.UI.Editor.StripPathsFilter",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.ConvertCharactersToEntities=function(){Telerik.Web.UI.Editor.ConvertCharactersToEntities.initializeBase(this);
this.set_isDom(false);
this.set_enabled(true);
this.set_name("ConvertCharactersToEntities");
this.set_description("This filter converts reserved characters to their html entity names.");
this.entities={euro:"\u20ac",cent:"\u00a2",pound:"\u00a3",yen:"\u00a5",sect:"\u00a7",copy:"\u00a9",reg:"\u00ae",plusmn:"\u00b1",ne:"\u2260",asymp:"\u2248",le:"\u2264",ge:"\u2265",divide:"\u00f7",times:"\u00d7",iexcl:"\u00a1",curren:"\u00a4",brvbar:"\u00a6",uml:"\u00a8",ordf:"\u00aa",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a","int":"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",equiv:"\u2261",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",laquo:"\u00ab",not:"\u00ac",macr:"\u00af",deg:"\u00b0",sup2:"\u00b2",sup3:"\u00b3",acute:"\u00b4",micro:"\u00b5",para:"\u00b6",middot:"\u00b7",cedil:"\u00b8",sup1:"\u00b9",ordm:"\u00ba",raquo:"\u00bb",frac14:"\u00bc",frac12:"\u00bd",frac34:"\u00be",iquest:"\u00bf",Agrave:"\u00c0",Aacute:"\u00c1",Acirc:"\u00c2",Atilde:"\u00c3",Auml:"\u00c4",Aring:"\u00c5",AElig:"\u00c6",Ccedil:"\u00c7",Egrave:"\u00c8",Eacute:"\u00c9",Ecirc:"\u00ca",Euml:"\u00cb",Igrave:"\u00cc",Iacute:"\u00cd",Icirc:"\u00ce",Iuml:"\u00cf",ETH:"\u00d0",Ntilde:"\u00d1",Ograve:"\u00d2",Oacute:"\u00d3",Ocirc:"\u00d4",Otilde:"\u00d5",Ouml:"\u00d6",Oslash:"\u00d8",Ugrave:"\u00d9",Uacute:"\u00da",Ucirc:"\u00db",Uuml:"\u00dc",Yacute:"\u00dd",THORN:"\u00de",szlig:"\u00df",agrave:"\u00e0",aacute:"\u00e1",acirc:"\u00e2",atilde:"\u00e3",auml:"\u00e4",aring:"\u00e5",aelig:"\u00e6",ccedil:"\u00e7",egrave:"\u00e8",eacute:"\u00e9",ecirc:"\u00ea",euml:"\u00eb",igrave:"\u00ec",iacute:"\u00ed",icirc:"\u00ee",iuml:"\u00ef",eth:"\u00f0",ntilde:"\u00f1",ograve:"\u00f2",oacute:"\u00f3",ocirc:"\u00f4",otilde:"\u00f5",ouml:"\u00f6",oslash:"\u00f8",ugrave:"\u00f9",uacute:"\u00fa",ucirc:"\u00fb",uuml:"\u00fc",yacute:"\u00fd",thorn:"\u00fe",yuml:"\u00ff",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203e",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211c",alefsym:"\u2135",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203a"};
};
Telerik.Web.UI.Editor.ConvertCharactersToEntities.prototype={getHtmlContent:function(a){var d=this.createRegEx();
var b=this.entities;
var c=a+"";
c=c.replace(d,function(h,f,g){for(var e in b){if(b[e]==h){return"&"+e+";";
}}return h;
});
return c;
},createRegEx:function(){var c="[";
var b=this.entities;
for(var a in b){c+=b[a];
}c+="]";
return new RegExp(c,"g");
}};
Telerik.Web.UI.Editor.ConvertCharactersToEntities.registerClass("Telerik.Web.UI.Editor.ConvertCharactersToEntities",Telerik.Web.UI.Editor.Filter);
Telerik.Web.UI.Editor.PdfExportFilter=function(){Telerik.Web.UI.Editor.PdfExportFilter.initializeBase(this);
this.set_isDom(true);
this.set_enabled(true);
this.set_name("PdfExportFilter");
this.set_description("This filter fixes some pdf export issues.");
};
Telerik.Web.UI.Editor.PdfExportFilter.prototype={getHtmlContent:function(h){var f=h;
var e=f.ownerDocument;
var d=f.getElementsByTagName("TABLE");
for(var a=0,m=d.length;
a<m;
a++){var c=d[a];
c.style.width="0px";
var g=c.getElementsByTagName("colgroup");
if(g.length==0){var k=e.createElement("colgroup");
var n=this._getTableColCount(c);
for(var b=0;
b<n;
b++){var o=e.createElement("col");
k.appendChild(o);
}c.insertBefore(k,c.firstChild);
}}return f;
},_getTableColCount:function(c){var d=0;
if(c){var f=c.rows[0].cells;
for(var b=0,e=f.length;
b<e;
b++){var a=f[b].getAttribute("colSpan");
if(!a){d++;
}else{d+=parseInt(a);
}}}return d;
}};
Telerik.Web.UI.Editor.PdfExportFilter.registerClass("Telerik.Web.UI.Editor.PdfExportFilter",Telerik.Web.UI.Editor.Filter);
$telerik.toEditorFiltersManager=function(a){return a;
};
$telerik.findEditorFiltersManager=$find;
Telerik.Web.UI.Editor.FiltersManager=function(){Telerik.Web.UI.Editor.FiltersManager.initializeBase(this);
this._filters=[];
this._enableXhtmlFilter=true;
this._convertToXhtmlFilter=new Telerik.Web.UI.Editor.ConvertToXhtmlFilter();
};
Telerik.Web.UI.Editor.FiltersManager.prototype={clear:function(){Array.clear(this._filters);
},get_enableXhtmlFilter:function(){return this._enableXhtmlFilter;
},set_enableXhtmlFilter:function(a){this._enableXhtmlFilter=a;
},add:function(a){Array.add(this._filters,a);
},addAt:function(b,a){Array.insert(this._filters,a,b);
},remove:function(a){Array.remove(this._filters,a);
},removeAt:function(a){Array.removeAt(this._filters,a);
},getFilterAt:function(a){return this._filters[a];
},getFilterByName:function(c){for(var a=0;
a<this._filters.length;
a++){var b=this._filters[a];
if(b&&c==b.get_name()){return b;
}}},getDesignContent:function(c){var b=c;
for(var e=0;
e<this._filters.length;
e++){var d=this._filters[e];
if((!d.get_isDom())&&(false!=d.get_enabled())&&d.getDesignContent){try{b=d.getDesignContent(b);
}catch(a){alert("Error while executing filter "+d.get_name()+" - "+a.toString());
}}}return b;
},getDesignContentDom:function(d){for(var b=0;
b<this._filters.length;
b++){var a=this._filters[b];
if((a.get_isDom())&&(false!=a.get_enabled())&&a.getDesignContent){try{d=a.getDesignContent(d);
}catch(c){alert("Error while executing filter "+a.get_name()+" - "+c.toString());
}}}return d;
},getHtmlContent:function(a){for(var b=0;
b<this._filters.length;
b++){var e=this._filters[b];
if((e.get_isDom())&&(false!=e.get_enabled())&&e.getHtmlContent){try{a=e.getHtmlContent(a);
}catch(c){alert("Error while executing filter "+e.get_name()+" - "+c.toString());
}}}var d;
if(this.get_enableXhtmlFilter()){try{d=this._convertToXhtmlFilter.getHtmlContent(a);
}catch(c){alert("Error while executing filter XHTML - "+c.toString());
}}else{d=$telerik.getOuterHtml(a);
}d=d.replace(/<body\s*\/>/i,"<body></body>").trim();
for(var b=0;
b<this._filters.length;
b++){var e=this._filters[b];
if((!e.get_isDom())&&(false!=e.get_enabled())&&e.getHtmlContent){try{d=e.getHtmlContent(d);
}catch(c){alert("Error while executing filter "+e.get_name()+" - "+c.toString());
}}}return d;
}};
Telerik.Web.UI.Editor.FiltersManager.registerClass("Telerik.Web.UI.Editor.FiltersManager",Sys.Component);
Type.registerNamespace("Telerik.Web.UI.Editor");
Telerik.Web.UI.Editor.RestorePoint=function(a,b){this.Window=a;
this.Document=a.document;
this.container=(b)?b:this.Document.body;
this.update();
this.Update=this.update;
this.Restore=this.restore;
this.Select=this.select;
};
if($telerik.isIE){Telerik.Web.UI.Editor.RestorePoint.prototype={update:function(){this.HtmlText=this.container.innerHTML;
try{var b=this.Document.selection.createRange();
if(b.length){this.SourceIndex=b.item(0).sourceIndex;
}else{this.oldRange=b;
this.parentElement=b.parentElement();
this.StartBookmark=b.getBookmark();
}}catch(a){}},restore:function(a){Telerik.Web.UI.Editor.Utils.setElementInnerHtml(this.container,this.HtmlText);
this.select(a);
},select:function(b){if(null!=this.SourceIndex){try{var a=this.Document.body.createControlRange();
a.addElement(this.Document.all(this.SourceIndex));
a.select();
}catch(d){}}else{if(null!=this.StartBookmark){var c=(this.parentElement&&this.parentElement.tagName=="TD");
if(this.container.tagName=="BODY"||c){var a=this.Document.body.createTextRange();
if(this.useOldRange&&c){a=this.oldRange;
}else{a.moveToBookmark(this.StartBookmark);
}try{a.select();
if(true==b&&a.collapse){a.collapse();
}}catch(d){}}}}}};
}else{Telerik.Web.UI.Editor.RestorePoint.prototype={restore:function(){try{this.container.innerHTML=this.HtmlText;
this.select();
}catch(a){}},select:function(){try{this.Window.focus();
this._moveToBookmark(this.Window.getSelection(),this.Bookmark);
}catch(a){}},update:function(){try{this.HtmlText=this.container.innerHTML;
this.Bookmark=this._bookmarkSelection(this.Window.getSelection());
}catch(a){}},_bookmarkSelection:function(a){if(a){return{anchorNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,a.anchorNode),anchorOffset:a.anchorOffset,focusNodeBookmark:new Telerik.Web.UI.Editor.SelectionBookmark(this.Window,a.focusNode),focusOffset:a.focusOffset,isCollapsed:a.isCollapsed};
}else{return{};
}},_moveToBookmark:function(b,a){var d=a.anchorNodeBookmark.select();
var c=a.focusNodeBookmark.select();
b.collapse(d,a.anchorOffset);
if(!a.isCollapsed){b.extend(c,a.focusOffset);
}}};
}Telerik.Web.UI.Editor.RestorePoint.registerClass("Telerik.Web.UI.Editor.RestorePoint",null);
Telerik.Web.UI.Editor.SelectionBookmark=function(b,a){this.Window=b;
this.NodePath=this._findNodePath(this.Window.document.documentElement,a);
};
Telerik.Web.UI.Editor.SelectionBookmark.prototype={select:function(){var a=this._findNode(this.Window.document.documentElement,this.NodePath);
try{Telerik.Web.UI.Editor.Utils.selectElement(this.Window,a);
}catch(b){}return a;
},_findNodePath:function(b,d){var e,a;
for(var c=0;
c<b.childNodes.length;
c++){e=b.childNodes[c];
a=this._findNodePath(e,d);
if(""!=a){return""+c+","+a;
}if(e==d){return""+c;
}}return"";
},_findNode:function(a,c){var d=c.split(",");
for(var b=0;
b<d.length;
b++){a=a.childNodes[d[b]];
}return a;
}};
Telerik.Web.UI.Editor.SelectionBookmark.registerClass("Telerik.Web.UI.Editor.SelectionBookmark",null);
Type.registerNamespace("Telerik.Web.UI.Editor");
$telerik.toEditorSelection=function(a){return a;
};
$telerik.findEditorSelection=$find;
Telerik.Web.UI.Editor.Selection=function(a){this._window=a;
this.isSafari=$telerik.isSafari;
this.isOpera=$telerik.isOpera;
this.GetRange=this.getRange;
this.GetParentElement=this.getParentElement;
this.IsControl=this.isControl;
this.GetText=this.getText;
this.GetHtmlText=this.getHtml;
this.PasteHtml=this.pasteHtml;
this.Collapse=this.collapse;
};
Telerik.Web.UI.Editor.Selection.prototype={selectElement:function(a){return Telerik.Web.UI.Editor.Utils.selectElement(this._window,a);
},pasteHtml:function(a,b){b=(b==true);
if($telerik.isIE){return this._executeIE(a,b);
}else{return this._executeMozilla(a,b);
}},_executeIE:function(l,j){var d=window.document;
var i=this._window.document;
var h=(d===i)?Telerik.Web.UI.EditorContentAreaMode.Div:Telerik.Web.UI.EditorContentAreaMode.Iframe;
if(h!=Telerik.Web.UI.EditorContentAreaMode.Div){i.body.setActive();
}var f=i.selection;
var e=f.createRange();
if(f.type=="Control"){var b=e.item(0);
if(b&&b.tagName!="BODY"){f.empty();
e=f.createRange();
e.moveToElementText(b);
b.parentNode.removeChild(b);
}}if(f.type.toLowerCase()!="none"){var a=(i.body.innerHTML.trim()==this.getHtml().trim());
i.execCommand("Delete");
if(a){i.body.innerHTML="";
}if(e.htmlText=="&nbsp;"){e.collapse(true);
}}if(e.length){var b=e.item(0);
if(b&&b.tagName=="BODY"){var g=g.getElementsByTagName("FORM")[0];
if(g){Telerik.Web.UI.Editor.Utils.setElementInnerHtml(g,g.innerHTML+l);
}}e=f.createRange();
}var c=e.duplicate();
c.collapse(true);
e.collapse(false);
l=Telerik.Web.UI.Editor.Utils.getStoredOriginalPathsAndAttributes(l);
e.pasteHTML(l);
var k=e.parentElement();
if(k.tagName!="BODY"){k=k.parentNode;
}Telerik.Web.UI.Editor.Utils.restoreOriginalPathsAndAttributes(k);
if(j){c.setEndPoint("EndToEnd",e);
c.select();
}return true;
},_executeMozilla:function(j,i){var d=this._window.document;
var f=d.createElement("span");
f.innerHTML=j;
if(this.isSafari||this.isOpera){var c="radetempnode";
f.setAttribute("id",c);
if(this.isSafari){i=true;
}this._insertNodeAtSelection(this._window,f,i);
var b=d.createRange();
var a=this._window.getSelection();
var e=d.getElementById(c);
b.selectNodeContents(e);
var g=b.extractContents();
b.selectNode(e);
var h=b.extractContents();
b.insertNode(g);
a.addRange(b);
if(this.isSafari){a.collapseToEnd();
}}else{var b=d.createRange();
b.selectNodeContents(f);
var g=b.extractContents();
if(g.childNodes.length==1){g=g.childNodes[0];
}this._insertNodeAtSelection(this._window,g,i);
}return true;
},_insertNodeAtSelection:function(d,t,o){var f=d.getSelection();
if(f.rangeCount==0){d.document.body.appendChild(t);
return;
}var h=null;
if(f.getRangeAt){h=f.getRangeAt(0);
}else{h=d.document.createRange();
h.setStart(f.anchorNode,f.anchorOffset);
h.setEnd(f.focusNode,f.focusOffset);
}if(f.removeAllRanges){f.removeAllRanges();
}h.deleteContents();
var q=$telerik.isSafari2?f.baseNode:h.startContainer;
var u=$telerik.isSafari2?f.baseOffset:h.startOffset;
var n=q.previousSibling;
if($telerik.isSafari&&null==q){q=d.document.body;
}h=d.document.createRange();
if((t.nodeType==3)&&(q.nodeType==3)){q.insertData(u,t.nodeValue);
h.setEnd(q,u+t.length);
if(o){h.setStart(q,u);
}else{h.setStart(q,u+t.length);
}}else{var k;
var m=null;
if(q.nodeType==3){var w=q;
q=w.parentNode;
var a=w.nodeValue;
var e=a.substr(0,u);
var b=a.substr(u);
var s=d.document.createTextNode(e);
var k=d.document.createTextNode(b);
var g=false;
if($telerik.isFirefox&&t.nodeType!=1){var v=t.childNodes;
var c=v.length;
for(var j=0;
j<c;
j++){if(v[j].nodeType!=3){g=true;
break;
}}}q.insertBefore(k,w);
q.insertBefore(t,k);
try{q.insertBefore(s,t);
}catch(p){}q.removeChild(w);
if($telerik.isFirefox&&g){var r=document.createTextNode(e);
if(n){q.insertBefore(r,n.nextSibling);
}else{q.insertBefore(r,q.childNodes[0]);
}}}else{if(q.childNodes.length>0){k=q.childNodes[u];
q.insertBefore(t,k);
}else{q.appendChild(t);
}}if(q.tagName=="BODY"&&!k){var v=q.childNodes;
m=v[v.length-1];
}try{if(o){h.setStart(t,0);
h.setEnd(k,0);
}else{if(m){h.setStartAfter(m);
h.setStartAfter(m);
}else{h.setStartBefore(k);
h.setEndBefore(k);
}}}catch(p){}}try{f.addRange(h);
}catch(p){}},selectRange:function(c){if(!c){return;
}var b=this._window;
if(c.select){c.select();
}else{if(b.getSelection){var d=b.getSelection();
if(d.removeAllRanges){d.removeAllRanges();
d.addRange(c);
}else{var a=c.baseNode;
if(null==a){a=b.document.body;
}var e=c.extentNode;
if(null==e){e=b.document.body;
}d.setBaseAndExtent(a,c.startOffset,e,c.endOffset);
}}}},getBrowserSelection:function(){if(!this._window){return null;
}if(this._window.document.selection&&!window.opera){return this._window.document.selection;
}else{if(this._window.getSelection){return this._window.getSelection();
}}return null;
},getRange:function(){if(!this._window){return null;
}if(this._window.document.selection&&!window.opera){return this._window.document.selection.createRange();
}else{if(this._window.getSelection){var b=this._window.getSelection();
if(!b||b.rangeCount<1){return null;
}var a=null;
if(b.getRangeAt){a=b.getRangeAt(0);
}else{a=this._window.document.createRange();
a.setStart(b.anchorNode,b.anchorOffset);
a.setEnd(b.focusNode,b.focusOffset);
}return a;
}}},getParentElement:function(){var a=this.getRange();
if(!a){return null;
}if(a.commonAncestorContainer){var b=this._window.getSelection();
var d=a.startContainer?a.startContainer:b.baseNode;
var c=a.endContainer?a.endContainer:b.extentNode;
var e=a.startOffset!=null?a.startOffset:b.baseOffset;
var f=a.endOffset!=null?a.endOffset:b.extentOffset;
if(d==c&&(f-e)==1&&b.anchorNode.childNodes[b.anchorOffset]){return b.anchorNode.childNodes[b.anchorOffset];
}else{if($telerik.isSafari){if(b.anchorNode.parentNode.tagName=="TH"||b.anchorNode.parentNode.tagName=="TD"){return b.anchorNode.parentNode;
}else{if(b.anchorNode.parentNode.tagName=="TR"){return b.anchorNode;
}}}if(!a.commonAncestorContainer.tagName){if(this._window.document==a.commonAncestorContainer&&b.baseNode){return b.baseNode.parentNode;
}return a.commonAncestorContainer.parentNode;
}else{return a.commonAncestorContainer;
}}}else{if(a.length){return a.item(0);
}else{if(a.parentElement){return a.parentElement();
}else{return null;
}}}},isControl:function(){if(this._window.document.selection){return(this._window.document.selection.type=="Control");
}else{var a=this._window.getSelection();
if(a.toString()!=""){return false;
}var b=a.focusNode;
if(!b||b.nodeType==1){return false;
}return(b.tagName=="IMG");
}},getText:function(){if(this._window.document.selection){var a=this._window.document.selection.createRange();
if(a.length){return"";
}else{if(null!=a.text){return a.text;
}}}else{if(this._window.getSelection){return this._window.getSelection().toString();
}else{return"";
}}},getHtml:function(){var d=null;
if(this._window.document.selection&&!window.opera){d=this._window.document.selection.createRange();
if(d.length){return d.item(0).outerHTML;
}else{if(d.htmlText){return d.htmlText;
}else{return"";
}}}else{if(this._window.getSelection){var b=this._window.getSelection();
if(null==b){return"";
}if(b.getRangeAt&&typeof(b.rangeCount)!="undefined"&&b.rangeCount==0){return"";
}if(b.getRangeAt){d=b.getRangeAt(0);
var a=this._window.document.createElement("div");
var c=d.cloneContents();
if(c){a.appendChild(c);
return a.innerHTML;
}else{return"";
}}else{return b;
}}else{return"";
}}},collapse:function(b){b=(b==true);
if(this._window.document.selection){var c=this._window.document.selection.createRange();
if(c.collapse){c.collapse(b);
c.select();
}}else{if(this._window.getSelection){var a=this._window.getSelection();
if(!a.isCollapsed){if(b){a.collapseToStart();
}else{a.collapseToEnd();
}}}}}};
Telerik.Web.UI.Editor.Selection.registerClass("Telerik.Web.UI.Editor.Selection",null);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EditorShortCutManager=function(){this._shortcuts=[];
};
Telerik.Web.UI.EditorShortCutManager.prototype={addShortCut:function(b,c){var a=new Telerik.Web.UI.EditorShortCut(b,c);
a.HashValue=this._getShortCutHashValue(a);
this._shortcuts[a.HashValue]=a;
},removeShortCut:function(b){var a=this.findShortCutByName(b);
if(a){this._shortcuts[a.HashValue]=null;
}},setShortCut:function(b,a){this.removeShortCut(b);
this.addShortCut(b,a);
},isShortCutHit:function(a){return this._hitTest(a.keyCode,a.ctrlKey,(null!=a.ctrlLeft?a.ctrlLeft:a.ctrlKey),a.shiftKey,(null!=a.shiftLeft?a.shiftLeft:a.shiftKey),a.altKey,(null!=a.altLeft?a.altLeft:a.altKey));
},_hitTest:function(e,h,g,b,a,f,c){var d=this._getHashValue(e,h,g,b,a,f,c);
return this._shortcuts[d];
},_getHashValue:function(f,i,h,c,b,g,e){var a=f&65535;
var d=0;
d|=(i?(1<<0):0);
d|=(c?(1<<2):0);
d|=(g?(1<<4):0);
a|=(d<<16);
return a;
},_getShortCutHashValue:function(a){return this._getHashValue(a.KeyCode,a.CtrlKey,a.LeftCtrlKey,a.ShiftKey,a.LeftShiftKey,a.AltKey,a.LeftAltKey);
},findShortCutByName:function(c){var b;
for(var a in this._shortcuts){b=this._shortcuts[a];
if(null!=b&&b._name==c){return b;
}}return null;
}};
Telerik.Web.UI.EditorShortCut=function(b,a){this._name=b;
this._shortcutString="";
this.setShortCut(a);
};
Telerik.Web.UI.EditorShortCut.prototype={CtrlKey:false,LeftCtrlKey:false,ShiftKey:false,LeftShiftKey:false,AltKey:false,LeftAltKey:false,KeyCode:0,get_name:function(){return this._name;
},set_name:function(a){this._name=a;
},get_shortCutString:function(){return this._shortcutString;
},setShortCut:function(a){this._parseShortcutString(a);
this._shortcutString=a;
},_parseShortcutString:function(c){if("string"==typeof(c)){this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
c=c.replace(/\s*/gi,"");
c=c.replace(/\+\+/gi,"+PLUS");
var d=c.split("+");
var b="";
for(var a=0;
a<d.length;
a++){b=d[a].toUpperCase();
switch(b){case"LCTRL":this.LeftCtrlKey=true;
case"CTRL":this.CtrlKey=true;
break;
case"LSHIFT":this.LeftShiftKey=true;
case"SHIFT":this.ShiftKey=true;
break;
case"LALT":this.LeftAltKey=true;
case"ALT":this.AltKey=true;
break;
case"F1":this.KeyCode=112;
break;
case"F2":this.KeyCode=113;
break;
case"F3":this.KeyCode=114;
break;
case"F4":this.KeyCode=115;
break;
case"F5":this.KeyCode=116;
break;
case"F6":this.KeyCode=117;
break;
case"F7":this.KeyCode=118;
break;
case"F8":this.KeyCode=119;
break;
case"F9":this.KeyCode=120;
break;
case"F10":this.KeyCode=121;
break;
case"F11":this.KeyCode=122;
break;
case"F12":this.KeyCode=123;
break;
case"ENTER":this.KeyCode=13;
break;
case"HOME":this.KeyCode=36;
break;
case"END":this.KeyCode=35;
break;
case"LEFT":this.KeyCode=37;
break;
case"RIGHT":this.KeyCode=39;
break;
case"UP":this.KeyCode=38;
break;
case"DOWN":this.KeyCode=40;
break;
case"PAGEUP":this.KeyCode=33;
break;
case"PAGEDOWN":this.KeyCode=34;
break;
case"SPACE":this.KeyCode=32;
break;
case"TAB":this.KeyCode=9;
break;
case"BACK":this.KeyCode=8;
break;
case"CONTEXT":this.KeyCode=93;
break;
case"ESCAPE":case"ESC":this.KeyCode=27;
break;
case"DELETE":case"DEL":this.KeyCode=46;
break;
case"INSERT":case"INS":this.KeyCode=45;
break;
case"PLUS":this.KeyCode="+".charCodeAt(0);
break;
default:this.KeyCode=b.charCodeAt(0);
break;
}}}else{throw {description:"Invalid shortcut string"};
}}};
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI._localization=function(){this._controls={};
};
Telerik.Web.UI._localization.prototype={merge:function(b,e,c){if(typeof(this._controls[b])=="undefined"){this._controls[b]={};
}if(typeof(this._controls[b][e])=="undefined"){this._controls[b][e]={};
}var a=this._controls[b][e];
for(var d in c){if(typeof(c[d])=="string"){a[d]=c[d];
}}return a;
}};
Telerik.Web.UI._localization.registerClass("Telerik.Web.UI._localization");
Telerik.Web.UI.Localization=new Telerik.Web.UI._localization();
Type.registerNamespace("Telerik.Web.UI");
$telerik.toEditor=function(a){return a;
};
$telerik.findEditor=$find;
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.RadEditor=function(c){a.RadEditor.initializeBase(this,[c]);
this._bottomResizer=null;
this._tableElement=null;
this._contentAreaElement=null;
this._contentHiddenTextarea=null;
this._doctypeString=null;
this._originalHeight=null;
this._accessKeyTextbox=null;
this._mode=a.EditModes.Design;
this._divContentAreaInitialized=false;
this._shortCutManager=new a.EditorShortCutManager();
this._filtersManager=new a.Editor.FiltersManager();
this._commandsManager=new a.Editor.CommandsManager();
if(null!=a.Editor.ModulesManager){this._modulesManager=new a.Editor.ModulesManager(this);
}this._resizeExtender=null;
this._localization={};
this._contentAreaEventHandlers={};
this._onToolClickDelegate=null;
this._onWindowResizeDelegate=null;
this._saveContentDelegate=null;
this.isIE=$telerik.isIE;
this.isFirefox=$telerik.isFirefox;
this.isOpera=$telerik.isOpera;
this.isIE7=$telerik.isIE7;
this._spellCheckService=null;
};
a.RadEditor.createNew=function(c){var d=new a.RadEditor(document.createElement("div"));
if(!c){d.get_contentAreaElement();
}else{d._contentAreaElement=c;
}d._contentHiddenTextarea=document.createElement("input");
d._setContentAreaHtml("",true);
d.set_editable(true);
d._ieHookToClientArea();
d._addDefaultShortCuts();
d.removeShortCut("ToggleScreenMode");
d.removeShortCut("LinkManager");
d.removeShortCut("ImageManager");
d.removeShortCut("SetToolFocus");
return d;
};
a.RadEditor.prototype={get_ajaxSpellCheck:function(){return this._ajaxSpellCheck;
},set_ajaxSpellCheck:function(c){this._ajaxSpellCheck=c;
this.raiseEvent("spellCheckLoaded");
},get_spellCheckService:function(){if(!this._spellCheckService){this._spellCheckService=$create(a.SpellCheckService,this.get_spellCheckJSON(),null,null);
this._spellCheckService.add_complete(Function.createDelegate(this,this._responseReceived));
}return this._spellCheckService;
},startSpellCheck:function(){this.get_spellCheckService().spellCheck(this.get_html());
},addCustomWord:function(c){this.get_spellCheckService().addCustomWord(c);
},_responseReceived:function(c,d){},raiseEvent:function(c,d){if(c!="selectionChange"||this.get_mode()==a.EditModes.Design){a.RadEditor.callBaseMethod(this,"raiseEvent",[c,d]);
}},_initializeToolProvider:function(){var d=this;
var e=d.get_toolProviderID();
if(e&&$find(e)){var l=$find(e);
var g=l.get_dialogOpener();
d.set_dialogOpener(g);
var k=l.get_contextMenusJSON();
if(k&&k.concat){d.set_contextMenusJSON(k.concat([]));
}var i=l.get_modulesJSON();
if(i&&i.concat){d.set_modulesJSON(i.concat([]));
}var h=this.get_toolContainer();
h.innerHTML="";
this.set_toolJSON([]);
var c=l.get_toolHTML();
h.innerHTML=c;
var j=l.get_toolJSON().concat([]);
this.set_toolJSON(j);
if(l.get_spellCheckJSON){d.set_spellCheckJSON(l.get_spellCheckJSON());
}if(l.get_ajaxSpellCheckScriptReference){var f=l.get_ajaxSpellCheckScriptReference();
if(f){d.set_ajaxSpellCheckScriptReference(f);
}}this.set_links(l.get_links());
this.set_colors(l.get_colors());
this.set_fontNames(l.get_fontNames());
this.set_fontSizes(l.get_fontSizes());
this.set_symbols(l.get_symbols());
this.set_realFontSizes(l.get_realFontSizes());
this.set_snippets(l.get_snippets());
this.set_cssClasses(l.get_cssClasses());
this.set_cssFiles(l.get_cssFiles());
this.set_languages(l.get_languages());
this.set_paragraphs(l.get_paragraphs());
}},get_toolHTML:function(){var c=this.get_toolContainer().cloneNode(true);
return c.innerHTML;
},get_toolContainer:function(){return this.get_TopZone().firstChild;
},get_mainTable:function(){return $get(this.get_id()+"Wrapper");
},_ieHookToClientArea:function(){var c=this;
window.setTimeout(function(){if($telerik.isIE){var i=c.get_contentArea();
if(!i){return;
}try{var d=a.Editor.Utils.storeBrowserPosition();
var g=i.createTextRange();
var f=document.body.createTextRange();
if(d&&d.y>0){f.moveToElementText(c.get_contentAreaElement());
}else{f.moveStart("textedit",f.text.length);
}f.collapse(true);
f.select();
if(d&&d.y>0){a.Editor.Utils.restoreBrowserPosition();
}}catch(h){}}},0);
},initialize:function(){a.RadEditor.callBaseMethod(this,"initialize");
this.raiseEvent("init",Sys.EventArgs.Empty);
this._initializeToolProvider();
var d=this.get_mainTable();
this._originalHeight=d.style.height;
this._initializeLocalization();
this._addFilters();
this._addDefaultShortCuts();
this._createUI();
var e=this.isVisible();
if(e){this._fixMoreSizeIssues();
}d=$get(this.get_id()+"_BottomTable");
if(d){d.style.display="";
}this._createTools();
this._makeResizeable(this.get_enableResize());
var c=$get(this.get_id()+"ContentHiddenTextarea");
if(c){this._contentHiddenTextarea=c;
}this._setContentAreaHtml(this.get_contentHiddenTextareaValue(),true);
if(!this.get_enableUndoRedo()){this.get_contentWindow()._radEditorEnableUndoRedo=false;
}this._registerClientValidation();
this._registerPostBackHandlers();
if(!this._isEditModeEnabled(a.EditModes.Design)){if(this._isEditModeEnabled(a.EditModes.Html)){this.set_mode(a.EditModes.Html);
}else{this.set_mode(a.EditModes.Preview);
}}this._ieHookToClientArea();
this._fixIEVisibilityProblems(true);
this._fixMozillaDOMProblems(true);
if(this._modulesManager){if(!this.isIE){var g=$get(this.get_id()+"Module");
g.style.display="none";
var f=this;
window.setTimeout(function(){f._modulesManager.initialize();
g.style.display="";
if(f.isOpera||f.get_contentAreaMode()==a.EditorContentAreaMode.Div){f._updateEditorSize(f._originalHeight);
}},0);
}else{this._modulesManager.initialize();
this._updateEditorSize(this._originalHeight);
}}if(this.get_autoResizeHeight()&&e){this._makeAutoResizeHeight();
}this.set_initialContent();
this._applyAccessKey();
this.raiseEvent("load",Sys.EventArgs.Empty);
if(!$telerik.isIE&&!$telerik.isFirefox){if(!this.isVisible()){this.raiseEvent("firstShow");
}}},dispose:function(){if(typeof(Sys.WebForms)!="undefined"&&typeof(Sys.WebForms.PageRequestManager)!="undefined"&&this._saveContentDelegate){var d=Sys.WebForms.PageRequestManager.getInstance();
if(d){d.remove_initializeRequest(this._saveContentDelegate);
}d=null;
}if(this._contentHiddenTextarea&&this._contentHiddenTextarea.form&&this._saveContentDelegate){$telerik.removeExternalHandler(this._contentHiddenTextarea.form,"submit",this._saveContentDelegate);
}var c=this.get_contentAreaElement();
if(c){$clearHandlers(c);
c.parentNode.removeChild(c);
c=null;
}this._detachEvents();
this._fixMozillaDOMProblems(false);
this._fixIEVisibilityProblems(false);
this._makeResizeable(false);
this._onToolClickDelegate=null;
this._registerWindowResizeHandler(false);
if(this._isFullScreen){this._enableBodyScroll();
}this.set_dialogOpener(null);
this._saveContentDelegate=null;
this._registerModeChangeHandler(false);
if(this._insertLink){this._insertLink.dispose();
this._insertLink=null;
}if(this._insertImage){this._insertImage.dispose();
this._insertImage=null;
}if(this._accessKeyTextbox){$clearHandlers(this._accessKeyTextbox);
this._accessKeyTextbox.removeAttribute("accessKey");
this._accessKeyTextbox=null;
}a.RadEditor.callBaseMethod(this,"dispose");
},_applyAccessKey:function(){var d=this.get_element().getAttribute("accessKey");
if(d){this.get_element().removeAttribute("accessKey");
var c=document.createElement("input");
c.setAttribute("name",this.get_id()+"EditorAccessKey");
c.setAttribute("type","text");
c.setAttribute("id",this.get_id()+"EditorAccessKey");
c.setAttribute("accessKey",d);
this._accessKeyTextbox=c;
$addHandlers(this._accessKeyTextbox,{focus:this.setFocus},this);
var e=document.createElement("div");
e.style.width="0px";
e.style.height="0px";
e.style.overflow="hidden";
e.appendChild(this._accessKeyTextbox);
this.get_element().appendChild(e);
}},_makeAutoResizeHeight:function(){if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){this.get_element().style.height="auto";
this.get_contentArea().style.height="auto";
}else{if(this._initialContentHeight&&this._initialContentHeight>0){return;
}window.setTimeout(Function.createDelegate(this,function(){this.get_contentArea().style.overflow="hidden";
this._initialContentHeight=this.get_contentAreaElement().offsetHeight;
var c=this;
this.attachEventHandler("keydown",function(d){if(!c._isKeyUpButton(d)){c._resizeContentArea(d);
}});
this.attachEventHandler("keyup",function(d){if(c._isKeyUpButton(d)||(d.keyCode==13&&!c.isIE)){c._resizeContentArea(d);
}});
this.add_selectionChange(Function.createDelegate(this,this._resizeContentArea));
this._resizeContentArea();
}),0);
}},_isKeyUpButton:function(d){var c=d.keyCode;
if(c==8||c==46){return true;
}return false;
},_getCurrentFontSize:function(){var c=this.getSelectedElement();
var d=parseInt($telerik.getCurrentStyle(c,"fontSize"));
return d;
},_resizeContentArea:function(k){var d=this.isIE?this.get_contentArea():this.get_document().documentElement;
var i=this.get_contentAreaElement();
var g=i.parentNode;
var j=this._initialContentHeight;
var l=i.offsetHeight;
var h=d.scrollHeight+(k&&k.keyCode==13&&this.isIE?this._getCurrentFontSize():0);
if(h==l){return;
}if((j==l)&&(h<=j)){return;
}var f=(h>j)?h:j;
i.style.height=f+"px";
if(h>l){g.style.height=parseInt(h)+"px";
}else{var c=this.get_element();
var m=c.offsetHeight-(g.offsetHeight-i.offsetHeight);
if(i.style.height!="100%"){g.style.height="";
this._updateEditorSize(m);
}return;
}this._updateEditorSize(null,true);
},_makeResizeable:function(d){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!d){return;
}if(!this._tableElement){return;
}if(!this._bottomResizer){this._bottomResizer=$get(this.get_id()+"BottomResizer");
}if(this._bottomResizer){if(this.isIE){this._bottomResizer.style.styleFloat="right";
}if(this.isOpera&&document.compatMode=="CSS1Compat"){this._bottomResizer.parentNode.removeChild(this._bottomResizer);
this._bottomResizer=null;
}}else{return;
}var c={se:this._bottomResizer};
this._resizeExtender=new a.ResizeExtender(this,this.get_element(),c,this._tableElement);
},_getInvisibleParent:function(){return a.Editor.Utils.getInvisibleParent(this.get_element());
},isVisible:function(){return(this._getInvisibleParent()==null);
},_fixIEVisibilityProblems:function(c){if(!this.isIE){return;
}if(c){var d=this._getInvisibleParent();
if(d){this._onIEParentVisibilityChangeDelegate=Function.createDelegate(this,this._onIEParentVisibilityChange);
this._invisibleParent=d;
$addHandler(this._invisibleParent,"propertychange",this._onIEParentVisibilityChangeDelegate);
}}else{if(this._invisibleParent&&this._onIEParentVisibilityChangeDelegate){$removeHandler(this._invisibleParent,"propertychange",this._onIEParentVisibilityChangeDelegate);
this._onIEParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}}},_fixMozillaDOMProblems:function(d){if(this.isIE){return;
}if(d){var c=this._getInvisibleParent();
if(c){this._invisibleParent=c;
this._onMozillaParentVisibilityChangeDelegate=Function.createDelegate(this,this._onMozillaParentVisibilityChange);
c.addEventListener("DOMAttrModified",this._onMozillaParentVisibilityChangeDelegate,false);
}this._onMozillaParentNodeChangedDelegate=Function.createDelegate(this,this._onMozillaParentNodeChanged);
document.addEventListener("DOMNodeInserted",this._onMozillaParentNodeChangedDelegate,false);
}else{if(this._invisibleParent&&this._onMozillaParentVisibilityChangeDelegate){this._invisibleParent.removeEventListener("DOMAttrModified",this._onMozillaParentVisibilityChangeDelegate,false);
this._onMozillaParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}if(this._onMozillaParentNodeChangedDelegate){document.removeEventListener("DOMNodeInserted",this._onMozillaParentNodeChangedDelegate,false);
this._onMozillaParentNodeChangedDelegate=null;
}}},_onIEParentVisibilityChange:function(d){d=d.rawEvent;
if(!d){return;
}if(d.propertyName=="style.display"||d.propertyName=="className"){var c=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(c!="none"){this.raiseEvent("firstShow");
if(this.get_autoResizeHeight()){this._makeAutoResizeHeight();
}this._updateEditorSize(this.get_element().style.height);
this._fixIEVisibilityProblems(false);
}}},_onMozillaParentVisibilityChange:function(d){if(d.attrName=="style"||d.attrName=="class"){var c=d.target;
if((d.currentTarget==d.target)&&"none"!=$telerik.getCurrentStyle(c,"display")){window.setTimeout(Function.createDelegate(this,function(){if(!this._editorFirstVisible){this._editorFirstVisible=true;
this.raiseEvent("firstShow");
}if(this.get_autoResizeHeight()){this._makeAutoResizeHeight();
}this.set_editable(true);
}),0);
}}},_onMozillaParentNodeChanged:function(c){if(!c.target||!this.get_element()){return;
}var d=$telerik.isDescendantOrSelf(c.target,this.get_element());
if(d){if($telerik.isFirefox){this.onParentNodeChanged();
}else{window.setTimeout(Function.createDelegate(this,this.onParentNodeChanged),0);
}}},onParentNodeChanged:function(){var d=this.get_html();
var e=this.get_contentAreaElement();
if(this._textIframe){this._textIframe.parentNode.removeChild(this._textIframe);
this._textIframe=null;
}var c=this.get_mode();
this.set_mode(c);
this._setContentAreaHtml(d,true);
this.set_html(d);
},onResizeStart:function(){this._resizeSelection=this.getSelection().getRange();
this._fixMoreSizeIssues();
},onResizeEnd:function(){this._updateEditorSize(this.get_element().style.height);
if(!this.isIE){return;
}this.setActive();
if(this._resizeSelection){var c=this._resizeSelection.parentElement();
if(c&&(this.get_document()==c.ownerDocument)){this.getSelection().selectRange(this._resizeSelection);
}this._resizeSelection=null;
}},_initializeLocalization:function(){this._localization=a.Localization.merge("RadEditor",this.get_language().toLowerCase(),this._localization);
},getSelectedElement:function(){return this.getSelection().getParentElement();
},getSelection:function(){return new a.Editor.Selection(this.get_contentWindow());
},getSelectionHtml:function(){return this.getSelection().getHtml();
},getEditorSelectionRange:function(){var c=this.getSelection().getRange();
var d=this.getSelectedElement();
if(c!=null&&d!=null&&d.ownerDocument!=this.get_document()){c=null;
}return c;
},selectElement:function(c,d){if(a.Editor.Utils.selectElement(this.get_contentWindow(),c)&&false!=d){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}},undo:function(c){this._commandsManager.undo(c);
},redo:function(c){this._commandsManager.redo(c);
},executeCommand:function(c,d,e){if(!c.get_window()){c.set_window(this.get_contentWindow());
}if(false!=d&&!this.isOpera){this.setFocus();
}this._commandsManager.execute(c,e);
},executeBrowserCommand:function(c,e,d,g){var f=this._localization[c];
this.executeCommand(new a.Editor.BrowserCommand(f,this.get_contentWindow(),c,d,this));
this.setActive();
this.setFocus();
if(true==g){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}},createElement:function(c,e,i,d,g,h){var f=this.get_document().createElement(c);
if(e){f.style.width=e;
}if(i){f.style.height=i;
}if(null!=d){f.id=d;
}if(null!=g){f.name=g;
}if(null!=h){f.value=h;
}return f;
},createRestorePoint:function(){return new a.Editor.RestorePoint(this.get_contentWindow(),this.get_contentArea());
},getToolState:function(c){if(c=="Undo"){return this.get_commandsManager().isUndoAvailable()?a.Editor.CommandStates.Off:a.Editor.CommandStates.Disabled;
}else{if(c=="Redo"){return this.get_commandsManager().isRedoAvailable()?a.Editor.CommandStates.Off:a.Editor.CommandStates.Disabled;
}else{var d=a.Editor.UpdateCommandsArray[c];
if(d&&d.getState){return d.getState(this.get_contentWindow());
}}}},getToolValue:function(d){var e=a.Editor.UpdateCommandsArray[d];
if(e&&e.getValue){return e.getValue(this.get_contentWindow());
}else{if(d=="RealFontSize"){var f=this.getSelectedElement();
if(f){var c=null;
try{c=$telerik.getCurrentStyle(f,"fontSize","");
}catch(g){}if(c){var h=parseFloat(c);
if(h>parseInt(c)){if(c.indexOf("px")>-1){c=parseInt(c)+"px";
}}}return c;
}}}},_addFilters:function(){var f=this.get_filtersManager();
var c=this.get_contentFilters();
var e=a.EditorFilters;
f.clear();
var d=c&e.ConvertToXhtml;
f.set_enableXhtmlFilter(d);
if(d){f.add(new a.Editor.CleanAttributesFilter());
}if(c&e.RemoveScripts){f.add(new a.Editor.StripScriptsFilter());
}if(c&e.EncodeScripts){f.add(new a.Editor.EncodeScriptsFilter());
}if(c&e.FixUlBoldItalic){f.add(new a.Editor.FixUlBoldItalic());
}f.add(new a.Editor.FixNestedLists());
if(c&e.ConvertFontToSpan){f.add(new a.Editor.ConvertFontToSpanFilter());
}if(c&e.OptimizeSpans){f.add(new a.Editor.OptimizeSpans());
}if(c&e.FixEnclosingP){f.add(new a.Editor.FixEnclosingP());
}if(c&e.ConvertCharactersToEntities){f.add(new a.Editor.ConvertCharactersToEntities());
}if($telerik.isIE){f.add(new a.Editor.IEKeepObjectDesignFilter());
f.add(new a.Editor.IEKeepObjectParamsFilter());
f.add(new a.Editor.IEKeepCommentsFilter());
f.add(new a.Editor.IEFixEmptyParagraphs());
if(c&e.IECleanAnchors){f.add(new a.Editor.IECleanAnchorsFilter());
}}if(!$telerik.isIE&&!$telerik.isOpera){if(!$telerik.isSafari){f.add(new a.Editor.MozillaKeepFlash(this.get_mozillaFlashOverlayImage()));
}f.add(new a.Editor.MozillaKeepStylesString());
f.add(new a.Editor.MozillaKeepStylesDom());
if(c&e.MozEmStrong){f.add(new a.Editor.MozEmStrongFilter());
}}f.add(new a.Editor.StripJunkFilter());
if(c&e.MakeUrlsAbsolute){f.add(new a.Editor.MakeUrlsAbsolute());
}f.add(new a.Editor.RemoveExtraBrakes());
if(c&e.IndentHTMLContent){f.add(new a.Editor.IndentHTMLContentFilter());
}if(c&e.PdfExportFilter){f.add(new a.Editor.PdfExportFilter());
}},applyFiltersForEmbedContent:function(e){var d=e+"";
var c=this.get_filtersManager().getFilterByName("IEKeepObjectParamsFilter");
var f=this.get_filtersManager().getFilterByName("MozillaKeepFlash");
if(c){d=c.getDesignContent(d);
}if(f){var g=this.get_document().createElement("div");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(g,d);
g=f.getDesignContent(g);
d=g.innerHTML;
}return d;
},addShortCut:function(d,c){if(this._shortCutManager){this._shortCutManager.addShortCut(d,c);
}},removeShortCut:function(c){if(this._shortCutManager){this._shortCutManager.removeShortCut(c);
}},setShortCut:function(d,c){if(this._shortCutManager){this._shortCutManager.setShortCut(d,c);
}},_addDefaultShortCuts:function(){var c=[["SelectAll","CTRL+A"],["Copy","CTRL+C"],["Paste","CTRL+V"],["Cut","CTRL+X"],["Bold","CTRL+B"],["Italic","CTRL+I"],["Underline","CTRL+U"],["Copy","CTRL+INS"],["Paste","SHIFT+INS"],["ToggleScreenMode","F11"],["LinkManager","CTRL+K"],["ImageManager","CTRL+G"],["SetToolFocus","F10"]];
if(this.get_enableUndoRedo()){c.push(["Undo","CTRL+Z"]);
c.push(["Redo","CTRL+Y"]);
}for(var d=0;
d<c.length;
d++){this.addShortCut(c[d][0],c[d][1]);
}if(this.isIE){this.addShortCut("InsertTab","TAB");
}if(this.get_newLineBr()&&this.isIE){this.addShortCut("Enter","ENTER");
this.addShortCut("ShiftEnter","SHIFT+ENTER");
this.addShortCut("InsertParagraph","CTRL+ENTER");
}else{if(this.isFirefox&&!this.get_newLineBr()){this.addShortCut("EnterParagraphMozilla","ENTER");
}else{if($telerik.isSafari){if(this.get_newLineBr()){this.addShortCut("EnterSafari","ENTER");
}this.addShortCut("InsertParagraph","CTRL+ENTER");
}}}},bubbleKeyEventToBrowser:function(){this._shortcutHit=false;
},attachEventHandler:function(e,d){if(e.startsWith("on")){e=e.replace("on","");
}var f=this.get_contentAreaMode()==a.EditorContentAreaMode.Div?this.get_contentArea():this.get_document();
$telerik.addExternalHandler(f,e,d);
var g=this._contentAreaEventHandlers;
if(!g[e]){g[e]=[];
}var c=g[e];
c[c.length]=d;
},detachEventHandler:function(d,c){if(d.startsWith("on")){d=d.replace("on","");
}var e=this.get_contentAreaMode()==a.EditorContentAreaMode.Div?this.get_contentArea():this.get_document();
$telerik.removeExternalHandler(e,d,c);
},_detachEvents:function(){var d=this._contentAreaEventHandlers;
for(var g in d){var j=d[g];
if(j.length!=null){for(var c=0;
c<j.length;
c++){var f=j[c];
if(typeof(f)=="function"){try{this.detachEventHandler(g,f);
}catch(h){}}}j=[];
}}this._contentAreaEventHandlers={};
this._attachBodyHandlers(false);
},get_TopZone:function(){return $get(this.get_id()+"Top");
},_createTools:function(){if(!this.get_toolAdapter()){var d=this.get_toolContainer();
var c=eval(this.get_toolAdapterType());
if(this._onToolClickDelegate==null){this._onToolClickDelegate=Function.createDelegate(this,this._onToolClick);
}this.set_toolAdapter($create(c,{editor:this,toolJSON:this.get_toolJSON(),contentAreaMode:this.get_contentAreaMode()},{toolClick:this._onToolClickDelegate},null,d));
if(this.isIE){if(this.get_toolbarMode()==a.EditorToolbarMode.Default){d.style.overflow="";
}this._updateEditorSize();
}}},_onToolClick:function(c,d){this.fire(c.get_name(),d);
},getContextMenuByTagName:function(c){var d=this.get_toolAdapter();
if(d&&d.getContextMenuByTagName){return d.getContextMenuByTagName(c);
}},getToolByName:function(c){var d=this.get_toolAdapter();
if(d){return d.getToolByName(c);
}return null;
},getLocalizedString:function(e,c){if(!e){return c;
}var d=this.get_localization()[e];
if(null==d){d=this.get_localization()[e.toLowerCase()];
}return d;
},setFocus:function(){try{if($telerik.isIE&&this.getSelection().isControl()){return;
}var d=this.get_mode()!=a.EditModes.Html?this.get_contentWindow():this._getTextArea();
if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){d=this.get_contentArea();
}if(d&&d.focus){d.focus();
}}catch(c){}},setActive:function(){if($telerik.isIE&&this.getSelection().isControl()){return;
}var c=this.get_mode()==a.EditModes.Html?this._getTextArea():this.get_contentArea();
if(c&&c.setActive){c.setActive();
}},set_visible:function(c){var d=this.get_element();
if(d){d.style.display=c?"":"none";
}this.set_editable(c);
},enableEditing:function(d,j,l){var h=this.get_toolAdapter();
var c=a.EditingOptions;
var g=function(){};
if(!j){j=a.EditingOptions.All;
}this._editingOptions=j;
this._optionalIgnoredTools=l;
if(j&c.ContextMenus){if(h){h.enableContextMenus(d);
}}if(j&c.EditModes){if(!d){this._originalEditModeRef=this.set_mode;
this.set_mode=g;
}else{if(this._originalEditModeRef){this.set_mode=this._originalEditModeRef;
this._originalEditModeRef=null;
}}}if(j&c.Tools){if(h){if(!d){h.setToolState(null,a.Editor.CommandStates.Disabled);
if(l){var k=[];
for(var f in l){var i=h.getToolByName(f);
if(i){k[k.length]=i;
}}h.setToolState(k);
}this._originalSetToolStateRef=h.setToolState;
h.setToolState=g;
}else{if(this._originalSetToolStateRef){h.setToolState=this._originalSetToolStateRef;
this._originalSetToolStateRef=null;
}}}}if(j&c.Modules){var e=this._modulesManager;
if(e){e.setModulesVisible(d);
}}if(j&c.Typing){if(!d){this._disableTypingDelegate=$telerik.cancelRawEvent;
this.attachEventHandler("keypress",this._disableTypingDelegate);
}else{if(this._disableTypingDelegate){this.detachEventHandler("keypress",this._disableTypingDelegate);
this._disableTypingDelegate=null;
}}}if(j&j.Tab){if(!d){this.removeShortCut("InsertTab");
}else{this.setShortCut("InsertTab","TAB");
}}if(d){if(h){h.setToolState(null,a.Editor.CommandStates.Off);
}this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}},set_editable:function(d){var c=this;
if($telerik.isIE||$telerik.isOpera||this.get_contentAreaMode()==a.EditorContentAreaMode.Div){window.setTimeout(function(){try{c.get_contentArea().setAttribute("contentEditable",""+d);
c.get_document().execCommand("2D-Position",false,true);
}catch(e){}},0);
}else{window.setTimeout(function(){try{c.get_document()["designMode"]=d?"on":"off";
if(d){c.get_document().execCommand("UseCSS",false,true);
c.get_document().execCommand("styleWithCSS",false,false);
}}catch(f){}},0);
}},get_editable:function(){if($telerik.isIE||$telerik.isOpera||this.get_contentAreaMode()==a.EditorContentAreaMode.Div){return this.get_contentArea().getAttribute("contentEditable",2);
}else{return(this.get_document()["designMode"]=="on");
}},enableContentArea:function(c){if(this.isIE){this.get_contentArea().setAttribute("contentEditable",""+c);
}},showExternalDialog:function(m,p,q,c,f,g,l,i,e,h,k,o){var j=this.getEditorSelectionRange();
var n=this;
var d=function(r,s){window.setTimeout(function(){if(j!=null){try{n.getSelection().selectRange(j);
}catch(u){}}if(f&&s!=null){var t=f(r,s);
if(false==t){return;
}n.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}n.setFocus();
},50);
};
this.get_dialogOpener().openUrl(m,p,q,c,d,g,l,i,e,h,k,o);
},showDialog:function(c,f,j){var h=this.getEditorSelectionRange();
var d=this;
var g=function(k,l){window.setTimeout(function(){if(h!=null&&c!="FindAndReplace"){try{d.getSelection().selectRange(h);
}catch(n){}}if(j&&l!=null){var m=j(k,l);
if(false==m){return;
}d.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}d.setFocus();
},50);
};
var i=this.get_dialogOpener();
if(c=="InsertLink"||c=="InsertImage"||c=="InsertTableLight"){i.openLight(c,f,g);
}else{i.open(c,f,g);
}if(this.isIE){var e=this.get_dialogOpener()._getDialogContainer(c);
if(!e||e._DRAG_ATTACHED){return;
}e._DRAG_ATTACHED=true;
e.add_dragEnd(function(){if(h!=null){try{d.getSelection().selectRange(h);
}catch(k){}}});
}},_getModeButtonsWrapper:function(){return this._getChildElement("ModesWrapper");
},_registerModeChangeHandler:function(c){if(c){this._onModeButtonClickDelegate=Function.createDelegate(this,this._onModeButtonClick);
$addHandler(this._getModeButtonsWrapper(),"click",this._onModeButtonClickDelegate);
}else{if(this._onModeButtonClickDelegate){$removeHandler(this._getModeButtonsWrapper(),"click",this._onModeButtonClickDelegate);
this._onModeButtonClickDelegate=null;
}}},_onModeButtonClick:function(h){var g=this.get_mode();
var c=a.Editor.Utils.getElementParentByTag(h.target,"LI");
if(c){var d=a.EditModes;
var f=Sys.UI.DomElement;
var i=c.getElementsByTagName("A")[0];
if(f.containsCssClass(i,"reMode_html")){g=d.Html;
}else{if(f.containsCssClass(i,"reMode_design")){g=d.Design;
}else{g=d.Preview;
}}}if(g!=this.get_mode()){this.set_mode(g);
}return $telerik.cancelRawEvent(h);
},_changeModeUI:function(j){var f=Sys.UI.DomElement;
var h=a.EditModes;
var e="reMode_";
switch(j){case h.Html:e+="html";
break;
case h.Design:e+="design";
break;
case h.Preview:e+="preview";
break;
}var d=this._getModeButtonsWrapper();
var k=d.getElementsByTagName("A");
for(var c=0;
c<k.length;
c++){var g=k[c];
f.removeCssClass(g,"reMode_selected");
if(f.containsCssClass(g,e)){f.addCssClass(g,"reMode_selected");
}}},_isEditModeEnabled:function(c){return c&this.get_editModes()?true:false;
},get_mode:function(){return this._mode;
},set_mode:function(h){if(!this.validateMaxHtmlLength()){this.displayMaxHtmlLengthErrorMessage();
return false;
}if(!this.validateMaxTextLength()){this.displayMaxTextLengthErrorMessage();
return false;
}this._setEditableDelegate=Function.createDelegate(this,function(){if(this._setEditableDelegate){this.remove_editReady(this._setEditableDelegate);
var j=(this._mode==i.Design);
this.set_editable(j);
this.toggleEnhancedEdit(j);
this._setEditableDelegate=null;
}});
this.add_editReady(this._setEditableDelegate);
var c=this._mode;
var i=a.EditModes;
if(c==i.Html||h==i.Html){var f=this.get_html(true);
this._mode=h;
this._showTextArea(this._mode==i.Html);
if(h==i.Design&&$telerik.isFirefox&&3.6==Sys.Browser.version){this.set_html(f,null,null,false);
}else{this.set_html(f);
}}else{this._mode=h;
this._showTextArea(this._mode==i.Html);
}this._changeModeUI(h);
if(this._mode!=i.Preview){this.setFocus();
if(this.isFirefox&&(!this.get_document()||!this.get_contentArea())){}else{this.set_editable(true);
}if(this._mode==i.Design){this.toggleEnhancedEdit(true);
}}else{this.set_editable(false);
this.toggleEnhancedEdit(false);
}this.setFocus();
var e=this.get_id();
var d=this.get_mainTable();
var g=d.offsetHeight+"px";
this.raiseEvent("modeChange",Sys.EventArgs.Empty);
this._updateEditorSize(g);
},_getTextIframe:function(){if(this._textIframe&&(!this._textIframe.contentWindow||(this._textIframe.contentWindow.document.body&&!this._textIframe.contentWindow.document.body.firstChild))){if(this._textIframe.parentNode){this._textIframe.parentNode.removeChild(this._textIframe);
}this._textIframe=null;
}if(!this._textIframe){var e=this._createIframe();
if(e){this._textIframe=e;
var c=this._textIframe.style;
c.position="absolute";
c.height="2px";
c.width="2px";
this.get_contentAreaElement().parentNode.appendChild(this._textIframe);
var g=this._textIframe.contentWindow.document;
if(!$telerik.isIE6||window.location.protocol!="https:"){g.designMode="off";
}var d=g.open("text/html","replace");
var f="<html style='height:100%;'><head><title>RadEditor HTML Mode</title></head><body style='overflow:hidden;margin:0px;padding:0px;height:100%'><textarea style='font:normal 11px Tahoma;color: #000080;border:0px;height:100%;width:100%;resize:none;'></textarea></body></html>";
if(typeof(d)=="undefined"){d=g;
}d.write(f);
d.close();
}}return this._textIframe;
},_getTextArea:function(){var c=this._getTextIframe();
if(c&&typeof(c.contentWindow)!="unknown"){return c.contentWindow.document.body.firstChild;
}else{return null;
}},get_textArea:function(){return this._getTextArea();
},_showTextArea:function(d){var e=this._getTextIframe();
var c=this.get_contentAreaElement();
if(d){if($telerik.isSafari&&this.get_contentAreaMode()!=a.EditorContentAreaMode.Div){c.style.width="0px";
c.style.height="0px";
}else{c.style.display="none";
}e.style.height="";
e.style.display="";
e.style.position="";
if(this.get_autoResizeHeight()){window.setTimeout(function(){e.style.height=(e.parentNode.offsetHeight-6)+"px";
},0);
}if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){e.style.position="";
window.setTimeout(function(){var f=e.parentNode.offsetHeight-3;
e.style.height=f+"px";
},0);
}else{e.style.height="100%";
}e.style.width="100%";
}else{if($telerik.isSafari&&this.get_contentAreaMode()!=a.EditorContentAreaMode.Div){c.style.width="100%";
c.style.height="100%";
}else{c.style.display="";
}e.style.display="none";
}},_setContentAsText:function(c){var d=this._getTextArea();
if(d){d.value=c;
}},_getContentAsText:function(){var d=this._getTextArea();
if(d&&d.value){var c=d.value;
return c;
}return"";
},set_html:function(g,e,d,f){var c=a.EditModes;
if(this.get_mode()!=c.Html){var h=new a.Editor.GenericCommand(e?e:"Set HTML",this.get_contentWindow(),this);
this._setContentAreaHtml(g);
this.executeCommand(h,d);
if(false!=f){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}}else{this._setContentAsText(g);
}},get_html:function(j){var c=null;
var h="";
var k=this.get_mode();
var e=a.EditModes;
if(k==e.Html){return this._getContentAsText();
}else{if(this.get_fullPage()){if(this.get_document()){c=this.get_document().getElementsByTagName("HTML")[0];
c=a.Editor.Utils.cloneNodeWithChildren(c);
var g=this._getAllSheets(c);
for(var d=0;
d<g.length;
d++){var f=g[d];
var l=f.getAttribute("id");
if(l&&l.indexOf("RADEDITORSTYLESHEET")==0){f.parentNode.removeChild(f);
}}if($telerik.isIE||$telerik.isOpera){c.getElementsByTagName("BODY")[0].removeAttribute("contentEditable");
}}}else{if(this.get_contentArea()){if(true==j){c=a.Editor.Utils.cloneNodeWithChildren(this.get_contentArea());
}else{c=this.get_contentArea();
}}}}if(c){if(true==j){h=this.get_filtersManager().getHtmlContent(c);
h=this._stripBodyTagFromContent(h);
}else{h=this.get_fullPage()?$telerik.getOuterHtml(c):c.innerHTML;
}}if(this.get_fullPage()&&this._doctypeString){h=this._doctypeString+"\n"+h;
}return h;
},set_initialContent:function(c){if(c!=null){this._initialContent=c;
}else{this._initialContent=this.get_html(true);
}},get_initialContent:function(){return this._initialContent;
},get_text:function(){var d=a.EditModes;
var e="";
if(this.get_mode()!=d.Html){var c=this.get_contentArea();
if(c){if(c.innerText){e=c.innerText;
}else{if(c.textContent!=null){e=c.textContent;
e=e.replace(/<!--(.|\s)*?-->/gi,"");
}else{e=c.innerHTML.replace(/<\/?[^>]*>/ig,"");
e=e.replace(/&nbsp;/gi,"");
}}}}else{e=this._getTextArea().value.replace(/<\/?[^>]*>/ig,"");
}return e;
},_getUniqueStyleSheetId:function(c){return"RADEDITORSTYLESHEET"+c;
},_getAllSheets:function(f){if(!f){alert("RadEditor._getAllSheets called with no document object provided");
}var d=f.getElementsByTagName("link");
var g=f.getElementsByTagName("style");
var h=[];
var c;
for(c=0;
d[c];
c++){var e=d[c].rel?d[c].rel:d[c].getAttribute("rel");
if(typeof(e)=="string"&&e.toLowerCase().indexOf("style")+1){Array.add(h,d[c]);
}}for(c=0;
g[c];
c++){Array.add(h,g[c]);
}return h;
},_getClassName:function(c){var d=c&&c.selectorText?c.selectorText:"";
var f=d.lastIndexOf(".");
if(f==-1){return"";
}var e=d.indexOf(" ",f);
if(-1==e){e=d.indexOf(":",f);
}if(-1==e){e=d.length;
}return d.substring((f+1),e);
},_createCssFilterObject:function(){if(this._cssClassesHash){return;
}var d=this.get_cssClasses();
if(d&&d.length>0){var h={};
var g=d.length;
for(var c=0;
c<g;
c++){var e=d[c][0];
var f=d[c][1];
h[e.replace(/(.*?)\./ig,function(i){return i.toUpperCase();
})]=f;
}this._cssClassesHash=h;
}},_getFilteredCssClasses:function(c){this._createCssFilterObject();
if(c&&this._cssClassesHash){var e=[];
var g=c.length;
for(var f=0;
f<g;
f++){var d=c[f];
if(outAlias=this._checkCssFilter(d[1].selectorText)){d[2]=outAlias;
e[e.length]=d;
}}return e;
}else{return c;
}},_checkCssFilter:function(c){if(!c||!this._cssClassesHash){return null;
}return this._cssClassesHash[c.replace(/(.*?)\./ig,function(d){return d.toUpperCase();
})];
},getCssArray:function(c){var f=this.get_document();
var g=[];
for(var d=0;
d<f.styleSheets.length;
d++){var h=f.styleSheets[d];
try{this._getStyleSheetRules(g,h,c);
}catch(j){}}g=this._getFilteredCssClasses(g);
return g;
},_getStyleSheetRules:function(m,n,d){var o=n.href;
if(o&&o.indexOf("WebResource.axd?")>-1){return;
}if(o&&o.indexOf(this.get_contentAreaCssFile())>-1){return;
}var i=(n.rules)?n.rules:n.cssRules;
if($telerik.isIE&&n.imports){for(var f=0;
f<n.imports.length;
f++){this._getStyleSheetRules(m,n.imports[f],d);
}}for(var e=0;
e<i.length;
e++){var c=i[e];
if(c&&c.cssText){var p=c.cssText.toLowerCase();
if(p.indexOf("@import")>=0&&c.parentStyleSheet&&c.styleSheet&&c.parentStyleSheet!=c.styleSheet){this._getStyleSheetRules(m,c.styleSheet,d);
continue;
}}var h=c&&c.selectorText?c.selectorText:"";
var g=h.lastIndexOf(".");
if(g<0){continue;
}g=h.lastIndexOf(":");
if(g>0){continue;
}var l=this._getClassName(c);
if(l!="reContentArea"){m[m.length]=[l,c];
}}},copyStyleSheets:function(o,n){if(null==o&&null==n){return;
}var h=0;
var d=null;
if(n.styleSheets.length==0){if(n.createStyleSheet){n.createStyleSheet();
}else{css=n.createElement("style");
css.media="all";
css.type="text/css";
var f=n.getElementsByTagName("head")[0];
f.appendChild(css);
d=css;
}}if(n.styleSheets[0]){d=n.styleSheets[0];
}for(var k=0;
k<o.styleSheets.length;
k++){try{var s=o.styleSheets[k];
var q=s.href;
var c=false;
if($telerik.isFirefox){if(s.ownerNode&&s.ownerNode.tagName.toLowerCase()=="style"){c=true;
}}if(q&&!c){continue;
}if(s.media){var m=s.media;
if(m.mediaText!=null){m=m.mediaText;
}if(m&&m!="all"&&m!="screen"){continue;
}}var r=(s.rules)?s.rules:s.cssRules;
for(var l=0;
l<r.length;
l++){var e=r[l];
if(d.addRule){var u=e.selectorText;
var t=e.style.cssText;
if(t&&u){d.addRule(u,t,h);
}}else{if(d.insertRule){d.insertRule(e.cssText,h);
}else{var t=e.selectorText+"{"+e.style.cssText+"}";
var g=n.createTextNode(t);
d.appendChild(g);
}}h++;
}}catch(p){}}},_contentAreaCommonInitialization:function(){var c=a.Editor.PopupController;
if(c){c.detachFromDocument(this.get_document());
c.attachToDocument(this.get_document());
}this._initEvents();
if(this.isVisible()){this.raiseEvent("firstShow");
}if(this.get_mode()!=a.EditModes.Preview){this.set_editable(true);
}else{this.set_editable(false);
}this.toggleEnhancedEdit(true);
if(this.get_document()&&this.get_contentArea()){this.raiseEvent("editReady",Sys.EventArgs.Empty);
}this._divContentAreaInitialized=true;
},_contentFrameLoadFunction:function(){this._execLoadFunctionSecondTime=false;
try{this.set_document(this.get_contentAreaElement().contentWindow.document);
this.set_contentWindow(this.get_contentAreaElement().contentWindow);
this.set_contentArea(this.get_document().body);
this.get_filtersManager().getDesignContentDom(this.get_contentArea());
var f=0;
a.Editor.Utils.addStyleSheet(this.get_contentAreaCssFile(),this.get_document(),this._getUniqueStyleSheetId(f++));
var m=this.get_tableLayoutCssFile();
if(m){a.Editor.Utils.addStyleSheet(m,this.get_document(),this._getUniqueStyleSheetId(f++));
}var j=this.get_cssFiles();
if(j.length>0){for(var c=0;
c<j.length;
c++){var d=this._getUniqueStyleSheetId(f++);
a.Editor.Utils.addStyleSheet(j[c],this.get_document(),d);
}}else{if(!this.get_fullPage()){this.copyStyleSheets(document,this.get_document());
var g=this._getAllSheets(document);
for(var c=0;
c<g.length;
c++){var d=this._getUniqueStyleSheetId(f++);
var h=g[c];
if(h.tagName=="LINK"){var l=h.href;
if(!l||l.indexOf("WebResource.axd?")>-1){continue;
}if(h.rel&&h.rel.toLowerCase()!="stylesheet"){continue;
}if(h.media&&h.media!="all"&&h.media!="screen"){continue;
}a.Editor.Utils.addStyleSheet(h.getAttribute("href"),this.get_document(),d);
}else{if(h.tagName=="STYLE"){}}}}}this._contentAreaCommonInitialization();
}catch(k){}},_extractDoctype:function(c){var e=new RegExp("(<!DOCTYPE[^>]+>)","g");
var d=c.match(e);
return d?d[0]:"";
},_setContentAreaHtml:function(c,k){var g=this.get_filtersManager().getDesignContent(c);
var h=null;
if(-1!=g.toLowerCase().indexOf("<html")){this.set_fullPage(true);
h=g;
this._doctypeString=this._extractDoctype(h);
}else{this.set_fullPage(false);
}if(this.get_fullPage()&&this.get_contentAreaMode()==a.EditorContentAreaMode.Div){alert("Error! Set EditorContentAreaMode to Iframe if you want to edit full page HTML");
g=g.replace(/^[\s\S]*<html[\s\S]+?<body[^>]*>([\s\S]*?)<\/body>[\s\S]*$/gi,"$1");
this.set_fullPage(false);
}if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){this.set_contentArea(this.get_contentAreaElement());
this.set_document(this.get_contentArea().ownerDocument);
this.set_contentWindow(window);
if(g.match(/<form[\s>]/i)){alert("Error! Form elements are only supported when the content area is set to Iframe!");
g="";
}a.Editor.Utils.setElementInnerHtml(this.get_contentArea(),g);
this.get_filtersManager().getDesignContentDom(this.get_contentArea());
if(!this._divContentAreaInitialized){this._contentAreaCommonInitialization();
}return;
}if(null!=h||true==k){var d="";
if(this.isOpera){d=" style='height:100%'";
}if(!h){h="<head><style></style></head><body"+d+">"+g+"</body>";
}if($telerik.isFirefox){var f=Function.createDelegate(this,function(){if(this._execLoadFunctionSecondTime){this._contentFrameLoadFunction();
}});
$addHandler(this.get_contentAreaElement(),"load",f);
}try{var j=this.get_contentAreaElement().contentWindow.document;
j.open();
j.write(h);
j.close();
this._execLoadFunctionSecondTime=false;
if(j.body){this._contentFrameLoadFunction();
}else{this._execLoadFunctionSecondTime=true;
}}catch(i){}}else{a.Editor.Utils.setElementInnerHtml(this.get_contentArea(),g);
this.get_filtersManager().getDesignContentDom(this.get_contentArea());
}},_createUI:function(){if(this._created){return;
}this._registerModeChangeHandler(true);
this._tableElement=this.get_mainTable();
var c=$get(this.get_id()+"Center");
var d=this.get_contentAreaElement();
c.appendChild(d);
this._created=true;
},_updateEditorSize:function(d,e){var f=this._tableElement;
var c=d?d:f.style.height;
if(true==e||c=="auto"){c=f.offsetHeight+"px";
}if(parseInt(c)==0){return;
}c=parseInt(c)+"px";
f.style.height=c;
if(this.isIE){this._fixIeHeight(f,c);
}this._fixMoreSizeIssues();
var g=this.get_element();
if(g.style.height!="auto"){g.style.height=c;
}},_fixIeHeight:function(d,c){if("CSS1Compat"==document.compatMode){var e=(d.offsetHeight-parseInt(c));
if(e>0){var f=(parseInt(d.style.height)-e);
if(f>0){d.style.height=f+"px";
}}}},_fixMoreSizeIssues:function(){var g=(this.get_contentAreaMode()==a.EditorContentAreaMode.Div);
var j=this.get_autoResizeHeight();
if(j&&!g){return;
}else{if(j&&this._isFullScreen!=true&&$telerik.isIE){window.setTimeout(Function.createDelegate(this,function(){var n=this.get_mainTable();
var m=this.get_element();
m.style.height="auto";
if(""==m.style.minHeight){m.style.minHeight=n.offsetHeight+"px";
}if(""==m.style.minWidth){m.style.minWidth=n.offsetWidth+"px";
}if(m.style.width.indexOf("%")<0){m.style.width=(n.offsetWidth-6)+"px";
}var l=$get(this.get_id()+"Center");
var k=this.get_contentAreaElement();
k.style.height="auto";
if(""==k.style.minHeight){k.style.minHeight=l.offsetHeight+"px";
}if(""==k.style.minWidth){k.style.minWidth=(l.offsetWidth-12)+"px";
}}),0);
}else{var i=this.get_mainTable();
if(i.offsetWidth==0){return;
}var d=this.get_element();
var e=$get(this.get_id()+"Center");
var f=this.get_contentAreaElement();
if(e.style.height!="100%"){e.style.height="100%";
}if(this._isFullScreen){d.style.minHeight="";
d.style.minWidth="";
if($telerik.isOpera){f.style.height="0px";
var h=e.offsetHeight;
f.style.height=h+"px";
e.style.height=h+"px";
}if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){f.style.height=($telerik.isIE)?"100%":f.parentNode.offsetHeight+"px";
}}else{if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){f.style.position="absolute";
var h=e.offsetHeight-2;
f.style.position="relative";
f.style.height=h+"px";
if(f.offsetHeight>0){i.style.height=(parseInt(i.style.height)-6)+"px";
f.style.height=(f.offsetHeight-12)+"px";
}}else{if(!$telerik.isIE){f.style.position="absolute";
var h=e.offsetHeight;
f.style.position="";
if(h<160&&e.offsetHeight>h+2){e.style.height=(h-6)+"px";
}}if($telerik.isOpera){f.style.height="100%";
if(e.style.height=="100%"){e.style.height=(2*e.offsetHeight-e.parentNode.parentNode.offsetHeight-13)+"px";
}}}if(""==d.style.minHeight){d.style.minHeight=i.style.height;
}if(""==d.style.minWidth){d.style.minWidth=i.offsetWidth+"px";
}if(d.style.width.indexOf("%")<0){d.style.width=i.offsetWidth+"px";
}if(g&&j){d.style.height="auto";
var e=$get(this.get_id()+"Center");
var c=this.get_contentAreaElement();
c.style.height="auto";
if(""==c.style.minHeight){c.style.minHeight=e.offsetHeight+"px";
}if(""==c.style.minWidth){c.style.minWidth=(e.offsetWidth-12)+"px";
}}}}}},setSize:function(d,c){var h=parseInt(d);
var e=parseInt(c);
var f=this.get_mainTable();
if(f&&f.style){f.style.height="";
var g=f.parentNode;
g.style.width=h+"px";
g.style.height=e+"px";
this._fixIeHeight(g,e);
if($telerik.isIE){f.style.height=e+"px";
this._fixIeHeight(f,e);
}else{f.style.height="100%";
}}},pasteHtml:function(i,p,h,f,o){if(!this.get_editable()){return;
}var e=new a.EditorCommandEventArgs(p,null,i);
if(false==this._executeCommandEvent("pasteHtml",p,e)){return;
}if(i!=e.get_value()){i=e.get_value();
}var j=this.getLocalizedString(p);
var c=this.get_mode();
if(a.EditModes.Design==c){this.setFocus();
this.executeCommand(new a.Editor.PasteHtmlCommand(j,this.get_contentWindow(),i,h,this),null,o);
if(f!=false){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}}else{if(a.EditModes.Html==c){var g=this._getTextArea();
if(this.isIE){g.setActive();
var d=document.selection.createRange();
d.text=i;
}else{if(g.setSelectionRange){var m=g.selectionStart;
var k=g.selectionEnd;
var l=g.value.substring(m,k);
var n=i;
g.value=g.value.substring(0,m)+n+g.value.substring(k);
g.setSelectionRange(m+n.length,m+n.length);
this.setFocus();
}}}}},fire:function(h,f){if(h!="Copy"){this._saveTypedContent(true,"editor.fire Copy executing");
}if(false==this._executeCommandEvent("commandExecuting",h,f)){return;
}if(this._optionalIgnoredTools&&!this._optionalIgnoredTools[h]){return;
}this.setActive();
this._pendingTextTypeCmd=null;
var d=a.Editor.CommandList[h];
var c=false;
if(d){c=(false!=d(h,this,f));
}else{alert("The command "+h+" is not implemented yet.");
}if(c){if(!$telerik.isOpera){this.setFocus();
}this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}this._executeCommandEvent("commandExecuted",h,f);
try{if(h=="Undo"&&!$telerik.isIE&&this.get_contentArea().innerHTML.toLowerCase().trim()=="<br>"){this.get_contentArea().innerHTML="<br>";
}}catch(g){}},_executeCommandEvent:function(d,e,c){if(!c){c=new a.EditorCommandEventArgs(e);
}this.raiseEvent(d,c);
if(c.get_cancel&&c.get_cancel()){return false;
}return true;
},_onWindowResize:function(){var c=this._getViewportBounds();
this.setSize(c.width,c.height,false);
},_registerWindowResizeHandler:function(c){if(c){this._onWindowResizeDelegate=Function.createDelegate(this,this._onWindowResize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
}else{if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowResizeDelegate=null;
}}},_getViewportBounds:function(){var e=$telerik.getClientBounds();
var c=document.documentElement.scrollLeft||document.body.scrollLeft;
var d=document.documentElement.scrollTop||document.body.scrollTop;
e.scrollLeft=c;
e.scrollTop=d;
return e;
},_handleParentsWithOverflow:function(e){if(false==e){if(!this._parentsWithOverflow){return;
}var j=this._parentsWithOverflow;
var h=j.length;
for(var d=0;
d<h;
d++){var c=j[d];
if(c[0]){var f=c[0].style;
f.overflow=c[1];
f.height=c[2];
f.tableLayout=c[3];
f.position=c[4];
}}this._parentsWithOverflow=null;
}else{this._parentsWithOverflow=[];
var j=this._parentsWithOverflow;
var g=this.get_element().parentNode;
while(g&&g.tagName!="BODY"){var f=g.style;
j[j.length]=[g,f.overflow,f.height,f.tableLayout,f.position];
f.position="static";
f.tableLayout="auto";
f.overflow="visible";
f.height="auto";
g=g.parentNode;
}}},isFullScreen:function(){return this._isFullScreen;
},_disableBodyScroll:function(){this._preFullScreenBodyStyle=[document.body.scroll,document.body.style.margin,""];
document.body.scroll="no";
document.body.style.margin="0px";
if(document.documentElement){this._preFullScreenBodyStyle[2]=document.documentElement.style.overflow;
document.documentElement.style.overflow="hidden";
}this._handleParentsWithOverflow(true);
},_enableBodyScroll:function(){if(!this._preFullScreenBodyStyle){return;
}document.body.scroll=this._preFullScreenBodyStyle[0];
try{document.body.style.margin=this._preFullScreenBodyStyle[1];
}catch(c){}document.documentElement.style.overflow=this._preFullScreenBodyStyle[2];
this._handleParentsWithOverflow(false);
this._preFullScreenBodyStyle=null;
},toggleScreenMode:function(){var c=this;
var f=c.get_element();
if(!c._isFullScreen){this._disableBodyScroll();
var i=f.style.height;
if(i=="auto"||isNaN(parseInt(i))){i=f.offsetHeight+"px";
}var d=f.style.width;
if(d=="auto"||isNaN(parseInt(d))){d=f.offsetWidth+"px";
}c._preFullScreenBounds={width:d,height:i};
c._onWindowResize();
c._preFullScreenBrowserRect=c._getViewportBounds();
var g=$telerik.getLocation(f);
a.Editor.Utils.restoreBrowserPosition(g.x,g.y);
c._isFullScreen=true;
c._registerWindowResizeHandler(true);
}else{c._registerWindowResizeHandler(false);
this._enableBodyScroll();
c._isFullScreen=false;
var e=c._preFullScreenBounds;
c.setSize(e.width,e.height,false);
f.style.width=e.width;
f.style.height=e.height;
var g=c._preFullScreenBrowserRect;
a.Editor.Utils.restoreBrowserPosition(g.scrollLeft,g.scrollTop);
}c._updateEditorSize(f.style.height);
c.set_editable(true);
c.setFocus();
var h=c.getToolByName("ToggleScreenMode");
if(h){h.setOn(c._isFullScreen);
}this.raiseEvent("toggleScreenMode",Sys.EventArgs.Empty);
},validateMaxTextLength:function(g){var h=this.get_maxTextLength();
if(h>0){if(!g){g="";
}var f=this.get_text()+g;
var e=/[!\.?;,:&_\-\?\{\}\[\]\(\)~#'"]/g;
f=f.replace(e,"");
var d=/(^\s+)|(\s+$)/g;
f=f.replace(d,"");
var c=/(\r\n)+/g;
f=f.replace(c,"");
return h>f.length;
}return true;
},validateMaxHtmlLength:function(c){var d=this.get_maxHtmlLength();
if(d>0){if(!c){c="";
}return d>this.get_html(true).length+c.length;
}return true;
},displayMaxHtmlLengthErrorMessage:function(){alert(this.get_localization()["exceededhtmllength"]+" "+this.get_maxHtmlLength()+". "+this.get_localization()["reducetheconentlength"]+".");
},displayMaxTextLengthErrorMessage:function(){alert(this.get_localization()["exceededtextlength"]+" "+this.get_maxTextLength()+". "+this.get_localization()["reducetheconentlength"]+".");
},get_contentHiddenTextareaValue:function(){if(this._contentHiddenTextarea){return a.Editor.Utils.decodePostbackContent(this._contentHiddenTextarea.value);
}else{return"";
}},set_contentHiddenTextareaValue:function(c){this._contentHiddenTextarea.value=a.Editor.Utils.encodePostbackContent(c);
},get_localization:function(){return this._localization;
},_createIframe:function(){var c=document.createElement("iframe");
c.frameBorder="0";
c.src="javascript:'<html></html>';";
var d=c.style;
d.width="100%";
d.height="100%";
d.margin="0px";
d.padding="0px";
return c;
},get_contentAreaElement:function(){if((this.get_contentAreaMode()==a.EditorContentAreaMode.Iframe)&&(this._contentAreaElement&&(!this._contentAreaElement.contentWindow||!this._contentAreaElement.contentWindow.document))){if(this._contentAreaElement.parentNode){this._contentAreaElement.parentNode.removeChild(this._contentAreaElement);
}this._contentAreaElement=null;
}if(!this._contentAreaElement){var c;
if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){c=document.createElement("div");
c.setAttribute("id",this.get_id()+"_contentDiv");
c.className="reContentArea";
}else{c=this._createIframe();
if(!$telerik.isIE){c.innerHTML="Your browser does not support inline frames or is currently configured not to display inline frames.";
}c.setAttribute("title","Rich text editor with ID "+this.get_id());
c.setAttribute("id",this.get_id()+"_contentIframe");
}this._contentAreaElement=c;
}return this._contentAreaElement;
},get_shortCutManager:function(){return this._shortCutManager;
},get_filtersManager:function(){return this._filtersManager;
},get_commandsManager:function(){return this._commandsManager;
},get_modulesManager:function(){return this._modulesManager;
},get_useClassicDialogs:function(){return this.get_dialogOpener().get_useClassicDialogs();
},set_useClassicDialogs:function(c){this.get_dialogOpener().set_useClassicDialogs(c);
},get_qualifiedSkin:function(){var c=this.get_skin();
return"RadEditor."+c;
},_updateHiddenTextarea:function(){var f=this.get_html(true);
if(this.get_mode()==a.EditModes.Html&&this.get_contentFilters()!=a.EditorFilters.None){if(!this._textSubmitFrame){var g=this._createIframe();
if(g){this._textSubmitFrame=g;
var l=this._textSubmitFrame.style;
l.position="absolute";
l.height="0px";
l.width="0px";
this.get_contentAreaElement().parentNode.appendChild(this._textSubmitFrame);
}}if(this._textSubmitFrame){var j=this._textSubmitFrame.contentWindow.document;
var k=this.get_filtersManager().getDesignContent(f);
var i=-1!=k.toLowerCase().indexOf("<html");
var h=i?this._extractDoctype(k):"";
if(!$telerik.isIE6||window.location.protocol!="https:"){j.designMode="off";
}var e=j.open("text/html","replace");
var d=i?k:"<html><head><title>New Document</title></head><body>"+k+"</body></html>";
if(typeof(e)=="undefined"){e=j;
}e.write(d);
e.close();
if(e.body){this.get_filtersManager().getDesignContentDom(e.body);
var c=i?e.getElementsByTagName("HTML")[0]:e.body;
f=h+this.get_filtersManager().getHtmlContent(c);
f=this._stripBodyTagFromContent(f);
}}}this.set_contentHiddenTextareaValue(f);
return f;
},_stripBodyTagFromContent:function(c){c=c.trim();
var d=(this.get_contentAreaMode()==a.EditorContentAreaMode.Div)?"<div":"<body";
var e=c.match(new RegExp(d+"[^>]*>","i"));
if(e&&e.index==0){c=c.substring(c.indexOf(">")+1,c.length-2-d.length);
c=c.trim();
}return c;
},_registerClientValidation:function(){if(typeof(Page_ClientValidate)=="function"){var c=Page_ClientValidate;
Page_ClientValidate=Function.createDelegate(this,function(e){var f=this.get_element();
if(f){var d=this._updateHiddenTextarea();
f.value=d;
f.setAttribute("value",d);
}f=null;
return c(e);
});
}},saveContent:function(f,d){if(this._saveContentDelegate){var c=null;
if(!this.validateMaxHtmlLength()){c=1;
}else{if(!this.validateMaxTextLength()){c=2;
}}if(c){if(d){if(d.set_cancel){d.set_cancel(true);
}}else{if(c==1){this.displayMaxHtmlLengthErrorMessage();
}else{if(c==2){this.displayMaxTextLengthErrorMessage();
}}}return $telerik.cancelRawEvent(f);
}else{this.raiseEvent("submit",Sys.EventArgs.Empty);
this._updateHiddenTextarea();
}}},_registerPostBackHandlers:function(){this._saveContentDelegate=Function.createDelegate(this,this.saveContent);
var e=this._contentHiddenTextarea.form;
if(e){$telerik.addExternalHandler(e,"submit",this._saveContentDelegate);
}if(typeof(__doPostBack)!="undefined"){var f=this._saveContentDelegate;
var g=__doPostBack;
__doPostBack=function(i,j){f();
g(i,j);
};
}if(typeof(Sys.WebForms)!="undefined"&&typeof(Sys.WebForms.PageRequestManager)!="undefined"){var d=Sys.WebForms.PageRequestManager.getInstance();
if(d){if(null!=d._onSubmitStatements&&!$telerik.isIE){var c=this;
var h={};
Array.add(d._onSubmitStatements,function(){c.saveContent(null,h);
return true;
});
}else{d.add_initializeRequest(this._saveContentDelegate);
}}d=null;
}e=null;
},toggleEnhancedEdit:function(d){if(this.get_contentAreaMode()==a.EditorContentAreaMode.Div){var c=this.get_contentArea();
if(typeof(d)=="undefined"||null==d){d=(c.className.indexOf("reContentAreaToggle")>-1)?false:true;
}if(d){Sys.UI.DomElement.addCssClass(c,"reContentAreaToggle");
}else{Sys.UI.DomElement.removeCssClass(c,"reContentAreaToggle");
}this.updateToggleTableBorderToolState(d);
return d;
}else{var e=this.get_document();
if(!e||!e.getElementById){return false;
}var f=e.getElementById(this._getUniqueStyleSheetId(0));
if(f){if(d==null){d=f.disabled;
}f.disabled=!d;
this.updateToggleTableBorderToolState(d);
return d;
}else{return false;
}}},updateToggleTableBorderToolState:function(d){var c=this.getToolByName("ToggleTableBorder");
if(c){c.setOn(d);
}},pasteHyperLink:function(e,f){var d=this.getSelection().getParentElement();
if($telerik.isFirefox&&d.tagName=="A"){d.parentNode.removeChild(d);
}else{this.fire("Unlink");
}var c=a.Editor.Utils.getOuterHtml(e);
if($telerik.isIE&&e.getElementsByTagName("P").length==1){c=this.replaceParagraphAndAnchor(c);
}this.pasteHtml(c,f);
},replaceParagraphAndAnchor:function(c){var d=c+"";
var e=function(j,g,f,i,h){return f+g;
};
d=d.replace(/(<A[^>]*>)\s*(<P[^>]*>)/ig,e);
d=d.replace(/(<\/P[^>]*>)\s*(<\/A[^>]*>)/ig,e);
return d;
},_saveTypedContent:function(d,c){if(this._pendingTextTypeCmd){this._pendingTextTypeCmd.update();
}if(true!=d){this._pendingTextTypeCmd=null;
}},_attachBodyHandlers:function(d){var c=null;
if(this.get_document()&&this.get_contentArea()){c=this.get_contentArea();
}if(!c){return;
}if(d){this._onResizeStartDelegate=Function.createDelegate(this,this._onResizeStart);
this._onResizeEndDelegate=Function.createDelegate(this,this._onResizeEnd);
this._onDropDelegate=Function.createDelegate(this,this._onDrop);
$telerik.addExternalHandler(c,"resizestart",this._onResizeStartDelegate);
$telerik.addExternalHandler(c,"resizeend",this._onResizeEndDelegate);
$telerik.addExternalHandler(c,"drop",this._onDropDelegate);
if($telerik.isIE){this._onDragEndDelegate=Function.createDelegate(this,this._onDragEnd);
this._onDragStartDelegate=Function.createDelegate(this,this._onDragStart);
$telerik.addExternalHandler(c,"dragend",this._onDragEndDelegate);
$telerik.addExternalHandler(c,"dragstart",this._onDragStartDelegate);
}this._onPasteDelegate=Function.createDelegate(this,this._onPaste);
this._onBeforePasteDelegate=Function.createDelegate(this,this._onBeforePaste);
if($telerik.isIE7){$telerik.addExternalHandler(c,"beforepaste",this._onBeforePasteDelegate);
}if($telerik.isIE&&!$telerik.isIE7){$telerik.addExternalHandler(c,"paste",this._onPasteDelegate);
}if($telerik.isFirefox||$telerik.isSafari){$telerik.addExternalHandler(c,"paste",this._onBeforePasteDelegate);
}}else{if(this._onResizeStartDelegate){$telerik.removeExternalHandler(c,"resizestart",this._onResizeStartDelegate);
}if(this._onResizeEndDelegate){$telerik.removeExternalHandler(c,"resizeend",this._onResizeEndDelegate);
}if(this._onDropDelegate){$telerik.removeExternalHandler(c,"drop",this._onDropDelegate);
}if(this._onDragEndDelegate){$telerik.removeExternalHandler(c,"dragend",this._onDragEndDelegate);
}if(this._onDragStartDelegate){$telerik.removeExternalHandler(c,"dragstart",this._onDragStartDelegate);
}if(this._onBeforePasteDelegate&&$telerik.isIE7){$telerik.removeExternalHandler(c,"beforepaste",this._onBeforePasteDelegate);
}if(this._onPasteDelegate&&$telerik.isIE&&!$telerik.isIE7){$telerik.removeExternalHandler(c,"paste",this._onPasteDelegate);
}if(this._onBeforePasteDelegate&&($telerik.isFirefox||$telerik.isSafari)){$telerik.removeExternalHandler(c,"paste",this._onBeforePasteDelegate);
}this._onResizeStartDelegate=null;
this._onResizeEndDelegate=null;
this._onDropDelegate=null;
this._onDragEndDelegate=null;
this._onDragStartDelegate=null;
this._onPasteDelegate=null;
this._onBeforePasteDelegate=null;
}},_initEvents:function(){var c=this;
if(!this.isIE){this.attachEventHandler("keypress",function(f){if(c._onKeyPressed(f)){f.preventDefault();
return false;
}});
if(this.isFirefox&&this.get_contentAreaMode()!=a.EditorContentAreaMode.Div){this.attachEventHandler("click",function(f){if(!c.get_editable()){return;
}window.setTimeout(function(){c.set_editable(true);
c.setFocus();
},100);
});
}}this.attachEventHandler("keydown",function(h){if(c.isOpera){return c._onKeyDown(h);
}else{c._onKeyDown(h);
}if($telerik.isSafari){var f=c._shortCutManager.isShortCutHit(h);
if(null!=f){var g=f.get_name();
switch(g){case"Bold":case"Italic":case"Underline":$telerik.cancelRawEvent(h);
break;
}}}});
this.attachEventHandler("onmousedown",function(){c._saveTypedContent(false,"Saving typed content onmousedown");
});
this.attachEventHandler("keyup",Function.createDelegate(this,this._onKeyUp));
var d=Function.createDelegate(this,function(f){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
});
this.attachEventHandler("mouseup",d);
$telerik.addExternalHandler(document.body,"dragend",Function.createDelegate(this,this._onDocumentDragEnd));
this._attachBodyHandlers(true);
},_onKeyDown:function(o){var k=o.keyCode;
switch(k){case 46:if($telerik.isOpera){this.get_document().execCommand("Delete");
this.get_contentArea().contentEditable=true;
if(this.get_contentAreaMode()!=a.EditorContentAreaMode.Div){this.get_document().designMode="on";
}this.get_contentArea().focus();
return $telerik.cancelRawEvent(o);
}case 8:this._shortcutHit=false;
if(this.getSelectionHtml()){this._saveTypedContent(false,"Saving typed content before allowing delete to proceed..");
this._pendingTextTypeCmd=new a.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this.get_contentWindow(),this);
this._hasDeleteExecuted=true;
}if(this.isIE){var d=this;
var p=function(){var e=d.getSelectedElement();
if(e&&e.tagName=="EMBED"){e.setAttribute("hidden","true");
e.setAttribute("id","FileToDelete");
window.setTimeout(function(){var q=d.get_document().getElementById("FileToDelete");
if(q.parentNode&&q.parentNode.removeChild){q.parentNode.removeChild(q);
}},100);
$telerik.cancelRawEvent(o);
return true;
}};
var g=p();
if(g){return false;
}try{var m=d.get_document().selection.createRange();
var n=null;
if(m&&m.duplicate){n=m.duplicate();
}if(8==o.keyCode){m.moveStart("character",-1);
}else{m.moveEnd("character",1);
}if(m.parentElement().tagName=="EMBED"){m.select();
p();
if(n&&n.select){n.select();
}}}catch(h){}var j=new a.Editor.Selection(this.get_contentWindow());
if(j&&j.isControl()){var l=j.getRange();
l.execCommand("Delete");
$telerik.cancelRawEvent(o);
}}return;
}var c=o.target?o.target:o.srcElement;
if(c&&"INPUT"!=c.tagName){var i=this._shortCutManager.isShortCutHit(o);
if(null!=i&&i.get_name()=="Copy"){this._shortcutHit=false;
return;
}this._shortcutHit=(null!=i);
if(this._shortcutHit){this.fire(i.get_name());
}else{if(a.Editor.Utils.isCursorMovingKey(o.keyCode)){if(!this._hasCursorMoved){this._saveTypedContent(false,"Saving typed content before letting the cursor move");
}this._hasCursorMoved=true;
return;
}if(32==o.keyCode||13==o.keyCode||!a.Editor.Utils.isSystemKey(o.keyCode)){if(this._hasCursorMoved){this._pendingTextTypeCmd=new a.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this.get_contentWindow(),this);
this.executeCommand(this._pendingTextTypeCmd);
this._hasCursorMoved=false;
return;
}if(!this._pendingTextTypeCmd){this._pendingTextTypeCmd=new a.Editor.TextTypeCommand(this.getLocalizedString("Typing"),this.get_contentWindow(),this);
this.executeCommand(this._pendingTextTypeCmd);
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}}}if(this._shortcutHit){if($telerik.isIE||$telerik.isSafari){var f=i.get_name();
if(f=="Cut"||f=="Paste"){return;
}$telerik.cancelRawEvent(o);
}}}},_onKeyUp:function(c){if(this._hasDeleteExecuted){if(this._pendingTextTypeCmd){this.executeCommand(this._pendingTextTypeCmd);
}this._pendingTextTypeCmd=null;
this._hasDeleteExecuted=false;
return;
}if(this._pendingTextTypeCmd){return;
}if(this._pendingCutPasteCommand){this.executeCommand(this._pendingCutPasteCommand);
this._pendingCutPasteCommand=null;
}if(this._shortcutHit){return false;
}this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
},_onKeyPressed:function(i){if($telerik.isSafari&&!this.get_newLineBr()){var f=this.get_contentWindow().getSelection();
var c=f&&f.rangeCount?f.getRangeAt(0):null;
var j=c?c.commonAncestorContainer:null;
if(j){if(j.nodeType==1&&j.nodeName=="DIV"){j=j.firstChild;
}var h=j.parentNode;
var d=null;
var g=[c.startContainer,c.startOffset,c.endContainer,c.endOffset];
if(i.keyCode==13&&h.nodeName=="DIV"&&h.childNodes.length==1&&((j.nodeType==3)||(j.nodeType==1&&j.nodeName=="BR"))){d=h.ownerDocument.createElement("p");
if(h.parentNode.lastchild==h){h.parentNode.appendChild(d);
}else{h.parentNode.insertBefore(d,h.nextSibling);
}d.appendChild(h);
Telerik.Web.UI.Editor.Utils.removeNode(h);
h=null;
}if(h&&h.nodeName=="BODY"&&j.nodeType==3){d=h.ownerDocument.createElement("p");
if(h.lastchild==j){h.appendChild(d);
}else{h.insertBefore(d,j.nextSibling);
}d.appendChild(j);
var k=d.nextSibling;
if(k&&k.nodeType==1&&k.nodeName=="BR"){d.parentNode.removeChild(k);
}k=null;
}if(d){f.removeAllRanges();
c=d.ownerDocument.createRange();
c.setStart(g[0],g[1]);
c.setEnd(g[2],g[3]);
f.addRange(c);
}}}if(!this._pendingTextTypeCmd){this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}if(this._shortcutHit&&!this._pendingCutPasteCommand){return true;
}},_onPaste:function(g){if(this.get_stripFormattingOptions()==a.StripFormattingOptions.NoneSupressCleanMessage){return;
}var f=this.getSelection().getRange();
var d=a.Editor.Utils.getClipboardAsHtml();
var h=(this.get_contentFilters()&a.EditorFilters.RemoveScripts)>0;
var c=a.Editor.Utils.cleanPastedContent(d,this.get_stripFormattingOptions(),this.get_localization()["askwordcleaning"],h);
if(c){var e=this;
window.setTimeout(function(){e.getSelection().selectRange(f);
e.pasteHtml(c,"Paste");
},5);
return $telerik.cancelRawEvent(g);
}return true;
},_onBeforePaste:function(i){if(!i){return;
}if(this.get_stripFormattingOptions()==a.StripFormattingOptions.NoneSupressCleanMessage){return;
}var h=new a.Editor.GenericCommand("Paste",this.get_contentWindow(),this);
var e=this.getSelection().getRange();
var f=this.createRestorePoint();
var c=$telerik.isSafari?this.get_document():document;
var d=a.Editor.Utils.getPasteContainer(c);
d.innerHTML="";
if(this.get_contentAreaMode()!=a.EditorContentAreaMode.Div){if(d.setActive){d.setActive();
}else{if($telerik.isFirefox){var j=this.getSelection();
var k=j.getRange();
if(k.selectNodeContents){k.selectNodeContents(d);
}j.selectRange(k);
}else{if($telerik.isSafari){d.innerHTML="&nbsp;";
var j=this.getSelection();
var k=this.get_document().createRange();
k.setStart(d.firstChild,0);
k.setEnd(d.firstChild,1);
j.selectRange(k);
}}}}var g=Function.createDelegate(this,this._onAfterPaste);
window.setTimeout(function(){g(h,e,f,d);
},0);
},_onAfterPaste:function(h,e,f,j){var d=j.innerHTML;
if($telerik.isSafari){var i=d.length;
d=d.replace(/<div[^>]+id=\"radePasteHelper\"[^>]*>(.*?)<\/div>/gi,"$1<br/>");
if(i>d.length&&d.endsWith("<br/>")){d=d.substring(0,d.length-5);
}}var g=(this.get_contentFilters()&a.EditorFilters.RemoveScripts)>0;
var c=a.Editor.Utils.cleanPastedContent(d,this.get_stripFormattingOptions(),this.get_localization()["askwordcleaning"],g);
if($telerik.isSafari){Telerik.Web.UI.Editor.Utils.clearPasteContainer();
}this._pendingCutPasteCommand=null;
if($telerik.isIE){this.getSelection().selectRange(e);
}else{if(f){f.select();
}}if(c){this.pasteHtml(c,"Paste");
if($telerik.isSafari){this.getSelection().collapse(false);
}this.executeCommand(h);
}},_onResizeStart:function(f){var c=this.getSelectedElement();
if(c==f.srcElement){var d=this.get_localization()["ResizeCommand"]||"Resize";
this._pendingResizeCmd=new a.Editor.GenericCommand(d,this.get_contentWindow(),this);
}},_onResizeEnd:function(c){if(this._pendingResizeCmd){this.executeCommand(this._pendingResizeCmd);
}},_onDragStart:function(g){var f=this.get_localization()["MoveCommand"]||"Move";
this._pendingMoveCommand=new a.Editor.GenericCommand(f,this.get_contentArea(),this);
this._startRange=null;
if(!g.ctrlKey&&!g.ctrlLeft){this._startRange=this.get_contentWindow().document.selection.createRange();
if(this._startRange.length){var c=this.get_contentWindow().document.body.createTextRange();
var d=this._startRange.item(0);
if("IMG"==d.tagName&&"A"==d.parentNode.tagName&&d.parentNode.childNodes.length==1){d=d.parentNode;
}c.moveToElementText(d);
this._startRange=c;
}}},_onDragEnd:function(f){if(this._pendingMoveCommand){if(this._startRange){var d=this.get_contentWindow().document.selection.createRange();
if(d.length){var c=this.get_contentWindow().document.body.createTextRange();
c.moveToElementText(d.item(0));
d=c;
}try{if(d.compareEndPoints&&0!=d.compareEndPoints("StartToStart",this._startRange)&&0!=d.compareEndPoints("EndToEnd",this._startRange)){this._startRange.execCommand("Delete",false,null);
}}catch(f){}}this.executeCommand(this._pendingMoveCommand);
this._pendingMoveCommand=null;
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}},_onDrop:function(d){this._saveTypedContent(false,"on drop operation executing");
var c=this.get_localization()["Drop"]||"Drop external content";
this._pendingDockCommand=new a.Editor.GenericCommand(c,this.get_contentWindow(),this);
},_onDocumentDragEnd:function(c){if(!this._pendingDockCommand){return;
}this.executeCommand(this._pendingDockCommand);
this._pendingDockCommand=null;
this.raiseEvent("selectionChange",Sys.EventArgs.Empty);
}};
b.registerControlProperties(a.RadEditor,{ajaxSpellCheckScriptReference:"",spellAllowAddCustom:true,spellCheckJSON:{},enableUndoRedo:true,toolAdapter:null,fullPage:null,dialogOpener:null,links:[],colors:["","#000000","#eeece1","#1f497d","#4f81bd","#c0504d","#9bbb59","#8064a2","#4bacc6","#f79646","#ffffff","#7f7f7f","#ddd9c3","#c6d9f0","#dbe5f1","#f2dcdb","#ebf1dd","#e5e0ec","#dbeef3","#fdeada","#f2f2f2","#595959","#c4bd97","#8db3e2","#b8cce4","#e5b9b7","#d7e3bc","#ccc1d9","#b7dde8","#fbd5b5","#d8d8d8","#3f3f3f","#938953","#548dd4","#95b3d7","#d99694","#c3d69b","#b2a2c7","#92cddc","#fac08f","#bfbfbf","#262626","#494429","#17365d","#366092","#953734","#76923c","#5f497a","#31859b","#e36c09","#a5a5a5","#0c0c0c","#1d1b10","#0f243e","#244061","#632423","#4f6128","#3f3151","#205867","#974806","#c00000","#ff0000","#ffc000","#ffff00","#92d050","#00b050","#00b0f0","#0070c0","#002060","#7030a0"],fontNames:["Arial","Courier New","Garamond","Georgia","MS Sans Serif","Segoe UI","Tahoma","Times New Roman","Verdana"],fontSizes:[1,2,3,4,5,6,7],symbols:["&#8364;","&#162;","&#163;","&#165;","&#164;","&#169;","&#174;","&#8482;","&#177;","&ne;","&#8776;","&#8804;","&#8805;","&#247;","&#215;","&#8734;","&#189;","&#188;","&#190;","&#178;","&#179;","&#8240;","&#182;","&#167;","&#945;","&#946;","&#916;","&#181;","&#937;","&#8721;","&#216;","&ang;","&#186;","&#171;","&raquo;","&#183;","&#8226;","&#8224;","&#8225;","&#402;"],realFontSizes:["8px","9px","10px","11px","12px","13px","14px","16px","18px","20px","22px","24px","26px","28px","32px","36px","48px","72px"],snippets:[],cssClasses:[],cssFiles:[],languages:[],paragraphs:[["<p>","Normal"],["<h1>","<h1>Heading 1</h1>"],["<h2>","<h2>Heading 2</h2>"],["<h3>","<h3>Heading 3</h3>"],["<h4>","<h4>Heading 4</h4>"],["<h5>","<h5>Heading 5</h5>"],["<h5>","<dir>Directory List</dir>"],["<menu>","<menu>Menu List</menu>"],["<pre>","<pre>Formatted</pre>"],["<address>","<address>Address</address>"]],toolsWidth:null,maxTextLength:null,maxHtmlLength:null,toolProviderID:null,autoResizeHeight:false,toolbarMode:a.EditorToolbarMode.Default,editModes:a.EditModes.All,stripFormattingOptions:a.StripFormattingOptions.None,contentFilters:a.EditorFilters.DefaultFilters,newLineBr:true,contentAreaCssFile:"",tableLayoutCssFile:"",mozillaFlashOverlayImage:"FlashManager.gif",toolAdapterType:"",enableResize:true,toolJSON:[],modulesJSON:[],contextMenusJSON:[],skin:"Default",language:"en-us",contentWindow:null,document:null,contentArea:null,contentAreaMode:a.EditorContentAreaMode.Iframe});
b.registerControlEvents(a.RadEditor,["firstShow","pasteHtml","editReady","submit","commandExecuted","commandExecuting","selectionChange","init","load","modeChange","toggleScreenMode","spellCheckLoaded"]);
a.RadEditor.registerClass("Telerik.Web.UI.RadEditor",a.RadWebControl);
})();

Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SpellCheckService=function(){Telerik.Web.UI.SpellCheckService.initializeBase(this);
this._url="Telerik.Web.UI.SpellCheckHandler.axd";
this._language="en-US";
this._configuration=null;
};
Telerik.Web.UI.SpellCheckService.prototype={spellCheck:function(a){this._sendRequest(this._getPostData("SpellCheck",a));
},addCustomWord:function(a){this._sendRequest(this._getPostData("AddCustom",a));
},_processResponse:function(a,c){var d=a.get_statusCode();
if(a.get_responseAvailable()&&200==d&&a.get_responseData().length>0){var b=a.get_object();
if(b.badWords!=null){b.badWords=eval(b.badWords);
}if(b.wordOffsets!=null){b.wordOffsets=eval(b.wordOffsets);
}this.raise_complete(a.get_object());
}else{if(a.get_timedOut()){alert("Spell Check Request time out");
}else{if(a.get_aborted()){alert("Spell Check Request aborted");
}else{if(404==d){window.alert("Web.config registration missing!\n The spellchecking functionality requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information.\n\n"+this.get_url());
}else{if(d>0&&d!=200){window.alert("Spell Check Handler Server Error:"+d+"\n"+a.get_responseData());
}}}}}},_sendRequest:function(a,c){var b=new Sys.Net.WebRequest();
b.set_url(this.get_url());
b.set_httpVerb("POST");
b.set_body(a);
b.add_completed(Function.createDelegate(this,this._processResponse));
b.invoke();
},_getPostData:function(a,b){return"DictionaryLanguage="+this._encode(this._language)+"&Configuration="+this._encode(this._configuration)+"&CommandArgument="+this.encodePostbackContent(b).replace(/%/g,"~")+"&CommandName="+a;
},_encode:function(a){var b=true;
try{var d=$telerik.isIE?document.charset:document.characterSet;
d=d+"";
if(d&&d.toLowerCase().indexOf("utf")==-1){b=false;
}}catch(c){}return(encodeURIComponent&&b)?encodeURIComponent(a):escape(a);
},initialize:function(){Telerik.Web.UI.SpellCheckService.callBaseMethod(this,"initialize");
},dispose:function(){Telerik.Web.UI.SpellCheckService.callBaseMethod(this,"dispose");
},get_url:function(){return this._url;
},set_url:function(a){this._url=a;
},get_language:function(){return this._language;
},set_language:function(a){this._language=a;
},get_configuration:function(){return this._configuration;
},set_configuration:function(a){this._configuration=a;
},add_complete:function(a){this.get_events().addHandler("complete",a);
},remove_complete:function(a){this.get_events().removeHandler("complete",a);
},raise_complete:function(b){var a=this.get_events().getHandler("complete");
if(a){if(!b){b=Sys.EventArgs.Empty;
}a(this,b);
}},_encodeHtmlContent:function(b,a){var d=new Array("%","<",">","!",'"',"#","$","&","'","(",")",",",":",";","=","?","[","]","\\","^","`","{","|","}","~","+");
var c=b;
var e;
if(a){for(e=0;
e<d.length;
e++){c=c.replace(new RegExp("\\x"+d[e].charCodeAt(0).toString(16),"ig"),"%"+d[e].charCodeAt(0).toString(16));
}}else{for(e=d.length-1;
e>=0;
e--){c=c.replace(new RegExp("%"+d[e].charCodeAt(0).toString(16),"ig"),d[e]);
}}return c;
},encodePostbackContent:function(a){return this._encodeHtmlContent(a,true);
},decodePostbackContent:function(a){return this._encodeHtmlContent(a,false);
}};
Telerik.Web.UI.SpellCheckService.registerClass("Telerik.Web.UI.SpellCheckService",Sys.Component);

Type.registerNamespace("Telerik.Web.UI");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.DialogDefinition=function(){this.Width="600px";
this.Height="400px";
this.Title="";
this.Behaviors=36;
this.Modal=true;
this.VisibleStatusbar=false;
this.VisibleTitlebar=true;
this.ClientCallbackFunction="";
};
a.DialogDefinition.registerClass("Telerik.Web.UI.DialogDefinition",null);
a.DialogDefinitionsDictionary=function(g){for(var f in g){var d=g[f];
var e=new a.DialogDefinition();
for(var c in d){e[c]=d[c];
}this[f]=e;
}};
a.DialogDefinitionsDictionary.registerClass("Telerik.Web.UI.DialogDefinitionsDictionary",null);
a.DialogOpenEventArgs=function(c,d){a.DialogOpenEventArgs.initializeBase(this);
this._dialogName=c;
if(d){this._parameters=d;
}else{this._parameters={};
}};
a.DialogOpenEventArgs.prototype={get_dialogName:function(){return this._dialogName;
},set_parameters:function(c){this._parameters=c;
},get_parameters:function(){return this._parameters;
}};
a.DialogOpenEventArgs.registerClass("Telerik.Web.UI.DialogOpenEventArgs",Sys.EventArgs);
a.RadDialogOpener=function(c){a.RadDialogOpener.initializeBase(this,[c]);
this._dialogDefinitions={};
this._handlerChecked=false;
this._dialogParametersProviderTypeName="";
this._dialogUniqueID="";
this._dialogContainers={};
};
a.RadDialogOpener.prototype={initialize:function(){a.RadDialogOpener.callBaseMethod(this,"initialize");
this._dialogDefinitions=new a.DialogDefinitionsDictionary(this.get_dialogDefinitions());
},get_dialogDefinitions:function(){return this._dialogDefinitions;
},openUrl:function(l,o,p,d,f,g,k,i,e,h,j,n){n="EXTERNAL_URL"+(n||"default");
var m=this._getDialogContainer(n);
m.set_width(p+"px");
m.set_height(d+"px");
m.set_behaviors(e||a.WindowBehaviors.Default);
m.set_modal(i==true);
m.set_visibleStatusbar(h==true);
m.set_visibleTitlebar(j==true);
m.set_title(k?k:"");
m.set_keepInScreenBounds(true);
var c=new a.DialogOpenEventArgs(l,o);
this.raiseEvent("open",c);
m.ClientParameters=o;
m.set_clientCallBackFunction(f);
m.setUrl(l);
m.show();
m.center();
window.setTimeout(function(){m.setActive(true);
},100);
},open:function(c,h,k){if(!this._handlerChecked){this._checkDialogHandler(this.get_handlerUrl());
}var d=this._getDialogDefinition(c);
var j=new a.DialogOpenEventArgs(c,h);
this.raiseEvent("open",j);
var h=j.get_parameters();
if(!k){k=d.ClientCallbackFunction;
}if(this.get_useClassicDialogs()){var i=$create(a.ClassicDialog,{dialogOpener:this});
i.ClientParameters=h;
this._applyParameters(c,i);
if(k){i.set_clientCallBackFunction(k);
}window.__getCurrentRadEditorRadWindowReference=function(){return i;
};
var g="width="+parseInt(d.Width)+",height="+parseInt(d.Height);
g+=",resizable=0,scrollbars=0,status=0,toolbar=0,menubar=0,directories=0";
var f=i.open(g,c);
f.radWindow=i;
return f;
}else{var i=this._getDialogContainer(c);
var e=d.Height;
i.set_height(e);
i.set_width(d.Width);
i.set_behaviors(d.Behaviors);
i.set_modal(d.Modal);
i.set_visibleStatusbar(d.VisibleStatusbar);
i.set_visibleTitlebar(d.VisibleTitlebar);
i.set_keepInScreenBounds(true);
if(d.ReloadOnShow!=null){i.set_reloadOnShow(d.ReloadOnShow);
}i.ClientParameters=h;
this._applyParameters(c,i);
if(k){i.set_clientCallBackFunction(k);
}i.show();
i.set_height(e);
i.center();
window.setTimeout(function(){i.setActive(true);
},100);
}},openLight:function(c,f,i){var h=new a.DialogOpenEventArgs(c,f);
this.raiseEvent("open",h);
var f=h.get_parameters();
var g=this._getDialogContainer(c);
var d=195;
var e=350;
g.set_height(d);
g.set_width(e);
g.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move+Telerik.Web.UI.WindowBehaviors.Close);
g.set_modal(true);
g.set_visibleStatusbar(false);
g.set_visibleTitlebar(true);
if(i){g.set_clientCallBackFunction(i);
}g.ClientParameters=f;
Telerik.Web.UI.LightDialogsControllerClass.initializeLightDialog(g);
g.show();
g.set_height(d);
g.center();
window.setTimeout(function(){g.setActive(true);
},100);
},_applyParameters:function(c,j){var n=this._getDialogParameters(c);
if(!n){return;
}var k="&dp="+encodeURIComponent(n);
var e=this._getBaseDialogUrl(c);
var d=e.length+k.length;
var m=this._dialogParametersProviderTypeName=="";
var g=m&&d<=this.get_dialogUrlLengthLimit();
if(g){var h=j.get_navigateUrl();
var i=e+k;
if(h!=i){j.setUrl(i);
}else{var l=j.get_contentFrame();
if(l&&l.contentWindow&&l.contentWindow.$find){var f=l.contentWindow.initDialog;
if(f){l.contentWindow.setTimeout(function(){f();
},1);
}}}}else{j.setUrl(e);
j.DialogParameters=n;
}},_closeContainerDelegate:function(c){this.raiseEvent("close",c);
},_getDialogContainer:function(d){if(typeof(this._dialogContainers[d])=="undefined"){var c=$find(this.get_id()+d);
if(null!=c){c.dispose();
}this._dialogContainers[d]=this.get_container().clone(this.get_id()+d);
var e=this;
this._dialogContainers[d].get_dialogOpener=function(){return e;
};
this._dialogContainers[d].add_close(Function.createDelegate(this,this._closeContainerDelegate));
}return this._dialogContainers[d];
},_getBaseDialogUrl:function(e){var d=this.get_handlerUrl().indexOf("?")<0?"?":"&";
var c=this.get_handlerUrl()+d+"DialogName="+e;
if(this.get_enableTelerikManagers()){c+="&UseRSM=true";
}c+="&Skin="+this.get_skin()+"&Title="+encodeURIComponent(this._getDialogDefinition(e)["Title"])+"&doid="+this._dialogUniqueID+"&dpptn="+encodeURIComponent(this._dialogParametersProviderTypeName)+this.get_additionalQueryString();
return c;
},_getDialogDefinition:function(c){var d=this.get_dialogDefinitions()[c];
if(d){return d;
}else{throw Error.argumentNull("dialogName",String.format("Dialog Parameters for the {0} dialog do not exist",c));
}},_getDialogParameters:function(c){return this._getDialogDefinition(c)["SerializedParameters"];
},_checkDialogHandler:function(c){var e=c.indexOf("?")<0?"?":"&";
var g=c+e+"checkHandler=true";
var f=new Sys.Net.WebRequest();
f.set_url(g);
f.add_completed(Function.createDelegate(this,this._checkRequestCompleted));
var d=new Sys.Net.XMLHttpExecutor();
f.set_executor(d);
d.executeRequest();
},_checkRequestCompleted:function(c,e){if(c.get_responseAvailable()){var f=c.get_webRequest();
var d=c.get_responseData();
if(d&&d.indexOf("HandlerCheckOK")>0){this._handlerChecked=true;
return;
}}window.alert("Web.config registration missing!\n The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > RadEditor > Dialogs > Introduction");
}};
b.registerControlProperties(a.RadDialogOpener,{additionalQueryString:"",enableTelerikManagers:false,handlerUrl:"",container:null,dialogUrlLengthLimit:2000,useClassicDialogs:false,skin:""});
b.registerControlEvents(a.RadDialogOpener,["open","close"]);
a.RadDialogOpener.registerClass("Telerik.Web.UI.RadDialogOpener",a.RadWebControl);
a.ClassicDialog=function(c,d){a.ClassicDialog.initializeBase(this);
this.BrowserWindow=window;
this._dialogOpener=null;
this._clientCallBackFunction=null;
this._window=null;
this._url="";
this._events={close:[],beforeClose:[],show:[]};
};
a.ClassicDialog.prototype={close:function(e){this.raiseEvent("beforeClose");
this.raiseEvent("close");
if(null!=e&&!(e instanceof Sys.UI.DomEvent)){var d=this.get_clientCallBackFunction();
if(typeof(d)=="string"){d=eval(d);
}if(d){d(this,e);
}}var c=this.get_contentFrame();
c.setTimeout(function(){c.close();
c.parent.focus();
},100);
},open:function(d,c){this._window=window.open(this.get_navigateUrl(),c,d);
this._window.focus();
if(!this._window.contentWindow){this._window.contentWindow=this._window;
}this.raiseEvent("show");
return this._window;
},get_dialogOpener:function(){return this._dialogOpener;
},set_dialogOpener:function(c){this._dialogOpener=c;
},get_clientCallBackFunction:function(){return this._clientCallBackFunction;
},set_clientCallBackFunction:function(c){this._clientCallBackFunction=c;
},setUrl:function(c){this._url=c;
},get_navigateUrl:function(){return this._url;
},get_contentFrame:function(){return this._window;
},set_title:function(c){if(this._window&&this._window.document){this._window.document.title=c;
}},dispose:function(){this._window=null;
this._clientCallBackFunction=null;
this._dialogOpener=null;
this._events=null;
a.ClassicDialog.callBaseMethod(this,"dispose");
},add_close:function(c){Array.add(this._events.close,c);
},remove_close:function(c){Array.remove(this._events.close,c);
},add_show:function(c){Array.add(this._events.show,c);
},remove_show:function(c){Array.remove(this._events.show,c);
},add_beforeClose:function(c){Array.add(this._events.beforeClose,c);
},remove_beforeClose:function(c){Array.remove(this._events.beforeClose,c);
},raiseEvent:function(c,e){var d=this._events[c];
this._raiseEvent(d,e);
},_raiseEvent:function(e,d){if(!e||(e.length===0)){return;
}e=Array.clone(e);
if(!e._handler){e._handler=function(f,h){for(var g=0,j=e.length;
g<j;
g++){e[g](f,h);
}};
}var c=e._handler;
if(c){if(!d){d=Sys.EventArgs.Empty;
}c(this,d);
}}};
a.ClassicDialog.registerClass("Telerik.Web.UI.ClassicDialog",Sys.Component);
})();
Type.registerNamespace("Telerik.Web.UI");
if(typeof(Telerik.Web.UI.EditorCommandEventArgs)=="undefined"){Telerik.Web.UI.EditorCommandEventArgs=function(c,b,a){Telerik.Web.UI.EditorCommandEventArgs.initializeBase(this);
this._name=this._commandName=c;
this._tool=b;
this._value=a;
this.value=a;
this._callbackFunction=null;
};
Telerik.Web.UI.EditorCommandEventArgs.prototype={get_name:function(){return this._name;
},get_commandName:function(){return this._commandName;
},get_tool:function(){return this._tool;
},get_value:function(){return this._value;
},set_value:function(a){this.value=a;
this._value=a;
},set_callbackFunction:function(a){this._callbackFunction=a;
}};
Telerik.Web.UI.EditorCommandEventArgs.registerClass("Telerik.Web.UI.EditorCommandEventArgs",Sys.CancelEventArgs);
}
Type.registerNamespace("Telerik.Web.UI");
(function(){$telerik.toWindow=function(c){return c;
};
$telerik.findWindow=$find;
var b=$telerik.$;
var a=Telerik.Web.UI;
a.RadWindowControllerClass=function(){this._activeWindow=null;
this._historyStack=[];
};
a.RadWindowControllerClass.prototype={getInstance:function(){return this;
},hideCurrentWindowIfNonModal:function(){if(this._activeWindow!=null&&this._activeWindow.isModal&&!this._activeWindow.isModal()){this._activeWindow.close();
}this._activeWindow=null;
},inactivateCurrentWindow:function(){if(this._activeWindow!=null){this._activeWindow.setActive(false);
}this._activeWindow=null;
},set_activeWindow:function(c){if(c==this._activeWindow){return;
}this.inactivateCurrentWindow();
this._activeWindow=c;
Array.remove(this._historyStack,c);
Array.add(this._historyStack,c);
},notifyWindowClosed:function(c){if(this._activeWindow==c){this._activeWindow=null;
}Array.remove(this._historyStack,c);
this._activatePreviousWindow();
},_activatePreviousWindow:function(){var c=this._historyStack;
var d=c.length-1;
for(;
d>=0;
d--){var e=c[d];
if(!e){return;
}if(e.isCreated()&&!e.isClosed()&&!e.isMinimized()){e.setActive(true);
break;
}else{Array.removeAt(c,d);
}}},get_activeWindow:function(){return this._activeWindow;
}};
a.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null);
if(!a.RadWindowController){a.RadWindowController=new a.RadWindowControllerClass();
}Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.RadWindowUtils");
a.RadWindowUtils.Localization={Close:"Close",Minimize:"Minimize",Maximize:"Maximize",Reload:"Reload",PinOn:"Pin on",PinOff:"Pin off",Restore:"Restore",OK:"OK",Cancel:"Cancel",Yes:"Yes",No:"No"};
b.registerEnum(a,"WindowBehaviors",{None:0,Resize:1,Minimize:2,Close:4,Pin:8,Maximize:16,Move:32,Reload:64,Default:(1+2+4+8+16+32+64)});
b.registerEnum(a,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8});
b.registerEnum(a,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1});
a.RadWindow=function(c){a.RadWindow.initializeBase(this,[c]);
this._openerElement=null;
this._offsetElement=null;
this._popupElement=null;
this._tableElement=null;
this._contentElement=null;
this._contentCell=null;
this._titleElement=null;
this._titleCell=null;
this._titlebarElement=null;
this._statusCell=null;
this._statusMessageElement=null;
this._iframe=null;
this._dockMode=false;
this._buttonsElement=null;
this._buttonsArray=[];
this._shortCutManager=null;
this.isIE=($telerik.isIE);
this._openerElementID=null;
this._offsetElementID=null;
this._behaviors=a.WindowBehaviors.Default;
this._left=null;
this._top=null;
this._title="";
this._width="300px";
this._minWidth=null;
this._minHeight=null;
this._handlesWidth=null;
this._resizeOverlayElement=null;
this._height="300px";
this._opacity=100;
this._visibleTitlebar=true;
this._visibleStatusbar=true;
this._modal=false;
this._overlay=false;
this._keepInScreenBounds=false;
this._windowAnimation=null;
this._onMouseDownDelegate=null;
this._onClickDelegate=null;
this._onTitlebarDblclickDelegate=null;
this._onTitlebarClickDelegate=null;
this._onWindowResizeDelegate=null;
this._onIframeLoadDelegate=null;
this._onChildPageUnloadDelegate=null;
this._onChildPageClickDelegate=null;
this._onKeyDownDelegate=null;
this._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._loaded=false;
this._isCloned=false;
this._restoreRect=null;
this._popupBehavior=null;
this._popupVisible=false;
this._browserWindow=window;
this.GetWindowManager=this.get_windowManager;
this.BrowserWindow=window;
this.GetContentFrame=this.get_contentFrame;
this.GetLeftPosition=function(){this.getWindowBounds().x;
};
this.GetTopPosition=function(){this.getWindowBounds().y;
};
this.GetTitlebar=function(){return this._titleCell;
};
this.GetStatusbar=function(){return this._statusCell;
};
this.SetOpenerElementId=this.set_openerElementID;
this.SetStatus=this.set_status;
this.GetStatus=this.get_status;
this.SetModal=this.set_modal;
this.SetWidth=this.set_width;
this.SetHeight=this.set_height;
this.GetWidth=this.get_width;
this.GetHeight=this.get_height;
this.SetOffsetElementId=this.set_offsetElementID;
this.SetTitle=this.set_title;
this.MoveTo=this.moveTo;
this.Center=this.center;
this.SetVisible=this.setVisible;
this.SetSize=this.setSize;
this.Show=this.show;
this.Hide=this.hide;
this.GetUrl=this.get_navigateUrl;
this.SetUrl=this.setUrl;
this.Reload=this.reload;
this.SetActive=this.setActive;
this.Minimize=this.minimize;
this.Restore=this.restore;
this.Maximize=this.maximize;
this.Close=this.close;
this.TogglePin=this.togglePin;
this.IsMaximized=this.isMaximized;
this.IsMinimized=this.isMinimized;
this.IsModal=this.isModal;
this.IsClosed=this.isClosed;
this.IsPinned=this.isPinned;
this.IsVisible=this.isVisible;
this.IsActive=this.isActive;
this.IsBehaviorEnabled=this.isBehaviorEnabled;
};
a.RadWindow.prototype={_getLocalization:function(){return a.RadWindowUtils.Localization;
},_getLocalizationString:function(e){var c=this.get_localization();
if(typeof(c)=="string"){c=Sys.Serialization.JavaScriptSerializer.deserialize(c);
this.set_localization(c);
}var d=this._getLocalization();
if(!c){return d[e];
}return c[e];
},_registerGlobalBodyEventHandlers:function(c){var d=this.get_shortcuts();
if(!d){return;
}if(!this._shortCutManager){this._shortCutManager=new a.WindowShortCutManager(d);
}if(c){this._onKeyDownDelegate=Function.createDelegate(this,this._onKeyDown);
$addHandler(document.documentElement,"keydown",this._onKeyDownDelegate);
}else{if(this._onKeyDownDelegate){$removeHandler(document.documentElement,"keydown",this._onKeyDownDelegate);
this._onKeyDownDelegate=null;
}}},_registerIframeLoadHandler:function(c){if(!this._iframe){return;
}if(c){this._onIframeLoadDelegate=Function.createDelegate(this,this._onIframeLoad);
$addHandler(this._iframe,"load",this._onIframeLoadDelegate);
}else{if(this._onIframeLoadDelegate){$removeHandler(this._iframe,"load",this._onIframeLoadDelegate);
this._onIframeLoadDelegate=null;
$clearHandlers(this._iframe);
}}},_registerWindowResizeHandler:function(c){if(c){this._onWindowResizeDelegate=Function.createDelegate(this,this._maintainMaximizedSize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
}else{if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowResizeDelegate=null;
}}},_registerOpenerElementHandler:function(d,c){if(!d){return;
}if(true==c){this._onClickDelegate=Function.createDelegate(this,this._onClick);
$addHandler(d,"click",this._onClickDelegate);
}else{var e=$removeHandler(d,"click",this._onClickDelegate);
this._onClickDelegate=null;
}},_registerTitlebarHandlers:function(d){var c=this._titleCell;
if(d){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore();
}else{if(this.isBehaviorEnabled(a.WindowBehaviors.Maximize)){if(this.isMaximized()){this.restore();
}else{this.maximize();
}}}});
this._onTitlebarClickDelegate=Function.createDelegate(this,function(){this.setActive(true);
});
$addHandler(c,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(c,"click",this._onTitlebarClickDelegate);
}else{if(c){if(this._onTitlebarDblclickDelegate){$removeHandler(c,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}if(this._onTitlebarClickDelegate){$removeHandler(c,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}$clearHandlers(c);
}}},_makeModal:function(c){if(this._onModalShowHandler){this.remove_show(this._onModalShowHandler);
this._onModalShowHandler=null;
}if(this._onModalCloseHandler){this.remove_close(this._onModalCloseHandler);
this._onModalCloseHandler=null;
}if(this._modalExtender){this._modalExtender.dispose();
this._modalExtender=null;
}if(!c){return;
}if(typeof(a.RadWindowManager)!="undefined"&&a.RadWindowManager.isInstanceOfType(this)){return;
}this._onModalShowHandler=function(e){if(!e._modalExtender){e._modalExtender=new a.ModalExtender(e._popupElement);
}e._modalExtender.show();
var f=document.activeElement;
if(f&&f.tagName.toLowerCase()!="body"){var d=(!$telerik.isDescendant(this._contentElement,f)&&this._dockMode);
if(!(e._isPredefined)||d){e._focusedPageElement=f;
f.blur();
}}e.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(d){window.setTimeout(function(){if(d._modalExtender){d._modalExtender.hide();
}var e=d._focusedPageElement;
if(e){try{e.focus();
}catch(f){}d._focusedPageElement=null;
}},10);
};
this.add_close(this._onModalCloseHandler);
},_enableMoveResize:function(d){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!d){return;
}if(!this._popupElement){return;
}var g=this._tableElement.rows;
var f={};
var e=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(a.WindowBehaviors.Resize)){if(e){f={nw:g[0].cells[2],n:this._topResizer,ne:g[0].cells[0],w:[g[1].cells[2],g[2].cells[2]],e:[g[1].cells[0],g[2].cells[0]],sw:g[3].cells[2],s:g[3].cells[1],se:[g[3].cells[0],this._bottomResizer]};
}else{f={nw:g[0].cells[0],n:this._topResizer,ne:g[0].cells[2],w:[g[1].cells[0],g[2].cells[0]],e:[g[1].cells[2],g[2].cells[2]],sw:g[3].cells[0],s:g[3].cells[1],se:[g[3].cells[2],this._bottomResizer]};
}}if(this.isBehaviorEnabled(a.WindowBehaviors.Move)){f.move=this._titleCell;
}this._resizeExtender=new a.ResizeExtender(this,this._popupElement,f,this._tableElement);
var c=this._dockMode?null:this._iframe;
this._resizeExtender.set_iframeToSkip(c);
},_setResizeOverlayVisible:function(f){if(this._dockMode){return;
}var d=this._resizeOverlayElement;
if(!d){var e=this._getHandlesWidth();
var c=this._visibleTitlebar?this._tableElement.rows[0].offsetHeight:e;
d=document.createElement("div");
d.style.position="absolute";
d.style.zIndex="1";
d.style.top=c+"px";
d.style.left=Math.round(e/2)+"px";
d.style.backgroundColor="White";
d.style.filter="alpha(opacity=0)";
d.style.opacity=0;
this._contentCell.appendChild(d);
this._resizeOverlayElement=d;
}this._setResizeOverlaySize();
d.style.display=f?"":"none";
},_setResizeOverlaySize:function(){var c=this._resizeOverlayElement;
if(c){var d=this._contentCell;
c.style.width=d.offsetWidth+"px";
c.style.height=d.offsetHeight+"px";
}},onResizeStart:function(){if(this.isMaximized()){return false;
}this.setActive(true);
this._setResizeOverlayVisible(true);
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
var c=new Sys.CancelEventArgs();
this.raiseEvent("resizeStart",c);
if(c.get_cancel()){return false;
}},onResizing:function(f){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,f)){if(this._dockMode){this.setWidthDockMode(f.width-1);
this.setHeightDockMode(f.height-1);
}else{this._setResizeOverlaySize();
}var e=this.get_minWidth();
if(f.width<e){var d=this._getCurrentBounds();
f.width=e;
var c=this._resizeExtender._originalBounds;
if(this._resizeExtender._resizeDir.west){f.x=c.x+(c.width-e);
if(this._cachedDragZoneBounds){f.x-=this._cachedDragZoneBounds.x;
}}else{f.x=d.x;
}f.y=d.y;
f.height=d.height;
this.setSize(f.width,f.height);
this._setPopupVisible(f.x,f.y);
return false;
}this._updateTitleWidth();
return true;
}return false;
},onResizeEnd:function(){this._cachedDragWindowBounds=null;
var c=this._getCurrentBounds();
if(this._dockMode){this.setBounds(c);
}else{this._setResizeOverlayVisible(false);
this._setPopupVisible(c.x,c.y);
this._storeBounds();
}if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this.raiseEvent("resizeEnd",new Sys.EventArgs());
},onDragStart:function(){this.setActive(true);
if(this.isPinned()||this.isMaximized()){return false;
}if(this.isMinimized()&&this.get_minimizeZoneID()){return false;
}var e=this.get_popupElement();
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
var c=$telerik.getSize(e);
var d=$telerik.getBorderBox(e);
c.width-=d.horizontal;
c.height-=d.vertical;
this._cachedDragWindowBounds=c;
this._setResizeOverlayVisible(true);
this.raiseEvent("dragStart",new Sys.EventArgs());
return true;
},onDragEnd:function(d){this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this._setResizeOverlayVisible(false);
this.raiseEvent("dragEnd",new Sys.EventArgs());
var c=this._getCurrentBounds();
this.moveTo(c.x,c.y);
this.setActive(true);
if(this.isMinimized()){this._getTitleElement().style.width="";
}},onDrag:function(f){if(!this._cachedDragZoneBounds){return true;
}var d=this._cachedDragWindowBounds;
var e=this._cachedDragZoneBounds;
f.width=d.width;
f.height=d.height;
var c=this._checkRestrictionZoneBounds(e,f);
if(!c){if(f.x<=e.x){f.x=e.x;
}else{if(e.x+e.width<=f.x+d.width){f.x=e.x+e.width-d.width;
}}if(f.y<=e.y){f.y=e.y;
}else{if(e.y+e.height<=f.y+d.height){f.y=e.y+e.height-d.height;
}}c=true;
}return c;
},initialize:function(){a.RadWindow.callBaseMethod(this,"initialize");
if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show();
}),0);
}this._registerWindowResizeHandler(true);
var c=this.get_element().className;
if(c){this.set_cssClass(c.replace(/^ /,""));
}},dispose:function(){var f=this.get_windowManager();
if(f){if(f.get_preserveClientState()){f.saveWindowState(this);
}if(this.get_destroyOnClose()){f.removeWindow(this);
}}if(this._windowAnimation){this._windowAnimation.dispose();
}this._enableMoveResize(false);
this._makeModal(false);
this._registerTitlebarHandlers(false);
if(this._titleIconElement){$clearHandlers(this._titleIconElement);
}this._registerWindowResizeHandler(false);
this._registerIframeLoadHandler(false);
if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false);
}this.set_behaviors(a.WindowBehaviors.None);
var c=this._iframe;
if(c){c.radWindow=null;
c.src="javascript:'<html></html>';";
c.name="";
c.removeAttribute("name");
c.removeAttribute("NAME");
}if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML="";
}var e=this.get_contentElement();
if(this._dockMode&&e){$telerik.disposeElement(e);
}var d=this._popupElement;
if(d&&d.parentNode){d.parentNode.removeChild(d);
}a.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){this._hide();
this._registerGlobalBodyEventHandlers(false);
return true;
},clone:function(c){var d=document.createElement("span");
if(c){d.setAttribute("id",c);
}return $telerik.cloneControl(this,a.RadWindow,d);
},set_contentElement:function(c){if(!this._isPredefined){this._dockMode=true;
}var d=$get(this.get_id()+"_C");
if(d&&c!=d){$telerik.disposeElement(d);
d.innerHTML="";
d.appendChild(c);
c=d;
}this._createUI();
if(this._iframe){this._iframe.style.display="none";
}if(c.parentNode&&c.parentNode.removeChild){c.parentNode.removeChild(c);
}this._contentCell.appendChild(c);
c.style.display="";
this._contentElement=c;
},_setShadowCSSClass:function(c){var e=this._tableElement;
var d=this.get_popupElement();
if(!e||!d){return;
}if(c){Sys.UI.DomElement.addCssClass(e,"rwShadow");
Sys.UI.DomElement.addCssClass(d,"rwShadow");
}else{Sys.UI.DomElement.removeCssClass(e,"rwShadow");
Sys.UI.DomElement.removeCssClass(d,"rwShadow");
}},get_contentElement:function(){return this._contentElement;
},isCreated:function(){return this._popupElement!=null;
},show:function(){var c=this.isCreated();
this._createUI();
if(this.get_navigateUrl()&&(!c||this.get_reloadOnShow())){this.setUrl(this.get_navigateUrl());
}if(!c&&(this.get_initialBehaviors()!=a.WindowBehaviors.None)){this._show();
this._afterShow();
if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Minimize)){this.minimize();
}if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Maximize)){this.maximize();
}if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Pin)){this.togglePin();
}return;
}if(this.isModal()){this.center();
}if(this.get_animation()==a.WindowAnimation.None){this._show();
this._afterShow();
}else{this._playAnimation();
}},_show:function(){this.raiseEvent("beforeShow",new Sys.EventArgs());
if(this.get_offsetElementID()&&!this._offsetElement){var d=$get(this.get_offsetElementID());
if(d){this._offsetElement=d;
}}var c=this._popupBehavior.get_parentElement();
if(this._offsetElement&&!this._offsetSet){this._popupBehavior.set_parentElement(this._offsetElement);
this._offsetSet=true;
}this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
this._reSetWindowPosition();
if(c!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(c);
}this._popupVisible=true;
var e=this.get_contentElement();
if(!this._isPredefned&&e){$telerik.repaintChildren(e);
}},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide();
}else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var c=Function.createDelegate(this,this._afterHide);
var d=this.isMaximized();
$telerik.$(this._popupElement).stop().fadeOut(this.get_animationDuration(),function(){c(d);
});
}},_afterHide:function(d){if(!this._popupBehavior){return;
}if(d==null){d=this.isMaximized();
}var c=this.isMinimized();
if(d||c){this.restore();
}this._popupBehavior.hide(true);
this._popupVisible=false;
this._getWindowController().notifyWindowClosed(this);
},_afterShow:function(){this.setActive(true);
this._registerGlobalBodyEventHandlers(true);
this._storeBounds();
this.raiseEvent("show",new Sys.EventArgs());
var c=!this.get_animation()==a.WindowAnimation.None;
if(this.get_autoSize()&&(this._dockMode||c)){this.autoSize(c);
}},_playAnimation:function(){var h=Function.createDelegate(this,function(){var m=this._getCalculatedPopupBounds();
this._setPopupVisible(m.x,m.y);
var l=$telerik.getBounds(this._popupElement);
var n=this.get_offsetElementID();
if(n){var o=$get(n);
if(o){var p=$telerik.getBounds(o);
l.x=p.x;
l.y=p.y;
}}$telerik.$(this._popupElement).hide();
return l;
});
var d=this._popupElement;
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var i=this.get_animation();
var f=this._openerElement?$telerik.getBounds(this._openerElement):null;
var c=h();
var g=this.get_animationDuration();
var e=""+this._position;
var k=null;
var j=Function.createDelegate(this,function(){var l=this.get_popupElement();
l.style.filter="";
l.style.opacity="";
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true);
}this._show();
this._afterShow();
});
a.Animations.playJQueryAnimation(d,i,f,c,e,k,j,g);
},_onClick:function(c){this.show();
return this._cancelEvent(c);
},_onKeyDown:function(d){var c=this._shortCutManager.isShortCutHit(d);
if(!c){return;
}if(this.isActive()){this.fire(c.get_name());
}},_cancelEvent:function(c){if(c){c.returnValue=false;
c.cancelBubble=true;
c.preventDefault();
c.stopPropagation();
}return false;
},_getWindowController:function(){return a.RadWindowController.getInstance();
},_getReloadOnShowUrl:function(d){var e="rwndrnd="+Math.random();
if(d.indexOf("?")>-1){e="&"+e;
}else{e="?"+e;
}var c=d.indexOf("#");
d=(c>-1)?d.substr(0,c)+e+d.substr(c):d+e;
return d;
},getWindowBounds:function(){return this._getCalculatedPopupBounds();
},toString:function(){return"[RadWindow id="+this.get_id()+"]";
},center:function(){var c=this._getCentralBounds();
this.moveTo(c.x,c.y);
},moveTo:function(d,e){var f=this._popupElement;
if(f){var c=$telerik.getBounds(f);
var h=this._getRestrictionZoneBounds();
if(h){var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d+h.x,e+h.y,c.width,c.height));
if(!g){return false;
}}}d=parseInt(d);
e=parseInt(e);
this._createUI();
this._setPopupVisible(d,e);
this._storeBounds();
return true;
},setSize:function(c,d){this._firstShow=false;
this.set_width(c);
this.set_height(d);
this._storeBounds();
},autoSize:function(B){if(this.isClosed()){return;
}var d=this.get_contentFrame();
var c=this.get_popupElement();
var e=$telerik.getBounds(c);
var k=$telerik.getBorderBox(c);
e.width-=k.horizontal;
e.height-=k.vertical;
var z=null;
var o;
var h;
var A=this.get_contentElement();
var i=this.get_minWidth();
var f=this._getTitleElement();
if(f){f.style.width="1px";
}if(this._dockMode&&A){A.style.height="1px";
A.style.width="1px";
Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading");
o=A.scrollHeight;
var y=A.scrollWidth;
h=y>i?y:i;
}else{try{z=d.contentWindow.document.documentElement;
if(!z){return;
}}catch(j){return false;
}var w=d.contentWindow.document.body;
var A=z;
if($telerik.isIE||$telerik.isFirefox){A=d;
}A.style.width="1px";
o=z.scrollHeight;
h=z.scrollWidth;
if(h<i){A.style.width=i+"px";
h=z.scrollWidth;
}A.style.height="1px";
o=z.scrollHeight;
}var v=this._getRestrictionZoneBounds();
var p=v?v:this._getViewportBounds();
var q=this._getHandlesWidth()+h;
var C=this.get_minHeight()+o;
var r=Math.min(q,p.width);
var n=Math.min(C,p.height);
var u=this.get_keepInScreenBounds();
if(!v){this.set_keepInScreenBounds(true);
}var t=16;
if(n<o){r=Math.min(r+t,p.width);
}if(r<h){n=Math.min(n+t,p.height);
}var s=this.calcPosition(e.x,e.width,r,p.width);
var x=this.calcPosition(e.y,e.height,n,p.height);
var l={x:s+p.scrollLeft,y:x+p.scrollTop,width:r,height:n};
var g;
var m;
if(z){g=z.style.overflow;
m=w.style.overflow;
}this.setOverflowVisible(false,z,w);
if(B){this._autoSizeWithAnimation(l,z,w,g,m);
}else{this._restoreRect=null;
this.setBounds(l);
this.setOverflowVisible(true,z,w,g,m);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
}if($telerik.isIE&&d){d.style.overflow="hidden";
setTimeout(function(){d.style.overflow="";
},0);
}this.set_keepInScreenBounds(u);
if(d){A.style.width="100%";
A.style.height="100%";
}return true;
},_autoSizeWithAnimation:function(c,m,f,e,j){var f=null;
var m=null;
var d=this.get_contentElement();
var l=this.get_contentFrame();
if(l){f=l.contentWindow.document.body;
m=l.contentWindow.document.documentElement;
}var g=this.get_popupElement();
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var i=Function.createDelegate(this,function(){this._popupElement.style.filter="";
this.get_popupElement().style.opacity="";
this._restoreRect=null;
this.setBounds(c);
this.setOverflowVisible(true,m,f,e,j);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true);
}});
this._tableElement.style.height="100%";
var h={width:c.width,height:c.height,x:c.x,y:c.y};
var k=this._getRestrictionZoneBounds();
if(k){h.x+=k.x;
h.y+=k.y;
}$telerik.$(g).animate({width:h.width,height:h.height,left:h.x,top:h.y,opacity:1},300,null,i);
},setBounds:function(c){if(!c){return;
}this._checkRestrictionZoneBounds=function(){return true;
};
this.moveTo(c.x,c.y);
this.setSize(c.width,c.height);
this._checkRestrictionZoneBounds=a.RadWindow.prototype._checkRestrictionZoneBounds;
},setWidthDockMode:function(c){if(!this._dockMode||!this.get_contentElement()){return;
}widthToSet=c-this._getHandlesWidth();
if(widthToSet>0){this._contentElement.style.width=widthToSet+"px";
}},setHeightDockMode:function(d){if(!this._dockMode||!this.get_contentElement()){return;
}var c=d;
c-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[3].cells[1],"height"));
if(this._visibleTitlebar){c-=parseInt($telerik.getCurrentStyle(this._titlebarElement,"height"));
c-=parseInt($telerik.getCurrentStyle(this._topResizer,"height"));
}else{c-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[0].cells[1],"height"));
}if(this._visibleStatusbar){c-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[2].cells[1],"height"));
}if(c>0){this._contentElement.style.height=c+"px";
}},calcPosition:function(c,d,e,g){var f=c+Math.round((d-e)/2);
if(f<0||f+d>g){f=Math.round(Math.abs((g-e)/2));
}return f;
},_maintainMaximizedSize:function(){if(!this.isMaximized()){return;
}var e=this._popupElement;
if(!e){return;
}var h=this._getViewportBounds();
e.style.top=(h.scrollTop+h.y)+"px";
e.style.left=(h.scrollLeft+h.x)+"px";
$telerik.setSize(e,{width:h.width,height:h.height});
var i=this._getRestrictionZoneBounds();
if(!i){this._enablePageScrolling(false);
}var c=this._tableElement;
h=$telerik.getContentSize(e);
var g=$telerik.getBorderBox(c);
var d=$telerik.getPaddingBox(c);
var f=h.height-g.vertical-d.vertical;
c.style.height=f+"px";
this._fixIeHeight(c,f);
if(this._dockMode){this.setWidthDockMode(h.width);
this.setHeightDockMode(h.height);
}this._updateTitleWidth();
},_enablePageScrolling:function(c){var d=document.body;
var e=document.documentElement;
if(c){if(null!=this._documentOverflow){e.style.overflow=this._documentOverflow;
}if(null!=this._bodyOverflow){d.style.overflow=this._bodyOverflow;
}this._documentOverflow=null;
this._bodyOverflow=null;
}else{if(null==this._documentOverflow){this._documentOverflow=e.style.overflow;
}if(null==this._bodyOverflow){this._bodyOverflow=d.style.overflow;
}d.style.overflow="hidden";
e.style.overflow="hidden";
}},_getRestrictionZoneBounds:function(){var d=null;
if(this.get_restrictionZoneID()){var c=$get(this.get_restrictionZoneID());
if(c){d=$telerik.getBounds(c);
d.scrollLeft=0;
d.scrollTop=0;
}}return d;
},_storeBounds:function(){if(!this.isCreated()){return;
}var c=this._getCurrentBounds();
if(this.isMaximized()){return false;
}if(this.isMinimized()){if(this._restoreRect){c.width=this._restoreRect.width;
c.height=this._restoreRect.height;
}else{c.width=this.get_width();
c.height=this.get_height();
}}this._restoreRect=c;
},_restoreBounds:function(){if(!this._restoreRect){return;
}var c=this._restoreRect;
this.setSize(c.width,c.height);
this.moveTo(c.x,c.y);
},_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect;
}},_deleteStoredBounds:function(){this._restoreRect=null;
},_getCurrentBounds:function(){var c=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){this._updateWindowSize(this._height);
this._firstShow=true;
}var e=$telerik.getBounds(this._popupElement);
if(c){this._popupElement.style.display="none";
}var d=this._getRestrictionZoneBounds();
if(d){e.x-=d.x;
e.y-=d.y;
}return e;
},_getCentralBounds:function(){var f=this._getCurrentBounds();
var c=this._getViewportBounds();
var e=parseInt((c.width-f.width)/2);
var d=parseInt((c.height-f.height)/2);
f.x=e+c.scrollLeft;
f.y=d+c.scrollTop;
return f;
},_getViewportBounds:function(){var d=this._getRestrictionZoneBounds();
if(d){return d;
}var f=$telerik.getClientBounds();
var c=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body);
var e=document.documentElement.scrollTop||document.body.scrollTop;
f.scrollLeft=c;
f.scrollTop=e;
if(this.isIE){if(f.width==0){f.width=document.body.clientWidth;
}if(f.height==0){f.height=document.body.clientHeight;
}}return f;
},_getCalculatedPopupBounds:function(){var g=this._getStoredBounds();
if(g){return g;
}var c=this._getCurrentBounds();
var d=this._offsetElement;
if(this._top==null&&this._left==null&&!d){c=this._getCentralBounds();
}else{if(d){c.y=0;
c.x=0;
}else{var h=this._getViewportBounds();
c.x=h.scrollLeft;
c.y=h.scrollTop;
}var e=this._left?this._left:0;
c.x+=e;
var f=this._top?this._top:0;
c.y+=f;
}return c;
},_checkRestrictionZoneBounds:function(c,e){var d=c;
if(!d){d=this._getRestrictionZoneBounds();
if(!d){return true;
}}return a.ResizeExtender.containsBounds(d,e);
},_reSetWindowPosition:function(){var c=this._getCalculatedPopupBounds();
this._setPopupVisible(c.x,c.y);
},_fixIeHeight:function(d,c){if("CSS1Compat"==document.compatMode){var e=(d.offsetHeight-parseInt(c));
if(e>0){var f=(parseInt(d.style.height)-e);
if(f>0){d.style.height=f+"px";
}}}},_setPopupVisible:function(d,e){var c=this._getRestrictionZoneBounds();
if(c){d+=c.x;
e+=c.y;
}this._popupBehavior._setCoordinates(d,e);
this._popupBehavior.show();
if(!this.get_width()){this._popupElement.style.width="";
}this._updateTitleWidth();
},_createDefaultTable:function(){var c=document.createElement("table");
c.align="left";
c.cellSpacing=0;
c.cellPadding=0;
c.insertRow(-1);
return c;
},_isWindowRightToLeft:function(){var c=this._isRightToLeft;
if(c==null){var d=this.get_element();
var e=d.parentNode?d:this._getDefaultParent();
c=this._isRightToLeft=$telerik.isRightToLeft(e);
}return c;
},_createStatusbarResizer:function(d){var c=d.rows[0].insertCell(-1);
c.style.width="15px";
var e=document.createElement("div");
c.appendChild(e);
this._bottomResizer=e;
},_createStatusbarMessageCell:function(c){var d=c.rows[0].insertCell(-1);
d.style.width="100%";
var e=this._getStatusMessageElement();
d.appendChild(e);
},_createUI:function(){if(!this._popupElement){var y=this.get_id();
var q="RadWindowWrapper_"+y;
var z=this._isWindowRightToLeft();
var p=document.createElement("div");
p.id=q;
p.className=this._getFullSkinName();
var g=this.get_cssClass();
if(g){Sys.UI.DomElement.addCssClass(p,g);
}if(z){Sys.UI.DomElement.addCssClass(p,"RadWindow_rtl");
}if(!this._visibleTitlebar){Sys.UI.DomElement.addCssClass(p,"rwNoTitleBar");
}p.style.width=this._width;
p.style.height=this._height;
p.setAttribute("unselectable","on");
this._popupElement=p;
var h=document.createElement("table");
h.cellSpacing=0;
h.cellPadding=0;
Sys.UI.DomElement.addCssClass(h,"rwTable");
this._tableElement=h;
var f=[];
if(z){f=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"];
}else{f=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"];
}var w=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var v=0;
for(var t=0;
t<4;
t++){var n=h.insertRow(-1);
n.className=w[t];
for(var u=1;
u<=3;
u++){var C=n.insertCell(-1);
C.innerHTML="&nbsp;";
C.className=f[v];
v++;
}}var r=h.rows[0].cells[1];
r.innerHTML="";
this._titleCell=r;
var e=document.createElement("div");
e.className="rwTopResize";
e.innerHTML="<!-- / -->";
this._topResizer=e;
this._titleCell.appendChild(this._topResizer);
var s=this._createDefaultTable();
s.className="rwTitlebarControls";
this._titlebarElement=s;
this._titleCell.appendChild(this._titlebarElement);
var d=this._getTitleIcon();
var l=this._titlebarElement.rows[0].insertCell(-1);
l.appendChild(d);
var x=this._getTitleElement();
var r=this._titlebarElement.rows[0].insertCell(-1);
r.appendChild(x);
this.set_title(this._title);
var A=this._titlebarElement.rows[0].insertCell(-1);
A.noWrap=true;
A.style.whiteSpace="nowrap";
A.appendChild(this._getTitleCommandButtonsHolder());
var m=h.rows[1].cells[1];
m.vAlign="top";
m.innerHTML="";
this._contentCell=m;
if(!(this._dockMode||this._isPredefined)){Sys.UI.DomElement.addCssClass(this._contentCell,"rwExternalContent");
}if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}var c=this.get_name();
var B=this._createDefaultTable();
B.style.width="100%";
this._statusCell=h.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(B);
if(z){this._createStatusbarResizer(B);
this._createStatusbarMessageCell(B);
}else{this._createStatusbarMessageCell(B);
this._createStatusbarResizer(B);
}this._popupElement.appendChild(this._tableElement);
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
this._addWindowToDocument();
this._registerTitlebarHandlers(true);
this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
if(this._dockMode){var k=$get(this.get_id()+"_C");
if(k&&k.innerHTML){k.style.overflow="auto";
k.style.border="0px";
this.set_contentElement(k);
this.setWidthDockMode(this.get_width());
this.setHeightDockMode(this.get_height());
}}else{var o=($telerik.isIE)?document.createElement("<iframe name='"+c+"'>"):document.createElement("iframe");
o.name=c;
o.src="javascript:'<html></html>';";
o.style.width="100%";
o.style.height="100%";
o.style.border="0px";
o.frameBorder="0";
if($telerik.isIE8){o.style.display="block";
}this._iframe=o;
this._contentCell.appendChild(this._iframe);
}if(!this._dockMode){this._createBackReference();
}}this._updateOpacity();
if(!this._popupBehavior){this.set_behaviors(this._behaviors);
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:(new Date()-100)+"PopupBehavior",parentElement:null,overlay:this._overlay,keepInScreenBounds:this._keepInScreenBounds},null,null,this._popupElement);
}},_getDefaultParent:function(){var c=this.get_formID()?document.getElementById(this.get_formID()):null;
if(!c){if(document.forms&&document.forms.length>0){c=document.forms[0];
}else{c=document.body;
}}return c;
},_getStatusMessageElement:function(){if(null==this._statusMessageElement){var c=document.createElement("input");
c.readOnly="readonly";
c.setAttribute("unselectable","on");
this._statusMessageElement=c;
}return this._statusMessageElement;
},_getTitleCommandButtonsHolder:function(){if(null==this._buttonsElement){var c=document.createElement("ul");
c.className="rwControlButtons";
this._buttonsElement=c;
}return this._buttonsElement;
},_getTitleElement:function(){if(!this._titleElement){this._titleElement=document.createElement("em");
this._titleElement.setAttribute("unselectable","on");
}return this._titleElement;
},_getTitleIcon:function(){if(null==this._titleIconElement){var c=document.createElement("a");
this._titleIconElement=c;
c.className="rwIcon";
$addHandler(this._titleIconElement,"mousedown",this._cancelEvent);
if(this.get_iconUrl()){c.style.background="transparent url('"+this.get_iconUrl()+"') no-repeat scroll 0px 0px";
}}return this._titleIconElement;
},_getTitleCommandButton:function(d){if(!d||!this._buttonsArray){return null;
}var g=d.toLowerCase();
g=g.charAt(0).toUpperCase()+g.substring(1);
d="rw"+g+"Button";
var e=this._buttonsArray.length;
for(var f=0;
f<e;
f++){var c=this._buttonsArray[f];
if(c&&Sys.UI.DomElement.containsCssClass(c,d)){return c;
}}return null;
},_getHandlesWidth:function(){if(!this._handlesWidth){var c=this._tableElement;
if(!c){return 0;
}var d=parseInt($telerik.getCurrentStyle(c.rows[2].cells[0],"width"));
if(!d){return 0;
}this._handlesWidth=2*d;
}return this._handlesWidth;
},get_minWidth:function(){if(!this._minWidth){var f=this._getHandlesWidth();
this._minWidth=f;
if(this._visibleTitlebar){var g=this._tableElement;
var d=this._getTitleElement();
var e=d.style.width;
if(d){d.style.width="1px";
}if(this._dockMode){this._contentElement.style.width="1px";
}g.style.width="1px";
var c=this._titleCell.offsetWidth;
d.style.width=e;
g.style.width="";
if(this._dockMode){this._contentElement.style.width="";
}this._minWidth+=c;
}}return this._minWidth;
},get_minHeight:function(){if(!this._minHeight){var c=Math.ceil(this._getHandlesWidth()/2);
this._minHeight=c;
this._minHeight+=this._visibleTitlebar?this._titleCell.offsetHeight:c;
this._minHeight+=this._visibleStatusbar?this._statusCell.offsetHeight:0;
}return this._minHeight;
},setOverflowVisible:function(e,h,d,g,f){var c="auto";
if(!e){f="hidden";
g="hidden";
c="hidden";
}if(this._dockMode){this.get_contentElement().style.overflow=c;
}if(h&&d){h.style.overflow=g;
d.style.overflow=f;
}},_updateTitleWidth:function(){if(this._visibleTitlebar){var i=this._getTitleElement();
if(!i){return;
}i.style.width="1px";
var c=0;
var k=this._getTitleCommandButtonsHolder();
var h=k.offsetWidth;
if(h>0){var g=k.getElementsByTagName("LI");
if(g[0]&&g[0].offsetWidth>0){h=g.length*g[0].offsetWidth;
}k.style.width=h+"px";
c+=h;
}var f=this._getTitleIcon();
var d=f.offsetWidth;
if(d>0&&f.parentNode.tagName=="TD"){f.parentNode.style.width=d+"px";
c+=d;
}c+=this._getHandlesWidth();
var j=0;
var e=this._titlebarElement;
j=e?e.offsetWidth-c:c;
if(j>0){i.style.width=j+"px";
}}},_addWindowToDocument:function(){var c=this._getDefaultParent();
c.insertBefore(this._popupElement,c.firstChild);
},_createBackReference:function(){var f=this;
if(!f.Argument){f.Argument={};
}var c=this._iframe;
try{c.radWindow=f;
if(c.contentWindow!=null){c.contentWindow.radWindow=f;
}}catch(d){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(e){var d=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize");
var c=(true==e)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",d,c);
},_configureMaximizeButton:function(e){var d=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Maximize");
var c=(true==e)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",d,c);
},_registerTitlebarHandlersButton:function(c,e,f){var d=this._getTitleCommandButton(c);
if(d){d.setAttribute("title",e);
d.innerHTML=e;
$clearHandlers(d);
$addHandlers(d,{click:f},this);
$addHandler(d,"dblclick",this._cancelEvent);
$addHandler(d,"mousedown",this._cancelEvent);
}},isCloned:function(){return this._isCloned;
},isBehaviorEnabled:function(c){return c&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(c){return c&this.get_initialBehaviors()?true:false;
},setVisible:function(c){if(this._popupBehavior){if(c){this._popupBehavior.show();
}else{this._popupBehavior.hide();
}}},isVisible:function(){return this._popupVisible;
},isModal:function(){return this._modal;
},isActive:function(){return(this._popupElement&&!Sys.UI.DomElement.containsCssClass(this._popupElement,"rwInactiveWindow"));
},isPinned:function(){var c=this._getTitleCommandButton("Pin");
return(c&&Sys.UI.DomElement.containsCssClass(c,"on"));
},isClosed:function(){return(!this.isVisible());
},isMinimized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMinimizedWindow"));
},isMaximized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMaximizedWindow"));
},_moveToMinimizeZone:function(){var d=$get(this.get_minimizeZoneID());
if(d){if(this.isPinned()){this._isPinned=true;
this.togglePin();
}var c=this._popupElement;
if(c.parentNode!=d){c.parentNode.removeChild(c);
d.appendChild(c);
this.setVisible(true);
c.style.position="static";
if(this.isIE){c.style.display="inline";
}else{c.style.cssFloat="left";
}}}},_moveToDocument:function(){var c=this._popupElement;
c.parentNode.removeChild(c);
c.style.position="absolute";
if(this.isIE){c.style.display="";
}else{c.style.cssFloat="";
}this._addWindowToDocument();
if(this._isPinned){this._isPinned=false;
this.togglePin();
}},minimize:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Minimize");
if(!d){return;
}if(this.isMaximized()){this._normalizeWindowRootCss();
this._restoreBounds();
}var c=this._popupElement;
$telerik.removeCssClasses(c,["rwNormalWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(c,"rwMinimizedWindow");
if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
Sys.UI.DomElement.addCssClass(c,"rwMinimizedWindowShadow");
}var e=c._hideWindowedElementsIFrame;
if(e){Sys.UI.DomElement.addCssClass(e,"rwMinimizedWindowOverlay");
}this._configureMinimizeButton(true);
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
this._getTitleElement().style.width="";
if(this.get_minimizeZoneID()){this._moveToMinimizeZone();
}},restore:function(){if(!this.isCreated()||this.isClosed()){return;
}var c=this.onCommand("Restore");
if(!c){return;
}this._configureMinimizeButton();
this._configureMaximizeButton();
if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument();
}this._normalizeWindowRootCss();
this._enablePageScrolling(true);
this._restoreBounds();
this.setVisible(true);
if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}if(this.get_showOnTopWhenMaximized()&&this._restoreZindex){this._popupElement.style.zIndex=this._restoreZindex;
this._restoreZindex=null;
}this.setVisible(true);
this.setActive(true);
},maximize:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Maximize");
if(!d){return;
}this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument();
}if(this.isMinimized()){this._normalizeWindowRootCss();
this._checkRestrictionZoneBounds=function(){return true;
};
this._restoreBounds();
this._checkRestrictionZoneBounds=a.RadWindow.prototype._checkRestrictionZoneBounds;
}this._setShadowCSSClass(false);
var c=this._popupElement;
$telerik.removeCssClasses(c,["rwNormalWindow","rwMinimizedWindow","rwMinimizedWindowShadow"]);
Sys.UI.DomElement.addCssClass(c,"rwMaximizedWindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var f=c._hideWindowedElementsIFrame;
if(f){Sys.UI.DomElement.removeCssClass(f,"rwMinimizedWindowOverlay");
this._popupBehavior._handleElementResize();
}if(!this.isActive()){this.setActive(true);
}if(!this.isActive()){this.setActive(true);
}if(this.get_showOnTopWhenMaximized()){var e=c.style.zIndex;
if(e){this._restoreZindex=e;
}c.style.zIndex=100000;
}this._updateTitleWidth();
},setActive:function(c){var f=this._popupElement;
if(!c){Sys.UI.DomElement.addCssClass(f,"rwInactiveWindow");
}else{if(!this.isMaximized()){var d=parseInt(f.style.zIndex);
var e=(this.get_stylezindex())?this.get_stylezindex():a.RadWindowUtils.get_newZindex(d);
f.style.zIndex=""+e;
}this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){return;
}Sys.UI.DomElement.removeCssClass(f,"rwInactiveWindow");
}},togglePin:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Pin");
if(!d){return;
}var c=this._getTitleCommandButton("Pin");
var f=this.isPinned();
var e=f?this._getLocalizationString("PinOn"):this._getLocalizationString("PinOff");
if(c){Sys.UI.DomElement.toggleCssClass(c,"on");
}this._registerTitlebarHandlersButton("Pin",e,this.togglePin);
a.RadWindowUtils.setPinned(!f,this);
},reload:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Reload");
if(!d){return;
}if(!this._iframe){return;
}this._onWindowUrlChanging();
try{this._iframe.contentWindow.location.reload();
}catch(c){this._onWindowUrlChanged();
}},fire:function(d){if(d&&typeof(this[d])=="function"){this[d]();
}else{var c=this.get_windowManager();
if(!c){return;
}if(d&&typeof(c[d])=="function"){c[d]();
}}},_normalizeWindowRootCss:function(){var c=this._popupElement;
if(c){$telerik.removeCssClasses(c,["rwMinimizedWindow","rwMaximizedWindow","rwMinimizedWindowShadow"]);
Sys.UI.DomElement.addCssClass(c,"rwNormalWindow");
var d=c._hideWindowedElementsIFrame;
if(d){Sys.UI.DomElement.removeCssClass(d,"rwMinimizedWindowOverlay");
}}this._updateTitleWidth();
},close:function(c){if(this.isClosed()){return;
}var d=new Sys.CancelEventArgs();
this.raiseEvent("beforeClose",d);
if(d.get_cancel()){return;
}this.hide();
var e=new Sys.EventArgs();
e._argument=(typeof(c)!="undefined"&&!(c instanceof Sys.UI.DomEvent))?c:null;
e.get_argument=function(){return this._argument;
};
this.raiseEvent("close",e);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(c instanceof Sys.UI.DomEvent){c=null;
}this._invokeDialogCallBackFunction(c);
if(this.get_destroyOnClose()&&!this._dockMode){this.dispose();
}},_invokeDialogCallBackFunction:function(d){var c=this.get_clientCallBackFunction();
if(c){if("string"==typeof(c)){c=eval(c);
}if("function"==typeof(c)){c(this,d);
}}},onCommand:function(d){var c=new Sys.CancelEventArgs();
c._commandName=d;
c.get_commandName=function(){return this._commandName;
};
this.raise_command(c);
if(c.get_cancel()){return false;
}return true;
},setUrl:function(d){if(this._dockMode){return;
}this._createUI();
this.set_navigateUrl(d);
var c=d;
if(this.get_reloadOnShow()){c=this._getReloadOnShowUrl(c);
}this._iframe.src=c;
this._onWindowUrlChanging();
if(!this._loaded){this._registerIframeLoadHandler(true);
}this._loaded=true;
},_registerChildPageHandlers:function(c){var d=null;
try{d=this._iframe.contentWindow.document;
if(d.domain!=document.domain){return;
}}catch(f){return;
}if(null==d){return;
}if(c){this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){d.onunload=this._onChildPageUnloadDelegate;
}else{this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(d,"click",this._onChildPageClickDelegate);
}else{if(this._onChildPageClickDelegate){$telerik.removeExternalHandler(d,"click",this._onChildPageClickDelegate);
this._onChildPageClickDelegate=null;
}}},_onChildPageUnload:function(c){this._registerChildPageHandlers(false);
},_onChildPageClick:function(d){if(!this.isVisible()||this.isClosed()){return;
}var c=d.target?d.target:d.srcElement;
if(c){if(c.tagName=="INPUT"&&c.type=="button"){return;
}else{if(c.tagName=="BUTTON"||c.tagName=="A"){return;
}}}this.setActive(true);
},_onIframeLoad:function(){this._onWindowUrlChanged();
this._registerChildPageHandlers(true);
this.raiseEvent("pageLoad",new Sys.EventArgs());
if(this.get_autoSize()){var d=this.get_animation()!=a.WindowAnimation.None;
this.autoSize(d);
}var c=null;
try{c=this._iframe.contentWindow;
var e=c.document;
}catch(f){return false;
}c.close=Function.createDelegate(this,function(){this.close();
});
},_onWindowUrlChanging:function(){if(this.get_showContentDuringLoad()){var d=this._getStatusMessageElement();
if(d){Sys.UI.DomElement.addCssClass(d,"rwLoading");
}}else{var c=this._iframe.style;
c.position="absolute";
c.top="-10000px";
var e=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(e,"rwLoading");
}},_onWindowUrlChanged:function(){var c=this._getStatusMessageElement();
if(this.get_showContentDuringLoad()){if(c){Sys.UI.DomElement.removeCssClass(c,"rwLoading");
}}else{this._iframe.style.position="";
var d=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(d,"rwLoading");
}if(c){this.set_status(this.get_navigateUrl());
}try{var f=this._iframe.contentWindow.document.title;
if(f&&f!=this.get_title()){this.set_title(f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));
}}catch(g){}},_updatePopupZindex:function(){if(this._popupBehavior){if(this.isVisible()){this._popupBehavior.show();
}}},_updateOpacity:function(){var c=this._dockMode?this.get_contentElement():this.get_contentFrame();
if(c){if(this._opacity<100){this._contentCell.style.background="none transparent";
var d=c.style;
d.filter="alpha(opacity="+this._opacity+")";
d.opacity=(this._opacity/100);
}else{this._contentCell.style.background="";
if($telerik.isIE){this._contentCell.removeAttribute("style");
c.style.removeAttribute("filter");
c.style.removeAttribute("opacity");
}else{c.style.filter="";
c.style.opacity="";
}}}},get_zindex:function(){if(this._popupElement){return this._popupElement.style.zIndex;
}else{return -1;
}},get_browserWindow:function(){return this._browserWindow;
},get_contentFrame:function(){return this._iframe;
},get_offsetElementID:function(){return this._offsetElementID;
},set_offsetElementID:function(c){if(this._offsetElementID!=c){this._offsetElementID=c;
this._offsetElement=$get(c);
this._deleteStoredBounds();
this._offsetSet=false;
}if(this.isVisible()){this._show();
}},get_openerElementID:function(){return this._openerElementID;
},set_openerElementID:function(c){if(this._openerElementID!=c){if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}this._openerElementID=c;
if(this._openerElementID){this._openerElement=$get(this._openerElementID);
}if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,true);
}}},get_left:function(){return this._left;
},set_left:function(c){if(this._left!=c){this._left=parseInt(c)||parseInt(c)==0?parseInt(c):null;
}},get_top:function(){return this._top;
},set_top:function(c){if(this._top!=c){this._top=parseInt(c)||parseInt(c)==0?parseInt(c):null;
}},get_title:function(){return this._title;
},set_title:function(c){if(this._title!=c){this._title=c;
}if(null==this._titleElement){return;
}this._titleElement.innerHTML=c==""?"&nbsp;":this._title;
this._updateTitleWidth();
},get_width:function(){return parseInt(this._width);
},_fixSizeValue:function(c){c=""+c;
if(-1==c.indexOf("px")){c=parseInt(c);
if(!isNaN(c)){c=c+"px";
}else{c="";
}}return c;
},set_width:function(c){if(null==c){return false;
}if(this.isMaximized()){return false;
}c=this._fixSizeValue(c);
var e=this._popupElement;
if(e){var f=$telerik.getBounds(e);
var d=parseInt(c);
if(isNaN(d)){d=f.width;
}var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(f.x,f.y,d,f.height));
if(!g){return false;
}}if(this._width!=c){this._width=c;
}if(this._dockMode){this.setWidthDockMode(this.get_width());
}if(e){this._deleteStoredBounds();
e.style.width=this._width;
this._updatePopupZindex();
}this._updateTitleWidth();
return true;
},get_height:function(){return parseInt(this._height);
},set_height:function(c){if(null==c){return false;
}if(this.isMaximized()){return false;
}c=this._fixSizeValue(c);
var d=this._popupElement;
if(d){this._firstShow=false;
var e=$telerik.getBounds(d);
var f=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(e.x,e.y,e.width,parseInt(c)));
if(!f){return false;
}}if(this._height!=c){this._height=c;
}if(this._dockMode){this.setHeightDockMode(this.get_height());
}if(d){this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}return true;
},_updateWindowSize:function(d,e){var f=this._tableElement;
var c=d?d:f.style.height;
if(true==e){c=f.offsetHeight+"px";
}if(parseInt(c)==0){return;
}f.style.height=c;
this._fixIeHeight(f,c);
f.parentNode.style.height=c;
},get_behaviors:function(){return this._behaviors;
},set_behaviors:function(f){if(this._behaviors!=f){this._behaviors=f;
}if(null==this._titlebarElement){return;
}this._enableMoveResize(false);
this._enableMoveResize(true);
if(this._buttonsArray&&this._buttonsArray.length>0){var l=this._buttonsArray.length;
for(var e=0;
e<l;
e++){var d=this._buttonsArray[e];
$clearHandlers(d);
}this._buttonsArray=[];
var c=this._getTitleCommandButtonsHolder();
c.innerHTML="";
}if(a.WindowBehaviors.None==this._behaviors){return;
}else{var o=a.WindowBehaviors;
var p=[[this.isBehaviorEnabled(o.Pin),"rwPinButton",this._getLocalizationString("PinOn"),this.togglePin],[this.isBehaviorEnabled(o.Reload),"rwReloadButton",this._getLocalizationString("Reload"),this.reload],[this.isBehaviorEnabled(o.Minimize),"rwMinimizeButton",this._getLocalizationString("Minimize"),this.minimize],[this.isBehaviorEnabled(o.Maximize),"rwMaximizeButton",this._getLocalizationString("Maximize"),this.maximize],[this.isBehaviorEnabled(o.Close),"rwCloseButton",this._getLocalizationString("Close"),this.close]];
for(var g=0;
g<p.length;
g++){var m=p[g];
if(!m[0]){continue;
}var h=document.createElement("li");
var k=document.createElement("a");
k.href="javascript:void(0);";
k.className=m[1];
k.setAttribute("title",m[2]);
var n=document.createElement("span");
n.innerHTML=m[2];
k.appendChild(n);
$addHandlers(k,{click:m[3],dblclick:this._cancelEvent,mousedown:this._cancelEvent},this);
$addHandler(k,"click",this._cancelEvent);
h.appendChild(k);
this._buttonsElement.appendChild(h);
this._buttonsArray[this._buttonsArray.length]=k;
this._updateTitleWidth();
this._minWidth=null;
}}},get_modal:function(){return this._modal;
},set_modal:function(c){if(this._modal!=c){this._modal=c;
}this._makeModal(this._modal);
if(this.isVisible()){this._afterShow();
}},get_visibleTitlebar:function(){return this._visibleTitlebar;
},set_visibleTitlebar:function(d){if(this._visibleTitlebar!=d){this._visibleTitlebar=d;
}var c=this.get_popupElement();
if(c){d?Sys.UI.DomElement.removeCssClass(c,"rwNoTitleBar"):Sys.UI.DomElement.addCssClass(c,"rwNoTitleBar");
}if(this._titlebarElement){this._titlebarElement.style.display=d?"":"none";
}},get_visibleStatusbar:function(){return this._visibleStatusbar;
},set_visibleStatusbar:function(c){if(this._visibleStatusbar!=c){this._visibleStatusbar=c;
}if(this._statusCell){this._statusCell.parentNode.style.display=c?"":"none";
}},get_overlay:function(){return this._overlay;
},set_overlay:function(c){this._overlay=c;
if(this._popupBehavior){this._popupBehavior.set_overlay(this._overlay);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_opacity:function(){return this._opacity;
},set_opacity:function(c){if(this.get_opacity()!=c){this._opacity=c>100?100:c;
this._opacity=c<0?0:c;
if(this.isCreated()){this._updateOpacity();
}}},get_keepInScreenBounds:function(){return this._keepInScreenBounds;
},set_keepInScreenBounds:function(c){this._keepInScreenBounds=c;
if(this._popupBehavior){this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_popupElement:function(){return this._popupElement;
},set_status:function(d){var c=this._getStatusMessageElement();
if(c){window.setTimeout(function(){c.value=d;
},0);
}},get_status:function(){var c=this._getStatusMessageElement();
if(c){return c.value;
}},raise_command:function(c){this.raiseEvent("command",c);
},add_resize:function(c){this.get_events().addHandler("resizeEnd",c);
},remove_resize:function(c){this.get_events().removeHandler("resizeEnd",c);
},saveClientState:function(){var c=["position"];
var e={};
for(var d=0;
d<c.length;
d++){e[c[d]]=this["get_"+c[d]]();
}return Sys.Serialization.JavaScriptSerializer.serialize(e);
}};
b.registerControlProperties(a.RadWindow,{minimizeZoneID:null,restrictionZoneID:"",minimizeIconUrl:null,iconUrl:null,clientCallBackFunction:null,navigateUrl:null,localization:null,shortcuts:null,initialBehaviors:a.WindowBehaviors.None,destroyOnClose:false,reloadOnShow:false,showContentDuringLoad:true,visibleOnPageLoad:false,showOnTopWhenMaximized:true,animation:a.WindowAnimation.None,animationDuration:500,autoSize:false,windowManager:null,cssClass:"",stylezindex:null,name:null,skin:"Deafult",formID:null,enableShadow:false});
b.registerControlEvents(a.RadWindow,["command","dragStart","dragEnd","activate","beforeShow","show","pageLoad","close","beforeClose","resizeStart","resizeEnd"]);
a.RadWindow.registerClass("Telerik.Web.UI.RadWindow",a.RadWebControl);
a.RadWindowUtils._zIndex=3000;
a.RadWindowUtils.get_newZindex=function(c){c=parseInt(c);
if(null==c||isNaN(c)){c=0;
}if(a.RadWindowUtils._zIndex<c){a.RadWindowUtils._zIndex=c;
}a.RadWindowUtils._zIndex++;
return a.RadWindowUtils._zIndex;
};
a.RadWindowUtils._pinnedList={};
a.RadWindowUtils.setPinned=function(e,c){if(e){var j=c._getViewportBounds();
var i=c._getCurrentBounds();
c.LeftOffset=i.x-j.scrollLeft;
c.TopOffset=i.y-j.scrollTop;
var h=window.setInterval(function(){a.RadWindowUtils._updatePinnedElementPosition(c);
},100);
a.RadWindowUtils._pinnedList[h]=c;
}else{var g=null;
var d=a.RadWindowUtils._pinnedList;
for(var f in d){if(d[f]==c){g=f;
break;
}}if(null!=g){window.clearInterval(g);
a.RadWindowUtils._pinnedList[g]=null;
}c.TopOffset=null;
c.LeftOffset=null;
}};
a.RadWindowUtils._updatePinnedElementPosition=function(f){if(f.isMaximized()||!f.isVisible()){return;
}var g=f._getViewportBounds();
var d=f._getCurrentBounds();
var e=(f.LeftOffset!=null)?f.LeftOffset+g.scrollLeft:d.x;
var c=(f.TopOffset!=null)?f.TopOffset+g.scrollTop:d.y;
if(d.x!=e||d.y!=c){f.moveTo(e,c);
}};
})();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.WindowShortCutManager=function(a){this._shortcuts=[];
this.addShortCuts(a);
};
Telerik.Web.UI.WindowShortCutManager.prototype={addShortCuts:function(a){if(typeof(a)=="string"){a=Sys.Serialization.JavaScriptSerializer.deserialize(a);
}for(var b=0;
b<a.length;
b++){this.addShortCut(a[b][0],a[b][1]);
}},addShortCut:function(b,c){var a=new Telerik.Web.UI.WindowShortCut(b,c);
a.HashValue=this._getShortCutHashValue(a);
this._shortcuts[a.HashValue]=a;
},removeShortCut:function(b){var a=this.findShortCutByName(b);
if(a){this._shortcuts[a.HashValue]=null;
}},setShortCut:function(b,a){this.removeShortCut(b);
this.addShortCut(b,a);
},isShortCutHit:function(a){return this._hitTest(a.keyCode,a.ctrlKey,(null!=a.ctrlLeft?a.ctrlLeft:a.ctrlKey),a.shiftKey,(null!=a.shiftLeft?a.shiftLeft:a.shiftKey),a.altKey,(null!=a.altLeft?a.altLeft:a.altKey));
},_hitTest:function(e,h,g,b,a,f,c){var d=this._getHashValue(e,h,g,b,a,f,c);
return this._shortcuts[d];
},_getHashValue:function(f,i,h,c,b,g,e){var a=f&65535;
var d=0;
d|=(i?(1<<0):0);
d|=(c?(1<<2):0);
d|=(g?(1<<4):0);
a|=(d<<16);
return a;
},_getShortCutHashValue:function(a){return this._getHashValue(a.KeyCode,a.CtrlKey,a.LeftCtrlKey,a.ShiftKey,a.LeftShiftKey,a.AltKey,a.LeftAltKey);
},findShortCutByName:function(c){var b;
for(var a in this._shortcuts){b=this._shortcuts[a];
if(null!=b&&b._name==c){return b;
}}return null;
}};
Telerik.Web.UI.WindowShortCut=function(b,a){this._name=b;
this._shortcutString="";
this.setShortCut(a);
};
Telerik.Web.UI.WindowShortCut.prototype={CtrlKey:false,LeftCtrlKey:false,ShiftKey:false,LeftShiftKey:false,AltKey:false,LeftAltKey:false,KeyCode:0,get_name:function(){return this._name;
},set_name:function(a){this._name=a;
},get_shortCutString:function(){return this._shortcutString;
},setShortCut:function(a){this._parseShortcutString(a);
this._shortcutString=a;
},_parseShortcutString:function(c){if("string"==typeof(c)){this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
c=c.replace(/\s*/gi,"");
c=c.replace(/\+\+/gi,"+PLUS");
var d=c.split("+");
var b="";
for(var a=0;
a<d.length;
a++){b=d[a].toUpperCase();
switch(b){case"LCTRL":this.LeftCtrlKey=true;
case"CTRL":this.CtrlKey=true;
break;
case"LSHIFT":this.LeftShiftKey=true;
case"SHIFT":this.ShiftKey=true;
break;
case"LALT":this.LeftAltKey=true;
case"ALT":this.AltKey=true;
break;
case"F1":this.KeyCode=112;
break;
case"F2":this.KeyCode=113;
break;
case"F3":this.KeyCode=114;
break;
case"F4":this.KeyCode=115;
break;
case"F5":this.KeyCode=116;
break;
case"F6":this.KeyCode=117;
break;
case"F7":this.KeyCode=118;
break;
case"F8":this.KeyCode=119;
break;
case"F9":this.KeyCode=120;
break;
case"F10":this.KeyCode=121;
break;
case"F11":this.KeyCode=122;
break;
case"F12":this.KeyCode=123;
break;
case"ENTER":this.KeyCode=13;
break;
case"HOME":this.KeyCode=36;
break;
case"END":this.KeyCode=35;
break;
case"LEFT":this.KeyCode=37;
break;
case"RIGHT":this.KeyCode=39;
break;
case"UP":this.KeyCode=38;
break;
case"DOWN":this.KeyCode=40;
break;
case"PAGEUP":this.KeyCode=33;
break;
case"PAGEDOWN":this.KeyCode=34;
break;
case"SPACE":this.KeyCode=32;
break;
case"TAB":this.KeyCode=9;
break;
case"BACK":this.KeyCode=8;
break;
case"CONTEXT":this.KeyCode=93;
break;
case"ESCAPE":case"ESC":this.KeyCode=27;
break;
case"DELETE":case"DEL":this.KeyCode=46;
break;
case"INSERT":case"INS":this.KeyCode=45;
break;
case"PLUS":this.KeyCode="+".charCodeAt(0);
break;
default:this.KeyCode=b.charCodeAt(0);
break;
}}}else{throw {description:"Invalid shortcut string"};
}}};

Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.WindowManager");
$telerik.toWindowManager=function(a){return a;
};
$telerik.findWindowManager=$find;
function GetRadWindowManager(){return Telerik.Web.UI.WindowManager.Manager;
}window.radalert=function(e,c,d,a){var b=GetRadWindowManager();
return b.radalert(e,c,d,a);
};
window.radconfirm=function(f,e,d,c,b,g){var a=GetRadWindowManager();
return a.radconfirm(f,e,d,c,b,g);
};
window.radprompt=function(g,f,d,c,b,h,e){var a=GetRadWindowManager();
return a.radprompt(g,f,d,c,b,h,e);
};
window.radopen=function(a,c){var b=GetRadWindowManager();
return b.open(a,c);
};
window.radopenWithContainer=function(a,b){var d=GetRadWindowManager();
var c=$get(a);
if(!c){radalert("Content element with such ClientID not found!<br/> Make sure you have provided a correct ClientID!");
return;
}return d.open(null,b,c);
};
Telerik.Web.UI.RadWindowManager=function(a){Telerik.Web.UI.RadWindowManager.initializeBase(this,[a]);
this._windowIDs=[];
this._windows=[];
this._preserveClientState=false;
this.Open=this.open;
this.GetWindowByName=this.getWindowByName;
this.GetWindowById=this.getWindowById;
this.GetActiveWindow=this.getActiveWindow;
this.GetWindowObjects=this.get_windows;
this.GetWindows=this.get_windows;
this.Cascade=this.cascade;
this.Tile=this.tile;
this.RestoreAll=this.restoreAll;
this.MaximizeAll=this.maximizeAll;
this.MinimizeAll=this.minimizeAll;
this.ShowAll=this.showAll;
this.CloseAll=this.closeAll;
this.CloseActiveWindow=this.closeActiveWindow;
this.MinimizeActiveWindow=this.minimizeActiveWindow;
this.RestoreActiveWindow=this.restoreActiveWindow;
};
Telerik.Web.UI.RadWindowManager.prototype={get_zIndex:function(){return Telerik.Web.UI.RadWindowUtils._zIndex;
},set_zIndex:function(b){var a=parseInt(b);
if(isNaN(b)){return;
}Telerik.Web.UI.RadWindowUtils._zIndex=b;
},initialize:function(a){try{var b=this.get_element().style.zIndex;
if(b){this.set_zIndex(b);
}}catch(c){}this._initialize();
this._registerAsPageManager();
if(this.get_preserveClientState()){this.restoreState();
}},dispose:function(){var a=this.get_preserveClientState();
if(a){this.saveState();
}this._disposeWindows();
this._windows=null;
Telerik.Web.UI.RadWindowManager.callBaseMethod(this,"dispose");
},open:function(a,c,e){var d=this.getWindowByName(c);
if(!d){if(!c){c=this.get_id()+this._getUniqueId();
}d=this._createWindow(c,e);
var b=this.get_element().className;
if(b){d.set_cssClass(b.replace(/^ /,""));
}}else{if(e&&this.get_navigateUrl()){d._dockMode=false;
}}if(a&&!d.get_reloadOnShow()&&d._iframe&&d._iframe.src!=a){d.setUrl(a);
}else{if(a){d._navigateUrl=a;
}}d.show();
return d;
},radalert:function(e,b,d,a){var c=this._getStandardPopup("alert",e);
if(typeof(a)!="undefined"){c.set_title(a);
}c.setSize(b?b:280,d?d:200);
c.center();
c.show();
return c;
},radconfirm:function(f,e,d,c,b,g){var a=this._getStandardPopup("confirm",f);
if(typeof(g)!="undefined"){a.set_title(g);
}a.setSize(d?d:280,c?c:200);
a.set_clientCallBackFunction(function(j,h){if(e){e(h);
}});
a.center();
a.show();
return a;
},radprompt:function(h,g,d,c,b,j,f){var a=this._getStandardPopup("prompt",h,f);
if(typeof(j)!="undefined"){a.set_title(j);
}a.setSize(d?d:280,c?c:200);
a.set_clientCallBackFunction(function(l,k){if(g){g(k);
}});
a.center();
a.show();
if(f&&$telerik.isIE){var e=a.get_popupElement().getElementsByTagName("INPUT")[0];
if(e){e.value=f;
}}return a;
},getActiveWindow:function(){return Telerik.Web.UI.RadWindowController.get_activeWindow();
},getWindowById:function(b){var a=this.get_windows();
for(var d=0;
d<a.length;
d++){var c=a[d];
if(b==c.get_id()){return c;
}}return null;
},getWindowByName:function(d){var a=this.get_windows();
if(!a){return null;
}for(var b=0;
b<a.length;
b++){var c=a[b];
if(d==c.get_name()){return c;
}}return null;
},removeWindow:function(b){if(!b){return;
}var c=this.getWindowByName(b.get_name());
var a=this.get_windows();
if(c){Array.remove(a,c);
}},_getUniqueId:function(){return""+(new Date()-100);
},_initialize:function(){var a=this._windowIDs;
for(var b=0;
b<a.length;
b++){var d=a[b];
var c=$find(d);
if(!c){continue;
}c.set_windowManager(this);
this._windows[this._windows.length]=c;
}},_disposeWindows:function(){for(var a=0;
a<this._windows.length;
a++){var b=this._windows[a];
if(b.isCloned()){b.dispose();
}}this._windows=[];
},clearCloneCache:function(){this.__clonedProperties__=null;
},_createWindow:function(b,c){var a=this.clone(b);
a.set_modal(a.isModal());
a.set_name(b);
this._windows[this._windows.length]=a;
a.set_windowManager(this);
if(c){a.set_contentElement(c);
a._dockMode=true;
a.set_behaviors(a.get_behaviors()&~Telerik.Web.UI.WindowBehaviors.Reload);
}return a;
},_replaceLocalization:function(a,b){var e=/##LOC\[(.*?)\]##/;
while(a.match(e)){var d=this._getLocalizationString(RegExp.$1);
var c=d?d:"";
a=a.replace(e,c);
}return a;
},_getStandardPopup:function(b,e,h){var j=this._createWindow(b+this._getUniqueId(),false);
j.set_destroyOnClose(true);
j.set_restrictionZoneID(null);
j.set_modal(true);
var c=document.getElementById(this.get_id()+"_"+b.toLowerCase()+"template");
var f=$telerik.isIE?"''":"";
var a=this._stringFormat(c.innerHTML,j.get_id(),e,h?h:f);
a=this._replaceLocalization(a,Telerik.Web.UI.RadWindowUtils.Localization);
var g=document.createElement("div");
g.innerHTML=a;
j.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close+Telerik.Web.UI.WindowBehaviors.Move);
j.set_visibleStatusbar(false);
j._isPredefined=true;
j.set_contentElement(g);
var d=j.get_contentElement().getElementsByTagName("INPUT")[0];
if(!d){d=j.get_contentElement().getElementsByTagName("A")[0];
}if(d&&d.focus){window.setTimeout(function(){var l=true;
if(d.setActive){try{d.setActive();
l=false;
}catch(k){}}if(l){d.focus();
}},0);
}return j;
},_stringFormat:function(a){for(var b=1;
b<arguments.length;
b++){a=a.replace(new RegExp("\\{"+(b-1)+"\\}","ig"),arguments[b]);
}return a;
},_registerAsPageManager:function(){var b=Telerik.Web.UI.WindowManager.Manager;
var a=this.get_id();
if(b&&b.get_id()==a){b.dispose();
Telerik.Web.UI.WindowManager.Manager=null;
}if(b&&!b.get_id()){Telerik.Web.UI.WindowManager.Manager=null;
}if(!Telerik.Web.UI.WindowManager.Manager){Telerik.Web.UI.WindowManager.Manager=this;
}},saveWindowState:function(b){if(!b||!b.isCreated()){return;
}var c=b.getWindowBounds();
var a=(b.isVisible()||b.isMinimized())+"@"+c.width+"@"+c.height+"@"+c.x+"@"+c.y+"@"+b.isMinimized();
this._setRadWindowCookie(b.get_id(),a);
},saveState:function(){var b=this.get_windows();
for(i=0;
i<b.length;
i++){var a=b[i];
if(a.isCloned()){this.saveWindowState(a);
}}},restoreState:function(){function d(g,f){var e=f.split("@");
if(e.length>1){if("true"==e[0]&&!g.isVisible()){g.show();
}window.setTimeout(function(){if(parseInt(e[1])>0){g.set_width(e[1]);
}if(parseInt(e[2])>0){g.set_height(e[2]);
}if("true"==e[0]){g.moveTo(parseInt(e[3]),parseInt(e[4]));
}if("true"==e[5]){g.minimize();
}},1);
}}var a=this.get_windows();
for(i=0;
i<a.length;
i++){var c=a[i];
var b=this._getRadWindowCookie(c.get_id());
if(b){d(c,b);
}}},_getOnlyCookie:function(){var a="RadWindowCookie";
var c=document.cookie.split("; ");
for(var b=0;
b<c.length;
b++){var d=c[b].split("=");
if(a==d[0]){return d[1];
}}return null;
},_setRadWindowCookie:function(c,a){c="["+c+"]";
var b=this._getOnlyCookie();
var f="";
var e="";
if(b){var g=b.split(c);
if(g&&g.length>1){f=g[0];
e=g[1].substr(g[1].indexOf("#")+1);
}else{e=b;
}}var d=new Date();
d.setFullYear(d.getFullYear()+10);
document.cookie="RadWindowCookie="+(f+c+"-"+a+"#"+e)+";path=/;expires="+d.toUTCString()+";";
},_getRadWindowCookie:function(a){var d=this._getOnlyCookie();
if(!d){return;
}var b=null;
a="["+a+"]";
var c=d.indexOf(a);
if(c>=0){var e=c+a.length+1;
b=d.substring(e,d.indexOf("#",e));
}return b;
},cascade:function(){var c=0;
var e=0;
var f=this._getWindowsSortedByZindex();
for(var b=0;
b<f.length;
b++){var a=f[b];
if(!a.isClosed()&&a.isVisible()){var d=a.restore();
a.moveTo(c,e);
a.setActive(true);
c+=25;
e+=25;
}}},tile:function(){var g=this._getWindowsSortedByZindex();
var l=0;
for(var h=0;
h<g.length;
h++){var n=g[h];
if(!n.isClosed()&&n.isVisible()){l++;
}}var j=5;
var k=0;
var a=1;
if(l<=j){k=l;
}else{var h=2;
while((l*h)<(j*(h+1))){h++;
if(h>6){break;
}}a=h;
k=Math.ceil(l/a);
}var d=$telerik.getClientBounds();
var m=Math.floor(d.width/k);
var c=Math.floor(d.height/a);
var e=document.documentElement.scrollLeft||document.body.scrollLeft;
var b=document.documentElement.scrollTop||document.body.scrollTop;
var f=0;
for(var h=0;
h<g.length;
h++){var n=g[h];
if(!n.isClosed()&&n.isVisible()){f++;
if((f-1)%(k)==0&&f>k){b+=c;
e=document.documentElement.scrollLeft||document.body.scrollLeft;
}n.restore();
n.moveTo(e,b);
n.setSize(m,c);
e+=m;
}}},closeActiveWindow:function(){this._executeActiveWindow("close");
},minimizeActiveWindow:function(){this._executeActiveWindow("minimize");
},restoreActiveWindow:function(){this._executeActiveWindow("restore");
},closeAll:function(){this._executeAll("close");
},showAll:function(){this._executeAll("show");
},minimizeAll:function(){this._executeAll("minimize");
},maximizeAll:function(){this._executeAll("maximize");
},restoreAll:function(){this._executeAll("restore");
},_getWindowsSortedByZindex:function(){var b=this._windows.concat([]);
var a=function(d,e){var f=d.get_zindex();
var c=e.get_zindex();
if(f==c){return 0;
}return(f<c?-1:1);
};
return b.sort(a);
},_executeAll:function(b){if(!this._windows){return;
}var c=this._windows.concat([]);
for(var a=0;
a<c.length;
a++){c[a][b]();
}},_executeActiveWindow:function(b){var a=this.getActiveWindow();
if(a&&"function"==typeof(a[b])){a[b]();
}},get_preserveClientState:function(){return this._preserveClientState;
},set_preserveClientState:function(a){if(this._preserveClientState!=a){this._preserveClientState=a;
}},set_windowControls:function(a){this._windowIDs=eval(a);
this._disposeWindows();
},set_child:function(a){},get_windowControls:function(){},get_windows:function(){return this._windows;
}};
Telerik.Web.UI.RadWindowManager.registerClass("Telerik.Web.UI.RadWindowManager",Telerik.Web.UI.RadWindow);

Type.registerNamespace("Telerik.Web.UI");
$telerik.toToolTipManager=function(a){return a;
};
$telerik.findToolTipManager=$find;
Telerik.Web.UI.RadToolTipManager=function(a){Telerik.Web.UI.RadToolTipManager.initializeBase(this,[a]);
this._targetControls=null;
this._isToolTipFactory=false;
this._loadOnDemand=false;
this._toolTipZoneID=null;
this._autoTooltipify=false;
this._updatePanelUniqueId="";
this._updatePanelParent=null;
this._tooltips=[];
this._idCounter=100;
this._webServiceSettings=null;
this._cssClass=null;
};
Telerik.Web.UI.RadToolTipManager.prototype={initialize:function(c){this.set_zIndex($telerik.getCurrentStyle(this.get_element(),"zIndex"));
var a=this.get_updatePanel();
if(a){this._updatePanelParent=a.parentNode;
}var d=this.get_visibleOnPageLoad();
this.set_visibleOnPageLoad(false);
var b=this.get_toolTipZoneID();
this.tooltipify(b?$get(b):document,b?this._isDescendant:null);
if(d&&this._tooltips[0]){this._tooltips[0].show();
}window.setTimeout(Function.createDelegate(this,function(){this._trackPageUpdates();
}),0);
},get_updatePanel:function(){return $get(this._getUpdatePanelID());
},dispose:function(){this._moveUpdatePanel();
this._disposeToolTips();
if(this._pageLoadedHandler){var a=Sys.WebForms.PageRequestManager.getInstance();
a.remove_pageLoaded(this._pageLoadedHandler);
this._pageLoadedHandler=null;
}this._updatePanelParent=null;
Telerik.Web.UI.RadToolTipManager.callBaseMethod(this,"dispose");
},_disposeToolTips:function(){for(var a=0;
a<this._tooltips.length;
a++){var b=this._tooltips[a];
b.dispose();
}this._tooltips=null;
},_isDescendant:function(a,b){return $telerik.isDescendant(a,b);
},_trackPageUpdates:function(){if(Sys.WebForms){this._pageLoadedHandler=Function.createDelegate(this,function(e,c){var d=c.get_panelsUpdated();
if(!d){return;
}for(var b=0;
b<d.length;
b++){if(d[b].id==this._getUpdatePanelID()){continue;
}this.tooltipify(d[b],this._isDescendant);
}});
var a=Sys.WebForms.PageRequestManager.getInstance();
a.add_pageLoaded(this._pageLoadedHandler);
}},get_toolTips:function(){return this._tooltips;
},get_tooltips:function(){return this.get_toolTips();
},getToolTipByElement:function(c){if(!c){return null;
}var d=this.get_tooltips();
try{for(var a=0;
a<d.length;
a++){if(d[a].get_targetControl()==c){return d[a];
}}}catch(b){}return null;
},clearCloneCache:function(){this.__clonedProperties__=null;
},createToolTip:function(b,c,a){if(!b){alert("clone error: No target element specified");
return;
}var e=this.clone(this._getUniqueToolTipID());
e._manualCloseButtonText=this._manualCloseButtonText;
e.set_modal(e.isModal());
e._cssClass=this._cssClass;
var d=b.getAttribute("id");
if(d){e.set_targetControlID(d);
}else{e.set_targetControl(b);
}this._tooltips[this._tooltips.length]=e;
if(c&&c!=b.getAttribute("id")){e.set_serverTargetControlID(c);
}if(a){e.set_serverValue(a);
}if(this._loadOnDemand){this._initializeAjaxToolTip(e);
}else{if(this._webServiceSettings){this._initializeWebServiceToolTip(e);
}}return e;
},tooltipify:function(e,g){if(!e){e=document;
}if(!g){g=function(k,i){return true;
};
}var h=this.get_targetControls();
if(h.length>0){var j=h.length;
for(var a=0;
a<j;
a++){var d=h[a];
var b=$get(d[0]);
if(b&&g(e,b)){this.createToolTip(b,d[1],d[2]);
}}}else{if(!this.get_autoTooltipify()){return;
}var h=e.getElementsByTagName("*");
var j=h.length;
for(var a=0;
a<j;
a++){var b=h[a];
var f=b.getAttribute("title");
var c=b.getAttribute("alt");
if(f||c){this.createToolTip(b);
}}}},_initializeWebServiceLoader:function(){this._webServiceLoader=new Telerik.Web.UI.WebServiceLoader(this.get_webServiceSettings());
this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onWebServiceError));
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse));
},_onWebServiceError:function(a,b){this._onError(b.get_message());
},_onWebServiceResponse:function(a,d){var b=d.get_data();
var c=document.createElement("div");
if(this._currentServicedToolTip){this._currentServicedToolTip.set_contentElement(c);
c.innerHTML=b;
}this.raiseEvent("requestEnd");
},_initializeWebServiceToolTip:function(a){a.add_beforeShow(Function.createDelegate(this,function(d,c){if(!this._webServiceLoader){this._initializeWebServiceLoader();
}var b={TargetControlID:a.get_targetControlID(),Value:a.get_serverValue()};
this._currentServicedToolTip=d;
var e=new Sys.CancelEventArgs();
this.raiseEvent("requestStart",e);
if(e.get_cancel()){return;
}this._webServiceLoader.loadData({context:b});
d.set_content("");
d.showLoadingMessage(true);
}));
},_initializeAjaxToolTip:function(a){a.add_beforeShow(Function.createDelegate(this,function(b,c){this._doLoadOnDemand(b);
}));
a.add_hide(Function.createDelegate(this,function(e,d){var b=this.get_updatePanel();
var c=e.get_popupElement();
var f=$telerik.isDescendant(c,b);
if(f){this._moveUpdatePanel();
}}));
},_doLoadOnDemand:function(h){var f=new Sys.CancelEventArgs();
this.raiseEvent("requestStart",f);
if(f.get_cancel()){return;
}var a=this._getDefaultParent();
var e=this._moveUpdatePanel(a,true);
h.showLoadingMessage(true);
var d=Sys.WebForms.PageRequestManager.getInstance();
if(this._requestStarted){d.abortPostBack();
}var g=Function.createDelegate(this,function(i,j){this._requestStarted=true;
d.remove_beginRequest(g);
});
d.add_beginRequest(g);
var b=Function.createDelegate(this,function(i,j){this._requestStarted=false;
d.remove_endRequest(b);
if(j.get_response().get_aborted()){return;
}h.set_contentElement(e);
if(j.get_error()){j.set_errorHandled(true);
this._onError(j.get_error().message);
return;
}this.raiseEvent("requestEnd");
});
d.add_endRequest(b);
var c=h.get_serverTargetControlID();
if(!c){c=h.get_targetControlID();
}this._ajaxControlID=c;
this._ajaxValue=h.get_serverValue();
this.updateClientState();
__doPostBack(this._updatePanelUniqueId);
this._ajaxControlID=null;
this._ajaxValue=null;
},_onError:function(a){if(!a){a="No error data available";
}var b=new Telerik.Web.UI.RadToolTipManagerErrorEventArgs(a);
this.raiseEvent("responseError",b);
if(!b.get_cancelErrorAlert()){alert("RadToolTipManager response error:\n Exception="+a);
}},saveClientState:function(){var a={AjaxTargetControl:this._ajaxControlID,Value:this._ajaxValue};
return Sys.Serialization.JavaScriptSerializer.serialize(a);
},_getUpdatePanelID:function(){return this.get_id()+"RTMPanel";
},_getUniqueToolTipID:function(){this._idCounter++;
return(this.get_id()+this._idCounter+(new Date()-100));
},_moveUpdatePanel:function(b,c){if(!b){b=this._updatePanelParent;
}if(b&&b.appendChild){var a=this.get_updatePanel();
if(a){if(false!=c){a.style.display="none";
}b.appendChild(a);
}return a;
}},set_modal:function(a){if(this._modal!=a){this._modal=a;
}},get_webServiceLoader:function(){return this._webServiceLoader;
},get_webServiceSettings:function(){return this._webServiceSettings;
},set_webServiceSettings:function(b){var a=Sys.Serialization.JavaScriptSerializer.deserialize(b);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(a);
},get_autoTooltipify:function(){return this._autoTooltipify;
},set_autoTooltipify:function(a){if(this._autoTooltipify!=a){this._autoTooltipify=a;
}},get_toolTipZoneID:function(){return this._toolTipZoneID;
},set_toolTipZoneID:function(a){if(this._toolTipZoneID!=a){this._toolTipZoneID=a;
}},get_isToolTipFactory:function(){return this._isToolTipFactory;
},set_isToolTipFactory:function(a){if(this._isToolTipFactory!=a){this._isToolTipFactory=a;
}},get_loadOnDemand:function(){return this._loadOnDemand;
},set_loadOnDemand:function(a){if(this._loadOnDemand!=a){this._loadOnDemand=a;
}},get_targetControls:function(){return this._targetControls;
},set_targetControls:function(a){if(!a){this._targetControls=[];
}else{this._targetControls=eval(a);
}},add_requestStart:function(a){this.get_events().addHandler("requestStart",a);
},remove_requestStart:function(a){this.get_events().removeHandler("requestStart",a);
},add_requestEnd:function(a){this.get_events().addHandler("requestEnd",a);
},remove_requestEnd:function(a){this.get_events().removeHandler("requestEnd",a);
},add_responseError:function(a){this.get_events().addHandler("responseError",a);
},remove_responseError:function(a){this.get_events().removeHandler("responseError",a);
}};
Telerik.Web.UI.RadToolTipManager.registerClass("Telerik.Web.UI.RadToolTipManager",Telerik.Web.UI.RadToolTip);
Telerik.Web.UI.RadToolTipManagerErrorEventArgs=function(a){Telerik.Web.UI.RadToolTipManagerErrorEventArgs.initializeBase(this);
this._cancelErrorAlert=false;
this._errorMessage=a;
};
Telerik.Web.UI.RadToolTipManagerErrorEventArgs.prototype={get_errorMessage:function(){return this._errorMessage;
},get_cancelErrorAlert:function(){return this._cancelErrorAlert;
},set_cancelErrorAlert:function(a){this._cancelErrorAlert=a;
}};
Telerik.Web.UI.RadToolTipManagerErrorEventArgs.registerClass("Telerik.Web.UI.RadToolTipManagerErrorEventArgs",Sys.EventArgs);

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();