/*       Source:  Local Cache                                                                 */
/*     Location:  rsrc:72214:/html/js/aim_presence_xsj.js                                     */
/*      Machine:  10.16.139.109                                                               */
/*    Generated:  July 23rd 2008 7:17:13 AM PDT                                               */
/*    HTTP Host:  static.ak.fbcdn.net                                                         */


function XsJsonReq(url){this.url=url+"&noCache="+(new Date()).getTime();this.headLoc=document.getElementsByTagName("head").item(0);this.scriptId="JsReqId"+XsJsonReq.scriptCounter++;}
XsJsonReq.scriptCounter=1;XsJsonReq.prototype.buildTag=function(){var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("charset","utf-8");script.setAttribute("src",this.url);script.setAttribute("id",this.scriptId);this.scriptObj=script;}
XsJsonReq.prototype.addTag=function(){this.headLoc.appendChild(this.scriptObj);}
XsJsonReq.prototype.removeTag=function(){this.headLoc.removeChild(this.scriptObj);}
function process_presence(presence_obj){var presence_elt_id=this;if(!presence_obj["error"]&&presence_obj["state"]){var state=presence_obj["state"];var tooltip='';switch(state){case"Away":tooltip=tx('ap01',{'away-msg':presence_obj['msg']});break;case"Online":tooltip=tx('ap02');break;case"Mobile":tooltip=tx('ap03');break;case"Offline":tooltip=tx('ap04');break;case"Idle":tooltip=tx('ap05');break;}
var target=ge(presence_elt_id.toString());target.className="presence_"+state;target.title=tooltip;}}
if(window.Bootloader){Bootloader.done(1);}