Hébergeur de fichiers indépendant

chat3 french 1bf98be.js

À propos du fichier

Type de fichier
Fichier JS de 45 Ko (text/plain)
Confidentialité
Fichier public, envoyé le 5 juin 2012 à 15:56, depuis l'adresse IP 93.0.x.x (France)
Sécurité
Ne contient aucun Virus ou Malware connus - Dernière vérification: 3 heures
Statistiques
La présente page de téléchargement a été vue 829 fois depuis l'envoi du fichier
Page de téléchargement

Aperçu du fichier


//
//All code below is Copyright (c) 2007 Xooit.com, All right reserved
//

lang_changed_topic_to="a chang\u00e9 le sujet: ";lang_deleted_posts="a effac\u00e9 les messages du chat";lang_cancel="Annuler";lang_ban="Bannir utilisateur du chat";lang_has_banned_from_chat="a banni %1$s du chat";lang_banned_users="Utilisateurs bannis";lang_unban="D\u00e9bannir";lang_change_topic="Changer le sujet";lang_clear_msgs="Effacer tous les messages";lang_close="Fermer";lang_admin="Admin";lang_disconnected="Vous avez \u00e9t\u00e9 d\u00e9connect\u00e9(e)";lang_archives="Archives";lang_no_read_perms="D\u00e9sol\u00e9, mais vous n\u2019avez pas la permission de lire les messages du chat";lang_profile="Profil";lang_chat_help_sound="Jouer un son lors de l\u2019arriv\u00e9e d\u2019un nouveau message";lang_chat_help_bold="Mettre vos messages en gras par d\u00e9faut. Vous pouvez aussi utiliser le BBCode normal pour formater votre message.";lang_chat_help_italic="Mettre vos messages en italic par d\u00e9faut. Vous pouvez aussi utiliser le BBCode normal pour formater votre message.";lang_chat_help_color="Modifier la couleur par d\u00e9faut de vos messages. Vous pouvez aussi utiliser le BBCode normal pour formater votre message.";lang_not_connected="Vous devez vous connecter au chat avant de pouvoir effectuer cette action";lang_connection="Connexion";lang_disconnection="D\u00e9connexion";lang_chat_open_popup="Ouvrir le chat dans une nouvelle fen\u00eatre";lang_chat_resize="Redimensionner le chat";lang_chat_notify_new_message="Chat: Nouveau message !";lang_chat_activex_disabled="Vous devez r\u00e9activer l\u2019ActiveX pour utiliser le chat avec Internet Explorer. (Niveau de s\u00e9curit\u00e9 par d\u00e9faut)";lang_chat_browser_not_compatible="Votre navigateur est trop ancien et n\u2019est pas compatible avec le chat. Utilisez une version plus r\u00e9cente de votre navigateur.";lang_delete_message="Supprimer le Message";lang_chat_reply="Citer le message";lang_chat_private="Discuter en priv\u00e9";lang_menu="Menu";

