function colorationChamps(champs,couleur){
	champs.style.backgroundColor=couleur;	
}
function confirmation(formulaire){
	var confirmer=confirm("Confirmez-vous l'opération en cours?");
	if(confirmer)
		formulaire.submit();//envoi des données pour traitement.
}
function afficherMessageChampsVide(nom){
	alert("Le champs "+ nom +" est vide!!");
}	
function agrandirImage(largeur,longueur,url){
	var image=window.open('', 'image', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+largeur+", height="+hauteur+"');
	image.document.write('<html><head><title>PopupImage</title>');
	image.document.write('<script type="text/javascript"></script>');
	//image.document.write('</head><body onload="centrerImage();">');
	image.document.write('<img src="'+ url +'" width='+largeur+' height='+longueur+'/>');
	image.document.write('</body></html>');
	image.document.close();
}
function verifAdresseMail(adresse){
	adresse = formulaire.adresse_email.value;
	var place = adresse.indexOf("@",1);//position du @
	var point = adresse.indexOf(".",place+1);//position du deuxieme point
	if ((place > -1)&&(adresse.length >2)&&(point > 1)){//verifie la bonne composition de l'adress(présence du @ et du . et taille suffisante de l'adresse
		return true;	
	}else{
		alert('Entrez une adresse e-mail valide!!');
		return(false);
	}

}
function OuvrirFenetre(url,nom,largeur,hauteur) { 
	var posx = (screen.width  -largeur)/2; // Récupération Largeur Ecran ( screen.width)
	var posy = (screen.height -hauteur)/2; // Récupération Hauteur Ecran ( screen.height)
	
	fenetre=window.open(url,nom,'toolbar=no,width='+largeur+',height='+hauteur+',left='+posx+',top='+posy+',scrollbars=no');
	
	}

function Affichegrande(cheminImage,texte,largeur,longueur)
{
var fois=0
newImage = new Image;
newImage.src = cheminImage;
html = '<HTML><HEAD><TITLE>Image</TITLE><meta http-equiv="Pragma" content="no-cache"></HEAD><BODY leftmargin=0 marginwidth=0 topmargin=0 marginheigth=0 oncontextmenu="return false"><CENTER>'+
'<a href="#" onClick="window.close()"><IMG SRC="'+cheminImage+'" width="'+largeur+'" height="'+longueur+'" BORDER=0 NAME=monImage alt="'+texte+'"border="0" > </a></CENTER></BODY></HTML>';
if (fois == 1 ) ouvrirImage.close();
var left=(screen.width - largeur)/2;
var top=(screen.height - longueur)/2;
ouvrirImage = window.open('','_blank','toolbar=0,location=0,menuBar=0,scrollbars=0,width=600,height=800,left='+left+',top='+top+'resizable=0');
ouvrirImage.document.write(html);
fois=1;
}
function AffichegrandeHorizontale(cheminImage,texte,largeur,longueur)
{
var fois=0
newImage = new Image;
newImage.src = cheminImage;
html = '<HTML><HEAD><TITLE>Image</TITLE><meta http-equiv="Pragma" content="no-cache"></HEAD><BODY leftmargin=0 marginwidth=0 topmargin=0 marginheigth=0 oncontextmenu="return false"><CENTER>'+
'<a href="#" onClick="window.close()"><IMG SRC="'+cheminImage+'" width="'+largeur+'" height="'+longueur+'" BORDER=0 NAME=monImage alt="'+texte+'"border="0" > </a></CENTER></BODY></HTML>';
if (fois == 1 ) ouvrirImage.close();
var left=(screen.width - largeur)/2;
var top=(screen.height - longueur)/2;
ouvrirImage = window.open('','_blank','toolbar=0,location=0,menuBar=0,scrollbars=0,width=800,height=600,left='+left+',top='+top+'resizable=0');
ouvrirImage.document.write(html);
fois=1;
}
// var popup = window.open('url','titre','options');L'url n'est pas obligatoire et d'ailleur je m'en suis passé ... Une foultitude de paramètres peuvent être introduit dans options dont la taille de la fenêtre, la disposition les options associées et j'en passe ...
function centrerImage(){
		
		window.resizeTo(image.width+18, images.height+26); 
		window.moveTo((screen.width - window.outerWidth)/2,(screen.height - window.outerHeight)/2); 
		window.focus();
		
}
function noClickDroit(){
	document.oncontextmenu=false;
}	
function rafraichirParent()
{
  opener.location = opener.location; 
	opener=self;self.close();
}
function changerPage(liste){
	if(liste.selectedIndex!=0)
		location.href=liste.options[liste.selectedIndex].value;
}		
function retourPage(url){

	location.href=url;
}

