var contenu_element;

///////////////////////////////////////////////////////////////////////////////////////////////////
function numerodepval() {


    var numerodep = $('selectnumerodep').getValue();
	//alert(numerodep);
	
	//xmlhttpPost("page_categorie_def_session_numerodep.php?numerodep="+ numerodep,"divnumerodep");
	return numerodep;
}

function demande_url(urldemanded) {

document.location.href = urldemanded;
window.parent.location = urldemanded;
}


function getdiv() {

var chaine = $('divnumerodep').innerHTML;
	alert(chaine);
	return chaine;

}

function AfficheUrl (selObj) {

alert(window.location.href);


eval("parent.location='"+selObj.options[selObj.selectedIndex].value+"'"); 

}


function vide() {

}




function MM_jumpMenu_pour_page_categorie(targ,selObj,restore)
{ //v3.0
		var url = selObj.options[selObj.selectedIndex].value;

		// xmlhttpPost("page_categorie_def_session_url_avant_htaccess.php?url="+ url,"divnumerodep");
		
		eval(targ+".location='"+url+"'");
		if (restore) selObj.selectedIndex=0;		
		
		
}













///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPost(strURL, dividcible) {
    var xmlHttpReq1 = false;
    var self = this;

	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReq1 = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReq1 = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReq1.open('POST', strURL, true);

    self.xmlHttpReq1.onreadystatechange = function() {
		if (self.xmlHttpReq1.readyState < 4)
			{
updatepage('<center><img src="../medias/images/wait.gif" height="16" width="16" alt="Patientez" title="Patientez"/></center>',dividcible);
				
	        }
        if (self.xmlHttpReq1.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq1.responseText;
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReq1.send(null);
}






///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostFormulaireMonProfilDatas(strURL,dividcible) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
//    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState < 4)
			{
//				updatepage("Traitement en cours ....",dividcible);
				updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
				
	        }
        if (self.xmlHttpReq.readyState == 4) // && self.xmlHttpReq.status == 200
	        {
				if(self.xmlHttpReq.responseText != null)
	        		{
						updatepage(self.xmlHttpReq.responseText,dividcible);
    		    	}
	        	else
	        		{
	        			updatepage("Erreur ....",dividcible);
	        		}

	        }
    }
    self.xmlHttpReq.send(getquerystring());
}








function getquerystring() {
    var form = document.forms['formulaire_mon_profil_datas'];
    var email_mon_profil = form.email_mon_profil.value;

    
    var date_n_mon_profil = form.date_n_mon_profil.value;
    var mois_n_mon_profil = form.mois_n_mon_profil.value;
    var annee_n_mon_profil = form.annee_n_mon_profil.value;
    var ville_mon_profil = form.ville_mon_profil.value;
    var numerodep_mon_profil = form.numerodep_mon_profil.value;
    var niveau_mon_profil = form.niveau_mon_profil.value;
    var siteperso_mon_profil = form.siteperso_mon_profil.value;
    var description_mon_profil = form.description_mon_profil.value;
    var nom_mon_profil = form.nom_mon_profil.value;
    var prenom_mon_profil = form.prenom_mon_profil.value;
    var categorie_mon_profil = form.categorie_mon_profil.value;
    
    

   qstr = 'email_mon_profil=' + escape(email_mon_profil) + 
   '&date_n_mon_profil=' + escape(date_n_mon_profil) + 
   '&mois_n_mon_profil=' + escape(mois_n_mon_profil) + 
   '&annee_n_mon_profil=' + escape(annee_n_mon_profil) + 
   '&ville_mon_profil=' + escape(ville_mon_profil) + 
   '&numerodep_mon_profil=' + escape(numerodep_mon_profil) + 
   '&niveau_mon_profil=' + escape(niveau_mon_profil) + 
   '&siteperso_mon_profil=' + escape(siteperso_mon_profil) + 
   '&description_mon_profil=' + escape(description_mon_profil) + 
   '&nom_mon_profil=' + escape(nom_mon_profil) + 
   '&categorie_mon_profil=' + escape(categorie_mon_profil) + 
   '&prenom_mon_profil=' + escape(prenom_mon_profil);


    
    
    // Remarque: pas de '?' avant la chaï¿½ne de requï¿½te
    return qstr;
}









