


//Menu roll image Script
var image1 = new Image();
image1.src = "style/img/m1over.png";
var image2 = new Image();
image2.src = "style/img/m2over.png";
var image3 = new Image();
image3.src = "style/img/m3over.png";
var image4 = new Image();
image4.src = "style/img/m4over.png";
var image5 = new Image();
image5.src = "style/img/m5over.png";

function getXhr()
 {
  if(window.XMLHttpRequest) xhrtemp = new XMLHttpRequest(); 
  else if(window.ActiveXObject)
   {  
	try
	 {
	  xhrtemp = new ActiveXObject("Msxml2.XMLHTTP");
	 }
	catch (e)
	 {
	  xhrtemp = new ActiveXObject("Microsoft.XMLHTTP");
	 }
   }
  else 
   { 
	alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest, veuillez le mettre à jour"); 
	xhrtemp = false; 
   } 
   return xhrtemp;
 }
 
 function infobox(page,param)
{
	openbox();	
	document.getElementById('jswait').style.display='';
	xhr=getXhr();
	xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			document.getElementById('jswait').style.display='none';
			document.getElementById('jscontent').innerHTML = xhr.responseText;

		}
	}
	   
	// On envoie la requete a "ajax/verifnserie.php"
	xhr.open("POST",'http://'+location.host+'/'+page,true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	// On envoie a verifnserie le nserie recupéré
	if (param)
		xhr.send(param);
}

partnerinfo = function (id,lang){
	window.location.hash = '#'+id;
	if (lang)
		infobox('partnerinfo.php','id='+id+'&lang='+lang);
	else
		infobox('partnerinfo.php','id='+id+'&lang=en');
	_gaq.push(['_trackEvent', 'infobox', 'partner', id ]);
}

eventinfo = function (id,lang){
	window.location.hash = '#'+id;
	if (lang)
		infobox('eventinfo.php','id='+id+'&lang='+lang);
	else
		infobox('eventinfo.php','id='+id+'&lang=en');
	_gaq.push(['_trackEvent', 'infobox', 'event', id ]);
}

function  closebox (){
	document.getElementById('infobox').style.position='fixed'; 
	document.getElementById('conteneur').style.position='absolute';
	document.getElementById('jsbox').style.display='none';
	document.getElementById('jswait').style.display='none';
}

function  openbox (){
	document.getElementById('infobox').style.position='absolute'; 
	document.getElementById('conteneur').style.position='fixed'; 
	document.getElementById('jsbox').style.display='';
}

function  closemapbox (){
	document.getElementById('jsmap').style.display='none';
}

function  openmapbox (){
	document.getElementById('jsmap').style.display='';
}

externalLink = function (cetobjet,category,infos){
	destination=cetobjet.href;
	if(!category)
		category=0;
	if(!infos)
		infos=0;
	//alert (category+' & '+ destination +' & '+infos);
	_gaq.push(['_trackEvent', 'externallink', category, destination, infos]);
	window.open(destination);
}

