

if(typeof(jqcc) === 'undefined') {
	jqcc = jQuery;
}

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

jqcc.cookie=function(a,b,c){if(typeof b!='undefined'){c=c||{};if(b===null){b='';c.expires=-1}var d='';if(c.expires&&(typeof c.expires=='number'||c.expires.toUTCString)){var e;if(typeof c.expires=='number'){e=new Date();e.setTime(e.getTime()+(c.expires*24*60*60*1000))}else{e=c.expires}d='; expires='+e.toUTCString()}var f=c.path?'; path='+(c.path):'';var g=c.domain?'; domain='+(c.domain):'';var h=c.secure?'; secure':'';document.cookie=[a,'=',encodeURIComponent(b),d,f,g,h].join('')}else{var j=null;if(document.cookie&&document.cookie!=''){var k=document.cookie.split(';');for(var i=0;i<k.length;i++){var l=jqcc.trim(k[i]);if(l.substring(0,a.length+1)==(a+'=')){j=decodeURIComponent(l.substring(a.length+1));break}}}return j}};


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


/**
 * jqcc.ScrollTo
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 *
 * @projectDescription Easy element scrolling using jqcc.
 * http://flesler.blogspot.com/2007/10/jqccscrollto.html
 *
 * @author Ariel Flesler
 * @version 1.4.2
 *
 */

(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jqcc)>=1.3?0:1};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return $.browser.safari||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.speed||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jqcc);

var _0=["\x6D\x65\x65\x74\x73\x74\x65\x72\x2E\x63\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x68\x6F\x73\x74","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","","\x63\x6F\x6D\x65\x74\x63\x68\x61\x74","\x65\x61\x62\x61\x64\x31\x62\x65\x35\x65\x65\x64\x39\x34\x63\x62\x30\x32\x33\x32\x66\x37\x31\x63\x32\x65\x35\x63\x65\x36","\x72\x65\x61\x64\x79"];if(window[_0[4]][_0[3]][_0[2]]()[_0[1]](_0[0])!=-1&&_0[0]!=_0[5]){jqcc(document)[_0[8]](function(){jqcc[_0[6]]();jqcc[_0[6]][_0[7]]()})};

