
function setMenu(){		
 
	if(window.location.hash=="#Free_Download"){
	   setMediumMenu('barmedium4');		 
	}
	else if(window.location.hash=="#Local_Library"){
		   setShortMenu('barshort2');
		}
	else if(window.location.hash=="#Buy_Online"){
		   setShortMenu('barshort3');			
		}
	else{
		setLongMenu('barlong1');
	}
	
}



function resetMenus(){
	
		document.getElementById('barlong1').className = 'barlong';
		
		document.getElementById('barmedium1').className = 'barmedium';
	//	document.getElementById('barmedium2').className = 'barmedium';
	//	document.getElementById('barmedium3').className = 'barmedium';
		document.getElementById('barmedium4').className = 'barmedium';
		document.getElementById('barmedium5').className = 'barmedium';
		document.getElementById('barmedium6').className = 'barmedium';
		document.getElementById('barmedium7').className = 'barmedium';
		document.getElementById('barmedium8').className = 'barmedium';

	//	document.getElementById('barshort1').className = 'barshort';
		document.getElementById('barshort2').className = 'barshort';
		document.getElementById('barshort3').className = 'barshort';		
	
		document.getElementById('barshort5').className = 'barshort';
		document.getElementById('barshort6').className = 'barshort';
		document.getElementById('barshort7').className = 'barshort';
		document.getElementById('barshort8').className = 'barshort';
		document.getElementById('barshort9').className = 'barshort';
		document.getElementById('barshort10').className = 'barshort';
		document.getElementById('barshort11').className = 'barshort';
		document.getElementById('barshort12').className = 'barshort';
		

		document.getElementById('barlong1').style.color = '#4F4F4F';
		
		document.getElementById('barmedium1').style.color = '#4F4F4F';
	//	document.getElementById('barmedium2').style.color = '#4F4F4F';	
	//	document.getElementById('barmedium3').style.color = '#4F4F4F';
		document.getElementById('barmedium4').style.color = '#4F4F4F';
		document.getElementById('barmedium5').style.color = '#4F4F4F';
		document.getElementById('barmedium6').style.color = '#4F4F4F';	
		document.getElementById('barmedium7').style.color = '#4F4F4F';	
		document.getElementById('barmedium8').style.color = '#4F4F4F';			

	//	document.getElementById('barshort1').style.color = '#4F4F4F';
		document.getElementById('barshort2').style.color = '#4F4F4F';
		document.getElementById('barshort3').style.color = '#4F4F4F';
		
		
		document.getElementById('barshort5').style.color = '#4F4F4F';
		document.getElementById('barshort6').style.color = '#4F4F4F';
		document.getElementById('barshort7').style.color = '#4F4F4F';
		document.getElementById('barshort8').style.color = '#4F4F4F';
		document.getElementById('barshort9').style.color = '#4F4F4F';
		document.getElementById('barshort10').style.color = '#4F4F4F';
		document.getElementById('barshort11').style.color = '#4F4F4F';
		document.getElementById('barshort12').style.color = '#4F4F4F';
		
	
}

function setLongMenu(menuitem){

	
    resizeContentArea(menuitem+'content');  	 	
	Effect.divSwap(menuitem+'content','content');


	resetMenus();

	// Collapse all sub menus
     document.getElementById('holder1').className = 'hidelist';
	
	document.getElementById(menuitem).className = 'arrowlong';	
	document.getElementById(menuitem).style.color = "#2F2F2F";	

	
}

function setMediumMenu(menuitem){

	resetMenus();
    
    // Collapse all sub menus
     document.getElementById('holder1').className = 'hidelist';
	 document.getElementById('holder2').className = 'hidelist';
	

	// Open Sub Menus
	if(menuitem == "barmedium4"){
		document.getElementById('nav').style.height="auto";
		document.getElementById('holder1').className = 'showlist';
				
	}
	
	if(menuitem == "barmedium8"){
		document.getElementById('nav').style.height="auto";
		document.getElementById('holder2').className = 'showlist';
				
	}


	

    resizeContentArea(menuitem+'content');  	 	
	Effect.divSwap(menuitem+'content','content');
	
	// Set menu to display
	document.getElementById(menuitem).className = 'arrowmedium';
	document.getElementById(menuitem).style.color = "#2F2F2F";

}



function setShortMenu(menuitem){
	resetMenus();
	
	resizeContentArea(menuitem+'content');  	 	
	Effect.divSwap(menuitem+'content','content');
	
	document.getElementById(menuitem).className = 'arrowshort';
	document.getElementById(menuitem).style.color = "#1F1F1F";
	
	
}



