finFonct=0;

function modif(){
	nb=document.formulaire.selec.length;
	//for (i=0;i<nb;i++) if (document.formulaire.selec[i].checked
	temp='';
	nnb=0;
	for (i=0;i<nb;i++){
		if (document.formulaire.selec[i].checked){
			temp+="&modif"+nnb+"="+document.formulaire.selec[i].value;
			nnb++;
		}		
	}
	if (nnb>0){
		document.formulaire.action="modif.php?current=0&nbmodif="+nnb+temp;
		document.formulaire.submit();
	}
	else alert("Vous devez sélectionner au moins 1 article !");
}

function supp(){
	nb=document.formulaire.selec.length;
	//alert(nb);
	//for (i=0;i<nb;i++) if (document.formulaire.selec[i].checked
	temp='';
	nnb=0;
	for (i=0;i<nb;i++){
		if (document.formulaire.selec[i].checked){
			temp+="&modif"+nnb+"="+document.formulaire.selec[i].value;
			nnb++;
			//alert(nnb);
		}		
	}
	if (nnb>0){
		document.formulaire.action="del.php?current=0&nbmodif="+nnb+temp;
		document.formulaire.submit();
	}
	else alert("Vous devez sélectionner au moins 1 article !");
}

var fix=-1;
var old=-1;

var Inav1_0=new Image(111,32);Inav1_0.src="images/top/domaine_0.gif";
var Inav1_1=new Image(111,32);Inav1_1.src="images/top/domaine_1.gif";
var Inav1_2=new Image(111,32);Inav1_2.src="images/top/domaine_2.gif";
var Inav2_0=new Image(71,32);Inav2_0.src="images/top/vin_0.gif";
var Inav2_1=new Image(71,32);Inav2_1.src="images/top/vin_1.gif";
var Inav2_2=new Image(71,32);Inav2_2.src="images/top/vin_2.gif";
var Inav3_0=new Image(133,32);Inav3_0.src="images/top/distinction_0.gif";
var Inav3_1=new Image(133,32);Inav3_1.src="images/top/distinction_1.gif";
var Inav3_2=new Image(133,32);Inav3_2.src="images/top/distinction_2.gif";
var Inav4_0=new Image(108,32);Inav4_0.src="images/top/critique_0.gif";
var Inav4_1=new Image(108,32);Inav4_1.src="images/top/critique_1.gif";
var Inav4_2=new Image(108,32);Inav4_2.src="images/top/critique_2.gif";
var Inav5_0=new Image(162,32);Inav5_0.src="images/top/fiche_0.gif";
var Inav5_1=new Image(162,32);Inav5_1.src="images/top/fiche_1.gif";
var Inav5_2=new Image(162,32);Inav5_2.src="images/top/fiche_2.gif";
var Inav6_0=new Image(132,32);Inav6_0.src="images/top/commande_0.gif";
var Inav6_1=new Image(132,32);Inav6_1.src="images/top/commande_1.gif";
var Inav6_2=new Image(132,32);Inav6_2.src="images/top/commande_2.gif";

var Inav7_0=new Image(99,28);Inav7_0.src="images/home/enter_0.gif";
var Inav7_1=new Image(99,28);Inav7_1.src="images/home/enter_1.gif";

var Inav8_0=new Image(71,14);Inav8_0.src="images/top/contact_0.gif";
var Inav8_1=new Image(71,14);Inav8_1.src="images/top/contact_1.gif";

function swapImageNav(kel,etat){
	if (kel!=fix || etat==2){
		document.images['nav'+kel].src=eval('Inav'+kel+'_'+etat+'.src');
	}
}

function fixe(kel){
	old=fix;
	fix=kel;
	if (old!=-1) swapImageNav(old,0);
	swapImageNav(kel,2);
}
/************** generation popup *******************/
function popGene(kel){
	newPop=window.open('','popup','width=528,height=528,left=0,top=0');
	chaine='<html><head><title>Ch&acirc;teau Roc de Boisseaux</title></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#661E2C" onload="self.focus()"><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/popup/chg.gif" width="14" height="14"></td><td background="../images/popup/h.gif"><img src="../images/popup/h.gif" width="4" height="14"></td><td><img src="../images/popup/chd.gif" width="14" height="14"></td></tr><tr><td background="../images/popup/g.gif">&nbsp;</td><td width="500" height="500" background="../images/popup/chargement.gif"><a href="javascript:self.close();"><img src="../images/popup/'+kel+'_gd.jpg" width="500" height="500" border="0"></a></td><td background="../images/popup/d.gif">&nbsp;</td></tr><tr><td><img src="../images/popup/cbg.gif" width="14" height="14"></td><td background="../images/popup/b.gif"><img src="../images/popup/b.gif" width="4" height="14"></td><td><img src="../images/popup/cbd.gif" width="14" height="14"></td></tr></table></body></html>';
	newPop.document.open();
	newPop.document.write(chaine);
	newPop.document.close();
}
/************* ouverture popup*********************/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/************ roll over **********/
function swapImage(kel,etat){
	obj=document.images[kel];
	finObj=obj.src.substring(obj.src.length-4,obj.src.length);
	debObj=obj.src.substring(0,obj.src.length-5);
	obj.src=''+debObj+etat+finObj;
}
finFonct=1;