var Panel =
{
	LeftDock	:	{ XPos : 0, YPos : 150 },
	RightDock	:	{ XPos : ((Smgr.Right-this.Width)-2), YPos : 150 },
	Height 	: 	125,
	Width	:	280,
	BlnDockLeft	:	true,
	Dock	:	function(wgz)
	{
		if(!wgz.Docked)
		{
			this.RightDock.XPos = ((Smgr.Right-this.Width)-2);
			wgz.Paused = true;
			wgz.TargetXPos = (this.BlnDockLeft)?this.LeftDock.XPos:this.RightDock.XPos;

			wgz.TargetYPos = (this.BlnDockLeft)?this.LeftDock.YPos:this.RightDock.YPos;
			wgz.TargetHeight = this.Height;
			wgz.TargetWidth = this.Width;
			wgz.DockXPos = wgz.XPos;
			wgz.DockYPos = wgz.YPos;
			Tween.AnimatePos(wgz, null, false, null);
			Tween.AnimateSize(wgz, null);
			//alter widget's events

			//wgz.Docked = true;
			wgz.onDock();

			//alter properties for next item
			if(wgz!=Wmgr.List[Wmgr.List.length-1]) //if is not last item in array
			{
				this.BlnDockLeft = (this.BlnDockLeft)?false:true;	
				if(!this.BlnDockLeft)
				{
					this.LeftDock.YPos += (this.Height + 30);
				}
				else
				{
					this.RightDock.YPos += (this.Height + 30)
				}
			}
			else //reset to default
			{
				this.BlnDockLeft = true;
				this.LeftDock = { XPos : 0, YPos : 150 };
				this.RightDock = { XPos : ((Smgr.Right-this.Width)-2), YPos : 150};
			}
		}
	},
	UnDock	:	function(wgz)
	{
		if(wgz.Docked)
		{
			wgz.TargetHeight = wgz.DefaultHeight;
			wgz.TargetWidth = wgz.DefaultWidth;
			wgz.TargetXPos =wgz.DockXPos;
			wgz.TargetYPos =wgz.DockYPos;

			wgz.DIV.firstChild.onmouseout = null;
			wgz.DIV.firstChild.onmouseover = null;
			wgz.DIV.firstChild.onmousemove = null;
			wgz.DIV.lastChild.onmouseout = null;
			wgz.DIV.lastChild.onclick = null;


			Tween.AnimatePos(wgz, wgz.onUnDock, false, null);
			//alter widget's events
			//wgz.Docked = false;
		}
	}
};
