
(function(){var r="r.",w="w.",qz="qzone.qq.com",_w=window,sp=_w.g_SPrefix||"",dp=_w.g_DPrefix||"",sdp=_w.g_Set||_w.g_DPrefix||"";_w.g_W_Domain=w+dp+qz;_w.g_R_Domain=r+dp+qz;_w.g_Base_Domain="base."+sdp+qz;_w.g_My_Main_Domain=_w.g_Main_Domain="users."+dp+qz;_w.g_My_Music_Domain=_w.g_Music_Domain="qzone-music.qq.com";_w.g_Photo_Domain="photo.qq.com";_w.g_MsgBoard_Domain="m."+dp+qz;_w.g_Ic_Domain="ic."+sdp+qz;_w.g_Emotion_Domain="e."+dp+qz;_w.g_NewBlog_Domain="b."+dp+qz;_w.g_Statistic_Domain="g."+dp+qz;_w.g_Src_Domain="u."+sdp+qz;_w.iiDomain=sp+"i.gtimg.cn";})();QZONE.FrontPage=QZONE.FrontPage||{};QZONE.FrontPage.getPortraitList=function(uinAry,callback,paramObj){if(typeof(uinAry)!="object"||!uinAry.length){return null;}
if(typeof(paramObj)!="object"){paramObj={};}
paramObj.needScore=(paramObj.needScore===undefined)?0:8;paramObj.needVIP=(paramObj.needVIP===undefined)?2:0;paramObj.needNick=(paramObj.needNick===undefined)?4:0;paramObj.needPortrait=(paramObj.needPortrait===undefined)?1:0;paramObj.mk=paramObj.needScore+paramObj.needVIP+paramObj.needNick+paramObj.needPortrait;var _s=QZONE.FrontPage.getPortraitList,list=uniqueArray(uinAry),m=_s._portraitPool,tmp,t,alrd=[],p=[];for(var i=0,len=list.length;i<len;++i){if(tmp=list[i]){if(typeof(m[tmp])=="object"){if(paramObj.needScore&&(m[tmp][1]-0)==0){p.push(tmp);}else if(paramObj.needVIP&&(m[tmp][3]-0)==-1){p.push(tmp);}else if(paramObj.needNick&&(m[tmp][6]-0)==-1){p.push(tmp);}else if(paramObj.needPortrait&&(m[tmp][0]-0)==-1){p.push(tmp);}else{alrd.push(tmp);}}else{p.push(tmp);}}}
if(p.length<1){if(alrd.length<1){return null;}
if(typeof(callback)=="function"){var fn=(function(cb,al,sz){return function(ro){for(var k in t){t[k][0]=QZONE.FrontPage.getPURLByType(k,sz);}
if(cb){cb(t);}};})(callback,alrd,paramObj.size);QZONE.FrontPage.getPortraitType(QZFL.lang.objectClone(list),fn,fn);}}else if(_s._requesting){setTimeout(function(){QZONE.FrontPage.getPortraitList(uinAry,callback);},500);}else{if(typeof(callback)=="function"){callback.__FP_gpl_list=QZFL.lang.objectClone(list);if(paramObj.size){callback.__FP_gpl_size=paramObj.size;}
_s._callbackFnQueue.push(callback);for(var i=0,len=p.length;i<len;++i){_s._toGet[p[i]]=true;}
_s._getControl(paramObj);}}
if(alrd.length>0){t={};for(var i=0,len=alrd.length;i<len;++i){t[alrd[i]]=m[alrd[i]];}
return t;}
return null;};QZONE.FrontPage.getPortraitList.clearOneNode=function(uin){delete QZONE.FrontPage.getPortraitList._portraitPool[uin];if(QZONE.FrontPage.getPortraitType._cache){delete QZONE.FrontPage.getPortraitType._cache[uin];}
return true;};QZONE.FrontPage.getPortraitList._getControl=function(paramObj){var _s=QZONE.FrontPage.getPortraitList,tLength=0,_t;for(var k in _s._toGet){++tLength;}
if(tLength<1){return;}
clearTimeout(_s.timer);if(tLength>_s._MAX_NUM){_s._flush(paramObj.mk);}else{_t=paramObj.customTime||_s._TIME_OUT;_s.timer=setTimeout(function(){_s._flush(paramObj.mk);},_t);}};QZONE.FrontPage.getPortraitList._flush=function(mk){var _s=QZONE.FrontPage.getPortraitList;_s._requesting=true;_s._do(_s._flushFn,mk);};QZONE.FrontPage.getPortraitList._flushFn=function(){var fn,t,tmp,_s=QZONE.FrontPage.getPortraitList;t=_s._callbackFnQueue[0];if(t&&t.__FP_gpl_size&&!t.checked){QZONE.FrontPage.getPortraitType(t.__FP_gpl_list,arguments.callee,arguments.callee);t.checked=true;return;}
try{while(_s._callbackFnQueue.length>0){fn=_s._callbackFnQueue.shift();t={};for(var i=0,len=fn.__FP_gpl_list.length;i<len;++i){tmp=fn.__FP_gpl_list[i];t[tmp]=_s._portraitPool[tmp];if(fn.__FP_gpl_size){_s._portraitPool[tmp][0]=QZONE.FrontPage.getPURLByType(tmp,fn.__FP_gpl_size);}}
fn.__FP_gpl_list=null;delete fn.__FP_gpl_list;if(fn){fn(t);}}}catch(ign){}finally{_s._toGet=_s._callbackFnQueue=null;_s._toGet={};_s._callbackFnQueue=[];}};QZONE.FrontPage.getPortraitList._do=function(callback,mk){var _s=QZONE.FrontPage.getPortraitList,l=[],tmp;for(var k in _s._toGet){l.push(k-0);}
if(l.length>0&&typeof(callback)=="function"){tmp=new QZFL.JSONGetter("http://"+g_R_Domain+"/fcg-bin/cgi_get_score.fcg",null,{uins:l.join(","),mask:mk},"gb2312");tmp.onSuccess=function(o){var t;if(o){for(var k in o){if(!(t=_s._portraitPool[k])){_s._portraitPool[k]=o[k];}else{for(var i=0;i<7;++i){if(i==1){if(t[i]==0){t[i]=o[k][i];}}else if(o[k][i]!=-1&&t[i]==-1){t[i]=o[k][i];}}}}
_s._requesting=false;callback(o);}};tmp.onError=function(o){_s._requesting=false;if(typeof(pgvMainV5)=="function"){pgvMainV5("homeact.qzone.qq.com","portrait_net_error");}
callback({});};tmp.send("portraitCallBack");}};QZONE.FrontPage.getPortraitList._portraitPool={};QZONE.FrontPage.getPortraitList._callbackFnQueue=[];QZONE.FrontPage.getPortraitList._toGet={};QZONE.FrontPage.getPortraitList._MAX_NUM=9;QZONE.FrontPage.getPortraitList._TIME_OUT=1000;QZONE.FrontPage.getPortraitList._timer=null;QZONE.FrontPage.getPortraitList._requesting=false;QZONE.FrontPage.getRemarkList=function(callback){if(typeof(callback)!="function"){return;}
var p=QZONE.FrontPage.getRemarkList,_jg,sUrl="http://"+g_Base_Domain+"/cgi-bin/feeds/get_remarks_cgi",uID="getRemarks",data={uin:g_iLoginUin};if(p._data){setTimeout(function(){callback(p._data);},0);return;}
_jg=new QZFL.JSONGetter(sUrl,uID,data,'gb2312');_jg.addOnSuccess(function(o){if(o){p._data=o;callback(o);}});_jg.addOnError(function(o){p._data={};callback(o);});_jg.send('_Callback');};QZONE.FrontPage.getRemarkList._data=null;QZONE.FrontPage.presentRemark=function(dom){if(!ownermode){return;}
var p=QZONE.FrontPage.presentRemark,data=ENV.get("Friend_Remarks");if(data){p._present(dom,data);}else{p._queue.push(dom);QZONE.FrontPage.getRemarkList(p._callback);}};QZONE.FrontPage.presentRemark._callback=function(o){if(!o){return;}
var p=QZONE.FrontPage.presentRemark,data=ENV.get("Friend_Remark"),d;if(!data){ENV.set("Friend_Remark",o);}
while(p._queue.length>0){d=p._queue.shift();if(d){p._present(d,o);}}};QZONE.FrontPage.presentRemark._present=function(dom,o){var r,els=QZFL.dom.getElementsByClassName("q_des","a",dom),uin,re=/.*des_(\d{5,10}).*/,tmp;for(var i=0;i<els.length;i++){if(tmp=re.exec(els[i].getAttribute("link"))){uin=parseInt(tmp[1],10);if(uin==g_iLoginUin){continue;}
r=o[uin];if(r&&(trim(r)!="")){els[i].innerHTML=escHTML(r);QZFL.css.addClassName(els[i],"c_tx");}}}};QZONE.FrontPage.presentRemark._queue=[];QZONE.FrontPage.getPortraitType=function(arrUin,callback,errorCallback){if(!arrUin||!arrUin.length){return;}
var c=QZONE.FrontPage.getPortraitType._cache,tl=[],res={};for(var i=0,len=arrUin.length;i<len;++i){if(c[arrUin[i]]===undefined){tl.push(arrUin[i]);}else{res[arrUin[i]]=c[arrUin[i]];}}
if(tl.length){var jg=new QZFL.JSONGetter('http://qzonebit.store.qq.com/qlogo_list.cgi',undefined,{count:tl.length,uins:tl.join(',')},'utf-8');jg.addOnSuccess(function(data){if(!data){if(typeof(errorCallback)=="function"){errorCallback();}}
for(var k in data){c[k]=data[k];}
if(typeof(callback)=='function'){callback(data);}});jg.addOnError(function(){if(typeof(errorCallback)=="function"){errorCallback();}});jg.send();}else{if(typeof(callback)=="function"){setTimeout(function(){callback(res);},0);}}};QZONE.FrontPage.getPortraitType._cache={};QZONE.FrontPage.getMedals=function(uin,callback,appid,opts){uin=uin||g_iUin;callback=callback||QZFL.emptyFn;appid=appid||0;opts=opts||{};var _s=QZONE.FrontPage.getMedals,t=new QZFL.JSONGetter("http://"+g_Main_Domain+"/cgi-bin/medalinfo/cgi_user_medal_get_list","medalGetter",{nuin:uin,nappid:appid,nnum:0,sds:Math.random()},"utf-8");t.addOnSuccess(function(o){_s._callbackHandler(o,uin,appid,callback,opts.errorCallback);});if(typeof(opts.errorCallback)=="function"){t.addOnError(opts.errorCallback);}
t.send("_Callback");};QZONE.FrontPage.getMedals._db=QZONE.FrontPage.getMedals._index=null;QZONE.FrontPage.getMedals._iconURLHandler=function(icurl,resl){if(typeof(resl)!="number"){resl=50;}
return(icurl.replace(/\.(gif|png|jpg|jpeg)$/i,"_"+resl+".$1"));};QZONE.FrontPage.getMedals._callbackHandler=function(od,uin,aid,cb,ecb){var _s=QZONE.FrontPage.getMedals,t,y,x;if(!od||od.error){if(typeof(ecb)=="function"){ecb(od.error);}
return;}
_s._db=od;y=_s._index={};for(var i=0,len=_s._db.length;i<len;++i){if(t=_s._db[i]){if(!y[x=t._app_id]){y[x]={};}
y[x][t._medal_id]=t;t.icon16=_s._iconURLHandler(t._medal_icon,16);t.icon60=_s._iconURLHandler(t._medal_icon,60);}}
cb(_s._index);};if(typeof(window.TCISD)=="undefined"){window.TCISD={};}
TCISD.pv=function(sDomain,path,opts){setTimeout(function(){TCISD.pv.send(sDomain,path,opts);},0);};TCISD.pv.send=function(sDomain,path,opts){sDomain=sDomain||location.hostname||"-";path=path||location.pathname;opts=opts||{};opts.referURL=opts.referURL||document.referrer;var t,d,r,_s=TCISD.pv;t=opts.referURL.split(_s._urlSpliter);t=t[0];t=t.split("/");d=t[2]||"-";r="/"+t.slice(3).join("/");opts.referDomain=opts.referDomain||d;opts.referPath=opts.referPath||r;t=document.cookie.match(_s._cookieP);if(t&&t.length&&t.length>1){d=t[1];}else{d=(Math.round(Math.random()*2147483647)*(new Date().getUTCMilliseconds()))%10000000000;document.cookie="pvid="+d+"; path=/; domain=qq.com; expires=Sun, 18 Jan 2038 00:00:00 GMT;";}
t=[_s.config.webServerInterfaceURL,"?cc=-&ct=-&java=1&lang=-&pf=-&scl=-&scr=-&tt=-&tz=-8&vs=3.3&","dm=",sDomain,"&","url=",encodeURIComponent(path),"&","rdm=",opts.referDomain,"&","rurl=",encodeURIComponent(opts.referPath),"&","pvid=",d,"&","sds=",Math.random()];QZFL.pingSender(t.join(""),opts.timeout);};TCISD.pv._urlSpliter=/[\?\#]/;TCISD.pv._cookieP=/(?:^|;+|\s+)pvid=([^;]*)/i;TCISD.pv.config={webServerInterfaceURL:"http://pingfore.qq.com/pingd"};/*  |xGv00|8fcdb7053535e85cfcdc741a35229392 */