function updatepage(str,dividcible){
//	document.getElementById(dividcible).innerHTML = "";
    document.getElementById(dividcible).innerHTML = str;
}









    
var CS = {};
CS.UploadAjax = function(){}

CS.UploadAjax.callBack = function(message,idcible){
    document.getElementById(idcible).innerHTML = "";
    document.getElementById(idcible).innerHTML = message; 
}


function afficheDescURL(toThis)
  {
  if (document.getElementById)
    {
    document.getElementById("textDiv").innerHTML = toThis;
    }
  else if (document.all)
    {
    document.all["textDiv"].innerHTML = toThis;
    }
  }

 function MM_jumpMenu(targ,selObj,restore)
	{ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}

	
function PopupChat() {
  F = window.open("http://cyrilseguier.ovh.org/chatreaorig/chatlogged.php","Popup","width=722,height=366,scrollbars=no,resizable=no");
}	
	

 function test2(selObj)
	{ //v3.0
//		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		var valeur = selObj.options[selObj.selectedIndex].value;
//		xmlhttpPostSelecteurPhototheque('phototheque.php','contenu',valeur);
//		alert(valeur);
//		xmlHttpSelecteurPhototheque2('phototheque.php','contenu',valeur);		
		xmlhttpPost('page_phototheque.php?idsousdomaines='+valeur,'contenu');		
	}	




 function MM_jumpMenu3(selObj)
	{ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}

selObj.options[selObj.selectedIndex].value


function xmlHttpSelecteurPhototheque2(strURL, dividcible, valeur) {
	
	
	
	
    var xmlHttpSelecteurPhototheque2 = false;
    var self = this;
    
	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpSelecteurPhototheque2 = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpSelecteurPhototheque2 = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpSelecteurPhototheque2.open('POST', strURL, true);

    self.xmlHttpSelecteurPhototheque2.onreadystatechange = function() {
		if (self.xmlHttpSelecteurPhototheque2.readyState < 4)
			{
updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
	        }
        if (self.xmlHttpSelecteurPhototheque2.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {




				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpSelecteurPhototheque2.responseText; // eval()
	        		        	


	        }
    }
//    self.xmlHttpSelecteurPhototheque2.send('idsousdomaines=' +  escape(valeur));
    self.xmlHttpSelecteurPhototheque2.send(getquerystringSelecteurPhototheque2(valeur));
//    self.xmlHttpSelecteurPhototheque.send(valeur);
}


function getquerystringSelecteurPhototheque2(valeur) {


     qstr = 'idsousdomaines=' + escape(valeur);

    return qstr;   

    
}





















































///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostPhotothequeModif(strURL,dividcible) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
//    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState < 4)
			{
updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);				
			
				
				
	        }
        if (self.xmlHttpReq.readyState == 4) // && self.xmlHttpReq.status == 200
	        {
				if(self.xmlHttpReq.responseText != null)
	        		{
						updatepage(self.xmlHttpReq.responseText,dividcible);
    		    	}
	        	else
	        		{
	        			updatepage("Erreur ....",dividcible);
	        		}

	        }
    }
    self.xmlHttpReq.send(getquerystringPhotothequeModif());
}








function getquerystringPhotothequeModif() {
    var form = document.forms['phototheque_modif_titre_commentaire'];



    
    var phototheque_titre = form.phototheque_titre.value;
    var phototheque_commentaire = form.phototheque_commentaire.value;
    
    
    
//alert(phototheque_titre);

   qstr = 'phototheque_titre=' + escape(phototheque_titre) 
   + '&phototheque_commentaire=' + escape(phototheque_commentaire);


    
    
    // Remarque: pas de '?' avant la chaine de requï¿½te
    return qstr;
}




















