var myMenuState2 = 0;
var myMenuState3 = 0;
var myMenuState4 = 0;
var myMenuState5 = 0;
var myMenuState7 = 0;
var myMenuState9 = 0;
var myMenuState11 = 0;
var myMenuState17 = 0;
var myMenuState18 = 0;
var myMenuState24 = 0;

var href2 = document.getElementById('menu2').href;
var href3 = document.getElementById('menu3').href;
var href4 = document.getElementById('menu4').href;
var href5 = document.getElementById('menu5').href;
var href24 = document.getElementById('menu24').href;

var myMenu2 = new Fx.Slide('items2');
var myMenu3 = new Fx.Slide('items3');
var myMenu4 = new Fx.Slide('items4');
var myMenu5 = new Fx.Slide('items5');
var myMenu24 = new Fx.Slide('items24');

$('menu2').addEvent('click', function(e){
 	e = new Event(e);
	if(myMenuState2 == 0)
	{	
		window.location = href2;
		myMenuState2 = 1;
	}
	else
		myMenuState2 = 0;

	myMenu2.toggle();
	e.stop();
});
$('menu3').addEvent('click', function(e){
 	e = new Event(e);
	if(myMenuState3 == 0)
	{	
		window.location = href3;
		myMenuState3 = 1;
	}
	else
		myMenuState3 = 0;

	myMenu3.toggle();
	e.stop();
});
$('menu4').addEvent('click', function(e){
 	e = new Event(e);
	if(myMenuState4 == 0)
	{	
		window.location = href4;
		myMenuState4 = 1;
	}
	else
		myMenuState4 = 0;

	myMenu4.toggle();
	e.stop();
});
$('menu5').addEvent('click', function(e){
 	e = new Event(e);
	if(myMenuState5 == 0)
	{	
		window.location = href5;
		myMenuState5 = 1;
	}
	else
		myMenuState5 = 0;

	myMenu5.toggle();
	e.stop();
});
$('menu24').addEvent('click', function(e){
 	e = new Event(e);
	if(myMenuState24 == 0)
	{	
		window.location = href24;
		myMenuState24 = 1;
	}
	else
		myMenuState24 = 0;

	myMenu24.toggle();
	e.stop();
});

myMenu2.hide();
myMenu3.hide();
myMenu4.hide();
myMenu5.hide();
myMenu24.hide();

if(window.location == href2)
{
	myMenu2.toggle();
	myMenuState2 = 1;
}
if(window.location == href3)
{
	myMenu3.toggle();
	myMenuState3 = 1;
}
if(window.location == href4)
{
	myMenu4.toggle();
	myMenuState4 = 1;
}
if(window.location == href5)
{
	myMenu5.toggle();
	myMenuState5 = 1;
}
//if(window.location == href7)
//{
//	myMenu7.toggle();
//	myMenuState7 = 1;
//}
//if(window.location == href9)
//{
//	myMenu9.toggle();
//	myMenuState9 = 1;
//}


if(window.location == href24)
{
	myMenu24.toggle();
	myMenuState24 = 1;
}

if (window.location == document.getElementById('sub1').href)
{
	myMenu2.toggle();
	myMenuState2 = 1;
}

if (window.location == document.getElementById('sub3').href)
{
	myMenu2.toggle();
	myMenuState2 = 1;
}
if (window.location == document.getElementById('sub4').href)
{
	myMenu2.toggle();
	myMenuState2 = 1;
}
if (window.location == document.getElementById('sub5').href)
{
	myMenu3.toggle();
	myMenuState3 = 1;
}
if (window.location == document.getElementById('sub6').href)
{
	myMenu3.toggle();
	myMenuState3 = 1;
}
if (window.location == document.getElementById('sub7').href)
{
	myMenu4.toggle();
	myMenuState4 = 1;
}
if (window.location == document.getElementById('sub8').href)
{
	myMenu4.toggle();
	myMenuState4 = 1;
}
if (window.location == document.getElementById('sub9').href)
{
	myMenu5.toggle();
	myMenuState5 = 1;
}
if (window.location == document.getElementById('sub10').href)
{
	myMenu5.toggle();
	myMenuState5 = 1;
}
if (window.location == document.getElementById('sub11').href)
{
	myMenu5.toggle();
	myMenuState5 = 1;
}
if (window.location == document.getElementById('sub12').href)
{
	myMenu5.toggle();
	myMenuState5 = 1;
}
if (window.location == document.getElementById('sub32').href)
{
	myMenu24.toggle();
	myMenuState24 = 1;
}

