

if(document.getElementById('moncompte') && document.getElementById('lmoncompte')){
	var moncompte = document.getElementById('moncompte');
	moncompte.style.display = 'none';
	document.getElementById('lmoncompte').onmouseover = function(){moncompte.style.display = '';};
	document.getElementById('lmoncompte').onmouseout = function(){moncompte.style.display = 'none';};
}


// http://siddh.developpez.com/articles/ajax/
function getXhr(){
	var xhr = null; 
	if(window.XMLHttpRequest) 
		xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject){ 
		try {xhr = new ActiveXObject("Msxml2.XMLHTTP");} 
		catch (e) {xhr = new ActiveXObject("Microsoft.XMLHTTP");}
	}
	else xhr = false; 
	return xhr;
}

function minu_ajax(url,cible){
	var xhr = getXhr();
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4 && xhr.status == 200 && document.getElementById(cible))
			document.getElementById(cible).innerHTML = xhr.responseText;
	}
	xhr.open("GET",url,true);
	xhr.send(null);
}


if(document.getElementById('personnalisation') && document.getElementById('personnalisation').tagName == 'INPUT'){
	var personn = document.getElementById('personnalisation');
	var actionn = function(){
		checkoo(this.id);
		minu_ajax('/ajax.php?mode=tester-urlp&urlp='+this.value,'persovalide');
	};
	personn.onkeydown = actionn;
	personn.onkeyup = actionn;
}


