var int_mh_id=0;var int_login_id=0;var str_mh_name="";var str_return_path="";var ui_parent_x=0;var ui_parent_y=0;var ui_child1_x=0;var ui_child1_y=0;var ui_child2_x=0;var ui_child2_y=0;var ui_child3_x=0;var ui_child3_y=0;var ui_child4_x=0;var ui_child4_y=0;var org_parent;var org_element;var org_event_onclick;var org_element_index;var parent_obj;var span_tag;var str_login_msg="\u8acb\u767b\u5165\u5f8c\u4f7f\u7528";var str_msg_buddy_friend_id_none="\u8a72Cyworld\u6703\u54e1\u4e0d\u5b58\u5728.";var str_msg_buddy_self="\u4f60\u4e0d\u80fd\u5c07\u81ea\u5df1\u52a0\u5165\u9ebb\u5409.";var str_msg_buddy_end_self="\u60a8\u4e0d\u80fd\u548c\u81ea\u5df1e\u5200\u5169\u65b7.";var str_msg_memo_send_self="\u60a8\u4e0d\u80fd\u5c07\u7559\u8a00\u767c\u9001\u7d66\u81ea\u5df1.";var str_msg_memo_end_self="\u60a8\u4e0d\u80fd\u963b\u6b62\u81ea\u5df1\u7d66\u81ea\u5df1\u7684\u7559\u8a00.";function chk_broswer(){if(navigator.appName.indexOf("Microsoft")!=-1){return (true);}else{return (false);}}function showControl(_1){if(_1.overFlag){var i;for(i=0;i<_1.overFlag.length;++i){_1.overFlag[i].style.visibility="";}}_1.overFlag=null;}function hideControl(_3,_4){if(document.all){var x=util.cmGetX(_4);var y=util.cmGetY(_4);var w=_4.offsetWidth;var h=_4.offsetHeight;var i;for(i=0;i<document.all.tags(_3).length;++i){var _a=document.all.tags(_3)[i];if(!_a||!_a.offsetParent){continue;}var ox=util.cmGetX(_a);var oy=util.cmGetY(_a);var ow=_a.offsetWidth;var oh=_a.offsetHeight;if(ox>(x+w)||(ox+ow)<x){continue;}if(oy>(y+h)||(oy+oh)<y){continue;}if(_a.style.visibility=="hidden"){continue;}if(!_4.overFlag){_4.overFlag=new Array();}_4.overFlag[_4.overFlag.length]=_a;if(_3=="IFRAME"){if(_a.name=="mh_buddy"||_a.name=="actionFrame"||_a.name=="my_buddy"){_a.style.visibility="hidden";}}else{_a.style.visibility="hidden";}}}}if(Prototype&&document.observe){document.observe("click",MouseClick);}else{if(chk_broswer()==true){window.document.onclick=MouseClick;}else{window.onclick=MouseClick;}}function viewNameUI(e,_10,_11,_12,_13,_14){if((_11==0)||(_11=="")){int_login_id=login_id;}else{int_login_id=_11;}clearNameUI("parent");try{if(document.domain=="tw.cyworld.com"){if(top.document.getElementById("ps_main")){top.clearNameUI("parent");top.ps_main.clearNameUI("parent");}}}catch(e){}if(e.stopPropagation){e.stopPropagation();e.preventDefault();srcElement=e.target;}else{e.returnValue=false;e.cancelBubble=true;srcElement=e.srcElement;}try{if(srcElement.getAttribute("id")!="SubMenuBtn"){if($("Bubble_Menu")){$("Bubble_Menu").hide();}}}catch(e){}org_event_onclick=srcElement.onclick;parent_obj=srcElement.parentNode;for(kk=0;kk<parent_obj.childNodes.length;kk++){if(parent_obj.childNodes[kk]==srcElement){org_element_index=kk;break;}}if(_14){span_tag=top.ps_navi.document.createElement("span");}else{span_tag=document.createElement("span");}span_tag.style.fontWeight="bold";span_tag.appendChild(srcElement.cloneNode(true));if(parent_obj.hasChildNodes()){parent_obj.insertBefore(span_tag,parent_obj.childNodes[kk]);parent_obj.removeChild(parent_obj.childNodes[kk+1]);}else{parent_obj.appendChild(span_tag);}span_tag.onclick=srcElement.onclick;if(_10==""){alert("\u6c92\u6709\u8a72Cyworld\u6703\u54e1");return;}if(_10<"2000010000"){return;}getProfileStart(_10);int_mh_id=_10;str_mh_name=_12;str_return_path=_13;ui_parent_x=e.clientX+10;ui_parent_y=e.clientY+5;if(document.compatMode=="BackCompat"){ui_parent_y+=document.body.scrollTop;}else{if(document.compatMode!="BackCompat"){ui_parent_y+=document.documentElement.scrollTop;}}var _15=document.getElementById("ui_parent");_15.style.display="inline";_15.style.left=ui_parent_x+"px";_15.style.top=ui_parent_y+"px";if(document.compatMode=="BackCompat"){if(ui_parent_x+_15.offsetWidth>document.body.scrollLeft+document.body.clientWidth){ui_parent_x=document.body.scrollLeft+document.body.clientWidth-_15.offsetWidth;}}else{if(document.compatMode!="BackCompat"){if(ui_parent_x+_15.offsetWidth>document.documentElement.scrollLeft+document.documentElement.clientWidth){ui_parent_x=document.documentElement.scrollLeft+document.documentElement.clientWidth-_15.offsetWidth;}}}obj_msn=document.getElementById("msn_content");obj_maji_network=document.getElementById("maji_network");if(obj_msn&&obj_msn.style.display=="inline"){if(ui_parent_x+_15.offsetWidth>755){ui_parent_x=655;}}if(obj_maji_network&&obj_maji_network.style.top=="1px"){if(ui_parent_x+_15.offsetWidth>755){ui_parent_x=740;}if(e.clientX>=680&&e.clientX<=710){ui_parent_x=700;}}if(ui_parent_x<0){ui_parent_x=0;}if(_14){ui_parent_y=ui_parent_y+360;ui_child1_y=ui_parent_y+30+400+52;ui_child2_y=ui_parent_y+50+400+52;ui_child3_y=ui_parent_y+50+400+52;ui_child4_y=ui_parent_y+50+400+52;}if(document.compatMode=="BackCompat"){if(ui_parent_y+_15.offsetHeight>document.body.scrollTop+document.body.clientHeight){ui_parent_y=document.body.scrollTop+document.body.clientHeight-_15.offsetHeight-56;}}else{if(document.compatMode!="BackCompat"){if(ui_parent_y+_15.offsetHeight>document.documentElement.scrollTop+document.documentElement.clientHeight){ui_parent_y=document.documentElement.scrollTop+document.documentElement.clientHeight-_15.offsetHeight-56;}}}if(ui_parent_y<0){ui_parent_y=0;}ui_child1_x=ui_parent_x+111;ui_child1_y=ui_parent_y+30;ui_child2_x=ui_parent_x+111;ui_child2_y=ui_parent_y+50;ui_child3_x=ui_parent_x+111;ui_child3_y=ui_parent_y+10;ui_child4_x=ui_parent_x+111;ui_child4_y=ui_parent_y+80;ui_child1_x-=18;ui_child1_y+=52;ui_child2_x-=18;ui_child2_y+=52;ui_child3_x-=18;ui_child3_y+=52;ui_child4_x-=18;ui_child4_y+=52;_15.style.left=ui_parent_x+"px";_15.style.top=ui_parent_y+"px";if(navigator.appName.indexOf("Microsoft")!=-1){hideControl("IFRAME",ui_parent);hideControl("SELECT",ui_parent);}return false;}function viewNameUIxhtml(e,_17,_18,_19,_1a,_1b){viewNameUI(e,_17,_18,_19,_1a,_1b);return;}function viewChildNameUI(_1c){clearNameUI("child");if(_1c=="ui_child1"){document.getElementById("ui_child1").style.display="inline";document.getElementById("ui_child1").style.left=ui_child1_x+"px";document.getElementById("ui_child1").style.top=ui_child1_y+"px";chk_obj=document.getElementById("ui_child1");}else{if(_1c=="ui_child2"){document.getElementById("ui_child2").style.display="inline";document.getElementById("ui_child2").style.left=ui_child2_x+"px";document.getElementById("ui_child2").style.top=ui_child2_y+"px";chk_obj=document.getElementById("ui_child2");}else{if(_1c=="ui_child3"){document.getElementById("ui_child3").style.display="inline";document.getElementById("ui_child3").style.left=ui_child3_x+"px";document.getElementById("ui_child3").style.top=ui_child3_y+"px";chk_obj=document.getElementById("ui_child2");}else{if(_1c=="ui_child4"){document.getElementById("ui_child4").style.display="inline";document.getElementById("ui_child4").style.left=ui_child4_x+"px";document.getElementById("ui_child4").style.top=ui_child4_y+"px";chk_obj=document.getElementById("ui_child4");}}}}if(navigator.appName.indexOf("Microsoft")!=-1){hideControl("IFRAME",chk_obj);hideControl("SELECT",ui_parent);}}function clearNameUI(_1d){if(_1d=="parent"){if(span_tag){span_tag.style.fontWeight="normal";span_tag.onclick=org_event_onclick;}if(document.getElementById("ui_parent")){document.getElementById("ui_parent").style.display="none";}if(document.getElementById("ui_child1")){document.getElementById("ui_child1").style.display="none";}if(document.getElementById("ui_child2")){document.getElementById("ui_child2").style.display="none";}if(document.getElementById("ui_child3")){document.getElementById("ui_child3").style.display="none";}if(document.getElementById("ui_child4")){document.getElementById("ui_child4").style.display="none";}if(navigator.appName.indexOf("Microsoft")!=-1){}}else{if(_1d=="child"){if(document.getElementById("ui_child1")){document.getElementById("ui_child1").style.display="none";}if(document.getElementById("ui_child2")){document.getElementById("ui_child2").style.display="none";}if(document.getElementById("ui_child3")){document.getElementById("ui_child3").style.display="none";}if(document.getElementById("ui_child4")){document.getElementById("ui_child4").style.display="none";}}}}function linkNameUI(key){if(str_return_path==""){str_return_path="/main/index.php";}switch(key){case "p_1":util.open_minihompy(""+int_mh_id+"",""+int_login_id+"");break;case "p_2":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_mh_id==null||int_mh_id==""){alert(""+str_msg_buddy_friend_id_none+"");return;}strUrl="/mall/gift_send_for_one.php?recive_id="+int_mh_id+"&recive_name="+str_mh_name;strName="GiftWinForOne";WinWidth=900;WinHeight=600;ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";util.WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);break;case "p_2_1":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_mh_id==null||int_mh_id==""){alert(""+str_msg_buddy_friend_id_none+"");return;}strUrl="/mycyworld/giftbox/index.php?box_section_type=wish_maji&maji_id="+int_mh_id+"&maji_name="+str_mh_name;strName="GiftWinForOne";WinWidth=900;WinHeight=600;ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";util.WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);break;case "p_3":strUrl="/ps/ps_bbs_divide_proc.php?mh_id="+int_mh_id+"&menuid=11";util.open_minihompy(""+int_mh_id+"",""+int_login_id+"",""+strUrl);break;case "p_4":strUrl="/ps/ps_bbs_divide_proc.php?mh_id="+int_mh_id+"&menuid=10";util.open_minihompy(""+int_mh_id+"",""+int_login_id+"",""+strUrl);break;itemGift("{{$TPL_arr_cake[1]}}",0,0,"{{$TPL_str_secure[1]}}","1");case "c1_1":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_buddy_self+"");return;}if(int_mh_id==null||int_mh_id==""){alert(""+str_msg_buddy_friend_id_none+"");return;}util.OpenNameUIPublic("WinBuddyMake","?login_id="+int_login_id+"&mh_id="+int_mh_id+"");break;case "c1_2":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_buddy_self+"");return;}if(int_mh_id==null||int_mh_id==""){alert(""+str_msg_buddy_friend_id_none+"");return;}util.OpenNameUIPublic("WinBuddyNameChange","?login_id="+int_login_id+"&mh_id="+int_mh_id+"&mh_name="+str_mh_name+"");break;case "c1_3":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_buddy_end_self+"");return;}if(confirm("\u78ba\u5b9a\u8981\u65b7\u7d55\u9ebb\u5409\u95dc\u4fc2\u55ce\uff1f")){try{if(document.domain=="tw.cyworld.com"){if(top.ps_main){str_return_path=escape(top.ps_main.document.location.href);}}}catch(e){}util.go_url("iframe","/main/buddy_invite_proc.php?hidMode=BuddyInviteDel&hidReturnURL="+str_return_path+"&mh_id="+int_mh_id+"");}break;case "c2_1":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_memo_send_self+"");return;}util.OpenNameUIPublic("WinMemoSend","?login_id="+int_login_id+"&send_cyid="+int_mh_id+"&hidSendName="+str_mh_name+"");break;case "c2_2":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_memo_send_self+"");return;}util.OpenNameUIPublic("WinMemoSend","?login_id="+int_login_id+"&send_cyid="+int_mh_id+"&hidSendName="+str_mh_name+"&hidMode=Invite");break;case "c2_3":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(int_login_id==int_mh_id){alert(""+str_msg_memo_end_self+"");return;}util.go_url("b","/main/memo_setup_proc.php?hidMode=Reject&hidReturnURL="+str_return_path+"&ChkValues="+int_mh_id+"&hidFriendName="+str_mh_name);break;case "hi1_1":if(int_login_id=="0"||int_login_id==""){alert(""+str_login_msg+"");return;}if(typeof (pageStatistics)=="function"){pageStatistics(2112);}util.WinOpen("/ps/sns/simpleGreetingView.php?mh_id="+int_mh_id+"&type=1","Greeting",360,180,"no","no","Normal","");break;default:break;}}function mouseClickCapture(e){e=e?e:event;}function MouseClick(e){e=e?e:event;var _21=e.srcElement?e.srcElement:e.target;var _22=["LinkStyle_name","LinkStyle_nameBoy","LinkStyle_nameGirl","Name","name","NameUI","NameUI_Boy","NameUI_Girl"];if(_22.indexOf(_21.className)!=-1&&(_21).getAttribute("_mh_id")&&(_21).getAttribute("_mh_name")){var _23=$(_21).getAttribute("_mh_id");var _24=encodeURIComponent($(_21).getAttribute("_mh_name"));var _25=$(_21).getAttribute("_rtn_url");e.cancelBubble=true;return viewNameUI(e,_23,Cytw.env.login_id,_24,_25);}if(chk_broswer()==true){current_x=e.clientX;current_y=e.clientY;current_y=current_y+document.body.scrollTop;}else{current_x=e.clientX;current_y=e.clientY;}if(document.getElementById("ui_parent")){if(document.getElementById("ui_parent").style.display!="none"){if(!(((ui_parent_x-30)<current_x&&current_x<(ui_parent_x+140))&&((ui_parent_y-20)<current_y))){obj_msn=document.getElementById("msn_content");obj_maji_network=document.getElementById("maji_network");if((obj_msn&&obj_msn.style.display=="inline")||(obj_maji_network&&obj_maji_network.style.top=="1px")){if((current_x<(ui_parent_x+140))&&!((ui_parent_x-30)<current_x)||(ui_parent_x!=655&&ui_parent_x!=740)){clearNameUI("parent");}}else{clearNameUI("parent");}}}}try{if(document.domain=="tw.cyworld.com"){if(top.document.getElementById("ps_main")){top.clearNameUI("parent");}}}catch(e){}try{if(_21.getAttribute("id")!="SubMenuBtn"){$("Bubble_Menu").hide();}}catch(e){}}function getProfileStart(_26){var _27="mh_id="+_26;document.getElementById("ui_profile").innerHTML="";document.getElementById("ui_newphoto").innerHTML="";document.getElementById("ui_newdiary").innerHTML="";document.getElementById("ui_hpnewupdate").innerHTML="";var _28="<img src=\"http://img.tw.cyworld.com/n_image/common/icon/ic_new_small.gif\" alt=\"New\" \\>";if($("MH_LoadingBlock")){$("MH_LoadingBlock").setAttribute("_dont_show",1);}new Ajax.Request("/ps/get_profile_image.php",{method:"get",parameters:_27,onComplete:function(_29){xml=_29.responseXML;if(xml){var _2a=xml.documentElement.getElementsByTagName("HompyImage")[0].firstChild.nodeValue;var _2b=xml.documentElement.getElementsByTagName("NewPhotoYN")[0].firstChild.nodeValue;var _2c=xml.documentElement.getElementsByTagName("NewDiaryYN")[0].firstChild.nodeValue;var _2d=xml.documentElement.getElementsByTagName("Relation")[0].firstChild.nodeValue;document.getElementById("ui_profile").innerHTML=_2a;if(_2b=="Y"){document.getElementById("ui_newphoto").innerHTML=_28;document.getElementById("ui_hpnewupdate").innerHTML=_28;}if(_2c=="Y"){document.getElementById("ui_newdiary").innerHTML=_28;document.getElementById("ui_hpnewupdate").innerHTML=_28;}var _2e=document.getElementById("BuddyLineTr");var _2f=document.getElementById("BuddyTr");var _30=document.getElementById("BuddyTd");if(_2d=="0"){_30.onmouseover=function(){this.className="over_color";clearNameUI("child");};_30.onmouseout=function(){this.className="down_color";};_30.innerHTML="<span style=\"cursor:hand;\" onclick=\"linkNameUI('c1_1')\" class=\"dark03 nu\">\u7d50\u9ebb\u5409</span>";_2e.style.display="inline";_2e.style.visibility="visible";_2f.style.display="inline";_2f.style.visibility="visible";}else{if(_2d=="1"){_30.onmouseover=function(){this.className="over_color2";viewChildNameUI("ui_child1");};_30.onmouseout=function(){this.className="down_color";};_30.innerHTML="<span class=\"dark03 nu\" style=\"cursor:hand;\">\u9ebb\u5409</span>";_2e.style.display="inline";_2e.style.visibility="visible";_2f.style.display="inline";_2f.style.visibility="visible";}else{_30.onmouseover=function(){this.className="over_color2";viewChildNameUI("ui_child1");};_30.onmouseout=function(){this.className="down_color";};_30.innerHTML="<span class=\"dark03 nu\" style=\"cursor:hand;\">\u9ebb\u5409</span>";_2e.style.display="none";_2e.style.visibility="hidden";_2f.style.display="none";_2f.style.visibility="hidden";}}}}});}
