function load(page, param, target_id,z) {
   
    //if (document.all) {   //Bug avec Opera qui se prend pour ie 
      if (window.all && !window.opera){      //Plus de bug ;-)
        var XhrObj = new ActiveXObject("Microsoft.XMLHTTP");
 
    }
    else {
        var XhrObj = new XMLHttpRequest();
 
    }
 
    var target = document.getElementById(target_id);
 
    XhrObj.open("POST", page, true);
 
    XhrObj.onreadystatechange = function() {
        if (XhrObj.readyState == 4 && XhrObj.status == 200){
          target.innerHTML = XhrObj.responseText;
          
          if(z!=undefined)
          links_tables[z]="ok";
        }
        var scripts = target.getElementsByTagName("script")
        for (var i = 0; i < scripts.length; ++i) {
            var s = scripts[i];
            if (!s.text) {
                dump(s);
                dump("len =" + scripts.length + "   i=" + i);
 
            }
            if (s.text) {
                eval(s.text);
 
            }
 
        }
        
    }
    XhrObj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    XhrObj.send(param);
}

function vote(that){
  var bl=that.parentNode.parentNode.parentNode.className;
  var vid_id=that.parentNode.parentNode.parentNode.id.replace("vid_","");
  var vote=that.className;
  
  if(vote=="negativ"){
    vote=0;
  }
  else{
    vote=1;
  }
  load("include/ajax_vote.php?vote="+vote+"&id="+vid_id,"id="+vid_id+"&vote="+vote,"vid_"+vid_id);
}
function vote2(that){
  var vid_id=that.parentNode.id.replace("vid_","");
  var vote=that.className;
  if(vote=="negativ"){
    vote=0;
  }
  else{
    vote=1;
  }
  load("/include/ajax_vote_player.php?vote="+vote+"&id="+vid_id,"","vid_"+vid_id);
  return false;
}
