
menu_status = new Array();

function showHide(adid,theid,otherid,navid,number,count){
    if (document.getElementById) {
		for (i=1;i<=count;i++)	{
			var switch_ad = document.getElementById(adid+i);
			var switch_id = document.getElementById(theid+i);
			var switch_id2 = document.getElementById(otherid+i);
			var switch_nav = document.getElementById(navid+i);
			var switch_home = document.getElementById('homeSide');
			//alert (adid+i);
			if (number == i) {
				if(menu_status[theid+i] != 'show' || menu_status[otherid+i] != 'show') {
				   switch_ad.className = 'show';
					 switch_id.className = 'subNav show';
				   switch_id2.className = 'show';
				   switch_nav.className = 'sectionsInsideOn';
				   menu_status[theid+i] = 'show';
				   menu_status[otherid+i] = 'show';
					 menu_status[adid+i] = 'show';
				   //switch_home.className='hide';
				   //alert ('here1');
				}else{
				   switch_id.className = 'subNav hide';
					 switch_ad.className = 'hide';
				   switch_id2.className = 'hide';
				   switch_nav.className = 'sectionsInside';
				   menu_status[theid+i] = 'hide';
				   menu_status[otherid+i] = 'hide';
					 menu_status[adid+i] = 'hide';
				   switch_home.className='show';
				}
			} else {
				switch_id.className = 'subNav hide';
				switch_ad.className = 'hide';
				switch_id2.className = 'hide';
				switch_nav.className = 'sectionsInside';
			  menu_status[theid+i] = 'hide';
			  menu_status[otherid+i] = 'hide';
			  menu_status[adid+i] = 'hide';
				//alert ('here3');
			}
		}
    }
}


