function mainPopupParameters(name,url,focus,width,height,scrollbars,toolbar,titlebar,status,resizable,menubar,location,channelmode,directories,fullscreen){
	
	var options = "";
	
	if(width > 0){ options += "width=" + width + "," };
	if(height > 0){ options += "height=" + height + "," };
	if(scrollbars){ options += "scrollbars=1," } else { options += "scrollbars=0," };
	if(toolbar){ options += "toolbar=1," } else { options += "toolbar=0," };
	if(titlebar){ options += "titlebar=1," } else { options += "titlebar=0," };
	if(status){ options += "status=1," } else { options += "status=0," };
	if(resizable){ options += "resizable=1," } else { options += "resizable=0," };
	if(menubar){ options += "menubar=1," } else { options += "menubar=0," };
	if(location){ options += "location=1," } else { options += "location=0," };
	if(channelmode){ options += "channelmode=1," } else { options += "channelmode=0," };
	if(directories){ options += "directories=1," } else { options += "directories=0," };
	if(fullscreen){ options += "fullscreen=1," } else { options += "fullscreen=0," };

	popup = window.open(url, name, options);

	if(focus){popup.focus()};

}

function montre(id,nb,couleur)
{
    for(i=1;i<=6;++i) {

	    var menu = document.getElementById(id + i);
	    var smenu = document.getElementById("ss" + id + i);

	        if (i == nb) 
	        {
		        if (menu) {if(id == "menuleft") {menu.style.backgroundPosition='0px -25px'} else if(couleur) {menu.style.background=couleur}}
	            if (smenu) {smenu.style.display='block'}
	        }

	        else
	        {
	            if (menu) {if(id == "menuleft") {menu.style.backgroundPosition='0px 0px'} else {menu.style.backgroundColor=''}}
	            if (smenu) {smenu.style.display='none'}
	        }
	}
}

Future = new Date(2011, 6, 6, 9, 00);
function counter() {
Maintenant = new Date;
TempFuture = Future.getTime();
TempMaintenant = Maintenant.getTime();
DiffSec = Math.floor((TempFuture-TempMaintenant)/1000);
DiffMin = Math.floor(DiffSec/60);
Diffheure = Math.floor(DiffMin/60);
DiffJour = Math.floor(Diffheure/24);
while (DiffMin>=60)
		{
		DiffMin = DiffMin-60;
		}
while (Diffheure>=24)
		{
		Diffheure = Diffheure-24;
		}
while (DiffSec>=60)
		{
		DiffSec = DiffSec-60;
		}
if (TempFuture > TempMaintenant) {

if (document.getElementById("rebours_time")) {
document.getElementById("rebours_time").innerHTML = '<div style="background:url(/images/qwartz-jour.png) no-repeat top right; width:89px; margin-left:auto; margin-right:auto"><div style="width:24px; height:22px; text-align:right">' + getNumbers(DiffJour) + '</div></div><div style="width:98px; margin-left:auto; margin-right:auto; margin-top:5px"><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(Diffheure) + '</div><div style="float:left; padding:4px; padding-top:2px">:</div><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(DiffMin) + '</div><div style="float:left; padding:4px; padding-top:2px">:</div><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(DiffSec) + '</div></div><div style="clear:both"></div>'}
else {
document.getElementById("rebours_time_en").innerHTML = '<div style="background:url(/images/qwartz-day.png) no-repeat top right; width:81px; margin-left:auto; margin-right:auto"><div style="width:24px; height:22px; text-align:right">' + getNumbers(DiffJour) + '</div></div><div style="width:98px; margin-left:auto; margin-right:auto; margin-top:5px"><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(Diffheure) + '</div><div style="float:left; padding:4px; padding-top:2px">:</div><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(DiffMin) + '</div><div style="float:left; padding:4px; padding-top:2px">:</div><div style="float:left; width:24px; height:22px; text-align:right">' + getNumbers(DiffSec) + '</div></div><div style="clear:both"></div>'}
}
}
window.setInterval("counter()",1000);

function getNumbers(Data) {
var img = "";
if (Data < 10) {img = '<img src="/images/qwartz0.png" style="border:none">';}

for (i=0; i < Data.toString().length; i++)
	{
		img = img + '<img src="/images/qwartz' + Data.toString().charAt(i) + '.png" style="border:none">';
	}
return img;
}
