
window.onload =  function () {
	
	var alltags=document.all? document.all : document.getElementsByTagName("*");
	 for (i=0; i<alltags.length; i++)	{
	
			if (alltags[i].className.match("topcat"))	{
					alltags[i].onmouseover = function () { lightup(this.getAttribute('rel'),this.getAttribute('color'),'cat'); }
					alltags[i].onmouseout = function () { lightoff(this.getAttribute('rel'),this.getAttribute('color'),'cat'); return false; }
				 }

			else if (alltags[i].className.match("subcat"))	{
					alltags[i].onmouseover = function () {  
					 lightup(this.getAttribute('rel'),this.getAttribute('color'),'topcat');
					 lightself(this,this.getAttribute('color')); 
					 }
					alltags[i].onmouseout = function () {
					 lightoff(this.getAttribute('rel'),this.getAttribute('color'),'topcat'); 
					 lightself(this,''); 
					 return false;
					}
				 }

		}

			 
}
