var menuTimer;

var overMenu = true;



function layerOver(whichLayer)

{

	var mainstyle, substyle, aboutstyle, newsstyle, pressstyle, eventstyle, partnerstyle, contactstyle;



	clearTimeout(menuTimer);



	if (document.getElementById) // && whichLayer != "current_sub")

	{

	// this is the way the standards work

		mainstyle = document.getElementById(whichLayer).style;

		substyle = document.getElementById(whichLayer + "_sub").style;



                aboutstyle = document.getElementById("about").style;

				newsstyle = document.getElementById("news").style;

                pressstyle = document.getElementById("schedule").style;

                eventstyle = document.getElementById("event").style;

                partnersstyle = document.getElementById("partners").style;

                contactstyle = document.getElementById("contact").style;



		aboutsubstyle = document.getElementById("about_sub").style;
		
		newssubstyle = document.getElementById("news_sub").style;

		presssubstyle = document.getElementById("schedule_sub").style;

		eventsubstyle = document.getElementById("event_sub").style;

		partnerssubstyle = document.getElementById("partners_sub").style;

		contactsubstyle = document.getElementById("contact_sub").style;

	}

	else if (document.all)

	{

		// this is the way old msie versions work

		mainstyle = document.all[whichLayer].style;

		substyle = document.all[whichLayer + "_sub"].style;



                aboutstyle = document.all["about"].style;

				newsstyle = document.all["news"].style;

                pressstyle = document.all["schedule"].style;

                eventstyle = document.all["event"].style;

                partnersstyle = document.all["partners"].style;

                contactstyle = document.all["contact"].style;



		aboutsubstyle = document.all["about_sub"].style;
		
		newssubstyle = document.all["news_sub"].style;

		presssubstyle = document.all["schedule_sub"].style;

		eventsubstyle = document.all["event_sub"].style;

		partnerssubstyle = document.all["partners_sub"].style;

		contactsubstyle = document.all["contact_sub"].style;

	}

	else if (document.layers)

	{

		// this is the way nn4 works

		mainstyle = document.layers[whichLayer].style;

		substyle = document.layers[whichLayer + "_sub"].style;



                aboutstyle = document.layers["about"].style;

				newsstyle = document.layers["news"].style;

                pressstyle = document.layers["schedule"].style;

                eventstyle = document.layers["event"].style;

                partnersstyle = document.layers["partners"].style;

                contactstyle = document.layers["contact"].style;



		aboutsubstyle = document.layers["about_sub"].style;
		
		newssubstyle = document.layers["news_sub"].style;

		presssubstyle = document.layers["schedule_sub"].style;

		eventsubstyle = document.layers["event_sub"].style;

		partnerssubstyle = document.layers["partners_sub"].style;

		contactsubstyle = document.layers["contact_sub"].style;

	}

        aboutstyle.background = "none";

		newsstyle.background = "none";

        pressstyle.background = "none";

        eventstyle.background = "none";

        partnersstyle.background = "none";

        contactstyle.background = "none";



	mainstyle.background = "#99cc33";



	aboutsubstyle.display = "none";
	
	newssubstyle.display = "none";

	presssubstyle.display = "none";

	eventsubstyle.display = "none";

	partnerssubstyle.display = "none";

	contactsubstyle.display = "none";



	substyle.display = "block"; 

}



function layerOut(whichLayer)

{

	var mainstyle;



	if (document.getElementById)

	{

	// this is the way the standards work

		mainstyle = document.getElementById(whichLayer).style;

	}

	else if (document.all)

	{

		// this is the way old msie versions work

		mainstyle = document.all[whichLayer].style;

	}

	else if (document.layers)

	{

		// this is the way nn4 works

		mainstyle = document.layers[whichLayer].style;

	}



	menuTimer = setTimeout("subOff('" + whichLayer + "')",2500);



}



function subOff(whichLayer)

{

	var mainstyle, substyle;



        if (document.getElementById)

        {

        // this is the way the standards work

                mainstyle = document.getElementById(whichLayer).style;

                substyle = document.getElementById(whichLayer + "_sub").style;

        }

        else if (document.all)

        {

                // this is the way old msie versions work

                mainstyle = document.all[whichLayer].style;

                substyle = document.all[whichLayer + "_sub"].style;

        }

        else if (document.layers)

        {

                // this is the way nn4 works

                mainstyle = document.layers[whichLayer].style;

                substyle = document.layers[whichLayer + "_sub"].style;

        }



	mainstyle.background = "none";

	substyle.display = "none";

}