///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostContact(strURL,dividcible) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
//    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState < 4){
				updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
	        }
        if (self.xmlHttpReq.readyState == 4){ // && self.xmlHttpReq.status == 200
				if(self.xmlHttpReq.responseText != null){
						updatepage(self.xmlHttpReq.responseText,dividcible);
    		    	}
	        	else {
	        			updatepage("Erreur ....",dividcible);
	        		}

	        }
    }
    self.xmlHttpReq.send(getquerystringContact());
}








function getquerystringContact() {
    var form = document.forms['formulaire_contact'];


    var civilite = form.civilite.value;
    var nom = form.nom.value;
    var prenom = form.prenom.value;
    var profession = form.profession.value;
    var societe = form.societe.value;
    var adresse1 = form.adresse1.value;
    var adresse2 = form.adresse2.value;
    var codepostal = form.codepostal.value;
    var ville = form.ville.value;
    var pays = form.pays.value;
    var tel = form.tel.value;
    var email = form.email.value;
    var message = form.message.value;
    
    
    
    
    
//alert(phototheque_titre);

   qstr = 'civilite=' + escape(civilite)
    + '&nom=' + escape(nom)
    + '&prenom=' + escape(prenom)
    + '&profession=' + escape(profession)
    + '&societe=' + escape(societe)
    + '&adresse1=' + escape(adresse1)
    + '&adresse2=' + escape(adresse2)
    + '&codepostal=' + escape(codepostal)
    + '&ville=' + escape(ville)
    + '&pays=' + escape(pays)
    + '&tel=' + escape(tel)
    + '&email=' + escape(email)
    + '&message=' + escape(message);


    
    
    // Remarque: pas de '?' avant la chaï¿½ne de requï¿½te
    return qstr;
}


function majchat() {

// var php = 'connectes.php';
// var divv = 'compute-liste-des-membres2';

// var param1 = 'xmlhttpPost(' + php + ',' + divv + ')';
// var param2 = 1000;

// setInterval(param1,param2);



}


///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostMembres(strURL, dividcible) {
    var xmlHttpReqMembres = false;
    var self = this;
    
	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReqMembres = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReqMembres = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReqMembres.open('POST', strURL, true);

    self.xmlHttpReqMembres.onreadystatechange = function() {
		if (self.xmlHttpReqMembres.readyState < 4)
			{
updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
	        }
        if (self.xmlHttpReqMembres.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReqMembres.responseText; // eval()
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReqMembres.send(null);
}








///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostEditionTable(strURL,dividcible,
formidsource,
action,
objet,
nombre_de_champs_de_selection,
nom_du_champ_de_selection1_dans_la_table,
valeur_de_critere_de_selection1_dans_la_table,
nom_du_champ_de_selection2_dans_la_table,
valeur_de_critere_de_selection2_dans_la_table,
nom_du_champ_de_selection3_dans_la_table,
valeur_de_critere_de_selection3_dans_la_table,
nom_de_la_table,
nom_du_champ_dans_la_table) {

	if (action == 'effacer'){
		document.getElementById(objet).value = '';
	}

    var xmlHttpReqEditionTable = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReqEditionTable = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReqEditionTable = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReqEditionTable.open('POST', strURL, true);
//    self.xmlHttpReqEditionTable.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
    self.xmlHttpReqEditionTable.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReqEditionTable.onreadystatechange = function() {
		if (self.xmlHttpReqEditionTable.readyState < 4)
			{
				updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
	        }
        if (self.xmlHttpReqEditionTable.readyState == 4) // && self.xmlHttpReq.status == 200
	        {
				if(self.xmlHttpReqEditionTable.responseText != null)
	        		{
						updatepage(self.xmlHttpReqEditionTable.responseText,dividcible);
						    
    		    	}
	        	else
	        		{
	        			updatepage("Erreur ....",dividcible);
	        		}
	        }
    }
   self.xmlHttpReqEditionTable.send(getquerystringEditionTable(
   formidsource,
   action,
   objet,
	nombre_de_champs_de_selection,
   nom_du_champ_de_selection1_dans_la_table,
   valeur_de_critere_de_selection1_dans_la_table,
	nom_du_champ_de_selection2_dans_la_table,
	valeur_de_critere_de_selection2_dans_la_table,
nom_du_champ_de_selection3_dans_la_table,
valeur_de_critere_de_selection3_dans_la_table,
   nom_de_la_table,
   nom_du_champ_dans_la_table));
}  


