var laySubmenu_HTML;var style_high_menu_src=new Array();style_high_menu_src[1]="http://img.tw.cyworld.com/image/main/ma_m_style01";style_high_menu_src[2]="http://img.tw.cyworld.com/image/main/ma_m_style02";style_high_menu_src[3]="http://img.tw.cyworld.com/image/main/ma_m_style03";style_high_menu_src[4]="http://img.tw.cyworld.com/image/main/ma_m_style04";style_high_menu_src[5]="http://img.tw.cyworld.com/image/main/ma_m_style05";var new_buy_miniroom_item_list="";function changeItemlist(_1,_2,_3,_4,_5){frm=document.frmItemmenu;if(_1=="category"){switch(_2){case (1):item_ele_name="middleMenu";frm.action="middlelist.php?section_type="+_4;break;case (2):item_ele_name="highMenu";frm.action="item_preview.php?section_type="+_4;break;default:item_ele_name="highMenu";frm.action="item_list_high.php?section_type="+_4;break;}if(_5){sub_item_ele_name="shop_id";}else{frm.elements["shop_id"].value="";}}else{switch(_2){default:item_ele_name="highMenu";frm.action="index.php";break;case (1):item_ele_name="shop_id";frm.action="item_list_shop.php";break;}if(_5){sub_item_ele_name="middleMenu";}}frm.elements["item_menu_view_style"].value=_1;if(_5){frm.elements[sub_item_ele_name].value=_5;}if(item_ele_name){frm.elements[item_ele_name].value=_3;}if(frm.elements[item_ele_name].value){frm.submit();}}function changeItemListByShop(_6,_7,_8,_9){frm=document.frmItemmenu_shop;frm.shop_id.value=_6;frm.highMenu.value=_7;frm.middleMenu.value=_8;frm.sort.value=_9;frm.submit();}function fncNameReflash(){var _a="";var _b="";if(window.opener.document.frmMemo.hidCyids.value==""){_a=window.opener.document.frmMemo.hidEmailNames.value;}else{if(window.opener.document.frmMemo.hidEmails.value==""){_a=window.opener.document.frmMemo.hidCyidNames.value;}else{_a=window.opener.document.frmMemo.hidCyidNames.value+","+window.opener.document.frmMemo.hidEmailNames.value;}}var _c=_a.split(",");if(_c.length>1){for(var i=0;i<_c.length;i++){_b+=_c[i]+";";}}else{_b=_a+";";}window.opener.document.frmMemo.txtSendName.value=_b;}function item_menu_view(_e){document.all.layMenuCategory.style.visibility="visible";document.all.layMenuCategory.style.zIndex=2;}function change_item_style_menu(_f){if(!_f){_f=1;}var _10=new Array("",".gif",".gif",".gif",".gif",".gif");_10[_f]="_on"+_10[_f];document.getElementById("style_high_menu_1").src=style_high_menu_src[1]+_10[1];document.getElementById("style_high_menu_2").src=style_high_menu_src[2]+_10[2];document.getElementById("style_high_menu_3").src=style_high_menu_src[3]+_10[3];document.getElementById("style_high_menu_4").src=style_high_menu_src[4]+_10[4];document.getElementById("style_high_menu_5").src=style_high_menu_src[5]+_10[5];document.getElementById("style_sub").innerHTML=document.getElementById("style_sub_"+_f).innerHTML;}function go_coupon_item_list(_11,_12){go_url="./middlelist.php?startpos=1&highMenu="+_11+"&middleMenu=0&sort=0";if(go_url){opener.location=go_url;opener.window.focus();window.close();}}function sortItemlist(_13){frm=document.frmItemmenu_category;frm.action=document.location;frm.sort.value=_13;if(frm.sort.value!=""){frm.submit();}}function itemlist_submenu_display(_14){if(document.all.laySubmenu.innerHTML!=""){laySubmenu_HTML=document.all.laySubmenu.innerHTML;}if(_14==0){document.all.laySubmenu.innerHTML="";}else{document.all.laySubmenu.innerHTML=laySubmenu_HTML;}}var item_win;function item_view(_15,_16,fn,_18){if(!fn){fn=document.frmItemView;}if(_15=="30"){strUrl="about:blank";frmAction="/mall/item_view_music.php";strName="itemViewwindow";WinWidth=441;WinHeight=215;ScrollBar=0;Resize="no";WinGubun="Center";strProperty="";}else{strUrl="about:blank";frmAction="/mall/item_view_ps.php";strName="itemViewwindow";WinWidth=932;WinHeight=725;ScrollBar=0;Resize="no";WinGubun="Center";strProperty="";}if(item_win){if(!item_win.closed&&typeof item_win.close=="function"){item_win.close();}}if(parent.frmHidden){recive_id=parent.frmHidden.document.getElementById("recive_id").value;recive_name=parent.frmHidden.document.getElementById("recive_name").value;frmAction=frmAction+"?FromWho="+recive_id+"&FromWhoName="+recive_name;}item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);var x=screen.width/2-WinWidth/2;var y=screen.height/2-WinHeight/2;fn.action=frmAction;fn.target="itemViewwindow";fn.intItemid.value=_16;fn.submit();}function pg_item_view(_1b,_1c){strUrl="/mall/pg_viewitem.php?store_type="+_1b+"&order_id="+_1c;strName="itemViewwindow";WinWidth=441;WinHeight=215;ScrollBar=0;Resize="no";WinGubun="Center";strProperty="";if(item_win){if(!item_win.closed){item_win.close();}}item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);var x=screen.width/2-WinWidth/2;var y=screen.height/2-WinHeight/2;}function pg_open(_1f,_20){switch(_1f){case "1":strUrl="/mall/pg_direct.php?store_type=1&itemid="+_20;strName="pg";WinWidth=830;WinHeight=screen.height;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="toolbar,menubar";break;}if(item_win){if(!item_win.closed){item_win.close();}}item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);}function myitem_go(_21){frm=document.frmMyitem;frm.myitem_area.value=_21;if(frm.myitem_area.value!=""){frm.submit();}}function cover_story_CMT_delete(_22){document.write("<form name=frmCoverStoryDelete method=post action='./coverstory_CMT_delete.php'>");document.write("<input type=hidden name=postid value="+_22+">");document.write("</form>");document.frmCoverStoryDelete.submit();}function buy_one(_23,_24){if(typeof (_24)=="undefined"){var _25=document.getElementsByName("ChkBox");}else{if(_24==1){var _25=document.getElementsByName("mini_room_ChkBox");}if(_24==2){var _25=document.getElementsByName("personacon_ChkBox");}}var _26=_25.length;if(!_26){_25.checked=true;}else{for(i=0;i<_26;i++){_25[i].checked=false;}_25[_23].checked=true;}if(typeof (_24)=="undefined"){item_buy_from_list(0);}else{if(_24==1){item_buy_from_list(0,1);}if(_24==2){item_buy_from_list(0,2);}}}function gift_one(_27,_28){if(typeof (_28)=="undefined"){var _29=document.getElementsByName("ChkBox");}else{if(_28==1){var _29=document.getElementsByName("mini_room_ChkBox");}if(_28==2){var _29=document.getElementsByName("personacon_ChkBox");}}var _2a=_29.length;if(!_2a){_29.checked=true;}else{for(i=0;i<_2a;i++){_29[i].checked=false;}_29[_27].checked=true;}if(typeof (_28)=="undefined"){item_buy_from_list(1);}else{if(_28==1){item_buy_from_list(1,1);}if(_28==2){item_buy_from_list(1,2);}}}function gift_one_4(_2b,_2c){WinOpen("/mall/gift_4.php?ChkValues="+_2c+"&item_type=4&ChkBox="+_2c,"item_buy","400","400");}function item_buy(_2d){var msg="";var _2f=false;var _30="";fn=document.frmItem_buy;if(fn.ChkBox){var _31=ChkWithSelValues(fn);if(_31[0]!=false){fn.ChkValues.value=_31[0];}if(_31[1]!=false){fn.SelValues.value=_31[1];}}switch(eval(_2d)){case (1):if(to_cyid){var _32="?to_cyid="+to_cyid;}else{var _32="";}if(chk_broswer()==true){fn.action="/mall/gift.php"+_32;}else{fn.action="/mall/gift_fire_fox.php"+_32;}strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;if(_31){chk_item_num=_31[0].split(",");if(chk_item_num.length>1){WinHeight=450;}else{WinHeight=470;}}else{WinHeight=470;}ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";break;}if(_30=="coupon_"){_2f=true;}if(fn.ChkValues.value!=""&&fn.SelValues.value!=""){if(_2f==true){alert(msg);}else{window.close();item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);document.frmItem_buy.submit();}}else{alert(str_msg_select_items);}}function item_pre_buy(_33){if(login_id==""){alert("\u8acb\u767b\u5165\u5f8c\u624d\u80fd\u8cb7\u5537~~");return;}var _34=0;var _35=0;var _36=0;for(var i=0;i<_arr_types.length;i++){var _38=$("ChkBox_"+_arr_types[i]);if(_38.checked){_34++;}}switch(eval(_33)){case (0):$("frmItem_buy").action="/mall/item_buy.php";strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;if(_34==0){alert("\u8acb\u9078\u64c7\u60a8\u8981\u8cb7\u7684\u7269\u54c1");}else{if(_34>1){_36=250;}else{_36=300;}}ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";break;case (1):if($("SelValues").value.indexOf("coupon")>0){alert("\u60a8\u7121\u6cd5\u4f7f\u7528\u79ae\u5238\u9001\u79ae\uff0c\u8acb\u6539\u7528\u677e\u679c\u3002");return;}if($("ChkValues").value.indexOf(",")>0){alert("\u9001\u79ae\u8acb\u4e00\u6b21\u9001\u4e00\u500b\u5c31\u597d\u5537~~~");return;}$("frmItem_buy").action="/mall/gift.php";strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;if(_34==0){alert("\u8acb\u9078\u64c7\u60a8\u8981\u9001\u79ae\u7684\u7269\u54c1");}else{if(_34>1){_36=450;}else{_36=470;}}ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";break;case (3):$("frmItem_buy").action="/mall/wish_box.php";strUrl="about:blank";strName="itemBuyWindow";WinWidth=247;_36=140;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";if($F("SelValues").match(/coupon_/i)){alert(str_msg_wishbox_cant_use_coupon);return;}break;}item_win=WinOpen(strUrl,strName,WinWidth,_36,ScrollBar,Resize,WinGubun,strProperty);document.frmItem_buy.submit();window.close();}function itemBuy(_39,_3a,_3b){var _3c="/mall/item_buy.php?";_3c+="ChkValues="+_39;_3c+="&SelValues="+_3a+"|"+_3b;strName="itemBuyWindow";WinWidth=388;WinHeight=290;ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";item_win=WinOpen(_3c,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);var x=screen.width/2-WinWidth/2;var y=screen.height/2-WinHeight/2;}function itemGift(_3f,_40,_41,_42,seq,_44,_45,_46){var _47="/mall/gift.php?";_47+="ChkValues="+_3f;_47+="&SelValues="+_40+"|"+_41;if(_42){_47+="&SI="+_42;}if(seq){_47+="&SE="+seq;}if(_44){_47+="&to_cyid="+_44;}else{try{if(typeof (_45)!="undefined"&&typeof (_46)!="undefined"){_47+="&FromWho="+_45+"&FromWhoName="+_46;}else{if(parent.frmHidden){_45=parent.frmHidden.document.getElementById("recive_id").value;_46=parent.frmHidden.document.getElementById("recive_name").value;_47+="&FromWho="+_45+"&FromWhoName="+_46;}else{if(top.frmHidden){_45=top.frmHidden.document.getElementById("recive_id").value;_46=top.frmHidden.document.getElementById("recive_name").value;_47+="&FromWho="+_45+"&FromWhoName="+_46;}else{if(typeof (document.getElementById("recive_id"))!="undefined"&&typeof (document.getElementById("recive_name"))!="undefined"){_45=document.getElementById("recive_id").value;_46=document.getElementById("recive_name").value;_47+="&FromWho="+_45+"&FromWhoName="+_46;}}}}}catch(e){}}strName="itemBuyWindow";WinWidth=417;WinHeight=430;ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";item_win=WinOpen(_47,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);var x=screen.width/2-WinWidth/2;var y=screen.height/2-WinHeight/2;}function item_buy_from_list(_4a,_4b){var msg="";var _4d=false;var _4e="";fn=document.frmItem_buy;if(document.getElementsByName("ChkBox")){if(typeof (_4b)=="undefined"){var _4f=document.getElementsByName("ChkBox");}else{if(_4b==1){var _4f=document.getElementsByName("mini_room_ChkBox");}if(_4b==2){var _4f=document.getElementsByName("personacon_ChkBox");}}if(_4f){if(typeof (_4b)=="undefined"){var _50=ChkWithSelValues_from_list(fn);}else{if(_4b==1){var _50=ChkWithSelValues_from_list(fn,1);}if(_4b==2){var _50=ChkWithSelValues_from_list(fn,2);}}if(_50[0]!=""){fn.ChkValues.value=_50[0];}if(_50[1]!=""){fn.SelValues.value=_50[1];}}}var _51="";try{if(to_cyid){var _51="?to_cyid="+to_cyid;}}catch(e){}switch(eval(_4a)){case (0):fn.action="/mall/item_buy.php";fn.target="itemBuyWindow";strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;WinHeight=290;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case (1):fn.action="/mall/gift.php"+_51;strUrl="about:blank";strName="itemBuyWindow";WinWidth=390;WinHeight=450;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case (2):fn.action="/mall/appeal.php";strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;WinHeight=345;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_4e=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_appeal_cant_use_coupon;break;case (3):fn.action="/mall/wish_box.php";strUrl="about:blank";strName="itemBuyWindow";WinWidth=288;WinHeight=140;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_4e=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_wishbox_cant_use_coupon;break;}if(parent.frmHidden){recive_id=parent.frmHidden.document.getElementById("recive_id").value;recive_name=parent.frmHidden.document.getElementById("recive_name").value;fn.action=fn.action+"?FromWho="+recive_id+"&FromWhoName="+recive_name;}if(_4e=="coupon_"){_4d=true;}if(fn.ChkValues.value!=""&&fn.SelValues.value!=""){if(_4d==true){alert(msg);}else{item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);var x=screen.width/2-WinWidth/2;var y=screen.height/2-WinHeight/2;document.frmItem_buy.submit();}}else{alert(str_msg_select_items);}}function ChkWithSelValues_from_list(fn,_55){var _56=0;var _57;var _58="";var _59="";if(typeof (_55)=="undefined"){var _5a=document.getElementsByName("ChkBox");}else{if(_55==1){var _5a=document.getElementsByName("mini_room_ChkBox");}if(_55==2){var _5a=document.getElementsByName("personacon_ChkBox");}}var _5b=_5a.length;var _5c=0;var _5d=new Array();fn.ChkValues.value=_58;fn.SelValues.value=_59;if(!_5b){if(_5a.checked==true){_58=_5a.value;if(typeof (_55)=="undefined"){_59=document.getElementById("SelBox[0]").value;}else{if(_55==1){_59=document.getElementById("mini_room_SelBox[0]").value;}if(_55==2){_59=document.getElementById("personacon_SelBox[0]").value;}}}}else{for(var i=0;i<_5b;i++){if(_5a[i].checked==true){if(_5c==0){_58=_58+_5a[i].value;if(typeof (_55)=="undefined"){_59=document.getElementById("SelBox["+i+"]").value;}else{if(_55==1){_59=document.getElementById("mini_room_SelBox["+i+"]").value;}if(_55==2){_59=document.getElementById("personacon_SelBox["+i+"]").value;}}_5c=1;}else{_58=_58+","+_5a[i].value;if(typeof (_55)=="undefined"){_59=document.getElementById("SelBox["+i+"]").value;}else{if(_55==1){_59=document.getElementById("mini_room_SelBox["+i+"]").value;}if(_55==2){_59=document.getElementById("personacon_SelBox["+i+"]").value;}}}}}}_58=_58+"";_59=_59+"";if(_58==""){_5d[0]="";}else{_5d[0]=_58;}if(_59==""){_5d[1]="";}else{_5d[1]=_59;}return (_5d);}function ChkWithSelValues(fn){var _60=0;var _61;var _62="";var _63="";var _64=document.getElementsByName("ChkBox");var _65=_64.length;var _66=0;var _67=new Array();fn.ChkValues.value=_62;fn.SelValues.value=_63;if(!_65){if(_64.checked==true){_62=_64.value;_63=fn.elements["SelBox[0]"].options[fn.elements["SelBox[0]"].selectedIndex].value;}}else{for(var i=0;i<_65;i++){eleName="SelBox["+i+"]";if(fn.elements[eleName]){if(_64[i].checked==true){if(_66==0){_62=_62+_64[i].value;_63=_63+fn.elements[eleName].options[fn.elements[eleName].selectedIndex].value;_66=1;}else{_62=_62+","+_64[i].value;_63=_63+","+fn.elements[eleName].options[fn.elements[eleName].selectedIndex].value;}}}}}if(_62==""){_67[0]=false;}else{_67[0]=_62;}if(_63==""){_67[1]=false;}else{_67[1]=_63;}return (_67);}function submit_check(fn,msg){if(msg){if(confirm(msg)){fn.submit();}}}function message_check(msg){if(msg){if(confirm(msg)){return (true);}else{return (false);}}else{alert("\uba54\uc138\uc9c0\uac00 \uc5c6\uc74c");}}function shop_popup(_6c){var _6d=document.location;switch(_6c){case ("cymoney_present"):strUrl="/mall/cymoney_present.php";if(parent.frmHidden){recive_id=parent.frmHidden.document.getElementById("recive_id").value;recive_name=parent.frmHidden.document.getElementById("recive_name").value;strUrl=strUrl+"?FromWho="+recive_id+"&FromWhoName="+recive_name;}strName="CymoneyPresentWindow";WinWidth=388;WinHeight=310;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case ("fill"):strUrl="/mall/fill.php?return_url="+_6d;strName="CyMoneyFillWindow";WinWidth=438;WinHeight=335;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case ("gift_check"):strUrl="about:blank";strName="GiftChecklWindow";WinWidth=388;WinHeight=490;ScrollBar="yes";Resize="yes";WinGubun="Center";strProperty="";break;case ("gift_reject"):strUrl="about:blank";strName="winGiftRejectPop";WinWidth=388;WinHeight=343;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";window.close();break;case ("appeal_list"):strUrl="/mall/appeal_list.php";strName="winAppealPop";WinWidth=438;WinHeight=445;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case ("appeal_view"):strUrl="about:blank";strName="winAppealViewPop";WinWidth=388;WinHeight=311;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case ("coupon"):strUrl="/mall/coupon_list.php";strName="winCouponPop";WinWidth=438;WinHeight=390;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;}shop_popup_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);return (shop_popup_win);}function submit_check_gift(fn,msg){}function submit_pop_up(_70,fn,_72){var msg;var _74="Proc_And_Msg_Win";var _75="about:blank";var _76="yes";var _77="no";var _78="Center";var _79="";var _7a;var _7b=true;switch(_70){case ("cymoney_check"):WinWidth=274;WinHeight=140;if(fn.ChkValues){if(fn.ChkValues.value==""){alert(str_msg_select_items);_7c=false;return (false);}}if(fn.recive_info){if(!fn.recive_info.value){alert(str_msg_select_friend);fn.recive_info.focus();_7c=false;return (false);}}if(fn.send_comment){if(fn.send_comment.value==""){alert(str_msg_input_message);fn.send_comment.focus();_7c=false;return (false);}if(wordFilter(fn.send_comment.value,"B")){fn.send_comment.focus();_7c=false;return (false);}}break;case ("item_buy"):WinWidth=388;WinHeight=160;fn.action="/mall/item_buy_completed.php";fn.target="Proc_And_Msg_Win";if(fn.ChkValues){if(fn.ChkValues.value==""){alert(str_msg_select_items);_7c=false;return (false);}}break;case ("gift_accept"):fn.action="gift_check_C_accept_confirm.php";WinWidth=488;WinHeight=220;if(fn.gift_comment){if(wordFilter(fn.gift_comment.value,"B")){fn.gift_comment.focus();_7c=false;return (false);}}break;case ("gift_accept_completed"):fn.action="gift_check_accept.php";WinWidth=247;WinHeight=140;break;case ("gift"):WinWidth=288;WinHeight=140;if(fn.recive_info){if(!fn.recive_info.value){alert(str_msg_select_friend);fn.recive_info.focus();_7c=false;return (false);}}if(fn.ChkValues){if(fn.ChkValues.value==""){alert(str_msg_select_items);_7c=false;return (false);}}if(wordFilter(fn.send_comment.value,"B")){fn.send_comment.focus();_7c=false;return (false);}break;case ("appeal_delete"):if(ChkStateCheck()==true){WinWidth=288;WinHeight=140;ChkSelValues(fn);fn.action="./delete_C_check.php";_7b=false;}else{alert(str_msg_check_one);return (false);_7c=false;}break;case ("appeal"):msg=str_msg_appeal;var _7c=true;if(fn.ChkValues){if(fn.ChkValues.value==""){alert(str_msg_select_items);_7c=false;return (false);}}if(fn.recive_info.type=="select-one"){if(fn.recive_info.options[fn.recive_info.selectedIndex].value==""){alert(str_msg_select_friend);fn.recive_info.focus();_7c=false;return (false);}}else{if(fn.recive_info.value==""){alert(str_msg_select_friend);fn.recive_info.focus();_7c=false;return (false);}}if(fn.send_comment.value==""){alert(str_msg_input_message);fn.send_comment.focus();_7c=false;return (false);}if(wordFilter(fn.send_comment.value,"B")){fn.send_comment.focus();_7c=false;return (false);}WinWidth=247;WinHeight=140;break;}if(_7c!=false){if(msg){_7a=message_check(msg);}else{_7a=true;}if(_7a==true){if(window.name=="Proc_And_Msg_Win"){window.name="Proc_And_Msg_Win_old";}if(_7b==true){window.close();}msg_popup_win=WinOpen(_75,_74,WinWidth,WinHeight,_76,_77,_78,_79);msg_popup_win.focus();fn.submit();}}else{return (false);}}function submit_check_appeal(fn,msg){}function w_close(){window.close();}function myitem_delete(_7f){frmMyitemlist.int_myitemid.value=_7f;}function go_gift_box(){opener.location.href="./myitem.php";opener.focus();window.close();}function giftChk(_80,_81){switch(_80){case ("accept_confirm"):fn=document.frmGift_check;fn.action="./gift_check_C_accept_confirm.php";fn.target="fraGiftHidden";if(fn.gift_comment.value){if(wordFilter(fn.gift_comment.value,"B")){return;}if(fn.action!=""){fn.submit();}else{fn.action="";}}else{alert(str_msg_input_message);}break;case ("accept"):fn=document.frmGift_check;fn.action="./gift_check_accept.php";if(fn.gift_comment.value){if(wordFilter(fn.gift_comment.value,"B")){return;}if(fn.action!=""){fn.submit();}else{fn.action="";}}else{alert(str_msg_input_message);}break;case ("reject"):shop_popup("gift_reject");document.frmGift_check.action="./gift_check_reject.php";document.frmGift_check.target="winGiftRejectPop";document.frmGift_check.submit();break;case ("reject_completed"):fn=document.frmGift_reject;if(fn.gift_comment){if(wordFilter(fn.gift_comment.value,"B")){return;}}msg=str_gift_reject_confirm;if(confirm(msg)){fn.submit();}break;case ("check"):document.frmGift_check.action="./gift_check.php";fn=document.frmGift_check;fn.myitem_id.value=_81;gift_win=shop_popup("gift_check");fn.submit();break;case ("check_reject"):document.frmGift_check.action="./gift_check.php?op=reject";fn=document.frmGift_check;fn.myitem_id.value=_81;gift_win=shop_popup("gift_check");fn.submit();break;}}function appeal_popup(_82,_83){var fn=document.frmAppeal;switch(_82){case ("view"):winAppealView=shop_popup("appeal_view");winAppealView.document.write("<form name='frmAppeal_view' method='post' action='/mall/appeal_view.php'>");winAppealView.document.write("<input type='hidden' name='appeal_id' value='"+_83+"'>");winAppealView.document.write("</form>");winAppealView.document.frmAppeal_view.submit();break;case ("gift"):fn.action="./gift.php";fn.target="itemBuyWindow";fn.ChkValues.value=_83;if(fn.action){strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;WinHeight=375;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="";w_close();item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);fn.submit();return (true);}else{return (false);}break;case ("delete"):msg=str_msg_delete;if(confirm(msg)){fn.action="./appeal_delete.php";fn.target="fraAppealHidden";fn.ChkValues.value=_83;if(fn.action){fn.submit();return (true);}else{return (false);}}else{return (false);}break;case ("preview"):if(_83){fn.target="itemViewwindow";strItemtype=fn.item_type.value;item_view(eval(strItemtype),_83,fn);}else{alert(str_item_id_is_null);return (false);}break;case ("exit"):msg=str_gift_later;if(confirm(msg)){window.close();}break;}}function msg_display(_85,_86,_87){switch(_85){default:return_msg=msg[_85];break;case (0):return_msg=_86+msg[_85];break;}return (return_msg);}function coverstory_submit(){document.frmCoverstory.submit();}function item_preview(_88,_89,_8a,_8b){var _8c=false;if(_88.value==""){_88.checked=false;return false;}else{if(_88.checked==true){H_query.set(_89,_88.value);}else{H_query.unset(_89);}var _8d=typeof (H_query.get("a_item_personacon"));if(!_8a){_8b=9000029636;}view_f_name="/ps2/ps_home2_preview.php";if(_8d=="string"){_8c=true;}chk_query="&"+H_query.toQueryString();preview_url=view_f_name+"?mh_id="+_8b+chk_query;if(_8c){preview_url=preview_url+"&menuid=-4";}document.getElementById("frmItemview").src=preview_url;update_item_preview_value();}}function update_item_preview_value(){var _8e=0;var _8f=0;var _90="";var _91="";for(var i=0;i<_arr_types.length;i++){var _93=$("Select_"+_arr_types[i]);var _94=$("ChkBox_"+_arr_types[i]);if(_94.checked){_90+=_94.value+",";if(_93.selectedIndex!=-1){_8e++;var _95=$("Select_"+_arr_types[i])[_93.selectedIndex].value;_91+=_95+",";lc=parseInt(_95.substring(_95.indexOf("|")+1,_95.length),10);if(lc.toString()=="NaN"){lc=0;}_8f+=lc;}}}$("totalnums").update(_8e);$("totalacorns").update(_8f);$("ChkValues").value=_90.substring(0,_90.length-1);$("SelValues").value=_91.substring(0,_91.length-1);}function item_search(fn,_97){if(_97){fn.search_text.value=_97;}if(fn.search_text.value.length=0||fn.search_text.value.length<2){alert(str_search_text_short);}else{fn.submit();}}function search_friend(){strUrl="/main/buddy_invite_researchedC_Wview_popup.php?hidMode=none";strName="GSP_Friend_search";WinWidth=438;WinHeight=375;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="";item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);document.getElementById("send_type").innerHTML="<a href=javascript:select_friend_from_buddy_list_box(); class='brown02'>\u641c\u5c0b\u81ea\u5df1\u7684\u9ebb\u5409</a>";if(chk_broswer()==true){document.getElementById("layBuddySel").innerHTML=document.getElementById("divBuddyInput").innerHTML;}else{document.getElementById("divBuddySel").selectedIndex=0;document.getElementById("divBuddySel").style.visibility="hidden";document.getElementById("divBuddyInput").style.visibility="visible";document.getElementById("recive_info").value="";}}function select_friend_from_buddy_list_box(){document.getElementById("send_type").innerHTML="<a href=javascript:search_friend(); class='brown02'>\u641c\u5c0b\u9ebb\u5409\u4ee5\u5916\u7684\u4eba</a>";if(chk_broswer()==true){document.getElementById("layBuddySel").innerHTML=document.getElementById("divBuddySel").innerHTML;}else{document.getElementById("divBuddyInput").value="";document.getElementById("divBuddyInput").style.visibility="hidden";document.getElementById("divBuddySel").style.visibility="visible";document.getElementById("recive_info").value="";}}function fixed_friend_from_buddy_list_box(){if(chk_broswer()==true){document.getElementById("layBuddySel").innerHTML=document.getElementById("divBuddyInput").innerHTML;}else{document.getElementById("divBuddyInput").value="";document.getElementById("divBuddyInput").style.visibility="visible";document.getElementById("divBuddySel").style.visibility="hidden";document.getElementById("recive_info").value="";}}function set_payment(_98){fn=document.frmFill;switch(eval(_98.selectedIndex)){default:fn.action="fill_completed_normal.php";fn.target="fraFillHidden";break;case (0):fn.action="fill_proc.php";fn.target="_self";break;}}function chk_cymoney(fn){var _9a=0;var _9b=0;var _9c="";var _9d="";var obj=fn.ChkBox_Cymoney;var chk=fn.elements["chk_each"];var sel=fn.elements["sel_each"];var _a1=0;var _a2=0;var _a3;for(i=0;i<fn.length;i++){if(fn.elements[i].name=="ChkBox_Cymoney"){_a1++;}}var _a4;var _a5=0;if(_a1){for(i=0;i<_a1;i++){if(_a1==1){_a3=obj;tmp_chk=chk;tmp_sel=sel;}else{_a3=obj[i];tmp_chk=chk[i];tmp_sel=sel[i];}if(_a3.checked==true){if(_a3.value.match("coupon_")=="coupon_"){_9b=_9b+0;}else{_9b=_9b+eval(_a3.value);}if(_9c==""){_9c=_9c+tmp_chk.value;}else{_9c=_9c+","+tmp_chk.value;}if(_9d==""){_9d=_9d+tmp_sel.value;}else{_9d=_9d+","+tmp_sel.value;}}}fn.ChkValues.value=_9c;fn.SelValues.value=_9d;if(my_cymoney<_9b){_9a=1;}}if(_9a==1){_a5=_9b-my_cymoney;_a4=document.getElementById("short_cymoney");_a4.innerHTML=int_Comma(""+_a5+"");document.getElementById("item_buy_span").innerHTML=document.getElementById("div_fill_cymoney").innerHTML;}else{_a5=0;_a4=document.getElementById("short_cymoney");if(_a4){_a4.innerHTML=int_Comma(""+_a5+"");document.getElementById("item_buy_span").innerHTML=document.getElementById("div_item_buy").innerHTML;}}}function chk_fill(fn){if(!fn.fill_password.value){alert(str_msg_password_input);fn.fill_password.focus();return (false);}}function wishItemDelete(_a7,_a8,_a9){var _aa="";if(_a8=="multi"){var obj=document.all["ChkBox"];var _ac=obj.length;if(_ac){for(i=0;i<_ac;i++){if(obj[i].checked==true){if(_aa==""){_aa=obj[i].value;}else{_aa=_aa+","+obj[i].value;}}}}else{if(obj.checked==true){_aa=obj.value;}}}else{_aa=_a8;}if(_aa){var url="/ps/ps_item_wish_delete.php?mh_id="+_a7+"&itemid="+_aa;if(_a9){url=url+"&item_type="+_a9;}if(confirm(str_msg_delete)){fraMyitemHidden.location.href=url;}}else{alert(str_msg_check_one);}}function buy_one_4(_ae,_af){WinOpen("/mall/item_buy_4.php?ChkValues="+_af+"&item_type"+_ae+"&ChkBox="+_af,"item_buy","400","300");}function collection_one(_b0,_b1){WinOpen("favorite_collection.php?ChkValues="+_b0+"&SelValues="+_b1,"favorite_collection","200","150");}function ChkItemDel(id,sid,_b4,seq){obj_name="DIVch"+sid;obj=eval(document.all[obj_name]);obj.innerText="";obj.outerHtml="";document.my_miniroom.exec_delitem(_b4,seq);replacedisplayitem();}function getElementsById_loop(tag,_b7,_b8){var _b9=document.getElementsByTagName(tag);var arr=new Array();for(i=0,iarr=0;i<_b9.length;i++){att=_b9[i].getAttribute(_b8);if(att!=null&&att!=""){if(att.indexOf(_b7)!=-1){arr[iarr]=_b9[i];iarr++;}}}return arr;}function replacedisplayitem(){var _bb=getElementsById_loop("input","ChkBox","name");for(i=0;i<_bb.length;i++){_bb[i].click();_bb[i].click();}}function ChkItemDel_Simple(sid){obj_name="DIVch"+sid;obj=document.getElementById(obj_name);obj.innerText="";obj.outerHtml="";}function ChkItemSelectAll(){ObjDIV=document.all["DIVitem"];var _bd=ObjDIV.all["ChkBox"];if(!_bd){return;}var _be=_bd.length;if(_bd){if(!_be){_be=1;_bd.click();return;}}for(i=0;i<_be;i++){if(_bd[i].checked!=true){_bd[i].click();}}}function ChkItemDSelAll(){ObjDIV=document.all["DIVitem"];var _bf=ObjDIV.all["ChkBox"];if(!_bf){return;}var _c0=_bf.length;if(_bf){if(!_c0){_c0=1;if(_bf.checked){_bf.click();}}else{for(i=0;i<_c0;i++){if(_bf[i].checked){_bf[i].click();}}}}acornObj=document.all["acorn_money"];acornObj.innerText="0";}function ChkItemDelAll(chk){ObjDIV=document.all["DIVitem"];var _c2=ObjDIV.all["ChkBox"];if(!_c2){return;}if(chk==1){if(!confirm(str_msg_item_delete_all)){return;}}document.getElementById("my_miniroom").contentWindow.location.reload();var _c3=_c2.length;if(_c2){if(!_c3){_c3=1;if(_c2.checked){_c2.click();}}else{for(i=0;i<_c3;i++){if(_c2[i].checked){_c2[i].click();}}}}ObjDIV.innerText="";ObjDIV.outerHtml="";acornObj=document.all["acorn_money"];acornObj.innerText="0";}function Item_list_acorn_count(_c4,_c5){acornObj=document.all["acorn_money"];switch(_c4){case ("p"):cur_money=parseInt(acornObj.innerText);cur_money=cur_money+parseInt(_c5);acornObj.innerText=cur_money;break;case ("d"):cur_money=parseInt(acornObj.innerText);if(cur_money<_c5){acornObj.innerText="0";return;}cur_money=cur_money-parseInt(_c5);acornObj.innerText=cur_money;break;}}function wishbox_save(fn){var msg="";if(document.all.ChkBox){var _c8=ChkWithSelValues_from_list(fn);if(_c8[0]!=false){fn.ChkValues.value=_c8[0];}if(_c8[1]!=false){fn.SelValues.value=_c8[1];}}if(fn.ChkValues.value==""||fn.ChkValues.value==""){alert("check item");}else{fn.submit();}}function item_purchase_noChk(_c9){var msg="";var _cb=false;var _cc="";fn=document.frmItem_buy;fn_save=document.frmsave_chk;if(document.all.ChkBox){var _cd=document.all["ChkBox"];var _ce=_cd.length;var _cf=0;var _d0;var _d1="";var _d2="";var _d3=0;var _d4;fn.ChkValues.value=_d1;fn.SelValues.value=_d2;if(!_ce){if(_cd.checked==true){_d1=_cd.value;_d2=document.all["SelBox["+_d1+"]"].value;}}else{for(var i=0;i<_ce;i++){if(_cd[i].checked==true){if(_d3==0){_d1=_d1+_cd[i].value;SelObj=document.all["SelBox["+_cd[i].value+"]"];SelObjn=SelObj.length;if(SelObjn){selv=SelObj[0].value;}else{selv=SelObj.value;}_d2=_d2+selv;_d3=1;}else{_d1=_d1+","+_cd[i].value;SelObj=document.all["SelBox["+_cd[i].value+"]"];SelObjn=SelObj.length;if(SelObjn){selv=SelObj[0].value;}else{selv=SelObj.value;}_d2=_d2+","+selv;}}}}_d1=_d1+"";_d2=_d2+"";fn.ChkValues.value=_d1;fn.SelValues.value=_d2;}switch(eval(_c9)){case (0):if(fn_save.save_chkbox.checked){fn.save_chk.value=1;}fn.action="/mall/item_purchase.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=412;WinHeight=400;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="";break;case (1):fn.action="/mall/item_send_gift.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=412;WinHeight=380;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="";break;case (2):fn.action="/mall/item_ask_gift.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=412;WinHeight=380;ScrollBar="yes";Resize="no";WinGubun="Center";strProperty="";break;if(chk_broswer()==true){fn.action="/mall/appeal.php";}else{fn.action="/mall/appeal_fire_fox.php";}strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;WinHeight=345;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_cc=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_appeal_cant_use_coupon;break;case (3):fn.action="/mall/wish_box.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=283;WinHeight=140;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_cc=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_wishbox_cant_use_coupon;location.href="./item_list_s_miniroom.php?highMenu=4";break;}if(_cc=="coupon_"){_cb=true;}if(fn.ChkValues.value!=""&&fn.SelValues.value!=""){if(_cb==true){alert(msg);}else{item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);document.frmItem_buy.submit();}}else{alert(str_msg_select_items);}}function item_purchase(_d6){var msg="";var _d8=false;var _d9="";fn=document.frmItem_buy;fn_save=document.frmsave_chk;if(document.all.ChkBox){var _da=ChkWithSelValues_from_list(fn);if(_da[0]!=false){fn.ChkValues.value=_da[0];}if(_da[1]!=false){fn.SelValues.value=_da[1];}}switch(eval(_d6)){case (0):if(fn_save.save_chkbox.checked){fn.save_chk.value=1;}fn.action="/mall/item_purchase.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=388;WinHeight=400;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";break;case (1):fn.action="/mall/item_send_gift.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=400;WinHeight=380;ScrollBar="overflow: auto";Resize="no";WinGubun="Center";strProperty="";break;case (2):fn.action="/mall/item_ask_gift.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=400;WinHeight=380;ScrollBar="overflow: auto";Resize="no";WinGubun="Center";strProperty="";break;if(chk_broswer()==true){fn.action="/mall/appeal.php";}else{fn.action="/mall/appeal_fire_fox.php";}strUrl="about:blank";strName="itemBuyWindow";WinWidth=388;WinHeight=345;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_d9=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_appeal_cant_use_coupon;break;case (3):fn.action="/mall/wish_box.php";strUrl="about:blank";strName="itemViewwindow";WinWidth=283;WinHeight=140;ScrollBar="no";Resize="no";WinGubun="Center";strProperty="";str_Selvalues_chk=fn.SelValues.value;_d9=str_Selvalues_chk.match(/coupon_/i);msg=str_msg_wishbox_cant_use_coupon;location.href="./item_list_s_miniroom.php?highMenu=4";break;}if(_d9=="coupon_"){_d8=true;}if(fn.ChkValues.value!=""&&fn.SelValues.value!=""){if(_d8==true){alert(msg);}else{window.close();item_win=WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty);document.frmItem_buy.submit();}}else{alert(str_msg_select_items);}}function resizeItemImage(_db,_dc){var _dd=80;myImage=new Image();myImage.src=document.getElementById(_db).src;if(_dc==""){_dd=80;}else{if(_dc=="20"){_dd=38;}}document.getElementById(_db).style.width=_dd;document.getElementById(_db).style.height=_dd;}function delete_item_at_multi_buy_item_list(_de,_df,_e0){if(confirm(str_msg_delete)){_de.action=_df+"?del_itemid="+_e0;_de.target="_self";_de.submit();}}function check_search(fn){if(trim(fn.search_text.value)==""){alert("\u8acb\u8f38\u5165\u641c\u7d22\u95dc\u9375\u5b57\u3002");return false;}if(fn.search_key.value==0){fn.action="item_list_search_all.php";}else{fn.action="item_list_search.php";}fn.highMenu.value=fn.search_key.value;return true;}
