//_______________________________MarQi_H0h7$+3iz________________________________________^-^_________

//_________________DROP_DOWN_MENU_code
var timeout	= 500;
var closetimer	= 0;
var ddmenit	= 0;
var hiliteID;

// open hidden layer
function mopen(id)
{	
	
	var hilite="m";
	hilite+=id;
		
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if (ddmenit) {
		ddmenit.style.visibility = 'hidden';
		hiliteID.style.background="#ddd";
	}
	// get new layer and show it
	ddmenit = document.getElementById(id);
	hiliteID = document.getElementById(hilite);
	ddmenit.style.visibility = 'visible';
	hiliteID.style.background="#fff";
}
// close showed layer
function mclose()
{
	if (ddmenit) {
		ddmenit.style.visibility = 'hidden';
		hiliteID.style.background="#ddd";
	}
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 




//______________________________CONTENT_SWITCHING_________

function OnContent(curry, SecWind){
	if (SecWind==false) {
		if(Special){
			document.getElementById("specCont").style.visibility = "hidden";
			Special=false;
		}
		OffAllRiteContent('oncont');
		CurrContent = curry;
		document.getElementById("textbox").style.visibility = "visible";
		document.getElementById(CurrContent).style.visibility = "visible";
	}

	if(SecWind==true){
		
		switch(curry){        //_Use_a_case_for_each_content_option
			case "corevalues":
 				window.location = "index.php?corevalues";
  				break;
			case "directions":
  				window.location = "index.php?directions";
  				break;
			case "doner":
  				window.location = "index.php?doner";
  				break;
			case "why":
  				window.location = "index.php?why";
  				break;	
			case "vlntr":
  				window.location = "index.php?vlntr";
  				break;	
			case "commun":
  				window.location = "index.php?commun";
  				break;		
			case "memb":
  				window.location = "index.php?memb";
  				break;		
			case "hours":
  				window.location = "index.php?hours";
  				break;		
			case "telephoney":
  				window.location = "index.php?telephoney";
  				break;		
			case "email":
  				window.location = "index.php?email";
  				break;		
			case "history":
  				window.location = "index.php?history";
  				break;		
			case "addr":
  				window.location = "index.php?addr";
  				break;	
			case "staff":
  				window.location = "index.php?staff";
  				break;	
			default:
  				window.location = "index.php?hours";
		}
	}
}



//_____________________________LEFT_CONTENT_SWITCHING_________

function OnLeftContent(Lcurry, SecWind){
	if (SecWind==false) {
		document.getElementById(LeftContent).style.visibility = "hidden";
		LeftContent = Lcurry;
		document.getElementById("leftbox").style.visibility = "visible";
		document.getElementById(LeftContent).style.visibility = "visible";
	}

	if(SecWind==true){
		
		switch(Lcurry){        //_Use_a_case_for_each_LEFT_content_option
			case "linqs":
 				window.location = "index.php?linqs";
  				break;
			case "dloads":
  				window.location = "index.php?dloads";
  				break;
			default:
  				window.location = "index.php?linqs";
		}
	}
}



function OffContent(from){
		document.getElementById("textbox").style.visibility="hidden";
		document.getElementById("leftbox").style.visibility="hidden";
		document.getElementById(CurrContent).style.visibility="hidden";
		document.getElementById(LeftContent).style.visibility="hidden";
}




function OffAllRiteContent(from){
			
		document.getElementById("textbox").style.visibility="hidden";
		
		document.getElementById("corevalues").style.visibility="hidden";
		document.getElementById("directions").style.visibility="hidden";
		document.getElementById("doner").style.visibility="hidden";
		document.getElementById("why").style.visibility="hidden";
		document.getElementById("vlntr").style.visibility="hidden";
		document.getElementById("commun").style.visibility="hidden";
		document.getElementById("memb").style.visibility="hidden";
		document.getElementById("telephoney").style.visibility="hidden";
		document.getElementById("email").style.visibility="hidden";
		document.getElementById("history").style.visibility="hidden";
		document.getElementById("addr").style.visibility="hidden";
		document.getElementById("staff").style.visibility="hidden";
		document.getElementById("hours").style.visibility="hidden";
		document.getElementById("garden").style.visibility="hidden";
		document.getElementById("visit").style.visibility="hidden";
		document.getElementById("thanx").style.visibility="hidden";
		
}

	

