
//Visionneuse solutions emballage

//window.onload=montre;

function montre(id, lien, photo, mini) {

var d = document.getElementById(id);
var h = document.getElementById(lien);
var cf = document.getElementById(photo);
var mn = document.getElementById(mini);

	for (var i = 1; i<=12; i++) 
	{
		

		if (document.getElementById('roll_over'+i)) 
		{
			document.getElementById('roll_over'+i).style.display='none';
			//document.getElementById('cadre_photo'+i).style.display='none';
			document.getElementById('lien'+i).style.backgroundColor='#ffffff';
			for (var j = 1; j<=12; j++) 
			{
				if (document.getElementById('img'+j)) 
				{
					document.getElementById('img'+j).style.border='none';
				}
			}
			
		}
		
	}

	if (d) 
	{
		d.style.display='block';
		h.style.backgroundColor='#d1d316';
		mn.style.borderBottom='5px solid #d1d316';
		for (var i = 1; i<=12; i++) 
		{

			if (document.getElementById('cadre_photo'+i)) 
			{
				document.getElementById('cadre_photo'+i).style.display='none';
			}

		}
		if(cf)
		{
			cf.style.display='block';
		}
		
		
		
		
	}

}

/*******Validation du formulaire de contact*******************************************************************************/
function validForm(TheForm) {

 
 if (TheForm.nom.value.length < 1) {

  alert("Veuillez entrer votre nom.");

  TheForm.nom.focus();

  return false;

}
if (TheForm.societe.value.length < 1) {

    alert("Veuillez entrer le nom de votre société.");

    TheForm.societe.focus();

    return false;

}
if (TheForm.cp.value.length < 1) {

    alert("Veuillez entrer votre code postal.");

    TheForm.cp.focus();

    return false;

}
if (TheForm.ville.value.length < 1) {

    alert("Veuillez saisir le nom de votre ville.");

    TheForm.ville.focus();

    return false;

}  
  if (TheForm.tel.value.length < 1) {

  alert("Veuillez entrer votre numéro de téléphone.");

  TheForm.tel.focus();

  return false;

 }
 if (!TheForm.email.value.match('^[-_\.0-9a-zA-Z]{1,}@[-_\.0-9a-zA-Z]{1,}[\.][0-9a-zA-Z]{2,}$')) 
 {
        alert("Veuillez saisir une adresse email valide.");
	TheForm.email.focus();
	return false;
 }

}
// Correctif de l'affichage des images PNG dans IE5.5 et IE6 (transparent pour les autres navigateurs).
// V1.1 par Brice de Villeneuve, http://www.boursica.com/
// Licence : freeware, librement utilisable du moment que vous laissez ces commentaires dans votre source.
// Mettre ce script dans le head et dans les balises IMG ajouter simplement : onload='setpng(this)'
// Si l'image n'est pas visible (display:none par exemple), appeler la fonction juste après l'affichage de l'image
// dans un javascript avec, par exemple, un setpng(document.getElementById('idDeMonImage');
//Exemple utilisation : <img border=0 style='position:absolute;top:10px;left:10px' src='png.png' onload='setpng(this)'>

function setpng(img) { if(document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img) {
	imgName=img.src.toUpperCase();
	if(imgName.substring(imgName.length-3,imgName.length)=="PNG") img.outerHTML=
		"<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
		+"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
		+(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
		+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
}}
