/* Version 1.2.3 */
var timer;var x2 = 0;var y2 = 0;var interval = 30;var delay = 100;var move = 10;
var inc = 0;var sh2 = 0;function start_shake(sh)
{if(sh)
{sh2 = sh;}
if(sh2)
{f = "shake_2()";}
else
{f = "shake()";}
if(timer==null)
{timer = setInterval(f,delay);}
}
function stop_shake()
{clearInterval(timer);timer = null;}
function shake()
{var x = move*Math.random()-(move/2);var y = move*Math.random()-(move/2);var i = 0;for(i=0;i<interval;i++)
{setTimeout("setPos("+((i*x)/interval+(interval-i)*x2/interval)+","+((i*y)/interval+(interval-i)*y2/interval)+");",i*(delay/interval));}
x2 = x;y2 = y;}
function shake_2()
{inc++;setPos(0,20*Math.cos(inc/6));}
function setPos(x,y)
{ins = document.getElementById('inscription');ins.style.marginLeft = Math.round(x)+"px";ins.style.marginTop = Math.round(y)+"px";}
function wall_swap()
{dn = wall_d.pop();nd = wall_n.pop();wall_d.unshift(nd);wall_n.unshift(dn);swap_photos(dn,nd);}
function swap_photos(d,n)
{$('wall_photo_'+d+'_b').id = 'wall_photo_'+n;$('wall_photo_'+d).fade({afterFinish:function(){$('wall_photo_'+n).id='wall_photo_'+n+'_b';$('wall_photo_'+d).id='wall_photo_'+n;$('wall_photo_'+n).style.display="";}});}
function clear_swap(d,n)
{
}
var g_s = 'g';
function set_s(s)
{$('form_upload_img').src = $('form_upload_img').src.replace('inscription_'+g_s,'inscription_'+s);g_s = s;}
function focus_login(e)
{e.style.display='none';e.nextSibling.style.display='';e.nextSibling.focus();}
function blur_login(e){if(e.value=='')
{e.style.display='none';e.previousSibling.style.display='';}
}
function displayGift(gift_id)
{if($('gift_'+gift_id) && !g_g)
{g_g = 1;Effect.Grow('gift_'+gift_id);setTimeout("Effect.Shrink('gift_"+gift_id+"')",4000);setTimeout("g_g=0",4100);}
}
function highlightBox(box,className)
{
changeClass(box.firstChild.childNodes[0].childNodes[0].firstChild,className);changeClass(box.firstChild.childNodes[0].childNodes[1],className);changeClass(box.firstChild.childNodes[0].childNodes[2].firstChild,className);changeClass(box.firstChild.childNodes[1].childNodes[0],className);changeClass(box.firstChild.childNodes[1].childNodes[1],className);changeClass(box.firstChild.childNodes[1].childNodes[2],className);changeClass(box.firstChild.childNodes[2].childNodes[0],className);changeClass(box.firstChild.childNodes[2].childNodes[1],className);changeClass(box.firstChild.childNodes[2].childNodes[2],className);}
var g_l = 0;
function addLastConnected(src, name, txt, link)
{if($('last_connected_div').childNodes.length > g_l_m)
{$('last_connected_div').removeChild($('last_connected_div').lastChild);}
tmp = $('last_connected_div').firstChild.cloneNode(true);tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].href=link;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[0].innerHTML = name;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[1].childNodes[0].src = src;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[1].childNodes[0].style.display = '';tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].lastChild.innerHTML = txt;tmp.style.width = '0px';tmp.firstChild.style.cssFloat = 'right';tmp.firstChild.style.styleFloat = 'right';tmp.firstChild.style.marginRight = '5px';$('last_connected_div').insertBefore(tmp,$('last_connected_div').firstChild);tmp.morph('width:100px;');$('last_connected_div').childNodes[g_l_m].firstChild.style.cssFloat = 'left';$('last_connected_div').childNodes[g_l_m].firstChild.style.styleFloat = 'left';$('last_connected_div').childNodes[g_l_m].morph('width:0px;');}
function addLastTop(src, name, txt, link)
{if($('top_profils_div').childNodes.length > g_l_m)
{$('top_profils_div').removeChild($('top_profils_div').lastChild);}
tmp = $('top_profils_div').firstChild.cloneNode(true);tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].href=link;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[0].innerHTML = name;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[1].childNodes[0].src = src;tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].childNodes[1].childNodes[0].style.display = '';tmp.firstChild.rows[1].childNodes[1].firstChild.childNodes[0].lastChild.innerHTML = txt;tmp.style.width = '0px';tmp.firstChild.style.cssFloat = 'right';tmp.firstChild.style.styleFloat = 'right';tmp.firstChild.style.marginRight = '5px';$('top_profils_div').insertBefore(tmp,$('top_profils_div').firstChild);tmp.morph('width:100px;');$('top_profils_div').childNodes[g_l_m].firstChild.style.cssFloat = 'left';$('top_profils_div').childNodes[g_l_m].firstChild.style.styleFloat = 'left';$('top_profils_div').childNodes[g_l_m].morph('width:0px;');}
function changeClass(td,className)
{td.className = td.className.substring(0,td.className.length-1)+className;}
function ajax_loader(id)
{$(id).firstChild.firstChild.childNodes[1].childNodes[1].innerHTML='<div class="ajax_loader"></div>';}
function update_pagination(box, page, del, wide, filter)
{ajax_loader(box);url = 'page=ajax&action=page&box='+box+'&n_page='+page;if(del)
{url+='&del='+del;}
if(wide)
{url+='&wide='+wide;}
if(filter)
{url+='&filter='+filter;}
new Ajax.Updater($(box), 'index.php',{method: 'get', parameters: url+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});}
function do_search(my_form)
{if(document.getElementById('box_connected'))
{box = 'box_connected';}
else
{box = 'box_search_result';}
ajax_loader(box);new Ajax.Updater($(box), 'index.php',{method: 'get', parameters: 'page=ajax&action=page&box=box_search_result&n_page=1&search=1&'+$(my_form).serialize()+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});$(box).id = 'box_search_result';}
function do_credentials(my_form)
{new Ajax.Updater($('box_credentials'), 'index.php',{method: 'get', parameters: 'page=ajax&action=page&box=box_credentials_update&'+$(my_form).serialize()+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});ajax_loader('box_credentials');}
function do_main(my_form)
{new Ajax.Updater($('box_main'), 'index.php',{method: 'get', parameters: 'page=ajax&action=page&box=box_main_update&'+$(my_form).serialize()+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});ajax_loader('box_main');}
function do_options(my_form,popup) {
if(popup ==0){new Ajax.Updater($('box_alerte'), 'index.php',{method: 'get', parameters: 'page=ajax&action=page&box=box_alerte_update&'+$(my_form).serialize()+'&popup='+popup+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});ajax_loader('box_alerte');}else {new Ajax.Request('index.php?page=ajax&action=page&box=box_alerte_update&'+$(my_form).serialize()+'&popup='+popup+g_fb_url, { method: 'get', onSuccess: function(transport) {if(transport.responseText == "true")
close_msg_box();}
});}
}
function box_profil_photo_update() {new Ajax.Updater($('box_profil_photo'), 'index.php',{method: 'get', parameters: 'page=ajax&action=page&box=box_profil_photo_update'+g_fb_url,onSuccess: function(transport)
{},onFailure: function()
{}
});//ajax_loader('box_profil_photo');
}
var g_d = 0;/* Discussion Flag */
var g_n = 1;/* Notification Flag */
var g_i = 0;/* Chatter Index */
var g_m = 0;/* My Index */
var g_u = 0;/* Timer */
var g_f = 1;/* First update flag */
var g_c = -1;/* Message counter */
var g_g = 0;/* Gift Playing Tag */
var g_t = '';/* Dynamic Title var */
var g_x = 0;/* Dynamic Title var */
var g_a = new Date().getTime();/* Activity sensor */
var g_ch_ps = new Array();var g_ch_gd = new Array();
function a()
{g_a = new Date().getTime();chat_set_msg_number(0);}
function chat_set_msg_number(value)
{g_x = value;if(g_t=='')
{g_t = document.title;}
if(value==0)
{document.title = g_t;}
else
{document.title = g_t+' ('+value+')';}
}
var g_nup = 0;var g_int = 0;
function ajax_start(interval)
{g_int = interval;ajax_timer(1);}
function ajax_timer(n)
{window.setTimeout(ajax_update, n * g_int);}
function ajax_update()
{url = 'index.php?page=ajax&action=update&d='+g_d+'&n='+g_n+'&id='+g_i+'&l='+g_l+g_fb_url+'&a='+g_a+'&nocache='+Math.random();ajx = new Ajax.Request(url,{method:'get',onSuccess:function(transport){ajax_parse(transport.responseXML);ajax_timer(1);}, onFailure:function(){ajax_timer(3)}});g_nup++;if(g_nup>5)
{counter.anim(1);g_nup=0;}
}
function show_notif(url_photo,url, txt, type)
{if(type==null)
{type = '5';}
$('box_notif_div').firstChild.firstChild.firstChild.childNodes[0].className = 'bx_tl bx_tl_'+type;$('box_notif_div').firstChild.firstChild.firstChild.childNodes[0].firstChild.className = 'bx_tl bx_tl_'+type;$('box_notif_div').firstChild.firstChild.firstChild.childNodes[1].className = 'bx_tp bx_tp_'+type;$('box_notif_div').firstChild.firstChild.firstChild.childNodes[2].className = 'bx_tr bx_tr_'+type;$('box_notif_div').firstChild.firstChild.firstChild.childNodes[2].firstChild.className = 'bx_tr bx_tr_'+type;$('notif_photo').src=url_photo;$('notif_text').innerHTML=txt;$('box_notif_a').href= url;$('box_notif_div').style.display='';new Effect.Move('box_notif_div', { x: p_x, y: p_y, transition: Effect.Transitions.sinoidal, duration:2, queue:'end'});new Effect.BlindDown('box_notif_inner',{duration:0.5,queue:'front'});setTimeout(clear_notif,15000);g_n = 0;}
function clear_notif()
{new Effect.Move('box_notif_div', { x: -p_x, y: -p_y, duration:0.1});new Effect.Fade('box_notif_div', { duration:0});new Effect.BlindUp('box_notif_inner',{duration:0.5,queue:'front'});g_n = 1;}
function ajax_parse(xmrResponse)
{if(typeof(xmrResponse)=='string')
{txt = xmrResponse;if (window.DOMParser)
{parser=new DOMParser();xmrResponse=parser.parseFromString(txt,"text/xml");}
else
{xmrResponse=new ActiveXObject("Microsoft.XMLDOM");xmrResponse.async="false";xmrResponse.loadXML(txt);} 
}
if(!xmrResponse)
{clearInterval(g_u);return false;}
lastconnected = xmrResponse.getElementsByTagName('lastConnected');if(lastconnected.length>0)
{addLastConnected(lastconnected[0].childNodes[0].firstChild.nodeValue,lastconnected[0].childNodes[1].firstChild.nodeValue,lastconnected[0].childNodes[2].firstChild.nodeValue,lastconnected[0].childNodes[3].firstChild.nodeValue);}
lastTop = xmrResponse.getElementsByTagName('lastTop');if(lastTop.length>0)
{if(lastTop[0].childNodes.length==5)
{try
{close_msg_box();}
catch(e)
{}
}
addLastTop(lastTop[0].childNodes[0].firstChild.nodeValue,lastTop[0].childNodes[1].firstChild.nodeValue,lastTop[0].childNodes[2].firstChild.nodeValue,lastTop[0].childNodes[3].firstChild.nodeValue);}
gifts = xmrResponse.getElementsByTagName('gifts');if(gifts.length>0)
{gifts = gifts[0];}
try
{if(gifts.firstChild)
{gift_n = gifts.firstChild.nodeValue;if($('span_gift_number'))
{$('span_gift_number').innerHTML = gift_n;}
if($('box_counter'))
{counter.set_new_value(gift_n);}
}
}
catch(e)
{}
try
{returncode = xmrResponse.getElementsByTagName('returnCode');if(returncode.length>0)
{returncode = returncode[0].firstChild.nodeValue;returnmsg = xmrResponse.getElementsByTagName('returnMessage');if(returnmsg.length>0)
{returnmsg = returnmsg[0].firstChild.nodeValue;if(returncode > 0)
{if(g_d)
{ajax_chat_add_notif(returnmsg,'ok');}
return true;}
else if(returncode == -3 || returncode == -8)
{document.location = returnmsg;return false;}
else
{if(g_d)
{ajax_chat_add_notif(returnmsg,'err');}
return false;}
}
else if(returncode == -9)
{new Ajax.Updater($('hover'),'index.php?page=ajax&action=page&box=box_subscribe'+g_fb_url);return false;}
return returncode;}
}
catch(e)
{}
notification = xmrResponse.getElementsByTagName('notification');if(notification.length>0)
{url = notification[0].childNodes[0].firstChild.nodeValue;txt = notification[0].childNodes[1].firstChild.nodeValue;url_photo = notification[0].childNodes[3].firstChild.nodeValue;type = notification[0].childNodes[4].firstChild.nodeValue;show_notif(url_photo,url, txt, type);}
msgnumber = xmrResponse.getElementsByTagName('msgNumber');if(msgnumber.length>0)
{msgnumber = msgnumber[0].firstChild.nodeValue;$('menu_new_msg').innerHTML = ((msgnumber>0)?'<b>'+(msgnumber*1)+'</b>':(msgnumber*1));if(msgnumber > g_c && g_c>0)
{Effect.Pulsate('menu_new_msg');}
g_c = msgnumber;}
if(xmrResponse.getElementsByTagName('chatter').length > 0 && g_f==1)
{chatters = xmrResponse.getElementsByTagName('chatter');g_m = chatters[0].childNodes[0].firstChild.nodeValue;g_i = chatters[1].childNodes[0].firstChild.nodeValue;g_ch_ps[g_m] = chatters[0].childNodes[1].firstChild.nodeValue;g_ch_ps[g_i] = chatters[1].childNodes[1].firstChild.nodeValue;g_ch_gd[g_m] = chatters[0].childNodes[2].firstChild.nodeValue;g_ch_gd[g_i] = chatters[1].childNodes[2].firstChild.nodeValue;}
if(g_d && xmrResponse.getElementsByTagName('message').length > 0)
{if(!$('message_table'))
{}
else
{chat_msg = xmrResponse.getElementsByTagName('message');if(g_f==1)
{chat_new_msg = chat_msg.length;}
else
{tmp = Array();for(i=0;i<chat_msg.length;i++)
{id = chat_msg[i].childNodes[0].firstChild.nodeValue;if(id!=g_m)
{tmp.push(chat_msg[i]);}
}
chat_msg = tmp;chat_new_msg = xmrResponse.getElementsByTagName('newMsgs')[0].firstChild.nodeValue;}
if(new Date().getTime() > (g_a + 5000))
{chat_set_msg_number(parseInt(g_x) + parseInt(chat_new_msg));}
for(i=(chat_msg.length-chat_new_msg);i<chat_msg.length;i++)
{id = chat_msg[i].childNodes[0].firstChild.nodeValue;if(chat_msg[i].childNodes.length==4)
{g = chat_msg[i].childNodes[2].firstChild.nodeValue;if(id!=g_m)
{ajax_chat_add_notif(js_gift_recieve.replace('%$1s',js_gift[g]).replace('%$2s','<a href="'+js_gift_recieve_url+'.html">'+js_gift_recieve_link+'</a>'),'ok');}
else
{ajax_chat_add_notif(js_gift_sent.replace('%$1s',g_ch_ps[g_i]),'ok');}
if(chat_msg[i].childNodes[3].firstChild.nodeValue=='1')
{setTimeout("displayGift("+g+")",2000);}
}
else
{g = null;}
if(chat_msg[i].childNodes[1].childNodes.length==0)
{txt = ' ';}
else
{txt = chat_msg[i].childNodes[1].firstChild.nodeValue;}
ajax_chat_add_reply(txt,g_ch_ps[id],g_ch_gd[id],g);}
}
}
g_f = 0;return true;}
function ajax_chat_start(id)
{g_d = 1;g_i = id;
ajax_chat_focus_compose();$('compose').focus();try
{new Draggable('smile_panel',{handle:'smile_panel_h',starteffect:'',endeffect:''});}
catch(e)
{}
try
{new Draggable('gift_panel',{handle:'gift_panel_h',starteffect:'',endeffect:''});}
catch(e)
{}
}
function ajax_chat_focus_compose()
{if($('compose').value==js_compose_helper)
{$('compose').value='';$('compose').style.color='black';}
return true;}
function ajax_chat_blur_compose()
{try
{if($('compose').value.length==0)
{$('compose').value=js_compose_helper;$('compose').style.color='grey';}
return true;}
catch(e)
{}
}
function ajax_chat_add_smile(code)
{$('compose').style.color='black';$('compose').focus();ajax_chat_focus_compose();$('compose').value+=code+' ';return false;}

