//Show n' Hide DIVs - Daniel Tse 2003
//Dan@DanielTse.com
//call showMenu('TYPE_DIVNAME_HERE') to show a div
//call hideMenu('TYPE_DIVNAME_HERE') to hide a div
//call hideAll() to hide all divs listed in Array
//NOTE: Change the hideALL() function when you add/takeaway new menu items

function hideAll()
{
	//Cheat a bit here
	var AllDivs = new Array("subhome", "subabout", "subdp", "subprojects", "subweblog"); //Array of all divs to hide
	var i=0
	var DivCount = AllDivs.length;
	
	for(i=0; i<DivCount; i++){ hideMenu(AllDivs[i]);}
	
	delete i;	//Cleanup
	delete DivCount;//Cleanup
	//delete AllDivs;	//Cleanup
	return 0;	
}

function showMenu()
{
	var arguments=showMenu.arguments;	//array of all arguments
	var divID = arguments[0];		//First argument is ID of Div
	
	hideAll();		//Hide all shown menus
	document.getElementById(divID).style.visibility='visible';	//show only the one you want
	
	delete divID;	//Cleanup
	delete arguments;//Cleanup
	return 0;
}

function hideMenu()
{

	var arguments=hideMenu.arguments;	//array of all arguments
	var divID = arguments[0];		//First argument is ID of Div

	document.getElementById(divID).style.visibility='hidden';

	delete divID;	//Cleanup
	delete arguments;//Cleanup
	return 0;
}
