function next_flux(){
	flux.SendAJAXwhithReturn('flux/ViewFlux/','ViewFlux',flux.init(),'{"act":"next"}');	
}
var flux = {
	init:function(){
		return this;
	},
	loadFux:function(){
	
	flux.SendAJAXwhithReturn('flux/ViewFlux/','ViewFlux',flux.init(),'{"act":"next"}');	
	//to = setTimeout( "next_flux()",4000);

	},
	refreshWithRetourn:function(action,page,res){
	
	switch ( action)  {
		case  'ViewFlux' :
			$("#detail_flux").html(res[0][0][0]);
			 to = setTimeout( "next_flux()",4000);
		break;
	}
	},
	SendAJAXwhithReturn:function(pageSend,action,page,value){
	res ="";
	var xhr = getXhr();
	 
		xhr.onreadystatechange = function()
		{
				if(xhr.readyState == 4 && xhr.status == 200)
				{
				res= extract_DATA(xhr.responseText);
				page.refreshWithRetourn(action,page,res);
				}
				else {
				this.result ="petit pepin";
				}
		      
		}
		xhr.open("POST","/"+pageSend,true);
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xhr.send("AJAX="+value);
		} 
	 
	 
	

}
