function file(fichier){
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IE
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
	xhr_object.open("GET", fichier, false);
	xhr_object.send(null);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
	else return(false);
}
function writetag(texte,cible){document.getElementById(cible).innerHTML = texte;document.getElementById(cible).style.display="block";}




function isEmail(email){
	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	return email.match(re);
}

function isPwd(pwd){
	var re = /^[0-9A-Za-z]{4,8}$/;
	return pwd.match(re);
}

function isDate(str){
    var re = /\b.{8}\b/;
	return str.match(re);
}

function isNum(str){
    var re = /^[-]?\d*\.?\d*$/;
	return str.match(re);
}


function displayCaptcha(inout){
	if(inout==1){
		document.getElementById("masque").style.width=larg+"px";
		document.getElementById("masque").style.height=haut+"px";
		document.getElementById("masque").style.left="0px";
		document.getElementById("explicap").style.display="block";
	}else{
		document.getElementById("masque").style.width="10px";
		document.getElementById("masque").style.height="10px";
		document.getElementById("masque").style.left="-9999px";
		document.getElementById("explicap").style.display="none";
	}
}
function displayMessage(inout){
	if(inout==1){
		document.getElementById("masque").style.width=larg+"px";
		document.getElementById("masque").style.height=haut+"px";
		document.getElementById("masque").style.left="0px";
		document.getElementById("message").style.display="block";
	}else{
		document.getElementById("masque").style.width="10px";
		document.getElementById("masque").style.height="10px";
		document.getElementById("masque").style.left="-9999px";
		document.getElementById("message").style.display="none";
	}
}


