// JavaScript Document

function openAlphabet() {

	$.ajax({
	  url: "ajax-alphabet.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});

}

function openMots() {
	
	
	$.ajax({
	  url: "ajax-mots.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});

}

function openExpressions() {
	
	
$.ajax({
	  url: "ajax-expressions.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});	
	
}

function openExpressionView(video,idmot) {
	
	$(".spanmot").hide();
	$(".limot").css("fontWeight","normal");
	
//	$("#li_" + idmot).css("background","red");
	
	document.getElementById("li_" + idmot).style.fontWeight = 'bold' ;
	
//	$("#li_" + idmot).css("fontWeight","bold");
	$("#span_desc_" + idmot).css("fontWeight","bold");
	$("#span_desc_" + idmot).show();
	
	$.ajax({
	  url: "ajax-expressions-view.php",
	  cache: false,
	  type: "POST",
	  data: ({video:video}),
	  success: function(html){
		$("#droite").html(html);
	  }
	});
}

function openEntreprise() {
	
	
$.ajax({
	  url: "ajax-entreprise.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});	
	
}

function openThemes() {
	
	
$.ajax({
	  url: "ajax-themes.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});
	
}

function openAide() {
	
	
$.ajax({
	  url: "ajax-aide.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});	
	
}


function openApropos() {
	
	
$.ajax({
	  url: "ajax-apropos.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});	
	
}

function retourAccueil() {
	
	
$.ajax({
	  url: "retour-accueil.php",
	  cache: false,
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});	

$.ajax({
	  url: "img-accueil.php",
	  cache: false,
	  success: function(html){
		$("#droite").html(html);
	  }
	});	
	
}


function openLettre(lettre) {
	
$.ajax({
	  url: "ajax-lettre.php",
	  cache: false,
	  type: "POST",
	  data: ({lettre:lettre}),
	  success: function(html){
		$("#droite").html(html);
	  }
	});	
}

function openMotsView(video,idmot) {

	$(".spanmot").hide();
	$(".limot").css("fontWeight","normal");
	
//	$("#li_" + idmot).css("background","red");
	
	document.getElementById("li_" + idmot).style.fontWeight = 'bold' ;
	
//	$("#li_" + idmot).css("fontWeight","bold");
	$("#span_desc_" + idmot).css("fontWeight","bold");
	$("#span_desc_" + idmot).show();

	$.ajax({
	  url: "ajax-mots-view.php",
	  cache: false,
	  type: "POST",
	  data: ({video:video}),
	  success: function(html){
		$("#droite").html(html);
	  }
	});
}

function openThemeChoice(id) {
	
	$.ajax({
	  url: "ajax-themes-choice.php",
	  cache: false,
	  type: "POST",
	  data: ({id:id}),
	  success: function(html){
		$("#gauche_bis").html(html);
	  }
	});
}

function showMots(){
	$("#searchbox2").show(),
	$("#results2").show(),
	$("#searchbox3").hide(),
	$("#results3").hide(),
	$("#searchbox4").hide(),
	$("#results4").hide();
}

function showExpressions(){
	$("#searchbox2").hide(),
	$("#results2").hide(),
	$("#searchbox3").show(),
	$("#results3").show(),
	$("#searchbox4").hide(),
	$("#results4").hide();
}


function showThemes(){
	$("#searchbox2").hide(),
	$("#results2").hide(),
	$("#searchbox3").hide(),
	$("#results3").hide(),
	$("#searchbox4").show(),
	$("#results4").show();
}

function showNothing(){
	$("#searchbox2").hide(),
	$("#results2").hide(),
	$("#searchbox3").hide(),
	$("#results3").hide(),
	$("#searchbox4").hide(),
	$("#results4").hide();
}

