﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.DockMode=function(){throw Error.notImplemented()
};
Telerik.Web.UI.DockMode.prototype={Floating:1,Docked:2,Default:3};
Telerik.Web.UI.DockMode.registerEnum("Telerik.Web.UI.DockMode");
Telerik.Web.UI.RadDock=function(b){Telerik.Web.UI.RadDock.initializeBase(this,[b]);
this._initialized=false;
this._enableDrag=true;
this._top=0;
this._left=0;
this._autoPostBack=false;
this._dockZoneID=null;
this._title=null;
this._commands=null;
this._closed=false;
this._collapsed=false;
this._pinned=false;
this._index=0;
this._forbiddenZones=[];
this._layoutID=null;
this._handle=null;
this._dockMode=Telerik.Web.UI.DockMode.Default;
this._resizable=false;
this._width="300px";
this._height=null;
this._expandedHeight=0;
this._uniqueID=null;
this._uniqueName=null;
this._grip=null;
this._titleBar=null;
this._commandsContainer=null;
this._contentContainer=null;
this._handle=null;
this._form=null;
this._skin="Default";
this._enableAnimation=false;
this._animationDuration=300;
this._draggedCssClass="rdDragHelper";
this.set_handle=this.set_handle;
this._isCustomHandle=false
};
Telerik.Web.UI.RadDock.DragDataType="RadDock";
Telerik.Web.UI.RadDock.prototype={_fixIeHeight:function(e,f){if("CSS1Compat"==document.compatMode){var h=(e.offsetHeight-parseInt(f));
if(h>0){var g=(parseInt(e.style.height)-h);
if(g>0){e.style.height=g+"px"
}}}},_getTopElement:function(){var d=null;
var c=this.get_titleBar();
if(c){d=c
}else{if(this._grip){d=this._grip
}}return d
},_isDockRightToLeft:function(){var d=this._isRightToLeft;
if(d==null){var c=this.get_element();
if(c){d=this._isRightToLeft=$telerik.isRightToLeft(c)
}}return d
},_setResizeLimit:function(){var t=0;
var n=this._getTopElement();
var r=0;
if(n){var u=$telerik.getBounds(n);
t+=u.height
}var o=this._calculateResizeHandlesSize();
var l=this.get_element();
this._minHeight=t+o.horizontalHeight;
l.style.minHeight=this._minHeight+"px";
this.get_innerDockElement().style.minHeight=t+"px";
var v=this.get_commandsContainer();
var q=1+o.verticalWidth;
var s=v?$telerik.getBounds(v).width:0;
var m=this.get_titleElement();
var p=m?$telerik.getMarginBox(m).horizontal:0;
q+=s+p;
this._minWidth=q;
l.style.minWidth=q+"px"
},_calculateResizeHandlesSize:function(){if(!this._tableElement){return null
}var f=this._tableElement.rows;
var e={n:$telerik.getBounds(f[0].cells[1]),w:$telerik.getBounds(f[1].cells[0]),e:$telerik.getBounds(f[1].cells[2]),s:$telerik.getBounds(f[2].cells[1])};
var d={horizontalHeight:e.n.height+e.s.height,verticalWidth:e.w.width+e.e.width};
return d
},_collapseWrapper:function(){var h=this._tableElement;
if(h){var e=this.get_contentContainer();
var f=$telerik.getBounds(e);
var g=parseInt(h.style.height)-f.height;
h.style.height=(g>0?g:0)+"px"
}},_removeWrapper:function(){var l=this._tableElement;
if(l){var h=this._calculateResizeHandlesSize();
var j=this.get_element();
var k=this.get_innerDockElement();
var g=this.get_topBorderElement();
var i=this.get_bottomBorderElement();
j.removeChild(l);
this._tableElement=null;
j.appendChild(k);
j.appendChild(g);
j.appendChild(i);
k.style.width="100%";
k.style.height="100%";
this._fixTableLayoutSize(this._width,this._height)
}},_updateSizeValues:function(){var b=this._getBounds();
this._width=b.width;
this._height=b.height
},_setWidthHtmlEl:function(c,d){if(!c){return
}if(!d){d=this.get_element()
}if(c.toString().indexOf("%")>-1){d.style.width=parseInt(c)+"%"
}else{d.style.width=parseInt(c)+"px"
}},_setHeightHtmlEl:function(c,d){if(!d){d=this.get_element()
}if(!c){d.style.height="";
return
}if(c.toString().indexOf("%")>-1){d.style.height=parseInt(c)+"%"
}else{d.style.height=parseInt(c)+"px"
}},_moveElements:function(f,d){while(f.childNodes&&f.childNodes.length>0){var e=f.childNodes[0];
f.removeChild(e);
d.appendChild(e)
}},_configureHandles:function(h){if(!this._tableElement){return
}var g=["e","s","se"];
var i=this._resizeExtender._resizeHandles;
for(var k=0;
k<g.length;
k++){var l=g[k];
var j=i[l];
if(j){j.style.cursor=h?l+"-resize":""
}}},_getFullSkinName:function(){return" RadDock RadDock_"+this._skin+" rdVariableHeight"
},_createResizeWrapper:function(){var n=document.createElement("TABLE");
n.id=this.get_id()+"Table";
n.className="rdWrapTable";
n.width="100%";
n.height="100%";
n.cellSpacing=0;
n.cellPadding=0;
this._tableElement=n;
var m=["rdTopLeft","rdTopCenter","rdTopRight","rdLeftMiddle","rdCenter","rdRightMiddle","rdBottomLeft","rdBottomCenter","rdBottomRight"];
var j=0;
for(var k=0;
k<3;
k++){var l=n.insertRow(-1);
for(var h=0;
h<3;
h++){var i=l.insertCell(-1);
i.innerHTML="&nbsp;";
i.className=m[j];
j++
}}return n
},_fixEmWidth:function(){if(!this.get_titleBar()){return
}var i=$telerik.getBounds(this.get_innerDockElement()).width;
var l=this.get_commandsContainer();
var k=l?$telerik.getBounds(l).width:0;
var g=this.get_titleElement();
if(g){var h=i-k-$telerik.getMarginBox(g).horizontal;
if($telerik.isSafari){h=i-k-30
}var j=h>0?h:0;
this._setWidthHtmlEl(j,g)
}},_enableMoveResize:function(){if(this._resizeExtender){this._resizeExtender.dispose()
}var f={};
if(this._resizable){var i=this.get_element();
if(!this._tableElement){var j=this._createResizeWrapper();
var g=j.rows[1].cells[1];
g.innerHTML="";
this._moveElements(i,g);
i.appendChild(j)
}var h=this._tableElement.rows;
if(this._isDockRightToLeft()){f={e:h[1].cells[0],s:h[2].cells[1],se:h[2].cells[0]}
}else{f={e:h[1].cells[2],s:h[2].cells[1],se:h[2].cells[2]}
}}else{this._removeWrapper()
}if(this._handle&&this.get_enableDrag()&&!this.get_pinned()){f.move=this._handle
}this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this.get_element(),f,this._tableElement);
if(this._resizable){this._setResizeLimit();
this._setSize();
if(this._collapsed||this._dockZoneID){this._configureHandles(false)
}}},_makeResizable:function(){this._enableMoveResize()
},onResizeStart:function(){if(this._collapsed||this._dockZoneID){return
}this.get_contentContainer().style.display="none";
this.raise_resizeStart(new Sys.EventArgs())
},onResizing:function(f){if(this._collapsed||this._dockZoneID){return false
}var e=this.get_innerDockElement();
e.style.display="none";
var d=$telerik.getBounds(e.parentNode).width;
e.style.display="";
this._setWidthHtmlEl(d,e);
e.style.width="auto";
this._fixEmWidth()
},onResizeEnd:function(){if(this._collapsed||this._dockZoneID){return
}var d=this._getBounds();
var e=d.width;
var f=d.height;
if(e<this._minWidth){e=this._minWidth
}if(f<this._minHeight){f=this._minHeight
}this._setSize(e,f);
this._updateSizeValues();
this.updateClientState();
this.raise_resizeEnd(new Sys.EventArgs())
},_initializeDrag:function(){if(this._handle){this._disposeDrag();
if(this.get_enableDrag()&&!this.get_pinned()){Sys.UI.DomElement.addCssClass(this._handle,"rdDraggable");
this._enableMoveResize()
}else{if(this._resizable){this._enableMoveResize()
}}}},_disposeDrag:function(){if(this._handle&&this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
Sys.UI.DomElement.removeCssClass(this._handle,"rdDraggable")
}},_startDragDrop:function(){var i=this.get_element();
this.originalZIndex=i.style.zIndex;
var f=this._getBounds(i);
var h=this._getBorderBox(i);
f.width-=h.horizontal;
f.height-=h.vertical;
i.style.width=f.width+"px";
i.style.zIndex="9999999";
var g=$telerik.getLocation(i);
if(i.parentNode!=this._form){this._form.appendChild(i)
}var j=$find(this.get_dockZoneID());
if(j){j._showPlaceholder(this,g)
}this._setLocation(g)
},onDragStart:function(){if(!this.get_enableDrag()||this.get_pinned()){return false
}this.get_contentContainer().style.overflow="hidden";
this.addCssClass(this._draggedCssClass);
this._startDragDrop();
var b=this.get_element();
this.raise_dragStart(new Sys.EventArgs());
return true
},onDrag:function(b){this._hitZone=this.dockingZoneHitTest(b.ownerEvent);
this.raise_drag(new Sys.EventArgs())
},onDragEnd:function(e){var f=this._hitZone;
if(!f){var d=this._getBounds();
f=this._hitZone=this.dockingZoneHitTest(e.ownerEvent)
}if(f){if(f.canDrop(this)){f.drop(this)
}else{this._restorePosition()
}}else{if(this.canDrop()){this.drop()
}else{this._restorePosition()
}}this.get_contentContainer().style.overflow="auto";
this.removeCssClass(this._draggedCssClass);
this.raise_dragEnd(new Sys.EventArgs())
},get_dockZones:function(){if(typeof(Telerik.Web.UI.RadDockZonesGlobalArray)=="undefined"){return[]
}return Telerik.Web.UI.RadDockZonesGlobalArray
},dockingZoneHitTest:function(i){var h;
var e=null;
var j=this.get_dockZones();
for(var g=0;
g<j.length;
g++){h=j[g];
if(h.hitTest(this,i)){e=h
}}return e
},canDrop:function(){return(this.get_dockMode()&Telerik.Web.UI.DockMode.Floating)>0
},drop:function(){var b=new Sys.CancelEventArgs();
this.raise_dockPositionChanging(b);
this.get_element().style.zIndex=this.originalZIndex;
if(b.get_cancel()){this._restorePosition()
}else{this.undock();
this.raise_dockPositionChanged(new Sys.EventArgs())
}},clone:function(p){var v=this.get_handle();
this._setHandle(null);
var q=this.get_element();
var r=q.cloneNode(true);
r.removeAttribute("control");
var t=r.getElementsByTagName("DIV");
var u=t[1];
var m=t[2];
var s=r.getElementsByTagName("input")[0];
u.setAttribute("id",p+"_T");
m.setAttribute("id",p+"_C");
r.setAttribute("id",p);
s.setAttribute("id",p+"_ClientState");
s.setAttribute("name",p+"_ClientState");
q.parentNode.insertBefore(r,q.nextSibling);
var o=$telerik.cloneControl(this,Telerik.Web.UI.RadDock,r);
this._setHandle(v);
var n=o._commandsContainer.getElementsByTagName("a");
for(var i=0;
i<n.length;
i++){var q=n[i];
q.removeAttribute("control");
$clearHandlers(q)
}o.set_commands(Array.clone(this._originalCommandsObject));
o._initializeCommands();
o.set_uniqueID(p);
if(o.get_dockZone()){o.get_dockZone()._resetDockIndices()
}return o
},getCommand:function(b){return this._commands?this._commands[b]:null
},get_handle:function(){return this._handle
},set_handle:function(b){this._isCustomHandle=true;
this._setHandle(b)
},_setHandle:function(b){this._disposeDrag();
this._handle=b;
this._initializeDrag()
},_repaintHelper:function(){if(this.get_closed()){return
}if(this._resizable&&Sys.UI.DomElement.containsCssClass(this.get_element(),"rdVariableHeight")){this.get_contentContainer().style.height=""
}else{this._setContentContainerHeight()
}this._setCommandsContainerWidth()
},getInvisibleParent:function(b){while(b!=document){if("none"==$telerik.getCurrentStyle(b,"display","")){return b
}b=b.parentNode
}return null
},subtractPoints:function(d,c){return{x:d.x-c.x,y:d.y-c.y}
},addPoints:function(d,c){return{x:d.x+c.x,y:d.y+c.y}
},initialize:function(){Telerik.Web.UI.RadDock.callBaseMethod(this,"initialize");
if(this._isDockRightToLeft()){var k=this.get_element();
Sys.UI.DomElement.addCssClass(k,"rdRtl");
Sys.UI.DomElement.addCssClass(k,"RadDock_"+this._skin+"_rtl")
}this._initializeHtmlElementVariables();
this._initializeCommands();
this._updateToggleCommandsState();
this._setPinUnpinVisibility();
this._setHandle(this._titleBar||this._grip);
var m=this.get_commandsContainer();
this._commandsContainerWidth=m?$telerik.getBounds(m).width:0;
var j=this.get_element();
var h=j.parentNode;
var i=this.getInvisibleParent(this.get_element().parentNode);
isHidden=(i!=null);
if(isHidden){var l={position:j.style.position,top:j.style.top,left:j.style.left};
j.parentNode.removeChild(j);
j.style.position="absolute";
j.style.top="-5000px";
j.style.left="-5000px";
document.body.appendChild(j)
}this._makeResizable();
this._setContentContainerHeight();
if(isHidden){j.style.position=l.position;
j.style.top=l.top;
j.style.left=l.left;
j.parentNode.removeChild(j);
var n=this.get_dockZone();
if(n&&Telerik.Web.UI.RadDockZone.isInstanceOfType(n)){h.insertBefore(j,n._placeholder)
}else{h.appendChild(j)
}}this._initialized=true;
this.updateClientState();
this.raise_initialize()
},undock:function(){var e=this.get_element();
if(e.parentNode!=this._form){this._form.appendChild(e)
}var d=this._getLocation(e);
this.set_left(d.x);
this.set_top(d.y);
var f=$find(this.get_dockZoneID());
if(f){this.set_dockZoneID("");
f._resetDockIndices();
this._unfitWidth()
}this._setPinUnpinVisibility();
this.updateClientState()
},_fitWidth:function(){this.get_element().style.width="100%";
if(this._tableElement){this.get_innerDockElement().style.width="100%";
this._tableElement.style.width="100%";
this._fixEmWidth()
}},_unfitWidth:function(){this.set_width(this.get_width());
if(this._tableElement){this._fixEmWidth()
}},_initializeHtmlElementVariables:function(){this._grip=$get(this.get_id()+"_G");
this._titleBar=$get(this.get_id()+"_T");
if(this._titleBar){var d=this._titleBar.lastChild;
while(d){if(d.className=="rdCommands"){this._commandsContainer=d;
break
}d=d.previousSibling
}}var c=this.get_element().parentNode;
while(c){if(c.tagName.toLowerCase()==="form"){this._form=c;
break
}c=c.parentNode
}},_initializeCommands:function(){if(!this._commandsContainer){return
}var i=this._commandsContainer.getElementsByTagName("a");
var m=this._commands;
if(m){this._commands={};
for(var n=0;
n<m.length;
n++){var h=m[n];
var k=$telerik.evalStr(h.clientTypeName);
if(k==Telerik.Web.UI.DockCommand||k.inheritsFrom(Telerik.Web.UI.DockCommand)){h.radDock=this;
var j=null;
if(h.command){j={command:$telerik.evalStr(h.command)};
delete h.command
}var l=$create(k,h,j,null,i[n]);
this._commands[l.get_name()]=l
}else{throw Error.invalidOperation(h.clientTypeName+" does not inherit from Telerik.Web.UI.DockCommand.")
}}}},_updateToggleCommandsState:function(){var d=this.getCommand("ExpandCollapse");
if(d){d.set_state(this.get_collapsed()?2:1)
}var c=this.getCommand("PinUnpin");
if(c){c.set_state(this.get_pinned()?2:1)
}},_setPinUnpinVisibility:function(){var b=this.getCommand("PinUnpin");
if(b){b.get_element().style.display=this.get_dockZoneID()?"none":"inline"
}this._setCommandsContainerWidth()
},_setCommandsContainerWidth:function(){if(!this._commandsContainer){return
}var f=this._commandsContainer.getElementsByTagName("a");
var g=0;
for(var h=0;
h<f.length;
h++){var e=this._getBoundsWithBorderAndMargin(f[h]);
g+=e.width
}this._commandsContainer.style.width=g+"px"
},_getBoundsWithoutBorder:function(j){if(!j){j=this.get_element()
}var f=this._getBounds(j);
var i=this._getBorderBox(j);
var g=f.width-i.horizontal;
var h=f.height-i.vertical;
f.width=g>0?g:0;
f.height=h>0?h:0;
return f
},_getBoundsWithBorderAndMargin:function(h){if(!h){h=this.get_element()
}var e=this._getBounds(h);
var f=this._getMarginBox(h);
var g=this._getBorderBox(h);
e.width+=(($telerik.isSafari?0:f.horizontal)+g.horizontal);
e.height+=(f.vertical+g.vertical);
return e
},_getBounds:function(b){if(!b){b=this.get_element()
}return $telerik.getBounds(b)
},_getMarginBox:function(b){if(!b){b=this.get_element()
}return $telerik.getMarginBox(b)
},_getBorderBox:function(b){if(!b){b=this.get_element()
}return $telerik.getBorderBox(b)
},_resetPosition:function(){var b=this.get_element();
b.style.top="";
b.style.left="";
b.originalPosition="relative";
b.style.position="relative";
if(typeof(this.originalZIndex)=="undefined"){this.originalZIndex=""
}b.style.zIndex=this.originalZIndex
},_setContentContainerHeight:function(){var j=this.get_contentContainer();
if(!j){return
}if(!Sys.UI.DomElement.containsCssClass(this.get_element(),"rdVariableHeight")||this._resizable){var h=this._getBounds();
var n=this.get_handle();
if(n&&!this._isCustomHandle){var l=this._getBounds(n);
h.height-=l.height
}var m=this._tableElement?this._calculateResizeHandlesSize().horizontalHeight:2;
var k=$telerik.getPaddingBox(j).vertical;
var i=h.height-m-k;
j.style.height=(i<0?0:i)+"px"
}else{j.style.height=""
}},_restorePosition:function(){var b=$find(this.get_dockZoneID());
if(b){b.dock(this,this.get_index())
}else{this.undock()
}},_getLocation:function(b){if(!b){b=this.get_element()
}return $telerik.getLocation(b)
},_setLocation:function(b){$telerik.setLocation(this.get_element(),b)
},_setSize:function(d,f){var e=this._getBoundsWithoutBorder();
if(!d){d=e.width
}if(!f){f=e.height
}this._setWidthHtmlEl(d);
this._setHeightHtmlEl(f);
if(this._tableElement){this._fixTableLayoutSize(d,f)
}else{this._setContentContainerHeight()
}},_fixTableLayoutSize:function(v,l){var p=this.get_contentContainer();
var q=$telerik.getPaddingBox(p).vertical;
var s=this._getTopElement();
var u={height:0,width:0};
var n=0;
if(s){u=$telerik.getBounds(s)
}var r=this.get_innerDockElement();
r.style.display="none";
var t=this._tableElement;
if(t){this._setHeightHtmlEl(l,t);
this._fixIeHeight(t,l)
}var m=$telerik.getBounds(r.parentNode);
var v=m.width;
if(!this._tableElement){v-=this._getBorderBox(r).horizontal
}this._setWidthHtmlEl(v,r);
var o=m.height-u.height-q;
o=o>0?o:0;
this._setHeightHtmlEl(o,p);
if(o>0){p.style.display=""
}r.style.display="";
this._fixEmWidth();
if(this._collapsed){r.style.height="auto"
}},get_contentContainer:function(){if(!this._contentContainer){this._contentContainer=$get(this.get_id()+"_C")
}return this._contentContainer
},get_titleBar:function(){if(!this._titleBar){this._titleBar=$get(this.get_id()+"_T")
}return this._titleBar
},get_commandsContainer:function(){if(!this._commandsContainer){var b=this.get_titleBar();
if(b){this._commandsContainer=b.getElementsByTagName("span")[0]
}else{this._commandsContainer=null
}}return this._commandsContainer
},get_titleElement:function(){if(!this._titleElement){var b=this.get_titleBar();
this._titleElement=b?b.getElementsByTagName("em")[0]:null
}return this._titleElement
},get_innerDivElement:function(f){var e=this._tableElement;
if(e){if(e.rows.length>1){var d=e.rows[1].cells[1];
if(d){return d.getElementsByTagName("div")[f]
}}}return this.get_element().getElementsByTagName("div")[f]
},get_innerDockElement:function(){return this.get_innerDivElement(0)
},get_topBorderElement:function(){return this.get_innerDivElement(3)
},get_bottomBorderElement:function(){return this.get_innerDivElement(4)
},saveClientState:function(){var b={Top:this.get_top(),Left:this.get_left(),DockZoneID:this.get_dockZoneID(),Collapsed:this.get_collapsed(),Pinned:this.get_pinned(),Resizable:this.get_resizable(),Closed:this.get_closed(),Width:this.get_width(),Height:this.get_height(),ExpandedHeight:this._expandedHeight,Index:this.get_index()};
return Sys.Serialization.JavaScriptSerializer.serialize(b)
},conditionalPostback:function(b){if(this.get_autoPostBack()){this.doPostBack(b)
}},doPostBack:function(b){__doPostBack(this.get_uniqueID(),b)
},add_command:function(b){this.get_events().addHandler("command",b)
},remove_command:function(b){this.get_events().removeHandler("command",b)
},raise_command:function(b){this.raiseEvent("command",b)
},add_dragStart:function(b){this.get_events().addHandler("dragStart",b)
},remove_dragStart:function(b){this.get_events().removeHandler("dragStart",b)
},raise_dragStart:function(b){this.raiseEvent("dragStart",b)
},add_drag:function(b){this.get_events().addHandler("drag",b)
},remove_drag:function(b){this.get_events().removeHandler("drag",b)
},raise_drag:function(b){this.raiseEvent("drag",b)
},add_dragEnd:function(b){this.get_events().addHandler("dragEnd",b)
},remove_dragEnd:function(b){this.get_events().removeHandler("dragEnd",b)
},raise_dragEnd:function(b){this.raiseEvent("dragEnd",b)
},add_dockPositionChanged:function(b){this.get_events().addHandler("dockPositionChanged",b)
},remove_dockPositionChanged:function(b){this.get_events().removeHandler("dockPositionChanged",b)
},raise_dockPositionChanged:function(b){this.raiseEvent("dockPositionChanged",b);
this.conditionalPostback("dockPositionChanged")
},add_dockPositionChanging:function(b){this.get_events().addHandler("dockPositionChanging",b)
},remove_dockPositionChanging:function(b){this.get_events().removeHandler("dockPositionChanging",b)
},raise_dockPositionChanging:function(b){this.raiseEvent("dockPositionChanging",b)
},add_initialize:function(b){this.get_events().addHandler("initialize",b)
},remove_initialize:function(b){this.get_events().removeHandler("initialize",b)
},raise_initialize:function(b){this.raiseEvent("initialize",b)
},add_resizeStart:function(b){this.get_events().addHandler("resizeStart",b)
},remove_resizeStart:function(b){this.get_events().removeHandler("resizeStart",b)
},raise_resizeStart:function(b){this.raiseEvent("resizeStart",b)
},add_resizeEnd:function(b){this.get_events().addHandler("resizeEnd",b)
},remove_resizeEnd:function(b){this.get_events().removeHandler("resizeEnd",b)
},raise_resizeEnd:function(b){this.raiseEvent("resizeEnd",b)
},get_top:function(){return this._top
},set_top:function(b){if(b!=""){b=parseInt(b);
if(this._initialized){this.get_element().style.top=b+"px"
}}this._top=b;
this.updateClientState()
},get_left:function(){return this._left
},set_left:function(b){if(b!=""){b=parseInt(b);
if(this._initialized){this.get_element().style.left=b+"px"
}}this._left=b;
this.updateClientState()
},_onCloseAnimationEnd:function(){var f=this.get_element();
var d=this.get_contentContainer();
var e=this.getCommand("Close");
if(this._closed){f.style.display="none";
this.updateClientState();
if(e){Telerik.Web.UI.DockCloseCommand.callBaseMethod(e,"onCommand")
}}else{f.style.display="block";
if(!this._collapsed){this.set_height(this.get_height())
}this._repaintHelper();
$telerik.repaintChildren(this);
this.updateClientState();
if(e){Telerik.Web.UI.DockCloseCommand.callBaseMethod(e,"onCommand")
}}},get_closed:function(){return this._closed
},set_closed:function(g,f){if(!this._initialized){return
}this._closed=g;
f=f?f:false;
var i=this.get_enableAnimation()?this._animationDuration:0;
if(!f||i==0){this._onCloseAnimationEnd();
return
}var j=this.get_element();
var h=Function.createDelegate(this,this._onCloseAnimationEnd);
if(g){$telerik.$(j).hide(i,h)
}else{$telerik.$(j).show(i,h)
}},get_collapsed:function(){return this._collapsed
},set_collapsed:function(C,D){D=D?D:false;
var y=this._collapsed;
this._collapsed=C;
if(!this._initialized){return
}var F=this;
var t=this.get_element();
var r=this._tableElement;
var B=this.get_contentContainer();
var A=F.get_innerDockElement();
var s=this.get_enableAnimation()?this.get_animationDuration():0;
if(!D){s=0
}var v={};
var x=this.getCommand("ExpandCollapse");
t.style.height="auto";
if(this._resizable&&r){r.style.height="auto"
}if(this._collapsed){this._expandedHeight=this._height?parseInt(this._height):parseInt(F._getBounds().height);
v.height="0px";
$telerik.$(B).animate(v,s,function(){if(F._resizable){A.style.height="auto"
}F._configureHandles(false);
F._setContentContainerHeight();
F.addCssClass("rdCollapsed");
B.style.display="none";
if(x){x.set_state(2);
Telerik.Web.UI.DockExpandCollapseCommand.callBaseMethod(x,"onCommand")
}})
}else{if(y&&!this._collapsed&&!this._expandedHeight){if(this._height){this._expandedHeight=parseInt(this._height)
}else{var z=t.style.height;
var w=B.style.height;
t.style.height="auto";
B.style.height="auto";
B.style.display="block";
this._expandedHeight=parseInt(F._getBounds().height);
t.style.height=z;
B.style.height=w;
B.style.display="none"
}}var E=$telerik.getOuterBounds(this.get_titleBar()).height;
var q=this._resizable?this._calculateResizeHandlesSize().horizontalHeight:0;
var u=parseInt(this._expandedHeight)-E-q;
v.height=u+"px";
B.style.height="0px";
$telerik.$(B).animate(v,s,function(){F.removeCssClass("rdCollapsed");
if(F.get_height()!=null){F._setHeightHtmlEl(F._expandedHeight)
}if(F._resizable){if(!F._dockZoneID){F._configureHandles(true)
}A.style.height=""
}if(F.get_height()==null){F.addCssClass("rdVariableHeight")
}F._setContentContainerHeight();
if(x){x.set_state(1)
}$telerik.repaintChildren(F);
if(F._resizable){F._height=$telerik.getBounds(t).height+"px";
F.set_height(F._height)
}F.updateClientState();
if(x){Telerik.Web.UI.DockExpandCollapseCommand.callBaseMethod(x,"onCommand")
}})
}},get_autoPostBack:function(){return this._autoPostBack
},set_autoPostBack:function(b){this._autoPostBack=b
},get_commands:function(){return this._commands
},set_commands:function(b){this._commands=b;
this._originalCommandsObject=b
},get_dockMode:function(){return this._dockMode
},set_dockMode:function(b){this._dockMode=b
},get_dockZoneID:function(){return this._dockZoneID
},set_dockZoneID:function(b){if(b==""){if(!this._collapsed){this._configureHandles(true)
}}else{this._configureHandles(false)
}this._dockZoneID=b
},get_forbiddenZones:function(){return this._forbiddenZones
},set_forbiddenZones:function(b){this._forbiddenZones=b
},get_height:function(){return this._height
},set_height:function(b){this._height=b;
this.updateClientState();
if(this._initialized){this._setSize(null,b);
if(!this._tableElement){this.removeCssClass("rdVariableHeight")
}}},get_index:function(){return this._index
},set_index:function(b){this._index=b
},get_layoutID:function(){return this._layoutID
},set_layoutID:function(b){this._layoutID=b
},get_enableDrag:function(){return this._enableDrag
},set_enableDrag:function(b){this._enableDrag=b;
this._initializeDrag()
},get_enableAnimation:function(){return this._enableAnimation
},set_enableAnimation:function(b){this._enableAnimation=b
},get_animationDuration:function(){return this._animationDuration
},set_animationDuration:function(b){this._animationDuration=b
},get_pinned:function(){return this._pinned
},set_pinned:function(g){if(!this._initialized){return
}this._pinned=g;
var f=this.getCommand("PinUnpin");
if(f){f.set_state(g?2:1)
}if($telerik.isIE6){if(g){this.set_enableDrag(false)
}else{this.set_enableDrag(true)
}return
}var j=this.get_element();
j.style.position="absolute";
var h=$telerik.getScrollOffset(j,true);
var i=this._getLocation(j);
if(g){i=this.subtractPoints(i,h);
this._setLocation(i);
j.style.position="fixed";
this.set_enableDrag(false)
}else{i=this.addPoints(i,h);
this._setLocation(i);
this.set_enableDrag(true)
}},get_title:function(){return this._title
},set_title:function(c){this._title=c;
var d=this.get_titleElement();
if(d){d.innerHTML=c
}},get_uniqueID:function(){return this._uniqueID
},set_uniqueID:function(b){this._uniqueID=b
},get_uniqueName:function(){return this._uniqueName
},set_uniqueName:function(b){this._uniqueName=b
},get_width:function(){return this._width
},set_width:function(b){this._width=b;
this.updateClientState();
if(this._initialized){this._setSize(b,null)
}},get_skin:function(){return this._skin
},set_skin:function(b){if(b&&this._skin!=b){this._skin=b
}},get_resizable:function(){return this._resizable
},set_resizable:function(b){this._resizable=b;
if(b){this._makeResizable()
}else{this._removeWrapper()
}},get_dockZone:function(){return this._dockZone
},set_dockZone:function(b){this._dockZone=b
}};
Telerik.Web.UI.RadDock.registerClass("Telerik.Web.UI.RadDock",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.RadDock.prototype.repaint=function(){this._repaintHelper()
};
Telerik.Web.UI.DockCommand=function(b){Telerik.Web.UI.DockCommand.initializeBase(this,[b]);
this._clientTypeName=null;
this._cssClass="rdCustom";
this._radDock=null;
this._name="Custom";
this._text="Custom";
this._autoPostBack=false
};
Telerik.Web.UI.DockCommand.prototype={add_command:function(b){this.get_events().addHandler("command",b)
},remove_command:function(b){this.get_events().removeHandler("command",b)
},raise_command:function(d){var c=this.get_events().getHandler("command");
if(c){c(this.get_radDock(),d)
}},get_clientTypeName:function(){return this._clientTypeName
},set_clientTypeName:function(b){this._clientTypeName=b
},get_cssClass:function(){return this._cssClass
},set_cssClass:function(b){this._cssClass=b
},get_name:function(){return this._name
},set_name:function(b){this._name=b
},get_text:function(){return this._text
},set_text:function(b){this._text=b
},get_autoPostBack:function(){return this._autoPostBack
},set_autoPostBack:function(b){this._autoPostBack=b
},get_radDock:function(){return this._radDock
},set_radDock:function(b){this._radDock=b
},onCommand:function(d){var c=new Sys.CancelEventArgs();
c.command=this;
c.event=d;
c.Command=this;
this.raise_command(c);
if(c.get_cancel()){return
}this.get_radDock().raise_command(c);
if(c.get_cancel()){return
}this.get_radDock().updateClientState();
this.conditionalPostback()
},onMouseDown:function(b){$telerik.cancelRawEvent(b)
},conditionalPostback:function(){if(this.get_autoPostBack()){this.get_radDock().doPostBack(this.get_name())
}},initialize:function(){Telerik.Web.UI.DockCommand.callBaseMethod(this,"initialize");
$addHandlers(this.get_element(),{click:this.onCommand,mousedown:this.onMouseDown},this)
},dispose:function(){$clearHandlers(this.get_element());
Telerik.Web.UI.DockCommand.callBaseMethod(this,"dispose")
}};
Telerik.Web.UI.DockCommand.registerClass("Telerik.Web.UI.DockCommand",Sys.UI.Control);
Telerik.Web.UI.DockToggleCommand=function(b){Telerik.Web.UI.DockToggleCommand.initializeBase(this,[b]);
this._state=1;
this._alternateCssClass="rdCustom";
this._alternateText="Custom";
this._initialSetState=false
};
Telerik.Web.UI.DockToggleCommand.prototype={updateState:function(){var b=this.get_element();
if(this.get_state()==1){b.title=this.get_text();
Sys.UI.DomElement.addCssClass(b,this.get_cssClass());
Sys.UI.DomElement.removeCssClass(b,this.get_alternateCssClass())
}else{b.title=this.get_alternateText();
Sys.UI.DomElement.addCssClass(b,this.get_alternateCssClass());
Sys.UI.DomElement.removeCssClass(b,this.get_cssClass())
}},get_state:function(){return this._state
},set_state:function(b){this._state=b;
if(this._initialSetState){this.updateState()
}},get_alternateCssClass:function(){return this._alternateCssClass
},set_alternateCssClass:function(b){this._alternateCssClass=b
},get_alternateText:function(){return this._alternateText
},set_alternateText:function(b){this._alternateText=b
},initialize:function(){Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"initialize");
this._initialSetState=true;
this.updateState()
},dispose:function(){Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"dispose")
}};
Telerik.Web.UI.DockToggleCommand.registerClass("Telerik.Web.UI.DockToggleCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockCloseCommand=function(b){Telerik.Web.UI.DockCloseCommand.initializeBase(this,[b]);
this._cssClass="rdClose";
this._name="Close";
this._text="Close"
};
Telerik.Web.UI.DockCloseCommand.prototype={onCommand:function(b){this.get_radDock().set_closed(true,true)
}};
Telerik.Web.UI.DockCloseCommand.registerClass("Telerik.Web.UI.DockCloseCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockExpandCollapseCommand=function(b){Telerik.Web.UI.DockExpandCollapseCommand.initializeBase(this,[b]);
this._cssClass="rdCollapse";
this._alternateCssClass="rdExpand";
this._name="ExpandCollapse";
this._text="Collapse";
this._alternateText="Expand"
};
Telerik.Web.UI.DockExpandCollapseCommand.prototype={onCommand:function(b){this.get_radDock().set_collapsed(!this.get_radDock().get_collapsed(),true)
}};
Telerik.Web.UI.DockExpandCollapseCommand.registerClass("Telerik.Web.UI.DockExpandCollapseCommand",Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI.DockPinUnpinCommand=function(b){Telerik.Web.UI.DockPinUnpinCommand.initializeBase(this,[b]);
this._cssClass="rdUnpin";
this._alternateCssClass="rdPin";
this._name="PinUnpin";
this._text="Pin";
this._alternateText="Unpin"
};
Telerik.Web.UI.DockPinUnpinCommand.prototype={onCommand:function(b){this.get_radDock().set_pinned(!this.get_radDock().get_pinned());
Telerik.Web.UI.DockPinUnpinCommand.callBaseMethod(this,"onCommand")
}};
Telerik.Web.UI.DockPinUnpinCommand.registerClass("Telerik.Web.UI.DockPinUnpinCommand",Telerik.Web.UI.DockToggleCommand);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();