function popupHttp(page,div,parametres,methode) {
	
	var myAjax = new Ajax.Updater( //Création d’une requête Ajax toute faites !)
				
			div, //Le nom du div qui va recevoir les infos de la page php lancée
		
			page,
			
			{
				
				method: methode, //Méthode pour les paramètres (GET ou POST)
		
				parameters: parametres //Paramètres rentrés plus haut
		
			}
	
	);
	
	Element.show('fondPlein');
	
	Element.show(div);
	
	return false;
	
}

function fermerPopup(idElement) {

	document.getElementById(idElement).innerHTML = "";
	Element.hide('fondPlein');
	Element.hide(idElement);
	
}


var myGlobalHandlers = {
        onCreate: function()
            {
                Element.show('chargement');
            },
        onComplete: function()
            {
                if(Ajax.activeRequestCount == 0){
                    Element.hide('chargement');
                }
            }
    };

Ajax.Responders.register(myGlobalHandlers);

function javascriptEnabled() {

	if (!navigator.javaEnabled()) {

		alert('Javascipt inactif');
 
	}
	
}
  
function showMeSlideshow(SlideShowId) {

		/* ****** ATTENTION ***** */
		/*  Les ID d'occurences doivent Ãªtre de la forme DivNo[X], X reprÃ©sentant un nombre compris entre 0 et 99 */

		/* Nombre d'occurences */
		var nbOccurences=5;
		
		/* On elimine les autres calques pour eviter les superpositions */
		for(i=0;i<=nbOccurences;i++) {
			var noDiv="DivNo"+i
			if (document.getElementById(noDiv)) {
				
				document.getElementById(noDiv).style.display="none";
				
			}
			
		}
		
		/* On affiche le calque conÃ§ernÃ© */
		 document.getElementById(SlideShowId).style.display="block"; 
		 
}




function ShowHide(EltId,Action) {

            var elt = document.getElementById(EltId); if (!elt) return;

            Action = (typeof Action=="undefined" ) ? "" : Action.substring(0,1).toLowerCase();

            with(elt.style) {

                display = (Action=="" ) ? (display=="block" || display=="" ) ? "none" : "block" : (Action=="h" ) ? "none" : "block";

            }

   }
   
   
   function popupcentree(page,largeur,hauteur,options) {	
	   
	   var top=(screen.height-hauteur)/2;	
	   var left=(screen.width-largeur)/2;	
	   window.open(page,'','top='+top+',left='+left+',width='+largeur+',height='+hauteur+','+options);
	   
   } 

   function showInFine(mode) {
   	  
   	  if (mode) {
   	  
   	  	for (var i=0;i<=6;i++) {
   	  		document.getElementById(toto).style.display="block";
   	  	}
   	  	
   	  } else {
   	  
   	    for (var i=0;i<=6;i++) {
   	  		document.getElementById("adossement"+i).style.display="none";
   	  	}
   	  	
   	  }
   	  
   }
   
   function roundNumber(num, dec) {
		var result = Math.round( Math.round( num * Math.pow( 10, dec + 1 ) ) / Math.pow( 10, 1 ) ) / Math.pow(10,dec);
		return result;
	}
   
   
   	function rafraichirParent() {

		window.opener.location.reload(true);

	}
	
	function rafraichirGrandParent() {
	
		window.opener.location.window.opener.location.reload(true);
	
	}

	
