function chargemp3(fichier,autostart){
	if (autostart==1){
		autostart="&amp;autostart=1&amp;autoreplay=1&amp;showtime=1";
	}else{
		autostart="";
	}
	//Normal
	//$("lecteur-mp3").innerHTML="<object type=\"application/x-shockwave-flash\" data=\"/dewplayer.swf?son=/"+fichier+"&bgcolor=FFFFFF"+autostart+"\" width=\"200\" height=\"20\"><param name=\"movie\" value=\"dewplayer.swf?son=/extraits/"+fichier+"&bgcolor=FFFFFF"+autostart+"\" /><param name=\"wmode\" value=\"transparent\"></object>";

	//mini
	$("lecteur-mp3").innerHTML="<object type=\"application/x-shockwave-flash\" data=\"/dewplayer-mini.swf?mp3=/extraits/"+fichier+"\" width=\"150\" height=\"20\"><param name=\"movie\" value=\"dewplayer-mini.swf?mp3=/extraits/"+fichier+"\" /><param name=\"wmode\" value=\"transparent\"></object>";
	
}

function montre(id,total){
	valeur=1;
	while(valeur<=total){
		memeauteur = "memeauteur" + valeur;
		document.getElementById(memeauteur).style.display="none";
		valeur=valeur+1;
	}
	memeauteur = "memeauteur" + id;
	document.getElementById(memeauteur).style.display="";
}

function addpanier(artid,supportid,dateconcertid)
{
    var url = '/modals/addpanier.php?artid='+artid+'&supportid='+supportid+'&dateconcertid='+dateconcertid;
    var myAjax = new Ajax.Request(
            url, 
            {
                method: 'get', 
                onComplete: reponseaddpanier
            });
}

function reponseaddpanier(xhr)
{
	if (xhr.status == 200)
    {
		texte=xhr.responseText.split(';');
		$('nombrepanier').innerHTML = texte[0];
        $('montantpanier').innerHTML = texte[1];
		alert(texte[2]);
    }
    else
    {
        $('nombrepanier').innerHTML = xhr.status;
	}
}

function connexioncompte() {
	if ($F('emaillog')!="" && $F('passwordlog')!=""){
		var url = '/panier.php?actionlog=logging&action=majpanier&referer=aucun&email='+$F('emaillog')+'&password='+encodeURIComponent($F('passwordlog'));
		//alert(url);exit;
		var myAjax = new Ajax.Request(url, {method: 'get', onComplete: gestionReponseconnexioncompte});
	}
}
function gestionReponseconnexioncompte(xhr){
	Modalbox.show('/modals/mon_compte.php', {title: 'Mon compte', width: 850});
}
