﻿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.toDock=function(a){return a;
};
$telerik.findDock=$find;
Telerik.Web.UI.RadDock=function(a){Telerik.Web.UI.RadDock.initializeBase(this,[a]);
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._handle=null;
this._form=null;
this._skin="Default";
this._enableAnimation=false;
this._animationDuration=300;
this._draggedCssClass="rdDragHelper";
this._tableElement=null;
this._grip=null;
this._titleBar=null;
this._commandsContainer=null;
this._topLeftBar=null;
this._topRightBar=null;
this._middleLeftBar=null;
this._middleRightBar=null;
this._contentContainer=null;
this._bottomLeftBar=null;
this._bottomMiddleBar=null;
this._bottomRightBar=null;
this.set_handle=this.set_handle;
this._isCustomHandle=false;
};
Telerik.Web.UI.RadDock.DragDataType="RadDock";
Telerik.Web.UI.RadDock.prototype={_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";
}}}},_isDockRightToLeft:function(){var b=this._isRightToLeft;
if(b==null){var a=this.get_element();
if(a){b=this._isRightToLeft=$telerik.isRightToLeft(a);
}}return b;
},_setResizeLimit:function(){var h=this.get_element();
var f=0;
var d=this._getBounds(this._topBar).height;
var g=this._getBounds(this._bottomBar).height;
f=f+d+g;
this._minHeight=f;
h.style.minHeight=this._minHeight+"px";
this._handlesHeight=d+g;
var c=0;
var a=this._getBounds(this._middleLeftBar).width;
var e=this._getBounds(this._middleRightBar).width;
var b=this.get_commandsContainer()?$telerik.getOuterBounds(this.get_commandsContainer()).width:0;
this._minWidth=c+a+e+b;
h.style.minWidth=this._minWidth+"px";
this._handlesWidth=a+e;
},_updateSizeValues:function(){var a=this._getBounds();
this._width=a.width;
this._height=a.height;
},_setWidthHtmlEl:function(b,a){if(!b){return;
}if(!a){a=this.get_element();
}if(b.toString().indexOf("%")>-1){a.style.width=parseInt(b)+"%";
}else{a.style.width=parseInt(b)+"px";
}},_setHeightHtmlEl:function(b,a){if(!a){a=this.get_element();
}if(!b){a.style.height="";
return;
}if(b.toString().indexOf("%")>-1){a.style.height=parseInt(b)+"%";
}else{a.style.height=parseInt(b)+"px";
}},_moveElements:function(b,a){while(b.childNodes&&b.childNodes.length>0){var c=b.childNodes[0];
b.removeChild(c);
a.appendChild(c);
}},_configureHandles:function(f){if(!this._resizeExtender){return;
}var d=["e","s","w","sw","se","nw","ne"];
var e=this._resizeExtender._resizeHandles;
for(var a=0;
a<d.length;
a++){var b=d[a];
var c=e[b];
if(c){c.style.cursor=f?b+"-resize":"";
}}},_fixEmWidth:function(){var e=this.get_titleBar();
if(e==null){return;
}var f=$telerik.getBounds(e).width;
if(f>0){var d=this.get_titleElement();
if(d){if($telerik.isIE6){d.style.display="none";
f=$telerik.getBounds(e).width;
d.style.display="block";
}var g=this.get_commandsContainer();
var a=g?$telerik.getOuterBounds(g).width:0;
var c=f-a-30;
var b=c>0?c:0;
d.style.width=b+"px";
}}},_enableMoveResize:function(){if(this._resizeExtender){this._resizeExtender.dispose();
}var a={};
if(this._resizable){if(this._isDockRightToLeft()){a={s:this._middleRightBar,w:this._middleLeftBar,e:this._bottomMiddleBar,sw:this._bottomRightBar,se:this._bottomLeftBar,nw:this._topRightBar,ne:this._topLeftBar};
}else{a={e:this._middleRightBar,w:this._middleLeftBar,s:this._bottomMiddleBar,se:this._bottomRightBar,sw:this._bottomLeftBar,ne:this._topRightBar,nw:this._topLeftBar};
}}if(this._handle&&this.get_enableDrag()&&!this.get_pinned()){a.move=this._handle;
}this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this.get_element(),a,this._tableElement);
if(this._resizable){if(this._collapsed||this._dockZoneID){this._configureHandles(false);
}}},_makeResizable:function(){this._enableMoveResize();
},onResizeStart:function(){if(this._collapsed||this._dockZoneID){return;
}var a=this.get_titleElement();
if(a){a.style.display="none";
}this._setResizeLimit();
this.raise_resizeStart(new Sys.EventArgs());
},onResizing:function(d){if(this._collapsed||this._dockZoneID){return false;
}var b=this.get_contentContainer();
if(b){var a=d.height;
a-=this._handlesHeight;
var c=d.width;
c-=this._handlesWidth;
if(a<=0||c<=this._minWidth){return false;
}else{b.style.height=a+"px";
if($telerik.isIE6){b.style.width=c+"px";
}}}},onResizeEnd:function(){if(this._collapsed||this._dockZoneID){return;
}var e=this._getBounds();
var b=e.width;
var a=e.height;
if(b<this._minWidth){b=this._minWidth;
}if(a<this._minHeight){a=this._minHeight;
}this._setSize(b,a);
this._fixEmWidth();
var c=this.get_titleElement();
if(c){c.style.display="block";
}var d=this.get_element();
d.style.minWidth="";
d.style.minHeight="";
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 d=this.get_element();
this.originalZIndex=d.style.zIndex;
var e=this._getBounds(d);
var a=this._getBorderBox(d);
e.width-=a.horizontal;
e.height-=a.vertical;
d.style.width=e.width+"px";
d.style.zIndex="9999999";
var c=$telerik.getLocation(d);
if(d.parentNode!=this._form){this._form.appendChild(d);
}var b=$find(this.get_dockZoneID());
if(b){b._showPlaceholder(this,c);
}this._setLocation(c);
},onDragStart:function(a){if(!this.get_enableDrag()||this.get_pinned()){return false;
}var c=new Sys.CancelEventArgs();
c.ownerEvent=a.ownerEvent;
this.raiseEvent("dragStart",c);
if(c.get_cancel()){return false;
}this.get_contentContainer().style.overflow="hidden";
this.addCssClass(this._draggedCssClass);
this._startDragDrop();
var b=this.get_element();
return true;
},onDrag:function(a){this._hitZone=this.dockingZoneHitTest(a.ownerEvent);
this.raise_drag(new Sys.EventArgs());
},onDragEnd:function(b){var c=this._hitZone;
if(!c){var a=this._getBounds();
c=this._hitZone=this.dockingZoneHitTest(b.ownerEvent);
}if(c){if(c.canDrop(this)){c.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(h){var c=null;
var d=this.get_dockZones();
var a=this.get_element();
var j=[];
var g=[];
for(var b=0;
b<d.length;
b++){if(d[b].hitTest(this,h,false)){j[j.length]=d[b].get_element();
g[g.length]=d[b];
}}if(j.length>0){if(j.length==1){c=$find(j[0].id);
}else{if(j.length>1){a.style.display="none";
var f=document.elementFromPoint(h.clientX,h.clientY);
a.style.display="";
if(f){var k=document.body;
while(f!=k){for(var b=0;
b<j.length;
b++){if(f==j[b]){if(f.id){c=$find(f.id);
}break;
}}if(c!=null){break;
}f=f.parentNode;
}}}}for(var b=0;
b<g.length;
b++){if(g[b]!=c){g[b].dragLeaveTarget(this);
}else{c.hitTest(this,h,true);
}}}return c;
},canDrop:function(){return(this.get_dockMode()&Telerik.Web.UI.DockMode.Floating)>0;
},drop:function(){var a=new Sys.CancelEventArgs();
this.raise_dockPositionChanging(a);
this.get_element().style.zIndex=this.originalZIndex;
if(a.get_cancel()){this._restorePosition();
}else{this.undock();
this.raise_dockPositionChanged(new Sys.EventArgs());
}},clone:function(l){if(!l){l="RadDockClone_"+(new Date()-100);
}var o=this.get_handle();
this._setHandle(null);
var a=this.get_commands();
for(var c in a){$clearHandlers(a[c].get_element());
}var e=this.get_element();
var q=e.cloneNode(true);
q.removeAttribute("control");
var d=$telerik.getElementByClassName(q,"rdTable","TABLE").rows;
var j=$telerik.getElementByClassName(d[0].cells[1],"rdTitleBar","DIV");
var k=$telerik.getElementByClassName(d[1].cells[1],"rdContent","DIV");
var p=q.getElementsByTagName("input")[0];
j.setAttribute("id",l+"_T");
k.setAttribute("id",l+"_C");
q.setAttribute("id",l);
p.setAttribute("id",l+"_ClientState");
p.setAttribute("name",l+"_ClientState");
e.parentNode.insertBefore(q,e.nextSibling);
var g=$telerik.cloneControl(this,Telerik.Web.UI.RadDock,q);
this._setHandle(o);
var m=g.get_commandsContainer().getElementsByTagName("a");
for(var h=0;
h<m.length;
h++){var e=m[h];
e.removeAttribute("control");
}g.set_commands(Array.clone(this._originalCommandsObject));
g._initializeCommands();
for(var b in a){var f=a[b];
var n=a[b].get_element();
$addHandlers(n,{click:f.onCommand,mousedown:f.onMouseDown},f);
}g.set_uniqueID(l);
if(g.get_dockZone()){g.get_dockZone()._resetDockIndices();
}return g;
},getCommand:function(a){return this._commands?this._commands[a]:null;
},get_handle:function(){return this._handle;
},set_handle:function(a){this._isCustomHandle=true;
this._setHandle(a);
},_setHandle:function(a){this._disposeDrag();
this._handle=a;
this._initializeDrag();
},_repaintHelper:function(){if(this.get_closed()){return;
}this._fixEmWidth();
this._setContentContainerHeight();
},getInvisibleParent:function(a){while(a!=document){if("none"==$telerik.getCurrentStyle(a,"display","")){return a;
}a=a.parentNode;
}return null;
},subtractPoints:function(a,b){return{x:a.x-b.x,y:a.y-b.y};
},addPoints:function(a,b){return{x:a.x+b.x,y:a.y+b.y};
},initialize:function(){Telerik.Web.UI.RadDock.callBaseMethod(this,"initialize");
if(this._isDockRightToLeft()){var a=this.get_element();
Sys.UI.DomElement.addCssClass(a,"rdRtl");
Sys.UI.DomElement.addCssClass(a,"RadDock_"+this._skin+"_rtl");
}this._initializeHtmlElementVariables();
this._setUnselectableOn();
this._initializeCommands();
this._updateToggleCommandsState();
this._setPinUnpinVisibility();
this._setHandle(this._titleBar||this._grip);
var b=this.get_element();
var f=b.parentNode;
var d=this.getInvisibleParent(this.get_element().parentNode);
isHidden=(d!=null);
if(isHidden){var c={position:b.style.position,top:b.style.top,left:b.style.left};
b.parentNode.removeChild(b);
b.style.position="absolute";
b.style.top="-5000px";
b.style.left="-5000px";
document.body.appendChild(b);
}else{this._fixEmWidth();
}if(this._height){this._setContentContainerHeight(this._height);
}this._middleMiddleCell.style.height="auto";
if(this._height!=null){this._setHeightHtmlEl(this._height);
}this._makeResizable();
if(isHidden){b.style.position=c.position;
b.style.top=c.top;
b.style.left=c.left;
b.parentNode.removeChild(b);
var e=this.get_dockZone();
if(e&&Telerik.Web.UI.RadDockZone.isInstanceOfType(e)){f.insertBefore(b,e._placeholder);
}else{f.appendChild(b);
}}this.updateClientState();
this.raise_initialize();
},undock:function(){var a=this.get_element();
if(a.parentNode!=this._form){this._form.appendChild(a);
}var c=this._getLocation(a);
this.set_left(c.x);
this.set_top(c.y);
var b=$find(this.get_dockZoneID());
if(b){this.set_dockZoneID("");
b._resetDockIndices();
this._unfitWidth();
}this._setPinUnpinVisibility();
this.updateClientState();
},_fitWidth:function(){this.get_element().style.width="100%";
this.get_contentContainer().style.width="100%";
this._fixEmWidth();
},_unfitWidth:function(){this.set_width(this.get_width());
this._fixEmWidth();
},_initializeHtmlElementVariables:function(){this._grip=$get(this.get_id()+"_G");
this._titleBar=$get(this.get_id()+"_T");
this.get_commandsContainer();
var a=this.get_element();
this._tableElement=a.getElementsByTagName("table")[0];
var c=this._tableElement.rows;
this._topBar=c[0];
this._topLeftBar=c[0].cells[0];
this._topRightBar=c[0].cells[2];
this._middleLeftBar=c[1].cells[0];
this._middleMiddleCell=c[1].cells[1];
this._middleRightBar=c[1].cells[2];
this._bottomBar=c[2];
this._bottomLeftBar=c[2].cells[0];
this._bottomMiddleBar=c[2].cells[1];
this._bottomRightBar=c[2].cells[2];
var b=this.get_element().parentNode;
while(b){if(b.tagName.toLowerCase()==="form"){this._form=b;
break;
}b=b.parentNode;
}},_setUnselectableOn:function(){this._topLeftBar.setAttribute("unselectable","on");
this._topRightBar.setAttribute("unselectable","on");
this._middleLeftBar.setAttribute("unselectable","on");
this._middleRightBar.setAttribute("unselectable","on");
this._bottomLeftBar.setAttribute("unselectable","on");
this._bottomMiddleBar.setAttribute("unselectable","on");
this._bottomRightBar.setAttribute("unselectable","on");
},_initializeCommands:function(){if(!this._commandsContainer){return;
}var f=this._commandsContainer.getElementsByTagName("a");
var c=this._commands;
if(c){this._commands={};
for(var b=0;
b<c.length;
b++){var g=c[b];
var d=eval(g.clientTypeName);
if(d==Telerik.Web.UI.DockCommand||d.inheritsFrom(Telerik.Web.UI.DockCommand)){g.radDock=this;
var e=null;
if(g.command){e={command:eval(g.command)};
delete g.command;
}var a=$create(d,g,e,null,f[b]);
this._commands[a.get_name()]=a;
}else{throw Error.invalidOperation(g.clientTypeName+" does not inherit from Telerik.Web.UI.DockCommand.");
}}}},_updateToggleCommandsState:function(){var a=this.getCommand("ExpandCollapse");
if(a){a.set_state(this.get_collapsed()?2:1);
}var b=this.getCommand("PinUnpin");
if(b){b.set_state(this.get_pinned()?2:1);
}},_setPinUnpinVisibility:function(){var a=this.getCommand("PinUnpin");
if(a){a.get_element().style.display=this.get_dockZoneID()?"none":"";
}},_getBounds:function(a){if(!a){a=this.get_element();
}return $telerik.getBounds(a);
},_getMarginBox:function(a){if(!a){a=this.get_element();
}return $telerik.getMarginBox(a);
},_getBorderBox:function(a){if(!a){a=this.get_element();
}return $telerik.getBorderBox(a);
},_resetPosition:function(){var a=this.get_element();
a.style.top="";
a.style.left="";
a.style.position="";
if(typeof(this.originalZIndex)=="undefined"){this.originalZIndex="";
}a.style.zIndex=this.originalZIndex;
},_setContentContainerHeight:function(e){var g=this.get_contentContainer();
if(!g){return;
}if(this._height!=null||this._resizable){var c=this._getBounds();
var f=e!=null?parseInt(e):c.height;
var a=this._getBounds(this._topBar);
var b=this._getBounds(this._bottomBar);
var d=f-a.height-b.height;
g.style.height=(d<0?0:d)+"px";
}else{g.style.height="";
}},_restorePosition:function(){var a=$find(this.get_dockZoneID());
if(a){a.dock(this,this.get_index());
}else{this.undock();
}},_getLocation:function(a){if(!a){a=this.get_element();
}return $telerik.getLocation(a);
},_setLocation:function(a){$telerik.setLocation(this.get_element(),a);
},_setSize:function(b,c){var a=this._getBounds();
if(!b){b=a.width;
}this._setWidthHtmlEl(b);
this._setContentContainerHeight(c);
this._setHeightHtmlEl(c);
},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 a=this.get_titleBar();
if(a){this._commandsContainer=$telerik.getElementByClassName(a,"rdCommands","UL");
}else{this._commandsContainer=null;
}}return this._commandsContainer;
},get_titleElement:function(){if(!this._titleElement){var a=this.get_titleBar();
this._titleElement=a?a.getElementsByTagName("em")[0]:null;
}return this._titleElement;
},get_innerDivElement:function(a){var b=this._tableElement;
if(b){if(b.rows.length>1){var c=b.rows[1].cells[1];
if(c){return c.getElementsByTagName("div")[a];
}}}return this.get_element().getElementsByTagName("div")[a];
},saveClientState:function(){var a={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(a);
},conditionalPostback:function(a){if(this.get_autoPostBack()){this.doPostBack(a);
}},doPostBack:function(a){__doPostBack(this.get_uniqueID(),a);
},add_command:function(a){this.get_events().addHandler("command",a);
},remove_command:function(a){this.get_events().removeHandler("command",a);
},raise_command:function(a){this.raiseEvent("command",a);
},add_dragStart:function(a){this.get_events().addHandler("dragStart",a);
},remove_dragStart:function(a){this.get_events().removeHandler("dragStart",a);
},raise_dragStart:function(a){this.raiseEvent("dragStart",a);
},add_drag:function(a){this.get_events().addHandler("drag",a);
},remove_drag:function(a){this.get_events().removeHandler("drag",a);
},raise_drag:function(a){this.raiseEvent("drag",a);
},add_dragEnd:function(a){this.get_events().addHandler("dragEnd",a);
},remove_dragEnd:function(a){this.get_events().removeHandler("dragEnd",a);
},raise_dragEnd:function(a){this.raiseEvent("dragEnd",a);
},add_dockPositionChanged:function(a){this.get_events().addHandler("dockPositionChanged",a);
},remove_dockPositionChanged:function(a){this.get_events().removeHandler("dockPositionChanged",a);
},raise_dockPositionChanged:function(a){this.raiseEvent("dockPositionChanged",a);
this.conditionalPostback("dockPositionChanged");
},add_dockPositionChanging:function(a){this.get_events().addHandler("dockPositionChanging",a);
},remove_dockPositionChanging:function(a){this.get_events().removeHandler("dockPositionChanging",a);
},raise_dockPositionChanging:function(a){this.raiseEvent("dockPositionChanging",a);
},add_initialize:function(a){this.get_events().addHandler("initialize",a);
},remove_initialize:function(a){this.get_events().removeHandler("initialize",a);
},raise_initialize:function(a){this.raiseEvent("initialize",a);
},add_resizeStart:function(a){this.get_events().addHandler("resizeStart",a);
},remove_resizeStart:function(a){this.get_events().removeHandler("resizeStart",a);
},raise_resizeStart:function(a){this.raiseEvent("resizeStart",a);
},add_resizeEnd:function(a){this.get_events().addHandler("resizeEnd",a);
},remove_resizeEnd:function(a){this.get_events().removeHandler("resizeEnd",a);
},raise_resizeEnd:function(a){this.raiseEvent("resizeEnd",a);
},get_top:function(){return this._top;
},set_top:function(a){if(a!=""){a=parseInt(a);
if(this._initialized){this.get_element().style.top=a+"px";
}}this._top=a;
this.updateClientState();
},get_left:function(){return this._left;
},set_left:function(a){if(a!=""){a=parseInt(a);
if(this._initialized){this.get_element().style.left=a+"px";
}}this._left=a;
this.updateClientState();
},_onCloseAnimationEnd:function(){var b=this.get_element();
var c=this.get_contentContainer();
var d=this.getCommand("Close");
var a=this.get_titleElement();
if(a!=null){a.style.display="block";
}if(this._closed){b.style.display="none";
this.updateClientState();
if(d){Telerik.Web.UI.DockCloseCommand.callBaseMethod(d,"onCommand");
}}else{b.style.display="block";
this._repaintHelper();
if(!this._collapsed){this.set_height(this.get_height());
}$telerik.repaintChildren(this);
this.updateClientState();
if(d){Telerik.Web.UI.DockCloseCommand.callBaseMethod(d,"onCommand");
}}},get_closed:function(){return this._closed;
},set_closed:function(a,e){if(!this._initialized){return;
}this._closed=a;
e=e?e:false;
var c=this.get_enableAnimation()?this._animationDuration:0;
if(!e||c==0){this._onCloseAnimationEnd();
return;
}var b=this.get_element();
var f=Function.createDelegate(this,this._onCloseAnimationEnd);
var d=this.get_titleElement();
if(d!=null){d.style.display="none";
}if(a){$telerik.$(b).hide(c,f);
}else{$telerik.$(b).show(c,f);
}},get_collapsed:function(){return this._collapsed;
},set_collapsed:function(a,h){h=h?h:false;
var f=this._collapsed;
this._collapsed=a;
if(!this._initialized){return;
}var b=this;
var d=this.get_element();
var l=this._tableElement;
var g=this.get_contentContainer();
var j=this.get_enableAnimation()?this.get_animationDuration():0;
if(!h){j=0;
}var c={};
var i=this.getCommand("ExpandCollapse");
d.style.height="auto";
if(this._resizable){l.style.height="auto";
}if(this._collapsed){this._expandedHeight=this._height?parseInt(this._height):parseInt(b._getBounds().height);
c.height="0px";
$telerik.$(g).animate(c,j,function(){b._configureHandles(false);
b._setContentContainerHeight();
b.addCssClass("rdCollapsed");
if(i){i.set_state(2);
Telerik.Web.UI.DockExpandCollapseCommand.callBaseMethod(i,"onCommand");
}});
}else{if(f&&!this._collapsed&&!this._expandedHeight){if(this._height){this._expandedHeight=parseInt(this._height);
}else{g.style.height="auto";
b.removeCssClass("rdCollapsed");
this._expandedHeight=parseInt(b._getBounds().height);
b.addCssClass("rdCollapsed");
}}b.removeCssClass("rdCollapsed");
var k=this._getBounds(this._topBar).height;
var e=this._getBounds(this._bottomMiddleBar).height;
var m=parseInt(this._expandedHeight)-k-e;
c.height=m+"px";
g.style.height="0px";
$telerik.$(g).animate(c,j,function(){g.style.display="";
l.style.height="";
if(b.get_height()!=null){b._setHeightHtmlEl(b._expandedHeight);
}if(b._resizable){if(!b._dockZoneID){b._configureHandles(true);
}}if(b.get_height()==null){d.style.height="";
}b._setContentContainerHeight();
if(i){i.set_state(1);
}$telerik.repaintChildren(b);
if(b._resizable){b.set_height($telerik.getBounds(d).height+"px");
}b.updateClientState();
if(i){Telerik.Web.UI.DockExpandCollapseCommand.callBaseMethod(i,"onCommand");
}});
}},get_autoPostBack:function(){return this._autoPostBack;
},set_autoPostBack:function(a){this._autoPostBack=a;
},get_commands:function(){return this._commands;
},set_commands:function(a){this._commands=a;
this._originalCommandsObject=a;
},get_dockMode:function(){return this._dockMode;
},set_dockMode:function(a){this._dockMode=a;
},get_dockZoneID:function(){return this._dockZoneID;
},set_dockZoneID:function(a){if(a==""){if(!this._collapsed){this._configureHandles(true);
}}else{this._configureHandles(false);
}this._dockZoneID=a;
},get_forbiddenZones:function(){return this._forbiddenZones;
},set_forbiddenZones:function(a){this._forbiddenZones=a;
},get_height:function(){return this._height;
},set_height:function(a){this._height=a;
this.updateClientState();
if(this._initialized){this._setSize(null,a);
}},get_index:function(){return this._index;
},set_index:function(a){this._index=a;
},get_layoutID:function(){return this._layoutID;
},set_layoutID:function(a){this._layoutID=a;
},get_enableDrag:function(){return this._enableDrag;
},set_enableDrag:function(a){this._enableDrag=a;
this._initializeDrag();
},get_enableAnimation:function(){return this._enableAnimation;
},set_enableAnimation:function(a){this._enableAnimation=a;
},get_animationDuration:function(){return this._animationDuration;
},set_animationDuration:function(a){this._animationDuration=a;
},get_pinned:function(){return this._pinned;
},set_pinned:function(a){this._pinned=a;
if(!this._initialized){return;
}var c=this.getCommand("PinUnpin");
if(c){c.set_state(a?2:1);
}if($telerik.isIE6){if(a){this.set_enableDrag(false);
}else{this.set_enableDrag(true);
}return;
}var e=this.get_element();
e.style.position="absolute";
var b=$telerik.getScrollOffset(e,true);
var d=this._getLocation(e);
if(a){d=this.subtractPoints(d,b);
this._setLocation(d);
e.style.position="fixed";
this.set_enableDrag(false);
}else{d=this.addPoints(d,b);
this._setLocation(d);
this.set_enableDrag(true);
}},get_title:function(){return this._title;
},set_title:function(b){this._title=b;
var a=this.get_titleElement();
if(a){a.innerHTML=b;
}},get_uniqueID:function(){return this._uniqueID;
},set_uniqueID:function(a){this._uniqueID=a;
},get_uniqueName:function(){return this._uniqueName;
},set_uniqueName:function(a){this._uniqueName=a;
},set_visibleTitlebar:function(b){if(b==null){b=true;
}var a=this._topBar;
if(b){this.get_titleBar().style.display="";
Sys.UI.DomElement.removeCssClass(a,"rdNone");
}else{Sys.UI.DomElement.addCssClass(a,"rdNone");
this.get_titleBar().style.display="none";
}},get_width:function(){return this._width;
},set_width:function(a){this._width=a;
this.updateClientState();
if(this._initialized){this._setSize(a,null);
}},get_skin:function(){return this._skin;
},set_skin:function(a){if(a&&this._skin!=a){this._skin=a;
}},get_resizable:function(){return this._resizable;
},set_resizable:function(a){this._resizable=a;
this._makeResizable();
},get_dockZone:function(){return this._dockZone;
},set_dockZone:function(a){this._dockZone=a;
}};
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(a){Telerik.Web.UI.DockCommand.initializeBase(this,[a]);
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(a){this.get_events().addHandler("command",a);
},remove_command:function(a){this.get_events().removeHandler("command",a);
},raise_command:function(a){var b=this.get_events().getHandler("command");
if(b){b(this.get_radDock(),a);
}},get_clientTypeName:function(){return this._clientTypeName;
},set_clientTypeName:function(a){this._clientTypeName=a;
},get_cssClass:function(){return this._cssClass;
},set_cssClass:function(a){this._cssClass=a;
},get_name:function(){return this._name;
},set_name:function(a){this._name=a;
},get_text:function(){return this._text;
},set_text:function(a){this._text=a;
},get_autoPostBack:function(){return this._autoPostBack;
},set_autoPostBack:function(a){this._autoPostBack=a;
},get_radDock:function(){return this._radDock;
},set_radDock:function(a){this._radDock=a;
},onCommand:function(b){var a=new Sys.CancelEventArgs();
a.command=this;
a.event=b;
a.Command=this;
this.raise_command(a);
if(a.get_cancel()){return;
}this.get_radDock().raise_command(a);
if(a.get_cancel()){return;
}this.get_radDock().updateClientState();
this.conditionalPostback();
},onMouseDown:function(a){$telerik.cancelRawEvent(a);
},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(a){Telerik.Web.UI.DockToggleCommand.initializeBase(this,[a]);
this._state=1;
this._alternateCssClass="rdCustom";
this._alternateText="Custom";
this._initialSetState=false;
};
Telerik.Web.UI.DockToggleCommand.prototype={updateState:function(){var a=this.get_element();
var b=a.getElementsByTagName("span")[0];
if(this.get_state()==1){a.title=this.get_text();
Sys.UI.DomElement.addCssClass(b,this.get_cssClass());
Sys.UI.DomElement.removeCssClass(b,this.get_alternateCssClass());
}else{a.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(a){this._state=a;
if(this._initialSetState){this.updateState();
}},get_alternateCssClass:function(){return this._alternateCssClass;
},set_alternateCssClass:function(a){this._alternateCssClass=a;
},get_alternateText:function(){return this._alternateText;
},set_alternateText:function(a){this._alternateText=a;
},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(a){Telerik.Web.UI.DockCloseCommand.initializeBase(this,[a]);
this._cssClass="rdClose";
this._name="Close";
this._text="Close";
};
Telerik.Web.UI.DockCloseCommand.prototype={onCommand:function(a){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(a){Telerik.Web.UI.DockExpandCollapseCommand.initializeBase(this,[a]);
this._cssClass="rdCollapse";
this._alternateCssClass="rdExpand";
this._name="ExpandCollapse";
this._text="Collapse";
this._alternateText="Expand";
};
Telerik.Web.UI.DockExpandCollapseCommand.prototype={onCommand:function(a){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(a){Telerik.Web.UI.DockPinUnpinCommand.initializeBase(this,[a]);
this._cssClass="rdUnpin";
this._alternateCssClass="rdPin";
this._name="PinUnpin";
this._text="Pin";
this._alternateText="Unpin";
};
Telerik.Web.UI.DockPinUnpinCommand.prototype={onCommand:function(a){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();