function openRadio(page,w,h){
	window.open(page,"nom_popup","menubar=no, status=no, scrollbars=no, menubar=no, width="+w+", height="+h);
	//window.open(url, "Provence Radio", "height="+h+", width="+w+", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no");
}

function getMeteo(cible,url) {
	loadPage(cible,'js/meteo.php','&url='+url,false);
}

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 les objets XMLHTTPRequest..."); 
	xhr = false; 
	}
	
	return xhr;
}

function loadPage(div,file,send,rload)
{
	var xhr = getXhr();
	
	xhr.open("POST", file, true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send(send);

	xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4)
		{
            if (xhr.status == 200)
			{
				//alert(xhr.responseText);
				document.getElementById(div).innerHTML = '';
				document.getElementById(div).innerHTML = xhr.responseText;
				
				if(rload==true){window.location.reload();}
			}
		}
	}
}