sfHover = function() {
	var oNav = document.getElementById("nav");
	if (!oNav) return;
	var sfEls = oNav.getElementsByTagName("LI");

	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}

if (window.attachEvent) { 
	window.attachEvent("onload", sfHover); 
}

function make_links() {
	var liens = document.getElementsByTagName('a');
	for (var i = 0 ; i < liens.length ; ++i)  {
		if (liens[i].className == 'lien_ext')  {
			//liens[i].title = 'S\'ouvre dans une nouvelle fenêtre';
			liens[i].onclick = function()  {
				window.open(this.href);
				return false;
			};
		}
		else if (liens[i].className == 'lien_pop')  {
			liens[i].onclick = function()  {
				window.open(this.href, '', 'width=420, height=600, resizable=yes, scrollbars=yes');
				return false;
			};
		}
		else if (liens[i].className == 'curMonth')  {
			var tmp = liens[i].href.split("/");
			var file = tmp[tmp.length-1];
			if (file == "janvier.html") {
				var newaddr = "";
				newaddr = liens[i].href.replace(file, getCurMon() + ".html");
				liens[i].href = newaddr;
			}
		}
	}
}

function getCurMon() {
	maintenant = new Date();
	moisactuel = maintenant.getMonth();
	var mois = new Array("janvier","fevrier","mars","avril","mai","juin","juillet","aout","septembre","octobre","novembre","decembre");
	return mois[moisactuel];
}

function reloadPage() {
	dt = new Date;
	// url = window.location.protocol + '//' + window.location.host + window.location.pathname; // + '?time='+dt.getTime();
	// window.location = url;
	window.location = window.location;
}

window.onload = function () {
	make_links();
}