function OuvrePopup(myFile,myWidth,myHeight) {
var top=(screen.height-myHeight)/2;
var left=(screen.width-myWidth)/2;
window.open(myFile,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+myWidth+',height='+myHeight+',left='+left+',top='+top);
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function faire_zoom()
	{	
		document.getElementById("visuel_zoom").style.display = "block";		
	}
	
function defaire_zoom()
	{	
		document.getElementById("visuel_zoom").style.display = "none";
	}
function reponse(reponse,valeur,identifiant)
	{	
		document.getElementById("choix_"+identifiant).style.display = "none";
		
		if (reponse == valeur)
		
			{	
				document.getElementById("icone_vrai_"+identifiant).innerHTML = '<img src="images/reponse_vrai.png" />';
				
			}else{
				
				document.getElementById("icone_vrai_"+identifiant).innerHTML = '<img src="images/reponse_faux.png" />';
			}	
		
		if (valeur == 2)
		
			{	
				
				document.getElementById("icone_vrai_"+identifiant).style.visibility = "visible";
				document.getElementById("detail_faux_"+identifiant).style.display = "block";
				
			
			}else{
				
				document.getElementById("icone_vrai_"+identifiant).style.visibility = "visible";
				document.getElementById("detail_vrai_"+identifiant).style.display = "block";
				
			} 
		
	}
	
//Gestion de l'info bulle AJAX

this.infobulle = function(){     
				/* CONFIG */           
						xOffset_tip_media = 5;
						yOffset_tip_media = 5;          
						// these 2 variable determine popup's distance from the cursor
						// you might want to adjust to get the right result            
				/* END CONFIG */               
				$("area.infobulle").hover(function(e){                                                                                        
						this.t = this.alt;
						
							 if(this.alt.length <= 13)
								{
									this.lestyle = 'tooltip_texte_small';	
								}else{
									this.lestyle = 'tooltip_texte';
								}
						
						
						this.title = "";                                                                         
						$("body").append("<div id='infobulle'><div class='tooltip_carte'><div class='" + this.lestyle + "'>" + this.t +"</div></div></div>");
						$("#infobulle")
								.css("top",(e.pageY - xOffset_tip_media)  + "px")
								.css("left",(e.pageX + yOffset_tip_media) + "px")
								.fadeIn("fast");               
			},
				function(){
						this.title = this.t;           
						$("#infobulle").remove();
			}); 
				$("area.infobulle").mousemove(function(e){
						$("#infobulle")
								.css("top",(e.pageY - xOffset_tip_media)  + "px")
								.css("left",(e.pageX + yOffset_tip_media) + "px");
				});                    
		};

$(document).ready(function(){
					infobulle();
			});	
		
function change_carte(id,nom)
	{	
		
		document.getElementById("tooltip_texte").innerHTML = nom;			
	}
	
function affiche_resultat(id)
	{	
		
		for (i=1; i<=22 ; i++)
		
			{
				
				document.getElementById("bloc_region_"+i).style.display = "none";
				
											
			}
			
		document.getElementById("carte_ww").src = "images/carte/carte_"+id+".gif";
		
		document.getElementById("intro_carte").style.display = "none";
		document.getElementById("visuel_carte").style.display = "none";	
		
		
		document.getElementById("bloc_region_"+id).style.display = "block";
		
		
		//document.getElementById("carte_new").src = "images/carte/carte_"+id+".gif";
		//document.getElementById("carte_new").style.display = "block";
		//document.getElementById("carte_ww").style.display = "block";
		
		document.getElementById("retour_carte").style.display = "block";
		
		
		
	}






