function Voter(vote) {
	if(window.ActiveXObject) {
		xhr_vote = new ActiveXObject("Microsoft.XMLHTTP"); 
    }
    else if(window.XMLHttpRequest) {
		xhr_vote = new XMLHttpRequest(); 
    }
	else { return(false); }
	
	xhr_vote.open("POST", 'sys/actions.php'
    	+ '?action=vote&vote=' 	+ vote
    	+ '&z='+Math.random(), false);
        
	xhr_vote.send(null);
	if(xhr_vote.readyState == 4 && xhr_vote.status == 200){
        document.getElementById('resultat_vote').innerHTML = xhr_vote.responseText;
		document.location.href='#resultat_vote';
	}
	else {
        alert('Erreur lors du vote, le serveur est surement surchargé, et c\'est tant mieux.');
    	return(false);
    }
}

function Com_Artiste(id_artiste,com,nom_artiste) {
	if(window.ActiveXObject) {
		xhr_vote = new ActiveXObject("Microsoft.XMLHTTP"); 
    }
    else if(window.XMLHttpRequest) {
		xhr_vote = new XMLHttpRequest(); 
    }
	else { return(false); }
	
	xhr_vote.open("POST", 'sys/com_artiste.php'
    	+ '?id_artiste=' + id_artiste + '&com=' 	+ com + '&nom_artiste=' 	+ nom_artiste 
    	+ '&z='+Math.random(), false);
        
	xhr_vote.send(null);
	if(xhr_vote.readyState == 4 && xhr_vote.status == 200){
        document.getElementById('popup_com_artiste').innerHTML = xhr_vote.responseText;
		document.location.href='#com_artiste';
	}
	else {
        alert('Erreur lors du vote, le serveur est surement surchargé, et c\'est tant mieux.');
    	return(false);
    }
}

function Afficher_Com_Artiste(id_artiste,nom_artiste) {
	document.location.href='#com_artiste';
	document.getElementById('popup_com_artiste').style.display='block';
	document.getElementById('popup_com_artiste').innerHTML='<div style="background-color:#990000; padding:5px; color:#FFF; position:absolute;" align="center">chargement ...</div>';
	
	if(window.ActiveXObject) {
		xhr_vote = new ActiveXObject("Microsoft.XMLHTTP"); 
    }
    else if(window.XMLHttpRequest) {
		xhr_vote = new XMLHttpRequest(); 
    }
	else { return(false); }
	
	xhr_vote.open("POST", 'sys/com_artiste.php'
    	+ '?id_artiste=' + id_artiste + '&nom_artiste=' + nom_artiste
    	+ '&z='+Math.random(), false);
        
	xhr_vote.send(null);
	if(xhr_vote.readyState == 4 && xhr_vote.status == 200){
		document.getElementById('popup_com_artiste').innerHTML = xhr_vote.responseText;
		document.location.href='#com_artiste';
	}
	else {
        alert('Erreur lors du vote, le serveur est surement surchargé, et c\'est tant mieux.');
    	return(false);
    }
}