/*****************************************************************************
 *
 * File     : Image.js
 * 
 * Project  : WMS Viewer Client
 * 
 * Contents : This class implements the image behaviour. 
 * 
 * Author: Milan Trninic
 *
 * Copyright 1999-2005 Galdos Systems, Inc.
 * All rights reserved.
 * 
 ***|***************************|***********************|*******************|*/

/************************************************************************
*
*	Global declarations
*
*	
*
*************************************************************************/

/************************************************************************
*
*	function:	Image
*
*	purpose:	Constructor
*
*************************************************************************/
function Image(uiElement)
{
	// method assignments
	this.init = Image.init;
	this.setPath = Image.setPath;
	this.setClassName = Image.setClassName;
	this.setEnabled = Image.setEnabled;
	this.isEnabled = Image.isEnabled;
	
	// instance field declarations
	this._uiElement;
	this._enabled;
	
	// initialization
	this.init(uiElement);
}

/************************************************************************
*
*	function:	init
*
*	purpose:	initializes the globals
*
*************************************************************************/
function Image.init(uiElement)
{
	this._uiElement = uiElement;
	this._enabled = true;
	this._uiElement.setAttribute("dataTransfer", this);
}

/************************************************************************
*
*	function:	setPath
*
*	purpose:	
*
*************************************************************************/
function Image.setPath(imagePath)
{
	this._uiElement.setAttribute("src", imagePath);
}

/************************************************************************
*
*	function:	setClassName
*
*	purpose:	
*
*************************************************************************/
function Image.setClassName(className)
{
	this._uiElement.className = className;
}

/************************************************************************
*
*	function:	setEnabled
*
*	purpose:	
*
*************************************************************************/
function Image.setEnabled(enable)
{
	this._enabled = enable;
}

/************************************************************************
*
*	function:	isEnabled
*
*	purpose:	
*
*************************************************************************/
function Image.isEnabled()
{
	return this._enabled;
}


