<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function Impression(){
  window.print();
//  setTimeout('window.close()',2000);
}

function rec(list,langue) {
  self.location.href = "espritvins.php?rub=5&LangueSite="+langue+"&id_appel=" + list.options[list.selectedIndex].value
}

function rec2(list,langue) {
  self.location.href = "fichevin.php?LangueSite="+langue+"&id=" + list.options[list.selectedIndex].value
}
function recpays(list,langue) {
  self.location.href = "distributeurs.php?LangueSite="+langue+"&id_pays=" + list.options[list.selectedIndex].value
}

function recaxe(list,langue) {
  self.location.href = "axesens.php?rub=1&LangueSite="+langue+"&idappel=" + list.options[list.selectedIndex].value
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function envoyer(page)
{
	var champ1=form1.vins1;
	   var champ2=form1.vins2;
	   var champ3=page;
	   
	   if(champ1.value=='-1' &&  champ2.value!='-1' && champ3=='fichevin.php?sub=1')
            {
            alert("Veuillez cliquez sur le bon bouton");
            return false;
            }
			
		if(champ2.value=='-1' &&  champ1.value!='-1' && champ3=='fichevin.php?sub=2' )
         {
            alert("Veuillez cliquez sur le bon bouton");
            return false;
          }
			
       if(champ1.value=='-1' && champ2.value=='-1')
            {
            alert("Veuillez selectionner un vin");
            return false;
            }
	
	
	document.form1.action=page;
	document.form1.submit();
}
	
function envoyeraxe(page)
{
	var champ1=liste.listevin;
	   
	  
       if(champ1.value=='')
            {
            alert("Veuillez selectionner un vin");
            return false;
            }
	
	document.liste.action=page;
	document.liste.submit();
}

function verifForm(form)
{
		var champ1=form.vins1;
	   var champ2=form.vins2;
	   var champ3=form.submit1;
	  // var champ4=form.submit2;
	   alert(champ3);
	 // alert(champ4);
	   if(champ1.value=='-1' &&  champ2.value!='-1' && champ3.value=='sub1')
            {
            alert("Veuillez cliquez sur le bon bouton (1)");
			//alert(champ3);
            return;
            }
			
		/*if(champ2.value=='-1' &&  champ1.value!='-1' && champ4.value=='sub2' )
         {
            alert("Veuillez cliquez sur le bon bouton (2)");
			//alert(champ4);
            return;
          }*/
			
       if(champ1.value=='-1' && champ2.value=='-1')
            {
            alert("Veuillez selectionner un vin");
            return;
            }
			
			form.submit();
			
}	

function submitform(form)
{
	form.submit();
}	

function submitformliste()
{	
		liste.submit();
}
function verifaxe()
{
			var champ1=liste.listevin;
			if(champ1.value=='')
            {
            alert("Veuillez selectionner un vin");
            return false;
            }
}	

function visible() {
	if (etatVisible) {
	if (is.ie) {
		document.all["calquePays"].style.visibility = "visible" ;
		document.all["calquePays"].style.backgroundColor = "#FFD63D" ;
	}
	if (is.ns) {
		document.layers["calquePays"].visibility = "show" ;
		document.layers["calquePays"].document.bgColor = "#FFD63D" ;
	}
	}
}

function getMouseXY(e) {
	decalageX = -largeurCalque/2 ;
	decalageY = 30 ;
	if (is.ie && etatVisible) {
		x = event.clientX + document.body.scrollLeft ;
		y = event.clientY + document.body.scrollTop ;
		if (x-decalageX>largeurFenetre) x = largeurFenetre+decalageX ;
		if (x+decalageX<0) x = -decalageX ;
		document.all["calquePays"].style.top = y+decalageY ;
		document.all["calquePays"].style.left = x+decalageX ;
	}
	if (is.ns && etatVisible) {
		x = e.pageX ;
		y = e.pageY ;
		document.calquePays.top = y+decalageY ;
		document.calquePays.left = x+decalageX ;
	}
	visible() ;	
}
function majCalque(nom) {
	if (is.ns) {
		document.calquePays.width=largeurCalque ;
		document.layers["calquePays"].document.open() ;
		nom = "<font face=\"Arial\" size=2 color='black'>&nbsp;" + nom + "&nbsp;</font>" ;
		document.layers["calquePays"].document.write(nom) ;
		document.layers["calquePays"].document.close() ;
	} else {
		document.all["calquePays"].style.width = largeurCalque ;
		document.all["calquePays"].innerHTML = "<center><font face=\"Arial\" size=2 color='black'>&nbsp;" + nom + "&nbsp;</font></center>" ;
	}
	etatVisible = true ;
}

function majCalqueCacher() {
	if (is.ie) document.all["calquePays"].style.visibility = "hidden" ;
	if (is.ns) document.calquePays.visibility = "hide" ;
	etatVisible = false ;
}

function ChangeMessage(message,champ)
  {
  if(document.getElementById)
    document.getElementById(champ).innerHTML = message;
  }

function init() {
	is = new BrowserCheck();
	initialiser = true ;
}
function BrowserCheck() {
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.v = parseInt(navigator.appVersion);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ie = (this.b=="ie" && this.v>=4);
}
//-->
