function _hideBBCode()
{
	return this;
}

_hideBBCode.prototype.IsDisplaySupported = function()
{
	// Opera: Only v7+ supports write access to display attribute!
	if( window.opera && !document.childNodes ) return false;
	// Other DOM browsers and MSIE4+ support it as well.
	if( document.getElementById || document.all ) return true;
	// This is where legacy browsers fall. NS4, Hotjava, etc.
	return false;
}

_hideBBCode.prototype.open = function(l_hide)
{
	document.write(
		'<div class="hidden">' +
			'<div class="hidden-head" onclick="javascript:hideBBCode.showHide(this);">' +
				'<img src="includes/hidebbcode/plus.gif" />' + l_hide +
			'</div>' +
			'<div class="hidden-body" style="' +
				( document.layers ? 'position:relative;' : '' ) +
				( this.IsDisplaySupported() ? 'display:none;' : 'visibility:hidden;' )
				+ '">'
		);
}

_hideBBCode.prototype.close = function()
{
	document.write('</div></div>');
}

_hideBBCode.prototype.showHide = function(obj)
{ 
	var div = obj.parentNode.childNodes[1];
	var css = ( document.layers ? div : div.style );
	var status;

	if( this.IsDisplaySupported() )
	{
		status = (css.display == 'none');
		css.display = (status ? 'block' : 'none');
	}
	else
	{
		status = (css.visibility == 'hidden');
		css.visibility = ( status ? 'visible' : 'hidden' );
	}

	obj.firstChild.src = ( status ? 'includes/hidebbcode/minus.gif' : 'includes/hidebbcode/plus.gif' );
} 

var hideBBCode = new _hideBBCode();
