/******************************************************************************************************/
/* AJAX */
function getXhr(){
					var xhr = null; 
	if(window.XMLHttpRequest) // Firefox et autres
	   xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject){ // Internet Explorer 
	   try {
				xhr = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
	}
	else { // XMLHttpRequest non supporté par le navigateur 
	   alert("Votre navigateur ne supporte pas AJAX ..."); 
	   xhr = false; 
	} 
					return xhr;
}

/**/
/******************************************************************************************************/
/* CALCUL*/

// Arrondi un chiffre a 2 decimales 
function arrondi(n) {
 var n2=Math.round(n*100)/100;
 var rep=""+n2;
 var pos=rep.indexOf(".");
 if (pos==-1) rep+=".00";
 else if (pos==rep.length-2) rep+="0";
 return rep;
}
/**/

/******************************************************************************************************/
/* Formulaire*/

/* Verifie que le champs ne contiens que des chiffres*/
function checkchiffre(ID)
{
var Monchamps = document.getElementById(ID).value;
var reg = new RegExp("[^0-9]", "g");

if(reg.test(Monchamps))
{
	document.getElementById(ID).value = '';
}
else
{
return true;
}
} 

/******************************************************************************************************/
/* Gestion DIV*/
function MontreStation() {
	document.getElementById('menuStation').style.display = "block";
}