// JavaScript Document
maychange = true;
mychangeMSG = "";
maychange2 = true;
function changePage(links)
{
if(maychange && maychange2)
{
document.FMinscription.links.value = links;
document.FMinscription.submit();
} else alert(maychangeMSG);
}
function wheelResult(pos)
{
switch(pos)
{
case "3":
string = "3 MOIS DE GAGNE!";
break;
}
}
function toggle(id)
{
if(document.getElementById(id).style.display == 'none' || document.getElementById(id).style.display == '') document.getElementById(id).style.display = 'block';
else document.getElementById(id).style.display = 'none';
}
function display(calque)
{
document.getElementById(calque).style.display=document.getElementById(calque).style.display=="none"?"block":"none";
}
function displayProfile(calque,lien)
{
document.getElementById(calque).style.display=document.getElementById(calque).style.display=="none"?"block":"none";
if(document.getElementById(lien).innerHTML == "Ouvrir")
{
document.getElementById(lien).innerHTML = "Fermer";
}
else {
document.getElementById(lien).innerHTML = "Ouvrir";
}
/*
Effect.toggle(calque,'blind');
if ($(calque).style.display=="none") $(lien).update("Ouvrir");
else $(lien).update("");
*/
}
function checkNickname(nick)
{
xhr = getHTTPObject();
xhr.open("GET", "/xhttpServices.php?action=checkNickname&Nickname=" + nick, true);
xhr.onreadystatechange=function() { if(xhr.readyState == 4) {
var result = xhr.responseText;
//alert(result);
if(result == true)
{
maychange = false;
maychangeMSG = "Pseudo deja utilisé";
document.getElementById('nicknameStatus').innerHTML = "Aille, deja pris !";
}
else
{
maychange = true;
document.getElementById('nicknameStatus').innerHTML = "Super, c'est disponible!";
}
}
}
xhr.send(null);
}
function checkEmail(email)
{
xhr = getHTTPObject();
xhr.open("GET", "/xhttpServices.php?action=checkEmail&Email=" + email, true);
xhr.onreadystatechange=function() { if(xhr.readyState == 4) {
var result = xhr.responseText;
if(result == true)
{
maychange2 = false;
maychangeMSG = "Email deja utilisé";
document.getElementById('emailStatus').innerHTML = "Aille, deja pris !";
}
else
{
maychange2 = true;
document.getElementById('emailStatus').innerHTML = "Super, c'est disponible!";
}
}
}
xhr.send(null);
}
var popupChat = null;
function openChatWindow(contactID) {
var url = "/lab/chat/?lg=fr&session=261569283a0ec92a68fb11695e16ab7a&contactID="+contactID
params = "top=10,left=10,width=485,height=660,statusbar=no,scrollbar=no,toolbar=no";
popupChat = open("", "popupChat", params );
if( !popupChat || popupChat.closed || !popupChat.AddContact ) {
popupChat = window.open( url, "popupChat", params );
} else popupChat.focus();
}
function openChat(contactID) {
openChatWindow(contactID);
popupChat.AddContact(contactID);
}
function closeChat() {
popupChat = open("", "popupChat");
popupChat.close();
}
function securit(id)
{
if(confirm('Êtes-vous certains de vouloir ajouterà votre liste noire?'))
document.location.href='/search/detail.php?blackListContact='+ id;
}