//
//
// Script chargé sur les pages avec inclusion ajax

/*function startLoading(div_id) {
  // First we want to show the loading window then hide the content are we are loading into.
  Element.show('mainAreaLoading');
  Element.hide(div_id);
}

function finishLoading(div_id) {
  // First we want to show the content are, then toggle the loading window so it fades away.
  Element.show(div_id);
  // This happens 1 second after the mainAreaInternal is shown incase the content is still loading.
  setTimeout("Effect.toggle('mainAreaLoading');", 1000);
  Element.hide('mainAreaLoading');
}
*/

function loadContent(div_id, script_php, param1, param2, param3) {
  // We make use of the Ajax.Updater function to load the external data from our file.
  // Start the loading window first by calling the function we made previously.
  //startLoading(div_id);
  
  Element.hide(div_id);

  // Request the content and update the ‘div’ area (i’ll explain this in more detail later).
  
	elementHTML = document.getElementById(div_id);
	var url = script_php;
	o_options = new Object();
	o_options = {
        method: 'post', 
        postBody: 'param1='+ param1 +'&param2='+ param2 +'&param3='+ param3, 
        evalScripts: true
        };
	
  new Ajax.Updater( elementHTML, url, o_options );
  
  Element.show(div_id);
  

}

  

  // Now finish the loading.
  //finishLoading(div_id);