
/* AJAX */
var handlerFunc = function(t) {
    	new Effect.Appear("divDetail");
	document.getElementById("divDetail").innerHTML=t.responseText;
}
var errFunc = function(t) {
    alert('Error ' + t.status + ' -- ' + t.statusText);
}
function AjaxCall(url){
new Ajax.Request(url, {onSuccess:handlerFunc, onFailure:errFunc});
}
function AjaxURLCall(url,form,div){
	if(!checkForm(document.getElementById(form)))return false;
	var params=Form.serialize(form);
new Ajax.Request(url, {method:'post',parameters:params, onSuccess:handlerFunc, onFailure:errFunc});
}
function SendRequestAndDisplay(url,method,parameters,div_affichage_resultat) {
	var ajax = new Ajax.Request(url, {
		method: method,
		parameters: parameters,
		onComplete: function(t) {document.getElementById(div_affichage_resultat).innerHTML=t.responseText;},
		onSuccess: function() {   },
		onFailure: function() { alert('Operation failed !'); }
	});

	return false;
}