function fenetreCent(url,nom,largeur,hauteur,options) {
		var haut=(screen.height-hauteur)/2;
		var Gauche=(screen.width-largeur)/2;
		fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}

	var compteur=0;

function afficherDJ(){
		if (compteur==1)
		{
			heures = today.getHours(); 
			if (heures < 10)
			{
				heures="0"+heures;
			}
		
			minutes = today.getMinutes();
			if (minutes < 10)
			{
				minutes="0"+minutes;
			}
			secondes = today.getSeconds();
			if (secondes < 10)
			{
				secondes="0"+secondes;
			}
			date = jour[today.getDay()]+" "+today.getDate() +" "+mois[today.getMonth()]+" "+today.getFullYear()+" - "+heures+":"+minutes+":"+secondes;
			newtexte2="<center><font color='#999900'>"+date+"</font></center>";
			document.getElementById('dateQVG').innerHTML=newtexte2;
		}
}

function advclock() {
		c0 = setTimeout( "advclock()", 1000 );
		today.setTime(today.getTime()+1000);
		afficherDJ();
}

	var today = new Date();
	c0 = setTimeout( "advclock()", 1000 );

	var jour = new Array();
	jour[0] = "Dimanche";
	jour[1] = "Lundi";
	jour[2] = "Mardi";
	jour[3] = "Mercredi";
	jour[4] = "Jeudi";
	jour[5] = "Vendredi";
	jour[6] = "Samedi";

	var mois = new Array();
	mois[0] = "Janvier";
	mois[1] = "F&eacute;vrier";
	mois[2] = "Mars";
	mois[3] = "Avril";
	mois[4] = "Mai";
	mois[5] = "Juin";
	mois[6] = "Juillet";
	mois[7] = "Ao&ucirc;t";
	mois[8] = "Septembre";
	mois[9] = "Octobre";
	mois[10] = "Novembre";
	mois[11] = "D&eacute;cembre";

function dateQVG(){
		compteur++;
		if (compteur!=2){afficherDJ();}
		if (compteur==2){newtexte="<center><font color='#000000'><b>40 annonces menent à la zone de jeu</b></font></center>";}
		if (compteur==2) document.getElementById('dateQVG').innerHTML=newtexte;
		c1 = setTimeout("dateQVG()", 4000);
}

function fenetreCentIMG(chemin, nom, largeur, hauteur, options) {
	   	i1 = new Image;
    	i1.src = chemin;
    	html = '<HTML><HEAD><TITLE> -> Michel Gregeois alias GREMI -> Image News</TITLE></HEAD><BODY BGCOLOR=#000000 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><A HREF="javascript:close();" title="Cliquez pour fermer la fenêtre"><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+20,document.imageTest.height+83)"></A><br><b><font color=#FFFFFF>Cliquer sur l\'image pour fermer</font></b></CENTER></BODY></HTML>';

		var haut=(screen.height-hauteur)/2;
		var Gauche=(screen.width-largeur)/2;
		fencentIMG=window.open('',nom,'top='+haut+',left='+Gauche+',width='+largeur+',height='+hauteur+','+options);
    	fencentIMG.document.open();
   	 	fencentIMG.document.write(html);
   		fencentIMG.document.close();
}

function afficheMaxi(chemin)
{
   	i1 = new Image;
    i1.src = chemin;
    html = '<HTML><HEAD><TITLE> -> Michel Gregeois alias GREMI -> Image News</TITLE></HEAD><BODY BGCOLOR=#000000 LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><A HREF="javascript:close();" title="Cliquez pour fermer la fenêtre"><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+20,document.imageTest.height+83)"></A><br><b><font color=#FFFFFF>Cliquer sur l\'image pour fermer</font></b></CENTER></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
    popupImage.document.open();
    popupImage.document.write(html);
    popupImage.document.close();
}

function OuvrirPopup(page,nom,option) {
    window.open(page,nom,option);
}




function setEltDisplay(id, disp) 
{
	if (!document.getElementById)return false;
	var elt = document.getElementById(id);
	if (elt)elt.style.display = disp;
	return false;
}
function showElt(id) {setEltDisplay(id, "");return false;}
function hideElt(id) {setEltDisplay(id, "none");return false;}

function open_uv_edit(nom,sect_id,sel_index,sect_type,do_adv) 
{
	var span_id = 'uv_'+sect_id;
	var target=document.getElementById(span_id);
	if (target){
		deroule_uv_edit(nom,target,do_adv?2:0);
		var incr=sect_type=="q"?1:0;
	}return false;
}
function deroule_uv_edit(nom,elt, do_adv) 
{
	var open_link=nom+' plus';
	var close_link=nom+' moins';
	var i = elt.id.indexOf("_");
	if (i == -1)return false;
	var sect_id = elt.id.substring(i+1);
	var id = "module_" + sect_id;
	if (elt.innerHTML == open_link) {
		showElt(id);
		elt.innerHTML = close_link;
	} else {
		hideElt(id);
		elt.innerHTML = open_link;
	}if (do_adv==2) {
		var adv_id="uv_a"+sect_id;
		var adv_elt=document.getElementById(adv_id);
		deroule_uv_edit(adv_elt,1);
	}if (elt.blur) elt.blur();
	return false;
}

