var xmlhttp;

try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}


function programacaonoar(cliente,url){
		param = "cliente="+cliente;
		xmlhttp.open("POST", url+"noar.php", true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		
		xmlhttp.onreadystatechange = function(){
			//document.getElementById('price').innerHTML = "Recalculando...";
			if(xmlhttp.readyState == 4) { 
				if(xmlhttp.status == 200){ 
					document.getElementById('noar').innerHTML = xmlhttp.responseText;
				}else{ //Não encotra os dados
					document.getElementById('noar').innerHTML = "Erro: returned status code " + xmlhttp.status + " " + xmlhttp.statusText;
				}
			}									
		}
		
		xmlhttp.send(param);

		window.setTimeout("programacaonoar("+cliente+",'"+url+"')",300000);	
}