var Ws_bNS = (navigator.vendor == ('Netscape6') || navigator.product == ('Gecko'));var Ws_bSafari = (navigator.userAgent.indexOf('Safari')!=-1)?true:false;var Ws_bIE7 = (navigator.userAgent.indexOf('MSIE 7')!=-1)?true:false;
function debug(obj) {alert('debuggage');var tmp, c;tmp = name + '\n\n';c = 0;for (l in obj) {tmp += (l + '=' + obj[l] + '\n');c++;if (c == 10) {alert(tmp);tmp = name + '\n\n';c = 0;}}alert(tmp);}
function ajax(fichier) {var xhr_object;if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();else if(window.ActiveXObject) xhr_object = new ActiveXObject('Microsoft.XMLHTTP');else return(false);xhr_object.open('GET', fichier, false);xhr_object.send(null);if(xhr_object.readyState == 4) return(xhr_object.responseText);else return(false);}
function ajaxEx(fichier, parameters, method, callback) {var xhr_object;if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();else if(window.ActiveXObject) xhr_object = new ActiveXObject('Microsoft.XMLHTTP');else return(false);if ((callback) && (callback != '')) {xhr_object.onreadystatechange=function() {if (xhr_object.readyState==4) {if (xhr_object.status == 200) {var txtResponse = xhr_object.responseText;var xmlResponse = xhr_object.responseXML;window.tAjaxRes = txtResponse;eval(callback);}}}}if (method == 'POST') {if ((callback) && (callback != '')) xhr_object.open('POST', fichier, true);else xhr_object.open('POST', fichier, false);xhr_object.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');xhr_object.setRequestHeader('Connection', 'close');xhr_object.send(parameters);}else {if ((callback) && (callback != '')) xhr_object.open('GET', fichier + '?' + parameters, true);else xhr_object.open('GET', fichier + '?' + parameters, false);xhr_object.send(null);}if ((callback) && (callback != '')) return true;else if(xhr_object.readyState == 4) return(xhr_object.responseText);else return(false);}
function ajaxEscape(s) {s = s.replace(/%/g, '%25');s = s.replace(/\\/g, '%5c');s = s.replace(/ /g, '%20');s = s.replace(/\+/g, '%2b');s = s.replace(/\?/g, '%3f');s = s.replace(/\&/g, '%26');return s;}
function addtext(src, text) {var txt = document.createTextNode(text);src.appendChild(txt);return (src);}
function addtag(src, tag, classname, attribut, text) {var obj = document.createElement(tag);var i;if (classname) obj.className = classname;for (i = 0 ; i < attribut.length ; i+=2) {var att = attribut[i];var val = attribut[i + 1];obj.setAttribute(att, val);}if (text) {var txt = document.createTextNode(text);obj.appendChild(txt);}src.appendChild(obj);return (obj);}
function addOption(src, value, text) {if (Ws_bNS) {var obj  = new Option(text, value);src.options[src.length] = obj;}else {var obj = document.createElement('OPTION');obj.text=text;obj.value=value;src.add(obj);}return (obj);}
function inserttag(src, chld, tag, classname, attribut, text) {var obj = document.createElement(tag);var i;if (classname) obj.className = classname;for (i = 0 ; i < attribut.length ; i+=2) {var att = attribut[i];var val = attribut[i + 1];obj.setAttribute(att, val);}if (text) {var txt = document.createTextNode(text);obj.appendChild(txt);}src.insertBefore(obj, chld);return (obj);}
function searchtag(obhtml, tag, tO) {var kids, i;if (obhtml.tagName == tag) tO[tO.length] = obhtml;kids = obhtml.childNodes;for (i = 0; i < kids.length; i++) searchtag(kids[i], tag, tO);}
function getObj(obj) {if (document.all) return document.all[obj];else return document.getElementById(obj);}
window.tCachedObj = [];function getCObj(obj) {if (window.tCachedObj[obj]) {return window.tCachedObj[obj];}else if (document.all) {window.tCachedObj[obj] = document.all[obj];return window.tCachedObj[obj];}else {window.tCachedObj[obj] = document.getElementById(obj);return window.tCachedObj[obj];}}
function getAbsoluteOffset(obj, use_scroll, dbg) {var coord = new Array();var parent = obj.offsetParent;coord[0] = obj.offsetLeft;coord[1] = obj.offsetTop;while (parent) {coord[0] += parent.offsetLeft;coord[1] += parent.offsetTop;if ((use_scroll == true) && (parent.nodeName == 'DIV')) coord[1] -= parent.scrollTop;if (dbg == 1) alert(parent.id + ':' + parent.offsetTop + '--' + coord[1]);parent = parent.offsetParent;}return coord;}
function getScrollInfo() {var coord = new Array();coord[0] = document.documentElement.scrollLeft;coord[1] = document.documentElement.scrollTop;return coord;}
function getBrowserZone() {var coord = new Array();if (document.all) {coord[0] = document.body.clientWidth;coord[1] = document.body.clientHeight;}else {coord[0] = window.innerWidth;coord[1] = window.innerHeight;}return coord;}
function setMaxHeight(obj, minus) {if (document.all) {if (Ws_bIE7) getObj(obj).style.height = (document.documentElement.clientHeight - minus) + 'px';else getObj(obj).style.height = (document.body.clientHeight - minus) + 'px';}else getObj(obj).style.height = (window.innerHeight - minus) + 'px';}
function setMaxWidth(obj, minus) {if (document.all) {getObj(obj).style.width = (document.body.clientWidth - minus) + 'px';}else getObj(obj).style.width = (window.innerWidth - minus) + 'px';}
function trim(st) {st = ' ' + st;return st.replace(/(^\s*)|(\s*$)/g,'');}
function nl2br(st) {st = '' + st;return st.replace(/\n/g, '<br>');}
function htmlencode(st, nl2br) {if (typeof(st) == 'string') {st = st.replace(/&/g,'&amp;');st = st.replace(/"/g,'&quot;');st = st.replace(/'/g,'&#039;');st = st.replace(/</g,'&lt;');st = st.replace(/>/g,'&gt;');if (nl2br) st = st.replace(/\n/g,'<br />');}return st;}
window.ws_lastMD5 = '';function getUI(key) {var script = document.location.href;var str;var md5 = window.ws_lastMD5;while (md5 == window.ws_lastMD5) {var d = new Date();str = key + script + '##' + d.getTime();md5 = hex_md5(str);}window.ws_lastMD5 = md5;return md5;}
function cancelBubble(v) {if (Ws_bNS) e.cancelBubble = v;else event.cancelBubble = v;return false;}
function stopPropag(oe, e) {if (Ws_bNS) e.stopPropagation();else event.cancelBubble = true;}
function globalCall(type, action, oParam) {var oResult = {};if (typeof(window['before_' + type + '_' + action]) == 'function') eval ('oParam = before_' + type + '_' + action + '(oResult , oParam);');if (typeof(window['_before_' + type + '_' + action]) == 'function') eval ('oParam = _before_' + type + '_' + action + '(oResult , oParam);');if (type == 'LOG') {if (action == 'BLOG') {var dataRes = ajax('/ajax/setLogInfo.php?xx=' + getUI() + '&action=' + oParam.action + '&object=' + oParam.idblog);}else if (action == 'WIKI') {var dataRes = ajax('/ajax/setLogInfo.php?xx=' + getUI() + '&action=' + oParam.action + '&object=' + oParam.idwiki);}else if (action == 'PROFIL') {var dataRes = ajax('/ajax/setLogInfo.php?xx=' + getUI() + '&action=' + oParam.action + '&object=' + oParam.idmember);}}else if (type == 'MEMBER') {if (action == 'ADD_TO_BLACK_LIST') {var dataRes = ajax('/ajax/setMemberToList.php?xx=' + getUI() + '&idm=' + oParam.idm + '&list=Black&dir=1');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'EVER') errMessage('Le membre est déjà dans votre liste noire.', '', {nomorid: 'pop_blist_ever', nomore: true});if (oResult.reponse == 'ADDED') errMessage('Le membre a été ajouté à votre liste noire.', '', {nomorid: 'pop_blist_added', nomore: true});}else if (action == 'REMOVE_FROM_BLACK_LIST') {var dataRes = ajax('/ajax/setMemberToList.php?xx=' + getUI() + '&idm=' + oParam.idm + '&list=Black&dir=0');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'REMOVED') errMessage('Le membre a été retiré de votre liste noire.', '', {nomorid: 'pop_blist_removed', nomore: true});}else if (action == 'ADD_TO_WHITE_LIST') {var dataRes = ajax('/ajax/setMemberToList.php?xx=' + getUI() + '&idm=' + oParam.idm + '&list=White&dir=1');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'EVER') errMessage('Le membre est déjà dans votre liste blanche.', '', {nomorid: 'pop_wlist_ever', nomore: true});if (oResult.reponse == 'ADDED') errMessage('Le membre a été ajouté à votre liste blanche.', '', {nomorid: 'pop_wlist_added', nomore: true});}else if (action == 'REMOVE_FROM_WHITE_LIST') {var dataRes = ajax('/ajax/setMemberToList.php?xx=' + getUI() + '&idm=' + oParam.idm + '&list=White&dir=0');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'REMOVED') errMessage('Le membre a été retiré de votre liste blanche.', '', {nomorid: 'pop_wlist_removed', nomore: true});}else if (action == 'ADD_TO_FRIEND') {var dataRes = ajax('/ajax/setMemberToFriend.php?xx=' + getUI() + '&idm=' + oParam.idm + '&OK=1');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'ADDED') errMessage('Vous avez authorisé ce membre à vous ajouter à votre liste d\'ami.', '', {nomorid: 'pop_mem_friendyes', nomore: true});}else if (action == 'REFUS_TO_FRIEND') {var dataRes = ajax('/ajax/setMemberToFriend.php?xx=' + getUI() + '&idm=' + oParam.idm + '&OK=0');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'NOTADDED') errMessage('Vous avez refusé que ce membre vous ajoute dans sa liste d\'ami.', '', {nomorid: 'pop_mem_friendno', nomore: true});}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else if (type == 'BLOG') {if (action == 'SET_NOTE') {var dataRes = ajax('/ajax/setBlogInfo.php?xx=' + getUI() + '&idblog=' + oParam.idb + '&note=' + oParam.note);var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'OK') errMessage('Votre notation a été prise en compte!', '', {nomorid: 'pop_note',	nomore: true});}else if (action == 'RESET_NOTE') {}else if (action == 'MOVE_ON_NOTE') {}else if (action == 'SET_OR_REMOVE_BLOG_TO_PROFIL') {var dataRes = ajax('/ajax/setBlogInfo.php?xx=' + getUI() + '&idblog=' + oParam.idb + '&swap=1');var oResult = eval('(' + dataRes + ')');if ((oResult.reponse == 'OK') && (oResult.action == 'REMOVED')) errMessage('La suppresion de votre profil a été réalisé!', '', {nomorid: 'pop_remblog',	nomore: true});if ((oResult.reponse == 'OK') && (oResult.action == 'ADDED')) errMessage('L\'ajout à votre profil a été réalisé!', '', {nomorid: 'pop_addblog',	nomore: true});}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else if (type == 'MESSAGE') {if (action == 'SEND_MESSAGE') {var dataRes = ajaxEx('/ajax/sendMessage.php', oParam.tData.join('&'), 'POST', '');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'BLACK_LISTED') errMessage('Votre message n\'a pas été envoyé car cette utilisateur vous a mis sur sa liste noire.');if (oResult.reponse == 'PARAM') errMessage('Une erreur c\'est produite. Les paramètres de votre message sont erronées. Si le problème persiste, contacter le support du portail Chez-les-Filles.com');if (oResult.reponse == 'EVER_AMI') errMessage('Les destinataire est déjà dans votre liste d\'ami.');if (oResult.reponse == 'SENDED') {if (oParam.msgtype == 'BRD') errMessage('Votre contribution a été envoyée.', '', {nomorid: 'pop_board_send',	nomore: true});if (oParam.aftersend == 'refresh') document.location.reload();else if (oParam.aftersend == 'nothing') ;else if (window.referrer != '') document.location.href = window.referrer;else document.location.href = '/pages/mail-inbox.php';}}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else if (type == 'BOARD') {if (action == 'CONTRIB_REFUS') {var dataRes = ajax('/ajax/setBoardAction.php?xx=' + getUI() + '&action=REFUSER&getNext=1&page=0&dispMode=' + oParam.dispmode + '&idm=' + ajaxEscape(oParam.idmsg));var oResult = eval('(' + dataRes + ')');if ((oResult.reponse == 'OK') || (oResult.reponse == 'NEWONE')) errMessage('Votre refus de mettre en ligne cette contribution a été pris en compte.!', '', {nomorid: 'pop_board_refus',	nomore: true});}else if (action == 'CONTRIB_OK') {var dataRes = ajax('/ajax/setBoardAction.php?xx=' + getUI() + '&action=ACCEPTER&getNext=1&page=0&dispMode=' + oParam.dispmode + '&idm=' + ajaxEscape(oParam.idmsg));var oResult = eval('(' + dataRes + ')');if ((oResult.reponse == 'OK') || (oResult.reponse == 'NEWONE')) errMessage('La mise en ligne de cette contribution a été éffectuée.!', '', {nomorid: 'pop_board_accept',	nomore: true});}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else if (type == 'ALBUM') {if (action == 'REMOVE_ALBUM') {var dataRes = ajax('/ajax/remAlbum.php?xx=' + getUI() + '&idalbum=' + ajaxEscape(oParam.idalbum));var oResult = eval('(' + dataRes + ')');}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else if (type == 'FORUM') {if (action == 'ADD_MESSAGE') {var dataRes = ajaxEx('/ajax/forumAddMessage.php', oParam.tData.join('&'), 'POST', '');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'PARAM') errMessage('Une erreur c\'est produite. Les paramètres de votre message sont erronées. Si le problème persiste, contacter le support du portail Chez-les-Filles.com');if (oResult.reponse == 'SENDED') {/* if (oParam.aftersend == 'refresh') document.location.reload();else if (oParam.aftersend == 'nothing') ;else if (window.referrer != '') document.location.href = window.referrer;else document.location.href = '/pages/mail-inbox.php';*/ }}else errMessage('L\'ACTION fourni à la methode globalCall est inconnu.\nContacter le support...' + action);}else errMessage('Le TYPE fourni à la methode globalCall est inconnu.\nContacter le support...' + type);if (typeof(window['_after_' + type + '_' + action]) == 'function') eval ('_after_' + type + '_' + action + '(oResult , oParam);');if (typeof(window['after_' + type + '_' + action]) == 'function') eval ('after_' + type + '_' + action + '(oResult , oParam);');return oResult;}
function globalLinkCall(ev, type, action, oParam) {oParam.event = ev;globalCall(type, action, oParam);if (oParam.popup_close) hidePopup();/* if (Ws_bNS) oParam.event.stopPropagation();else event.cancelBubble = true;*/ return false;}
function popupCall(oe, e, action, oParam) {var type = 'POPUP';if ((oParam.isauth) && (window.userID == '')) {authPopup('', '');return false;}if (typeof(window['before_' + type + '_' + action]) == 'function') eval ('before_' + type + '_' + action + '(oResult , oParam);');var o = getObj(oParam.offsetO);var tPos = getAbsoluteOffset(o);if (action == 'BOARD') {var px = (tPos[0] - 32);var py = (tPos[1] - 135 - (8 + 40));var new_oParam = {ajaxReq: '/ajax/getBoardForm.php', ajaxPrm: 'xx=' + getUI() + '&ref=MAIL&idwriter=' + oParam.idwriter + '&idmember=' + oParam.idmember, callback: 'onloadPopupMEMBER(\'' + oParam.idmember + '\')', width:300, height:130, left:px, top:py, popdir:'LEFT', idref: oParam.idmember };}if (action == 'MEMBER') {var px = (tPos[0]);var py = (tPos[1] - 160 - (8 + 40));if (!oParam.context)	oParam.context = '';var new_oParam = {ajaxReq: '/ajax/getMemberInfo.php', ajaxPrm: 'xx=' + getUI() + '&ctx=' + oParam.context + '&ref=MAIL&idmember=' + oParam.idmember, callback: 'onloadPopupMEMBER(\'' + oParam.idmember + '\')', width:400, height:160, left:px, top:py, idref: oParam.idmember };}if (action == 'BLOG') {var px = (tPos[0]);var py = (tPos[1] - 175 - (8 + 40));var new_oParam = {ajaxReq:'/ajax/getBlogInfo.php', ajaxPrm:'xx=' + getUI() + '&idblog=' + oParam.idblog, callback:'onloadPopupBLOG(\'' + oParam.idblog + '\')', width:350, height:175, left:px, top:py, idref: oParam.idblog };}if (action == 'ALBUM') {var px = (tPos[0]);var py = (tPos[1] - 92 - (8 + 40));var new_oParam = {ajaxReq:'/ajax/getAlbumAction.php', ajaxPrm:'xx=' + getUI() + '&idalbum=' + oParam.idalbum, callback:'onloadPopupALBUM(\'' + oParam.idalbum + '\')', width:320, height:92, left:px, top:py, idref: oParam.idalbum };}setPopup(oe, e, new_oParam);if (typeof(window['after_' + type + '_' + action]) == 'function') eval ('after_' + type + '_' + action + '(oResult , oParam);');return false;}
function onloadPopupBOARD(idmember) {var html = eval(window.tAjaxRes);getObj('popup-inner').innerHTML = html;getObj('popup').style.visibility = 'visible';return false;}
function onloadPopupMEMBER(idmember) {var html = eval(window.tAjaxRes);getObj('popup-inner').innerHTML = html;getObj('popup').style.visibility = 'visible';return false;}
window.__oBlogLoaded = null;function onloadPopupBLOG(idblog) {var oResult = eval('(' + window.tAjaxRes + ')');window.__oBlogLoaded = oResult;getObj('popup-inner').innerHTML = oResult.html;var gnote = getObj('gnote');var unote = getObj('unote');if (gnote) getObj('gnote').src = '/images/n' + oResult.note + '.png';if (unote) getObj('unote').src = '/images/u' + oResult.unote + '.png';getObj('popup').style.visibility = 'visible';return false;}
function onloadPopupALBUM(idalbum) {var html = eval(window.tAjaxRes);getObj('popup-inner').innerHTML = html;getObj('popup').style.visibility = 'visible';return false;}
function _after_BLOG_SET_OR_REMOVE_BLOG_TO_PROFIL(oResult, oParam) {if ((oResult.reponse == 'OK') && (oResult.action == 'REMOVED')) oParam.oCall.innerHTML = 'Ajouter à mon profil';if ((oResult.reponse == 'OK') && (oResult.action == 'ADDED')) oParam.oCall.innerHTML = 'Retirer de mon profil';return false;}
function _after_BLOG_MOVE_ON_NOTE(oResult, oParam) {var unote = getObj('unote');var tPos = getAbsoluteOffset(unote);var x = (Ws_bNS)?oParam.event.clientX:oParam.event.x;x = Math.round((x - tPos[0]) / 12.5);if (x < 0) x = 0;if (x > 5) x = 5;unote.src = '/images/u' + x + '.png';return oParam;}
function _before_BLOG_SET_NOTE(oResult, oParam) {var unote = getObj('unote');var tPos = getAbsoluteOffset(unote);var x = (Ws_bNS)?oParam.event.clientX:oParam.event.x;x = Math.round((x - tPos[0]) / 12.5);if (x < 0) x = 0;if (x > 5) x = 5;oParam.note = x;return oParam;}
function _after_BLOG_SET_NOTE(oResult, oParam) {window.__oBlogLoaded.unote = oParam.note;getObj('popimg').src = '/images/fr-noted.gif';}
function _after_BLOG_RESET_NOTE(oResult, oParam) {var unote = getObj('unote');unote.src = '/images/u' + window.__oBlogLoaded.unote + '.png';}
function initCadreHeight() {setFillHeight(3);}
window.tOriginalH = [];function setFillHeight(nbc) {resetHeight(nbc);var max = 0;var c = 0;var oM, oC;var tH = [];var isdiff = false;for (c = 1 ; c <= nbc ; c++) {oM = getObj('mark_c' + c);if (oM) {var tC = getAbsoluteOffset(oM);tH[c] = tC[1];if (tH[c] > max) max = tH[c];}}for (c = 1 ; c <= nbc ; c++) {if (tH[c] != max) isdiff = true;}if (!isdiff) return;for (c = 1 ; c <= nbc ; c++) {if (tH[c] < max) {oC = getObj('fill_c' + c);if ((oC) && (oC.style.display == 'none')) {oC.style.display = '';tH[c] += 56;}}}max = 0;var cmax = 0;for (c = 1 ; c <= nbc ; c++) {if (tH[c] > max) {max = tH[c];cmax = c;}}for (c = 1 ; c <= nbc ; c++) {if (c != cmax) alignHeight(c, cmax);}}
function alignHeight(c, cmax) {var o2Size = getObj('fill_c' + c);if (typeof(window.tOriginalH[c]) == 'undefined') {var oH = o2Size.style.height;window.tOriginalH[c] = [o2Size, oH];}if (o2Size) {var oM1 = getObj('mark_c' + c);var oM2 = getObj('mark_c' + cmax);var tC1 = getAbsoluteOffset(oM1);var tC2 = getAbsoluteOffset(oM2);if (tC2[1] > tC1[1]) {var delta = (tC2[1] - tC1[1] + o2Size.clientHeight);o2Size.style.height = delta + 'px';var tC1 = getAbsoluteOffset(oM1);var tC2 = getAbsoluteOffset(oM2);delta += tC2[1] - tC1[1];o2Size.style.height = delta + 'px';}}}
function resetHeight(nbc) {var c;for (c = 1 ; c <= nbc ; c++) {if (typeof(window.tOriginalH[c]) != 'undefined') {var o = window.tOriginalH[c][0];var oH = window.tOriginalH[c][1];o.style.height = oH;}}}
function checkAuthPopup(url) {var log = getObj('poplogin').value;var pwd = getObj('poppassw').value;var dataRes = ajaxEx('/ajax/checkAuth.php', 'xx=' + getUI() + '&log=' + ajaxEscape(trim(log)) + '&pwd=' + ajaxEscape(trim(pwd)), 'POST', '');var oResult = eval('(' + dataRes + ')');closeMessage();if ((oResult.reponse == 'OK') || (oResult.reponse == 'PART')) {if (url == 'WS_NOTHING') {window.userID = oResult.drid;return false;}else if (url != '') document.location.href = url;else document.location.reload();}else errMessage('Les paramètres d\'accès fournis sont incorrects !!!');return false;}
function swapimage(id, state) {var o = getObj(id);var i = o.src;if (state) {var reg=new RegExp('1\.', 'g');o.src = i.replace(reg, '2.');}else {var reg=new RegExp('2\.', 'g');o.src = i.replace(reg, '1.');}}
function setPopup(oe, e, options) {var tScreen = getBrowserZone();var px = Math.round((tScreen[0] - 382) / 2);var scrollTop = document.documentElement.scrollTop;var py = (scrollTop + 200) + 'px';var sx = 350;var sy = 100;var ajaxReq = '';var ajaxPrm = '';var ajaxCB = '';var popdir = 'RIGHT';if (options) {if (options.width) sx = options.width;if (options.height) sy = options.height;if (options.left) px = options.left;if (typeof(options.top) != 'undefined') py = options.top;if (options.ajaxReq) ajaxReq = options.ajaxReq;if (options.ajaxPrm) ajaxPrm = options.ajaxPrm;if (options.callback) ajaxCB = options.callback;if (options.popdir) popdir = options.popdir;}var p = getObj('popup');px -= sx;/* if (popdir == 'LEFT') {if (getObj('popup-fl').style.backgroundImage == 'url(/images/pop/pop-fl.gif)') getObj('popup-fl').style.backgroundImage = 'url(/images/pop/pop-bc.gif)';if (getObj('popup-fr').style.backgroundImage == 'url(/images/pop/pop-bc.gif)') getObj('popup-fr').style.backgroundImage = 'url(/images/pop/pop-fr.gif)';px -= sx;}else {if (getObj('popup-fl').style.backgroundImage == 'url(/images/pop/pop-bc.gif)') getObj('popup-fl').style.backgroundImage = 'url(/images/pop/pop-fl.gif)';if (getObj('popup-fr').style.backgroundImage == 'url(/images/pop/pop-fr.gif)') getObj('popup-fr').style.backgroundImage = 'url(/images/pop/pop-bc.gif)';}*/ getObj('popup').style.width = (sx + 32) + 'px';getObj('popup').style.height = (sy + 56) + 'px';getObj('popup-hc').style.width = sx + 'px';getObj('popup-c').style.width = sx + 'px';getObj('popup-bc').style.width = (sx - 25) + 'px';getObj('popup-g').style.height = sy + 'px';getObj('popup-c').style.height = sy + 'px';getObj('popup-d').style.height = sy + 'px';p.style.visibility = 'hidden';p.style.left = px + 'px';p.style.top = py + 'px';if (Ws_bNS) e.stopPropagation();else event.cancelBubble = true;var res = ajaxEx(ajaxReq, ajaxPrm, 'GET', ajaxCB);return res;}
function initHidePopup() {document.onclick = hidePopup;window.onscroll = setTopMessage;}
function hidePopup() {var p = getObj('popup');if (p) {p.style.left = '-1000px';p.style.top = '100px';}}
function setTopMessage() {var oMsg = getObj('message');if (oMsg) {var scrollTop = document.documentElement.scrollTop;oMsg.style.top = (scrollTop + 200) + 'px';}}
function errMessage(msg, title, options) {var sx = 350;var sy = 64;var askagain = false;var nomorid = '';if (options) {if (options.width) sx = options.width;if (options.height) sy = options.height;if (options.nomore) askagain = options.nomore;if (options.nomorid) nomorid = options.nomorid;}if (nomorid == '') askagain = false;if (askagain) {var askvar = getCookie(nomorid);if (askvar == '1') return false;}var bot = getObj('mainlink');var tBot = getAbsoluteOffset(bot);var tScreen = getBrowserZone();var px = Math.round((tScreen[0] - 382) / 2) - 16;var wp = getObj('whitepage');wp.style.height = (tBot[1] + 32) + 'px';wp.style.display = '';getObj('message').style.width = (sx + 32) + 'px';getObj('message').style.height = (sy + 32 + 24) + 'px';getObj('message-bottom').style.width = (sx + 32) + 'px';getObj('message-hc').style.width = sx + 'px';getObj('message-c').style.width = sx + 'px';getObj('message-cb').style.width = sx + 'px';getObj('message-bc').style.width = sx + 'px';getObj('message-g').style.height = sy + 'px';getObj('message-c').style.height = sy + 'px';getObj('message-d').style.height = sy + 'px';if (askagain) getObj('message-nomore').style.visibility = 'visible';else getObj('message-nomore').style.visibility = 'hidden';getObj('message-inner').innerHTML = msg;var oc = getObj('message-check');if (oc) {getObj('message-checkid').value = nomorid;oc.checked = false;}var oMsg = getObj('message');var tScroll = getScrollInfo();oMsg.style.top = (tScroll[1] + 250) + 'px';oMsg.style.left = px + 'px';return false;}
function closeMessage() {var oc = getObj('message-check');var nomorid = getObj('message-checkid').value;if ((oc.checked) && (nomorid != '')) {var now = new Date();fixDate(now);now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);setCookie(nomorid, '1', now, '/');}var oMsg = getObj('message');var wp = getObj('whitepage');getObj('message-inner').innerHTML = '';oMsg.style.left = '-1000px';wp.style.display = 'none';}
function closeConfirm() {var oMsg = getObj('confirm');var wp = getObj('whitepage');getObj('confirm-inner').innerHTML = '';oMsg.style.left = '-1000px';wp.style.display = 'none';}
function isAuth(oe, func) {if (!func) func = '';var url = oe.href;if (window.userID != '') document.location.href = url;else authPopup(url);return false;}
function authPopup(url) {var html = '';html += "<div class='authstatictop'>Pour accéder à cette fonctionalité, vous devez être inscrite sur le portail Chez les Filles.com.\nSi vous êtes déjà inscrite authentifiez-vous.</div>";html += "<div class='authlabel'>Adresse e-mail</div><div class='authfield'><input type='text' class='field' id='poplogin' style='width:170px;'/></div>";html += "<div class='authlabel'>Mot de passe</div><div class='authfield'><input type='password' class='field' id='poppassw' style='width:170px;'/></div>";html += "<div class='authlabel'></div><div class='authfield'><img src='/images/connexion1.gif' id='btn_connexion' onmouseover=\"swapimage('btn_connexion', true);\" onmouseout=\"swapimage('btn_connexion', false);\" onclick=\"return checkAuthPopup('" + url + "');\"></div>";html += "<div class='authstaticbot'>Si vous n\'avez pas encore de compte, vous pouvez en créer un en cliquant sur le lien ce lien : <a class='red' href='/pages/inscription.php'>s\'inscrire sur Chez-les-Filles.com</a></div>";var options = {height:175};errMessage(html, '', options);}
function helpPopup() {var href = window.location.href;var res = ajax('/ajax/callDenise.php?xx=' + getUI() + '&url=' + ajaxEscape(href));var tRes = eval(res);var html = tRes[2];var options = {};options.width = tRes[0];options.height = tRes[1];errMessage(html, '', options);}
window.ok4menuclose = 0;
function menu_on(oe, e) {oe.className = 'menuitem1';var idsmenu = parseInt(oe.id.substr(4, 2), 10);var tSMenu = getAbsoluteOffset(oe);var oSMenu = getObj('submenu');var html = '';for (sm = 0 ; sm < window.tSubMenu[idsmenu].length ; sm+=2) {var url = window.tSubMenu[idsmenu][sm];var dsc = window.tSubMenu[idsmenu][sm + 1];html += "<div class='smenu0' onmouseover='smenu_on(this);' onmouseout='smenu_off(this);' onclick=\"window.location.href='" + url + "'\">" + dsc + "</div>" }oSMenu.innerHTML = html;oSMenu.style.left = (tSMenu[0] + 4) + 'px';oSMenu.style.top = (tSMenu[1] + 22) + 'px';window.ok4menuclose++;}
function menu_off(oe, e) {oe.className = 'menuitem0';var oSMenu = getObj('submenu');setTimeout('menu_close()', 500);}
function smenu_on(oe, e) {oe.className = 'smenu1';window.ok4menuclose++;}
function smenu_off(oe, e) {oe.className = 'smenu0';setTimeout('menu_close()', 500);}
function menu_close() {window.ok4menuclose--;if (window.ok4menuclose <= 0) {var oSMenu = getObj('submenu');oSMenu.style.left = '-1000px';window.ok4menuclose = 0;}}
function goSearch() {var s = getObj('search').value;if (s == 'Entrez votre recherche') return false;getObj('searchform').submit();return false;}
function checkLogout() {var ret = ajax('/ajax/checkLogout.php?xx=' + getUI());if (ret == 'OK') document.location.reload();return false;}
function checkAuth() {var log = getObj('login').value;var pwd = getObj('password').value;var dataRes = ajaxEx('/ajax/checkAuth.php', 'xx=' + getUI() + '&log=' + ajaxEscape(trim(log)) + '&pwd=' + ajaxEscape(trim(pwd)), 'POST', '');var oResult = eval('(' + dataRes + ')');if (oResult.reponse == 'OK') document.location.reload();else if (oResult.reponse == 'PART') document.location.href = '/pages/profil-edit.php';else errMessage('Les paramètres d\'accès fournis sont incorrects !!!');return false;}
window.scrollD = 0;window.scrollH = 0;window.scrollT = 0;function cbSUpDown() {if (window.scrollD != 0) {var board = getObj('boardin');var boardfloat = getObj('fill_c3');var now = new Date();var ntime = now.getTime();var delta = ntime - window.scrollT;window.scrollT = ntime;delta = Math.round(delta / 5);window.scrollH += window.scrollD * delta;if (window.scrollH > 0) window.scrollH = 0;if (board.scrollHeight > boardfloat.clientHeight) if (window.scrollH < (boardfloat.clientHeight - board.scrollHeight)) window.scrollH = (boardfloat.clientHeight - board.scrollHeight);board.style.top = window.scrollH + 'px';setTimeout('cbSUpDown()', 25);}return false;}
function scrolldown() {window.scrollD = -1;var now = new Date();window.scrollT = now.getTime();setTimeout('cbSUpDown()',  25);return false;}
function scrollup() {window.scrollD = 1;var now = new Date();window.scrollT = now.getTime();setTimeout('cbSUpDown()', 25);return false;}
function scrollstop() {window.scrollD = 0;return false;}
function sendBoardMessage() {var dest = getObj('boardDest').value;var error = false;err = getObj('err_msgDest');if (dest && ((dest == 0) || (dest == ''))) {err.style.display = '';err.innerHTML = 'Erreur';error = true;}if (!error) {var from = getObj('boardEmet').value;var subj = '';var msgc = getObj('boardContent').value;var type = 'BRD';tParam = [];tParam[tParam.length] = 'from=' + ajaxEscape(trim(from));tParam[tParam.length] = 'dest=' + ajaxEscape(trim(dest));tParam[tParam.length] = 'subj=' + ajaxEscape(trim(subj));tParam[tParam.length] = 'msgc=' + ajaxEscape(trim(msgc));tParam[tParam.length] = 'type=' + ajaxEscape(trim(type));hidePopup();var oParam = {tData: tParam, msgtype:'BRD', aftersend: 'nothing'};globalCall('MESSAGE', 'SEND_MESSAGE', oParam);return false;}}
