function update(id, d) {
	if (typeof d == 'undefined')
		d = '';
	$("#annee" + id).load('/_ScriptLibrary/data/getclasses.php',
						'w=annee' + d +
						'&s=' + $("#annee" + id).val() +
						'&t=' + $("#titulaire" + id).val(),
		function() {
			$("#classe" + id).load('/_ScriptLibrary/data/getclasses.php',
				'w=classe' + d + 
				'&annee=' + $("#annee" + id).val() + 
				'&s=' + $("#classe" + id).val() +
				'&titulaire=' + $("#titulaire" + id).val(),
				function() {
					$("#titulaire" + id).load('/_ScriptLibrary/data/getclasses.php',
							'w=titulaire' + d +
							'&annee=' + $("#annee" + id).val() + 
							'&classe=' + $("#classe" + id).val()+
							'&s=' + $("#titulaire" + id).val())
				}); });  	  			 	  			
}

function input_enable(id,enable) {
	if (enable) {
		$(id + ' input').removeAttr('READONLY');
		$(id + ' input').removeAttr('disabled');
		$(id + ' input').removeClass('disabled');
	} else {
		$(id + ' input').attr('READONLY','READONLY');
		$(id + ' input').attr('disabled','disabled');
		$(id + ' input').addClass('disabled');
	}
}

function waitMessage() {
	var mes = '<div style="text-align:center;width:180px;height:128px;padding:0;"><img style="margin:auto;margin-bottom:8px;" src="http://www.arsbss.be/images/loading.gif" /><br />Veuillez patienter...<br/><br /><a href="http://www.arsbss.be/annuaire">Cliquez ici quand vous avez reçu votre fichier pour revenir au site.</a></div>';
	$(mes).modal({overlayClose:false,autoResize:true});
	return false;
}

/*
function CheckFormGen(form) {

	Language = 'fr';
	SubmitFlag = true;

	if (!CheckField('Matricule',form,form.matricule,'string', 'yes', 20 )) { SubmitFlag = false;}
	if (!CheckField('Nom',form,form.nom,'string', 'yes', 50 )) { SubmitFlag = false;}
	if (!CheckField('Prenom',form,form.prenom,'string', 'yes', 50 )) { SubmitFlag = false;}
	if (!CheckField('Catégorie',form,form.categorie,'string', 'yes', 50 )) { SubmitFlag = false;}
	if (!CheckField('Type',form,form.type,'string', 'yes', 50 )) { SubmitFlag = false;}
	if (!CheckField('Année de sortie',form,form.annee,'string', 'yes', 100 )) { SubmitFlag = false;}
	if (!CheckField('Classe de sortie',form,form.classe,'string', 'yes', 100 )) { SubmitFlag = false;}
    if (!CheckField('Classe de sortie',form,form.titulaire,'string', 'yes', 100 )) { SubmitFlag = false;}
	if (!CheckField('Login',form,form.login,'string', 'yes', 100 )) { SubmitFlag = false;}
	if (!CheckField('Mot de passe',form,form.pass,'string', 'yes', 100 )) { SubmitFlag = false;}
	
	
	
	
	if ( SubmitFlag == false ) {
		alert(GlobalMsg);
		GlobalMsg='';
	}
	
	return SubmitFlag;
}*/
