codice:
var xmlhttp=newXMLHttpRequest();
Prova ad aggiungere il 'var' in entrambe le funzioni