/**
/* Title:			menus.css
/*
/* Purpose:			Defines how the menus/submenus work (DHTML)
/*
/* CreatedBy:		Carlos Li
/*
/* CreatedOn:		09 Jul 2005
/*
/* Revisions:
/*                      17 Aug 2007 : Carlos Li
/*                          - added function to open a new window and display the page specified as the uri argument.
/*
**/



var contentWindow = null;              // window for website content



/**
/* PreCond:		The value of menuName should be the ID of the submenu to be shown
/*					+ the suffix "_menu"
/* PostCond:	Submenu for the current menu (menuName) is made visible
**/
function showMenu(menuName)
{
	document.getElementById(menuName + "_menu").style.visibility = "visible";
}

/**
/* PreCond:		The value of menuName should be the ID of the submenu to be hidden
/*					+ the suffix "_menu"
/* PostCond:	Submenu for the current menu (menuName) is hidden
**/
function hideMenu(menuName)
{
	document.getElementById(menuName + "_menu").style.visibility = "hidden";
}



/**
/* PreCond:		Selector for current submenu should have the same ID as 
/*					the object passed + "_sel"
/* PostCond:	Submenu for the current menu (menuName) is made visible
**/
function showSelector(obj)
{
	document.getElementById(obj.id + "_sel").style.visibility = "visible";
}

/**
/* PreCond:		Selector for current submenu should have the same ID as 
/*					the object passed + "_sel"
/* PostCond:	Submenu for the current menu (menuName) is hidden
**/
function hideSelector(obj)
{
	document.getElementById(obj.id + "_sel").style.visibility = "hidden";
}


/**
/* PreCond:        URI passed must exist and is valid.
/* PostCond:       Page specified in uri will be opened in a new window.  If window is 
/*                 already opened, its contents will be replaced with the content in 
/*                 the new URI.
**/
function openContentWindow(uri)
{
	contentWindow = window.open(uri, "contentWindow", 
		"toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, " + 
		"copyhistory=yes, width=800, height=500");
	contentWindow.focus();
}

