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 b=this._getModalOverlay();
if($telerik.getVisible(b)){return;
}this._attachWindowHandlers(true);
var a=this._foregroundElement;
a.parentNode.appendChild(b);
var c=$telerik.getCurrentStyle(a,"zIndex");
if(!isNaN(parseInt(c))){b.style.zIndex=c-1;
}b.style.display="";
this._disableTab();
this._updatePageLayout();
this._updatePageLayout();
},_storeBrowserPosition:function(){var b=document.body;
var a=document.documentElement;
this._browserTop=b.scrollTop>a.scrollTop?b.scrollTop:a.scrollTop;
this._browserLeft=b.scrollLeft>a.scrollLeft?b.scrollTop:a.scrollLeft;
},_restoreBrowserPosition:function(e,d){try{if(null==e){e=this._browserLeft;
}if(null==d){d=this._browserTop;
}var c=document.body;
var a=document.documentElement;
c.scrollTop=d;
c.scrollLeft=e;
a.scrollTop=d;
a.scrollLeft=e;
}catch(b){}},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(a){var b=window;
if(true==a){this._windowResizeDelegate=Function.createDelegate(this,this._updatePageLayout);
$addHandler(b,"resize",this._windowResizeDelegate);
this._windowScrollDelegate=Function.createDelegate(this,this._updatePageLayout);
$addHandler(b,"scroll",this._windowScrollDelegate);
}else{if(this._windowResizeDelegate){$removeHandler(b,"resize",this._windowResizeDelegate);
}this._windowResizeDelegate=null;
if(this._windowScrollDelegate){$removeHandler(b,"scroll",this._windowScrollDelegate);
}this._windowScrollDelegate=null;
}},_updatePageLayout:function(){var f=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body));
var a=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
var e=$telerik.getClientBounds();
var c=e.width;
var b=e.height;
var d=this._getModalOverlay();
d.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c)+"px";
d.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),b)+"px";
},_disableTab:function(){var f=0;
var a;
var d=new Array();
Array.clear(this._saveTabIndexes);
for(var c=0;
c<this._tagWithTabIndex.length;
c++){a=this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[c]);
for(var e=0;
e<a.length;
e++){d[f]=a[e];
f++;
}}f=0;
for(var c=0;
c<this._tagWithTabIndex.length;
c++){a=document.getElementsByTagName(this._tagWithTabIndex[c]);
for(var e=0;
e<a.length;
e++){if(Array.indexOf(d,a[e])==-1){this._saveTabIndexes[f]={tag:a[e],index:a[e].tabIndex};
a[e].tabIndex="-1";
f++;
}}}f=0;
if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){var b=new Array();
for(var c=0;
c<this._tagWithTabIndex.length;
c++){a=this._foregroundElement.getElementsByTagName("SELECT");
for(var e=0;
e<a.length;
e++){b[f]=a[e];
f++;
}}f=0;
Array.clear(this._saveDesableSelect);
a=document.getElementsByTagName("SELECT");
for(var e=0;
e<a.length;
e++){if(Array.indexOf(b,a[e])==-1){this._saveDesableSelect[f]={tag:a[e],visib:$telerik.getCurrentStyle(a[e],"visibility")};
a[e].style.visibility="hidden";
f++;
}}}},_restoreTab:function(){for(var a=0;
a<this._saveTabIndexes.length;
a++){this._saveTabIndexes[a].tag.tabIndex=this._saveTabIndexes[a].index;
}if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){for(var b=0;
b<this._saveDesableSelect.length;
b++){this._saveDesableSelect[b].tag.style.visibility=this._saveDesableSelect[b].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 d=this.get_elementToShow();
var b=this.getPageOffset();
if($telerik.isIE6){var a=this.get_id();
if(c){if(Telerik.Web.PopupBehavior._ie6pinnedList[a]){return;
}var e=$telerik.getBounds(d);
Telerik.Web.PopupBehavior._ie6pinnedList[a]=window.setInterval(Function.createDelegate(this,function(){var j=this.getPageOffset();
var h=e.x-b.x+j.x;
var i=e.y-b.y+j.y;
if(this.get_x()==h&&this.get_y()==i){return;
}var k=this.get_parentElement();
this.set_parentElement(document.documentElement);
this.set_x(h);
this.set_y(i);
this.show();
this.set_parentElement(k);
}),130);
}else{var f=Telerik.Web.PopupBehavior._ie6pinnedList[a];
if(f){window.clearInterval(f);
}delete Telerik.Web.PopupBehavior._ie6pinnedList[a];
}}else{var g=c?"fixed":"absolute";
if(d.style.position==g){return;
}var e=$telerik.getBounds(d);
if(c&&(b.x||b.y)){this._x=e.x-b.x;
this._y=e.y-b.y;
$telerik.setLocation(d,{x:this._x,y:this._y});
}d.style.position=g;
}},center:function(){var b=this.get_elementToShow();
if(this._manageVisibility){$telerik.setVisible(b,true);
}var d=$telerik.getClientBounds();
var a=$telerik.getBounds(b);
var e=parseInt((d.width-a.width)/2);
var f=parseInt((d.height-a.height)/2);
var c=this.get_parentElement();
this.set_parentElement(document.documentElement);
this.set_x(e);
this.set_y(f);
this.show();
this.set_parentElement(c);
},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(c){this._overlay=c;
this._attachWindowHandlers(false);
if(this._overlay){this._attachWindowHandlers(true);
}else{if(!((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7))){var b=this.get_elementToShow();
var a=b._hideWindowedElementsIFrame;
if(a){a.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 a=c._hideWindowedElementsIFrame;
if(a){var b=a.parentNode;
var d=a.nextSibling;
if(b){b.removeChild(a);
if(d){b.insertBefore(document.createElement("span"),d);
}else{b.appendChild(document.createElement("span"));
}}}},hide:function(){var a=this.get_elementToShow();
if(this._manageVisibility){$telerik.setVisible(a,false);
}if(a.originalWidth){a.style.width=a.originalWidth+"px";
a.originalWidth=null;
}if(Sys.Browser.agent===Sys.Browser.InternetExplorer||this._overlay){var b=a._hideWindowedElementsIFrame;
if(b){b.style.display="none";
}}},show:function(){var b=this.get_elementToShow();
b.style.position="absolute";
var k=document.documentElement;
if($telerik.isFirefox){var g=$telerik.getCurrentStyle(k,"overflow");
if("hidden"==g){b.style.left=k.scrollLeft+"px";
b.style.top=k.scrollLeft+"px";
}}var h=this._manageVisibility;
if(h){$telerik.setVisible(b,true);
}var e=b.offsetParent||k;
if(h){$telerik.setVisible(b,false);
}var c;
var l;
if(this._parentElement){l=$telerik.getBounds(this._parentElement);
var j=this._getOffsetParentLocation(e);
c={x:l.x-j.x,y:l.y-j.y};
}else{l=$telerik.getBounds(e);
c={x:0,y:0};
}if(h){$telerik.setVisible(b,true);
}var f=b.offsetWidth-(b.clientLeft?b.clientLeft*2:0);
var d=b.offsetHeight-(b.clientTop?b.clientTop*2:0);
var i;
switch(this._positioningMode){case Telerik.Web.PositioningMode.Center:i={x:Math.round(l.width/2-f/2),y:Math.round(l.height/2-d/2)};
break;
case Telerik.Web.PositioningMode.BottomLeft:i={x:0,y:l.height};
break;
case Telerik.Web.PositioningMode.BottomRight:i={x:l.width-f,y:l.height};
break;
case Telerik.Web.PositioningMode.TopLeft:i={x:0,y:-b.offsetHeight};
break;
case Telerik.Web.PositioningMode.TopRight:i={x:l.width-f,y:-b.offsetHeight};
break;
default:i={x:0,y:0};
}i.x+=this._x+c.x;
i.y+=this._y+c.y;
$telerik.setLocation(b,i);
if(this._firstPopup){b.style.width=f+"px";
}this._firstPopup=false;
var a=this._fixPositionInBounds();
this._createOverlay(a);
},_getViewportBounds:function(){var b=$telerik.getClientBounds();
var c=document.documentElement;
var a=document.body;
b.scrollLeft=($telerik.getCorrectScrollLeft(c)||$telerik.getCorrectScrollLeft(a));
b.scrollTop=(c.scrollTop||a.scrollTop);
return b;
},_getOffsetParentLocation:function(a){if(a&&a.tagName.toUpperCase()!="BODY"&&a.tagName.toUpperCase()!="HTML"){var b=$telerik.getLocation(a);
var c=$telerik.getBorderBox(a);
b.x+=c.top;
b.y+=c.left;
b.x-=$telerik.getCorrectScrollLeft(a);
b.y-=a.scrollTop;
return b;
}return{x:0,y:0};
},_fixPositionInBounds:function(){var b=this.get_elementToShow();
var f=$telerik.getBounds(b);
if(!this._keepInScreenBounds){return f;
}var j=this._getViewportBounds();
var e=false;
var c=(j.width>f.width);
var h=(j.height>f.height);
var l=j.scrollTop;
var k=j.height+l;
var d=j.scrollLeft;
var g=j.width+d;
if(($telerik.isIE8||$telerik.isOpera||$telerik.isSafari)&&$telerik.isRightToLeft(document.body)){var i=b.style.display;
if($telerik.isOpera){b.style.display="none";
}var m=document.documentElement.scrollWidth;
g=m?m:document.body.scrollWidth;
if($telerik.isOpera){b.style.display=i;
}}if(f.x<d||!c){f.x=d;
e=true;
}if(f.y<l||!h){f.y=l;
e=true;
}if(c&&(f.x+f.width>g)){f.x=g-f.width;
e=true;
}if(h&&(k<f.y+f.height)){f.y=k-f.height;
e=true;
}if(e){var a=this._getOffsetParentLocation(b.offsetParent);
f.y-=a.y;
f.x-=a.x;
$telerik.setLocation(b,f);
}return f;
},_createOverlay:function(d){if(!$telerik.isIE6&&!this._overlay){return;
}var a=this.get_elementToShow();
var c=a._hideWindowedElementsIFrame;
if(!c){c=document.createElement("iframe");
c.src="javascript:'<html></html>';";
c.style.position="absolute";
c.style.display="none";
c.scrolling="no";
c.frameBorder="0";
c.tabIndex="-1";
c.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
a.parentNode.insertBefore(c,a);
a._hideWindowedElementsIFrame=c;
this._moveHandler=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(a,"move",this._moveHandler);
}$telerik.setBounds(c,d);
if($telerik.isFirefox){var e=this._getViewportBounds();
c.style.top=parseInt(d.y)-e.scrollTop+"px";
c.style.left=parseInt(d.x)-e.scrollLeft+"px";
c.style.position="fixed";
if($telerik.isFirefox3){c.style.backgroundColor="#fff";
}}if($telerik.quirksMode){return;
}c.style.display=a.style.display;
var b=$telerik.getCurrentStyle(a,"zIndex");
if(b){c.style.zIndex=b;
}},_setCoordinates:function(a,b){var c=false;
if(a!=this._x){this._x=a;
c=true;
}if(b!=this._y){this._y=b;
c=true;
}if($telerik.getVisible(this.get_elementToShow())&&c&&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 b=this.get_elementToShow();
var a=b._hideWindowedElementsIFrame;
if(a){if(Sys.Browser.agent===Sys.Browser.Firefox){var c=this._getViewportBounds();
a.style.top=parseInt(b.style.top)-c.scrollTop+"px";
a.style.left=parseInt(b.style.left)-c.scrollLeft+"px";
a.style.position="fixed";
}else{a.style.top=b.style.top;
a.style.left=b.style.left;
}}},_handleElementResize:function(){var c=this.get_elementToShow();
var a=c._hideWindowedElementsIFrame;
if(a){var b=$telerik.getBounds(c);
$telerik.setBounds(a,b);
}},_attachWindowHandlers:function(a){if(!Sys.Browser.agent===Sys.Browser.Firefox){return;
}var b=window;
if(true==a){this._windowResizeDelegate=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(b,"resize",this._windowResizeDelegate);
this._windowScrollDelegate=Function.createDelegate(this,this._onMove);
$telerik.addExternalHandler(b,"scroll",this._windowScrollDelegate);
}else{if(this._windowResizeDelegate){$telerik.removeExternalHandler(b,"resize",this._windowResizeDelegate);
}this._windowResizeDelegate=null;
if(this._windowScrollDelegate){$telerik.removeExternalHandler(b,"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(b,e,f,a,g,d,c,h){this._document=g?g:document;
this._documentMouseMoveDelegate=null;
this._documentMouseUpDelegate=null;
this._element=null;
this._tableElement=null;
this._moveCursorType="move";
this._moveToMouseLocation=false;
this._startCursorLocation=null;
this._enabled=true;
this._jsOwner=null;
this._hideIframes=true;
this._autoScrollEnabled=true;
this._saveDelegates={};
this._iframeToSkip=null;
this.makeResizable(b,e,f,a,d,c,h);
};
Telerik.Web.UI.ResizeExtender.containsBounds=function(b,e){if(!b||!e){return false;
}var d=$telerik.containsPoint(b,e.x,e.y);
if(d){var a=e.x+e.width;
var c=e.y+e.height;
d=$telerik.containsPoint(b,a,c);
}return d;
};
Telerik.Web.UI.ResizeExtender.prototype={dispose:function(){this._attachDocumentHandlers(false);
this._configureHandleElements(false);
this._startCursorLocation=null;
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(b,f,a,e,d,c,g){if(!f){return;
}if(this._element){alert("Element "+f.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=b;
this._element=f;
this._tableElement=e;
this._resizeHandles=a;
if(d){this._moveCursorType=d;
}if(c!=null){this._autoScrollEnabled=c;
}if(g!=null){this._moveToMouseLocation=g;
}this._startX=0;
this._startY=0;
this._cancelResize=true;
this._configureHandleElements(true);
},_raiseDragEvent:function(a,b,c){if(this._jsOwner&&this._jsOwner["on"+a]){var d=b;
if(!d){d={};
}d.element=this._element;
d.ownerEvent=c;
return this._jsOwner["on"+a](d);
}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(g){if(!this._enabled||this._cancelResize){return false;
}var i=0;
var f=0;
var j=0;
var b=0;
var d=this._originalBounds;
var c=this._resizeDir.move;
if(c){var a=this._startCursorLocation;
if(a){d.x=a.x;
d.y=a.y;
this._originalBounds=d;
this._startCursorLocation=null;
}j=d.x+(g.clientX-this._startX);
b=d.y+(g.clientY-this._startY);
}else{if(this._resizeDir.east){i=d.width+(g.clientX-this._startX);
}else{if(this._resizeDir.west){j=g.clientX-this._leftHandleMouseDelta;
i=d.width-(g.clientX-this._startX);
}}if(this._resizeDir.south){f=d.height+(g.clientY-this._startY);
}else{if(this._resizeDir.north){b=d.y+(g.clientY-this._startY);
f=d.height-(g.clientY-this._startY);
}}}if(this._offsetLocation){j-=this._offsetLocation.x;
b-=this._offsetLocation.y;
}var h=new Sys.UI.Bounds(j,b,i,f);
var k=c?this._raiseDragEvent("Drag",h,g):this._raiseEvent("Resizing",h);
if(false==k){return true;
}if(c||h.x>0){this._element.style.left=h.x+"px";
}if(c||h.y>0){this._element.style.top=h.y+"px";
}if(h.width>0){this._element.style.width=h.width+"px";
}if(h.height>0){this._element.style.height=h.height+"px";
}if(!c){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(d){if(!this._enabled){return;
}this._cancelResize=false;
this._startX=d.clientX;
this._startY=d.clientY;
var a=$telerik.getBounds(this._element);
var f=false;
if(this._element.id!=null&&Telerik.Web.UI.RadDock&&Telerik.Web.UI.RadDock.isInstanceOfType($find(this._element.id))){f=true;
}if($telerik.isIE&&f!=true){var h=this.getPositionedParent();
if(h){a.x+=h.scrollLeft;
a.y+=h.scrollTop;
}}this._originalBounds=a;
var g=d.target?d.target:d.srcElement;
if(g&&g.type==3){g=g.parentNode;
}this._resizeType=$telerik.getCurrentStyle(g,"cursor");
if(!this._resizeType&&d.currentTarget){this._resizeType=$telerik.getCurrentStyle(d.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(a.x-this._startX);
}var k=this._resizeDir.move?this._raiseDragEvent("DragStart",null,d):this._raiseEvent("ResizeStart");
this._cancelResize=(k==false);
var j=$telerik.getCurrentStyle(this._element.parentNode,"position");
var i=("relative"==j)||("absolute"==j);
this._offsetLocation=i?$telerik.getLocation(this._element.parentNode):null;
if(this._moveToMouseLocation){var b=$telerik.getDocumentRelativeCursorPosition({clientX:this._startX,clientY:this._startY});
if(i){var c=$telerik.getBorderBox(this._element.parentNode);
b.left-=c.left;
b.top-=c.top;
}this._startCursorLocation={x:b.left-Math.floor(a.width/2),y:b.top-Math.floor(a.height/2)};
}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 c=this._element.style.height;
var b=this._tableElement;
if(b){b.style.height=c;
this._fixIeHeight(b,c);
}}},_setIframesVisible:function(a){if(!this._hideIframes){return;
}var c=this._document.getElementsByTagName("IFRAME");
var b=this.get_iframeToSkip();
for(var d=0;
d<c.length;
d++){var e=c[d];
if(b&&(b===e||b==e)){continue;
}e.style.visibility=a?"":"hidden";
if($telerik.isIE){try{e.contentWindow.document.body.style.visibility=a?"":"hidden";
}catch(f){}}}},_configureHandleElements:function(f){var c=["nw","n","ne","w","e","sw","s","se",this._moveCursorType];
for(var e=0;
e<c.length;
e++){var b=c[e];
var a=this._resizeHandles[b];
if(a){if(a instanceof Array){for(var d=0;
d<a.length;
d++){this._configureHandle("id"+e+"_"+d,f,a[d],b);
}}else{this._configureHandle("id"+e,f,a,b);
}}}if(!f){this._saveDelegates={};
}},_configureHandle:function(c,e,a,b){if(e){var f=Function.createDelegate(this,this._onHandleMouseDown);
$telerik.addExternalHandler(a,"mousedown",f);
this._saveDelegates[c]={delegate:f,element:a};
var d=(b==this._moveCursorType?this._moveCursorType:b+"-resize");
a.style.cursor=d;
}else{$telerik.removeExternalHandler(a,"mousedown",this._saveDelegates[c].delegate);
a.style.cursor="";
}},_attachDocumentHandlers:function(a){var b=this._document;
if(true==a){this._documentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove);
$telerik.addExternalHandler(b,"mousemove",this._documentMouseMoveDelegate);
this._documentMouseUpDelegate=Function.createDelegate(this,this._onDocumentMouseUp);
$telerik.addExternalHandler(b,"mouseup",this._documentMouseUpDelegate);
}else{if(this._documentMouseMoveDelegate){$telerik.removeExternalHandler(b,"mousemove",this._documentMouseMoveDelegate);
}this._documentMouseMoveDelegate=null;
if(this._documentMouseUpDelegate){$telerik.removeExternalHandler(b,"mouseup",this._documentMouseUpDelegate);
}this._documentMouseUpDelegate=null;
}},_onDocumentMouseMove:function(a){var b=this._resize(a);
if(this._autoScrollEnabled){this._autoScroll(a);
}if(b){return $telerik.cancelRawEvent(a);
}},_onDocumentMouseUp:function(a){var b=!this._cancelResize;
this._cancelResize=true;
this._startCursorLocation=null;
if(b){this._clearSelection();
this._setIframesVisible(true);
if(this._resizeDir&&this._resizeDir.move){this._raiseDragEvent("DragEnd",null,a);
}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(c,a){if("CSS1Compat"==document.compatMode){var d=(c.offsetHeight-parseInt(a));
if(d>0){var b=(parseInt(c.style.height)-d);
if(b>0){c.style.height=b+"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(a){this._initializeAutoScroll();
var c=$telerik.getClientBounds();
if(c.width>0){this._scrollDeltaX=this._scrollDeltaY=0;
if(a.clientX<c.x+this._scrollEdgeConst){this._scrollDeltaX=-this._scrollByConst;
}else{if(a.clientX>c.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst;
}}if(a.clientY<c.y+this._scrollEdgeConst){this._scrollDeltaY=-this._scrollByConst;
}else{if(a.clientY>c.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst;
}}var b=this._scroller;
if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._originalStartX=this._startX;
this._originalStartY=this._startY;
b.set_enabled(true);
}else{if(b.get_enabled()){this._startX=this._originalStartX;
this._startY=this._originalStartY;
}b.set_enabled(false);
}}},_onScrollerTick:function(){var d=document.documentElement.scrollLeft||document.body.scrollLeft;
var a=document.documentElement.scrollTop||document.body.scrollTop;
window.scrollBy(this._scrollDeltaX,this._scrollDeltaY);
var i=document.documentElement.scrollLeft||document.body.scrollLeft;
var g=document.documentElement.scrollTop||document.body.scrollTop;
var c=i-d;
var b=g-a;
var f=this._element;
var e={x:parseInt(f.style.left)+c,y:parseInt(f.style.top)+b};
this._startX-=c;
this._startY-=b;
try{$telerik.setLocation(f,e);
}catch(h){}}};
Telerik.Web.UI.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
