var popupStatus = 0; 
function centerPopup(idDiv, idDivBackground, top, left){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#"+idDiv).height();
	var popupWidth = $("#"+idDiv).width();
	
	//centering
	$("#"+idDiv).css({
	"position": "absolute",
	"top": top,
	"left": left,
	"z-index":100
	});
	//only need force for IE6
	
	$("#"+idDivBackground).css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopup(idDiv, idDivBackground){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#"+idDivBackground).css({
		"opacity": "0.7"
		});
		$("#"+idDivBackground).fadeIn("slow");
		$("#"+idDiv).fadeIn("slow");
		popupStatus = 1;
	}
}


//disabling popup with jQuery magic!
function disablePopup(idDiv, idDivClose){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#"+idDiv).fadeOut("slow");
		$("#"+idDivClose).fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopupPassePerdu(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupPassePerdu").height();
	var popupWidth = $("#popupPassePerdu").width();
	
	//centering
	$("#popupPassePerdu").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});
	
	$("#backgroundPopup2").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupPassePerdu(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup2").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#backgroundPopup2").fadeIn("slow");
		$("#popupPassePerdu").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupPassePerdu(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupPassePerdu").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopupInscriptionReussi(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupInscriptionReussi").height();
	var popupWidth = $("#popupInscriptionReussi").width();
	
	//centering
	$("#popupInscriptionReussi").css({
	"position": "absolute",
	"top": 120,
	"left": 70
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupInscriptionReussi(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupInscriptionReussi").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupInscriptionReussi(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupInscriptionReussi").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopupLoginRate(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupLoginRate").height();
	var popupWidth = $("#popupLoginRate").width();
	
	//centering
	$("#popupLoginRate").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupLoginRate(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupLoginRate").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupLoginRate(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupLoginRate").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopupFlash(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupFlash").height();
	var popupWidth = $("#popupFlash").width();
	
	//centering
	$("#popupFlash").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopupFlash").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupFlash(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopupFlash").css({
		"opacity": "0.7"
		});
		$("#backgroundPopupFlash").fadeIn("slow");
		$("#popupFlash").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupFlash(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopupFlash").fadeOut("slow");
		$("#popupFlash").fadeOut("slow");
		popupStatus = 0;
	}
}

//centering popup
function centerPopupClinDoeil(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupClinDoeil").height();
	var popupWidth = $("#popupClinDoeil").width();
	
	//centering
	$("#popupClinDoeil").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopupClinDoeil").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupClinDoeil(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopupClinDoeil").css({
		"opacity": "0.7"
		});
		$("#backgroundPopupClinDoeil").fadeIn("slow");
		$("#popupClinDoeil").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupClinDoeil(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopupClinDoeil").fadeOut("slow");
		$("#popupClinDoeil").fadeOut("slow");
		popupStatus = 0;
	}
}

function centerPopupPseudo(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupPseudo").height();
	var popupWidth = $("#popupPseudo").width();
	
	//centering
	$("#popupPseudo").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}


function centerPopupDesactivation(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupDesactivation").height();
	var popupWidth = $("#popupDesactivation").width();
	
	//centering
	$("#popupDesactivation").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}


//loading popup with jQuery magic!
function loadPopupPseudo(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupPseudo").fadeIn("slow");
		popupStatus = 1;
	}
}


//loading popup with jQuery magic!
function loadPopupDesactivation(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupDesactivation").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupPseudo(){
	//disables popup only if it is enabled
	//if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupPseudo").fadeOut("slow");
		// $("#popupDesactivation").fadeOut("slow");
		popupStatus = 0;
	//}
}

function centerPopupPseudo3(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupPseudo3").height();
	var popupWidth = $("#popupPseudo3").width();
	
	//centering
	$("#popupPseudo3").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup3").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupPseudo3(){
	//loads popup only if it is disabled
		$("#backgroundPopup3").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup3").fadeIn("slow");
		$("#popupPseudo3").fadeIn("slow");
}

//disabling popup with jQuery magic!
function disablePopupPseudo3(){
	//disables popup only if it is enabled
	//if(popupStatus==1){
		$("#backgroundPopup3").fadeOut("slow");
		$("#popupPseudo3").fadeOut("slow");
		popupStatus = 0;
	//}
}


function centerPopupNavigateur(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupNavigateur").height();
	var popupWidth = $("#popupNavigateur").width();
	
	//centering
	$("#popupNavigateur").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopupNavigateur").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupNavigateur(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopupNavigateur").css({
		"opacity": "0.7"
		});
		$("#backgroundPopupNavigateur").fadeIn("slow");
		$("#popupNavigateur").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupNavigateur(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopupNavigateur").fadeOut("slow");
		$("#popupNavigateur").fadeOut("slow");
		popupStatus = 0;
	}
}

function centerPopupRechercheParPseudo(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupRecherchePseudo").height();
	var popupWidth = $("#popupRecherchePseudo").width();
	
	//centering
	$("#popupRecherchePseudo").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}





function centerPopupRechercheRapide(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupRechercheRapide").height();
	var popupWidth = $("#popupRechercheRapide").width();
	
	//centering
	$("#popupRechercheRapide").css({
	"position": "absolute",
	"top": 250,
	"left": 250,
	"z-index":10
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupRechercheParPseudo(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupRecherchePseudo").fadeIn("slow");
		popupStatus = 1;
	}
}





//loading popup with jQuery magic!
function loadPopupRechercheRapide(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupRechercheRapide").fadeIn("slow");
		popupStatus = 1;
	}
}





//disabling popup with jQuery magic!
function disablePopupRechercheParPseudo(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupRecherchePseudo").fadeOut("slow");
		popupStatus = 0;
	}
}






//disabling popup with jQuery magic!
function disablePopupRechercheRapide(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupRechercheRapide").fadeOut("slow");
		popupStatus = 0;
	}
}




//centering popup
function centerPopupChat(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupChat").height();
	var popupWidth = $("#popupChat").width();

	//centering
	$("#popupChat").css({
	"position": "absolute",
	"top": 250,
	"left": 250,
        "z-index":10
	});
	//only need force for IE6

	$("#backgroundPopupChat").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupChat(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopupChat").css({
		"opacity": "0.7"
		});
		$("#backgroundPopupChat").fadeIn("slow");
		$("#popupChat").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupChat(){
	$("#notificationChat").hide();
}

function centerPopupErreur(){
	//request data for centering
	var windowWidth = "880";
	//document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupErreur").height();
	var popupWidth = $("#popupErreur").width();
	
	//centering
	$("#popupErreur").css({
	"position": "absolute",
	"top": 250,
	"left": 250
	});
	//only need force for IE6
	
	$("#backgroundPopup").css({
	"height": windowHeight
	});

}

//loading popup with jQuery magic!
function loadPopupErreur(){
	//loads popup only if it is disabled
	if(popupStatus==0){
		$("#backgroundPopup").css({
		"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupErreur").fadeIn("slow");
		popupStatus = 1;
	}
}

//disabling popup with jQuery magic!
function disablePopupErreur(){
	//disables popup only if it is enabled
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupErreur").fadeOut("slow");
		popupStatus = 0;
	}
}
