function appel_ajax(id,funct,act,param,sortie) {
 		var url = './appel.php';
		var pars = 'funct=' + funct +'&act=' + act + '&sortie=' + sortie + '&vars= ' + param  ;
        	var myAjax = new Ajax.Updater(id, url, {method:'post', postBody:pars,
				Success: function(){
				var element = getElementById(id);
				element.innerHTML = r.reponseText;
				setTimeout ("liens ()",300);
				setTimeout ("init_load_array ()",300);
				},
				Failure:  function(){
				var ter = getElementById(id);
				ter.innerHTML = "Un problèmes à eu lieux lors du chargement de la gallerie . \n Merci de reouveller l'operation";
				setTimeout ("liens ()",300);
				setTimeout ("init_load_array ()",300);
				},
				Complete:  function(){
				var ter = getElementById(id);
				ter.innerHTML = "En cours";
				setTimeout ("liens ()",300);
				setTimeout ("init_load_array ()",300);
					}
				});
				setTimeout ("liens ()",300);
				setTimeout ("init_load_array ()",300);
};


function head(){
var descri = document.getElementsByTagName("meta"); //.item(0);
	document.title= document.getElementById('hidden_title').innerHTML;
}
/*Remplacement du header par correspondance lors appel ajax */
function liens(){
	var divglobal= document.getElementById('global');
	var liens_site = divglobal.getElementsByTagName('a') ;
	var id = 'global';
	var lib_funct = 'appel.php';
	var act = '';
	var sortie = 'true';

	for (var i = 0 ; i < liens_site.length ; ++i) {
			var l = liens_site[i];
		liens_site[i].onclick  = function (){
			var param = this.href;
			var poplight = this.rel;
			if (this.getAttribute("rel") == "lightbox"  /*&& lightb ==null*/) setTimeout ("addLoadEvent(initLightbox)",300);
			if (this.getAttribute("class") == "lightwindow" ) setTimeout ("lightwindowInit (false)",300); /*lightwindowInit(false)*/
			else {
				appel_ajax(id,lib_funct,act,param,sortie);
				setTimeout ("head ()",300);
				}
			return false;
		}
	}
}
function formulaire(){
	var divglobal= document.getElementById('formContact');
	var liens_site = divglobal.getElementsByTagName('input') ;
	var id = 'global';
	var lib_funct = 'appel.php';
	var act = '';
	var sortie = 'true';

	for (var i = 0 ; i < liens_site.length ; ++i) {
			var l = liens_site[i];
		if (liens_site[i].type='submit') {
		liens_site[i].onclick  = function (){
			var param = this.href;
				appel_ajax(id,lib_funct,act,param,sortie);
				setTimeout ("head ()",300);
			return false;
		}
		}
	}
}