HTML Code:
<script type="text/javascript">
var rayNav={
loop:function(ulID)
{
this.reset();
var navs=document.getElementById(ulID).getElementsByTagName('a');
for(var i=0;i<navs.length;i++)
{
navs[i].onclick=function()
{
rayNav.reset();
rayNav.exclude(this.getAttribute('href').split('#')[1]);
}
}
},
reset:function()
{
var uls=document.getElementById('rightNav').getElementsByTagName('ul');
for(var i=0;i<uls.length;i++)
uls[i].style.display='none';
},
exclude:function()
{
for(var i=0;i<this.exclude.arguments.length;i++)
document.getElementById(this.exclude.arguments[i]).style.display='';
}
};
window.onload=function()
{
rayNav.loop('nav'); // Pass the ID of the "main" nav
rayNav.exclude('home');
// You could exclude as many navs as you wish. rayNav.reset('home','media','information')
}
</script>
<style type="text/css">
#nav{
list-style-type:none;}
#nav li{margin:1px;float:left;}
#nav li a{
display:block;
width:100px;
height:30px;
border:1px solid #222;
text-align:center;
line-height:25px;
}
#nav li a:hover{
background:#eee;
}
#rightNav{clear:both;
font-family:Arial,tahoma,verdana;
font-size:10pt;
}
#rightNav ul{
list-style-type:none;
}
#rightNav p{
font-weight:bold;
}
#rightNav ul a{
font-weight:bold;
color:#930;
text-decoration:none;
}
#rightNav ul a:hover{
text-decoration:underline;
}
</style>
<ul id="nav">
<li><a href="#home">Home</a></li>
<li><a href="#media">Media</a></li>
<li><a href="#information">Information</a></li>
</ul>
<div id="rightNav">
<p>Home</p>
<ul id="home">
<li>- <a href="#">Home</a></li>
<li>- <a href="#">Home</a></li>
</ul>
<p>Media</p>
<ul id="media">
<li>- <a href="#">Images</a></li>
<li>- <a href="#">Wallpapers</a></li>
<li>- <a href="#">Sound Clips</a></li>
<li>- <a href="#">Buddy Icons</a></li>
</ul>
<p>Information</p>
<ul id="information">
<li>- <a href="#">Characters</a></li>
<li>- <a href="#">Episode List</a></li>
<li>- <a href="#">Quotes</a></li>
<li>- <a href="#">About the Creators</a></li>
</ul>
</div>
Bookmarks