<!--

/**
 * @author alchymy
 */

/*

Note do not include the script tag inside xx.js files

Note that the html Comment 'tags' at the start and end of this file are added inside the script tag for older browsers which may not cope with code
in the body of the html page, however this may not matter when code is loaded inside head tag and newer browsers may not
require these comment tags at all anyway. The two back slash characters stop the closing comment
'tag' being processed when the comment encloses JavaScript, again this may only matter when code is in the body of a HTML page.

To be consistent this comment standard is used within all style and JavaScript tags in this project,
although they may all be removed eventually if they do not cause browser issues, to simplify coding, 
unless intended to contain actual notes like this.

(note do not use repeated // for comments over several consecutive lines in Javascript, use
these enclosing comments instead)

*/


<!-- drop down menu -->

<!--

// Global Variables
var timeout         = 500;
var closeTime		= 0;
var menuItem     = 0;

// open hidden layer

function menuOpen(id) {
	
	// cancel close timer
	menuCancCloseTime();

	// close old layer
	if(menuItem) menuItem.style.visibility = 'hidden';

	// get new layer and show it
	menuItem = document.getElementById(id);
	menuItem.style.visibility = 'visible';

}

// close showed layer

function menuClose() {

	if(menuItem) menuItem.style.visibility = 'hidden';
}

// go close timer
function menuCloseTime()
{
	closeTime = window.setTimeout(menuClose, timeout);
}

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

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

