/* ::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::
    OVERTURE DU MOT DE PASSE OUBLIÉ
   ::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::
*/

var xmlhttp=false;

try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
} catch (e) {
	try {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
		xmlhttp = false;
	}
}

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	xmlhttp = new XMLHttpRequest();
}
var form_forget_pass = '';
function forget_mdp(){
	if(form_forget_pass == ''){
		form_forget_pass=document.getElementById("forget_pass_content").innerHTML;
		
		}
	else{
		document.getElementById("forget_pass_content").innerHTML=form_forget_pass;
		}
	HidePage('forget_mdp');
	
}
function my_infos_back(){

	var email 	= document.getElementById("email").value;
	var forget_pass_content =document.getElementById("forget_pass_content");
	
	var params = "do_action=my_mdp&email="+email;
	xmlhttp.open("POST", "my_process.php", true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			switch (xmlhttp.responseText) {
				case "ok":
					HideBubble();
					
					forget_pass_content.innerHTML = '<h4 id="msg">'+MISC_MSG_MAIL_CONNECTION+'</h4>'
					+'<div class="btn_fermer"><a href="javascript:ShowPage()" title="'+MISC_CLOSE+'"><span>'+MISC_CLOSE+'</span></a></div>'
					
				break;
				default:
					ShowBubble(MISC_MSG_WRONG_MAIL);
				break;
			}
		}
	}
	xmlhttp.send(params);
}

function my_log(){
	
	var member_login   = document.getElementById("member_login").value
	var member_password= document.getElementById("member_password").value;
	var result = false;
	if (member_login != "" && member_password!=""){
		HideBubble();
		return true;
	}
	ShowBubble(MISC_MSG_INFOS_CONNECT);
	return result;
}
/* ::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::
    DEFILEMENT DES TEMOIGNAGES
   ::::::::::::::::::::::::::::::::::::::::::
   ::::::::::::::::::::::::::::::::::::::::::
*/
var array_testimony= new Array();

function infos_testimony(id,testimonys_member_pseudo,testimonys_member_age,testimonys_member_txt,testimonys_member_picto){
	this.id = id;
	this.testimonys_member_pseudo = testimonys_member_pseudo;
	this.testimonys_member_age = testimonys_member_age;
	this.testimonys_member_txt = testimonys_member_txt;
	this.testimonys_member_picto = testimonys_member_picto;
}

function show_testimony(index){
	current_index_testimony=index;
	document.getElementById("testimonys_member_picto").src = array_testimony[index].testimonys_member_picto;
	document.getElementById("testimonys_member_pseudo").innerHTML  = array_testimony[index].testimonys_member_pseudo;
	document.getElementById("testimonys_member_age").innerHTML  = array_testimony[index].testimonys_member_age;
	document.getElementById("testimonys_member_txt").innerHTML  = array_testimony[index].testimonys_member_txt;
	
	
	}
function next_testimony(){
	if(current_index_testimony<array_testimony.length-1){
		show_testimony(current_index_testimony+1);
	}
	else{
		show_testimony(0);
	}
	
}
function prev_testimony(){
	if(current_index_testimony>0){
		show_testimony(current_index_testimony-1);
	}
	else{
		show_testimony(array_testimony.length-1);
	}
}

