$(window).load(function() {
$(".getLigneTab//tr:even").addClass("getLigneTabPair");
//$("#pass1").pstrength();
//$("#passNew").pstrength();
$("#bulleAddFriends").css("display", "inline");
$("#bulleBlackFriends").css("display", "inline");
$("#bulleSentFriends").css("display", "inline");
$("#bulleGestFriends").css("display", "inline");
$("#bullMsgDel").css("display", "inline");
$("#bullMsgAdd1").css("display", "inline");
$("#bullMsgAdd2").css("display", "inline");
$("#bulleAddFriends").hide();
$("#bulleBlackFriends").hide();
$("#bulleSentFriends").hide();
$("#bulleGestFriends").hide();
$("#bullMsgDel").hide();
$("#bullMsgAdd1").hide();
$("#bullMsgAdd2").hide();
$("#supMsgTo").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=delTo&input=" + inputChecked, "inbox");
});
$("#supMsgFrom").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=delFrom&input=" + inputChecked, "inbox");
});
$(".linkOrange").mouseover(function () {
$(this).css('background-color', 'orange');
});
$(".linkOrange").mouseout(function () {
$(this).css('background-color', '#7fa5be');
});
$("#linkWhatDo").click(function () {
if(document.getElementById("divHumeur").style.display=="none")
{
$("#divHumeur").show();
$("#divWhatDo").hide();
}
else
{
$("#divHumeur").hide();
$("#divWhatDo").show();
}
});
$("#divHumeur").click(function () {
if(document.getElementById("divHumeur").style.display=="none")
{
$("#divHumeur").show();
$("#divWhatDo").hide();
}
else
{
$("#divHumeur").hide();
$("#divWhatDo").show();
}
});
$(".checkButtonRecherche").click(function () {
if(typeof($("#sexeF").attr("checked")) == 'undefined')
var sexeF = 'false';
else
var sexeF = $("#sexeF").attr("checked");
if(typeof($("#sexeH").attr("checked")) == 'undefined')
var sexeH = 'false';
else
var sexeH = $("#sexeH").attr("checked");
if(typeof($("#situationC").attr("checked")) == 'undefined')
var situationC = 'false';
else
var situationC = $("#situationC").attr("checked");
if(typeof($("#situationD").attr("checked")) == 'undefined')
var situationD = 'false';
else
var situationD = $("#situationD").attr("checked");
$.ajax({
type: "GET",
url: "/includes/ajax/rechercheNbMembreOnline.php",
data: "sexeF=" + sexeF + "&sexeH=" + sexeH + "&situationC=" + situationC + "&situationD=" + situationD,
success: function(html){
$("#nbDivRechercheOnline").html(html);
}
});
ajaxpage("/includes/ajax/rechercheMembreOnline.php?sexeF=" + sexeF + "&sexeH=" + sexeH + "&situationC=" + situationC + "&situationD=" + situationD, "divRechercheOnline");
ajaxpage("/includes/ajax/rechercheMembreLast.php?sexeF=" + sexeF + "&sexeH=" + sexeH + "&situationC=" + situationC + "&situationD=" + situationD, "divRechercheLast");
});
$(".checkButtonRechercheFiche").click(function () {
var id = $("#idMembre").val();
if(typeof($("#sexeF").attr("checked")) == 'undefined')
var sexeF = 'false';
else
var sexeF = $("#sexeF").attr("checked");
if(typeof($("#sexeH").attr("checked")) == 'undefined')
var sexeH = 'false';
else
var sexeH = $("#sexeH").attr("checked");
if(typeof($("#online1").attr("checked")) == 'undefined')
var online1 = 'false';
else
var online1 = $("#online1").attr("checked");
if(typeof($("#online2").attr("checked")) == 'undefined')
var online2 = 'false';
else
var online2 = $("#online2").attr("checked");
ajaxpage("/includes/ajax/rechercheMembreFiche.php?id=" + id + "&sexeF=" + sexeF + "&sexeH=" + sexeH + "&online1=" + online1 + "&online2=" + online2, "divRechercheFiche");
});
$("#supMsg").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'recherche_fille' && $(this).attr("id") != 'recherche_garcon' && $(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=delMsg&input=" + inputChecked, "inbox");
});
$("#tagGreenMsg").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=tagGreen&input=" + inputChecked, "inbox");
});
$("#tagBlueMsg").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=tagBlue&input=" + inputChecked, "inbox");
});
$("#allBox").click(function () {
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox')
{
if(typeof($(this).attr("checked")) == 'undefined')
document.getElementById($(this).attr("id")).checked = true;
else
document.getElementById($(this).attr("id")).checked = false;
}
});
});
$("#msgInbox").click(function () {
$("#msgInbox").addClass("blanc");
$("#msgSent").removeClass("blanc");
$("#limsgInbox").addClass("blanc");
$("#limsgSent").removeClass("blanc");
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox", "inbox");
});
$("#linkAddPhoto").click(function () {
$("#divAddPhoto").css("padding-top", "15px");
$("#divAddPhoto").show();
//ajaxpage("/includes/ajax/albumAdd.php", "divAddPhoto");
});
$("#linkListPhoto").click(function () {
$("#divAddPhoto").hide();
$("#titre").val("");
$("#description").val("");
ajaxpage("/includes/ajax/albumList.php", "divListPhoto");
});
$("#linkCancelGoPhoto").click(function () {
$("#titre").val("");
$("#description").val("");
$("#noAccess").html("");
$("#divAddPhoto").hide();
});
$("#linkAddGoPhoto").click(function () {
if($("#titre").val() == '')
{
$("#description").val("");
}
else
{
$("#divAddPhoto").hide();
ajaxpage("/includes/ajax/albumAdd.php?titre=" + $("#titre").val() + "&description=" + $("#description").val() + "&type=" + $("#type").val() + "", "divListPhoto");
$("#titre").val("");
$("#description").val("");
}
});
$("#msgSent").click(function () {
$("#msgSent").addClass("blanc");
$("#msgInbox").removeClass("blanc");
$("#limsgSent").addClass("blanc");
$("#limsgInbox").removeClass("blanc");
ajaxpage("/includes/ajax/getMessagerie.php?type=sent", "inbox");
});
$("#submitWhatDo").click(function () {
if($("#inputWhatDo").val() != '')
{
$.ajax({
type: "POST",
url: "/includes/ajax/whatDoYouDo.php",
data: "humeur=" + $("#inputWhatDo").val(),
success: function(html){
$("#whatDoLive").html("");
$("#inputWhatDo").val($("#inputWhatDo").val());
$("#divWhatDo").hide();
$("#divHumeur").hide();
$("#divHumeur").html(html);
$("#divHumeur").show();
}
});
}
});
$("#submitWhatDoClear").click(function () {
$.ajax({
type: "POST",
url: "/includes/ajax/whatDoYouDo.php",
data: "humeur=",
success: function(html){
$("#whatDoLive").html("");
$("#inputWhatDo").val("Entrez votre humeur du jour");
$("#divWhatDo").hide();
$("#divHumeur").hide();
$("#divHumeur").html(html);
$("#divHumeur").show();
}
});
});
$('#inputWhatDo').keyup(function(e) {
$("#whatDoLive").html($("#inputWhatDo").val());
if(e.keyCode == 13) {
$.ajax({
type: "POST",
url: "/includes/ajax/whatDoYouDo.php",
data: "humeur=" + $("#inputWhatDo").val(),
success: function(html){
$("#whatDoLive").html("");
$("#inputWhatDo").val($("#inputWhatDo").val());
$("#divWhatDo").hide();
$("#divHumeur").hide();
$("#divHumeur").html(html);
$("#divHumeur").show();
}
});
}
});
$("#register").hide();
$(".register").click(function () {
$("#register").css("height", "150px");
$("#register").css("background-color", "green");
$("#register").css("color", "white");
$("#register").slideToggle("slow");
$("#register").html("
Nom : ");
});
$(".clickPlan").click(function () {
var idDiv = $(this).attr('idDiv');
var rel = $(this).attr('rel');
$("." + idDiv).toggle();
if($("." + idDiv).css('display') == 'block')
$('.flecheGmap').attr('src', '/view/images//fleche_haut_gris.jpg');
else
$('.flecheGmap').attr('src', '/view/images//fleche_bas_gris.jpg');
});
$("#submitEmail").click(function () {
if($('#alertEmail').val() != '')
{
$.ajax({
url: '/includes/ajax/go_email.php',
type: "POST",
data: "email="+$('#alertEmail').val(),
cache: false,
success: function(html){
alert(html);
}
});
}
});
$("#submitSms").click(function () {
if($('#alertSms').val() != '')
{
$.ajax({
url: '/includes/ajax/go_sms.php',
type: "POST",
data: "tel="+$('#alertSms').val(),
cache: false,
success: function(html){
alert(html);
}
});
}
});
$(".clickdivSoireePack").click(function () {
$(".divSoireePack").each(function () {
$(this).hide();
});
$(".clickdivSoireePack").each(function () {
$(this).removeClass('blanc');
});
$(".liclickdivSoireePack").each(function () {
$(this).removeClass('blanc');
});
$("#li-" + $(this).attr('id')).addClass('blanc');
$(this).addClass('blanc');
$("#divSoireePack-" + $(this).attr('id')).show();
});
$(".clickListBlocDroite").click(function () {
$(".clickListBlocDroite").each(function () {
$(this).removeClass('blanc');
var idClick = $(this).attr('idClick');
$('#liDroite-' + idClick).removeClass('blanc');
});
var idClick = $(this).attr('idClick');
$('#liDroite-' + idClick).addClass('blanc');
$(this).addClass('blanc');
});
$(".clickListPass").click(function () {
$(".clickListPass").each(function () {
$(this).removeClass('blanc');
var idClick = $(this).attr('idClick');
$('#li-' + idClick).removeClass('blanc');
});
var idClick = $(this).attr('idClick');
$('#li-' + idClick).addClass('blanc');
$(this).addClass('blanc');
});
$(".clickDiv").hover(function () {
var idDiv = $(this).attr('idDiv');
hoverAnpm(idDiv,$(this));
});
$('#input_recherche').focus(function () {
$(this).val('');
});
$("#sliderListeHome").easySlider({
prevText: '
',
nextText: '
'
});
$("#sliderTopLieu").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn2',
nextId: 'nextBtn2'
});
$("#sliderListePass").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn3',
nextId: 'nextBtn3'
});
$("#sliderListePassAjax").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn8',
nextId: 'nextBtn8'
});
$("#nextSoiree").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn4',
nextId: 'nextBtn4'
});
$("#avoirAussiLieu").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn5',
nextId: 'nextBtn5'
});
$("#nextSoireePackPrec").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn6',
nextId: 'nextBtn6'
});
$("#prevSoireePackPrec").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn8',
nextId: 'nextBtn8'
});
$("#comptePast").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn7',
nextId: 'nextBtn7'
});
$("#sliderListeSoiree").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn9',
nextId: 'nextBtn9'
});
$("#nextSoireePackSuiv").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn10',
nextId: 'nextBtn10'
});
$("#tab_friends").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn11',
nextId: 'nextBtn11'
});
$("#tab_friends_visite").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn12',
nextId: 'nextBtn12'
});
$("#tab_friends_request").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn13',
nextId: 'nextBtn13'
});
$("#tab_ficheMembre_soiree_prefere").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn14',
nextId: 'nextBtn14'
});
$("#tab_ficheMembre_lieu_prefere").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn15',
nextId: 'nextBtn15'
});
$("#tab_liste_friends_fiche").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn16',
nextId: 'nextBtn16'
});
$("#sliderFlyerLieu").easySlider({
prevText: '
',
nextText: '
',
prevId: 'prevBtn17',
nextId: 'nextBtn17'
});
$('.clickAccordeon').click(function () {
if($("#Accordeon-" + $(this).attr('idAccordeon')).css('display') == 'none')
{
$('.accordeon').each(function () {
$(this).slideUp();
});
$('.flecheAccordeon').each(function () {
$(this).attr('src','/view/images/fleche_bas.jpg');
});
$("#fleche-" + $(this).attr('idAccordeon')).attr('src','/view/images/fleche_haut.jpg');
$("#Accordeon-" + $(this).attr('idAccordeon')).slideDown();
}
});
$('#input_recherche').keyup(function () {
if($(this).val() != '')
{
$.ajax
({
type: "POST",
url: "/includes/ajax/searchAutocompletion.php",
data: "value=" + $(this).val(),
success: function(html){
$('#recherche_prop').show();
$("#recherche_prop").html(html);
//setTimeout("dPause('recherche_prop')", 15000);
}
});
}
else
{
$('#recherche_prop').fadeOut('slow');
}
});
$(".dayAjax").click(function () {
var idLi = $(this).attr('idLi');
$(".dayAjax").each(function () {
$(this).removeClass("blanc");
$(this).addClass("dayAjax");
});
$(".ClickDayAjax").each(function () {
$(this).removeClass("blanc");
});
$(this).addClass("blanc dayAjax");
$("#li-" + idLi).addClass("blanc ClickDayAjax");
});
$(".checkStyleMusique").click(function () {
if($(this).attr('id') == 'v2Musique_00')
{
}
else
{
var total = 0;
$(".checkStyleMusique").each(function () {
if($(this).attr('checked') == true)
total = total + 1;
});
if(total > 5)
{
$(this).attr({checked:''});
}
}
});
});
function getTypePass(value)
{
if(value == 2)
{
$("#tarif_pass").val("");
$("#showPassSoiree").html($("#tarif_pass").val());
$("#showTypeSoiree").html("REDUCTION X1");
document.getElementById("tarif_pass").disabled = false;
}
else if(value == 3)
{
$("#tarif_pass").val("");
$("#showPassSoiree").html($("#tarif_pass").val());
$("#showTypeSoiree").html("DRINK PASS X1");
document.getElementById("tarif_pass").disabled = false;
}
else
{
$("#tarif_pass").val("ENTREE GRATUITE");
$("#showPassSoiree").html($("#tarif_pass").val());
$("#showTypeSoiree").html("PASS X1");
document.getElementById("tarif_pass").disabled = true;
}
}
function getFille()
{
if(document.getElementById("validite_fille").checked == false)
{
if(document.getElementById("val_mn").disabled == true)
{
$("#showPassValable").html("(Valable toute la soirée.)");
}
else
{
$("#showPassValable").html("(Valable pour 1 personne avant " + $("#val_heure").val() + "h" + $("#val_mn").val() + ")");
}
}
else
{
if(document.getElementById("val_mn").disabled == false)
{
$("#showPassValable").html("(Valable pour 1 fille avant " + $("#val_heure").val() + "h" + $("#val_mn").val() + ")");
}
else
{
$("#showPassValable").html("(Valable toute la soirée pour 1 fille.)");
}
}
}
function getTarifPass(value)
{
$("#showPassSoiree").html(document.getElementById("tarif_pass").value.toUpperCase());
}
function getValiditePass1()
{
document.getElementById("val_mn").disabled = true;
document.getElementById("val_heure").disabled = true;
if(document.getElementById("validite_fille").checked == true)
{
$("#showPassValable").html("(Valable toute la soirée pour 1 fille.)");
}
else
{
$("#showPassValable").html("(Valable toute la soirée.)");
}
}
function getValiditePass2()
{
document.getElementById("val_mn").disabled = false;
document.getElementById("val_heure").disabled = false;
if(document.getElementById("validite_fille").checked == true)
{
$("#showPassValable").html("(Valable pour 1 fille avant " + $("#val_heure").val() + "h" + $("#val_mn").val() + ")");
}
else
{
$("#showPassValable").html("(Valable pour 1 personne avant " + $("#val_heure").val() + "h" + $("#val_mn").val() + ")");
}
}
$("#tagGreenMsg").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=tagGreen&input=" + inputChecked, "inbox");
});
$("#tagBlueMsg").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=tagBlue&input=" + inputChecked, "inbox");
});
$("#allBox").click(function () {
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox')
{
if(typeof($(this).attr("checked")) == 'undefined')
document.getElementById($(this).attr("id")).checked = true;
else
document.getElementById($(this).attr("id")).checked = false;
}
});
});
$("#supMsgTo").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=delTo&input=" + inputChecked, "inbox");
});
$("#supMsgFrom").click(function () {
var inputChecked = '';
$("input:checkbox").each(function () {
if($(this).attr("id") != 'allBox' && $(this).attr("checked") == true)
inputChecked += $(this).attr("id") + ',';
});
if(inputChecked != '')
ajaxpage("/includes/ajax/getMessagerie.php?type=inbox&action=delFrom&input=" + inputChecked, "inbox");
});
function ClickDayAjaxType(idLiType, id, date)
{
var idLiType = idLiType;
$(".dayAjaxType").each(function () {
$(this).removeClass("blanc");
$(this).addClass("dayAjaxType");
});
$(".ClickDayAjaxType").each(function() {
$(this).removeClass("blanc");
});
$("#clickType-" + idLiType).addClass("blanc dayAjaxType");
$("#liType-" + idLiType).addClass("blanc ClickDayAjaxType");
ajaxpage('/agenda-all-ajax-light.php?date='+date+'&value='+id,'agenda_list2','agenda_loader2');
}
function clickAccordeon(idAccordeon)
{
if($("#Accordeon-" + idAccordeon).css('display') == 'none')
{
$('.accordeon').each(function () {
$(this).slideUp();
});
$('.flecheAccordeon').each(function () {
$(this).attr('src','/view/images/fleche_bas.jpg');
});
$("#fleche-" + idAccordeon).attr('src','/view/images/fleche_haut.jpg');
$("#Accordeon-" + idAccordeon).slideDown();
}
}
function clickValid(id, action, div)
{
var idDiv = id;
$.ajax({
type: "POST",
url: "ajaxValidSoiree.php",
data: "id="+idDiv+"&action="+action,
success: function(msg){
$("#"+div+"-"+idDiv).html(msg);
}
});
}
function hoverAnpm(idDiv)
{
$('.clickDiv').each(function () {
$(this).removeClass('liste_mea_actif');
$(this).addClass('liste_mea');
});
$('.gros_plan').each(function () {
$(this).css('display','none');
});
$('.clickDiv #mea_1_name').removeClass('yellow');
$('.clickDiv #mea_1_name').addClass('white');
$('.clickDiv #mea_2_name').removeClass('yellow');
$('.clickDiv #mea_2_name').addClass('white');
$('.clickDiv #mea_3_name').removeClass('yellow');
$('.clickDiv #mea_3_name').addClass('white');
$('.clickDiv #mea_4_name').removeClass('yellow');
$('.clickDiv #mea_4_name').addClass('white');
$('#meat_1').removeClass('trait_2');
$('#meat_2').removeClass('trait_2');
$('#meat_3').removeClass('trait_2');
$('#meat_4').removeClass('trait_2');
$('#meat_1').addClass('trait');
$('#meat_2').addClass('trait');
$('#meat_3').addClass('trait');
$('#meat_4').addClass('trait');
$('#mea_1').removeClass('liste_mea_actif');
$('#mea_2').removeClass('liste_mea_actif');
$('#mea_3').removeClass('liste_mea_actif');
$('#mea_4').removeClass('liste_mea_actif');
$('#mea_1').addClass('liste_mea');
$('#mea_2').addClass('liste_mea');
$('#mea_3').addClass('liste_mea');
$('#mea_4').addClass('liste_mea');
$('#mea_' + idDiv).removeClass('liste_mea');
$('#mea_' + idDiv).addClass('liste_mea_actif');
$('#gros_plan' + idDiv).css('display','block');
$('.clickDiv #mea_'+idDiv+'_name').removeClass('white');
$('.clickDiv #mea_'+idDiv+'_name').addClass('yellow');
$('#meat_'+idDiv).addClass('trait_2');
}
function dPause(divId) {
$("#" + divId).fadeOut("slow");
}
function ajaxpage(url, containerid, divLoading)
{
var plusCss = '';
if(divLoading != '')
{
//$("#" + containerid).hide();
$("#" + divLoading).show();
}
$.ajax({
url: url,
type: "GET",
cache: false,
success: function(html){
$("#" + containerid).show();
$("#" + containerid).html(html);
if(divLoading != '')
$("#" + divLoading).hide();
}
});
}
function showPass()
{
if($("#divActive1").css("background-color") == '#3ad903')
{
$("#isPass").val(0);
}
else
{
$("#isPass").val(1);
}
$("#divShowPass").slideToggle("fast", function () {
});
}
function checkDoublon(date, lieu, type, idSoiree)
{
$.ajax({
url: "/includes/ajax/checkdoublon.php",
type: "POST",
data: "date=" + date + "&lieu=" + lieu + "&type=" + type + "&idsoiree=" + idSoiree + "",
cache: false,
success: function(html){
$("#divCheckDoublon").html(html);
}
});
}
function addFormField()
{
var id = document.getElementById("id").value;
$("#divTxt").append("
 -
");
id = (id - 1) + 2;
document.getElementById("id").value = id;
}
function removeFormField(id)
{
$(id).remove();
}
function nl2br( str ) {
str = str.replace('&','[_ET_]');
str = str.replace('?','[_INTERO_]');
return (str + '').replace(/([^>])\n/g, '$1
\n');
}
function getMembreOnline(garconLib, filleLib)
{
if(garconLib == true)
garcon = 1;
else
garcon = 0;
if(filleLib == true)
fille = 1;
else
fille = 0;
$.ajax({
url: "/includes/ajax/checkOnlineDroite.php",
type: "POST",
data: "garcon=" + garcon + "&fille=" + fille,
cache: false,
success: function(html){
$("#blocAjaxMembreDroite").html(html);
}
});
}
function image_checked(input,image)
{
if(document.getElementById(input).value == 1)
return '
';
else
return '
';
}
function image_checked_yo(input,image)
{
if(document.getElementById(input).value == 1)
return '
';
else
return '
';
}
function checked(input, image)
{
if(document.getElementById(image).src.match('unchecked.jpg'))
{
document.getElementById(input).value = 1;
document.getElementById(image).src = '/view/images/checked.jpg';
}
else
{
document.getElementById(input).value = 0;
document.getElementById(image).src = '/view/images/unchecked.jpg';
}
}
function checked_yo(input, image)
{
if(document.getElementById(image).src.match('input_non.gif'))
{
document.getElementById(input).value = 1;
document.getElementById(image).src = '/view/images/input_oui.gif';
}
else
{
document.getElementById(input).value = 0;
document.getElementById(image).src = '/view/images/input_non.gif';
}
}
function blacklist(id, type)
{
ajaxpage("/includes/ajax/ficheMembreBlacklist.php?type=" + type + "&id=" + id, "linkBlacklist" + id);
}
function blacklistImg(id, type)
{
ajaxpage("/includes/ajax/ficheMembreBlacklist.php?image=true&type=" + type + "&id=" + id, "linkBlacklist" + id);
}
function searchFriendsCompte()
{
$.ajax({
url: "/includes/ajax/searchFriends.php",
type: "GET",
data: "garcon=" + $("#recherche_ami_garcon").val() + "&fille=" + $("#recherche_ami_fille").val() + "&name=" + $('#recherche_ami').val(),
cache: false,
success: function(html){
$("#friendSearchDiv").html(html);
}
});
}
function searchFicheFriendsCompte()
{
$.ajax({
url: "/includes/ajax/searchFicheFriends.php",
type: "GET",
data: "garcon=" + $("#recherche_ami_garcon").val() + "&fille=" + $("#recherche_ami_fille").val() + "&idFiche=" + $("#idFiche").val(),
cache: false,
success: function(html){
$("#friendSearch").html(html);
}
});
}
function actu_iframe()
{
if(navigator.appName=="Microsoft Internet Explorer" )
{
if(document.all)
document.all.id_iframe.style.height = document.frames("id_iframe").document.body.scrollHeight-11;
else
document.getElementById("id_iframe").style.height = document.getElementById("id_iframe").contentDocument.body.scrollHeight-10;
}
else
{
var height = document.getElementById("id_iframe").contentDocument.body.offsetHeight-10;
document.getElementById("id_iframe").style.height = height+"px";
}
}
function autoIframe(frameId){
try{
frame = document.getElementById(frameId);
innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
objToResize = (frame.style) ? frame.style : frame;
objToResize.height = innerDoc.body.scrollHeight + 10;
}
catch(err){
window.status = err.message;
}
}
function divInformationFicheMembre(idDiv, fleche)
{
$("#" + idDiv).toggle();
if($("#" + idDiv).css('display') == 'block')
$('#' + fleche).attr('src', '/view/images/fleche_haut.jpg');
else
$('#' + fleche).attr('src', '/view/images/fleche_bas.jpg');
}
function formSearchFriendsFocus()
{
if($('#keyword').val() == 'RECHERCHER UN MEMBRE (3 CARACTÈRES MINIMUM)')
{
$('#keyword').val('');
}
}
function formSearchFriendsBlur()
{
if($('#keyword').val() == '')
{
$('#keyword').val('RECHERCHER UN MEMBRE (3 CARACTÈRES MINIMUM)');
}
}
function formHeaderFocus(id)
{
if(id == 'b')
{
if($('#passwordSubHeader').val() == 'password')
{
$('#passwordSubHeader').val('');
}
}
else
{
if($('#loginSubHeader').val() == 'Pseudo')
{
$('#loginSubHeader').val('');
}
}
}
function formHeaderBlur(id)
{
if(id == 'b')
{
if($('#passwordSubHeader').val() == '')
{
$('#passwordSubHeader').val('password');
}
}
else
{
if($('#loginSubHeader').val() == '')
{
$('#loginSubHeader').val('Pseudo');
}
}
}
function dateTraduction(d)
{
//On recherche le jour de la semaine
jours = new Array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');
n = new Date(d.substring(6,10), d.substring(3,5), d.substring(0,2));
jour = n.getDate();
mois = n.getMonth();
annee = n.getFullYear();
js = jours[n.getDay()];
//On recherche le mois
if(mois=="1"){
mois2="Janvier";}
if(mois=="2"){
mois2="Fevrier";}
if(mois=="3"){
mois2="Mars";}
if(mois=="4"){
mois2="Avril";}
if(mois=="5"){
mois2="Mai";}
if(mois=="6"){
mois2="Juin";}
if(mois=="7"){
mois2="Juillet";}
if(mois=="8"){
mois2="Aout";}
if(mois=="9"){
mois2="Septembre";}
if(mois=="10"){
mois2="Octobre";}
if(mois=="11"){
mois2="Novembre";}
if(mois=="12"){
mois2="Decembre";}
return(''+js+' '+ jour +' '+ mois2 +' '+annee);
}
function datePass(date)
{
var date = date;
var o = date.split(".");
var mois = '';
if(o[1] == '01')
mois = 'Janvier';
else if(o[1] == '02')
mois = 'Février';
else if(o[1] == '03')
mois = 'Mars';
else if(o[1] == '04')
mois = 'Avril';
else if(o[1] == '05')
mois = 'Mai';
else if(o[1] == '06')
mois = 'Juin';
else if(o[1] == '07')
mois = 'Juillet';
else if(o[1] == '08')
mois = 'Aouût';
else if(o[1] == '09')
mois = 'Septembre';
else if(o[1] == '10')
mois = 'Octobre';
else if(o[1] == '11')
mois = 'Novembre';
else if(o[1] == '12')
mois = 'Décembre';
$('#showPassDate').html(""+o[0]+" "+mois+" "+o[2]+"");
}
function sendSms(id_soiree)
{
$.ajax({
type: "POST",
url: "/includes/ajax/sendSms.php",
data: "idSoiree="+id_soiree+"&telSms=" + $("#telSms").val(),
success: function(html){
$("#retourSms").html(html);
}
});
}