function _cache()
{
	this.lastOpened = '';
	return this;
}
_cache.prototype.IsDisplaySupported = function()
{
	if( window.opera && !document.childNodes ) return false;
	if( document.getElementById || document.all ) return true;
	return false;
}
_cache.prototype.getQueryVar = function(varName)
{
	var q = window.location.search.substring(1);
	var v = q.split('&');
	for( var i=0; i < v.length; i++ )
	{
		var p = v[i].split('=');
		if( p[0] == varName ) return p[1];
	}
	return null;
}
_cache.prototype.getObj = function(obj)
{
	return ( document.getElementById ? document.getElementById(obj) : ( document.all ? document.all[obj] : null ) );
}
_cache.prototype.displayObj = function(obj, status)
{
	var x = this.getObj(obj);
	if( x && x.style ) x.style.display = status;
}
_cache.prototype.display = function(id, isLink)
{
	if( this.IsDisplaySupported() )
	{
		if( !isLink )
		{
			if( this.lastOpened != '' )
			{
				this.displayObj(this.lastOpened, 'none');
			}
			if( this.lastOpened != id )
			{
				this.displayObj(id, '');
				this.lastOpened = id;
			}
			else
			{
				this.lastOpened = '';
			}
		}
		return false;
	}
	return true;
}

var cache = new _cache();

if( !cache.IsDisplaySupported() )
{
	var c = window.location.href;
	c += ( c.indexOf('?') > 0 ? '&' : '?' ) + 'dhtml=no';
	window.location.replace(c);
}
