function _catchBBCode() 
{ 
   this.objs = []; 
   return this; 
} 
_catchBBCode.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; 
} 
_catchBBCode.prototype.getObj = function(obj) 
{ 
   return ( document.getElementById ? document.getElementById(obj) : 
         ( document.all ? document.all[obj] : 
         ( document.layers ? document.layers[obj] : null ) ) ); 
} 
_catchBBCode.prototype.displayObj = function(obj, status) 
{ 
   var x = this.getObj(obj); 
   if(!x) return; 
   var css = ( document.layers ? x : x.style ); 
   if( this.IsDisplaySupported() ) 
   { 
      css.display = status; 
   } 
   else 
   { 
      css.visibility = ( status == 'none' ? 'hidden' : 'visible' ); 
   } 
} 
_catchBBCode.prototype.open = function(l_catch) 
{ 
   var s='', randomId = 'hide' + Math.floor(Math.random() * 15000); 
   var style = ( this.IsDisplaySupported() ? 'display:none;' : 'visibility:hidden;' ); 
   if( document.layers ) { style = 'position:relative;' + style; } 
   s += '<div><a class="postlink" href="javascript:catchBBCode.showHide(\'' + randomId + '\');" onmouseover="top.status=\'\';" onfocus="this.blur();">' + l_catch + '</a></div>'; 
   s += '<div id="' + randomId + '" style="' + style + '">'; 
   document.write(s); 
   this.objs[randomId] = 'none'; 
} 
_catchBBCode.prototype.close = function() 
{ 
   document.write('</div>'); 
} 
_catchBBCode.prototype.showHide = function(obj) 
{ 
   if( !this.objs[obj] ) return; 
   this.objs[obj] = ((this.objs[obj]=='none') ? 'block':'none'); 
   this.displayObj(obj, this.objs[obj]); 
} 
var catchBBCode = new _catchBBCode();
var baseopacity=50

function slowhigh(which2)
{
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(imgobj)",50)
}

function slowlow(which2)
{
	cleartimer()
	instantset(baseopacity)
}

function instantset(degree)
{
	if (browserdetect=="mozilla")
	imgobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
	imgobj.filters.alpha.opacity=degree
}

function cleartimer()
{
	if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2)
{
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
	cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
	cur2.filters.alpha.opacity+=10
	else if (window.highlighting)
	clearInterval(highlighting)
}
