function Css2Caption( sText, sSpacerUrl, iW, iH, bChild, textClass, iconClass )
{
	this.index = Css2Caption.prototype.instances.length;
	Css2Caption.prototype.instances[ this.index ] = this;
	
	this.sId = "Css2Caption" + this.index;
	this.sText = sText;
	this.sSpacerUrl = sSpacerUrl;
	this.iW = iW;
	this.iH = iH;
	this.bChild = bChild;
	this.textClass = textClass;
	this.iconClass = iconClass;
}

Css2Caption.prototype.instances = new Array();

Css2Caption.prototype.setClassName = function( sClass )
{
	var domRef = document.getElementById( this.sId );
	if ( domRef ) domRef.className = sClass;
}

Css2Caption.prototype.toString = function()
{	

		html = 
		'<div class="xnode">' +
			'<div class="xnode_outerbox">' +
				'<div id="' + this.sId + '" class="' + this.textClass + '" style="height:' + ( this.iH - 6 ) + 'px;">' +
					'<div class="xnode_middle">' +
						'<div class="xnode_inner">' +
							'<div class="xnode_text">' +
								this.sText +
							'</div>' +
						'</div>' +
					'</div>' +
				'</div>' +
			'</div>' +
		'</div>';

		if ( this.bChild )
		{
//			html += '<div class="' + this.iconClass + '"><img src="' + this.sSpacerUrl + '" width="1" height="1"></div>';
		}

	return html;
}