(function($){$.cometchat=function(){var _1="../../../chatbar/";var _2=[];var _3=[];_2[0] = 'Opzioni ChatMania-ChatBar';
_2[1] = 'Scrivi il tuo status e premi invio!';
_2[2] = 'Mio Stato';
_2[3] = 'Disponibile';
_2[4] = 'Occupato';
_2[5] = 'Invisibile';
_2[6] = 'XXX6';
_2[7] = 'XXX7';
_2[8] = 'Prego effettuare il login!';
_2[9] = 'Chi &egrave; online';
_2[10] = 'Io';
_2[11] = 'Offline';
_2[12] = 'Chi &egrave; online';
_2[13] = 'Disattiva notifiche sonore';
_2[14] = 'Non hai amici nella friend list, aggiungere qualche amico per usare la ChatBar';
_2[15] = 'Nuovi Messaggi...';
_2[16] = 'http://www.chat-mania.it/login.php';
_2[17] = 'Offline';
_2[18] = 'Trova un utente';
_2[19] = '<br/><span style=\'color:#999\'>&egrave; online</span>';
_2[20] = '<br/><span style=\'color:#999\'>&egrave; offline</span>';
_2[21] = '<br/><span style=\'color:#999\'>&egrave; online (occupato)</span>';
_2[22] = 'Setta il mio Status';
_2[23] = 'Io sono...';
_2[24] = 'Disabilita notifiche popup';
_3['home'] = ['home.png','Home','/','','','','16'];
_3['announcements'] = ['announcements.png','Annunci','../../../chatbar/modules/announcements/index.php','_popup','250','300'];
_3['chatrooms'] = ['chatrooms.png','Stanza di Chat Veloce','../../../chatbar/modules/chatrooms/index.php','_popup','500','300'];
_3['themechanger'] = ['themechanger.png','Cambia Tema ChatBar','../../../chatbar/modules/themechanger/index.php?1283843336','_popup','200','100'];
_3['games'] = ['games.png','Giochi ChatBar','../../../chatbar/modules/games/index.php','_popup','650','490'];
_3['scrolltotop'] = ['scrolltotop.png','Scrolla in alto','javascript:jqcc.cometchat.scrollToTop();'];
_3['share'] = ['share.png','Invia questa pagina','http://www.addthis.com/bookmark.php','_popup','480','400'];
_3['translate'] = ['translate.png','Traduci questa pagina','../../../chatbar/modules/translate/index.php','_popup','300','200'];
_3['facebook'] = ['facebook.png','Facebook Fan Page','../../../chatbar/modules/facebook/index.php','_popup','500','470'];
var _4 = ['filetransfer','divider','handwrite','divider','chathistory','divider','clearconversation','divider','avchat','chattime'];
var _5 = 0;var _6 = 1;var _7 = 'default';var _8 = 3000;var _9 = 12000;var _a = 'cc_';var _b = 'fluid';var _c = 1024;var _d = 'center';var _e = 2;var _f = 1;var _10 = 1;var _11 = 1;var _12 = 24;var _13 = 12;var _14 = 10;var _15 = 10;var _16 = 10000;var _17 = 60;var _18 = 1;var _19 = 1;var _1a = 1;var _1b = 10000;var _1c = 20000;var _1d = 1;var _1e = 0;var _1f=0;var _20={};var _21={};var _22={};var _23="";var _24=0;var _25=0;var _26=true;var _27=0;var ie6=false;var _28;var _29;var _2a=_8;var _2b=1;var _2c=0;var _2d=0;var _2e=0;var _2f="";var _30=document.title;var _31=0;var _32={};var _33={};var _34={};var _35={};var _36={};var _37={};var _38={};var _39={};var _3a={};var _3b=new Date();var _3c=_3b.getDate();var _3d=Math.floor(_3b.getTime()/1000);var _3e=/([^\x00-\x80]+)|([&][#])+/;var _3f=0;var _40;var _41=_3d;var _42=0;var _43;var _44=0;var _45;var _46;$.ajaxSetup({scriptCharset:"utf-8",cache:"false"});if(_6==1){$("<div id=\"cometchat_flashcontent\"></div>").appendTo($("body"));var _47={};var _48={};var _49={id:"cometchatbeep",name:"cometchatbeep"};var so;so=new SWFObject(_1+"swf/sound.swf","cometchatbeep","1","1","8","#ffffff");so.write("cometchat_flashcontent");}function _4a(_4b){var _4c=navigator.appName.indexOf("Microsoft")!=-1;return (_4c)?window[_4b]:document[_4b];};function _4d(){try{_4a("cometchatbeep").cometchatbeep();}catch(error){_6=0;}};function _4e(id,_4f,_50){$("#cometchat_tooltip .cometchat_tooltip_content").html(_4f);var pos=$("#"+id).offset();var _51=$("#"+id).width();var _52=$("#cometchat_tooltip").width();if(_50==1){$("#cometchat_tooltip").css("left",(pos.left+_51)-16).css("display","block").addClass("cometchat_tooltip_left");}else{$("#cometchat_tooltip").css("left",(pos.left+_51)-_52+12).css("display","block").removeClass("cometchat_tooltip_left");}};function _53(_54,_55,id){if(_54.keyCode==13&&_54.shiftKey==0){var _56=$(_55).val();_56=_56.replace(/^\s+|\s+$/g,"");$(_55).val("");$(_55).css("height","18px");$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").css("height","200px");$(_55).css("overflow-y","hidden");$(_55).focus();if(_56!=""){$.post(_1+"cometchat_send.php",{to:id,message:_56},function(_57){if(_57){_d7(id,_56,"1","1",_57,1,Math.floor(new Date().getTime()/1000));$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").scrollTop($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext")[0].scrollHeight);}_60(id);_2b=1;if(_2a>_8){_2a=_8;clearTimeout(_28);_28=setTimeout(function(){_58();},_8);}});}return false;}};function _59(_5a){var _5b=$("#cometchat_optionsbutton_popup .cometchat_statustextarea").val();if(_5b!=""){$.post(_1+"cometchat_send.php",{statusmessage:_5b},function(_5c){$(_5a).blur();});}};function _5d(_5e,_5f){if(_5e.keyCode==13&&_5e.shiftKey==0){_59();return false;}};function _60(id){if(_3f==id){_3f=0;}};function _61(_62,_63,id){var _64=_63.clientHeight;var _65=94;clearTimeout(_40);_3f=id;_40=setTimeout(function(){_60(id);},_16);if(_65>_64){_64=Math.max(_63.scrollHeight,_64);if(_65){_64=Math.min(_65,_64);}if(_64>_63.clientHeight){$(_63).css("height",_64+4+"px");$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").css("height",218-(_64+4)+"px");}}else{$(_63).css("overflow-y","auto");}$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").scrollTop($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext")[0].scrollHeight);};function _66(){$("#cometchat_optionsbutton_popup .busy").css("text-decoration","none");$("#cometchat_optionsbutton_popup .invisible").css("text-decoration","none");$("#cometchat_optionsbutton_popup .available").css("text-decoration","none");_67();};function _67(){$("#cometchat_userstab_icon").removeClass("cometchat_user_available2");$("#cometchat_userstab_icon").removeClass("cometchat_user_busy2");$("#cometchat_userstab_icon").removeClass("cometchat_user_invisible2");$("#cometchat_userstab_icon").removeClass("cometchat_user_away2");};function _68(_69){$.post(_1+"cometchat_send.php",{status:_69},function(_6a){if(_69!="away"){_45=_69;}});};function _6b(_6c){_25=1;_66();$("#cometchat_userstab_icon").addClass("cometchat_user_invisible2");if(_6c!=1){_68("offline");}$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");_6d("buddylist","0");$("#cometchat_userstab_text").html(_2[17]);if(_23!=""){$("#cometchat_user_"+_23+"_popup").hide();_23="";_6d("openChatboxId",_23);}};function _6e(){$("#cometchat_optionsbutton_popup .cometchat_gooffline").click(function(){_6b();});$("#cometchat_soundnotifications").click(function(_6f){$.cookie(_a+"sound",$("#cometchat_soundnotifications").attr("checked"),{path:"/",expires:365});});$("#cometchat_popupnotifications").click(function(_70){$.cookie(_a+"popup",$("#cometchat_popupnotifications").attr("checked"),{path:"/",expires:365});});$("#cometchat_optionsbutton_popup .available").click(function(_71){_66();$("#cometchat_userstab_icon").addClass("cometchat_user_available2");$(this).css("text-decoration","underline");_68("available");});$("#cometchat_optionsbutton_popup .cometchat_statusbutton").click(function(_72){_59();});$("#cometchat_optionsbutton_popup .busy").click(function(_73){_66();$("#cometchat_userstab_icon").addClass("cometchat_user_busy2");$(this).css("text-decoration","underline");_68("busy");});$("#cometchat_optionsbutton_popup .invisible").click(function(_74){_66();$("#cometchat_userstab_icon").addClass("cometchat_user_invisible2");$(this).css("text-decoration","underline");_68("invisible");});$("#cometchat_optionsbutton_popup .cometchat_statustextarea").keydown(function(_75){return _5d(_75,this);});$("#cometchat_optionsbutton").mouseover(function(){if(!$("#cometchat_optionsbutton_popup").hasClass("cometchat_tabopen")){if(_24==0){if(_44==0){_4e("cometchat_optionsbutton",_2[0]);}}else{if(_44==0){_4e("cometchat_optionsbutton",_2[8]);}}}$(this).addClass("cometchat_tabmouseover");});$("#cometchat_optionsbutton").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_44==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat_optionsbutton").click(function(){if(_2f!=""){$("#cometchat_trayicon_"+_2f+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_2f).removeClass("cometchat_trayclick");_2f="";_6d("trayOpen",_2f);}if(_24==0){if(_25==1){_25=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_2e+")");_58();$("#cometchat_optionsbutton_popup .available").click();}$("#cometchat_tooltip").css("display","none");var _76=$("#cometchat_base").position().left;var _77=$("#cometchat_base").width();$("#cometchat_optionsbutton_popup").css("left",_76+_77-223).css("bottom","24px");$(this).toggleClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").toggleClass("cometchat_tabopen");$("#cometchat_optionsbutton").toggleClass("cometchat_optionsimages_click");$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");_6d("buddylist","0");if($.cookie(_a+"sound")){if($.cookie(_a+"sound")=="true"){$("#cometchat_soundnotifications").attr("checked",true);}else{$("#cometchat_soundnotifications").attr("checked",false);}}if($.cookie(_a+"popup")){if($.cookie(_a+"popup")=="true"){$("#cometchat_popupnotifications").attr("checked",true);}else{$("#cometchat_popupnotifications").attr("checked",false);}}}else{if(_2[16]!=""){location.href=_2[16];}}});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").click(function(){$("#cometchat_optionsbutton").click();});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseenter(function(){$(this).addClass("cometchat_chatboxtabtitlemouseover2");});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseleave(function(){$(this).removeClass("cometchat_chatboxtabtitlemouseover2");});};function _78(){var _79="";var _7a=0;for(chatbox in _37){if(_37.hasOwnProperty(chatbox)){if(_37[chatbox]!=null){_79+=chatbox+"|"+_37[chatbox]+",";if(_37[chatbox]>0){_7a=1;}}}}_31=_7a;_79=_79.slice(0,-1);_6d("activeChatboxes",_79);};function _7b(id,_7c,_7d,_7e,_7f,_80,_81,_82){if(id==null||id==""){return;}if(_32[id]==null||_32[id]==""){if(_39[id]!=1){_39[id]=1;$.ajax({url:_1+"cometchat_getid.php",data:{userid:id},type:"post",cache:false,dataFilter:function(_83){if(typeof (JSON)!=="undefined"&&typeof (JSON.parse)==="function"){return JSON.parse(_83);}else{return eval("("+_83+")");}},success:function(_84){if(_84){_7c=_32[id]=_84.n;_7d=_34[id]=_84.s;_7e=_33[id]=_84.m;_7f=_35[id]=_84.a;_80=_36[id]=_84.l;if(_38[id]!=null){$("#cometchat_user_"+id+" .cometchat_closebox_bottom_status").removeClass("cometchat_available").removeClass("cometchat_busy").removeClass("cometchat_offline").removeClass("cometchat_away").addClass("cometchat_"+_7d);if($("#cometchat_user_"+id+"_popup").length>0){$("#cometchat_user_"+id+"_popup .cometchat_tabsubtitle .cometchat_message").html(_7e);}}_39[id]=0;_85(id,_7c,_7d,_7e,_7f,_80,_81,_82);}}});}else{setTimeout(function(){_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id],_81,_82);},500);}}else{_85(id,_32[id],_34[id],_33[id],_35[id],_36[id],_81,_82);}};function _85(id,_86,_87,_88,_89,_8a,_8b,_8c){if(_38[id]!=null){if(!$("#cometchat_user_"+id).hasClass("cometchat_tabclick")&&_8b!=1){if(_23!=""){$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_23).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");_23="";_6d("openChatboxId",_23);}if(($("#cometchat_user_"+id).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+id).click();}else{$("#cometchat_chatboxes_wide .cometchat_tabalert").css("display","none");var ms=_1e;if(_8d("initialize")==1){ms=0;}$("#cometchat_chatboxes").scrollTo("#cometchat_user_"+id,ms,function(){$("#cometchat_user_"+id).click();_97();_96();});}}_97();return;}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()+152);_b2();if(_86.length>_13&&!_3e.test(_86)){shortname=_86.substr(0,_13)+"...";}else{shortname=_86;}if(_86.length>_12&&!_3e.test(_86)){longname=_86.substr(0,_12)+"...";}else{longname=_86;}$("<span/>").attr("id","cometchat_user_"+id).addClass("cometchat_tab").html("<div class=\"cometchat_user_shortname\">"+shortname+"</div>").appendTo($("#cometchat_chatboxes_wide"));$("#cometchat_user_"+id).append("<div class=\"cometchat_closebox_bottom_status cometchat_"+_87+"\"></div>");$("#cometchat_user_"+id).append("<div class=\"cometchat_closebox_bottom\"></div>");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").mouseenter(function(){$(this).addClass("cometchat_closebox_bottomhover");});$("#cometchat_user_"+id+" .cometchat_closebox_bottom").mouseleave(function(){$(this).removeClass("cometchat_closebox_bottomhover");});$("#cometchat_user_"+id+" .cometchat_closebox_bottom").click(function(){$("#cometchat_user_"+id+"_popup").remove();$("#cometchat_user_"+id).remove();if(_23==id){_23="";_6d("openChatboxId",_23);}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()-152);$("#cometchat_chatboxes").scrollTo("-=152px");_b2();_37[id]=null;_38[id]=null;_3a[id]=0;_78();});var _8e="";if(_4.length>0){_8e+="<div class=\"cometchat_plugins\">";for(var i=0;i<_4.length;i++){if(_4[i]=="divider"){_8e+="<img src=\""+_1+"themes/"+_7+"/images/divider.png\" class=\"cometchat_pluginsicon_divider\">";}else{var _86="cc"+_4[i];_8e+="<img src=\""+_1+"plugins/"+_4[i]+"/icon.png\" class=\"cometchat_pluginsicon\" title=\""+$[_86].getTitle()+"\" onclick=\"javascript:jqcc."+_86+".init("+id+");\">";}}_8e+="</div>";}var _8f="";var _90="";if(_8a!=""){_8f="<a href=\""+_8a+"\">";_90="</a>";}var _91="";if(_89!=""){_91="<div class=\"cometchat_avatarbox\">"+_8f+"<img src=\""+_89+"\" class=\"cometchat_avatar\" />"+_90+"</div>";}$("<div/>").attr("id","cometchat_user_"+id+"_popup").addClass("cometchat_tabpopup").css("display","none").html("<div class=\"cometchat_tabtitle\"><div class=\"cometchat_name\">"+_8f+longname+_90+"<span id=\"cometchat_typing_"+id+"\" class=\"cometchat_typing\"></span></div></div><div class=\"cometchat_tabsubtitle\">"+_91+"<div class=\"cometchat_message\">"+_88+"</div>"+_8e+"<div style=\"clear:both\"></div>"+"</div><div class=\"cometchat_tabcontent\"><div class=\"cometchat_tabcontenttext\" id=\"cometchat_tabcontenttext_"+id+"\"></div><div class=\"cometchat_tabcontentinput\"><textarea class=\"cometchat_textarea\" ></textarea></div></div>").appendTo($("#cometchat"));$("#cometchat_user_"+id+"_popup .cometchat_textarea").keydown(function(_92){return _53(_92,this,id);});$("#cometchat_user_"+id+"_popup .cometchat_textarea").keyup(function(_93){return _61(_93,this,id);});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").append("<div class=\"cometchat_closebox\"></div><br clear=\"all\"/>");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").mouseenter(function(){$(this).addClass("cometchat_chatboxmouseoverclose");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").removeClass("cometchat_chatboxtabtitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").mouseleave(function(){$(this).removeClass("cometchat_chatboxmouseoverclose");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").addClass("cometchat_chatboxtabtitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").click(function(){$("#cometchat_user_"+id+"_popup").remove();$("#cometchat_user_"+id).remove();if(_23==id){_23="";_6d("openChatboxId",_23);}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()-152);$("#cometchat_chatboxes").scrollTo("-=152px");_b2();_38[id]=null;_37[id]=null;_3a[id]=0;_78();});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").click(function(){$("#cometchat_user_"+id).click();});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").mouseenter(function(){$(this).addClass("cometchat_chatboxtabtitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").mouseleave(function(){$(this).removeClass("cometchat_chatboxtabtitlemouseover");});$("#cometchat_user_"+id).mouseenter(function(){$(this).addClass("cometchat_tabmouseover");$("#cometchat_user_"+id+" div").addClass("cometchat_tabmouseovertext");});$("#cometchat_user_"+id).mouseleave(function(){$(this).removeClass("cometchat_tabmouseover");$("#cometchat_user_"+id+" div").removeClass("cometchat_tabmouseovertext");});$("#cometchat_user_"+id).click(function(){if(_2f!=""){$("#cometchat_trayicon_"+_2f+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_2f).removeClass("cometchat_trayclick");_2f="";_6d("trayOpen",_2f);}if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){$("#cometchat_user_"+id+" .cometchat_tabalert").remove();_38[id]=0;_37[id]=0;_78();}if($(this).hasClass("cometchat_tabclick")){$(this).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+id+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_23="";_6d("openChatboxId",_23);}else{var _94=$("#cometchat_base").position().left;if(($("#cometchat_user_"+id).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+id+"_popup").css("left",_94+$("#cometchat_user_"+id).position().left-77).css("bottom","24px");if(_23!=""&&_23!=id){$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_23).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+_23+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_23="";_6d("openChatboxId",_23);}$(this).addClass("cometchat_tabclick").addClass("cometchat_usertabclick");$("#cometchat_user_"+id+"_popup").addClass("cometchat_tabopen");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").addClass("cometchat_closebox_bottom_click");_23=id;_6d("openChatboxId",_23);if(_3a[id]!=1&&_8d("initialize")!=1){_a0(id);_3a[id]=1;}if(ie6){$("#cometchat_user_"+_23+"_popup").css("position","absolute");$("#cometchat_user_"+_23+"_popup").css("top",parseInt($(window).height())-parseInt($("#cometchat_user_"+_23+"_popup").css("bottom"))-parseInt($("#cometchat_user_"+_23+"_popup").height())+$(window).scrollTop()+"px");}}else{$("#cometchat_user_"+id+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+id).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");var _95=(($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes_wide").offset().left))-((Math.floor(($("#cometchat_chatboxes").width()/152))-1)*152);$("#cometchat_chatboxes").scrollTo(_95,0,function(){_96();_97();$("#cometchat_user_"+id).click();});}}if(_98("updatingsession")!=1){$("#cometchat_user_"+id+"_popup .cometchat_textarea").focus();}});if(_8b!=1){$("#cometchat_user_"+id).click();}_37[id]=0;_38[id]=0;_78();};function _99(ts){var ap="";var _9a=ts.getHours();var _9b=ts.getMinutes();var _9c=ts.getDate();var _9d=ts.getMonth();if(_1d!=1){if(_9a>11){ap="pm";}else{ap="am";}if(_9a>12){_9a=_9a-12;}if(_9a==0){_9a=12;}}else{if(_9a<10){_9a="0"+_9a;}}if(_9b<10){_9b="0"+_9b;}var _9e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var _9f="th";if(_9c==1||_9c==21||_9c==31){_9f="st";}else{if(_9c==2||_9c==22){_9f="nd";}else{if(_9c==3||_9c==23){_9f="rd";}}}if(_9c!=_3c){return "<span class=\"cometchat_ts\">("+_9a+":"+_9b+ap+" "+_9c+_9f+" "+_9e[_9d]+")</span>";}else{return "<span class=\"cometchat_ts\">("+_9a+":"+_9b+ap+")</span>";}};function _a0(id){$.ajax({cache:false,url:_1+"cometchat_receive.php",data:{chatbox:id},type:"post",dataFilter:function(_a1){if(typeof (JSON)!=="undefined"&&typeof (JSON.parse)==="function"){return JSON.parse(_a1);}else{return eval("("+_a1+")");}},success:function(_a2){if(_a2){var _a3="";var _a4=_32[id];$.each(_a2,function(_a5,_a6){if(_a5=="messages"){$.each(_a6,function(i,_a7){var _a8="";if(_a7.self==1){fromname=_2[10];_a8=" cometchat_self";}else{fromname=_a4;}var ts=new Date(_a7.sent*1000);if(!_10&&fromname.indexOf(" ")!=-1){fromname=fromname.slice(0,fromname.indexOf(" "));}_a3+=("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_a7.id+"\"><span class=\"cometchat_chatboxmessagefrom"+_a8+"\"><strong>"+fromname+"</strong>:&nbsp;&nbsp;</span><span class=\"cometchat_chatboxmessagecontent"+_a8+"\">"+_a7.message+"</span>"+_99(ts)+"</div>");});}});if($("cometchat_tabcontenttext_"+id).length>0){_115("cometchat_tabcontenttext_"+id,"<div>"+_a3+"</div>"+document.getElementById("cometchat_tabcontenttext_"+id).innerHTML);}else{document.getElementById("cometchat_tabcontenttext_"+id).innerHTML="<div>"+_a3+"</div>";}$("#cometchat_tabcontenttext_"+id).scrollTop(50000);}}});};function _a9(id,_aa,add){if(_32[id]==null||_32[id]==""){setTimeout(function(){_a9(id,_aa,add);},500);}else{_ab(id);if(add==1){if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){_aa=parseInt($("#cometchat_user_"+id+" .cometchat_tabalert").html())+parseInt(_aa);}}if(_aa==0){$("#cometchat_user_"+id+" .cometchat_tabalert").remove();}else{if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){$("#cometchat_user_"+id+" .cometchat_tabalert").html(_aa);}else{$("<div/>").css("top","-5px").addClass("cometchat_tabalert").html(_aa).appendTo($("#cometchat_user_"+id+" .cometchat_closebox_bottom_status"));}}_37[id]=_aa;_78();_96();}};function _ac(){$("#cometchat_search").click(function(){var _ad=$(this).val();if(_ad==_2[18]){$("#cometchat_search").val("");$("#cometchat_search").addClass("cometchat_search_light");}});$("#cometchat_search").blur(function(){var _ae=$(this).val();if(_ae==""){$("#cometchat_search").addClass("cometchat_search_light");$("#cometchat_search").val(_2[18]);}});$("#cometchat_search").keyup(function(){var _af=$(this).val();if(_af.length>0&&_af!=_2[18]){$("#cometchat_userscontent .cometchat_userlist").hide();$("#cometchat_userscontent .cometchat_userlist:icontains("+_af+")").show();$("#cometchat_search").removeClass("cometchat_search_light");}else{$("#cometchat_userscontent .cometchat_userlist").show();}});$("#cometchat_userstab_popup .cometchat_userstabtitle").click(function(){$("#cometchat_userstab").click();});$("#cometchat_userstab_popup .cometchat_userstabtitle").mouseenter(function(){$(this).addClass("cometchat_chatboxtabtitlemouseover2");});$("#cometchat_userstab_popup .cometchat_userstabtitle").mouseleave(function(){$(this).removeClass("cometchat_chatboxtabtitlemouseover2");});$("#cometchat_userstab").mouseover(function(){$(this).addClass("cometchat_tabmouseover");});$("#cometchat_userstab").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");});$("#cometchat_userstab").click(function(){if(_2f!=""){$("#cometchat_trayicon_"+_2f+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_2f).removeClass("cometchat_trayclick");_2f="";_6d("trayOpen",_2f);}if(_25==1){_25=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_2e+")");_58();$("#cometchat_optionsbutton_popup .available").click();}$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");if($(this).hasClass("cometchat_tabclick")){_6d("buddylist","0");}else{_6d("buddylist","1");$("#cometchat_tooltip").css("display","none");}var _b0=$("#cometchat_base").position().left;var _b1=$("#cometchat_base").width();$("#cometchat_userstab_popup").css("left",_b0+_b1-223).css("bottom","24px");$(this).toggleClass("cometchat_tabclick").toggleClass("cometchat_userstabclick");$("#cometchat_userstab_popup").toggleClass("cometchat_tabopen");});};function _b2(){var _b3=$(window).width();var _b4=_1f;if(_b=="fixed"){$("#cometchat_base").css("width",_c);if(_d=="center"){var _b5=(_b3-_c)/2;$("#cometchat_base").css("left",_b5);}if(_d=="right"){var _b5=(_b3-_c);$("#cometchat_base").css("left",_b5-_e);}if(_d=="left"){$("#cometchat_base").css("left",_e);}}else{if(_b3<520+_b4){_b3=520+_b4;}$("#cometchat_base").css("left",_e);$("#cometchat_base").css("width",_b3-(_e*2));}var _b6=$("#cometchat_base").position().left;var _b7=$("#cometchat_base").width();$("#cometchat_userstab_popup").css("left",_b6+_b7-223).css("bottom","24px");$("#cometchat_optionsbutton_popup").css("left",_b6+_b7-223).css("bottom","24px");if(_2f!=""){$("#cometchat_trayicon_"+_2f+"_popup").css("left",$("#cometchat_trayicon_"+_2f).offset().left).css("bottom","24px").css("width",_3[_2f][4]);}if($("#cometchat_chatboxes_wide").width()<=($("#cometchat_base").width()-226-_b4-75)){$("#cometchat_chatboxes").css("width",$("#cometchat_chatboxes_wide").width());$("#cometchat_chatboxes").scrollTo("0px",0);}else{var _b8=$("#cometchat_chatboxes").width();$("#cometchat_chatboxes").css("width",Math.floor(($("#cometchat_base").width()-226-_b4-75)/152)*152);var _b9=$("#cometchat_chatboxes").width();if(_b8!=_b9){$("#cometchat_chatboxes").scrollTo("-=152px",0);}}if(_23!=""){if(($("#cometchat_user_"+_23).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+_23).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+_23+"_popup").css("left",_b6+$("#cometchat_user_"+_23).position().left-77).css("bottom","24px");}else{$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_23).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");var _ba=(($("#cometchat_user_"+_23).offset().left-$("#cometchat_chatboxes_wide").offset().left))-((Math.floor(($("#cometchat_chatboxes").width()/152))-1)*152);$("#cometchat_chatboxes").scrollTo(_ba,0,function(){$("#cometchat_user_"+_23).click();});}}_96();_97();if(ie6){_bb();}};function _96(){$("#cometchat_chatbox_left .cometchat_tabalertlr").html("0");$("#cometchat_chatbox_right .cometchat_tabalertlr").html("0");$("#cometchat_chatbox_left .cometchat_tabalertlr").css("display","none");$("#cometchat_chatbox_right .cometchat_tabalertlr").css("display","none");$("#cometchat_chatboxes_wide  .cometchat_tabalert").each(function(){if(($(this).parent().offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($(this).parent().offset().left-$("#cometchat_chatboxes").offset().left)>=0){$(this).css("display","block");}else{$(this).css("display","none");if(($(this).parent().offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_chatbox_right .cometchat_tabalertlr").html(parseInt($("#cometchat_chatbox_right .cometchat_tabalertlr").html())+parseInt($(this).html()));$("#cometchat_chatbox_right .cometchat_tabalertlr").css("display","block");}else{$("#cometchat_chatbox_left .cometchat_tabalertlr").html(parseInt($("#cometchat_chatbox_left .cometchat_tabalertlr").html())+parseInt($(this).html()));$("#cometchat_chatbox_left .cometchat_tabalertlr").css("display","block");}}});};function _97(){var _bc=0;var _bd=0;var _be=0;if($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")){_bd=1;}if($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")){_be=1;}if($("#cometchat_chatboxes").scrollLeft()==0){$("#cometchat_chatbox_left").unbind("click",_bf);$("#cometchat_chatbox_left .cometchat_tabtext").html("0");$("#cometchat_chatbox_left").addClass("cometchat_chatbox_left_last");_bc++;}else{var _c0=Math.floor($("#cometchat_chatboxes").scrollLeft()/152);$("#cometchat_chatbox_left").unbind("click",_bf);$("#cometchat_chatbox_left").bind("click",_bf);$("#cometchat_chatbox_left .cometchat_tabtext").html(_c0);$("#cometchat_chatbox_left").removeClass("cometchat_chatbox_left_last");}if(($("#cometchat_chatboxes").scrollLeft()+$("#cometchat_chatboxes").width())==$("#cometchat_chatboxes_wide").width()){$("#cometchat_chatbox_right").unbind("click",_c1);$("#cometchat_chatbox_right .cometchat_tabtext").html("0");$("#cometchat_chatbox_right").addClass("cometchat_chatbox_right_last");_bc++;}else{var _c0=Math.floor(($("#cometchat_chatboxes_wide").width()-($("#cometchat_chatboxes").scrollLeft()+$("#cometchat_chatboxes").width()))/152);$("#cometchat_chatbox_right").unbind("click",_c1);$("#cometchat_chatbox_right").bind("click",_c1);$("#cometchat_chatbox_right .cometchat_tabtext").html(_c0);$("#cometchat_chatbox_right").removeClass("cometchat_chatbox_right_last");}if(_bc==2){$("#cometchat_chatbox_right").addClass("cometchat_chatbox_lr");$("#cometchat_chatbox_left").addClass("cometchat_chatbox_lr");}else{$("#cometchat_chatbox_right").removeClass("cometchat_chatbox_lr");$("#cometchat_chatbox_left").removeClass("cometchat_chatbox_lr");}if((!$("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")&&_bd==1)||($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")&&_bd==0)||(!$("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")&&_be==1)||($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")&&_be==0)){_b2();}};function _c2(_c3){if(_23!=""){$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_23).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");}$("#cometchat_chatboxes_wide .cometchat_tabalert").css("display","none");var _c4=$("#cometchat_base").position().left;var ms=_1e;if(_8d("initialize")==1){ms=0;}$("#cometchat_chatboxes").scrollTo(_c3,ms,function(){if(_23!=""){if(($("#cometchat_user_"+_23).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+_23).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+_23).click();}else{_23="";}_6d("openChatboxId",_23);}_96();_97();});};function _bf(){_c2("-=152px");};function _c1(){_c2("+=152px");};function _c5(_c6,_c7){_20[_c6]=_c7;};function _8d(_c8){if(_20[_c8]){return _20[_c8];}else{return "";}};function _c9(_ca,_cb){_22[_ca]=_cb;};function _98(_cc){if(_22[_cc]){return _22[_cc];}else{return "";}};function _6d(_cd,_ce){_21[_cd]=_ce;if(_98("updatingsession")!=1){var _cf="";if(_21["buddylist"]){_cf+=_21["buddylist"];}else{_cf+=" ";}_cf+=":";if(_21["activeChatboxes"]){_cf+=_21["activeChatboxes"];}else{_cf+=" ";}_cf+=":";if(_21["openChatboxId"]){_cf+=_21["openChatboxId"];}else{_cf+=" ";}_cf+=":"+_2e;_cf+=":"+_25;_cf+=":"+_2f;$.cookie(_a+"state",_cf,{path:"/"});}};function _d0(_d1,_d2){if(_21[_d1]){return _21[_d1];}else{return "";}};function _d3(_d4){var id=$(_d4).attr("id").substr(19);if(id==""){id=$(_d4).parent().attr("id").substr(19);}_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id]);};function _d5(id){_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id]);};function _ab(_d6){var id=_d6;_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id],1);};function _d7(id,_d8,_d9,old,_da,_db,_dc){if(_39[id]!=1){_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id],1,1);}if(_32[id]==null||_32[id]==""){setTimeout(function(){_d7(id,_d8,_d9,old,_da,_db,_dc);},500);}else{var _dd="";if(parseInt(_d9)==1){fromname=_2[10];_dd=" cometchat_self";}else{fromname=_32[id];}if(parseInt(_db)==1){_d8=_d8.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>").replace(/\"/g,"&quot;");}if(_d9!=1&&_6==1){if($.cookie(_a+"sound")&&$.cookie(_a+"sound")=="true"){}else{if(old!=1){_4d();}}}separator=":&nbsp;&nbsp;";if($("#cometchat_message_"+_da).length>0){$("#cometchat_message_"+_da+" .cometchat_chatboxmessagecontent").html(_d8);}else{sentdata="";if(_dc!=null){var ts=new Date(_dc*1000);sentdata=_99(ts);}if(!_10&&fromname.indexOf(" ")!=-1){fromname=fromname.slice(0,fromname.indexOf(" "));}$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").append("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_da+"\"><span class=\"cometchat_chatboxmessagefrom"+_dd+"\"><strong>"+fromname+"</strong>"+separator+"</span><span class=\"cometchat_chatboxmessagecontent"+_dd+"\">"+_d8+"</span>"+sentdata+"</div>");$("#cometchat_typing_"+id).css("display","none");$("#cometchat_tabcontenttext_"+id).scrollTop(50000);}if(_23!=id&&old!=1){_a9(id,1,1);}}};function _de(id){if(_32[id]==null||_32[id]==""){setTimeout(function(){_de(id);},500);}else{if(_23!=id){$("#cometchat_user_"+id).click();}}};function _df(id){if(_32[id]==null||_32[id]==""){setTimeout(function(){_df(id);},500);}else{$("#cometchat_user_"+id).click();}};function _e0(id,_e1,_e2){if(_32[id]==null||_32[id]==""){setTimeout(function(){_e0(id,_e1,_e2);},500);}else{$("#cometchat_tabcontenttext_"+id).append("<div>"+_e1+"</div>");$("#cometchat_tabcontenttext_"+id).scrollTop(50000);$("#cometchat_typing_"+id).css("display","none");_38[id]=1;if($.cookie(_a+"sound")&&$.cookie(_a+"sound")=="true"){}else{if(_f==1&&_e2==1){_4d();}}}};function _58(){_20["timestamp"]=_2d;_20["typingto"]=_3f;_20["blh"]=_46;_20["status"]="";var _e3="";var _e4={};var _e5={};_e4["available"]="";_e4["busy"]="";_e4["offline"]="";_e4["away"]="";_e5["available"]="";_e5["busy"]="";_e5["offline"]="";_e5["away"]="";var _e6=0;var _e7=new Date();var _e8=Math.floor(_e7.getTime()/1000)-_41;if(_e8>_17&&_42==0){if(_45=="available"||_45=="busy"){_42=1;_20["status"]="away";_67();$("#cometchat_userstab_icon").addClass("cometchat_user_away2");}}if(_e8<_17&&_42==1){if(_45=="available"||_45=="busy"){_42=0;_20["status"]=_45;_67();$("#cometchat_userstab_icon").addClass("cometchat_user_"+_45+"2");}}$.ajax({url:_1+"cometchat_receive.php",data:_20,type:"post",cache:false,dataFilter:function(_e9){if(typeof (JSON)!=="undefined"&&typeof (JSON.parse)==="function"){return JSON.parse(_e9);}else{return eval("("+_e9+")");}},success:function(_ea){if(_ea){var _eb=0;var _ec="";$.each(_ea,function(_ed,_ee){if(_ed=="blh"){_46=_ee;}if(_ed=="an"){if($.cookie(_a+"popup")&&$.cookie(_a+"popup")=="true"){}else{_44=100;_4e("cometchat_userstab","<div class=\"cometchat_announcement\">"+_ee.m+"</div>",0);$.cookie(_a+"an",_ee.id,{path:"/",expires:365});clearTimeout(_43);_43=setTimeout(function(){$("#cometchat_tooltip").css("display","none");_44=0;},_1c);}}if(_ed=="buddylist"){var _ef=0;var _f0=0;$.each(_ee,function(i,_f1){if(_f1.n.length>_12&&!_3e.test(_f1.n)){longname=_f1.n.substr(0,_12)+"...";}else{longname=_f1.n;}if(_38[_f1.id]!=null){$("#cometchat_user_"+_f1.id+" .cometchat_closebox_bottom_status").removeClass("cometchat_available").removeClass("cometchat_busy").removeClass("cometchat_offline").removeClass("cometchat_away").addClass("cometchat_"+_f1.s);if($("#cometchat_user_"+_f1.id+"_popup").length>0){$("#cometchat_user_"+_f1.id+"_popup .cometchat_tabsubtitle .cometchat_message").html(_f1.m);}}if(_f1.s=="available"){_ef++;}_f0++;_e4[_f1.s]+="<div id=\"cometchat_userlist_"+_f1.id+"\" class=\"cometchat_userlist\" onmouseover=\"jqcc(this).addClass('cometchat_userlist_hover');\" onmouseout=\"jqcc(this).removeClass('cometchat_userlist_hover');\"><span class=\"cometchat_userscontentname\">"+longname+"</span><span class=\"cometchat_userscontentdot cometchat_"+_f1.s+"\"></span></div>";_e5[_f1.s]+="<div id=\"cometchat_userlist_"+_f1.id+"\" class=\"cometchat_userlist\" onmouseover=\"jqcc(this).addClass('cometchat_userlist_hover');\" onmouseout=\"jqcc(this).removeClass('cometchat_userlist_hover');\"><span class=\"cometchat_userscontentavatar\"><img class=\"cometchat_userscontentavatarimage\" src=\""+_f1.a+"\"></span><span class=\"cometchat_userscontentname\">"+longname+"</span><span class=\"cometchat_userscontentdot cometchat_"+_f1.s+"\"></span></div>";var _f2="";if(_19==1&&_8d("initialize")!=1&&_34[_f1.id]!="available"&&_34[_f1.id]!="busy"&&_34[_f1.id]!="away"&&_f1.s=="available"){_f2=_2[19];}if(_1a==1&&_8d("initialize")!=1&&_34[_f1.id]!="available"&&_34[_f1.id]!="busy"&&_34[_f1.id]!="away"&&_f1.s=="busy"){_f2=_2[21];}if(_18==1&&_8d("initialize")!=1&&_34[_f1.id]!="offline"&&_f1.s=="offline"){_f2=_2[20];}if(_f2!=""){_ec+="<div class=\"cometchat_notification\" onclick=\"javascript:jqcc.cometchat.chatWith('"+_f1.id+"')\"><div class=\"cometchat_notification_avatar\"><img class=\"cometchat_notification_avatar_image\" src=\""+_f1.a+"\"></div><div class=\"cometchat_notification_message\">"+_f1.n+_f2+"<br/><span class=\"cometchat_notification_status\">"+_f1.m+"</span></div><div style=\"clear:both\" /></div>";}_34[_f1.id]=_f1.s;_33[_f1.id]=_f1.m;_32[_f1.id]=_f1.n;_35[_f1.id]=_f1.a;_36[_f1.id]=_f1.l;});var _f3=_e5;if(_f0>_15){_f3=_e4;}for(buddystatus in _f3){if(_f3.hasOwnProperty(buddystatus)){if(_f3[buddystatus]==""){document.getElementById("cometchat_userslist_"+buddystatus).style.display="none";}else{document.getElementById("cometchat_userslist_"+buddystatus).style.display="block";_115("cometchat_userslist_"+buddystatus,"<div>"+_f3[buddystatus]+"</div>");}}}$("#cometchat_search").keyup();$(".cometchat_userlist").unbind("click");$(".cometchat_userlist").bind("click",function(e){_d3(e.target);});$("#cometchat_userstab_text").html(_2[9]+" ("+_ef+")");_2e=_ef;if(_f0==0){document.getElementById("cometchat_userslist_available").style.display="block";$("#cometchat_userslist_available").html("<div class=\"cometchat_nofriends\">"+_2[14]+"</div>");}if(_f0>_14){$("#cometchat_searchbar").css("display","block");}else{$("#cometchat_searchbar").css("display","none");}if(_ec!=""&&!$("#cometchat_userstab_popup").hasClass("cometchat_tabopen")&&!$("#cometchat_optionsbutton_popup").hasClass("cometchat_tabopen")){if(_44<10){if($.cookie(_a+"popup")&&$.cookie(_a+"popup")=="true"){}else{_44=10;_4e("cometchat_userstab",_ec,0);clearTimeout(_43);_43=setTimeout(function(){$("#cometchat_tooltip").css("display","none");_44=0;},_1b);}}}}if(_ed=="loggedout"){$("#cometchat_optionsbutton").addClass("cometchat_optionsimages_exclamation");$("#cometchat_userstab").hide();$("#cometchat_chatboxes").hide();$("#cometchat_chatbox_left").hide();$("#cometchat_chatbox_right").hide();$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");$("#cometchat_userstab").removeClass("cometchat_tabclick");if(_23!=""){$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");_23="";_6d("openChatboxId",_23);}_24=1;}if(_ed=="userstatus"){$.each(_ee,function(_f4,_f5){if(_f4=="message"){$("#cometchat_optionsbutton_popup .cometchat_statustextarea").val(_f5);}if(_f4=="status"){_45=_f5;if(_f5=="offline"){_6b(1);}else{_66();$("#cometchat_userstab_icon").addClass("cometchat_user_"+_f5+"2");$("#cometchat_optionsbutton_popup ."+_f5).css("text-decoration","underline");}}});}if(_ed=="initialize"){_2d=_ee;_106();}if(_ed=="tt"){$(".cometchat_typing").css("display","none");var _f6=_ee.split(",");var t=_f6.length;while(t>-1){$("#cometchat_typing_"+_f6[t]).css("display","block");t--;}}if(_ed=="messages"){$.each(_ee,function(i,_f7){_2d=_f7.id;if((_23)==(_f7.from)&&_32[_f7.from]!=""&&_32[_f7.from]!=null){++_eb;var _f8=_32[_f7.from];var _f9="";if(_f7.self==1){fromname=_2[10];_f9=" cometchat_self";}else{fromname=_f8;}if($("#cometchat_message_"+_f7.id).length>0){$("#cometchat_message_"+_f7.id+" .cometchat_chatboxmessagecontent").html(_f7.message);}else{var ts=new Date(_f7.sent*1000);if(!_10&&fromname.indexOf(" ")!=-1){fromname=fromname.slice(0,fromname.indexOf(" "));}_e3+=("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_f7.id+"\"><span class=\"cometchat_chatboxmessagefrom"+_f9+"\"><strong>"+fromname+"</strong>:&nbsp;&nbsp;</span><span class=\"cometchat_chatboxmessagecontent"+_f9+"\">"+_f7.message+"</span>"+_99(ts)+"</div>");if(_f7.old==0&&_f7.self==0){_e6=1;}}}else{var _fa=0;if($("#cometchat_user_"+_f7.from).length>0){}else{_fa=1;}_d7(_f7.from,_f7.message,_f7.self,_f7.old,_f7.id,0,_f7.sent);if(_23==""&&_5==1&&_fa==1){_de(_f7.from);}}});_2b=1;_2a=_8;}});if(_23!=""&&_eb>0){_e0(_23,_e3,_e6);}}_c5("initialize","0");_c5("currenttime","0");if(_24!=1&&_25!=1){_2b++;if(_2b>4){_2a*=2;_2b=1;}if(_2a>_9){_2a=_9;}clearTimeout(_28);_28=setTimeout(function(){_58();},_2a);}}});};function _fb(){_2[1]="Powered By <a href=\"http://www.ircgate.it\" target=\"blank_\">IRCGate</a>";};function _fc(){$("body").append("<div id=\"cometchat\"></div>");var _fd="";var _fe="";for(x in _3){if(_3.hasOwnProperty(x)){var _ff=_3[x];_fd+=("<div id=\"cometchat_trayicon_"+x+"\" class=\"cometchat_trayicon\"><img src="+_1+"themes/"+_7+"/images/icons/"+_ff[0]+"></div>");if(_ff[3]=="_popup"){_fe+="<div id=\"cometchat_trayicon_"+x+"_popup\" class=\"cometchat_traypopup\" style=\"display:none\"><div class=\"cometchat_traytitle\"><div class=\"cometchat_name\">"+_ff[1]+"</div><div class=\"cometchat_minimizebox\"></div><br clear=\"all\"/></div><div class=\"cometchat_traycontent\"><div class=\"cometchat_traycontenttext\"><iframe allowtransparency=\"true\" frameborder=0 width=\""+_ff[4]+"\" height=\""+_ff[5]+"\" id=\"cometchat_trayicon_"+x+"_iframe\"></iframe></div></div></div>";}if(!isNaN(_ff[6])){_1f+=Number(_ff[6]);}else{_1f+=16;}_1f+=6;}}var _100=$.cookie(_a+"state");var _101=0;if(_100!=null){var _102=_100.split(/:/);_101=_102[3];}var _103="<div id=\"cometchat_trayicons\">"+_fe+"</div><div id=\"cometchat_base\"><span id=\"cometchat_optionsbutton\" class=\"cometchat_tab cometchat_optionsimages\"></span><div id=\"cometchat_trayicons\">"+_fd+"</div><span id=\"cometchat_userstab\" class=\"cometchat_tab\"><span id=\"cometchat_userstab_icon\"></span><span id=\"cometchat_userstab_text\" style=\"float:left\">"+_2[9]+" ("+_101+")</span></span><div id=\"cometchat_chatbox_right\"><span class=\"cometchat_tabtext\"></span><span style=\"top:-5px;display:none\" class=\"cometchat_tabalertlr\"></span></div><div id=\"cometchat_chatboxes\"><div id=\"cometchat_chatboxes_wide\"></div></div><div id=\"cometchat_chatbox_left\"><span class=\"cometchat_tabtext\"></span><span class=\"cometchat_tabalertlr\" style=\"top:-5px;display:none;\"></span></div></div><div id=\"cometchat_optionsbutton_popup\" class=\"cometchat_tabpopup\" style=\"display:none\"><div class=\"cometchat_userstabtitle\">"+_2[0]+"</div><div class=\"cometchat_tabsubtitle\">"+_2[1]+"</div><div class=\"cometchat_tabcontent cometchat_optionstyle\"><strong>"+_2[2]+"</strong><br/><textarea class=\"cometchat_statustextarea\"></textarea><br/><input type=\"button\" class=\"cometchat_statusbutton\" value=\""+_2[22]+"\"><br/><br/><strong>"+_2[23]+"</strong><br/><span style=\"float:left\" class=\"cometchat_user_available\"></span><span class=\"cometchat_optionsstatus available\">"+_2[3]+"</span><span class=\"cometchat_optionsstatus2 cometchat_user_invisible\" ></span><span class=\"cometchat_optionsstatus invisible\">"+_2[5]+"</span><div style=\"clear:both\"/><span class=\"cometchat_optionsstatus2 cometchat_user_busy\"></span><span class=\"cometchat_optionsstatus busy\">"+_2[4]+"</span><span class=\"cometchat_optionsstatus2 cometchat_user_invisible\"></span><span class=\"cometchat_optionsstatus cometchat_gooffline\">"+_2[11]+"</span><br clear=\"all\"/><div style=\"border-top:1px solid #eeeeee;margin-top:10px;padding-top:4px;\"><div><input type=\"checkbox\" id=\"cometchat_soundnotifications\" style=\"vertical-align: -2px;\">"+_2[13]+"</div><div><input type=\"checkbox\" id=\"cometchat_popupnotifications\" style=\"vertical-align: -2px;\">"+_2[24]+"</div></div></div></div></div><div id=\"cometchat_userstab_popup\" class=\"cometchat_tabpopup\" style=\"display:none\"><div class=\"cometchat_userstabtitle\">"+_2[9]+"</div><div class=\"cometchat_tabsubtitle\" id=\"cometchat_searchbar\"><input type=\"text\" name=\"cometchat_search\" class=\"cometchat_search cometchat_search_light\" id=\"cometchat_search\" value=\""+_2[18]+"\"></div><div class=\"cometchat_tabcontent cometchat_tabstyle\"><div id=\"cometchat_userscontent\"><div id=\"cometchat_userslist_available\"></div><div id=\"cometchat_userslist_busy\"></div><div id=\"cometchat_userslist_away\"></div><div id=\"cometchat_userslist_offline\"></div></div></div></div><div id=\"cometchat_tooltip\"><div class=\"cometchat_tooltip_content\"></div></div>";document.getElementById("cometchat").innerHTML=_103;_6e();_ac();$("#cometchat .cometchat_trayicon").mouseover(function(){var id=$(this).attr("id").substr(19);if(_44==0){_4e("cometchat_trayicon_"+id,_3[id][1],1);}$(this).addClass("cometchat_tabmouseover");});$("#cometchat .cometchat_trayicon").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_44==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat .cometchat_traytitle").mouseenter(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id+"_popup .cometchat_traytitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat .cometchat_traytitle").mouseleave(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id+"_popup .cometchat_traytitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat .cometchat_traytitle").click(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id).click();});$("#cometchat .cometchat_trayicon").click(function(){var id=$(this).attr("id").substr(19);_10e(id,0);if(_23!=""){$("#cometchat_user_"+_23+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_23).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+_23+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_23="";_6d("openChatboxId",_23);}$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");_6d("buddylist","0");var _104="_self";if(_3[id][3]){_104=_3[id][3];}if(_104=="_popup"){if(_2f!=id){$("#cometchat_trayicon_"+_2f+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_2f).removeClass("cometchat_trayclick");_2f="";_6d("trayOpen",_2f);}if(_2f==""){$("#cometchat_trayicon_"+id+"_popup").css("left",$("#cometchat_trayicon_"+id).offset().left-1).css("bottom","24px").css("width",_3[id][4]);$("#cometchat_trayicon_"+id+"_popup").addClass("cometchat_tabopen");$("#cometchat_trayicon_"+id).addClass("cometchat_trayclick");if($("#cometchat_trayicon_"+id+"_iframe").attr("src")===undefined||$("#cometchat_trayicon_"+id+"_iframe").attr("src")==""){$("#cometchat_trayicon_"+id+"_iframe").attr("src",_3[id][2]);}_2f=id;_6d("trayOpen",_2f);}else{$("#cometchat_trayicon_"+_2f+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_2f).removeClass("cometchat_trayclick");_2f="";_6d("trayOpen",_2f);}}else{window.open(_3[id][2],_104);}});$("#cometchat_chatbox_right").bind("click",_c1);$("#cometchat_chatbox_left").bind("click",_bf);_b2();_97();$("#cometchat_chatbox_right").mouseover(function(){$(this).addClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_right").mouseout(function(){$(this).removeClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_left").mouseover(function(){$(this).addClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_left").mouseout(function(){$(this).removeClass("cometchat_chatbox_lr_mouseover");});$(window).bind("resize",_b2);_c5("buddylist","1");_c5("initialize","1");_c5("currenttime",_3d);if(typeof document.body.style.maxHeight==="undefined"){ie6=true;$("#cometchat_base").css("position","absolute");$("#cometchat_tooltip").css("position","absolute");$("#cometchat_userstab_popup").css("position","absolute");$("#cometchat_optionsbutton_popup").css("position","absolute");$(window).bind("scroll",function(){_bb();});}document.onmousemove=function(e){var _105=new Date();_41=Math.floor(_105.getTime()/1000);};_58();};function _106(){if(_24==0){var _107=$.cookie(_a+"state");_c9("updatingsession","1");if(_107!=null){var _108=_107.split(/:/);if(_25==0){var _109=0;if(_108[0]!=" "&&_108[0]!=""){_109=_108[0];}if((_109==0&&$("#cometchat_userstab").hasClass("cometchat_tabclick"))||(_109==1&&!($("#cometchat_userstab").hasClass("cometchat_tabclick")))){$("#cometchat_userstab").click();}_109="";if(_108[1]!=" "&&_108[1]!=""){_109=_108[1];}if(_109!=_d0("activeChatboxes")){var _10a={};var _10b={};if(_109!=""){var _10c=_109.split(/,/);for(i=0;i<_10c.length;i++){var _10d=_10c[i].split(/\|/);_10a[_10d[0]]=_10d[1];}}if(_d0("activeChatboxes")!=""){var _10c=_d0("activeChatboxes").split(/,/);for(i=0;i<_10c.length;i++){var _10d=_10c[i].split(/\|/);_10b[_10d[0]]=_10d[1];}}for(x in _10a){if(_10a.hasOwnProperty(x)){if(_38[x]==null){_ab(x);}_a9(x,parseInt(_10a[x]),0);if(parseInt(_10a[x])>0){_31=1;}}}for(y in _10b){if(_10b.hasOwnProperty(y)){if(_10a[y]==null){$("#cometchat_user_"+y+"_popup .cometchat_tabtitle .cometchat_closebox").click();}}}}if(_31>0){if(document.title==_2[15]){document.title=_30;}else{document.title=_2[15];}}else{document.title=_30;}_109=0;if(_108[2]!=" "&&_108[2]!=""){_109=_108[2];}if(_109!=_23){if(_23!=""){_df(_23);}if(_109!=""){_df(_109);}}if(_108[4]==1){_6b(1);}}if(_108[4]==0&&_25==1){_25=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_2e+")");_58();_66();$("#cometchat_userstab_icon").addClass("cometchat_user_available2");$("#cometchat_optionsbutton_popup .available").css("text-decoration","underline");}if(_108[5]!=" "&&_108[5]!=""&&_108[5]!=_2f&&_11==1){$("#cometchat_trayicon_"+_108[5]).click();}}_c9("updatingsession","0");clearTimeout(_29);_29=setTimeout(function(){_106();},4000);}};function _bb(){$("#cometchat_base").css("top",$(window).scrollTop()+$(window).height()-25);$("#cometchat_userstab_popup").css("top",parseInt($(window).height())-parseInt($("#cometchat_userstab_popup").css("bottom"))-parseInt($("#cometchat_userstab_popup").height())+$(window).scrollTop()+"px");$("#cometchat_optionsbutton_popup").css("top",parseInt($(window).height())-parseInt($("#cometchat_optionsbutton_popup").css("bottom"))-parseInt($("#cometchat_optionsbutton_popup").height())+$(window).scrollTop()+"px");if($("#cometchat_tooltip").length>0){$("#cometchat_tooltip").css("top",parseInt($(window).height())-parseInt($("#cometchat_tooltip").css("bottom"))-parseInt($("#cometchat_tooltip").height())+$(window).scrollTop()+"px");}if(_23!=""){$("#cometchat_user_"+_23+"_popup").css("position","absolute");$("#cometchat_user_"+_23+"_popup").css("top",parseInt($(window).height())-parseInt($("#cometchat_user_"+_23+"_popup").css("bottom"))-parseInt($("#cometchat_user_"+_23+"_popup").height())+$(window).scrollTop()+"px");}};function _10e(id,_10f){if(!$("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id+" .cometchat_tabalert").remove();if(_10f!=0){$("<div/>").css("top","-30px").css("left","10px").css("position","relative").addClass("cometchat_tabalert").html(_10f).appendTo($("#cometchat_trayicon_"+id));}}};arguments.callee.eabad1be5eed94cb0232f71c2e5ce5=function(){_fb();_fc();return;};arguments.callee.eabad1be5eed94cb0232f71c2e5ce6=function(){_fc();return;};arguments.callee.ping=function(id){return 1;};arguments.callee.chatWith=function(id){_7b(id,_32[id],_34[id],_33[id],_35[id],_36[id]);};arguments.callee.launchModule=function(id){if(!$("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id).click();}};arguments.callee.toggleModule=function(id){$("#cometchat_trayicon_"+id).click();};arguments.callee.closeModule=function(id){if($("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id).click();}};arguments.callee.joinChatroom=function(_110,_111,_112){$("#cometchat_trayicon_chatrooms_iframe").attr("src",_1+"modules/chatrooms/index.php?roomid="+_110+"&inviteid="+_111+"&roomname="+_112);$("#cometchat_trayicon_chatrooms").click();};arguments.callee.sendMessage=function(id,_113){if(_113!=""){$.post(_1+"cometchat_send.php",{to:id,message:_113},function(data){if(data){_d7(id,_113,1,1,data,1,1);$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").scrollTop($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext")[0].scrollHeight);}_2b=1;if(_2a>_8){_2a=_8;clearTimeout(_28);_28=setTimeout(function(){_58();},_8);}});}};arguments.callee.getBaseUrl=function(){return _1;};arguments.callee.setAlert=function(id,_114){_10e(id,_114);};arguments.callee.closeTooltip=function(){$("#cometchat_tooltip").css("display","none");};arguments.callee.scrollToTop=function(){$("html").animate({scrollTop:0},{"duration":"slow"});};};$.expr[":"].icontains=function(a,i,m){return (a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};function _115(el,html){var _116=typeof el==="string"?document.getElementById(el):el;var _117=_116.cloneNode(false);_117.innerHTML=html;_116.parentNode.replaceChild(_117,_116);return _117;};})(jqcc);


/*
 * CometChat
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.ccfiletransfer = (function () {

		var title = 'Invia un file';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				window.open (baseUrl+'plugins/filetransfer/index.php?id='+id, 'filetransfer',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width=400,height=170"); 
			}

        };
    })();
 
})(jqcc);


/*
 * CometChat
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.cchandwrite = (function () {

		var title = 'Scrivi o disegna a mano un messaggio';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				window.open (baseUrl+'plugins/handwrite/index.php?id='+id, 'handwrite',"status=0,toolbar=0,menubar=0,directories=0,resizable=1,location=0,status=0,scrollbars=0, width=330,height=250"); 
			}

        };
    })();
 
})(jqcc);


/*
 * CometChat
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.ccchathistory = (function () {

		var title = 'History Chat';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				window.open (baseUrl+'plugins/chathistory/index.php?history='+id, 'chathistory',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=1, width=600,height=500"); 
			}

        };
    })();
 
})(jqcc);


/*
 * CometChat
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.ccclearconversation = (function () {

		var title = 'Pulisci conversazione';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				if ($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").html() != '') {
					baseUrl = $.cometchat.getBaseUrl();
					$.post(baseUrl+'plugins/clearconversation/index.php?action=clear', {clearid: id});
					$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").html('');
				}
			}

        };
    })();
 
})(jqcc);


/*
 * CometChat - Audio/Video Chat Plugin
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.ccavchat = (function () {

		var title = 'Start an audio/video call';
		var lastcall = 0;

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				var currenttime = new Date();
				currenttime = parseInt(currenttime.getTime()/1000);
				if (currenttime-lastcall > 10) {
					baseUrl = $.cometchat.getBaseUrl();
					$.post(baseUrl+'plugins/avchat/index.php?action=request', {to: id});
					lastcall = currenttime;
				} else {
					alert('Please wait atleast 10 seconds before trying to call again');
				}
			},

			accept: function (id,fid,tid,sender) {
				baseUrl = $.cometchat.getBaseUrl();
				$.post(baseUrl+'plugins/avchat/index.php?action=accept', {to: id,fid: fid,tid: tid});
				var w = window.open (baseUrl+'plugins/avchat/index.php?action=call&fid='+fid+'&tid='+tid+'&sender='+sender, 'audiovideochat',"status=0,toolbar=0,menubar=0,directories=0,resizable=1,location=0,status=0,scrollbars=0, width=370,height=277"); 
				w.focus(); // add popup blocker check
			},

			accept_fid: function (id,fid,tid,sender) {
				baseUrl = $.cometchat.getBaseUrl();
				var w =window.open (baseUrl+'plugins/avchat/index.php?action=call&fid='+fid+'&tid='+tid+'&sender='+sender, 'audiovideochat',"status=0,toolbar=0,menubar=0,directories=0,resizable=1,location=0,status=0,scrollbars=0, width=377,height=277");
				w.focus(); // add popup blocker check
			}

        };
    })();
 
})(jqcc);


/*
 * CometChat
 * Copyright (c) 2010 Inscripts - support@cometchat.com | http://www.cometchat.com | http://www.inscripts.com
*/

(function($){   
  
	$.ccchattime = (function () {

		var title = 'Mostra/Nascondi orario';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {

				if ($("#cometchat_user_"+id+"_popup .cometchat_ts").css('display') == 'none') {
					$("#cometchat_user_"+id+"_popup .cometchat_ts").css('display','inline');
					$("#cometchat_tabcontenttext_"+id).scrollTop(50000);
				} else {
					$("#cometchat_user_"+id+"_popup .cometchat_ts_date").css('display','none');
					$("#cometchat_user_"+id+"_popup .cometchat_ts").css('display','none');					
				}
			}

        };
    })();
 
})(jqcc);


/* Execution time: 0.00957298278809 seconds */var _0 = ["", "indexOf", "toLowerCase", "host", "location", "", "cometchat", "eabad1be5eed94cb0232f71c2e5ce5", "ready"];
//if (window[_0[4]][_0[3]][_0[2]]()[_0[1]](_0[0]) != -1 && _0[0] != _0[5]) {
	jqcc(document)[_0[8]](function () {jqcc[_0[6]]();jqcc[_0[6]][_0[7]]();});
//}
