//Préchargement des images
var img1 = new Image();
img1.src = '/include/img/fr/header_p1-on.png';
var img2 = new Image();
img2.src = '/include/img/fr/header-link_home-on.png';
var img3 = new Image();
img3.src = '/include/img/fr/menud_i1.png';
//Fin du préchargement des images
var arret =  Array();
var arret_out =  Array();
var opacity = Array();
opacity['header_p1'] = 0;
opacity['twitter_link'] = 0;
opacity['header_p8'] = 0;
opacity['header_p9'] = 0;
opacity['menud_p1'] = 0;
opacity['menud_p2'] = 0;
function switch_on(id)
{
	document.getElementById(id).src = '/include/img/menu_'+id+'-on.png';
}
function switch_out(id)
{
	document.getElementById(id).src = '/include/img/menu_'+id+'.png';
}
function switch_onh(id, deb)
{
	if(deb == 1)
	{
		arret[id] = 0;
		arret_out[id] = 1;
	}
	if(!arret[id])
	{
		opacity[id] = opacity[id]+0.04;
		document.getElementById(id).style.opacity = opacity[id];
		document.getElementById(id).style.filter = 'alpha(opacity='+opacity[id]*100+')';
		if(opacity[id] >= 1)
			arret[id] = 1;
		else
			setTimeout('switch_onh("'+id+'", 0);', 1);
	}
}
function switch_outh(id, deb)
{
	if(deb == 1)
	{
		arret[id] = 1;
		arret_out[id] = 0;
	}
	if(!arret_out[id])
	{
		opacity[id] = opacity[id]-0.04;
		document.getElementById(id).style.opacity = opacity[id];
		document.getElementById(id).style.filter = 'alpha(opacity='+opacity[id]*100+')';
		if(opacity[id] <= 0)
			arret_out[id] = 1;
		else
			setTimeout('switch_outh("'+id+'", 0);', 1);
	}
}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=570,height=800,left = 355,top = 0');");
}
