function redirect(elt) {
	window.location.href=elt; 
}

function subFocus() {
	document.getElementById("valide").focus()
}

function fenetre(page) {
    window.open(page,"Home","menubar=no, status=no, scrollbars=yes, menubar=no, width=800, height=600");
}

function popCentre(url,nom,largeur,hauteur,options) {
	var haut=(screen.height-hauteur)/2;
	var Gauche=(screen.width-largeur)/2;
	window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}

function pop_it(the_form,largeur,hauteur) {
   my_form = eval(the_form);
   if(my_form.Contact.value=="") { 
   		alert("Veuiller indiquer le nom de la personne à contacter");
	} else if (my_form.Email.value=="") { 
   		alert("Veuillez indiquer une adresse e-mail");
	} else if (my_form.Adresse.value=="") {
	   alert("Veuillez indiquer votre adresse");
	} else if (my_form.CP.value=="") {
		alert("Veuillez indiquer votre code postal");
	} else if (my_form.Ville.value=="") {
		alert("Veuillez indiquer votre ville");
	} else {
	   var haut=(screen.height-hauteur-50)/2;
	   var Gauche=(screen.width-largeur)/2;
	   window.open("guides_popup.php", "popup", "top="+haut+",left="+Gauche+",height="+hauteur+",width="+largeur+",menubar='no',toolbar='no',location='no',status='no',scrollbars='no'");
	   my_form.target = "popup";
	   my_form.submit();
	}
}
function checkMail(the_form) {
   my_form = eval(the_form);
   if(my_form.email.value=="") { 
   		alert("Veuiller indiquer votre adresse e-mail");
	} else {
		my_form.submit();
	}
}


function getHTTPObject() {
   var xmlhttp=false;
   if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); 
   else if (window.ActiveXObject) {
      try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
      catch(e) {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
   }
   return xmlhttp;
}
function handleHttpResponse(zonediv, objhttp) {
   if (objhttp.readyState == 4) {
      document.getElementById(zonediv).innerHTML = unescape(objhttp.responseText);
   }
}
function ChargeZone(url, zonediv) {
   var http = getHTTPObject();
   http.open("GET", url + "&nocache=" + Math.random(), true);
   http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
   http.onreadystatechange = function() { handleHttpResponse(zonediv, http); }
   http.send(null);
}

//SCRIPT GOOGLE
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-227541-1");
pageTracker._trackPageview();
} catch(err) {}
