var MyHompy_GSP;var CyWorld_GSP;var YourHompy_GSP;var YourBigHompy_GSP;var item_win=null;var fg=document.createDocumentFragment();function regNS(ns){var _2=ns.split(".");var _3=window;for(var i=0;i<_2.length;i++){if(typeof _3[_2[i]]=="undefined"){_3[_2[i]]=new Object();}_3=_3[_2[i]];}}regNS("Cytw");regNS("Cytw.lang");regNS("Cytw.env");regNS("Cytw.hompy");regNS("Cytw.main");regNS("Cytw.util");regNS("Cytw.message");regNS("Cytw.music");regNS("Cytw.hompy.setting");Cytw.lang={isArray:function(B){if(B){var A=Cytw.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isFunction:function(A){return typeof A==="function";},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isBoolean:function(A){return typeof A==="boolean";},isNull:function(A){return A===null;},isObject:function(A){return (A&&(typeof A==="object"||Cytw.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},isValue:function(B){var A=Cytw.lang;return (A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));},_IEEnumFix:function(C,B){if(Cytw.env.bo.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(Cytw.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("extend failed, please check  ");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}Cytw.lang._IEEnumFix(D.prototype,C);}}};Cytw.env.bo=function(){var _1b="0.0.1";var _1c="20080414";var _1d={ie:0,webkit:0,gecko:0,mobile:null,opera:0,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){_1d.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){_1d.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){_1d.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){_1d.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){_1d.air=A[0];}}if(!_1d.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){_1d.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){_1d.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){_1d.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){_1d.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){_1d.gecko=parseFloat(A[1]);}}}}}return _1d;}();Cytw.env.login_id="";Cytw.env.mh_id="";Cytw.env.year=new Date().getFullYear();Cytw.env.month=new Date().getMonth()+1;Cytw.env.date=new Date().getDate();Cytw.env.baseDomain="http://tw.cyworld.com/";Cytw.util={exp2:/(http[s]?|ftp):\/\/?(www\.)?[a-zA-Z0-9-\.]+\.(com|org|net|mil|fr|edu|ca|co.uk|com.au|gov|tw|jp|cn|info|biz|eu|at|be|am|in|io|la|tm|sh|gs|ms|tc|us|vg|cc|fm|nu|tv|ws)\/?([a-z0-9\?\.=_\-\/&~\$%\,\+]){0,}/ig,keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789+/=",coreMD5:function(x){var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;function safe_add(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return (msw<<16)|(lsw&65535);}function rol(num,cnt){return (num<<cnt)|(num>>>(32-cnt));}function cmn(q,a,b,x,s,t){return safe_add(rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}function ff(a,b,c,d,x,s,t){return cmn((b&c)|((~b)&d),a,b,x,s,t);}function gg(a,b,c,d,x,s,t){return cmn((b&d)|(c&(~d)),a,b,x,s,t);}function hh(a,b,c,d,x,s,t){return cmn(b^c^d,a,b,x,s,t);}function ii(a,b,c,d,x,s,t){return cmn(c^(b|(~d)),a,b,x,s,t);}for(i=0;i<x.length;i+=16){var _4d=a;var _4e=b;var _4f=c;var _50=d;a=ff(a,b,c,d,x[i+0],7,-680876936);d=ff(d,a,b,c,x[i+1],12,-389564586);c=ff(c,d,a,b,x[i+2],17,606105819);b=ff(b,c,d,a,x[i+3],22,-1044525330);a=ff(a,b,c,d,x[i+4],7,-176418897);d=ff(d,a,b,c,x[i+5],12,1200080426);c=ff(c,d,a,b,x[i+6],17,-1473231341);b=ff(b,c,d,a,x[i+7],22,-45705983);a=ff(a,b,c,d,x[i+8],7,1770035416);d=ff(d,a,b,c,x[i+9],12,-1958414417);c=ff(c,d,a,b,x[i+10],17,-42063);b=ff(b,c,d,a,x[i+11],22,-1990404162);a=ff(a,b,c,d,x[i+12],7,1804603682);d=ff(d,a,b,c,x[i+13],12,-40341101);c=ff(c,d,a,b,x[i+14],17,-1502002290);b=ff(b,c,d,a,x[i+15],22,1236535329);a=gg(a,b,c,d,x[i+1],5,-165796510);d=gg(d,a,b,c,x[i+6],9,-1069501632);c=gg(c,d,a,b,x[i+11],14,643717713);b=gg(b,c,d,a,x[i+0],20,-373897302);a=gg(a,b,c,d,x[i+5],5,-701558691);d=gg(d,a,b,c,x[i+10],9,38016083);c=gg(c,d,a,b,x[i+15],14,-660478335);b=gg(b,c,d,a,x[i+4],20,-405537848);a=gg(a,b,c,d,x[i+9],5,568446438);d=gg(d,a,b,c,x[i+14],9,-1019803690);c=gg(c,d,a,b,x[i+3],14,-187363961);b=gg(b,c,d,a,x[i+8],20,1163531501);a=gg(a,b,c,d,x[i+13],5,-1444681467);d=gg(d,a,b,c,x[i+2],9,-51403784);c=gg(c,d,a,b,x[i+7],14,1735328473);b=gg(b,c,d,a,x[i+12],20,-1926607734);a=hh(a,b,c,d,x[i+5],4,-378558);d=hh(d,a,b,c,x[i+8],11,-2022574463);c=hh(c,d,a,b,x[i+11],16,1839030562);b=hh(b,c,d,a,x[i+14],23,-35309556);a=hh(a,b,c,d,x[i+1],4,-1530992060);d=hh(d,a,b,c,x[i+4],11,1272893353);c=hh(c,d,a,b,x[i+7],16,-155497632);b=hh(b,c,d,a,x[i+10],23,-1094730640);a=hh(a,b,c,d,x[i+13],4,681279174);d=hh(d,a,b,c,x[i+0],11,-358537222);c=hh(c,d,a,b,x[i+3],16,-722521979);b=hh(b,c,d,a,x[i+6],23,76029189);a=hh(a,b,c,d,x[i+9],4,-640364487);d=hh(d,a,b,c,x[i+12],11,-421815835);c=hh(c,d,a,b,x[i+15],16,530742520);b=hh(b,c,d,a,x[i+2],23,-995338651);a=ii(a,b,c,d,x[i+0],6,-198630844);d=ii(d,a,b,c,x[i+7],10,1126891415);c=ii(c,d,a,b,x[i+14],15,-1416354905);b=ii(b,c,d,a,x[i+5],21,-57434055);a=ii(a,b,c,d,x[i+12],6,1700485571);d=ii(d,a,b,c,x[i+3],10,-1894986606);c=ii(c,d,a,b,x[i+10],15,-1051523);b=ii(b,c,d,a,x[i+1],21,-2054922799);a=ii(a,b,c,d,x[i+8],6,1873313359);d=ii(d,a,b,c,x[i+15],10,-30611744);c=ii(c,d,a,b,x[i+6],15,-1560198380);b=ii(b,c,d,a,x[i+13],21,1309151649);a=ii(a,b,c,d,x[i+4],6,-145523070);d=ii(d,a,b,c,x[i+11],10,-1120210379);c=ii(c,d,a,b,x[i+2],15,718787259);b=ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,_4d);b=safe_add(b,_4e);c=safe_add(c,_4f);d=safe_add(d,_50);}return [a,b,c,d];},binl2hex:function(_51){var _52="0123456789abcdef";var str="";for(var i=0;i<_51.length*4;i++){str+=_52.charAt((_51[i>>2]>>((i%4)*8+4))&15)+_52.charAt((_51[i>>2]>>((i%4)*8))&15);}return str;},binl2b64:function(_55){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<_55.length*32;i+=6){str+=tab.charAt(((_55[i>>5]<<(i%32))&63)|((_55[i>>5+1]>>(32-i%32))&63));}return str;},str2binl:function(str){var _5a=((str.length+8)>>6)+1;var _5b=new Array(_5a*16);for(var i=0;i<_5a*16;i++){_5b[i]=0;}for(var i=0;i<str.length;i++){_5b[i>>2]|=(str.charCodeAt(i)&255)<<((i%4)*8);}_5b[i>>2]|=128<<((i%4)*8);_5b[_5a*16-2]=str.length*8;return _5b;},strw2binl:function(str){var _5e=((str.length+4)>>5)+1;var _5f=new Array(_5e*16);for(var i=0;i<_5e*16;i++){_5f[i]=0;}for(var i=0;i<str.length;i++){_5f[i>>1]|=str.charCodeAt(i)<<((i%2)*16);}_5f[i>>1]|=128<<((i%2)*16);_5f[_5e*16-2]=str.length*16;return _5f;},hexMD5:function(str){return Cytw.util.binl2hex(Cytw.util.coreMD5(Cytw.util.str2binl(str)));},hexMD5w:function(str){return Cytw.util.binl2hex(Cytw.util.coreMD5(Cytw.util.strw2binl(str)));},b64MD5:function(str){return Cytw.util.binl2b64(Cytw.util.coreMD5(Cytw.util.str2binl(str)));},b64MD5w:function(str){return Cytw.util.binl2b64(Cytw.util.coreMD5(Cytw.util.strw2binl(str)));},calcMD5:function(str){return Cytw.util.binl2hex(Cytw.util.coreMD5(Cytw.util.str2binl(str)));},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},removeWhiteSpace:function(A){try{return A.replace(/\s/g,"");}catch(B){return A;}},encode64:function(inp){var out="";var _6a,_6b,_6c="";var _6d,_6e,_6f,_70="";var i=0;do{_6a=inp.charCodeAt(i++);_6b=inp.charCodeAt(i++);_6c=inp.charCodeAt(i++);_6d=_6a>>2;_6e=((_6a&3)<<4)|(_6b>>4);_6f=((_6b&15)<<2)|(_6c>>6);_70=_6c&63;if(isNaN(_6b)){_6f=_70=64;}else{if(isNaN(_6c)){_70=64;}}out=out+this.keyStr.charAt(_6d)+this.keyStr.charAt(_6e)+this.keyStr.charAt(_6f)+this.keyStr.charAt(_70);_6a=_6b=_6c="";_6d=_6e=_6f=_70="";}while(i<inp.length);return out;},decode64:function(inp){var out="";var _74,_75,_76="";var _77,_78,_79,_7a="";var i=0;var _7c=/[^A-Za-z0-9\+\/\=]/g;if(_7c.exec(inp)){alert("There were invalid base64 characters in the input text.\n"+"Valid base64 characters are A-Z, a-z, 0-9, ?+?, ?/?, and ?=?\n"+"Expect errors in decoding.");}inp=inp.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{_77=this.keyStr.indexOf(inp.charAt(i++));_78=this.keyStr.indexOf(inp.charAt(i++));_79=this.keyStr.indexOf(inp.charAt(i++));_7a=this.keyStr.indexOf(inp.charAt(i++));_74=(_77<<2)|(_78>>4);_75=((_78&15)<<4)|(_79>>2);_76=((_79&3)<<6)|_7a;out=out+String.fromCharCode(_74);if(_79!=64){out=out+String.fromCharCode(_75);}if(_7a!=64){out=out+String.fromCharCode(_76);}_74=_75=_76="";_77=_78=_79=_7a="";}while(i<inp.length);return out;},trim:function(s){return s.replace(/(^\s*)|(\s*$)/g,"");},makeLink:function(_7e){var _7f=new RegExp(this.exp2);var _80=_7e.match(_7f);if(_80){_80.each(function(_81){_7e=_7e.replace(_81,"<a href=\""+_81+"\" target=\"_blank\">"+_81+"</a>");});}return _7e;},checkNonChineseChar:function(str){for(i=0;i<str.length;i++){if(!(str.charCodeAt(i)>=19968&&str.charCodeAt(i)<=40895)){return true;}}return false;},open_minihompy:function(_83,_84,_85,_86,_87,_88,_89){var _8a="http://tw.cyworld.com";var _8b=_8a+"/ps2/ps_gate.php?mh_id="+_83+"&menuid="+_86+"&folderid="+_87;if(_85){_8b=_8b+"&redirect_url="+encodeURIComponent(_85);}var _8c="about:blank";var _8d="932";var _8e="568";var _8f="no";var _90="no";var _91="";var _92="";if(_89){_8b=_8a+"/ps2/ps_index_home2.php?mh_id="+_83+"&menuid="+_86+"&folderid="+_87;if(_85){_8b=_8b+"&redirect_url="+encodeURIComponent(_85);}var _8d="";var _8e="";var _8f="";var _90="";var _91="";var _92="";}function focusHompy(obj){if(obj.focus){obj.focus();}else{setTimeout(function(){focusHompy(obj);},300);}}if(_83==0&&_84==0){alert("\u8acb\u60a8\u767b\u5165\u5f8c\u4f7f\u7528\u3002");}else{if(_83==_84){var _94="MyHompy_GSP";if(!MyHompy_GSP||MyHompy_GSP.closed||top.window.name!="MyHompy_GSP"){MyHompy_GSP=this.WinOpen(_8b,_94,_8d,_8e,_8f,_90,_91,_92);}else{MyHompy_GSP.location.replace(_8b);}setTimeout(function(){focusHompy(MyHompy_GSP);},300);}else{var _94="YourHompy_GSP";if(!_89){if(!YourHompy_GSP||YourHompy_GSP.closed||top.window.name!="YourHompy_GSP"){YourHompy_GSP=this.WinOpen(_8b,_94,_8d,_8e,_8f,_90,_91,_92);}else{YourHompy_GSP.location.replace(_8b);}setTimeout(function(){focusHompy(YourHompy_GSP);},300);}else{if(!YourBigHompy_GSP||YourBigHompy_GSP.closed||top.window.name!="YourBigHompy_GSP"){YourBigHompy_GSP=this.WinOpen(_8b,_94,_8d,_8e,_8f,_90,_91,_92);}else{YourBigHompy_GSP.location.replace(_8b);}setTimeout(function(){focusHompy(YourBigHompy_GSP);},300);}}}},OpenNameUIPublic:function(_95,_96){if(_95=="WinBuddyMake"){var _97="/common/include/buddy_invite_makeC_Wview.php"+_96;var _98="310";var _99="460";}else{if(_95=="WinBuddyReceiver"){var _97="/common/include/buddy_invite_receiverC_Mview.php"+_96;var _98="438";var _99="450";}else{if(_95=="WinMemoSend"){var _97="/main/memo_writeC_Wview.php"+_96;var _98="310";var _99="460";}else{if(_95=="WinBuddyNameChange"){var _97="/common/include/buddy_change_makeC_Wview.php"+_96;var _98="310";var _99="460";}else{if(_95=="WinBuddyNameChange_re"){var _97="/common/include/buddy_change_re_makeC_Wview.php"+_96;var _98="388";var _99="410";}}}}}var _9a="no";var _9b="no";var _9c="Normal";var _9d="";util.WinOpen(_97,_95,_98,_99,_9a,_9b,_9c,_9d);},openMHPopup2:function(_9e,_9f,_a0,_a1,_a2,_a3,_a4,_a5,top){var _a7=document.location.href;var _a8=_a7.split("/");var _a9="mhPop";if(!_a1){_a1="yes";}var _a2=_a2?_a2:"yes";var _a3=(_a3!="")?_a3:"";var _a4=(_a4!="")?_a4:"";var _a5=(_a5!="")?_a5:"";var top=(top!="")?top:"";_9e=_9e+"&base_domain="+_a8[2];return this.WinOpen(_9e,_a9,_9f,_a0,_a1,_a2,_a3,_a4,_a5,top);},WinOpen:function(_aa,_ab,_ac,_ad,_ae,_af,_b0,_b1,_b2,top){if(_b2!=""){var x=_b2;}else{var x=screen.width/2-_ac/2;}if(top!=""){var y=top;}else{var y=screen.height/2-_ad/2;}var _b6;if(_b0=="Normal"){_b6=window.open(""+_aa+"",""+_ab+"","scrollbars="+_ae+",resizable="+_af+",width="+_ac+",height="+_ad+","+_b1+"");}else{_b6=window.open(""+_aa+"",""+_ab+"","left="+x+", top="+y+", width="+_ac+", height="+_ad+",scrollbars="+_ae+",resizable="+_af+","+_b1+"");}if(_b6){_b6.focus();}return (_b6);},go_url:function(_b7,url){switch(_b7){default:location.href=url;break;case ("i"):MyHompy_GSP.frames["ps_main"].location.href=url;MyHompy_GSP.focus();break;case ("u"):YourHompy_GSP.location.href=url;YourHompy_GSP.focus();break;}},switch_class:function(id,_ba,_bb){if($(id).className==_ba){$(id).className=_bb;}else{$(id).className=_ba;}},item_view:function(_bc,_bd,_be,fn){if(fn==null){fn=$("frmItemView");}if(_bc==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=705;ScrollBar=0;Resize="no";WinGubun="Center";strProperty="";}if($(_be)&&$(_be).getAttribute("_item_win")){if(!$(_be).getAttribute("_item_win").closed){$(_be).getAttribute("_item_win").close();}}if(item_win){if(!item_win.closed&&typeof item_win.close=="function"){item_win.close();}}if(parent&&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;}if($(_be)){$(_be).setAttribute("_item_win",this.WinOpen(strUrl,strName,WinWidth,WinHeight,ScrollBar,Resize,WinGubun,strProperty));}else{item_win=util.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=_bd;fn.submit();},buy_one:function(_c2,_c3){if(typeof (_c3)=="undefined"){var _c4=document.getElementsByName("ChkBox");}else{if(_c3==1){var _c4=document.getElementsByName("mini_room_ChkBox");}if(_c3==2){var _c4=document.getElementsByName("personacon_ChkBox");}}var _c5=_c4.length;if(!_c5){_c4.checked=true;}else{for(i=0;i<_c5;i++){_c4[i].checked=false;}_c4[_c2].checked=true;}if(typeof (_c3)=="undefined"){this.item_buy_from_list(0);}else{if(_c3==1){this.item_buy_from_list(0,1);}if(_c3==2){this.item_buy_from_list(0,2);}}},gift_one:function(_c6,_c7){if(typeof (_c7)=="undefined"){var _c8=document.getElementsByName("ChkBox");}else{if(_c7==1){var _c8=document.getElementsByName("mini_room_ChkBox");}if(_c7==2){var _c8=document.getElementsByName("personacon_ChkBox");}}var _c9=_c8.length;if(!_c9){_c8.checked=true;}else{for(i=0;i<_c9;i++){_c8[i].checked=false;}_c8[_c6].checked=true;}if(typeof (_c7)=="undefined"){this.item_buy_from_list(1);}else{if(_c7==1){this.item_buy_from_list(1,1);}if(_c7==2){this.item_buy_from_list(1,2);}}},item_buy_from_list:function(_ca,_cb){var msg="";var _cd=false;var _ce="";fn=document.frmItem_buy;if(document.getElementsByName("ChkBox")){if(typeof (_cb)=="undefined"){var _cf=document.getElementsByName("ChkBox");}else{if(_cb==1){var _cf=document.getElementsByName("mini_room_ChkBox");}if(_cb==2){var _cf=document.getElementsByName("personacon_ChkBox");}}if(_cf){if(typeof (_cb)=="undefined"){var _d0=this.ChkWithSelValues_from_list(fn);}else{if(_cb==1){var _d0=this.ChkWithSelValues_from_list(fn,1);}if(_cb==2){var _d0=this.ChkWithSelValues_from_list(fn,2);}}if(_d0[0]!=""){fn.ChkValues.value=_d0[0];}if(_d0[1]!=""){fn.SelValues.value=_d0[1];}}}var _d1="";try{if(to_cyid){var _d1="?to_cyid="+to_cyid;}}catch(e){}switch(eval(_ca)){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"+_d1;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;_ce=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;_ce=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(_ce=="coupon_"){_cd=true;}if(fn.ChkValues.value!=""&&fn.SelValues.value!=""){if(_cd==true){alert(msg);}else{item_win=this.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(SelectItems);}},ChkWithSelValues_from_list:function(fn,_d5){var _d6=0;var _d7;var _d8="";var _d9="";if(typeof (_d5)=="undefined"){var _da=document.getElementsByName("ChkBox");}else{if(_d5==1){var _da=document.getElementsByName("mini_room_ChkBox");}if(_d5==2){var _da=document.getElementsByName("personacon_ChkBox");}}var _db=_da.length;var _dc=0;var _dd=new Array();fn.ChkValues.value=_d8;fn.SelValues.value=_d9;if(!_db){if(_da.checked==true){_d8=_da.value;if(typeof (_d5)=="undefined"){_d9=document.getElementById("SelBox[0]").value;}else{if(_d5==1){_d9=document.getElementById("mini_room_SelBox[0]").value;}if(_d5==2){_d9=document.getElementById("personacon_SelBox[0]").value;}}}}else{for(var i=0;i<_db;i++){if(_da[i].checked==true){if(_dc==0){_d8=_d8+_da[i].value;if(typeof (_d5)=="undefined"){_d9=document.getElementById("SelBox["+i+"]").value;}else{if(_d5==1){_d9=document.getElementById("mini_room_SelBox["+i+"]").value;}if(_d5==2){_d9=document.getElementById("personacon_SelBox["+i+"]").value;}}_dc=1;}else{_d8=_d8+","+_da[i].value;if(typeof (_d5)=="undefined"){_d9=document.getElementById("SelBox["+i+"]").value;}else{if(_d5==1){_d9=document.getElementById("mini_room_SelBox["+i+"]").value;}if(_d5==2){_d9=document.getElementById("personacon_SelBox["+i+"]").value;}}}}}}_d8=_d8+"";_d9=_d9+"";if(_d8==""){_dd[0]="";}else{_dd[0]=_d8;}if(_d9==""){_dd[1]="";}else{_dd[1]=_d9;}return (_dd);},logout_process:function(){new Ajax.Request("/ps2/ajax_logout.php",{method:"post",onCreate:function(){},onComplete:function(){location.reload();}});},login_process:function(_df,_e0,_e1){var _e2=Object.toQueryString({mh_id:Cytw.hompy.mh_id,email:_df,pasword:_e0,chkKeepLogin:_e1});new Ajax.Request("/ps2/ajax_login.php",{method:"post",postBody:_e2,onCreate:function(){},onComplete:function(){var url="/ps2/ps_gate.php?mh_id="+hompy.mh_id+"&menuid="+hompy.menuid+"&folderid="+hompy.folderid+"&postid="+hompy.postid;location.href=url;}});},submitForm:function(_e4,_e5){if(_e5&&Cytw.lang.isFunction(_e5.onCheck)){if(_e5.onCheck()){var _e6=this.dynamicFrame(_e5);this.sendForm(_e4,_e6);return true;}else{return false;}}else{var _e6=this.dynamicFrame(_e5);this.sendForm(_e4,_e6);return true;}},getDaysInMonth:function(_e7,_e8){return 32-new Date(_e8,_e7-1,32).getDate();},replaceSelectOption:function(obj,_ea){var _eb=obj.cloneNode(true);try{_eb.update(_ea);}catch(e){}obj.parentNode.replaceChild(_eb,obj);return _eb;},dynamicFrame:function(_ec){var n="f"+new Date().getTime();var d=document.createElement("DIV");d.id="D"+n;$(d).setStyle({position:"absolute",top:"0px",left:"0px"});d.innerHTML="<iframe height=\"1px\" width=\"1px\" src=\"about:blank\" id=\""+n+"\" name=\""+n+"\" onload=\"Cytw.util.dynamicFrameLoaded('"+n+"')\"></iframe>";document.body.appendChild(d);var i=document.getElementById(n);if(_ec&&Cytw.lang.isFunction(_ec.onComplete)){i.onComplete=_ec.onComplete;}return n;},sendForm:function(_f0,_f1){_f0.setAttribute("target",_f1);_f0.submit();return false;},dynamicFrameLoaded:function(id){var i=document.getElementById(id);d=this.getDynamicFrameDocument(id);if(d.location.href=="about:blank"){return;}if(Cytw.lang.isFunction(i.onComplete)){i.onComplete(this.getDynamicFrameDocument(id).body);}setTimeout(function(){$("D"+id).remove();},200);},getDynamicFrameDocument:function(id){var i=document.getElementById(id);if(!Cytw.env.bo.ie){var d=i.contentDocument;}else{if(Cytw.env.bo.ie){var d=i.contentWindow.document;}else{var d=window.frames[id].document;}}return d;},ajustYMDSelect:function(id,_f8,_f9,day,_fb){function _genOptionString(_fc,end,key){var _ff="";for(var i=_fc;i<=end;i++){_ff+=" <option value=\""+i+"\"";if(i==key){_ff+="selected=\"selected\"";}_ff+=" >"+i+"</option>";}return _ff;}try{var _101=$(id).cleanWhitespace();var _102=_101.childElements();var _103="2000";var _104="2015";var _105=_102[0];var _106=_102[1];var _107=_102[2];if(_105.options.length==1||parseInt(_105.value)!=parseInt(_f8)){_105=this.replaceSelectOption(_105,_genOptionString(_103,_104,_f8));}if(_106.options.length==1||parseInt(_106.value)!=parseInt(_f9)){_106=this.replaceSelectOption(_106,_genOptionString(1,12,_f9));}var days=this.getDaysInMonth(_f9,_f8);if(days!=_107.options.length){_107=this.replaceSelectOption(_107,_genOptionString(1,days,_107.value));}if(_fb==12||_fb==14){this.replaceSelectOption(_105,_genOptionString(_105.value,_105.value,_105.value));this.replaceSelectOption(_106,_genOptionString(_106.value,_106.value,_106.value));this.replaceSelectOption(_107,_genOptionString(_107.value,_107.value,_107.value));}_107.onchange=function(){Cytw.util.ajustYMDSelect(id,_f8,_f9,_107.value,_fb);};_105.onchange=function(){Cytw.util.ajustYMDSelect(id,_105.value,_f9,day,_fb);};_106.onchange=function(){Cytw.util.ajustYMDSelect(id,_f8,_106.value,day,_fb);};}catch(e){}},ajustYMDSelect2:function(_109,id,year,_10c,day){function _genOptionString(_10e,end,key){var _111="";for(var i=_10e;i<=end;i++){_111+=" <option value=\""+i+"\"";if(i==key){_111+="selected=\"selected\"";}_111+=" >"+i+"</option>";}return _111;}function _genOptionStringReverse(_113,end,key){var _116="";for(var i=_113;i>=end;i--){_116+=" <option value=\""+i+"\"";if(i==key){_116+="selected=\"selected\"";}_116+=" >"+i+"</option>";}return _116;}try{var _118=$(_109).cleanWhitespace();var _119=_118.childElements();var _11a=$(id).cleanWhitespace();var _11b=_11a.childElements();var _11c=1911;var _11d=new Date().getFullYear();var _11e=_119[0];var _11f=_11b[0];var _120=_11b[1];if(_11e.options.length==1||parseInt(_11e.value)!=parseInt(year)){_11e=this.replaceSelectOption(_11e,_genOptionStringReverse(_11d,_11c,year));}if(_11f.options.length==1||parseInt(_11f.value)!=parseInt(_10c)){_11f=this.replaceSelectOption(_11f,_genOptionString(1,12,_10c));}var days=this.getDaysInMonth(_10c,year);if(days!=_120.options.length){_120=this.replaceSelectOption(_120,_genOptionString(1,days,day));}_120.onchange=function(){Cytw.util.ajustYMDSelect2(_109,id,year,_10c,_120.value);};_11e.onchange=function(){Cytw.util.ajustYMDSelect2(_109,id,_11e.value,_10c,day);};_11f.onchange=function(){Cytw.util.ajustYMDSelect2(_109,id,year,_11f.value,day);};}catch(e){}},fckEditor:{attach_image:function(_122){var _123=FCKeditorAPI.GetInstance("content");if(_123.EditMode==FCK_EDITMODE_WYSIWYG){var myre=new RegExp("<embed");var _125=myre.test(_122);if(navigator.appVersion.indexOf("MSIE 6.0")>=0&&_125){this.putObjectTag(_122);}else{var _126=RegExp("<(s)?img");_125=_126.test(_122);if(_125){_123.InsertHtml(_122);}else{_123.InsertHtml("<img src=\""+_122+"\" />");}}}else{alert("You must be on WYSIWYG mode!");}},putObjectTag:function(A){var _128=A;var _129=FCKeditorAPI.GetInstance("content");var myre=new RegExp("<embed");var _12b=myre.test(_128);if(_12b){var tmp=_128.split("<embed");var tmp1=tmp[1].split("embed>");var tmp2="<embed wmode=\"transparent\" "+tmp1[0]+"embed>";}else{tmp2="";}_129.InsertHtml(tmp2);},setMedia:function(A){var _130=FCKeditorAPI.GetInstance("content");var exp3=/<object[\s\S]*?<\/object>/gi;var exp6=/<embed[\s\S]*?<\/embed>/gi;var _133=new RegExp(exp3);var _134;_134=_133.test(A);if(_134==false){_133=new RegExp(exp6);_134=_133.test(A);if(_134==false){return false;}}myre=new RegExp("<embed");el_val_chk=myre.test(A);if(el_val_chk){var tmp=A.split("<embed");var tmp1=tmp[1].split("embed>");var tmp2="<embed wmode=\"transparent\" "+tmp1[0]+"embed><BR /><BR />";}else{tmp2="";}var _138=$("folder_type").value;var _139=new Array();_139[0]=2458;_139[2]=2476;_139[5]=2495;hompy.putD(_139[_138],_138);if(_138&&_139[_138]){hompySendEventCode(_139[_138]);}_130.InsertHtml(tmp2);}},checkImgSize:function(obj,_13b){},imgSizeError:function(obj,src){obj.src=(src)?src:"http://img.tw.cyworld.com/image/banner/80_pic.jpg";},iPsObjImageResize:function(iobj){var _13f=new Image();_13f.src=iobj.src;if(Cytw.hompy.isHome2){var _140=650;}else{var _140=520;}if(_13f.width>_140){iobj.style.width=_140;}},dispatchMozillaLeftClick:function(obj){MozEvtLeftClick=document.createEvent("MouseEvents");MozEvtLeftClick.initMouseEvent("click",true,false,window,0,0,0,0,0,false,false,false,false,0,null);$(obj).dispatchEvent(MozEvtLeftClick);},dispatchLeftClick:function(obj){if(!Cytw.env.bo.ie){dispatchMozillaLeftClick($(obj));}else{var bol=$(obj).fireEvent("onclick");}},cmGetX:function(obj){var x=0;do{x+=obj.offsetLeft;obj=obj.offsetParent;}while(obj);return x;},cmGetY:function(obj){var y=0;do{y+=obj.offsetTop;obj=obj.offsetParent;}while(obj);return y;},copy2Clip:function(obj){if(obj){obj.select();document.execCommand("copy");}},toggle:function(id){if($(id)){$(id).toggle();}},getXmlValue:function(_14a,id){if(Cytw.lang.isString(id)&&Cytw.lang.isObject(_14a)){return xmlValue(_14a.getElementsByTagName(id)[0]);}else{return "";}}};var util=Cytw.util;try{if(Ajax&&Ajax.Request){Ajax.Request.prototype.abort=function(){this.transport.onreadystatechange=Prototype.emptyFunction;this.transport.abort();Ajax.activeRequestCount--;};Ajax.Responders.register({onComplete:function(_14c){if(Ajax.activeRequestCount<0){Ajax.activeRequestCount=0;}if(hompy&&$("MH_LoadingBlock")){var temp=_14c.url.match(/([a-z0-9\._\-]){0,}\php/gi);if(temp[0]){var md5=(util.hexMD5(temp[0]));if(hompy&&$("MH_LoadingBlock")){clearTimeout(hompy.arr_T_loadingShow[md5]);if($("MH_LoadingBlock").getAttribute("_flag")==md5){$("MH_LoadingBlock").hide();$("MH_LoadingBlock").setAttribute("_dont_show",0);$("MH_LoadingBlock").setAttribute("_flag","");}setTimeout(function(){if(Ajax.activeRequestCount==0&&$("MH_LoadingBlock").visible()){$("MH_LoadingBlock").hide();$("MH_LoadingBlock").setAttribute("_dont_show",0);$("MH_LoadingBlock").setAttribute("_flag","");}},2000);}}}},onCreate:function(_14f){var temp=_14f.url.match(/([a-z0-9\._\-]){0,}\php/gi);if(temp[0]){var md5=(util.hexMD5(temp[0]));if(hompy&&$("MH_LoadingBlock")){hompy.arr_T_loadingShow[md5]=setTimeout(function(){hompy.showLoading(md5);},800);}}},onException:function(_152,_153){Ajax.activeRequestCount--;if(Ajax.activeRequestCount<0){Ajax.activeRequestCount=0;}var temp=_152.url.match(/([a-z0-9\._\-]){0,}\php/gi);if(temp[0]){var md5=(util.hexMD5(temp[0]));if(hompy&&$("MH_LoadingBlock")){clearTimeout(hompy.arr_T_loadingShow[md5]);if($("MH_LoadingBlock").getAttribute("_flag")==md5){$("MH_LoadingBlock").hide();MH_LoadingBlock.setAttribute("_dont_show",0);}}}if(mhp.debug){var _156="There is an exception threw by the call back function of this request: \n"+_152.url;for(name in _153){_156+="\n"+"name: "+name+" content: "+_153[name];}alert(_156);}}});document.getElementsByAttribute=function(_157,_158,_159,_15a){var _15b=($(_158)||document.body).getElementsByTagName((_15a||"*"));return $A(_15b).inject([],function(_15c,_15d){var _15e=_15d.getAttribute(_157);if(_15e!=null){if(!_159||_15e==_159){_15c.push(_15d);}}return _15c;});};function init_Event_SoleElementSwitch(_15f){var _15f=_15f?"":_15f;var _160={sAttribute:"_switch",sEvent:"click",sInitUnaffect:"_switch_target",sUnaffect:"_switch_unaffect",sUnaffectSet:"_switch_unaffect_set",TurnOn:function(e){var _162=arguments[1];var _163=$(_162.getAttribute(this.sAttribute));if(!_163.getAttribute(this.sUnaffectSet)&&_162.getAttribute(this.sInitUnaffect)!="true"){var _164=$$("#"+_163.id+" *");for(var i=0;i<_164.length;i++){if(_164[i].getAttribute("_switch_turnoff")){continue;}_164[i].setAttribute(this.sUnaffect+"_"+_163.id,"true");}_163.setAttribute(this.sUnaffectSet,"true");}var _166={sEvent:this.sEvent,sUnaffect:this.sUnaffect,TurnOff:function(e){var _168=arguments[1];var _169=Event.element(e);if(_169.getAttribute(this.sUnaffect+"_"+_168.id)!="true"){Event.stopObserving(document,this.sEvent,_166.TurnOff);_168.hide();}}};if(!Element.visible(_163)){_166.TurnOff=_166.TurnOff.bindAsEventListener(_166,_163);Event.observe.delay(0.001,document,this.sEvent,_166.TurnOff);_163.show();var _16a=_162.getAttribute("_event_code");var _16b=_162.getAttribute("_bev_type");if(_16a&&_16b=="switch"){hompySendEventCode(_16a);}}}};var _16c=document.getElementsByAttribute(_160.sAttribute,_15f);for(i=0;i<_16c.length;i++){var _16d=_16c[i];Event.observe(_16d,_160.sEvent,_160.TurnOn.bindAsEventListener(_160,_16d));}}document.observe("click",sendEventCode);}}catch(e){}if(typeof (HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("outerHTML",function(){var a=this.attributes,str="<"+this.tagName,i=0;for(;i<a.length;i++){if(a[i].specified){str+=" "+a[i].name+"=\""+a[i].value+"\"";}}if(!this.canHaveChildren){return str+" />";}return str+">"+this.innerHTML+"</"+this.tagName+">";});HTMLElement.prototype.__defineSetter__("outerHTML",function(s){var r=this.ownerDocument.createRange();r.setStartBefore(this);var df=r.createContextualFragment(s);this.parentNode.replaceChild(df,this);return s;});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){return !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(this.tagName.toLowerCase());});}function sendEventCode(_174){if(Cytw&&Cytw.hompy){var _175=_174.element();var _176=_175.getAttribute("_event_code");var _177=_175.getAttribute("_bev_type");if(!_176&&(_175.parentNode)&&_175.parentNode.getAttribute){_176=_175.parentNode.getAttribute("_event_code");_177=_175.parentNode.getAttribute("_bev_type");}if(_176&&_177!="switch"){hompySendEventCode(_176);}}}function removejscssfile(_178,_179){var _17a=(_179=="js")?"script":(_179=="css")?"link":"none";var _17b=(_179=="js")?"src":(_179=="css")?"href":"none";var _17c=document.getElementsByTagName(_17a);hompy.putD(_17a,_17b);for(var i=_17c.length;i>=0;i--){}}
