var MENU_FOCUSED = false;
var MENU_NAME = '';

IE4 = (document.all) ? 1 : 0;       // browser is Internet Explorer 4
NS4 = (document.layers) ? 1 : 0;    // browser is Netscape 4

ver4 = (IE4 || NS4) ? 1 : 0;  // know that we have version 4 browser
// this will be required for non-dhtml browsers

function hoverMenu(whichElement,status) {
//	arrayOfLayers = ['fan_club'];
//	maxNbrOfLayers =1000;
//alert(arrayOfLayers);
	if (status == true) {
		setMenuFocused()
		vis = 'visible';
	}
	else if (status == false) {
		vis = 'hidden';
	}


	// checking which browser
	if (IE4) {
		for (i=0;i<maxNbrOfLayers;i++) {
			layerName = arrayOfLayers[i];
			if (layerName == whichElement) {
				// get its index first
				layerIndex = i;
				theElement = eval('document.all.'+arrayOfLayers[i]+'.style');
				theElement.visibility=vis;
			} // check if layer exists
			else {
				theElement = eval('document.all.'+arrayOfLayers[i]+'.style');
				theElement.visibility='hidden';
			} // set other layers to hidden

		} // end if for loop
	} // end of IE4

	else if (NS4) { // netscape or similar browser
	for (i=0;i<maxNbrOfLayers;i++) {
		layerName = arrayOfLayers[i];
		if (layerName == whichElement) {
			// get its index first
			layerIndex = i;
			theElement = eval("document." + arrayOfLayers[i]);
			theElement.visibility=vis;
		} // check if layer exists
		else {
			theElement = eval("document." + arrayOfLayers[i]);
			theElement.visibility='hidden';
		} // set other layers to hidden


	} // end if for loop
	} // end of NS
	else { // for Opera browser
	for (i=0;i<maxNbrOfLayers;i++) {
		layerName = arrayOfLayers[i];
	//alert(maxNbrOfLayers);
	//alert(whichElement);
		if (layerName == whichElement) {
			// get its index first
			//alert(theElement.visibility);
			layerIndex = i;
			theElement = eval(document.getElementById(arrayOfLayers[i])).style;
			theElement.visibility=vis;
		} // check if layer exists
		else {
			theElement = eval(document.getElementById(arrayOfLayers[i])).style;
			theElement.visibility='hidden';
			
		} // set other layers to hidden

	} // end if for loop
	} // end of Opera

} // end hoverOver function

function startHideMenu(whichElement) {
	MENU_FOCUSED = false;
	MENU_NAME = whichElement;
	setTimeout("hideMenu()",500);
	return;
} // end startHideMenu()

function hideMenu() {
	if (!MENU_FOCUSED) hoverMenu(MENU_NAME,false);
	return;
} // end hideMenu()

function setMenuFocused() {
	MENU_FOCUSED = true;
} // end setMenuFocused