function rollOff(id){
	//document.getElementById(id).src = document.getElementById(id).src.split('on').join('off');
	document.getElementById(id).src = "img/nav/"+id+"_off.gif";
	//alert("img/nav/"+id+"_off.gif");
}
function rollOn(id){
	//document.getElementById(id).src = document.getElementById(id).src.split('off').join('on');
	document.getElementById(id).src = "img/nav/"+id+"_on.gif";
	//alert("img/nav/"+id+"_on.gif");
}


function popConditions(){
	window.open("conditions.htm", "conditions", "top=10,left=10,width=400,height=500,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}

function popWap(){
	window.open("wap.htm", "WAP", "top=10,left=10,width=800,height=550,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}

function popJava(){
	window.open("java.htm", "JAVA", "top=10,left=10,width=800,height=550,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}

function popEnvoi(){
	window.open("envoi.htm", "ENVOI", "top=10,left=10,width=550,height=200,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}

function popCGU(){
	window.open("cgu.htm", "CGU", "top=10,left=10,width=500,height=165,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}
function popMobinaute(){
	window.open("mobinautes.htm", "MOBINAUTES", "top=10,left=10,width=750,height=700,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}
function popEnvoiInter(){
	window.open("envoi_inter.htm", "ENVOI", "top=10,left=10,width=550,height=200,menubar=0,tollbar=0,location=0,directories=0,status=0,scrollbars=yes");
}


function validate_phone(phone){
		var filter  = /^06\d{8}$/;
		if (filter.test(phone)) return true;
		else return false;
	}

function validate_email(email)
	{
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(email)) return true;
		else return false;
	}


function setMsg(blabla,Y) {

	if (document.body) {
		var width =document.body.clientWidth-4;
		var height=document.body.clientHeight-4;
	//	var offsetY = document.body.scrollTop
		}
	else{
		var width=document.innerWidth-4;
		var height=document.innerHeight-4;
	//	var offsetY = pageYOffset;
		}


	document.getElementById('overlay').style.width=width+'px';
	document.getElementById('overlay').style.height=height+'px';

	//var style_hauteur_popup = document.getElementById('popupdiv').style.height;
	var style_largeur_popup = document.getElementById('popupdiv').style.width;
	//document.getElementById('popupdiv').style.top=((height/2)-(style_hauteur_popup.substr(0,style_hauteur_popup.length-2))/2+offsetY) + 'px';
	document.getElementById('popupdiv').style.top=Y+'px';
	document.getElementById('popupdiv').style.left=((width/2)-(style_largeur_popup.substr(0,style_largeur_popup.length-2))/2) + 'px';

	document.getElementById('message').innerHTML = blabla;
	document.getElementById('overlay').style.display='block';

}