//-Javascript appelant la popup ZOOM de l'image
function Zoom(ID,WidthImg,HeightImg)
{
   var width = ((WidthImg + 35) > screen.width) ? screen.width - 35: WidthImg + 35;
   var height = ((HeightImg + 60) > screen.height) ? screen.height - 60: HeightImg + 60;

   open("zoom.asp?ID=" + ID, "", "toolbar=0,location=0,directories=0,scrollbars=1,resizable=1, status=0,menubar=0,width=" + width + ",height=" + height +",left=5,top=5");
}

function montre(object)
  {
  if (document.layers && document.layers[object])
    { 
    document.layers[object].visibility = 'visible';
    } 
  else if (document.all)
    {
    document.all[object].style.visibility = 'visible';
    document.all[object].style.zIndex = 100;
    }
  else if (document.getElementById) 
    {
    document.getElementById(object).style.visibility = 'visible';
    document.getElementById(object).style.zIndex = 100; 
    } 
  }

function cache(object)
  {
  if (document.layers && document.layers[object])
    { 
    document.layers[object].visibility = 'hidden';
    } 
  else if (document.all)
    { 
    document.all[object].style.visibility = 'hidden';
    }
  else if (document.getElementById) 
    {
    document.getElementById(object).style.visibility = 'hidden'; 
    } 
  }

function go (url)
{
     document.location = url;
}

function Submit(e)
{
	if(document.form1.elements["QT" + e].value == 0)
	{
		alert("La quantité doit être supérieur à 0 !");
		return;
	}
	//document.form1.ID.value = e;
	document.form1.submit();
}

function PortPays()
{
	/*
	if(window.confirm("Nous ne livrons pour l'instant, uniquement en France Métropolitaine, pour continuer cliquez sur OK, pour recevoir un devis personnalisé, cliquez sur ANNULER."))
		{
		location.href = "commande.asp";
		}
		else{
		location.href = "contact.asp?P=panier";
		}
	*/
}
//------------------------------------

function refresh()
{
	window.parent.Douloureuse.document.location.reload();
	
}

function Recalc()
{
	document.frm.submit();
}

function Valid()
{
	bOk = false;
	for(i=0; i < document.form1.elements.length; i++)
		if(document.form1.elements[i].name.substring(0,2) == "QT")
			if (!isNaN(document.form1.elements[i].value))
			 if (parseInt(document.form1.elements[i].value) > 0)
				bOk = true
	
	if (!bOk) {
		alert("merci de saisir une quantité à commander !")
		return false
	}	
	
	document.form1.submit()
	
	return true
}

function IsValid()
{
	if (document.frm.Find.value == '')
		alert('Vous devez entrer un mot pour lancer la recherche !')
	else 
	  document.frm.submit();
	  
	return false;
}