blinkTab={elem:null,oldHref:null,oldTitle:null,timer:null,bit:0,title:null,blink:function(href,title){if(blinkTab.oldHref!=null)return;if(blinkTab.oldTitle!=null)return;if(title){blinkTab.oldTitle=document.title;blinkTab.title=title;}
if(!blinkTab.elem){var elems=$$('link[rel~="icon"]');blinkTab.oldHref='/favicon.ico';if(elems.length>0){var elem=elems[elems.length-1];blinkTab.oldHref=elem.href;elem.parentNode.removeChild(elem);}else{(elem=$cE('link')).rel='shortcut icon';elem.type='image/gif';}
blinkTab.elem=elem;}else{blinkTab.oldHref=blinkTab.elem.href;blinkTab.elem.parentNode.removeChild(blinkTab.elem);}
blinkTab.elem.href=href;document.getElementsByTagName('HEAD')[0].appendChild(blinkTab.elem);if(title){blinkTab.timer=setInterval(blinkTab.blinkTitle,1000);}
Event.observe(window,'focus',blinkTab.stop);Event.observe(document.body,'click',blinkTab.stop);},stop:function(){if(blinkTab.oldHref==null)return;blinkTab.elem.parentNode.removeChild(blinkTab.elem);blinkTab.elem.href=blinkTab.oldHref;document.getElementsByTagName('HEAD')[0].appendChild(blinkTab.elem);blinkTab.oldHref=null;if(blinkTab.timer){clearInterval(blinkTab.timer);document.title=blinkTab.oldTitle;}
blinkTab.oldTitle=null;Event.stopObserving(window,'focus',blinkTab.stop);Event.stopObserving(document.body,'click',blinkTab.stop);},blinkTitle:function(){document.title=(++blinkTab.bit%2)?blinkTab.title:blinkTab.oldTitle;}};var xooitChatConnectedUsers={};xooitChatClass=Class.create();xooitChatClass.prototype={serverTime:false,lastPing:0,posturl:false,isprivate:false,interval:5000,initialize:function(row1,row2,tz,auth,uid,showConnected,autoConnect,enableNewMsgEffect,rci,chatFile,interval,chatJsHost){this.rowClass=1;this.rowClasses=[row1,row2,'row3'];this.auth=auth;this.tz=tz;this.uid=uid;this.autoConnect=autoConnect;this.showConnected=(this.autoConnect!=1)?showConnected:0;this.enableNewMsgEffect=enableNewMsgEffect;this.rci=rci;this.autoScroll=true;this.firstUpdate=true;this.updating=false;this.bannedIds=new Array();this.bannedPseudos=new Array();this.chatFile=(typeof chatFile=='undefined'||!chatFile?this.getChatFile():chatFile);this.chatJsHost=(typeof chatJsHost=='undefined'||!chatJsHost?false:chatJsHost);this.chatJsHostErrors=0;this.lastUpdate=0;this.lastModified=0;this.previousDate=new Date(0);if(typeof interval!='undefined'&&interval)
this.interval=interval;if(!this.checkCompat()){$('chatMsgContainer').getElementsBySelector('td').each(function(elem){elem.innerHTML='<p style="padding:1em;background-color:InfoBackground;color:InfoText">'
+'<span class="genmed">'+lang_chat_browser_not_compatible+'</span></p>';throw $break;});return false;}
if(Prototype.Browser.IE&&!Ajax.getTransport()){$('chatMsgContainer').getElementsBySelector('td').each(function(elem){elem.innerHTML='<p style="padding:1em;background-color:InfoBackground;color:InfoText">'
+'<span class="genmed">'+lang_chat_activex_disabled+'</span></p>';throw $break;});return false;}
this.connectedDiv=$('chatConnectedDiv')
this.chatList=$('chatList');if(!this.connectedDiv){this.chatList.style['width']='100%';$(this.chatList.parentNode).addClassName(this.rowClasses[0]).setStyle({width:'100%'});}
this.chatList.observe('mouseover',function(){this.autoScroll=false;}.bind(this));this.chatList.observe('mouseout',function(){this.autoScroll=true;}.bind(this));if(this.showConnected&&!this.connectedDiv){this.KonqiChatHGrip=false;$A($(this.chatList.parentNode.parentNode.parentNode).cleanWhitespace().childNodes).each(function(elem){$A($(elem).cleanWhitespace().childNodes).each(function(elem){if(elem.nodeName=='TH'&&Prototype.Browser.KHTML){var elem2=elem.cloneNode(false);var elem3=elem2.cloneNode(false).setStyle({width:'auto'});elem.parentNode.appendChild(elem2.setStyle({width:'1px',height:'1px',overflow:'auto'}));this.KonqiChatHGrip=elem3.appendChild($cE('div').setStyle({width:'100px',height:'1px'}));this.KonqiChatHGrip.appendChild($cTN(' '));elem.parentNode.appendChild(elem3);}else{elem.colSpan=3;}}.bind(this));}.bind(this));this.chatList.parentNode.colSpan='1';var gripTd=$cE('td').addClassName(this.rowClasses[1]).setStyle({width:'3px',cursor:'w-resize'});gripTd.innerHTML='&nbsp;';this.chatList.parentNode.parentNode.appendChild(gripTd);this.connectedDiv=this.chatList.parentNode.parentNode.setStyle({width:'100%'}).appendChild($cE('td').addClassName(this.rowClasses[0]).setStyle({verticalAlign:'top'})).appendChild($cE('div').setStyle({width:'100px',height:'150px',overflow:'auto'}));}else if(this.showConnected){gripTd=$('chatGripTd');}
if(gripTd){gripTd.observe('mousedown',function(event,element,direction,invert,onresize){new resizeClass(event,element,direction,invert,onresize);}.bindAsEventListener(this,(this.KonqiChatHGrip?[this.connectedDiv,this.KonqiChatHGrip]:[this.connectedDiv]),'H',{x:true},this.onresize.bind(this)));gripTd.observe('mouseover',function(element){element.removeClassName(this.rowClasses[1]).addClassName(this.rowClasses[2]);}.bind(this,gripTd));gripTd.observe('mouseout',function(element){element.removeClassName(this.rowClasses[2]).addClassName(this.rowClasses[1]);}.bind(this,gripTd));}
if(this.chatVGrip=$('chatVGrip')){this.chatVGrip.observe('mousedown',function(event,elements,direction,onresize){new resizeClass(event,elements,direction,{},onresize);}.bindAsEventListener(this,(this.connectedDiv?[this.chatList,this.connectedDiv]:this.chatList),'V',this.onresize.bind(this)));if(this.chatVGrip.src=='http://img4.xooimage.com/files/g/r/grip-54c8f.png'){this.chatVGrip.src='http://img5.xooimage.com/files/d/6/7/grip-115818.gif';}
if(!this.chatVGrip.title||this.chatVGrip.title!=lang_chat_resize){this.chatVGrip.title=lang_chat_resize;}
infoBox.setupElement(this.chatVGrip);if(!(this.popupButton=$('chatPopupButton'))){(this.popupButton=this.chatVGrip.parentNode.insertBefore($cE('img').setStyle({cursor:'pointer',paddingTop:'10px',paddingRight:'3px',width:'11px',height:'11px',cssFloat:'right'}),this.chatVGrip.nextSibling)).observe('click',function(){window.open('/chat2.php','_blank','menubar=no,toolbar=no,resizable=yes,scrollbars=yes')}).src='http://img10.xooimage.com/files/5/e/a/window-115821.gif';this.popupButton.title=lang_chat_open_popup;}
infoBox.setupElement(this.popupButton);}
var topicTd=$('chatTopic');if(topicTd.nodeName.toLowerCase()!='div'){while(topicTd.nodeName.toLowerCase()!='td')topicTd=topicTd.parentNode;while(topicTd.firstChild)topicTd.removeChild(topicTd.firstChild);topicTd=topicTd.appendChild($cE('div')).addClassName('genmed').setStyle({fontWeight:'bold'});}
if(!(this.archiveLink=$('chatArchiveLink'))){this.archiveLink=$cE('div').hide().setStyle({cssFloat:'right'});this.archiveLink.id='chatArchiveLink';var a=this.archiveLink.appendChild($cE('a'));a.appendChild($cTN('['+lang_archives+']'));a.href='javascript:void(0);';topicTd.appendChild(this.archiveLink);}
this.archiveLink.getElementsBySelector('a')[0].onclick=this.updateChatArchive.bind(this);this.adminLink=false;this.adminOpened=false;if(this.auth[this.AUTH_MOD]==1){if(!(this.adminLink=$('chatAdminLink'))){this.adminLink=$cE('div').hide().setStyle({cssFloat:'right'});this.adminLink.id='chatAdminLink';var a=this.adminLink.appendChild($cE('a'));a.appendChild($cTN('['+lang_admin+']'));a.href='javascript:void(0);';topicTd.appendChild(this.adminLink);}
this.adminLink.getElementsBySelector('a')[0].onclick=this.openAdmin.bindAsEventListener(this);if(!(this.adminMenu=$('chatAdminMenu'))){this.adminMenu=$cE('div').hide().setStyle({cssFloat:'right'});this.adminMenu.id='chatAdminMenu';this.adminMenu.appendChild($cE('div')).id='chatAdminMenuDiv';topicTd.appendChild(this.adminMenu);}
this.adminMenuDiv=document.getElementById('chatAdminMenuDiv');if(!(this.adminMenuTopic=document.getElementById('chatAdminMenuTopic'))){(this.adminMenuTopic=this.adminMenuDiv.appendChild($cE('a'))).appendChild($cTN('['+lang_change_topic+']'));this.adminMenuTopic.href='javascript:void(0)';}
this.adminMenuTopic.onclick=this.changeTopic.bind(this);if(!(this.adminMenuBanned=document.getElementById('chatAdminMenuBanned'))){(this.adminMenuBanned=this.adminMenuDiv.appendChild($cE('a'))).appendChild($cTN('['+lang_banned_users+']'));this.adminMenuBanned.href='javascript:void(0)';}
this.adminMenuBanned.onclick=this.listBanned.bind(this);if(!(this.adminMenuClear=document.getElementById('chatAdminMenuClear'))){(this.adminMenuClear=this.adminMenuDiv.appendChild($cE('a'))).appendChild($cTN('['+lang_clear_msgs+']'));this.adminMenuClear.href='javascript:void(0)';}
this.adminMenuClear.onclick=this.clearMsgs.bind(this);if(!(this.adminMenuClose=document.getElementById('chatAdminMenuClose'))){(this.adminMenuClose=this.adminMenuDiv.appendChild($cE('a'))).appendChild($cTN('['+lang_close+']'));this.adminMenuClose.href='javascript:void(0)';}
this.adminMenuClose.onclick=this.closeAdmin.bindAsEventListener(this);}
if(!(this.connectLink=$('chatConnectLink'))){this.connectLink=$cE('div').setStyle({cssFloat:'right'});this.connectLink.id='chatConnectLink';;var a=this.connectLink.appendChild($cE('a'));a.appendChild($cTN('['+lang_connection+']'));a.href='javascript:void(0);';topicTd.appendChild(this.connectLink);}
this.connectLink.getElementsBySelector('a')[0].onclick=function(){this.toggleConnect();this.connect();}.bind(this);if(!(this.disconnectLink=$('chatDisconnectLink'))){this.disconnectLink=$cE('div').setStyle({cssFloat:'right'}).hide();this.disconnectLink.id='chatDisconnectLink';;var a=this.disconnectLink.appendChild($cE('a'));a.appendChild($cTN('['+lang_disconnection+']'));a.href='javascript:void(0);';topicTd.appendChild(this.disconnectLink);}
this.disconnectLink.getElementsBySelector('a')[0].onclick=function(){this.toggleConnect();this.connect();}.bind(this);if(!(this.topicContainer=$('chatTopicContainer'))){this.topicContainer=$cE('div');topicTd.appendChild(this.topicContainer);}
this.chatMsgContainer=$('chatMsgContainer');if(this.chatMsgContainer.nodeName.toLowerCase()!='tbody'){$A($('chatMsgContainer').childNodes).each(function(elem){elem.parentNode.removeChild(elem);});$('chatMsgContainer').id='chatMsgContainer_table';(this.chatMsgContainer=$('chatMsgContainer_table').appendChild($cE('tbody'))).id='chatMsgContainer';}
if(!(this.quoteContainer=$('chatQuoteContainer'))){this.quoteContainer_table=$($('chatMsgContainer_table').cloneNode(true));this.quoteContainer_table.hide().style['border']='1px outset black';this.quoteContainer_table.id='chatQuoteContainer_table';this.quoteContainer_table.getElementsBySelector('*').each(function(e){if(e.id&&e.id=='chatMsgContainer'){e.id='chatQuoteContainer';this.quoteContainer=e;}else{e.id='';}}.bind(this));this.topicContainer.parentNode.insertBefore(this.quoteContainer_table,this.topicContainer);}
setInterval(this.resizeImgs.bind(this),1000);setInterval(this.autoScrollFunc.bind(this),100);(this.chatMsg=$('chatMsg')).observe('keypress',function(event){if(event.keyCode==Event.KEY_RETURN)this.sendMsg();}.bindAsEventListener(this));this.chatMsg.setStyle({width:(this.chatMsg.offsetWidth-80)});this.soundElement=false;if(flashDetect()&&!Prototype.Browser.KHTML){var elemId='soundNotify'+(new Date()).getTime();var container=$cE('span').setStyle({position:'absolute',top:'-100',left:'-100'});document.body.insertBefore(container,document.body.firstChild);container.innerHTML='<embed type="application/x-shockwave-flash" swliveconnect="true" '
+'play="false" loop="false" quality="high" bgcolor="transparent" width="1" height="1" '
+'id="'+elemId+'" '
+'src="images/soundNotify2.swf?3"></embed>';this.soundElement=document.getElementById(elemId);}
if(!(this.buttonF=document.getElementById('chatButtonF'))){this.buttonF=$cE('input').addClassName('liteoption').addClassName('button2').setStyle({backgroundRepeat:'no-repeat',backgroundPosition:'center'});this.buttonF.type='button';this.buttonF.title=lang_chat_help_sound;this.chatMsg.parentNode.insertBefore(this.buttonF,this.chatMsg);}
this.buttonF.value='\u00a0\u00a0\u00a0';if(navigator.appName=='Konqueror'){this.buttonF.type='image';this.buttonF.setImage=function(image){this.src=image;}}else{this.buttonF.setImage=function(image){if(Prototype.Browser.IE&&navigator.userAgent.indexOf('MSIE 6')>-1){this.style['filter']='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+image+'",sizingMethod="scale")';image='/images/spacer.gif';}
this.style['backgroundImage']='url('+image+')';}}
if(Prototype.Browser.IE&&(document.documentMode||0)!=8){this.buttonF.style['backgroundPosition']='top left';}
this.buttonF.onclick=this.updateStyle.bind(this,'sound');infoBox.setupElement(this.buttonF);if(!(this.buttonG=$('chatButtonG'))){this.buttonG=$cE('input').addClassName('liteoption').addClassName('button2').setStyle({fontWeight:'bold'});this.buttonG.type='button';this.buttonG.value=' G ';this.buttonG.title=lang_chat_help_bold;this.chatMsg.parentNode.insertBefore(this.buttonG,this.chatMsg);}
this.buttonG.onclick=this.updateStyle.bind(this,'bold');infoBox.setupElement(this.buttonG);if(!(this.buttonI=$('chatButtonI'))){this.buttonI=$cE('input').addClassName('liteoption').addClassName('button2').setStyle({fontStyle:'italic'});this.buttonI.type='button';this.buttonI.value=' I ';this.buttonI.title=lang_chat_help_italic;this.chatMsg.parentNode.insertBefore(this.buttonI,this.chatMsg);}
this.buttonI.onclick=this.updateStyle.bind(this,'italic');infoBox.setupElement(this.buttonI);if(!(this.buttonC=$('chatButtonC'))){this.buttonC=$cE('input').addClassName('liteoption').addClassName('button2').setStyle({backgroundRepeat:'no-repeat',backgroundPosition:'center',backgroundImage:'url(http://img5.xooimage.com/files/c/o/color-58b80.gif)'});this.buttonC.type='button';this.buttonC.title=lang_chat_help_color;this.chatMsg.parentNode.insertBefore(this.buttonC,this.chatMsg);}
this.buttonC.value='\u00a0\u00a0\u00a0';if(Prototype.Browser.KHTML&&!Prototype.Browser.WebKit){this.buttonC.type='image';this.buttonC.src='http://img5.xooimage.com/files/c/o/color-58b80.gif';}
if(Prototype.Browser.IE&&(document.documentMode||0)!=8){this.buttonC.style['backgroundPosition']='top left';}
this.buttonC.onclick=this.updateStyle.bind(this,'color');infoBox.setupElement(this.buttonC);if(document.location.pathname=='/chat2.php'){setInterval(function(){window.scrollBy(0,1000);},1000)
Event.observe(window,'load',function(){elem=$('mainChatContainer');while(elem.nextSibling)elem.nextSibling.parentNode.removeChild(elem.nextSibling);while(elem.previousSibling)elem.previousSibling.parentNode.removeChild(elem.previousSibling);$(document.body).cleanWhitespace();elem=$('chatList');while(elem.nodeName.toUpperCase()!='TABLE')elem=elem.parentNode;while(elem.parentNode){var elem=$(elem.parentNode);if(!elem.setStyle)continue;elem.setStyle({border:'0',padding:'0',margin:'0'});$A(elem.cleanWhitespace().childNodes).each(function(elem){if(elem.nodeName.toLowerCase()=='br')elem.parentNode.removeChild(elem);});}
$$('iframe[name="google_ads_frame"]')[0].parentNode.style['paddingTop']='1em';});}
this.loadUserConfig();},checkCompat:function(){var version=0;if(Prototype.Browser.IE){if(match=navigator.userAgent.match(/MSIE ([0-9\.]+)/)){version=match[1];}
if(version<6)return false;return true;}
if(Prototype.Browser.Opera){if(match=navigator.userAgent.match(/Opera( |\/)([0-9\.]+)/)){version=match[2];}
if(version<9)return false;return true;}
return true;},getChatFile:function(extension){var chatFile='/chats/';var host=document.location.hostname;var letters=host.substr(0,2);if(letters=='ww'&&host.substr(2,2)=='w.'){letters=host.substr(4,2);chatFile+='www/';}
chatFile+=letters.substr(0,1)+'/'+letters.substr(1,1);chatFile=chatFile.replace(new RegExp('\\.','g'),'po').replace(new RegExp('-','g'),'ti');chatFile+='/'+host.replace(new RegExp('\\.','g'),'_')+(typeof extension=='undefined'?'':extension)+'.xml';return chatFile;},post:function(callback,params){var u=(this.posturl?this.posturl:'/chat2.php');if(params.msg){if(params.msg.search(/@[0-9]/)!=-1)u+='?6&m='+encodeURIComponent(params.msg);}
params.rci=this.rci;var request=new Ajax.Request(u,{onSuccess:this.AjaxCallback.bind(this,callback),onException:this.AjaxException.bind(this),onFailure:this.AjaxFailure.bind(this),method:'post',parameters:params});},get:function(callback,url,usejs){var e;if(typeof usejs!='undefined'&&usejs&&this.chatJsHost)
{try{var script=document.createElement('script');script.type='text/javascript';var d=new Date();script.src='http://'+this.chatJsHost+(url?url:this.chatFile)+'?js=1&r='+(d.getTime());script.onerror=this.AjaxFailure.bind(this);try{document.body.appendChild(script);}catch(e){this.chatJsHostErrors++;if(this.chatJsHostErrors==2)
this.chatJsHost=false;else
return;};return;}
catch(e){this.chatJsHostErrors++;if(this.chatJsHostErrors==2)
this.chatJsHost=false;else
return;};}
new Ajax.Request((url?url:this.chatFile),{onSuccess:this.AjaxCallback.bind(this,callback),onException:this.AjaxException.bind(this),onFailure:this.AjaxFailure.bind(this),method:'get',parameters:{r:(new Date).getTime()}});},xooitchat3return:function(xmlstring,lastmod2){this.chatJsHostErrors=0;var xmlobject=(new DOMParser()).parseFromString(xmlstring,"text/xml");var xmlhttp={'responseXML':xmlobject};this.updateChatCallback(xmlhttp,lastmod2);},AjaxCallback:function(callback,xmlhttp){try{this.serverTime=parseInt(Date.parse(xmlhttp.getResponseHeader('Date'))/1000);}catch(e){this.serverTime=false;}
setTimeout(function(){callback(xmlhttp);},1);},AjaxException:function(requestObject,exception){this.updating=false;this._throw(exception);},AjaxFailure:function(requestObject){this.chatJsHostErrors++;if(this.chatJsHost&&this.chatJsHostErrors==2)
{this.chatJsHost=false;}
this.updating=false;},updateUserConfig:function(){var config='';for(var i in this.userConfig){config+=(config!=''?',':'');var value=this.userConfig[i];if(typeof value=='boolean'||typeof value=='number'){config+=i+':'+value;}else{if(!value)value='';if(value.toString)value=value.toString();config+=i+':\''+value.replace(new RegExp('\\\\','g'),'\\\\').replace(new RegExp("'",'g'),'\\\'')+'\'';}}
config='{'+config+'}';var expires=new Date();expires.setTime(expires.getTime()+(3600*24*365*1000));document.cookie='x_chatconfig='+escape(config)+'; '+'expires='+(expires.toGMTString())+'; '+'path=/; domain='+document.location.hostname;},loadUserConfig:function(){var cookies=document.cookie.split(new RegExp('; '));this.userConfig={bold:false,italic:false,color:false,flash:(this.soundElement?true:false),connected:0,uid:-1,chatListVSize:250,chatListVSizePopup:300,connectedDivHSize:100};var forumLoggedIn=false;for(var i=0;i<cookies.length;i++){try{if(cookies[i].search(new RegExp('^x_chatconfig='))!=0)continue;eval('var '+unescape(cookies[i])+';');this.userConfig=x_chatconfig;}catch(e){}}
if(this.userConfig.uid!=this.uid)this.userConfig.connected=0;this.setStyle('bold',this.userConfig.bold);this.setStyle('italic',this.userConfig.italic);this.setStyle('color',this.userConfig.color);this.setStyle('sound',this.userConfig.sound);if(this.userConfig.chatListVSize==100){this.userConfig.chatListVSize=250;}
var date=new Date();if((date.getTime()-this.userConfig.connected)<(10*60*1000)||this.autoConnect==1){this.connected=false;this.toggleConnect();this.connect((this.uid!=this.userConfig.uid)?false:true);}},applyDimensions:function(){this.chatList.setStyle({height:(document.location.pathname=='/chat2.php'?this.userConfig.chatListVSizePopup:this.userConfig.chatListVSize)+'px'});if(this.KonqiChatHGrip){this.KonqiChatHGrip.setStyle({width:this.userConfig.connectedDivHSize+'px'});}
if(this.connectedDiv){this.connectedDiv.setStyle({height:(document.location.pathname=='/chat2.php'?this.userConfig.chatListVSizePopup:this.userConfig.chatListVSize)+'px'});this.connectedDiv.setStyle({width:this.userConfig.connectedDivHSize+'px'});}},onresize:function(){if(document.location.pathname=='/chat2.php'){this.userConfig.chatListVSizePopup=parseInt(this.chatList.getStyle('height'));}else{this.userConfig.chatListVSize=parseInt(this.chatList.getStyle('height'));}
if(this.connectedDiv){this.userConfig.connectedDivHSize=parseInt(this.connectedDiv.getStyle('width'));}else{this.userConfig.connectedDivHSize=100;}
this.updateUserConfig();},autoScrollFunc:function(force){if(this.autoScroll==true||(typeof force=='boolean'&&force==true)){this.chatList.scrollTop=this.chatList.scrollHeight;}},ping:function(inOut){if(!inOut)inOut='in';if(this.uid<=0)return;this.sendMsg('/ping '+inOut,(inOut=='out'));},updateChat:function(){if(!this.auth[this.AUTH_READ]){this.addRow(lang_no_read_perms,null,true);this.toggleConnect();this.connect();return;}
if(this.updating==true){return;}
this.updating=true;this.get(this.updateChatCallback.bind(this),false,1);},updateChatArchive:function(){if(!this.auth[this.AUTH_READ]){this.addRow(lang_no_read_perms,null,true);this.toggleConnect();this.connect();return;}
this.firstUpdate=true;this.updating=true;while(this.chatMsgContainer.firstChild){this.chatMsgContainer.removeChild(this.chatMsgContainer.firstChild);}
this.lastUpdate=0;this.get(this.updateChatArchiveCallback.bind(this),this.chatFile.replace(new RegExp('\\.xml$'),'.arch.xml'));},parseDate:function(d){var date=new Date(),x=0,r=new RegExp('^0'),g=function(x,l){return parseInt(d.substr(x,l).replace(r,''),10);};d=d+'';if(d.length<=8){d='19700102'+d;}
date.setFullYear(g(0,4));date.setMonth(g(4,2)-1);date.setDate(g(6,2));date.setHours(g(8,2));date.setMinutes(g(10,2));date.setSeconds(g(12,2));date.setTime(date.getTime()+(this.tz*3600*1000));return date;},fmtDate:function(date,full){if(full||0){return date.toLocaleString();}
if(date.toLocaleTimeString){return date.toLocaleTimeString();}
var H=date.getHours().toString();if(H.length==1)H='0'+H;var M=date.getMinutes().toString();if(M.length==1)M='0'+M;var S=date.getSeconds().toString();if(S.length==1)S='0'+S;return H+':'+M+':'+S;},updateChatArchiveCallback:function(xmlhttp){this.updateChatCallback(xmlhttp);this.firstUpdate=true;this.lastUpdate=0;this.updateChat();},parseRefs:function(n){for(var i=0,l=n.childNodes.length;i<l;++i){var node=n.childNodes[i],text,pos;if(node.nodeType!=3){if(node.nodeType==1){this.parseRefs(node);}
continue;}
text=node.nodeValue;while((pos=text.search(/@([0-9]{16}|[0-9]{8})([^0-9]|$)/))>-1){var len=text.substr(pos+1).search(/([^0-9]|$)/)+1,pre=text.substr(0,pos),id=text.substr(pos+1,len-1),l=$cE('a'),d=this.parseDate(id);node.parentNode.insertBefore($cTN(pre),node);l.addClassName('msgRef'+id);l.appendChild($cTN(this.fmtDate(d)));l.href='javascript:void(0)';l.onclick=function(id){var cM=$('chatMsg');cM.value='@'+id+' '+cM.value+': ';cM.focus();}.bind(this,id);l.onmouseover=function(id){var e;$$('.msgRef'+id).each(function(e){e.style['background']='InfoBackground';});$$('#chatMsg'+id+' > *').each(function(e){e.style['background']='InfoBackground';});if(e=$('chatMsg'+id)){Position.prepare();var p=Position.cumulativeOffset(this.chatList);var h=this.chatList.getHeight();var p2=Position.cumulativeOffset(e);p2[1]-=this.chatList.scrollTop;if(p2[1]<p[1]||(p2[1]+e.getHeight())>(p[1]+h)){Position.absolutize(this.quoteContainer_table.setStyle({position:'static'}).show());var r=$(e.cloneNode(true));r.id='';r.getElementsBySelector('*').each(function(e){e.id='';});while(this.quoteContainer.firstChild)this.quoteContainer.removeChild(this.quoteContainer.firstChild);this.quoteContainer.appendChild(r);this.quoteContainer_table.show();}}}.bind(this,id);l.onmouseout=function(id){$$('.msgRef'+id).each(function(e){e.style['backgroundColor']='';});$$('#chatMsg'+id+' > *').each(function(e){e.style['backgroundColor']='';});this.quoteContainer_table.hide();while(this.quoteContainer.firstChild)this.quoteContainer.removeChild(this.quoteContainer.firstChild);}.bind(this,id);node.parentNode.insertBefore(l,node);text=text.substr(pos+len);node.nodeValue=text;}}},updateChatCallback:function(xmlhttp,lastmod2){if(typeof lastmod2=='undefined')
var lastModified=Date.parse(xmlhttp.getResponseHeader('Last-Modified'))/1000;else
var lastModified=lastmod2;if(lastModified==this.lastModified&&(this.serverTime-this.lastUpdate)<59){this.updating=false;return true;}
this.lastModified=lastModified;this.lastUpdate=this.serverTime;var newMsgs=false;try{var topic=xmlhttp.responseXML.getElementsByTagName('x')[0].getAttribute('t');if(this.topicContainer.innerHTML!=topic)this.topicContainer.innerHTML=topic?topic:'';}catch(e){topic=null;}
this.bannedIds=[];this.bannedPseudos=[];var banned=xmlhttp.responseXML.getElementsByTagName('b');for(var i=0;i<banned.length;i++){this.bannedIds.push(banned[i].getAttribute('i'));this.bannedPseudos.push(banned[i].getAttribute('u'));}
if(this.connectedDiv){while(this.connectedDiv.firstChild)this.connectedDiv.removeChild(this.connectedDiv.firstChild);var span=this.connectedDiv.appendChild($cE('span').addClassName('genmed'));}
this.connectedUsers=[];var connectedUsers=$A(xmlhttp.responseXML.getElementsByTagName('o')).sortBy(function(x){return x.getAttribute('u').toLowerCase();});shouldIPing=false;for(var i=0;i<connectedUsers.length;i++){var user={u:connectedUsers[i].getAttribute('u'),i:connectedUsers[i].getAttribute('i'),c:connectedUsers[i].getAttribute('c'),t:connectedUsers[i].getAttribute('t')};user.u=this.operafix(user.u);user.c=this.operafix(user.c);if(this.serverTime&&parseInt(user.t)&&(this.serverTime-parseInt(user.t))>660)shouldIPing=true;if(this.connectedDiv){var a=span.appendChild($cE('a'));a.href='javascript:void(0);';a.onclick=this.msgMenu.bindAsEventListener(this,null,user.i);a.title=lang_menu;var html=a.appendChild($cE('span'));var c=user.c;if(c.length>0)
{if(c.substr(0,1)!='#')
{c='#'+c;}
html.setStyle({color:c}).addClassName('username-coloured');}
html.setStyle({whiteSpace:'nowrap'}).innerHTML=user.u;span.appendChild($cE('br'));}
this.connectedUsers.push(user);}
var messages=xmlhttp.responseXML.getElementsByTagName('m');for(var i=0;i<messages.length;i++){var d=messages[i].getAttribute('d');var u=messages[i].getAttribute('u');var ui=messages[i].getAttribute('i');var m=messages[i].getAttribute('m');var t=messages[i].getAttribute('t');var c=messages[i].getAttribute('c');u=this.operafix(u);m=this.operafix(m);c=this.operafix(c);raw_u=u;xooitChatConnectedUsers[u]=u;if(document.getElementById('chatMsg'+d)){continue;}
if(t=='delete'){this.deleteRow('chatMsg'+m);continue;}
if(ui!=this.uid){newMsgs=true;}
if(c){u='<span style="color:#'+c+'"><b>'+u+'</b></span>';}
var nodes=$cE('div');var html=$cE('span').addClassName('genmed').setStyle({padding:'0'});var e=$cE('a');e.href='javascript:void(0);';e.onclick=function(msgId){var cM=$('chatMsg');cM.value+=((cM.value||'')==''?'':' ')+'@'+msgId+'@'+raw_u+': ';cM.focus();}.bind(this,d);e.onmouseover=function(id){$$('.msgRef'+id).each(function(e){e.style['background']='InfoBackground';});}.bind(this,d);e.onmouseout=function(id){$$('.msgRef'+id).each(function(e){e.style['background']='';});}.bind(this,d);var date=this.parseDate(d);if(date.toLocaleDateString&&(this.previousDate.getDate()!=date.getDate()||this.previousDate.getMonth()!=date.getMonth()||this.previousDate.getFullYear()!=date.getFullYear())){this.addRow('<span style="text-transform:capitalize">'
+date.toLocaleDateString()+':</span>','msg'+date.getTime());this.previousDate=date;}
e.appendChild($cTN(this.fmtDate(date)));e.title=lang_chat_reply+" ["+this.fmtDate(date,true)+"]";html.appendChild(e);if(t=='m'){html.appendChild($cTN('<'));}else{html.appendChild($cTN(' * '));}
var a=$cE('a');a.innerHTML=u;a.href='javascript:void(0);';a.onclick=this.msgMenu.bindAsEventListener(this,d,ui,null,raw_u);a.title=lang_menu;html.appendChild(a);if(t=='m')html.appendChild($cTN('>'));html.appendChild($cTN(' '));if(t=='topic'){html.appendChild($cTN(lang_changed_topic_to));}else if(t=='ban'){m=lang_has_banned_from_chat.replace(new RegExp('%1\\$s','g'),m);}else if(t=='clear'){while(this.chatMsgContainer.firstChild){this.chatMsgContainer.removeChild(this.chatMsgContainer.firstChild);}
this.addRow('<span style="text-transform:capitalize">'
+date.toLocaleDateString()+':</span>','msg'+date.getTime());this.previousDate=date;html.appendChild($cTN(lang_deleted_posts));}
var tmp=$cE('div');tmp.innerHTML=m;this.parseRefs(tmp);while(tmp.firstChild)html.appendChild(tmp.firstChild);nodes.appendChild(html);this.addRow(nodes,'chatMsg'+d);m.evalScripts();}
if(this.firstUpdate){this.firstUpdate=false;}else{if(newMsgs==true&&this.soundElement!=false&&this.getStyle('sound')){try{this.soundElement.Rewind();this.soundElement.GotoFrame(1);this.soundElement.Play();}catch(e){this.log('Can\'t play sound: '+e);}}
if(newMsgs==true){try{blinkTab.blink('http://img7.xooimage.com/files/d/0/a/favicon-34dc908.gif',lang_chat_notify_new_message);}catch(e){}}}
this.updating=false;if(!this.autoConnect&&shouldIPing&&((new Date).getTime()-this.lastPing)>60000){this.ping();}},addRow:function(nodes,rowId,error){if(typeof nodes=='string'){var div=$cE('div');div.innerHTML='<span class="genmed">'+nodes+'</span>';nodes=div;}
var tr=$cE('tr').addClassName('bg1');if(rowId)tr.id=rowId;this.rowClass=(this.rowClass==1?0:1);var td=tr.appendChild($cE('td').addClassName(this.rowClasses[this.rowClass]));var div=td.appendChild($cE('div').setStyle({border:'0',margin:'0',padding:'0'}));var container=div.appendChild($cE('div'));while(nodes.firstChild)container.appendChild(nodes.firstChild);if((!this.firstUpdate||error)&&this.enableNewMsgEffect==1)div.hide();this.chatMsgContainer.appendChild(tr);this.autoScrollFunc();if((!this.firstUpdate||error)&&this.enableNewMsgEffect==1){new Effect.BlindDown(div,{duration:0.5,afterFinish:function(td,container){new Effect.HighlightTimes(td,{times:1,endcolor:(error?'#FF0000':'#FFFFDD')});}.bind(this,td,container)});}
this.autoScrollFunc();},deleteRow:function(rowId){try{var row=$(rowId);var container=row.firstChild.firstChild.firstChild;container.setStyle({height:container.offsetHeight,width:container.offsetWidth});new Effect.Shrink(row.firstChild.firstChild,{afterFinish:function(){row.parentNode.removeChild(row);this.resetRowClasses();}.bind(this,row)});}catch(e){}},resetRowClasses:function(){for(var i=0;i<this.chatMsgContainer.childNodes.length;i++){this.rowClass=(this.rowClass==1?0:1);this.chatMsgContainer.childNodes[i].firstChild.className=this.rowClasses[this.rowClass];}},disableAutoUpdate:function(){if(this.intervalUpdate){clearInterval(this.intervalUpdate);}
if(this.idleTimeout){clearTimeout(this.idleTimeout);}
this.connected=true;this.toggleConnect();this.connect(true);},updateIdleTimeout:function(){if(this.idleTimeout){clearTimeout(this.idleTimeout);}
this.idleTimeout=setTimeout(this.disableAutoUpdate.bind(this),600000);this.userConfig.connected=(new Date()).getTime();this.updateUserConfig();},sendMsg:function(msg,doNotUpdate){this.autoScroll=true;if(!msg){var msg=$('chatMsg').value;$('chatMsg').value='';}
if(msg==''){return;}
if(msg.substr(0,5)!='/ping'&&!doNotUpdate){this.updateIdleTimeout();}
if(!this.connected&&msg.substr(0,5)!='/ping'){this.addRow(lang_not_connected,null,true);return false;}
var opentag='';var closetag='';if(msg.substr(0,1)!='/'){if(this.getStyle('bold')){opentag='[b]'+opentag;closetag+='[/b]';}
if(this.getStyle('italic')){opentag='[i]'+opentag;closetag+='[/i]';}
if(this.getStyle('color')){opentag='[color='+this.getStyle('color')+']'+opentag;closetag+='[/color]';}}
if(opentag.length>0)msg=opentag+' '+msg+' '+closetag;if(msg=='/banned'||msg=='/banlist'){this.listBanned();return;}
if(msg=='/archive'){this.updateChatArchive();return;}
this.updating=true;this.post(this.sendMsgCallback.bind(this,doNotUpdate),{mode:'post',msg:msg});},sendMsgCallback:function(doNotUpdate,xmlhttp){this.updating=false;if(xmlhttp.readyState!=4){return;}
var e=xmlhttp.responseXML.getElementsByTagName('e')[0];var s=e.getAttribute('s');var m=e.getAttribute('m');var t=e.getAttribute('t');switch(s){case'NOK':this.addRow(m,null,true);doNotUpdate=true;break;case'HELP':this.addRow(m);doNotUpdate=true;break;case'UNBAN':this.addRow(m);break;}
if(!doNotUpdate)this.updateChat();if(Prototype.Browser.WebKit){$('chatMsg').focus();}},msgMenu:function(event,msgId,userId,msgUid,userName){$$('.chatMsgMenu').each(this.msgMenuDrop.bind(this));var clientX=Event.pointerX(event)+'px';var clientY=Event.pointerY(event)+'px';var container=$cE('div').hide().setStyle({position:'absolute',top:clientY,left:clientX}).addClassName('chatMsgMenu');container.id='msgMenu'+msgId;var iecontainer=$cE('div').setStyle({position:'relative',whiteSpace:'nowrap'});var elem=$cE('table').addClassName('forumline');elem.border='0';elem.cellspacing='1';var tbody=elem.appendChild($cE('tbody'));var tr=tbody.appendChild($cE('tr').addClassName('bg2'));var td=tr.appendChild($cE('td').addClassName(this.rowClasses[0]));var span=$cE('span').addClassName('genmed');if(msgId){var a=$cE('a');a.appendChild($cTN(lang_chat_reply));a.href='javascript:void(0)';a.onclick=function(msgId){var cM=$('chatMsg');cM.value+=((cM.value||'')==''?'':' ')+'@'+msgId+'@'+userName+': ';this.msgMenuDrop(container);cM.focus();}.bind(this,msgId);span.appendChild(a);span.appendChild($cE('br'));}
if(msgId&&!this.isprivate&&this.uid!=userId){var a=$cE('a');a.appendChild($cTN(lang_chat_private));a.href='javascript:void(0)';a.onclick=function(userId){chatimwith(userId);this.msgMenuDrop(container);}.bind(this,userId);span.appendChild(a);span.appendChild($cE('br'));}
if(msgId&&!this.isprivate&&(this.auth[this.AUTH_MOD]||(this.auth[this.AUTH_DELETE]&&msgUid==userId))){var a=$cE('a');a.appendChild($cTN(lang_delete_message));a.href='javascript:void(0)';a.onclick=this.msgDelete.bind(this,msgId);span.appendChild(a);span.appendChild($cE('br'));}
if(!this.isprivate&&this.auth[this.AUTH_MOD]){var a=$cE('a');a.appendChild($cTN(lang_ban));a.href='javascript:void(0)';a.onclick=this.msgBanuid.bind(this,msgId,userId);span.appendChild(a);span.appendChild($cE('br'));}
var a=$cE('a');a.appendChild($cTN(lang_profile));a.onclick=this.msgMenuDrop.bind(this,container);a.href='/profile.php?u='+userId;a.target='_blank';span.appendChild(a);span.appendChild($cE('br'));var a=$cE('a');a.appendChild($cTN(lang_cancel));a.href='javascript:void(0)';a.onclick=this.msgMenuDrop.bind(this,container);span.appendChild(a);td.appendChild(span);iecontainer.appendChild(elem);container.appendChild(iecontainer);document.body.insertBefore(container,document.body.firstChild);var msgContainer=$('msgMenu'+msgId).firstChild.firstChild.firstChild;msgContainer.setStyle({height:msgContainer.getDimensions().height+'px'});new Effect.SlideDown(container,{duration:0.15,afterFinish:function(elem,clientY,clientX){$(elem).setStyle({position:'absolute',top:clientY,left:clientX,opacity:'1.0'});}.bind(this,container,clientY,clientX)});this.autoScrollFunc();},msgMenuDrop:function(elem){new Effect.SlideUp(elem,{duration:0.15,afterFinish:function(elem){try{elem.parentNode.removeChild(elem);}catch(e){}}.bind(this,elem)});},msgDelete:function(msgId){$('chatMsg').value='/delete '+msgId;this.sendMsg();this.msgMenuDrop($('msgMenu'+msgId));},msgBanuid:function(msgId,userId){$('chatMsg').value='/banuid '+userId;this.sendMsg();this.msgMenuDrop($('msgMenu'+msgId));},listBanned:function(){var nodes=$cE('div');var span=$cE('span');span.className='genmed';span.appendChild($cTN(lang_banned_users));for(var i=0;i<this.bannedIds.length;i++){span.appendChild($cTN(': '));var a=$cE('a');a.innerHTML=this.bannedPseudos[i];a.href='javascript:void(0);';a.onclick=this.unbanUid.bind(this,this.bannedIds[i],this.bannedPseudos[i]);span.appendChild(a);}
nodes.appendChild(span);this.addRow(nodes);this.autoScrollFunc();},unbanUid:function(userId,userName){if(confirm(lang_unban+' '+userName+' ?')){$('chatMsg').value='/unbanuid '+userId;this.sendMsg();}},openAdmin:function(event){(event.target||event.srcElement).blur();new Effect.SlideRight(this.adminLink,{duration:0.2,afterFinish:function(){this.adminLink.hide();this.adminMenu.hide();this.adminMenu.setStyle({whiteSpace:'nowrap'});new Effect.SlideLeft(this.adminMenu,{afterFinish:function(){}});}.bind(this)});this.adminOpened=true;},closeAdmin:function(event){(event.target||event.srcElement).blur();new Effect.SlideRight(this.adminMenu,{afterFinish:function(){this.adminMenu.hide();this.adminLink.setStyle({whiteSpace:'nowrap'});this.adminLink.hide();new Effect.SlideLeft(this.adminLink,{duration:0.2});}.bind(this)});this.adminOpened=true;},changeTopic:function(){var topic=prompt(lang_change_topic,'');if(!topic)return;this.sendMsg('/topic '+topic);},clearMsgs:function(){if(confirm(lang_clear_msgs+' ?')){this.sendMsg('/clear');}},showSmilies:function(){var chatSmiliesDiv=$('chatSmiliesDiv');if(chatSmiliesDiv){$('chatList').parentNode.removeChild(chatSmiliesDiv);return;}
if(this.smiliesDiv){$('chatList').parentNode.appendChild(this.smiliesDiv);return;}
this.post(this.showSmiliesCallback.bind(this),{mode:'smilies'});},showSmiliesCallback:function(xmlhttp){var container=$('chatList').parentNode;this.smiliesDiv=$cE('div');this.smiliesDiv.id='chatSmiliesDiv';this.smiliesDiv.setStyle({margin:'0',padding:'0'});container.appendChild(this.smiliesDiv);var table=$cE('table');table.setStyle({border:'0',borderCollapse:'collapse',width:'100%'});this.smiliesDiv.appendChild(table);var tbody=table.appendChild($cE('tbody'));var tr=tbody.appendChild($cE('tr'));var td=tr.appendChild($cE('td').addClassName(this.rowClasses[1]));var smilies=xmlhttp.responseXML.getElementsByTagName('s');for(var i=0;i<smilies.length;i++){var c=smilies[i].getAttribute('c');var u=smilies[i].getAttribute('u');var s=smilies[i].getAttribute('s');var e=smilies[i].getAttribute('e');var imgElem=$cE('img').setStyle({cursor:'pointer'});;imgElem.src='http:/'+'/img'+s+'.xooimage.com/files'+u;imgElem.alt=e;imgElem.title=e;imgElem.setAttribute('c',c);imgElem.onclick=function(){e=$('chatMsg');e.value+=' '+this.getAttribute('c')+' ';e.focus();};td.appendChild(imgElem);td.appendChild($cTN(' '));if(parseInt(this.smiliesDiv.getDimensions().height)>100){this.smiliesDiv.setStyle({height:'100px',overflow:'auto'});}}
if(parseInt(this.smiliesDiv.getDimensions().height)>100){this.smiliesDiv.setStyle({height:'100px',overflow:'auto'});}},resizeImgs:function(){var maxheight=50;var imgs=this.chatMsgContainer.getElementsByTagName('img');for(var j=0;j<imgs.length;j++){if(imgs[j].height<=maxheight){continue;}
imgs[j].height=maxheight;imgs[j].onclick=function(){window.open(this.src);};imgs[j].title=imgs[j].src;imgs[j].onmouseover=function(){window.status=this.src;};imgs[j].onmouseout=function(){window.status='';};imgs[j].setStyle({cursor:pointer});}},updateStyle:function(style){var isSet=this.getStyle(style);switch(style){case'bold':this.setStyle(style,isSet?'normal':'bold');break;case'italic':this.setStyle(style,isSet?'normal':'italic');break;case'color':var win=window.open('/ColorPicker.html','_blank','menubar=no, status=no, scrollbars=no, history=no, width=300, height=300, resizable=yes');var func=function(win){win.ColorPicker.bouton.onclick=function(win){var color=win.ColorPicker.couleur;win.close();this.setStyle('color',color);return false;}.bind(this,win);}.bind(this,win);Event.observe(win,'load',func);this.colorPickerOnloadInterval=setInterval(function(func){try{func();clearInterval(this.colorPickerOnloadInterval);}catch(e){}}.bind(this,func),100);break;case'sound':this.setStyle(style,isSet?false:(this.soundElement?true:false));}
return false;},setStyle:function(style,value){switch(style){case'bold':if(Prototype.Browser.Opera){this.chatMsg.style['fontWeight']=(value=='bold'?'700':'');}else{this.chatMsg.style['fontWeight']=(value=='bold'?'bold':'normal');}
this.buttonG.style['textDecoration']=(value=='bold'?'underline':'none');this.buttonG.blur();break;case'italic':this.chatMsg.style['fontStyle']=(value=='italic'?'italic':'normal');this.buttonI.style['textDecoration']=(value=='italic'?'underline':'none');this.buttonI.blur();break;case'color':var value_=((value&&value!='false')?value:'');this.chatMsg.style['color']=value_;this.buttonC.style['backgroundColor']=value_;this.buttonC.blur();break;case'sound':if(!this.soundElement)return;if(value)this.buttonF.setImage('http://img3.xooimage.com/files/k/m/kmixdocked-b24a8.png');else this.buttonF.setImage('http://img8.xooimage.com/files/k/m/kmixdocked_error-b264e.png');this.buttonF.blur();break;}
this.userConfig[style]=value;this.updateUserConfig();var tags=this.getStyleTags();var maxlength=(300-(tags.open.length+tags.close.length+2)).toString();$('chatMsg').maxlength=maxlength;$('chatMsg').setAttribute('maxlength',maxlength);},getStyle:function(style){try{switch(style){case'bold':if(Prototype.Browser.Opera){return/700/.test(this.chatMsg.style['fontWeight']);}
return/bold/i.test(this.chatMsg.style['fontWeight']);case'italic':return/italic/i.test(this.chatMsg.style['fontStyle']);case'color':return((this.chatMsg.style['color']||'').parseColor().toString()||false);break;case'sound':return this.userConfig[style];break;}}catch(e){return false;};},getStyleTags:function(){var tags={open:'',close:''};if(this.getStyle('bold')){tags.open+='[b]';tags.close='[/b]'+tags.close;}
if(this.getStyle('italic')){tags.open+='[i]';tags.close='[/i]'+tags.close;}
if(this.getStyle('color')){tags.open='[color='+this.getStyle('color')+']';tags.close='[/color]'+tags.close;}
return tags;},toggleConnect:function(){if(this.connected){var hideLink=this.disconnectLink;var showLink=this.connectLink;new Effect.SlideRight(this.archiveLink,{duration:0.2,afterFinish:function(){this.archiveLink.hide();}.bind(this)});if(this.adminLink){new Effect.SlideRight((this.adminOpened?this.adminMenu:this.adminLink),{duration:0.2,afterFinish:function(){this.adminLink.hide();this.adminMenu.hide();this.adminOpened=false;}.bind(this)});}}else{var hideLink=this.connectLink;var showLink=this.disconnectLink;new Effect.SlideLeft(this.archiveLink,{duration:0.2,afterFinish:function(){this.archiveLink.show();}.bind(this)});if(this.adminLink){this.adminMenu.hide();this.adminOpened=false;new Effect.SlideLeft(this.adminLink,{duration:0.2,afterFinish:function(){this.adminLink.show();}.bind(this)});}}
new Effect.SlideRight(hideLink,{duration:0.2,afterFinish:function(){hideLink.hide();showLink.hide();showLink.setStyle({whiteSpace:'nowrap'});new Effect.SlideLeft(showLink,{duration:0.4,afterFinish:function(showLink,hideLink){showLink.show();hideLink.hide();}.bind(this,showLink,hideLink)});}.bind(this)});if(this.connectedDiv)
while(this.connectedDiv.firstChild)this.connectedDiv.removeChild(this.connectedDiv.firstChild);},connect:function(doNotUpdate){if(this.connected){if(this.idleTimeout)clearTimeout(this.idleTimeout);if(this.intervalUpdate)clearInterval(this.intervalUpdate);this.connected=false;this.userConfig.connected=0;this.addRow(lang_disconnected,null,true);if(!doNotUpdate&&this.autoConnect!=1)this.ping('out');}else{this.connected=true;if(doNotUpdate&&this.autoConnect!=1){var timeout=600000-((new Date()).getTime()-this.userConfig.connected);this.updateChat();}else{var timeout=600000;this.userConfig.connected=(new Date()).getTime();this.updateUserConfig();if(this.autoConnect!=1){this.ping();}}
if(this.intervalUpdate){clearInterval(this.intervalUpdate);}
this.intervalUpdate=setInterval(this.updateChat.bind(this),this.interval);if(this.idleTimeout){clearTimeout(this.idleTimeout);}
this.idleTimeout=setTimeout(this.disableAutoUpdate.bind(this),timeout);}
this.userConfig.uid=this.uid;this.updateUserConfig();this.applyDimensions();},log:function(str){try{if(console&&console.log)console.log(str);}catch(e){};},_throw:function(str){var console_log=false;try{if(console&&console.error)var console_log=true;}catch(e){}
if(console_log){console.error(str);if(typeof str=='object')console.dir(str);}else{throw str;}},operafix:function(str)
{if(!Prototype.Browser.Opera)
{return str;}
if(match=navigator.userAgent.match(/Opera( |\/)([0-9\.]+)/)){version=parseFloat(match[2],10);if(version>=9.60){return str;}}
str=str.replace(/<[^>]*>/g,'');str=str.replace(/</g,'&lt;');str=str.replace(/>/g,'&gt;');str=str.replace(/"/g,'&quot;');return str;},AUTH_MOD:0,AUTH_READ:1,AUTH_REPLY:2,AUTH_DELETE:3};if(typeof DOMParser=="undefined"){DOMParser=function(){}
DOMParser.prototype.parseFromString=function(str,contentType){if(typeof ActiveXObject!="undefined"){var d=new ActiveXObject("MSXML.DomDocument");d.loadXML(str);return d;}else if(typeof XMLHttpRequest!="undefined"){var req=new XMLHttpRequest;req.open("GET","data:"+(contentType||"application/xml")+";charset=utf-8,"+encodeURIComponent(str),false);if(req.overrideMimeType){req.overrideMimeType(contentType);}
req.send(null);return req.responseXML;}}}


Partager le fichier chat3_french-1bf98be.js sur le Web et les réseaux sociaux:


Télécharger le fichier chat3_french-1bf98be.js


Télécharger chat3_french-1bf98be.js