/*****************************************************************************************************
*          Javascript source for Pop down menu:- menu1 v1.01 by mark Foyster.                        *
*                                                                                                    *
* Include this file in your document using the   <script src="menu1.js"></script>  statement in the  *
* head section of your html document. Also download and include the scroller2.css stylesheet.        *
*                                                                                                    *



*/
//function to turn menu item text blue on mouse over
function mover(opt_id)
{   
opt_id.style.color= "blue";
} 

//function to turn menu item text black on mouse out
function mout(opt_id)
{   
opt_id.style.color= "black";
} 

//function to drop menu box, parameter passed into variable "which" tells function which box to drop 
function drop(which)
{
switch(which)
	{
	case 1://execute if 'which' = 1
		document.getElementById("mabox").style.visibility="visible"; //show box 1 
		document.getElementById("menusuba1").style.visibility="visible";//show box 1 - Option 1
		document.getElementById("menusuba2").style.visibility="visible";//show box 1 - Option 2
		document.getElementById("menusuba3").style.visibility="visible";//show box 1 - Option 3
		document.getElementById("menusuba4").style.visibility="visible";//show box 1 - Option 4
		break;    
	case 2://execute if 'which' = 2
		document.getElementById("mbbox").style.visibility="visible";//show box 2
		document.getElementById("menusubb1").style.visibility="visible";//show box 2 - Option 1
		document.getElementById("menusubb2").style.visibility="visible";//show box 2 - Option 2
		document.getElementById("menusubb3").style.visibility="visible";//show box 2 - Option 3
		document.getElementById("menusubb4").style.visibility="visible";//show box 2 - Option 4
		break;
	case 3://execute if 'which' = 3
		document.getElementById("mcbox").style.visibility="visible";//show box 3 
		document.getElementById("menusubc1").style.visibility="visible";//show box 3 - Option 1
		document.getElementById("menusubc2").style.visibility="visible";//show box 3 - Option 2
		document.getElementById("menusubc3").style.visibility="visible";//show box 3 - Option 3
		document.getElementById("menusubc4").style.visibility="visible";//show box 3 - Option 4
		break;
	case 4://execute if 'which' = 3
		document.getElementById("mdbox").style.visibility="visible";//show box 4 
		document.getElementById("menusubd1").style.visibility="visible";//show box 4 - Option 1
		document.getElementById("menusubd2").style.visibility="visible";//show box 4 - Option 2
		document.getElementById("menusubd3").style.visibility="visible";//show box 4 - Option 3
		document.getElementById("menusubd4").style.visibility="visible";//show box 4 - Option 4
		break;
		//insert the code for any added menu categories here
	}
	
}


//function to re-hide menu box, parameter passed into variable "which" tells function which box to re-hide 
function retract(which)
{
switch(which)
	{
	case 1://execute if 'which' = 1
		document.getElementById("mabox").style.visibility="hidden";//hide box 1 
		document.getElementById("menusuba1").style.visibility="hidden";//hide box 1 - Option 1
		document.getElementById("menusuba2").style.visibility="hidden";//hide box 1 - Option 2
		document.getElementById("menusuba3").style.visibility="hidden";//hide box 1 - Option 3
		document.getElementById("menusuba4").style.visibility="hidden";//hide box 1 - Option 4
		break;    
	case 2://execute if 'which' = 2
		document.getElementById("mbbox").style.visibility="hidden";//hide box 2 
		document.getElementById("menusubb1").style.visibility="hidden";//hide box 2 - Option 1
		document.getElementById("menusubb2").style.visibility="hidden";//hide box 2 - Option 2
		document.getElementById("menusubb3").style.visibility="hidden";//hide box 2 - Option 3
		document.getElementById("menusubb4").style.visibility="hidden";//hide box 2 - Option 4

		break;
	case 3://execute if 'which' = 3
		document.getElementById("mcbox").style.visibility="hidden";//hide box 3 
		document.getElementById("menusubc1").style.visibility="hidden";//hide box 3 - Option 1
		document.getElementById("menusubc2").style.visibility="hidden";//hide box 3 - Option 2
		document.getElementById("menusubc3").style.visibility="hidden";//hide box 3 - Option 3
		document.getElementById("menusubc4").style.visibility="hidden";//hide box 3 - Option 4
		break;
	case 4://execute if 'which' = 3
		document.getElementById("mdbox").style.visibility="hidden";//hide box 4 
		document.getElementById("menusubd1").style.visibility="hidden";//hide box 4 - Option 1
		document.getElementById("menusubd2").style.visibility="hidden";//hide box 4 - Option 2
		document.getElementById("menusubd3").style.visibility="hidden";//hide box 4 - Option 3
		document.getElementById("menusubd4").style.visibility="hidden";//hide box 4 - Option 4
		break;
	
	//insert the code for any added menu categories here
	}
	
}
