function ajax(lien)
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
 
    xhr.open("GET", lien, false);
    xhr.send(null);
return xhr.responseText;
}

function vote(id,iddiv)   
{
document.getElementById(iddiv).innerHTML=ajax('vote.php?id='+id);
}
function hits(id,iddiv)   
{
ajax('hits.php?id='+id);
}

function testvalidation()
{ 
var result=true;
for(i=0;document.getElementById('choblig_'+i) ;i++)
{
document.getElementById('choblig_'+i).style.border='1px solid #99AAFF' ;
}


for(i=0;document.getElementById('choblig_'+i) ;i++)
{
result=result && document.getElementById('choblig_'+i).value!="";
if(document.getElementById('choblig_'+i).value=="")
{
document.getElementById('choblig_'+i).style.border='1px solid #FF0000' ;
}
}
if(!result) alert("Veuillez remplir les Champs obligatoire");


return result;
}



