function openup(path,largeur,hauteur)
{
hauteur = hauteur + 64;
var dessus = (screen.height-hauteur)/2;
var gauche = (screen.width-largeur)/2;
var txt = "top="+dessus+",left="+gauche+",width="+largeur+",height="+hauteur+"";
photoWin = window.open( "", "photo",txt);

photoWin.document.write('<html><head></head><body oncontextmenu=\"return false;\" style=\"background: url(\'/rose_background.jpg\');\"><p style="text-align: center;"><img src="'+ path +'" style="margin-top: 0px; margin-left: 0px;"/></p>');	
		photoWin.document.write('<p style="text-align: center; font-family: Verdana, Arial;"><a href="javascript:window.close()">-- Fermer la fen&ecirc;tre --</a></p></body></html>');
photoWin.document.close();	
}

function preload_photos()
{
	var lesimages = new Array();
	for(i = 2; i < 29; i++)
	{
		lesimages[i] = new Image;
		lesimages[i].src = "/photos/photo"+i+".png";
	}
}

  function openp(){

       var hide = document.all.disable;
       for(i=0; i<=hide.length; i++)
            hide[i].style.display ='none';
}

  function closep(){
     window.location.reload();
}


function redim(e)
{
// 	if (window.innerWidth) {
// 	w = window.innerWidth;
// 	h = window.innerHeight;
// 	}
// 	else if (document.body.clientWidth) {
// 	w = document.body.clientWidth;
// 	h = document.body.clientHeight;
// 	}
	w = parseInt(document.getElementById("milieu3").offsetWidth);
	h = parseInt(document.getElementById("milieu3").offsetHeight);
	document.getElementById("bg").style.width = w + "px";
	document.getElementById("bg").style.height = h + "px";
// 		w = window.innerWidth;
// 		h = window.innerHeight;
	if((w/h) >= (4./3.))
	{
// 			alert("trop large");
		document.getElementById("imgbg").style.width = w + "px";
		document.getElementById("imgbg").style.height = Math.round(0.75*w) + "px";
	}
	else
	{
		document.getElementById("imgbg").style.width = Math.round((4./3.)*h) + "px";
		document.getElementById("imgbg").style.height = h + "px";
		var taille = Math.round((Math.round((4./3.)*h) - (w))/2);
		document.getElementById("imgbg").style.marginLeft = "-" + taille +"px";
// 			alert("trop etroit");
	}
}

function redim_body3(e)
{
	redim_body(e);
	redim_body2(e);
}

function redim_body(e)
{
// 	if (window.innerWidth) {
// 	w = window.innerWidth;
// 	h = window.innerHeight;
// 	}
// 	else if (document.body.clientWidth) {
// 	w = document.body.clientWidth;
// 	h = document.body.clientHeight;
// 	}
	if (typeof window.innerWidth != 'undefined')
 	{
      	w = window.innerWidth;
      	h = window.innerHeight;
 	}
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 	else if (typeof document.documentElement != 'undefined'
     	&& typeof document.documentElement.clientWidth !=
     	'undefined' && document.documentElement.clientWidth != 0)
 	{
       	w = document.documentElement.clientWidth;
       	h = document.documentElement.clientHeight;
 	}

// 	w = parseInt(document.body.offsetWidth);
// 	h = parseInt(document.body.offsetHeight);

	h = document.body.offsetHeight + 20;
	document.getElementById("bg").style.width = w + "px";
	document.getElementById("bg").style.height = h + "px";
// 		w = window.innerWidth;
// 		h = window.innerHeight;
	if((w/h) >= (4./3.))
	{
// 			alert("trop large");
		document.getElementById("imgbg").style.width = w + "px";
		document.getElementById("imgbg").style.height = Math.round(0.75*w) + "px";
	}
	else
	{
		document.getElementById("imgbg").style.width = Math.round((4./3.)*h) + "px";
		document.getElementById("imgbg").style.height = h + "px";
		var taille = Math.round((Math.round((4./3.)*h) - (w))/2);
		document.getElementById("imgbg").style.marginLeft = "-" + taille +"px";
// 			alert("trop etroit");
	}
}

function redim_body2(e)
{
// 	if (window.innerWidth) {
// 	w = window.innerWidth;
// 	h = window.innerHeight;
// 	}
// 	else if (document.body.clientWidth) {
// 	w = document.body.clientWidth;
// 	h = document.body.clientHeight;
// 	}
	if (typeof window.innerWidth != 'undefined')
 	{
      	w = window.innerWidth;
      	h = window.innerHeight;
 	}
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 	else if (typeof document.documentElement != 'undefined'
     	&& typeof document.documentElement.clientWidth !=
     	'undefined' && document.documentElement.clientWidth != 0)
 	{
       	w = document.documentElement.clientWidth;
       	h = document.documentElement.clientHeight;
 	}

// 	w = parseInt(document.body.offsetWidth);
// 	h = parseInt(document.body.offsetHeight);

	document.getElementById("bg2").style.width = w + "px";
	document.getElementById("bg2").style.height = h + "px";
// 		w = window.innerWidth;
// 		h = window.innerHeight;
	if((w/h) >= (4./3.))
	{
// 			alert("trop large");
		document.getElementById("imgbg2").style.width = w + "px";
		document.getElementById("imgbg2").style.height = Math.round(0.75*w) + "px";
	}
	else
	{
		document.getElementById("imgbg2").style.width = Math.round((4./3.)*h) + "px";
		document.getElementById("imgbg2").style.height = h + "px";
		var taille = Math.round((Math.round((4./3.)*h) - (w))/2);
		document.getElementById("imgbg2").style.marginLeft = "-" + taille +"px";
// 			alert("trop etroit");
	}
}

function redim2(e)
{
// 	if (window.innerWidth) {
// 	w = window.innerWidth;
// 	h = window.innerHeight;
// 	}
// 	else if (document.body.clientWidth) {
// 	w = document.body.clientWidth;
// 	h = document.body.clientHeight;
// 	}
	w = parseInt(document.getElementById("milieu3").offsetWidth);
	h = parseInt(document.getElementById("milieu3").offsetHeight);
	document.getElementById("bg").style.width = w + "px";
	document.getElementById("bg").style.height = h + "px";
// 		w = window.innerWidth;
// 		h = window.innerHeight;
	if((w/h) >= (3./4.))
	{
// 			alert("trop large");
		document.getElementById("imgbg").style.width = w + "px";
		document.getElementById("imgbg").style.height = Math.round(4./3.*w) + "px";
	}
	else
	{
		document.getElementById("imgbg").style.width = Math.round((0.75)*h) + "px";
		document.getElementById("imgbg").style.height = h + "px";
// 			alert("trop etroit");
	}
}

// function suppr(param1)
// {
// 	var retour = confirm("Vous allez supprimer cette chansons. Cliquez sur OK pour confirmer");
// 	if(retour)
// 		document.location.href = param1;
// }
