/*************************************************
	Fonction de definition de l'object xhr
**************************************************/
function new_xhr(){
	var xhr_object = null;
	if(window.XMLHttpRequest) // Firefox et autres
	   xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject){ // Internet Explorer
	   try {
                xhr_object = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
            }
	}
	else { // XMLHttpRequest non supportÃ© par le navigateur
	   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest.");
	   xhr_object = false;
	}
	return xhr_object;
}
/*****************************************************
	Fonction qui va recharger le contenu
******************************************************/
function load_page(select) {
	var xhr2 = new_xhr();//On crée un nouvel objet XMLHttpRequest
	xhr2.onreadystatechange = function(){
		if ( xhr2.readyState == 4 ){//Actions executées une fois le chargement fini
			if(xhr2.status  != 200){//Message si il se preoduit une erreur
				document.getElementById("descteam").innerHTML ="Error code " + xhr2.status;
			} else {//On met le contenu du fichier externe dans la div "content"
				document.getElementById("descteam").innerHTML = xhr2.responseText;
			}
		} else {//Message affiché pendant le chargement
			document.getElementById("descteam").innerHTML = "<div style='padding-top: 110px; padding-left: 165px;'><img src='./images/loader.gif' alt='loading' style='border: none;' /></div>";
		}
	}
	xhr2.open("GET", select.split('?')[1]+".php", true);//Appel du fichier externe
	xhr2.send(null);
}

/* **************************************************
Fonctions RollOver et RollOut
*****************************************************/

$(function() {
// OPACITY OF BUTTON SET TO 100%
$("#wrapper #home-container #leftside #intro #team-ctn #picteam #mycarousel li").css("opacity",1.0);
		
// ON MOUSE OVER
$("#wrapper #home-container #leftside #intro #team-ctn #picteam #mycarousel li").hover(function () {
										  
// SET OPACITY TO 50%
$(this).stop().animate({
opacity: 0.4
}, "slow");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 100%
$(this).stop().animate({
opacity: 1.0
}, "slow");
});
});


/* // Roll Over & roll Out right menu | WEBDESIGN // */

$(function() {
// OPACITY OF BUTTON SET TO 100%
$("#wrapper #home-container #rightside #rightnav #webnav").css("opacity",1.0);
		
// ON MOUSE OVER
$("#wrapper #home-container #rightside #rightnav #webnav").hover(function () {
										  
// SET OPACITY TO 50%
$(this).stop().animate({
opacity: 0.6
}, "medium");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 100%
$(this).stop().animate({
opacity: 1.0
}, "medium");
});
});


/* // Roll Over & roll Out right menu | GRAPHICDESIGN // */

$(function() {
// OPACITY OF BUTTON SET TO 100%
$("#wrapper #home-container #rightside #rightnav #graphicnav").css("opacity",1.0);
		
// ON MOUSE OVER
$("#wrapper #home-container #rightside #rightnav #graphicnav").hover(function () {
										  
// SET OPACITY TO 50%
$(this).stop().animate({
opacity: 0.6
}, "medium");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 100%
$(this).stop().animate({
opacity: 1.0
}, "medium");
});
});


/* // Roll Over & roll Out right menu | MARKETING // */

$(function() {
// OPACITY OF BUTTON SET TO 100%
$("#wrapper #home-container #rightside #rightnav #marketingnav").css("opacity",1.0);
		
// ON MOUSE OVER
$("#wrapper #home-container #rightside #rightnav #marketingnav").hover(function () {
										  
// SET OPACITY TO 50%
$(this).stop().animate({
opacity: 0.6
}, "medium");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 100%
$(this).stop().animate({
opacity: 1.0
}, "medium");
});
});


/* // Roll Over & roll Out right menu | REDACTION & TRADUCTION // */

$(function() {
// OPACITY OF BUTTON SET TO 100%
$("#wrapper #home-container #rightside #rightnav #redatradnav").css("opacity",1.0);
		
// ON MOUSE OVER
$("#wrapper #home-container #rightside #rightnav #redatradnav").hover(function () {
										  
// SET OPACITY TO 50%
$(this).stop().animate({
opacity: 0.6
}, "medium");
},
		
// ON MOUSE OUT
function () {
			
// SET OPACITY BACK TO 100%
$(this).stop().animate({
opacity: 1.0
}, "medium");
});
});



// /* GOOGLE ANALYTICS */ //

var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1992002-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
// Fin du script //
