

function picto_num(numero, if_fleche){
	if (typeof(if_fleche) == 'undefined'){if_fleche = false;}
	$("#picto_lien_"+window.picto_a_modifier).removeClass("lien_actif");
	$("#picto_lien_"+window.picto_a_modifier).addClass("lien_inactif");
	window.picto_a_modifier = numero;
	if(!if_fleche){window.picto_en_cours = numero;}
	change_picto(numero);
	$("#picto_lien_"+numero).removeClass("lien_inactif");
	$("#picto_lien_"+numero).addClass("lien_actif");
}

function picto_prec(nombre){
	
	picto_num(window.picto_en_cours-1, true);
	
	if (typeof(nombre) == 'undefined'){nombre = 12;}
	cache_comment_en_cours();
	if(window.picto_en_cours < 2){
		window.picto_en_cours = nombre;
	}
	else {window.picto_en_cours --;}
	picto_num(window.picto_en_cours);
	//change_picto();
	//change_num_picto(nombre);
}

function cache_comment_en_cours(){
	
	$("#comment_picto > #comment_picto"+window.picto_en_cours).removeClass("comment_visible");
	$("#comment_picto > #comment_picto"+window.picto_en_cours).addClass("comment_cache");
}

function change_picto(){
	//on change la photo
	$("#picto").attr("src", "img/pictos/"+window.picto_en_cours+".jpg");
	//le nom du bloc duquel récupérer les infos
	var html_comment = $("#comment_picto"+window.picto_en_cours).html();
	//on change le texte de description
	$("#comment_picto").html(html_comment);
	$("#comment_picto > #comment_picto"+window.picto_en_cours).removeClass("comment_cache");
	$("#comment_picto > #comment_picto"+window.picto_en_cours).addClass("comment_visible");
	calculer_hauteurs();
}

function change_num_picto(nombre){
	
	$("#num_photo").html(window.picto_en_cours+" /"+nombre);
}




function picto_suiv(nombre){
	
	window.picto_a_modifier = window.picto_en_cours;
	
	if (typeof(nombre) == 'undefined'){nombre = 12;}
	cache_comment_en_cours();
	if (window.picto_en_cours < nombre){
		window.picto_en_cours ++;
	}
	else{
		window.picto_en_cours = 1;
	}
	picto_num(window.picto_en_cours, true);
	
	//change_picto(nombre);
	//change_num_picto(nombre);
}

/*
function picto_suiv(){
	window.picto_a_modifier = window.picto_en_cours;
	
	
	cache_comment_en_cours();
	if (window.picto_en_cours < 20){
		window.picto_en_cours ++;
	}
	else{
		window.picto_en_cours = 1;
	}
	change_pictos();
	change_num_picto();
}


function picto_prec(){
	cache_comment_en_cours();
	if(window.picto_en_cours < 2){
		window.picto_en_cours = 20;
	}
	else {window.picto_en_cours --;}
	change_pictos();
	change_num_picto();
}

function cache_comment_en_cours(){
	$("#comment_picto > #comment_picto"+window.picto_en_cours).removeClass("comment_visible");
	$("#comment_picto > #comment_picto"+window.picto_en_cours).addClass("comment_cache");
}

function change_pictos(){
	//on change la photo
	$("#picto").attr("src", "img/pictos/"+window.picto_en_cours+".jpg");
	//le nom du bloc duquel récupérer les infos
	var html_comment = $("#comment_picto"+window.picto_en_cours).html();
	//on change le texte de description
	$("#comment_picto").html(html_comment);
	$("#comment_picto > #comment_picto"+window.picto_en_cours).removeClass("comment_cache");
	$("#comment_picto > #comment_picto"+window.picto_en_cours).addClass("comment_visible");
	
}

function change_num_picto(){
	$("#num_photo").html(window.picto_en_cours+" / 20");
}*/
