// JavaScript Document

function votes(artiste, titre, album, action) {
 
        var xhr;
        if(window.XMLHttpRequest || window.ActiveXObject) {
                if(window.XMLHttpRequest) {
                        xhr = new XMLHttpRequest();
                } 
                else {
                        try {
                                xhr = new ActiveXObject("Msxml2.XMLHTTP");
                        } catch(e) {
                                xhr = new ActiveXObject("Microsoft.XMLHTTP");
                        }
                }
        }
        else {
                alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
                return;
        }
        
        var artiste = encodeURIComponent(artiste);
        var titre = encodeURIComponent(titre);
		var album = encodeURIComponent(album);
		var action = encodeURIComponent(action);
        xhr.open("GET", "?p=1&pp=3&artiste=" + artiste + "&album=" + album + "&titre=" + titre + "&action=" + action, true);
        xhr.send(null);
		
}