function createObject() { 
var tipo_richiesta; 
var browser = navigator.appName; 
if(browser == "Microsoft Internet Explorer"){ 
tipo_richiesta = new ActiveXObject("Microsoft.XMLHTTP"); 
}else{ 
tipo_richiesta = new XMLHttpRequest(); 
} 
return tipo_richiesta; 
} 

var http = createObject(); 


function richiedi(valore) { 
http.open('get', 'testi.php?tipo='+valore);
http.onreadystatechange = handleResponse;
http.send(null); 
} 
/*funzioni da box notizie a box testo*/
function richiedinotizia(valore) { 
http.open('get', 'legginews.php?c='+valore);
http.onreadystatechange = handleResponse; 
http.send(null); 
} 

function handleResponse() { 
if(http.readyState == 4){ 
var response = http.responseText;

document.getElementById('boxtesti').innerHTML = response; 

} 






} ;


