function setDivCourriel(rpcFile, parent_id, childId) {	
	$.post(rpcFile, {parent_id: ""+ parent_id +""}, function(data){
			if(data.length >0) {
				$('#' + childId).html("E-mail valide !");
			}else{
				$('#' + childId).html("Vérifier votre E-mail, notre système n'arrive pas à contacter le serveur de votre adresse pour le moment!");
			}
		});
}


function setRegion(rpcFile, parent_id, childId, child_2) {
	if(parent_id == "0") {
		// Hide the suggestion box.
		$('#' + childId).html('<i>sélectionner une région avant</i>');
		$('#' + child_2).html(' ');
	} else {
		$.post(rpcFile, {parent_id: ""+ parent_id +""}, function(data){
			if(data.length >0) {
				$('#' + childId).html(data);
			}
		});
	}
}

function setSubLevel(rpcFile, parent_id, childId) {
	if(parent_id == "0") {
		// Hide the suggestion box.
	} else {
		$.post(rpcFile, {parent_id: ""+ parent_id +""}, function(data){
			if(data.length >0) {
				$('#' + childId).html(data).fadeIn('slow');
			}
		});
	}
}

function setSubLevelFaiblesse(rpcFile, parent_id, childId) {
	if(parent_id !== "") {
		$.post(rpcFile, {parent_id: ""+ parent_id +"", childId: ""+childId + ""}, function(data){
			if(data.length >0) {
				$('#' + childId).html(data);
			}
		});
	}
}

function setSubLevelMetro(rpcFile, parent_id, childId) {
	if(parent_id == "0") {
		// Hide the suggestion box.
		$('#' + childId).html(' ');
	} else {
		$.post(rpcFile, {parent_id: ""+ parent_id +""}, function(data){
			if(data.length >0) {
				$('#' + childId).html(data);
				if(data == '<option value="1232">Aucune &eacute;cole trouv&eacute;e</option>'){
					$('#autre_ecole').show();
				}else{
					$('#autre_ecole').hide();
				}
			}else{
				$('#' + childId).html(' ');
			}
		});
	}
}
function setSubLevelMetroEcole(rpcFile, parent_id, childId) {
	if(parent_id == "0") {
		// Hide the suggestion box.
		$('#' + childId).val('0');
	} else {
		$.post(rpcFile, {parent_id: ""+ parent_id +""}, function(data){
			if(data.length >0) {
				$('#' + childId).html(data);
			}
		});
	}
}
