/*********************************************
 *  Website JavaScript general functions
 *    (c) 2006 RSZdesign
 *
 *		- file created by V. Twigt
 *		- file modified by V. Twigt
 *
 *    	$Id: main.js 53 2006-05-07 11:05:32Z Vincent $
 *********************************************/


// --------------------------------------
// Menu item hover event handlers (IE)
// --------------------------------------
function menuItemOver(e) {
	if (this.className.search(/\bhover\b/g) == -1) { this.className += ' hover'; }
	var ul = this.getElementsByTagName('ul').item(0);
	if (ul) { ul.style.zIndex = '100'; ul.style.display = 'block'; }
	ul = null;
}

function menuItemOut(e) {
	this.className = this.className.replace(/\s*\bhover\b/g, '');
	var ul = this.getElementsByTagName('ul').item(0);
	if (ul) { ul.style.display = 'none'; }
	ul = null;
}


// --------------------------------------
// Fixes lack of :hover support (IE)
// --------------------------------------
function fixMenuHover(e)
{
	if (document.getElementById && document.getElementsByTagName) {
		var menu = document.getElementById('menu');
		if (menu) {
			var lis = menu.getElementsByTagName('li');
			for (var i = 0; i < lis.length; i++) {
				lis[i].onmouseover = menuItemOver;
				lis[i].onmouseout  = menuItemOut;
			}
			lis = null;
		}
		menu = null;
	}
}


// --------------------------------------
// Window load event named function
// --------------------------------------
function initWin(e)
{
	if (document.all) {
		//fixMenuHover(e);
	}
}


// --------------------------------------
// Set window onload event handler
// --------------------------------------
window.onload = initWin;

