function xmlRequest() {
    var xmlo = null;

    if (window.XMLHttpRequest) { // Firefox et autres
        xmlo = new XMLHttpRequest();
    } else if(window.ActiveXObject) { // Internet Explorer 
		try {
			xmlo = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlo = new ActiveXObject("Microsoft.XMLHTTP");
		}
    } else {
        alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		xmlo = false; 
    }
    return xmlo;
}

function xmlNoter(dest,file) {
    var xhro = xmlRequest();
    if (xhro==false) return;
    xhro.open("GET", file, true);
    xhro.onreadystatechange = function() {
        if(xhro.readyState == 4) {
            dest.innerHTML=xhro.responseText;
        }
    }
    xhro.send(null);
}
function noter(s,id,note,template) {
    xmlNoter(document.getElementById('noter-'+id),'/inc/noter.php?s='+s+'&id='+id+'&note='+note+'&template='+template);
}

function starOver(nb,id) {

    for(i=1;i<=5;i++) {
        if(i<=nb) {
            document.getElementById('star'+i+'-'+id).src='http://www.mixs.fr/i/starup.png';
        } else {
            document.getElementById('star'+i+'-'+id).src='http://www.mixs.fr/i/stardown.png';
        }
    }
}
function starOut(nb,id,pre) {

    for(i=1;i<=5;i++) {
        if(i<=nb) {
            document.getElementById('star'+i+'-'+id).src='http://www.mixs.fr/i/starup.png';
        } else {
            document.getElementById('star'+i+'-'+id).src='http://www.mixs.fr/i/stardown.png';
        }
	}

	if (nb==0) {
    	for(i=1;i<=pre;i++) {
            document.getElementById('star'+i+'-'+id).src='http://www.mixs.fr/i/starup.png';
	 	}
	 }

}