function ajax_chat_toggle_smile()
{try
{if($('smile_panel').style.display=='none')
{$('smile_panel').style.top=s_x+'px';$('smile_panel').style.left=s_y+'px';$('smile_panel').style.display='';new Effect.BlindDown('smile_panel_i',{duration:0.5});
}
else
{new Effect.Fade('smile_panel', { duration:0});new Effect.BlindUp('smile_panel_i',{duration:0.5,queue:'front'});}
}
catch(e)
{}
}
function ajax_chat_toggle_gifts()
{try
{if($('gift_panel').style.display=='none')
{$('gift_panel').style.top=s_x+'px';$('gift_panel').style.left=s_y+'px';$('gift_panel').style.display='';new Effect.BlindDown('gift_panel_i',{duration:0.5});
}
else
{new Effect.Fade('gift_panel', { duration:0});new Effect.BlindUp('gift_panel_i',{duration:0.5,queue:'front'});}
}
catch(e)
{}
}
function ajax_chat_add_reply(msg, pseudo, gender,gift_id)
{try
{if(g_d && msg !='')
{msg = msg.replace(/\\\'/ig,"'");msg = msg.replace(/\\&quot;/ig,'"');msg = msg.replace(/&gt;/ig,'>');msg = msg.replace(/&amp;/ig,'&');msg = msg.replace(/\\\\/ig,"\\");msg = msg.replace(/&eacute;/ig,"é");msg = msg.replace(/&egrave;/ig,"è");msg = msg.replace(/&ugrave;/ig,"ù");msg = msg.replace(/&agrave;/ig,"à");
var tr = $('message_table').insertRow(-1);var td_psd = tr.insertCell(0);var td_msg = tr.insertCell(1);td_psd.className='box_generic_chat_dial_psd text_'+gender;td_psd.appendChild(document.createTextNode(pseudo.replace(/ /ig,"\u00a0")+"\u00a0-"));td_msg.className='box_generic_chat_dial_msg bg_'+gender+(gift_id?' text_p':'')+(pseudo=='YogZothot'?' text_s':'');td_msg.appendChild(document.createTextNode(msg));
td_msg.innerHTML = td_msg.innerHTML.replace(/\_([^_]+)\_/ig,"<span class='text_i'>$1</span>");td_msg.innerHTML = td_msg.innerHTML.replace(/\+([^+]+)\+/ig,"<span class='text_s'>$1</span>");td_msg.innerHTML = td_msg.innerHTML.replace(/\*([^*]+)\*/ig,"<span class='text_b'>$1</span>");
for(s=0;s<js_smile.length;s++)
{if(js_smile[s])
{j = 1;smile = js_smile[s].replace(">","&gt;");while(j)
{tmp = td_msg.innerHTML.replace(smile,'<img src="img/smile_s/'+s+'.png"></img>');if(tmp==td_msg.innerHTML)
{j = 0;}
td_msg.innerHTML = tmp;}
}
}

td_msg.innerHTML = td_msg.innerHTML.replace(/\\n/g,'<br />');if(gift_id)
{td_msg.innerHTML = '<img style="cursor:pointer;" onclick="displayGift('+gift_id+')" src="/img/gift/'+gift_id+'/30.png"></img>'+td_msg.innerHTML;}
$('message').scrollTop=$('message').scrollHeight;}
}
catch(e)
{}
}
function ajax_chat_add_notif(msg, type)
{if(g_d)
{$('message').style.backgroundImage = "";var tr = $('message_table').insertRow(-1);var td_msg = tr.insertCell(0);td_msg.className = 'box_generic_chat_dial_'+type;td_msg.innerHTML = msg;td_msg.colSpan = 2;$('message').scrollTop=$('message').scrollHeight;}
}
function chat_send_msg(txt)
{if(g_d)
{ajax_chat_focus_compose();$('compose').focus();if(txt==null)
{txt = $('compose').value;}
if(txt!='')
{if(g_f==1)
{g_f=0;}
ajax_chat_add_reply(txt,g_ch_ps[g_m],g_ch_gd[g_m]);$('compose').value='';url = 'index.php?page=ajax&action=send_msg&msg='+encodeURIComponent(txt)+'&id='+g_i+g_fb_url+'&nocache='+Math.random();new Ajax.Request(url, {method:'get',onSuccess:function(transport){ajax_parse(transport.responseXML);}});}
}
}
function chat_send_gift(gift_id)
{new Ajax.Updater($('hover'),'index.php?page=ajax&action=page&box=box_send_gift&gift='+gift_id+'&id='+g_i,{onComplete:function(transport){ajax_chat_focus_compose();$('gift_msg').value = $('compose').value;$('compose').value = '';$('gift_msg').focus();}});try
{if($('gift_panel'))
{new Effect.Fade('gift_panel', { duration:0});new Effect.BlindUp('gift_panel_i',{duration:0,queue:'front'});}
}
catch(e)
{}
}
function chat_blacklist(add,op_id)
{if(g_d || op_id)
{if(g_d)
{ban_id = g_i;}
else
{ban_id = op_id;}
url = 'index.php?page=ajax&action=blacklist&add='+add+'&id='+ban_id+'&nocache='+g_fb_url+Math.random();new Ajax.Request(url, {method:'get',onSuccess:function(transport){ajax_parse(transport.responseXML)}});}
}
function chat_favlist(add,op_id)
{if(g_d || op_id)
{if(g_d)
{fav_id = g_i;}
else
{fav_id = op_id;}
url = 'index.php?page=ajax&action=favlist&add='+add+'&id='+fav_id+'&nocache='+g_fb_url+Math.random();new Ajax.Request(url, {method:'get',onSuccess:function(transport){ajax_parse(transport.responseXML)}});}
}
function close_msg_box()
{$('box_error_msg_bg').style.display = 'none';}
function battle_vote(op_id)
{url = 'index.php?page=ajax&action=page&box=battle_vote&id='+op_id+'&nocache='+g_fb_url+Math.random();new Ajax.Updater($('battle_vote'),url);$('battle_l').style.backgroundColor='';$('battle_l').innerHTML='';$('battle_l').className='ajax_loader';$('battle_r').style.backgroundColor='';$('battle_r').innerHTML='';$('battle_r').className='ajax_loader';}
function onlyNum(object)
{object.value = object.value.replace(/[^0-9]/g,'');}
function setVisibility(id,display)
{if(display)
{$(id).style.display='';}
else
{$(id).style.display='none';}
}
var mail_tab = {"hotmial": "hotmail","free.com": "free.fr","hotmaol": "hotmail","hotmaile": "hotmail","hotmaill" : "hotmail","hhotmail" : "hotmail","hottmail" : "hotmail","hotmmail" : "hotmail","hotmaail" : "hotmail","hotmaiil" : "hotmail","hotmaile" : "hotmail","hotmall": "hotmail","hotrmail" : "hotmail","hotemail" : "hotmail","@otmail" : "@hotmail","hotmeil" : "hotmail","hormail" : "hotmail","hotmaim" : "hotmail","@ree.fr" : "@free.fr","hotmil" : "hotmail","hotmal" : "hotmail","homtail" : "hotmail","hptmail" : "hotmail","hotamil" : "hotmail","hotmal" : "hotmail","hotmaim" : "hotmail","@ree" : "@free","hotmaill" : "hotmail","hotail" : "hotmail","lapsote" : "laposte","homtail" : "hotmail","@frre" : "@free","htomail" : "hotmail","hotail" : "hotmail","gotmail" : "hotmail","tiscal.fr" : "tiscali.fr","hotmaiul" : "hotmail","hotmal" : "hotmail","hotmzil" : "hotmail","yaoo" : "yahoo","ayhoo" : "yahoo","ayhhoo" : "yahoo","yahhoo" : "yahoo","yaho." : "yahoo.","yhahoo" : "yahoo","hotmaail" : "hotmail","hotmil" : "hotmail","htmail" : "hotmail","hatmail" : "hotmail","hitmail" : "hotmail","neu.fr" : "neuf.fr","htomail" : "hotmail","hotmal" : "hotmail","lpaoste" : "laposte","hormail" : "hotmail","wwebmail" : "webmail","hptmail" : "hotmail","htomail" : "hotmail","hotamil" : "hotmail","@aramail" : "@caramail","hotmails" : "hotmail","courriermail" :"couriermail","mns." : "msn.","alposte" : "laposte","hoymail" : "hotmail","sypatico" : "sympatico","@ympatico" : "@sympatico","clu-internet" : "club-internet","tisclai" : "tiscali","symaptico" : "sympatico","@leposte" : "@laposte","wanaddoo" : "wanadoo","wanadoo" : "wanadoo","waanadoo" : "wanadoo","wannadoo" : "wanadoo","wanaadoo" : "wanadoo","hotnail" : "hotmail","@egetel" : "@cegetel","caramil" : "caramail","simpatico" : "sympatico","lapostes" : "laposte","@ahoo" : "@yahoo","hoitmail" : "hotmail","hootmail" : "hotmail","hatmail" : "hotmail","@euf" : "@neuf","hotamail" : "hotmail","hoymail" : "hotmail","@gmaol" : "@gmail","@gamail" : "@gmail","@cegtel" : "@cegetel","@tahoo" : "@yahoo","@carmail" : "@caramail","@wanasoo" : "@wanadoo","hotmsil" : "hotmail","waandoo" : "wanadoo","@gmial" : "@gmail","@ol" : "@aol","@htmail" : "@hotmail","@hotrmail" : "@hotmail","@oranfe" : "@orange","@wannadoo" : "@wanadoo","@hotramil" : "@hotmail","@carmail" : "@caramail","@cramail" : "@caramail","@caramail" : "@caramail","@caraail" : "@caramail","@caramil" : "@caramail","@caramal" : "@caramail","@caramali" : "@caramail","@caraamil" : "@caramail","@hotamil" : "@hotmail","@gaiml" : "@gmail","@wanasoo" : "@wanadoo","@hotma." : "@hotmail.","@hotmai." : "@hotmail.","@hotail" : "@hotmail","@voiula" : "@voila","@vooila" : "@voila","@voiila" : "@voila","@voilla" : "@voila","@voilaa" : "@voila","@vvoila" : "@voila","@viola" : "@voila","@voial" : "@voila","@hotmzail" : "@hotmail","@symaptico" : "@sympatico","@mssn" : "@msn","@msnn" : "@msn","@mmsn" : "@msn","@exempel." : "@exemple.","@hayoo" : "@yahoo","@yahoou" : "@yahoo","@yahooo" : "@yahoo","@yaho." : "@yahoo.","@ool" : "@aol","@aool" : "@aol","@aaol" : "@aol","@ol" : "@aol","@aoll" : "@aol","@ceetel" : "@cegetel","@bougtel" : "@bouygtel","@numricable" : "@numericable","@otmal" : "@hotmail","@caralail" : "@caramail","@laposet" :"@laposte","@laaposte" :"@laposte","@lapposte" :"@laposte","@lapooste" :"@laposte","@laposste" :"@laposte","@lapostte" :"@laposte","@lapostee" :"@laposte","@hotmsil" : "@hotmail","@hotmait" : "@hotmail","club-internet.com" : "club-internet.fr","voila.com" : "voila.fr","laposte.com" : "laposte.net","wanadoo.com" : "wanadoo.fr","laposte.fr" : "laposte.net","laposte.com" : "laposte.net","gmil.com" : "gmail.com","gail.com" : "gmail.com"
}

function checkEmail(input_email)
{regle = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,3}$/
if(input_email.value=='')
{alert(js_mail_empty);return false;}
if(!regle.test(input_email.value))
{alert(js_mail_wrong);return false;}
var replaced = input_email.value;for (var line in mail_tab)
{replaced = replaced.replace(line, mail_tab[line]);}
if(replaced!=input_email.value)
{if(confirm(js_mail_suggest+replaced+"' ?"))
{input_email.value=replaced;return true;}
else
{return false;}
}
return true;}
function getElementsByClassName(className, tag, elm)
{var testClass = new RegExp("(^|s)" + className + "(s|$)");var tag = tag || "*";var elm = elm || document;var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);var returnElements = [];var current;var length = elements.length;for(var i=0; i<length; i++)
{current = elements[i ];if(testClass.test(current.className))
{returnElements.push(current);}
}
return returnElements;}
var g_gn = 0;var g_cg = 1;
function start_gift_demo(delay, nb_gift)
{g_gn = nb_gift;window.setInterval(play_gift_demo,delay);}
function play_gift_demo()
{g_cg += 1;if(g_cg==g_gn+1)
{g_cg = 2;$('gift_demo').style.marginLeft = '0px';}
dim = -192;new Effect.Morph('gift_demo', {style: 'margin-left:'+((g_cg-1) * dim)+'px;',transition: Effect.Transitions.sinoidal,duration:1.5});}
function fb_login()
{if(FB)
{FB.login(fb_login_response, {scope:'email,user_birthday,user_location'});}
}
function fb_login_response(response)
{try
{if(response.status=="connected")
{tmp = new Ajax.Updater('hover','index.php?page=ajax&action=page&box=box_fb_connect',{evalScripts: true});}
else
{/* Not logged in, nevermind */
}
}
catch(e)
{}
}
function fb_login_change(response)
{if (response.session)
{
}
else
{
}
}
var w = window.innerWidth;var h = window.innerHeight;var c = null; // canvas
var b = null; // buffer
var pi2 = Math.PI*2;var t = 1000;var f = 0;// Frame counter
var mp = 50; // maxparticles
var p = new Array(mp); // particles
var u = null;
function r(n) { return Math.round(n*Math.random()); }
function fr(n) { return n*Math.random(); }
function sn(a) { return Math.sin(a); }
function redraw()
{w = window.innerWidth;h = window.innerHeight;document.getElementById('snow').height = h;document.getElementById('snow').width = w;}
function setup()
{redraw();c = document.getElementById('snow').getContext('2d');c.save();for (var i=0; i<mp; i++)
{p[i]=new Array(fr(w),fr(h),1+fr(5));}
u = setInterval(draw,30);}
var a = 0;function update()
{a+=0.001;var s=sn(a);for (var i=0; i<mp; i++)
{var pn=p[i];var s2 = sn(4*a+i);pn[1]+=pn[2]/2+(1+s2);pn[0]+=6*(s+(s2/2))/(10/pn[2]);if ((pn[1]>h+10)||(pn[0]>w+10)||(pn[0]<-10))
{p[i]=(i%3>0)?(Array(fr(w),-10,pn[2])):((s>0)?(Array(-5,fr(h),pn[2])):(Array(w+5,fr(h),pn[2])));}
} 
}
function draw() 
{c.clearRect(0,0,w,h);c.fillStyle = "rgba(255,255,255,1)";c.strokeStyle="none";c.beginPath();for (var i=0; i<mp; i++)
{c.moveTo(p[i][0],p[i][1]);c.arc(p[i][0],p[i][1],p[i][2],0,pi2,true);}
c.fill();update();f++;tmp_t = (new Date().getMilliseconds())%1000;if(tmp_t < t)
{if(!isNaN(f) && f < 20)
{clearInterval(u);c.clearRect(0,0,w,h);}
f = 0;}
t = tmp_t;}
var helper_timer;
function show_helper(msg)
{if($('helper_fb'))
{h = 'helper_fb';}
else
{h = 'helper';}
window.clearTimeout(helper_timer);$(h).firstChild.innerHTML = msg;Effect.SlideDown(h,{duration: 0.5});helper_timer = window.setTimeout(hide_helper,5000);}
function hide_helper()
{if($('helper_fb'))
{h = 'helper_fb';}
else
{h = 'helper';}
Effect.SlideUp(h,{duration: 0.5});}
function get_screen()
{new Ajax.Request('index.php?page=ajax&action=set_screen&h='+screen.height+'&w='+screen.width);}
var faq_old_cat = 0;function faq_expand(cat)
{if(faq_old_cat)
{Effect.toggle(faq_old_cat,'blind',{duration: 0.25});}
Effect.toggle(cat,'blind',{duration: 0.25});if(cat != faq_old_cat)
{faq_old_cat = cat;}
else
{faq_old_cat = 0;}
}
function pop_up(box)
{new Ajax.Updater($('hover'),'index.php?page=ajax&action=page&box='+box,{evalScripts:true});}
function get_answer(n)
{l = document.getElementsByName('q'+n);for(i=0;i<l.length;i++)
{if(l[i].checked)
{return l[i].value;}
}
return 0;}
function show_pay_boxes(i,c)
{if($('err_msg'))
{$('err_msg').innerHTML = '';}
if($('err_msg_2'))
{$('err_msg_2').innerHTML = '';}
if(i)
{$('select_paiement_iplus').style.display = '';}
else
{$('select_paiement_iplus').style.display = 'none';}
if(c)
{$('select_paiement_cb').style.display = '';}
else
{$('select_paiement_cb').style.display = 'none';}
if(!(i && c))
{$('select_paiement_sep').style.display = 'none';}
else
{$('select_paiement_sep').style.display = '';}
}
var m_x = 0;var m_y = 0;
function mm(e)
{try
{m_x = e.clientX + document.body.scrollLeft+ document.documentElement.scrollLeft;m_y = e.clientY + document.body.scrollTop+ document.documentElement.scrollTop;}
catch(e)
{}
}
var b_c = 0;
function b_rotate()
{$('b'+(b_c+1)).fade();b_c=((b_c+1)%4);$('b'+(b_c+1)).appear();window.setTimeout(b_rotate,2500);}
var ld_i = false;var ld_x = 0;// pos.x
var ld_y = 0;// pos.y
var ld_r = 0;// pos.angle
var ld_v = 0;// lin.speed
var ld_a = 0;// ang.speed
function ladybug()
{if(ld_i)
{d_x = m_x - ld_x;d_y = m_y - ld_y;
d_a = ((Math.atan2(d_y,d_x)-ld_r)%(2*Math.PI));
if(d_a > (Math.PI))
{d_a -= 2 * Math.PI;}
else if (d_a < -(Math.PI))
{d_a += 2 * Math.PI;}
if(d_a > ld_a)
{d_a = ld_a;}
else if(d_a < (0-ld_a))
{d_a = (0-ld_a);}
else
{}
ld_r += d_a;
ld_x+=(Math.cos(ld_r)*ld_v);ld_y+=(Math.sin(ld_r)*ld_v);
ld = $('ladybug');ld.style.left = ld_x+'px';ld.style.top = ld_y+'px';
cn = (Math.round(((ld_r + (Math.PI)/2)/Math.PI)*32))%64;if(cn<0)
{cn+=64;}
ld.style.backgroundPosition = -(39*cn)+'px 0px';}
else
{ld_x = Math.floor(screen.width/2);ld_y = Math.floor(screen.height/2);ld_r = 0;ld_v = 6;ld_a = 0.1;ld_i = true;window.setInterval(ladybug,40);}
}

