aqui dejo el codigo para que puedan revisar
Código PHP:
    
<script language="javascript" type="text/javascript">
 
// no coloco la funcion creaAjax() porque es la tipoca funcion generiaca para //el objeto HTTP request
function cargarContenido(t1,t2){
var contenedor, current, preloader, bodyr,bo;
contenedor = document.getElementById('contenedor');
current = document.getElementById('current-rating');
preloader = document.getElementById('preloader'); 
bodyr =  document.getElementsByTagName("div");
bo =  document.getElementsByTagName('body');
var gracias = document.getElementById('gracias');
var aleatorio=Math.random(); 
 
 
ajax=creaAjax();
ajax.open('GET', 'update.php?valorVoto='+t1+'&quien='+t2+'&aleatorio='+aleatorio,true);
 ajax.setRequestHeader("Content-type", "text/html");
ajax.onreadystatechange=function() {
 
 if(ajax.readyState==1){
             preloader.innerHTML = 'Cargando...';
              bodyr[5].style.color =  '#CCCCCC';
                     bodyr[5].style.backgroundColor =  '#CCCCC3';
                        //modificamos el estilo de la div, mostrando una imagen de fondo
            preloader.style.background = "url('loading.gif') no-repeat"; 
            bo[0].style.backgroundColor =  '#FFF0FF';
            gracias.innerHTML =  '';
      }else  if 
                (ajax.readyState==4 && ajax.status == 200) {
                   t1 = t1 * 25;
                   contenedor.innerHTML = ajax.responseText;
                   preloader.innerHTML = 'Cargado.';
                   preloader.style.color = '#FF0000'; 
                   preloader.style.backgroundImage = 'none'; 
                   preloader.style.color = '#00FF00'; 
                   current.style.width = t1+'px';
                   bodyr[5].style.color = '#00CC99';
                   bodyr[5].style.backgroundColor =  '#FFFFFF';
                   bo[0].style.backgroundColor =  '#FFF000';
                   gracias.style.color =  '#FF0000';
                   gracias.innerHTML =  'gracias por votar';
                 
                  
                   }else if (ajax.status==404){
                  preloader.innerHTML = 'La página no existe';
                   bodyr[5].style.color =  '#FF0000';
                      bodyr[5].style.backgroundColor =  '#CCCCC3';
                                         }else {
                                          //mostramos el posible error
                                preloader.innerHTML = 'Error:'.ajax.status; 
                                         }
}
 
ajax.send(null)
}
</script> 
   gracias
 
