/* General functions */ function openPopup(page, width, height) { window.open(page, "", "scrollbars=yes,menubar=no,toolbar=no,resizable=yes,width=" + width + ",height=" + height + ",left=" + ((screen.width - 760)/2) + ",top=" + ((screen.height - 450)/2) ); } function isValidEmail(str) { return (str.indexOf(".") > 2) && (str.indexOf("@") > 0); } function openClose(id) { var elt = document.getElementById(id); if (elt.style) { if (elt.style.display == 'none') elt.style.display = 'block'; else elt.style.display = 'none'; } } // Decode any string encoded with urlencode() php function function URLDecode(string) { var lsRegExp = /\+/g; return unescape(String(string).replace(lsRegExp, " ")) } // Deconnexion function deconnexion() { if (window.confirm('Confirmer la déconnexion de votre profil?')) { $.ajax({ type: 'POST', url: '/process.php?q=deconnexion', success: function(msg) { window.location.replace('/'); } }); } else { return false; } }