
// fonction de gestion des pop-up
function pop(adresse) {
	var Nom_Browser = navigator.appName; 
   	var Version_Browser = navigator.appVersion; 
   	if (Nom_Browser ==  'Microsoft Internet Explorer' && !window.opera) {
		window.open(adresse, 'popup', 'height=500,width=460,status=no,toolbar=no,menubar=no,location=no,resizable=yes,left=50,top=50')
	} else {
		window.open(adresse, 'popup', 'height=520,width=490,status=no,toolbar=no,menubar=no,location=no,resizable=yes,left=50,top=50')	
	}
}

function showWidthInput(monCalque, action){

	if (action) {
		document.getElementById(monCalque).style.display = "block";
		document.getElementById(monCalque).style.visibility = "visible";				
	} else {
		document.getElementById(monCalque).style.display = "none";		
		document.getElementById(monCalque).style.visibility = "hidden";		
	}
	
}

function showCalque(calqueA, statusA, calqueB, statusB) {
	if (statusA) {
		document.getElementById(calqueA).style.display = "block";
		document.getElementById(calqueA).style.visibility = "visible";		
	} else {
		document.getElementById(calqueA).style.display = "none";		
		document.getElementById(calqueA).style.visibility = "hidden";		
	}
	if (statusB) {
		document.getElementById(calqueB).style.display = "block";
		document.getElementById(calqueB).style.visibility = "visible";		
	} else {
		document.getElementById(calqueB).style.display = "none";		
		document.getElementById(calqueB).style.visibility = "hidden";		
	}
}

function showLexique(monCalque, action) {
	if (action == 'show') {
		document.getElementById(monCalque).style.display = "block";
		document.getElementById(monCalque).style.visibility = "visible";				
	} else {
		document.getElementById(monCalque).style.display = "none";		
		document.getElementById(monCalque).style.visibility = "hidden";		
	}
}
function checkConfirm(url) {
       var a = false;
       a= confirm ('Voulez-vous supprimer cet élément ?');
       if (a) {
           document.location.href = url;
       }
}
function checkPurge(url) {
       var a = false;
       a= confirm ('Cette opération est irréversible. Souhaitez-vous continuer ?');
       if (a) {
           document.location.href = url;
       }
}
/*function checkFields(formName) {
         var status;
         var alerteMsg;
         alerteMsg = "";
         if (formName == "formulaire") {         			
              if (document.formulaire.Nom.value == '') {
                      alerteMsg += "le champ Nom est obligatoire.\n";
                      document.formulaire.Nom.focus();
              } else if (document.formulaire.Prenom.value == '') {
                      alerteMsg += "le champ Prénom est obligatoire.\n";
                      document.formulaire.Prenom.focus();
              } else if (document.formulaire.Code_postal.value == '') {
                      alerteMsg += "le champ Code Postal est obligatoire.\n";
                      document.formulaire.Code_postal.focus();
              } else if (document.formulaire.Localite.value == '') {
                      alerteMsg += "le champ Localité est obligatoire.\n";
                      document.formulaire.Localite.focus();
              } else if (document.formulaire.Email.value == '') {
                      alerteMsg += "le champ E-mail est obligatoire.\n";
                      document.formulaire.Email.focus();
              } else if (document.formulaire.Code_postal.value.length < 5) {
                      alerteMsg += "le code Postal doit comporter 5 chiffres.\n";
                      document.formulaire.Code_postal.focus();
              } else if (document.formulaire.Telephone.value.length < 10) {
                      alerteMsg += "le N° de téléphone doit comporter 10 chiffres.\n";
                      document.formulaire.Telephone.focus();
              } else {
                       document.formulaire.submit();
              }
         } 
         if (alerteMsg != "") alert(alerteMsg);
}*/
function change(vignId, vignPhoto, bigId, bigPhoto) {
	vignId = eval("document."+vignId);	
	bigId = eval("document."+bigId);	
	bigId.src = bigPhoto;
	vignId.src = vignPhoto;
}

