function filterFormAction(){
	getCalendrierByForm('filterForm');
}

//-- Ajax Requests
//--------------------------------------------------
function getCalendrierByForm(idForm){
	onBeginAjax();
	new Ajax.Request('tools/ajaxCalendrier.php',
					 {	asynchronous:true, 
						onSuccess: updateCalendrier,
						onComplete: onEndAjax,
						onFailure: onAjaxError,
						on404: onAjaxError,
						parameters:Form.serialize(idForm)
					 });
}
function updateCalendrier(t){
	Element.update('calendrierWrapper', t.responseText);
}

//-- Basic Ajax functions
//--------------------------------------------------
function onBeginAjax(){
	Element.hide('ajaxError');
	Element.show('ajaxLoader');
}

function onEndAjax(){
	Element.hide('ajaxLoader');
}

function onAjaxError(t){
	//t.statusText
	Element.show('ajaxError');
}

//-- Dynamic Display
//---------------------------------------------------
var _filterNum = 1;
function toggleFilter(){
	_filterNum += 1;
	var tId = "filter" + _filterNum;
	Effect.BlindDown(tId, {duration:0.6});
	//if(_filterNum >= 3) new Effect.Opacity('filterToggler', {duration:0.6, from:1, to:0});
	if(_filterNum == 2) Element.update('filterToggler', "Recherche encore plus avanc&eacute;e >>");
	if(_filterNum >= 3) Effect.BlindUp('filterToggler', {duration:0.6});
}

function overRow(rowRef){
	Element.setStyle(rowRef,{backgroundColor:"#FFFFFF", cursor:"pointer"});
}
function outRow(rowRef){
	Element.setStyle(rowRef,{backgroundColor:"transparent", cursor:"auto"});	
}

function getURL(mURL){
	window.location = mURL;
}