/////////////////// MULTI PHOTO //////////////////////////
function showCrossEvent() {this.firstDescendant().setStyle({display:'block'});}
function hideCrossEvent() {this.firstDescendant().setStyle({display:'none'});}
//create event for empty picture
function addSortableCrossEvent(id) {
$("container_"+id).observe('mouseover',showCrossEvent);$("container_"+id).observe('mouseout', hideCrossEvent);$("container_"+id).observe('click', hideCrossEvent);}

//dynamic upload picture and show on container
function changePicture(myForm) {// has empty container?
if($('empty').value != "") {myForm.submit();} else {alert('Vous ne pouvez pas ajouter de photos supplementaires, vous devez d\'abord en supprimer.');}
}
var sexe;// delete picture form server
function deletePicture(id) {
if(id < $("empty").value || $("empty").value == "") {$("empty").value = id;} else {$("empty").value = $("empty").value;}
$('cross'+id).remove();$("container_"+id).stopObserving();
$('box_profile_photo_img'+id).replace("<p id='empty"+id+"' style='display:block;margin-top:0px;'><img class='box_profile_img' src='/img/empty_"+sexe+".jpg' style='width:80px;height:80px;' /></p>");$("container_"+id).firstDescendant().setStyle({display:'block'});
new Ajax.Request('index.php?page=ajax&action=remove_photo', {method: 'POST',parameters :{order:id}
});
}
//create sortable list for upload picture
function makeSortable() {//create the sortable list
Sortable.create("sortlist", {tag:"div",only:"not_empty",overlap:"horizontal",constraint:false,hoverclass:"none",onChange: function(item) {var list = Sortable.options(item).element;},onUpdate: function(list) {
var sequence = Sortable.sequence("sortlist");
// treatment for the principal picture
var photoP = sequence[0];
$("container_"+photoP).setStyle({width:'128px',height:'128px',margin:'4px'});$("box_profile_photo_img"+photoP).setStyle({width:'128px',height:'128px'});$('cross'+photoP).setStyle({display:'none'});$("container_"+photoP).stopObserving();
var nbElements = sequence.size();//console.log(sequence);var i=1;
// pour chaque conteneur
for (i=1;i<= 5 ;i++) {var cursorStyle = (i <= nbElements)?"move":"default";// not principla picture
if(i != photoP) {if($("box_profile_photo_img"+i) != null) {
$("box_profile_photo_img"+i).setStyle({width:'80px',height:'80px'});}
$("container_"+i).setStyle({width:'80px',height:'80px','margin':'53px 4px 4px 4px',cursor:cursorStyle});}
// we are sure we have sorted picture in the container
if(typeof sequence[i] != 'undefined') {if( $("container_"+sequence[i]).firstDescendant().tagName == 'IMG') {html_cross = "<div id='cross"+sequence[i]+"' class='cross_photo' style='display:none;' onclick='deletePicture("+sequence[i]+");' >&nbsp;</div>";$("container_"+sequence[i]).insert({'top':html_cross});
}
if(i != photoP)
addSortableCrossEvent(i);}
}
$("photo_order").value = Sortable.serialize(list);makeSortable();}
});
// when all container is empty
if(typeof Draggables.drags[0] != "undefined")
Draggables.drags[0].destroy();
// serialize photo order
$("photo_order").value =Sortable.serialize('sortlist');var sequence = Sortable.sequence("sortlist");// for each picture container
for(i=1;i<=5;i++) {
if(parseInt(sequence[0]) != i && $("container_"+i).firstDescendant().tagName != 'P') {addSortableCrossEvent(i);}
}
}
// show picture uploaded this function is not called when picture number is full
function showPictureUploaded(fileName) {
var container_id = parseInt($("empty").value);makeSortable();// while next container is not empty
while (container_id <= 5 && $("container_" + container_id).firstDescendant().tagName != 'P') {container_id++;}
var container = $("container_" + container_id);
var html_cross = "";$(container).setStyle({cursor:'move'});
$('empty' + container_id).style.display = "none";$(container).firstDescendant().remove();
var sequence = Sortable.sequence("sortlist");
html_cross = "<div id=\'cross" + container_id + "\' class=\'cross_photo\' style=\'display:none;\' onclick=\'deletePicture(" + container_id + ");\' >&nbsp;</div>";$(container).insert(html_cross + "<img id=\'box_profile_photo_img" + container_id + "\' class=\'sorting box_profile_img\' src=\'\' style=\'height: auto !important;height: 100%;max-height: 100%;width: auto !important;width: 100%;max-width: 100%;position:relative;\' />");
 // not principal picture
if(container_id != parseInt(sequence[0]) && !isNaN(parseInt(sequence[0]))) {addSortableCrossEvent(container_id);}
// this container is now not empty
container.addClassName("not_empty");// adding sortable on the new picture
makeSortable();
$("form_upload_photo").style.display="block";$("status_div").style.display="none";
// retreive picture element and set the src
var img = $("box_profile_photo_img" + container_id);img.src = "uploads/" + fileName;
$('fb_pic_url').value=0;// the new empty container
$("empty").value = (container_id < 5)?container_id + 1:"";}
var myFbPicture = new Array();var pictureCount = 0;function addPicture(elem,pictureUrl) 
{if(elem.checked) {if(pictureCount < 5 && (pictureCount < (5-($("empty").value-1)))) {pictureCount++;}else {alert('maxi atteint');elem.checked = false;}
} else {pictureCount--;}
}
function retreiveFbPictures(data) {var data = data;//var firstEmptyId = parseInt($("empty").value);
$$('.checkboxes').each(function(o) {if(o.checked == true) {myFbPicture.push(data[o.value].src_big);}
});
console.log(myFbPicture);new Ajax.Request('index.php?page=ajax&action=page&box=box_photo_upload', {method: 'POST',parameters :{empty:parseInt($("empty").value),nb_photos:myFbPicture.length,type:'fb',pictures:myFbPicture},onSuccess: function(transport) {console.log(transport);}
});}
function check(elem) {
if(elem.checked) {elem.checked = false;} else {elem.checked = true;}
elem.click();return false;}
function showFbPictures(response)
{
if (!response || !response.data)
{$('fb_pictures_content').insert('<h1>no pictures</h1>');return;}
$('fb_pictures_content').insert('<div>');for (var i=0;i< response.data.length;i++)
{
$('fb_pictures_content').insert('<div style="float:left;margin:5px;height:80px;" class="sorting"><input type="checkbox" id="p'+i+'" value="'+i+'" class="checkboxes" onclick="addPicture(this,\''+response.data[i].src_big+'\');" style="height:80px;"/><img src="' + response.data[i].src_small + '" style="height:80px;width:80px;padding:2px;border:1px solid #BCBCBC;" onclick="check($(\'p'+i+'\'));return false;" /></div>');
}
var data = response.data;
$('fb_pictures').insert('<div style="padding:15px;"><div style="float:left;width:100px;margin-left:200px;" id="submitFbPicture" class="button_1" style="width:100px;"><div class="button_lf_1"></div><div class="button_mi_1" onselectstart="return false"></div><div class="button_rt_1"></div><div class="button_content_1">Valider</div></div><div style="margin-left:310px;width:100px;" onmouseout="this.childNodes[0].className=\'button_lf_1\';this.childNodes[1].className=\'button_mi_1\';this.childNodes[2].className=\'button_rt_1\';" onmouseover="this.childNodes[0].className=\'button_lf_1 button_h\';this.childNodes[1].className=\'button_mi_1 button_h\';this.childNodes[2].className=\'button_rt_1 button_h\';" onclick="close_msg_box();" onmousedown="this.childNodes[0].className=\'button_lf_1 button_c\';this.childNodes[1].className=\'button_mi_1 button_c\';this.childNodes[2].className=\'button_rt_1 button_c\';return false;" onmouseup="this.onmouseout()" class="button_1" style="width:100px;"><div class="button_lf_1"></div><div class="button_mi_1" onselectstart="return false"></div><div class="button_rt_1"></div><div class="button_content_1">Annuler</div></div></div>')
$('submitFbPicture').observe('click', function(){retreiveFbPictures(response.data);});
$('submitFbPicture').observe('mouseout', function(e){this.childNodes[0].className='button_lf_1';this.childNodes[1].className='button_mi_1';this.childNodes[2].className='button_rt_1';});
$('submitFbPicture').observe('mouseover', function(e){this.childNodes[0].className='button_lf_1 button_h';this.childNodes[1].className='button_mi_1 button_h';this.childNodes[2].className='button_rt_1 button_h';});
$('submitFbPicture').observe('mousedown', function(e){this.childNodes[0].className='button_lf_1 button_c';this.childNodes[1].className='button_mi_1 button_c';this.childNodes[2].className='button_rt_1 button_c';});
$('submitFbPicture').observe('mouseup', function(e){this.childNodes[0].className='button_lf_1';this.childNodes[1].className='button_mi_1';this.childNodes[2].className='button_rt_1';});
$('photo_uploader').setStyle({display:'none'});$('fb_pictures').setStyle({display:'block'});}
function getFbPictures(response)
{/* images de l'album "profile" + images taggés */
query = "SELECT src_small, src_big FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner = me() AND type = 'profile') OR pid IN (SELECT pid FROM photo_tag WHERE subject = me())";FB.api('/fql', { q: query }, showFbPictures);}
function loginFbPictures()
{FB.login(getFbPictures, {scope: 'user_photos'});}
function invite_submit()
{$('load_1').style.display='none';$('load_2').style.display='';$('form').submit();}var js_mail_empty = "Vous n'avez pas entré d'adresse e-mail !";var js_mail_wrong = "Cette adresse e-mail n'est pas valide !";var js_mail_suggest = "Cette adresse e-mail semble invalide !\nVouliez-vous écrire ";var js_compose_helper = "Tapez votre texte ici...";var js_gift_sent = "Vous avez envoyé un Gift à %$1s";var js_gift_recieve = "Vous avez reçu un Gift ! (%$1s Crédits à échanger dans le %$2s)";var js_gift_recieve_link = "Gift Store";var js_gift_recieve_url = "gift-store";var js_smile = new Array();js_smile[1]=":-D";js_smile[2]=":-p";js_smile[3]=";-)";js_smile[4]=":-X";js_smile[5]="8·";js_smile[6]="8-p";js_smile[7]="*:(";js_smile[8]=":-(";js_smile[9]=":-S";js_smile[10]="^^)";js_smile[11]="lol";js_smile[12]="mdr";js_smile[13]="@:-)";js_smile[14]=">:)";js_smile[15]="%-p";js_smile[16]=":(";var js_gift = new Array();js_gift[19]="25";js_gift[1]="250";js_gift[2]="250";js_gift[3]="250";js_gift[13]="250";js_gift[20]="250";js_gift[22]="500";js_gift[15]="500";js_gift[14]="500";js_gift[16]="1000";js_gift[17]="2000";js_gift[18]="5000";
