function x_sel_schools(selected_school, selected_start, selected_end, user_id, disabled_s, disabled_y) {
	if (!document.getElementById("sel_schools_div"))
		alert("div not found");
	
	divs = document.getElementById("sel_schools_div");
	
	AjaxRequest.get({
		'url':'ajax_school_jaren/scholen.php'
		,selected_school:selected_school
		,user_id:user_id
		,disabled:disabled_s
		,'onLoading':function(req) 	{}
		,'onSuccess':function(req) 	{ divs.innerHTML = req.responseText; x_sel_school_years(selected_start, selected_end, disabled_y);}
		,'onError':function(req)    { alert('Error!\nStatusText='+req.statusText+'\nContents='+req.responseText);}
	});
}

function x_sel_school_years(selected_start, selected_end, disabled) {
	divs = document.getElementById("sel_years_div");
	
	if (!document.getElementById("userschool_id"))
		alert("bleh");
	
	school_id = document.getElementById("userschool_id").value;
	if (school_id == 0)
		return false;

	AjaxRequest.get({
		'url':'ajax_school_jaren/jaren.php'
		,school_id:school_id
		,selected_start:selected_start
		,selected_end:selected_end
		,disabled: disabled
		,'onLoading':function(req) 	{ /*divs.innerHTML = 'Loading';*/ }
		,'onSuccess':function(req) 	{ divs.innerHTML = req.responseText; }
		,'onError':function(req)    { alert('Error!\nStatusText='+req.statusText+'\nContents='+req.responseText);}
	});
}

function showRow(el_id) {
	ex = document.getElementById('ex_row');
	el = document.getElementById(el_id);

	el.style.display = ex.style.display;
}
function hideRow(el_id) {
	el = document.getElementById(el_id);

	el.style.display = 'none';
}
function enableSchools() {
	$('school_row').show();
	$('years_row').show();
}
function disableSchools() {
	$('school_row').hide();
	$('years_row').hide();
}
