$(document).ready(function(){
	$("#theme").change( function() {
		$.post("squelettes/centrederessource/php/liste_sstheme.php", { theme: $(this).val() },
		function(data){
			$("#sstheme").html(data);
		});	
	});
	$("#theme").change( function() {
		$.post("squelettes/centrederessource/php/liste_sujet.php", { theme: $(this).val() },
		function(data){
			$("#sujet").html(data);
		});	
	});
		
	
	$("#sstheme").change( function() {
		$.post("squelettes/centrederessource/php/liste_sujet.php", { sstheme: $(this).val() },
		function(data){
		 $("#sujet").html(data);
		});			
	});
	$("#structure").change( function() {
		$.post("squelettes/centrederessource/php/liste_auteur.php", { structure: $(this).val() },
		function(data){
		 $("#auteur").html(data);
		});			
	});
});


function remplirliste() {
	$.post("squelettes/centrederessource/php/liste_theme.php"+window.location.search,
		function(data){
			$("#theme").html(data);
	});	
	$.post("squelettes/centrederessource/php/liste_sstheme.php"+window.location.search, { theme: 0 },
		function(data){
			$("#sstheme").html(data);
	});			

	$.post("squelettes/centrederessource/php/liste_sujet.php"+window.location.search, { theme: 0 },
		function(data){
			$("#sujet").html(data);
	});	
	$.post("squelettes/centrederessource/php/liste_auteur.php", { structure: 0 },
		function(data){
		 	$("#auteur").html(data);
	});	
	$.post("squelettes/centrederessource/php/liste_support.php"+window.location.search, 
		function(data){
			$("#support").html(data);
	});	
	
};

function resultat(){
	$.post("squelettes/centrederessource/php/resultat.php", { support: $("#support").val() },
		function(data){
		 	$("#resultat").html(data);
	});	
	
};





