
// Chargement menu (trick IE 6)
loadMenu = function() {
	var i;
	if (document.all && document.getElementById) {
		oNav = $('vtrmenu').firstChild;
		var n = oNav.childNodes.length;
		for (i=0; i<n; i++) {
			oNd = oNav.childNodes[i];
			if (oNd.nodeName == 'LI') {
				oNd.onmouseover = function() {
					this.className += ' over';
				};
				oNd.onmouseout = function() {
					this.className = this.className.replace(' over', '');
				};
			}
		}
	}
}
window.onload = loadMenu;

// PNG Fix (IE)
/*var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);
if ((version >= 5.5 && version < 8) && (document.body.filters)) {
	for (var i=0; i<document.images.length; i++) {
		var img = document.images[i];
		var imgName = img.src.toUpperCase();
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : "";
			var imgClass = (img.className) ? "class='" + img.className + "' " : "";
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
			var imgStyle = "display:inline-block;" + img.style.cssText;
			if (img.align == "left") { imgStyle = "float:left;" + imgStyle; }
			if (img.align == "right") { imgStyle = "float:right;" + imgStyle; }
			if (img.parentElement.href) { imgStyle = "cursor:hand;" + imgStyle; }
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" ;
			img.outerHTML = strNewHTML;
			i -= 1;
		}
	}
}*/


// Fonction prototype $ allégée
var $ = function(idElt) {
	if (document.getElementById) {
		return document.getElementById(idElt);
	} else if (document.all) { // IE < 6
		return document.all[idElt];
	} else {
		return null;
	}
}

// Ouverture d'une fenetre Popup
var popWin = null;
function popFenetre(loc, w, h) {
	lpos	= (screen.width && screen.width > 800) ? (screen.width-w)/2 : 0;
	tpos	= (screen.height && screen.height > 640) ? (screen.height-h)/2 : 0;
	sets	='height='+h+',width='+w+',top='+tpos+',left='+lpos+',menubar=0,location=0,scrollbars=1,resizable=1';
	popWin	= window.open(loc, "popwin", sets);
	if (popWin.window.focus) { popWin.window.focus(); }
	return false;
}

