function ModificationAnalyse(id_seance, note_projet_sport){
	 maRequete.request("action=ModificationAnalyse&id_seance="+id_seance+"&note_projet_sport="+note_projet_sport);	
}
function ChoixSeanceType(id){
	 maRequete.request("action=ChoixSeanceType&id="+id+"&IdPartie="+document.getElementById('IdPartie').value);	
}

function VSType(){
VerificationSeanceType(document.getElementById('type_effort').value,document.getElementById('tps_effort').value,document.getElementById('tps_recup').value,document.getElementById('type_intensite_1').value,document.getElementById('intensite_temps').value,document.getElementById('intensite').value,document.getElementById('charge').value, 0);

}


function VerificationSeanceType(type_effort, tps_effort, tps_recup, type_intensite, intensite_temps, intensite, charge, effectue){
	 maRequete.request("action=VerificationSeanceType&type_effort="+type_effort+"&tps_effort="+tps_effort+"&tps_recup="+tps_recup+"&type_intensite="+type_intensite+"&intensite_temps="+intensite_temps+"&intensite="+intensite+"&charge="+charge+"&effectue="+effectue);
	 
}
function ModificationPoids(mode, valeur, id_exercice, id_base_exercice, id_sportif){
		//alert("mode="+mode+"&valeur="+valeur+"&id_exercice="+id_exercice+"&id_base_exercice="+id_base_exercice+"&id_sportif="+id_sportif);
 maRequete.request("action=ModificationPoids&mode="+mode+"&valeur="+valeur+"&id_exercice="+id_exercice+"&id_base_exercice="+id_base_exercice+"&id_sportif="+id_sportif);
	 
}

function AfficherSeance(IdSeance){
	maRequeteSecondaire.request("action=AfficherSeance&IdSeance="+IdSeance);
}

function ASM(){
	AfficherSeanceModifier(document.getElementById('IdSeance').value,document.getElementById('IdSportif').value,document.getElementById('date').value,document.getElementById('type_seance').value,document.getElementById('type_affichage').value,document.getElementById('tps_continu_echauffement').value,document.getElementById('charge_echauffement').value,document.getElementById('pente_echauffement').value,document.getElementById('serie').value,document.getElementById('type_effort').value,document.getElementById('tps_effort').value,document.getElementById('tps_recup').value,document.getElementById('type_intensite').value,document.getElementById('intensite_temps').value,document.getElementById('intensite').value,document.getElementById('charge').value,document.getElementById('pente').value,document.getElementById('tps_continu_calme').value,document.getElementById('charge_calme').value,document.getElementById('pente_calme').value,document.getElementById('coach').value,document.getElementById('effectue').value,document.getElementById('impression').value,document.getElementById('PrecisionEffectue').value, document.getElementById('S').value, document.getElementById('J').value, document.getElementById('AProgrammer').value, document.getElementById('Programmateur').value, document.getElementById('IdPartie').value, document.getElementById('NomSeance').value);
	
	
}
function AfficherSeanceModifier(IdSeance,id_sportif_seance,date,type_seance,type_affichage, tps_continu_echauffement, charge_echauffement,pente_echauffement,serie, type_effort, tps_effort,tps_recup,type_intensite, intensite_temps, intensite, charge, pente, tps_continu_calme,charge_calme,pente_calme,coach, effectue,impression, PrecisionEffectue, S, J, AProgrammer, Programmateur,IdPartie,NomSeance){
	
	maRequete.request("action=AfficherSeance&IdSeance="+IdSeance+"&id_sportif_seance="+id_sportif_seance+"&date="+date+"&type_seance="+type_seance+"&type_affichage="+type_affichage+"&tps_continu_echauffement="+tps_continu_echauffement+"&charge_echauffement="+charge_echauffement+"&pente_echauffement="+pente_echauffement+"&serie="+serie+"&type_effort="+type_effort+"&tps_effort="+tps_effort+"&tps_recup="+tps_recup+"&type_intensite="+type_intensite+"& intensite_temps="+intensite_temps+"&intensite="+intensite+"&charge="+charge+"&pente="+pente+"&tps_continu_calme="+tps_continu_calme+"&charge_calme="+charge_calme+"&pente_calme="+pente_calme+"&coach="+coach+"&effectue="+effectue+"&impression="+impression+"&PrecisionEffectue="+PrecisionEffectue+"&S="+S+"&J="+J+"&AProgrammer="+AProgrammer+"&Programmateur="+Programmateur+"&IdPartie="+IdPartie+"&NomSeance="+NomSeance);
	
	
	}
	

function  Recherche(string, SqlGroupe_u){
	
	 maRequete.request("action=Recherche&string="+string+"&SqlGroupe_u="+SqlGroupe_u);
}

function  AffichageExerciceMusculation(mouvement, materiel, bdd_exercice_id, bdd_mode, bdd_valeur){
	 maRequete.request("action=AffichageExerciceMusculation&mouvement="+mouvement+"&materiel="+materiel+"&bdd_exercice_id="+bdd_exercice_id+"&bdd_mode="+bdd_mode+"&bdd_valeur="+bdd_valeur);
}


maRequete=new loader("ajax_send.php");
function loader(url){
	this.url=url;
	if(typeof XMLHttpRequest!="undefined"){this.http=new XMLHttpRequest();
	}else if(typeof ActiveXObject!="undefined"){this.http=new ActiveXObject("MSXML2.XmlHttp");
	}else{alert("No XMLHttpRequest object available. This functionality will not work.");}
}

loader.prototype.request=function(postReq){
	var oHttp=this.http;
	if (oHttp.readyState!=0){oHttp.abort();}
	oHttp.open("POST",this.url,true);
	oHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
	oHttp.onreadystatechange=function(){
	
		if (oHttp.readyState==4){
			var reponsePHP=oHttp.responseText;
			window.eval(reponsePHP);
			
		} else {
			document.getElementById("chargement").innerHTML = "<img src='images/ajax-loader.gif' alt=''/>Chargement en cours ...<br />";
		}
	};
	oHttp.send(postReq);
}

maRequeteSecondaire=new loader("ajax_send.php");
function loader(url){
	this.url=url;
	if(typeof XMLHttpRequest!="undefined"){this.http=new XMLHttpRequest();
	}else if(typeof ActiveXObject!="undefined"){this.http=new ActiveXObject("MSXML2.XmlHttp");
	}else{alert("No XMLHttpRequest object available. This functionality will not work.");}
}

loader.prototype.request=function(postReq){
	var oHttp=this.http;
	if (oHttp.readyState!=0){oHttp.abort();}
	oHttp.open("POST",this.url,true);
	oHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
	oHttp.onreadystatechange=function(){
	
		if (oHttp.readyState==4){
			var reponsePHP=oHttp.responseText;
			window.eval(reponsePHP);
			
		} else {
			document.getElementById("chargement").innerHTML = "<img src='images/ajax-loader.gif' alt=''/>Chargement en cours ...<br />";
		}
	};
	oHttp.send(postReq);
}
