function initFormation(form, remote) {
	initDatePicker(form);
	initTurniereFormation(form, remote);
}

function initTurniereFormation(form, remote) {
	bindTurnierart(form, remote, 't1l', 't1a');
}

function bindTurnierart(form, remote, source, target) {
	var select = $(form + ' select[name="' + source + '"]');
	if (select.val() == '') {
		replaceOptions(target, null, false);
		disableSelect(target);
	}
	select.on('change', function () {
		if ($(this).val() != '') {
			$.get(remote, {q: 'sl', p: $(this).val()}, function (data) {
				replaceOptions(target, data, false)
			}, 'json');
			enableSelect(target);
		}
		else {
			replaceOptions(target, null, false);
			disableSelect(target);
		}
	});
}
