i:var currentoreille = 0;
var taboreille=["Oreilles de renard","Oreilles de cochon","Oreilles de singe","Oreilles d'ecureuil","Oreilles de lapin","Sans oreille"];

var currenttete = 0;
var tabtete=["Tete de renard","Tete de cochon","Tete de singe","Tete d'ecureuil","Tete de canard","Tete de lapin","Tete de pingouin","Tete de grenouille"];

var currentcorps = 0;
var tabcorps=["Corps de renard","Corps de cochon","Corps de singe","Corps d'ecureuil","Corps de canard","Corps de lapin","Corps de pingouin","Corps de grenouille"];

var currentqueue = 0;
var tabqueue=["Queue de renard","Queue de cochon","Queue de singe","Queue d'ecureuil","Queue de canard","sans queue"];


var typeMimichant =["renard","cochon","singe","ecureuil","canard","lapin","pingouin","grenouille"];



//////////////////////////////////////////////////////////////////
//                            oreilles                          //
//////////////////////////////////////////////////////////////////

function changeoreille( nextOrPrevious ) {
	switch (nextOrPrevious){
		case 'next' : currentoreille++;     break;
		case 'previous' : currentoreille--; break;
		default : currentoreille = nextOrPrevious;
	}
	if (currentoreille < 0  ) currentoreille = 5;
	if (currentoreille > 5 ) currentoreille = 0;
	
	//changement de l'image
	if (currentoreille<4)
		document.getElementById('showoreille').src = "../charsprites/o"+typeMimichant[currentoreille]+"t.gif";
	else if (currentoreille==4)
		document.getElementById('showoreille').src = "../charsprites/o"+typeMimichant[currentoreille+1]+"t.gif";
	else 
		document.getElementById('showoreille').src = "../charsprites/videt.gif";
	
	
	document.getElementById('txtOreille').innerHTML=taboreille[currentoreille];
	// MAJ du champs hidden
	document.getElementById('formulaire').hidden_oreille.value=currentoreille;
}

function no_oreille(){
return currentoreille
}

//////////////////////////////////////////////////////////////////
//                            tete                              //
//////////////////////////////////////////////////////////////////

function changetete( nextOrPrevious ) {
	switch (nextOrPrevious){
		case 'next' : currenttete++;     break;
		case 'previous' : currenttete--; break;
		default : currenttete = nextOrPrevious;
		// currentoreille = document.slideform.slideoreille.selectedIndex;
	}
	
	if (currenttete < 0  ) currenttete = 7;
	if (currenttete > 7 ) currenttete = 0;
	
	document.getElementById('showtete').src = "../charsprites/t"+typeMimichant[currenttete]+"t.gif";
	
	document.getElementById('txtTete').innerHTML=tabtete[currenttete];
	// MAJ du champs hidden
	document.getElementById('formulaire').hidden_tete.value=currenttete;
}


//////////////////////////////////////////////////////////////////
//                            corps                             //
//////////////////////////////////////////////////////////////////

function changecorps( nextOrPrevious ) {
	switch (nextOrPrevious){
		case 'next' : currentcorps++;     break;
		case 'previous' : currentcorps--; break;
		default : currentcorps = nextOrPrevious;
		// currentoreille = document.slideform.slideoreille.selectedIndex;
	}
	
	if (currentcorps < 0  ) currentcorps = 7;
	if (currentcorps > 7 ) currentcorps = 0;
	
	document.getElementById('showcorps').src = "../charsprites/c"+typeMimichant[currentcorps]+"t.gif";
	
	document.getElementById('txtCorps').innerHTML=tabcorps[currentcorps];
	
	// MAJ du champs hidden
	document.getElementById('formulaire').hidden_corps.value=currentcorps;
}


//////////////////////////////////////////////////////////////////
//                            queue                             //
//////////////////////////////////////////////////////////////////

function changequeue( nextOrPrevious ) {
	switch (nextOrPrevious){
		case 'next' : currentqueue++;     break;
		case 'previous' : currentqueue--; break;
		default : currentqueue = nextOrPrevious;
		// currentoreille = document.slideform.slideoreille.selectedIndex;
	}
	if (currentqueue < 0  ) currentqueue = 5;
	if (currentqueue > 5 ) currentqueue = 0;
	
	if (currentoreille<5)
		document.getElementById('showqueue').src = "../charsprites/q"+typeMimichant[currentqueue]+"t.gif";
	else 
		document.getElementById('showqueue').src = "../charsprites/videt.gif";
	
	document.getElementById('txtQueue').innerHTML=tabqueue[currentqueue];
	// MAJ du champs hidden
	document.getElementById('formulaire').hidden_queue.value=currentqueue;
}


//////////////////////////////////////////////////////////////////
//                            fonction hexa                     //
//////////////////////////////////////////////////////////////////


function hexa(couleur)
{
	document.getElementById('divColor').style.backgroundColor = "#"+couleur;
	document.getElementById('formulaire').hidden_color.value= couleur;
}
