Post by crazynarutard on Nov 30, 2005 4:19:37 GMT
<script type='text/javascript'>
/* Hide/Show categories
Created by CrAzY_J
Open source
This copyright header must stay intact at all times.*/
var TD = document.body.getElementsByTagName('td');
var collapse = new function()
{
this.AddLink = function()
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD[t].className == 'catbg' && TD[t].align != 'right' && TD[t].colSpan == '5' )
{
TD[t].getElementsByTagName('a')[0].href = 'javascript:collapse.ShowHide("'+TD[t].getElementsByTagName('b')[0].innerHTML+'");';
TD[t].getElementsByTagName('a')[0].appendChild( document.createTextNode( TD[t].getElementsByTagName('b')[0].innerHTML ) );
TD[t].getElementsByTagName('b')[0].style.display = 'none';
}
}
}
this.ShowHide = function(hide)
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD[t].className == 'catbg' && TD[t].align != 'right' && TD[t].innerHTML.match(hide) )
{
for( z = t+1 ; z < TD.length ; z ++ )
{
if( TD[z].className == 'catbg' || !TD[z].getAttribute('width') )
break;
else
TD[z].parentNode.style.display = ( TD[z].parentNode.style.display == 'none' )? '':'none';
}
}
}
}
}
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/))
collapse.AddLink();
</script>
Keep my copyright header comment in the code at all times.
/* Hide/Show categories
Created by CrAzY_J
Open source
This copyright header must stay intact at all times.*/
var TD = document.body.getElementsByTagName('td');
var collapse = new function()
{
this.AddLink = function()
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD[t].className == 'catbg' && TD[t].align != 'right' && TD[t].colSpan == '5' )
{
TD[t].getElementsByTagName('a')[0].href = 'javascript:collapse.ShowHide("'+TD[t].getElementsByTagName('b')[0].innerHTML+'");';
TD[t].getElementsByTagName('a')[0].appendChild( document.createTextNode( TD[t].getElementsByTagName('b')[0].innerHTML ) );
TD[t].getElementsByTagName('b')[0].style.display = 'none';
}
}
}
this.ShowHide = function(hide)
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD[t].className == 'catbg' && TD[t].align != 'right' && TD[t].innerHTML.match(hide) )
{
for( z = t+1 ; z < TD.length ; z ++ )
{
if( TD[z].className == 'catbg' || !TD[z].getAttribute('width') )
break;
else
TD[z].parentNode.style.display = ( TD[z].parentNode.style.display == 'none' )? '':'none';
}
}
}
}
}
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/))
collapse.AddLink();
</script>
Keep my copyright header comment in the code at all times.