// Change couleur description au survol image
function ChangeColor(){        
   document.getElementById("ColorToChange").style.color="#8EC122";
   document.getElementById("ColorToChange").style.color="#8EC122";
	}
function ReChangeColor(){        
   document.getElementById("ColorToChange").style.color="#D8D8D8";
	}

// Limiteur de caractère textarea, display des caractères restants
function limiteur(maximum,champ,indic)
{
	if (champ.value.length > maximum) champ.value = champ.value.substring(0, maximum);
	else indic.value = maximum - champ.value.length;
}

function arrondir(nombre, decimales)
{
  if (isNaN(nombre)) return "";
  if (decimales == 0)
  {
     var n = Math.round(nombre);
     return n.toString();
  }
  else if (decimales > 0)
  {
     if (document.all) var undefined; // Netscape 4 ne connaît pas la constante "undefined"
     var p10 = Math.pow(10, decimales);
     var n = Math.round(nombre * p10);
     n = n.toString();
     var point = n.length - decimales;
     if (point >= 0) n = n.substring(0, point) + "." + n.substring(point);
     else n = "0." + formater(n, decimales);
  }
  else
  {
     var p10 = Math.pow(10, -decimales);
     var n = Math.round(nombre / p10) * p10;
     n = n.toString();
  }
  if (nombre.signe_decimal == undefined) return n;
  else return n.replace(".", nombre.signe_decimal);
}

function submitDaForm(URL)
{
	document.SelectProductZoneForm.action = URL;
}

