function init() {

        atags = document.getElementsByTagName("li");

        i=0;
        while (atag = atags[i])
        {
                if (atag.className == "topcat") {
			atag.onmouseover = expandfunc;
			atag.onmouseout = reversecolorfunc;
		}
                if (atag.className == "subcat") {
			atag.onmouseover = colorfunc2;
			atag.onmouseout = reversecolorfunc2;
		}
                i++;
        }

	document.onclick = clickhidefunc;

        function expandfunc(e)
        {
                if (!e) var e = window.event;

                target = e.target;
                if (!target) target = e.srcElement;
		if (target.nodeType == 3) // defeat Safari bug
                        target = target.parentNode;

		if(target.className != "subcat") {
	                hidefunc();
		}

		if(target.className == "topcat") {
			this.style.backgroundColor = "#006A2C";
			this.style.color = "#fff";
		}
		
		while (target.id == "" && target.nodeName != "BODY") { target = target.parentNode; }

		if (document.getElementById(target.id+"_sub")) {
	                document.getElementById(target.id+"_sub").style.display = "BLOCK";
		}

        }

	function clickhidefunc(e) {
                if (!e) var e = window.event;
                target = e.target;
                if (!target) target = e.srcElement;
		if (target.nodeName != "LI") hidefunc();
	}


        function hidefunc()
        {
            trtags = document.getElementsByTagName("ul");

            i=0;
            while (trtag = trtags[i])
            {
            if (trtag.className == "showhide") trtag.style.display = "none";
                i++;
            }	

	

        }

	function colorfunc()
	{
		this.style.backgroundColor = "#006A2C";
		this.style.color = "#fff";
	}

	function reversecolorfunc()
	{
		this.style.backgroundColor = "#00679F";
		this.style.color = "#fff";
	}

	function colorfunc2()
	{
		this.style.backgroundColor = "#A4DEC1";
		this.style.color = "#00679F";
	}

	function reversecolorfunc2()
	{
		this.style.backgroundColor = "#006A2C";
		this.style.color = "#fff";
	}

}
