function af_addfriend(a,b,c,e,d){if(window.g_im_vuid){d=typeof d=="undefined"||d==""?"":"&"+d;c="\u8bf7\u6c42\u52a0"+(c=="0"?"\u4ed6":"\u5979")+"\u4e3a\u597d\u53cb";if(b==2)c="\u8bf7\u6c42\u6210\u4e3a\u7c89\u4e1d";var f=420,g=280;if(e==1||e==3){f=330;g=150}else if(b>0){f=480;g=290}openWindow("/friend/new.php?touid="+a+d,f,g,c)}else window.location="/login/?flag=1&url="+encodeURIComponent(window.location.pathname+window.location.search)}
af_addfriend.doAfterClose=function(){typeof af_addfriend.callback_afterClose=="function"&&af_addfriend.callback_afterClose()};
function af_addverify_do(a,b,c,e,d,f){if(b.length==0){alert("\u8bf7\u8f93\u5165\u597d\u53cb\u8bf7\u6c42\u9644\u8a00\uff01");return false}if(c!=undefined&&c.length>0&&e.length==0){alert("\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801\uff01");return false}document.addverifyform.touid.value=a;document.addverifyform.content.value=b;document.addverifyform.rcode.value=c;document.addverifyform.code.value=e;document.addverifyform.usercode.value=d;document.addverifyform.email.value=f;document.addverifyform.submit()}
function af_delfriend(a,b,c,e){var d="\u5220\u9664\u597d\u53cb";if(c!=undefined&&c==2)d="\u65ad\u5f00\u7c89\u4e1d";af_delfriend_do.callback=e;openWindow("/friend/del_dialog.php?touid="+a+"&start="+b,440,200,d)}
function af_delfriend_do(a,b,c,e){Kx.LocalStorage&&Kx.LocalStorage.support()&&Kx.LocalStorage.del("suggestiondata");if(typeof af_delfriend_do.callback!="function"){document.delfriendform.touid.value=a;document.delfriendform.start.value=b;document.delfriendform.ref.value=window.location;document.delfriendform.submit()}else{a="touid="+encodeURIComponent(a)+"&start="+encodeURIComponent(b)+"&ref="+encodeURIComponent(window.location)+"&ajax=1&rcode="+encodeURIComponent(c)+"&code="+encodeURIComponent(e);
var d=$j.ajax({url:"/friend/del.php",type:"post",data:a,success:function(){af_delfriend_do.callback(d)}})}}
function af_addform(a){document.write("<div>");document.write('<form name=addverifyform action="/friend/addverify.php" method=post>');document.write('<input type=hidden name=from value="'+a+'">');document.write('<input type=hidden name=touid value="">');document.write('<input type=hidden name=content value="">');document.write('<input type=hidden name=rcode value="">');document.write('<input type=hidden name=code value="">');document.write('<input type=hidden name=usercode value="">');document.write('<input type=hidden name=email value="">');
document.write('<input type=hidden name=bidirection value="">');document.write("</form>");document.write("</div>")}function af_editFriend(a){openWindow("/friend/editfriend_dialog.php?from=self&fuid="+a,390,301,"\u597d\u53cb\u5c5e\u6027")}function starfriends_add(a,b){var c="touid="+a+"&quick=1";if(typeof b!="undefined")c+="&from="+b;$j.ajax({url:"/friend/addverify.php",type:"post",data:c,success:function(e){ajax_show_starfriends_add_ok(e)}})}
function ajax_show_starfriends_add_ok(a){a=$j.parseJSON(a);var b=a.uid,c=a.content;a.type==0?$j("#addfriend_"+b).html('<div style="margin-right: 6px;" class="r"><span class="c9" >\u4f60\u5df2\u662f\u597d\u53cb</span></div>'):$j("#addfans_"+b).html('<div style="margin-right: 6px;" class="r"><span class="c9" >\u4f60\u5df2\u662f\u7c89\u4e1d</span></div>');$j("#div_add_ok_"+b).html('<img src="http://img1.kaixin001.com.cn/i/fzcg_dh.gif"class="l" /><div class="l ml10">'+c+"</div>").show();starfriend_fade("div_add_ok_"+
b)}var starfriend_timer=null,starfriend_ele_a=starfriend_ele_b=null,starfriend_wait=0;function starfriend_fade(a){if(starfriend_ele_a=document.getElementById(a)){if(document.all)starfriend_ele_a.filters.alpha.opacity=100;else starfriend_ele_a.style.opacity=1;starfriend_ele_a.style.zIndex=1;starfriend_fade_opacity()}}
function starfriend_fade_opacity(){starfriend_wait+=1;if(starfriend_wait>20){var a=false;if(document.all)if(starfriend_ele_a.filters.alpha.opacity>0)starfriend_ele_a.filters.alpha.opacity-=5;else a=true;else if(starfriend_ele_a.style.opacity>0)starfriend_ele_a.style.opacity-=0.05;else a=true;if(a==true)window.clearTimeout(starfriend_timer);else starfriend_timer=setTimeout(function(){starfriend_fade_opacity()},100)}else starfriend_timer=setTimeout(function(){starfriend_fade_opacity()},100)};

