function fullWindow(url) { 
    var str = "left=0,screenX=0,top=0,screenY=0,scrollbars=yes";
    if (window.screen) {
      var ah = screen.availHeight - 30;
      var aw = screen.availWidth - 10;
      str += ",height=" + ah;
      str += ",innerHeight=" + ah;
      str += ",width=" + aw;
      str += ",innerWidth=" + aw;
    }
    win=window.open(url, "w", str);
} 



function popupcentree(page,largeur,hauteur,options)
{
var top=(screen.height-hauteur)/2;
var left=(screen.width-largeur)/2;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}


function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
    if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display = 'block';
      }else{
        sousMenu.display = 'none';
      }
    }
  }
}


function setHover(){
  LI = document.getElementById('menu').getElementsByTagName('li');
  nLI = LI.length;
  for(i=0; i < nLI; i++){
    LI[i].onmouseover = function(){
      hover(this);
    }
    LI[i].onmouseout = function(){
      hover(this);
    }
  }
}

function loadinparent(url, closeSelf){
	self.opener.location = url;
	if(closeSelf) self.close();
	}
    
    
    function dp(price) 
{
   string = "" + price;
   number = string.length - string.indexOf('.');
   if (string.indexOf('.') == -1)
      return string + '';
   if (number == 1)
      return string + '00';
   if (number == 2)
      return string + '0';
   if (number > 3)
      return string.substring(0,string.length-number+3);
return string;
}
function calculate()
{
document.form_dates.total1.value = dp((document.form_dates.prix.value)*(document.form_dates.quantite.value))
/*document.form_dates.total2.value = dp((document.form_dates.price2.value)*(document.form_dates.quantity2.value))
document.form_dates.total3.value = dp((document.form_dates.price3.value)*(document.form_dates.quantity3.value))
document.form_dates.subtotal.value = dp(eval(document.form_dates.total1.value) + eval(document.form_dates.total2.value) + eval(document.form_dates.total3.value))
document.form_dates.tax.value = dp((document.form_dates.subtotal.value)*0.206)
document.form_dates.total.value = dp((document.form_dates.subtotal.value)*1.206)
*/
}


function form_resa(thisForm)
{
    if(thisForm.dates.value == '')
    {
         alert('Faites un choix de dates');
         thisForm.dates.focus();
         return false;
    }
    if(thisForm.quantite.value=='1')
	{
		if(thisForm.nom1.value == '')
		{
			 alert('Saisissez le nom de la personne inscrite');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='2')
	{
		if(thisForm.nom2.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 2');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='3')
	{
		if(thisForm.nom3.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 3');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='4')
	{
		if(thisForm.nom4.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 4');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='5')
	{
		if(thisForm.nom5.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 5');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='6')
	{
		if(thisForm.nom6.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 6');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='7')
	{
		if(thisForm.nom7.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 7');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='8')
	{
		if(thisForm.nom8.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 8');
			 thisForm.nom1.focus();
			 return false;
		}
	}

    if(thisForm.quantite.value=='9')
	{
		if(thisForm.nom9.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 9');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    if(thisForm.quantite.value=='10')
	{
		if(thisForm.nom10.value == '')
		{
			 alert('Saisissez le nom des personnes inscrites : 10');
			 thisForm.nom1.focus();
			 return false;
		}
	}
    return true;
}
//Fin de la fonction



function OuvrirPopup(page,nom,option) {
       window.open(page,nom,option);
    }