function getPlayerName(idLevel){
	var playerName = prompt('Entrez votre nom et votre prenom :','');
	if(playerName!=null) document.location.href="testBota.php?action=chooseLevel&idLevel="+idLevel+"&playerName="+playerName;
}

function comfirmGiveUp(){
	if(confirm('Voulez-vous vraiment abandonner ?'))
	document.location.href='testBota.php?action=giveUp'
}

function popup(){
	window.open("testBota.php?popup=1", "","toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=750, height=700");
}

var nb=0;
function addNewPictureLine(){
	var text = "<li><input type='file' name='pictures[]' /><select name='typePicture[]'><option value='initiale'>Initiale</option><option value='branche' >Branche</option><option value='feuille' >Feuille</option><option value='fleur' >Fleur</option><option value='fruit' >Fruit</option><option value='panicule' >Panicule</option><option value='rameau' >Rameau</option><option value='tige' >Tige</option><option value='tronc'>Tronc</option><option value='verso de la feuille' >Verso de la feuille</option></select><br /></li><div id='formImage";
	text += nb+1;
	text += "'></div>";
	document.getElementById('formImage'+nb).innerHTML = text;
	nb++;
}

// Le premier parametre : l'identifiant de l'image a afficher
// les autres : les identifiants des images a cacher
function showPicture(){
	var args = showPicture.arguments;
	for(var i=1; i<args.length; i++){
		document.getElementById('picture_'+args[i]).style.display='none';
	}
	document.getElementById('picture_'+args[0]).style.display='inline';
}