function getquerystringEditionTable(
formidsource,
action,
objet,
nombre_de_champs_de_selection,
nom_du_champ_de_selection1_dans_la_table,
valeur_de_critere_de_selection1_dans_la_table,
	nom_du_champ_de_selection2_dans_la_table,
	valeur_de_critere_de_selection2_dans_la_table,
nom_du_champ_de_selection3_dans_la_table,
valeur_de_critere_de_selection3_dans_la_table,
nom_de_la_table,
nom_du_champ_dans_la_table) {




	var contenuobjet = document.getElementById(objet).value; // undefined si l'objet ne contient pas de texte
	
	


	
	qstr = 'formidsource=' + escape(formidsource)
	+ '&action=' + escape(action)
	+ '&objet=' + escape(objet)
	+ '&nombre_de_champs_de_selection=' + escape(nombre_de_champs_de_selection)
	
	
	+ '&nom_du_champ_de_selection1_dans_la_table=' + escape(nom_du_champ_de_selection1_dans_la_table)
	+ '&valeur_de_critere_de_selection1_dans_la_table=' + escape(valeur_de_critere_de_selection1_dans_la_table)
	
	
	+ '&nom_du_champ_de_selection2_dans_la_table=' + escape(nom_du_champ_de_selection2_dans_la_table)
	+ '&valeur_de_critere_de_selection2_dans_la_table=' + escape(valeur_de_critere_de_selection2_dans_la_table)	
	
	
	+ '&nom_du_champ_de_selection3_dans_la_table=' + escape(nom_du_champ_de_selection2_dans_la_table)
	+ '&valeur_de_critere_de_selection3_dans_la_table=' + escape(valeur_de_critere_de_selection2_dans_la_table)	
	
	
	+ '&nom_de_la_table=' + escape(nom_de_la_table)	
	+ '&nom_du_champ_dans_la_table=' + escape(nom_du_champ_dans_la_table)	
	
	

	+ '&contenuobjet=' + escape(contenuobjet);

    // Remarque: pas de '?' avant la chaine de requï¿½te
    return qstr;
    

}
///////////////////////////////////////////////////////////////////////////////////////////////////









