$(document).ready(function() {   
  loadStats();
});

function loadStats(){
  $('.livestats').load('proxy-livestats.php', function(response, status, xhr) {
    if (status !== "error") {
      // alert('#'+ status+' r'+response+'r');
      // and do it again, and again....
      //setTimeout(loadStats, 5000);
    }else{
      // var msg = "Sorry but there was an error: ";
      // alert(msg + xhr.status + " " + xhr.statusText);
    }
  });
}
