Event.observe(window, "load", init);
function init(e)
{
	GetTimeRest("Jday");
	$$(".input-default-value").each(function(i){i.title = i.value;Event.observe(i ,"focus", a);Event.observe(i ,"blur", b);});
	if($("btn-tool"))
		Event.observe($("btn-tool"), "click", c);
	$$(".a-blank").each(function(a){Event.observe(a,"click", d);});
	stuHover();
	$$(".current>a").each(function(a){a.style.textDecoration="underline";});
}
function a(e){if(e.target.title == e.target.value){e.target.value = "";}}
function b(e){if (e.target.value == ""){e.target.value = e.target.title;}}
function c(e)
{
	var height = $("box-tool").getStyle("height").sub("px","");
	var value = height==0?"180px":"0px";
	var valuep = height==0?"10px":"0px";
	if(height==0)
		this.addClassName("open");
	else
		this.removeClassName("open");
	M4Tween.create("box-tool", .5,{"height":value, "paddingBottom":valuep});
	Event.stop(e);
}
function d(e){window.open(e.target.href, "_blank");Event.stop(e);}
function GetTimeRest(element)
{
	var jDay = new Date(2010, 2, 17);
	var currentDay = new Date();
	
	var duree = Math.floor((jDay - currentDay)/(1000 * 60 * 60 * 24));
	if (duree > 3)
		document.getElementById(element).innerHTML = "<span>J -"+duree+"</span>";
}
function stuHover()
{
	if(!document.styleSheets||!document.styleSheets[0].rules)
		return;
	var cssRule;
	var newSelector;
	for (var i = 0; i < document.styleSheets.length; i++) {
		for (var x = 0; x < document.styleSheets[i].rules.length; x++) {
			cssRule = document.styleSheets[i].rules[x];
			if (cssRule.selectorText.indexOf("LI:hover") != -1) {
				newSelector = cssRule.selectorText.replace(/li:hover/gi, "li.iehover");
				document.styleSheets[i].addRule(newSelector, cssRule.style.cssText);
			}
		}
	}
	var getElm = document.getElementsByClassName("container-menu")[0].getElementsByTagName("LI");
	for (var i=0; i<getElm.length; i++)
	{
		getElm[i].onmouseover=function() {
			this.className+=" iehover";
		}
		getElm[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
/**
* Fonction utilisée pour ajouter des bandeaux d'annonces publicitaires dans le site.
* Les bandeaux sont créées par le client depuis le site http://smartadserver.com
*/
sas_tmstp=Math.round(Math.random()*10000000000);sas_masterflag=1;
function SmartAdServer(sas_pageid, sas_formatid, sas_target){if (sas_masterflag == 1) {sas_masterflag = 0;sas_master = 'M';}else{sas_master = 'S';};document.write('<scr' + 'ipt SRC="http://www2.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/' + sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></scr'+'ipt>');}