///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostGalerieImage(strURL, dividcible) {
    var xmlHttpReqGalerieImage = false;
    var self = this;

	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReqGalerieImage = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReqGalerieImage = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReqGalerieImage.open('POST', strURL, true);

    self.xmlHttpReqGalerieImage.onreadystatechange = function() {
		if (self.xmlHttpReqGalerieImage.readyState < 4)
			{
//updatepage('<img src="../medias/images/wait.gif" height="16" width="16" />',dividcible);
				
	        }
        if (self.xmlHttpReqGalerieImage.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReqGalerieImage.responseText;
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReqGalerieImage.send(null);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostGalerieTitre(strURL, dividcible) {
    var xmlHttpReqGalerieTitre = false;
    var self = this;

	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReqGalerieTitre = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReqGalerieTitre = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReqGalerieTitre.open('POST', strURL, true);

    self.xmlHttpReqGalerieTitre.onreadystatechange = function() {
		if (self.xmlHttpReqGalerieTitre.readyState < 4)
			{
updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
				
	        }
        if (self.xmlHttpReqGalerieTitre.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReqGalerieTitre.responseText;
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReqGalerieTitre.send(null);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostGalerieCommentaire(strURL, dividcible) {
    var xmlHttpReqGalerieCommentaire = false;
    var self = this;

	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReqGalerieCommentaire = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReqGalerieCommentaire = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReqGalerieCommentaire.open('POST', strURL, true);

    self.xmlHttpReqGalerieCommentaire.onreadystatechange = function() {
		if (self.xmlHttpReqGalerieCommentaire.readyState < 4)
			{
updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
				
	        }
        if (self.xmlHttpReqGalerieCommentaire.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReqGalerieCommentaire.responseText;
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReqGalerieCommentaire.send(null);
}





//----------------------------------------------------------------------------------
// Fonctions de gestion des cookies d'après http://www.actulab.com/les-cookies-en-javascript.php
// Attention: Ne pas modifier ces fonctions
// La personnalisation se fait dans les scripts d'appel de ces fonctions
//----------------------------------------------------------------------------------
function EcrireCookie(nom, valeur)
{
   var argv=EcrireCookie.arguments;
   var argc=EcrireCookie.arguments.length;
   var expires=(argc > 2) ? argv[2] : null;
   var path=(argc > 3) ? argv[3] : null;
   var domain=(argc > 4) ? argv[4] : null;
   var secure=(argc > 5) ? argv[5] : false;
   document.cookie=nom+"="+escape(valeur)+
      ((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
      ((path==null) ? "" : ("; path="+path))+
      ((domain==null) ? "" : ("; domain="+domain))+
      ((secure==true) ? "; secure" : "");
}
function getCookieVal(offset)
{
   var endstr=document.cookie.indexOf (";", offset);
   if (endstr==-1) endstr=document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}
function LireCookie(nom)
{
   var arg=nom+"=";
   var alen=arg.length;
   var clen=document.cookie.length;
   var i=0;
   while (i<clen)
   {
      var j=i+alen;
      if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
      i=document.cookie.indexOf(" ",i)+1;
      if (i==0) break;
   }
   return null;
}
function EffaceCookie(nom)
{
date=new Date;
date.setFullYear(date.getFullYear()-1);
EcrireCookie(nom,null,date);
}





function cookierea(valeur)
{
	// Donner à la variable rea la valeur du cookie
	rea=LireCookie("rea");
	if (rea==null)
	{ // Le cookie rea n'existe pas, donner la valeur 'valeur' à rea
	rea=valeur;
	}
	// Ecrire le cookie, valide 600 mois
	date=new Date;
	date.setMonth(date.getMonth()+600);
	EcrireCookie("rea", rea, date);
}



///////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPostmot_de_passe_oublie(strURL,dividcible) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
//    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState < 4){
				updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
	        }
        if (self.xmlHttpReq.readyState == 4){ // && self.xmlHttpReq.status == 200
				if(self.xmlHttpReq.responseText != null){
						updatepage(self.xmlHttpReq.responseText,dividcible);
    		    	}
	        	else {
	        			updatepage("Erreur ....",dividcible);
	        		}

	        }
    }
    self.xmlHttpReq.send(getquerystringmot_de_passe_oublie());
}








function getquerystringmot_de_passe_oublie() {
    var form = document.forms['mot_de_passe_oublie'];


    var email = form.email.value;
    
    
    
    
    
//alert(phototheque_titre);

   qstr = 'email=' + escape(email);


    
    
    // Remarque: pas de '?' avant la chaï¿½ne de requï¿½te
    return qstr;
}









///////////////////////////////////////////////////////////////////////////////////////////////////
function updatepageinvite(str,dividcible){
    document.getElementById(dividcible).innerHTML = str;
}




function contenu_element(dividcible){
	
	
	res = document.getElementById(dividcible);
	return res.value;
}








///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

//function xmlhttpPostForum(strURL,dividcible,iddomaines) {
//
//    var xmlHttpReqForum = false;
//    var self = this;
//    // Mozilla/Safari
//    if (window.XMLHttpRequest) {
//        self.xmlHttpReqForum = new XMLHttpRequest();
//    }
//    // IE
//    else if (window.ActiveXObject) {
//        self.xmlHttpReqForum = new ActiveXObject("Microsoft.XMLHTTP");
//    }
//    self.xmlHttpReqForum.open('POST', strURL, true);
////    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
//    self.xmlHttpReqForum.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    self.xmlHttpReqForum.onreadystatechange = function() {
//
////updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
//
//
//        if (self.xmlHttpReqForum.readyState == 4){ // && self.xmlHttpReq.status == 200
//				if(self.xmlHttpReqForum.responseText != null){
//						updatepage(self.xmlHttpReqForum.responseText,dividcible);
//    		    	}
//	        	else {
//	        			updatepage("Erreur ....",dividcible);
//	        		}
//
//	        }
//    }
//    self.xmlHttpReqForum.send(Forum(iddomaines));
//}
//
//function Forum(iddomaines) {
//   qstr = 'iddomaines=' + escape(iddomaines);
//    return qstr;
//}




//function xmlhttpPostForum(strURL,dividcible,iddomaines) {
//    var xmlHttpReqForum = false;
//    var self = this;
//    // Mozilla/Safari
//    if (window.XMLHttpRequest) {
//        self.xmlHttpReqForum = new XMLHttpRequest();
//    }
//    // IE
//    else if (window.ActiveXObject) {
//        self.xmlHttpReqForum = new ActiveXObject("Microsoft.XMLHTTP");
//    }
//    self.xmlHttpReqForum.open('POST', strURL, true);
////    self.xmlHttpReq.setRequestHeader('Content-Type', 'text/html;charset=utf-8');
//    self.xmlHttpReqForum.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    self.xmlHttpReqForum.onreadystatechange = function() {
//		if (self.xmlHttpReqForum.readyState < 4){
//				updatepage('<img src="../medias/images/wait.gif" height="16" width="16"  alt="Patientez" title="Patientez"/>',dividcible);
//	        }
//        if (self.xmlHttpReqForum.readyState == 4){ // && self.xmlHttpReq.status == 200
//				if(self.xmlHttpReqForum.responseText != null){
//						updatepage(self.xmlHttpReqForum.responseText,dividcible);
//    		    	}
//	        	else {
//	        			updatepage("Erreur ....",dividcible);
//	        		}
//
//	        }
//    }
//    self.xmlHttpReqForum.send(getquerystringForum(iddomaines));
//}
//
//
//
//
//
//
//
//
//function getquerystringForum(iddomaines) {
//
//    
//    
//    
//    
////alert(phototheque_titre);
//
//   qstr = 'iddomaines=' + escape(iddomaines);
//
//
//    
//    
//    // Remarque: pas de '?' avant la chaï¿½ne de requï¿½te
//    return qstr;
//}











function xmlhttpPostDep(strURL, dividcible) {
    var xmlHttpReq1 = false;
    var self = this;

	if (window.XMLHttpRequest)
		{
			// If IE7, Mozilla, Safari, etc: Use native object
			self.xmlHttpReq1 = new XMLHttpRequest();
		}
	else
		{
			if (window.ActiveXObject)
				{
			          // ...otherwise, use the ActiveX control for IE5.x and IE6
			          self.xmlHttpReq1 = new ActiveXObject("Microsoft.XMLHTTP");
				}
		}

    self.xmlHttpReq1.open('POST', strURL, false);

    self.xmlHttpReq1.onreadystatechange = function() {
		if (self.xmlHttpReq1.readyState < 4)
			{
				updatepage('<center><img src="../medias/images/wait.gif" height="16" width="16" alt="Patientez" title="Patientez"/></center>',dividcible);
				
	        }
        if (self.xmlHttpReq1.readyState == 4) // && self.xmlHttpReq1.status == 200
	        {
//				if(self.xmlHttpReq1.responseText != null && self.xmlHttpReq1.responseText.getElementById(dividcible)) //.firstChild.data
//	        	{

				document.getElementById(dividcible).innerHTML = ""; // 

	        	document.getElementById(dividcible).innerHTML = self.xmlHttpReq1.responseText;
//	        	}
//	        	else
//	        	{
//	        		document.getElementById(dividcible).innerHTML = "erreur ....";
//	        	}
//
	        }
    }
    self.xmlHttpReq1.send(null);
}




























