function gotoRepaste(){parent.window.location.href="/!repaste/repaste.php"}function gotoFriend(){parent.window.location.href="/!repaste/friend.php"}function showRepasteSWF(a,c,b,d,e){a='<embed allowscriptaccess="never" allownetworking="internal" src="'+a+'" '+(d?'height="'+d+'"':'height="400"')+"  "+(b?'width="'+b+'"':'width="480"')+'  type=application/x-shockwave-flash wmode="transparent" loop="false" flashvars="'+e+'" autostart="false">';$j("#repasteswf"+c).html(a)}
function showOtherUrlView(a,c){checkfriendwebsite(a,c)}function checkfriendwebsite(a,c){var b="aid=1088&url="+encodeURIComponent(a);$j.ajax({type:"POST",url:"/interface/checkfriendwebsite.php",data:b,success:function(d){d!=1&&s(c)}});return true}function gotoDetail(a,c){parent.window.location.href="/!repaste/detail.php?uid="+a+"&urpid="+c+"&rand="+Math.random()}function gotoIndex(a){parent.window.location.href="/!repaste/index.php?uid="+a}
function repasteVote(a,c,b,d,e,f,g){if(!window.g_im_vuid){alert("\u8bf7\u767b\u5f55\u540e\u518d\u8fdb\u884c\u64cd\u4f5c");return false}if(e==1)alert("\u6bcf\u4eba\u53ea\u80fd\u8868\u8fbe\u4e00\u6b21\u4e92\u52a8\u89c2\u70b9\u3002\u4f60\u5df2\u7ecf\u8868\u8fbe\u8fc7\u4e86\uff01");else parent.window.location.href="/repaste/vote_submit.php?urpid="+c+"&verify="+b+"&voteuid="+a+"&answernum="+d+"&suid="+f+"&surpid="+g}
function showAddViewpointDlg(a,c){openWindow("/repaste/add_viewpoint_dialog.php?vtype="+a+"&do=start&verify="+c,410,360,"\u8f6c\u5e16")}function showSetPrivacyDlg(a,c,b){openWindow("/repaste/set_privacy_dialog.php?vtype="+a+"&do=start&verify="+c+"&rpid="+b,450,293,"\u8f6c\u5e16")}function showNotifyDlg(a,c,b){openWindow("/repaste/notify_friend_dialog.php?urpid="+c+"&do=start&verify="+a+"&rpid="+b,400,225,"\u8f6c\u5e16")}
function gotoRepastePhotoView(a,c,b){var d=0;if($("exif")&&$("exif").style.display=="")d=1;parent.window.location.href="/!repaste/photo_view.php?urpid="+c+"&uid="+a+"&pid="+b+"&showexif="+d;return false}function delRepaste(a,c){if(confirm("\u4f60\u786e\u5b9a\u8981\u5220\u9664\u8be5\u8f6c\u5e16\u5185\u5bb9\u5417?"))parent.window.location.href="/repaste/del_submit.php?urpid="+a+"&verify="+c}var otherfriend_display=false;
function viewOtherFriendRepaste(){$("xx_sh").innerHTML='<img src="http://img1.kaixin001.com.cn/i/xx_xx1.gif" class="cp" onmouseover="this.src=\'http://img1.kaixin001.com.cn/i/xx_xx2.gif\';" onmouseout="this.src=\'http://img1.kaixin001.com.cn/i/xx_xx1.gif\';" alt="\u9009\u62e9\u597d\u53cb" />';$("fsg_nr").style.display="none";if(otherfriend_display==false){otherfriend_display=true;doAjaxOtherFriend()}else if(otherfriend_display==true){otherfriend_display=false;$("otherfriendrepaste").style.display=
"none"}}function doAjaxOtherFriend(){new Ajax.Request("/interface/appfriend.php",{method:"post",parameters:"aid=1088",onComplete:function(a){otherAjaxShow(a,"/!repaste/index.php")}})}
function otherAjaxShow(a,c){eval("r="+a.responseText);for(var b="",d=0;d<r.length;d++)b+='<div class="bb1d8"><a style="cursor:pointer;" class="sl2_r" href="'+c+"?uid="+r[d].uid+'"><div class="l" style="width:5em;">'+r[d].name+'</div><div class="l" style="width:3em;">('+r[d].index_num+')</div><div class="l" style="width:2em;">&gt;&gt;</div><div class="c"></div></a></div>';if(r.length==0)b+='<div class="p5 c9">\u4f60\u7684\u597d\u53cb\u8fd8\u6ca1\u6709\u6dfb\u52a0\u8fc7\u8be5\u7ec4\u4ef6</div>';$("NM_lis").innerHTML=
b;$("otherfriendrepaste").style.display="block"}function f2_afterseluid(a){gotoUser(a)}function fs2_superOnclick_repaste(){otherfriend_display=false;$("otherfriendrepaste").style.display="none";fs2_superOnclick()}function fs2_viewAllfriend_repaste(){otherfriend_display=false;$("otherfriendrepaste").style.display="none";fs2_viewAllfriend()}function close_otherfriend(){otherfriend_display=false;$("otherfriendrepaste").style.display="none"}
function gotoUser(a){new Ajax.Request("/repaste/check.php",{method:"post",parameters:"verify="+g_verify+"&fuid="+a,onComplete:function(c){gotouserAjaxShow(c)}})}function gotouserAjaxShow(a){eval("r="+a.responseText);if(r.appinstall==1)window.location.href="/repaste/index_"+r.uid+".html";else alert(r.real_name+"\u8fd8\u6ca1\u6709\u6dfb\u52a0\u6b64\u7ec4\u4ef6\uff01")}var g_repaste_uinfo={};
function repaste_showComment(a,c,b,d){if(typeof d==="undefined")d=false;refresh("/!repaste/detail.php?uid="+a+"&urpid="+c+"&start"+b+"&_lgmode=pri"+(d?"#anchorcomment2":"#anchorcomment"))}function refresh(a){if(typeof a=="undefined"){for(a=window.location.href;a.substr(a.length-1,1)=="#";)a=a.substr(0,a.length-1);var c=a.lastIndexOf("&_lgmode=pri");window.location.href=a.substr(c,12)=="&_lgmode=pri"?a:a+"&_lgmode=pri"}else window.location.href=a}
function searchBoxFocus(a){a=Event.element(a);if(a.value=="\u641c\u7d22\u6211\u7684\u8f6c\u5e16"||a.value=="\u641c\u7d22\u5168\u7ad9\u7684\u8f6c\u5e16")a.value="";a.style.color="#000"}function searchBoxBlur(a){a=Event.element(a);if(a.value=="")a.value="\u641c\u7d22\u5168\u7ad9\u7684\u8f6c\u5e16";a.style.color="#999"}function searchBoxKeyDown(a,c){a.keyCode==13&&tosearch(c)}
function tosearch(a,c){var b=a=="all"?"allkey":"key",d=$(b).value;if(d.trim()==""){alert("\u8bf7\u8f93\u5165\u8f6c\u5e16\u6807\u9898\u6216\u6b63\u6587\u5173\u952e\u8bcd");$(b).focus()}else if(d.trim()=="\u641c\u7d22\u6211\u7684\u8f6c\u5e16"||d.trim()=="\u641c\u7d22\u5168\u7ad9\u7684\u8f6c\u5e16"){$(b).value="";$(b).focus()}else{b=c?"/repaste/search.php?keyword="+encodeURIComponent(d)+"&scope="+a+"&nologin=1":"/!repaste/search.php?keyword="+encodeURIComponent(d)+"&scope="+a;parent.window.location.href=
b;return true}}function getStat(a,c,b,d){$j.ajax({type:"GET",url:"/!repaste/!click.php",data:"urpid="+a+"&uid="+c+"&flag="+d+"&lurl="+b,success:function(){}});return true}
function getRepasteFriends(a,c){$j.ajax({type:"GET",url:"/!repaste/!getrepastefriends.php",data:"rpid="+a+(!window.g_im_vuid?"&uid="+window.g_im_ouid:""),success:function(b){var d="";if(parseInt(b,10)===0)d="0\u4eba";else{eval("r="+b);for(b=0;b<r.repasterinfo.list.length;b++)d+='<a href="/home/'+r.repasterinfo.list[b].uid+'.html" class="sl2" title="'+r.repasterinfo.list[b].real_name+'">'+r.repasterinfo.list[b].short_name+"</a> ";if(r.rcount>2)d+=c?"\u7b49"+r.rcount+"\u4f4d\u597d\u53cb":"\u7b49"+r.rcount+
"\u4eba"}$j("#getrepastefriends").html(d)}});return true};

