function affiche_bouton_submit(){
//    alert($('#belle_nuit_texte').val());
//    alert($('.nom_upload_file').html()!="");
    if($('#belle_nuit_texte').val()!="" && $('.nom_upload_file').text()!=""){
	$('#boutonSubmit').attr('disabled',false);
	$('#boutonSubmit').attr('enabled',true);
    }
    else{
	$('#boutonSubmit').attr('disabled',true);
    }
}


$(document).ready(function() {
	affiche_bouton_submit();
    $('#belle_nuit_texte').keyup(function(){
	affiche_bouton_submit();
    });
    $('#exemple_texte').click(function(){
	var lurl=$(this).attr("href")+"&viajs=1";
//	alert(lurl);
	$.ajax({  
	    type: "GET",  
	    url: lurl,  
	    success: function(resultat) {  
		$('#belle_nuit_texte').html(resultat);
		affiche_bouton_submit();
	    }
	});
	affiche_bouton_submit();
	return false;
    });
    affiche_bouton_submit();
});