/*****************************************************************************
*
* File     : StackedPanel.js
* 
* Project  : WMS Viewer Client
* 
* Contents : 
*
* Author: Milan Trninic
*
* Copyright 1999-2005 Galdos Systems, Inc.
* All rights reserved.
* 
***|***************************|***********************|*******************|*/

/************************************************************************
*
*	Global declarations
*
*
*************************************************************************/

/************************************************************************
*
*	function:	StackedPanel
*
*	purpose:	Constructor
*
*************************************************************************/
function StackedPanel(uiElement)
{
	// method assignments
	this.init = StackedPanel.init;
	this.setVisible = StackedPanel.setVisible;
	this.isVisible = StackedPanel.isVisible;
	this.setSize = StackedPanel.setSize;

	// instance field declarations
	this._uiElement;
	this._visible;
	
	// initialization
	this.init(uiElement);
}

/************************************************************************
*
*	function:	init
*
*	purpose:	initializes the globals
*
*************************************************************************/
function StackedPanel.init(uiElement)
{
	this._uiElement = uiElement;
}

/************************************************************************
*
*	function:	setVisible
*
*	purpose:	
*
*************************************************************************/
function StackedPanel.setVisible(visible)
{
	this._visible = visible;
	if (visible) this._uiElement.style.display="";
	else this._uiElement.style.display="none";
}

/************************************************************************
*
*	function:	isVisible
*
*	purpose:	
*
*************************************************************************/
function StackedPanel.isVisible()
{
	return (this._uiElement.style.display != "none");
}

/************************************************************************
*
*	function:	setSize
*
*	purpose:	
*
*************************************************************************/
function StackedPanel.setSize(width, height)
{
	this._uiElement.style.height = height;
	this._uiElement.style.width = width;
}


