
/* 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(myVar){
new Ajax.Request('produit'+myVar+".php", {onSuccess:handlerFunc, onFailure:errFunc});
}
function AjaxURLCall(url,form,div){
	var params=Form.serialize(form);
new Ajax.Request(url, {method:'post',parameters:params, onSuccess:AjaxURLreceive, onFailure:AjaxURLfail});
}
var AjaxURLfail = function(t) {
    alert('Error ' + t.status + ' -- ' + t.statusText);
}
var AjaxURLreceive = function(t) {
	document.getElementById("resultat").innerHTML=t.responseText;
}

//-->

