function GetAjax(){
	var xmlHttp;
	try
  	{  // Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest(); 
		
	}
	catch (e)
 	{  // Internet Explorer  
		try
   		{    
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			
		}
 		catch (e)
		{    
			try
      		{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				
			}
    		catch (e)
      		{         
				
				return null;      
			}  
		} 
	} 
	
	return xmlHttp;
}




function ObjectDiv( div , content )
 {
	 
 if ( document.getElementById )
 {
 
 document.getElementById( div ).innerHTML = content;
 
 }
 else
 {
 if ( document.layers )
 {
 document.div.innerHTML = content;
 }
 else
 {
 document.all.div.innerHTML = content;
 }
 }
 }

 function Goto( FILE , METHOD , DATA , div )
 {

 if( METHOD == 'GET' && DATA != null )
 {
 FILE += '?' + DATA;
 DATA = null;

}
 var httpRequestM = httpRequestM = GetAjax();



 httpRequestM.open( METHOD , FILE , true );
 httpRequestM.onreadystatechange = function()
 {
 if( httpRequestM.readyState == 4 )
 {
 ObjectDiv( div , httpRequestM.responseText );
 }
 }

 if( METHOD == 'POST' )
 {
 httpRequestM.setRequestHeader( "Content-type" , "application/x-www-form-urlencoded" );
 }

 httpRequestM.send( DATA );
 }


function viewContent( div , href , method , data )
 {


 
 if (data == "details" || data == "carte" || data == "photos" || data == "communiques" || data == "resultats")
 {
	 var wait = "<div align='center' style='margin-top:50px;' id='imageLoading'>" +
 
 "<img src='../../../images/loading.gif' border='none' alt=''>" +
 "</div>";
	 
	 if(data == "details")
	 {
	 document.getElementById(data).style.backgroundImage="url(../../../images/ongletactive.jpg)";
	 document.getElementById(data).style.color = "#7f5f03";
	 
	 document.getElementById('carte').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('carte').style.color = "white";
	 
	 document.getElementById('photos').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('photos').style.color = "white";
	 document.getElementById('communiques').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('communiques').style.color = "white";
	 document.getElementById('resultats').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('resultats').style.color = "white";	 
	 }
	 if(data == "carte")
	 {
	 document.getElementById(data).style.backgroundImage="url(../../../images/ongletactive.jpg)";
	 document.getElementById(data).style.color = "#7f5f03";
	 
	 document.getElementById('details').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('details').style.color = "white";
	 document.getElementById('photos').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('photos').style.color = "white";
	 document.getElementById('communiques').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('communiques').style.color = "white";
	 document.getElementById('resultats').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('resultats').style.color = "white";	 
	 }
	 
	 if(data == "photos")
	 {
	 document.getElementById(data).style.backgroundImage="url(../../../images/ongletactive.jpg)";
	 document.getElementById(data).style.color = "#7f5f03";
	 
	 document.getElementById('details').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('details').style.color = "white";
	 document.getElementById('carte').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('carte').style.color = "white";
	 document.getElementById('communiques').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('communiques').style.color = "white";
	 document.getElementById('resultats').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('resultats').style.color = "white";
	 	
	 }
	 
	 if(data == "communiques")
	 {
	 document.getElementById(data).style.backgroundImage="url(../../../images/ongletactive.jpg)";
	 document.getElementById(data).style.color = "#7f5f03";
	 
	 document.getElementById('details').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('details').style.color = "white";
	 document.getElementById('carte').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('carte').style.color = "white";
	 document.getElementById('photos').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('photos').style.color = "white";
	 document.getElementById('resultats').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('resultats').style.color = "white";	 
	 }
	 
	  if(data == "resultats")
	 {
	 document.getElementById(data).style.backgroundImage="url(../../../images/ongletactive.jpg)";
	 document.getElementById(data).style.color = "#7f5f03";
	 
	 document.getElementById('details').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('details').style.color = "white";
	 document.getElementById('carte').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('carte').style.color = "white";
	 document.getElementById('photos').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('photos').style.color = "white";
	 document.getElementById('communiques').style.backgroundImage="url(../../../images/ongletinactive.jpg)";
	 document.getElementById('communiques').style.color = "white";	 
	 }
	
 }
 else{
	  var wait = "<div align='center' style='margin-top:50px;' id='imageLoading'>" +
 
 "<img src='../../images/loading.gif' border='none' alt=''>" +
 "</div>";
	 
	 }


 
	  ObjectDiv( div , wait );
 	  Goto( href , method , data , div );
	

 
 return false;
 } 
 

