function ButtonDescr( id, normalImgName, disabledImgName )
{
	this._isEnabled = true;
	this._id = id;
	this._imgTag = document.getElementById( id );

	this._normalImg = new Image();
	this._normalImg.src = (typeof(normalImgName) == "undefined" ? this._imgTag.getAttribute( "src", 0 ):normalImgName);
	this._disabledImg = new Image();
	this._disabledImg.src = (typeof(disabledImgName) == "undefined" ? this._imgTag.getAttribute( "srcd", 0 ):disabledImgName);
}

ButtonDescr.prototype.enable = function( b )
{
	if( this._isEnabled != b )
	{
		this._isEnabled = b;
		this._imgTag.src = (b == true ? this._normalImg.src:this._disabledImg.src);
		this._imgTag.disabled = !b;
	}
}
