/*
 * Copyright (c) 2005  Tom Wu
 * All Rights Reserved.
 * See "LICENSE" for details. 
 */
var dbits;var canary=244837814094590;var j_lm=((canary&16777215)==15715070);function BigInteger(e,d,f){if(e!=null){if("number"==typeof e){this.fromNumber(e,d,f);}else{if(d==null&&"string"!=typeof e){this.fromString(e,256);}else{this.fromString(e,d);}}}}function nbi(){return new BigInteger(null);}function am1(f,a,b,e,h,g){while(--g>=0){var d=a*this[f++]+b[e]+h;h=Math.floor(d/67108864);b[e++]=d&67108863;}return h;}function am2(f,q,r,e,o,a){var k=q&32767,p=q>>15;while(--a>=0){var d=this[f]&32767;var g=this[f++]>>15;var b=p*d+g*k;d=k*d+((b&32767)<<15)+r[e]+(o&1073741823);o=(d>>>30)+(b>>>15)+p*g+(o>>>30);r[e++]=d&1073741823;}return o;}function am3(f,q,r,e,o,a){var k=q&16383,p=q>>14;while(--a>=0){var d=this[f]&16383;var g=this[f++]>>14;var b=p*d+g*k;d=k*d+((b&16383)<<14)+r[e]+o;o=(d>>28)+(b>>14)+p*g;r[e++]=d&268435455;}return o;}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30;}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26;}else{BigInteger.prototype.am=am3;
dbits=28;}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<<dbits)-1);BigInteger.prototype.DV=(1<<dbits);var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array();var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv){BI_RC[rr++]=vv;}rr="a".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv;}rr="A".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv;}function int2char(a){return BI_RM.charAt(a);}function intAt(b,a){var d=BI_RC[b.charCodeAt(a)];return(d==null)?-1:d;}function bnpCopyTo(b){for(var a=this.t-1;a>=0;--a){b[a]=this[a];}b.t=this.t;b.s=this.s;}function bnpFromInt(a){this.t=1;this.s=(a<0)?-1:0;if(a>0){this[0]=a;}else{if(a<-1){this[0]=a+DV;}else{this.t=0;}}}function nbv(a){var b=nbi();b.fromInt(a);return b;}function bnpFromString(h,c){var e;if(c==16){e=4;}else{if(c==8){e=3;}else{if(c==256){e=8;}else{if(c==2){e=1;}else{if(c==32){e=5;}else{if(c==4){e=2;}else{this.fromRadix(h,c);
return;}}}}}}this.t=0;this.s=0;var g=h.length,d=false,f=0;while(--g>=0){var a=(e==8)?h[g]&255:intAt(h,g);if(a<0){if(h.charAt(g)=="-"){d=true;}continue;}d=false;if(f==0){this[this.t++]=a;}else{if(f+e>this.DB){this[this.t-1]|=(a&((1<<(this.DB-f))-1))<<f;this[this.t++]=(a>>(this.DB-f));}else{this[this.t-1]|=a<<f;}}f+=e;if(f>=this.DB){f-=this.DB;}}if(e==8&&(h[0]&128)!=0){this.s=-1;if(f>0){this[this.t-1]|=((1<<(this.DB-f))-1)<<f;}}this.clamp();if(d){BigInteger.ZERO.subTo(this,this);}}function bnpClamp(){var a=this.s&this.DM;while(this.t>0&&this[this.t-1]==a){--this.t;}}function bnToString(c){if(this.s<0){return"-"+this.negate().toString(c);}var e;if(c==16){e=4;}else{if(c==8){e=3;}else{if(c==2){e=1;}else{if(c==32){e=5;}else{if(c==4){e=2;}else{return this.toRadix(c);}}}}}var g=(1<<e)-1,l,a=false,h="",f=this.t;var j=this.DB-(f*this.DB)%e;if(f-->0){if(j<this.DB&&(l=this[f]>>j)>0){a=true;h=int2char(l);}while(f>=0){if(j<e){l=(this[f]&((1<<j)-1))<<(e-j);l|=this[--f]>>(j+=this.DB-e);}else{l=(this[f]>>(j-=e))&g;if(j<=0){j+=this.DB;
--f;}}if(l>0){a=true;}if(a){h+=int2char(l);}}}return a?h:"0";}function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a;}function bnAbs(){return(this.s<0)?this.negate():this;}function bnCompareTo(b){var d=this.s-b.s;if(d!=0){return d;}var c=this.t;d=c-b.t;if(d!=0){return d;}while(--c>=0){if((d=this[c]-b[c])!=0){return d;}}return 0;}function nbits(a){var c=1,b;if((b=a>>>16)!=0){a=b;c+=16;}if((b=a>>8)!=0){a=b;c+=8;}if((b=a>>4)!=0){a=b;c+=4;}if((b=a>>2)!=0){a=b;c+=2;}if((b=a>>1)!=0){a=b;c+=1;}return c;}function bnBitLength(){if(this.t<=0){return 0;}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));}function bnpDLShiftTo(c,b){var a;for(a=this.t-1;a>=0;--a){b[a+c]=this[a];}for(a=c-1;a>=0;--a){b[a]=0;}b.t=this.t+c;b.s=this.s;}function bnpDRShiftTo(c,b){for(var a=c;a<this.t;++a){b[a-c]=this[a];}b.t=Math.max(this.t-c,0);b.s=this.s;}function bnpLShiftTo(j,e){var b=j%this.DB;var a=this.DB-b;var g=(1<<a)-1;var f=Math.floor(j/this.DB),h=(this.s<<b)&this.DM,d;for(d=this.t-1;d>=0;--d){e[d+f+1]=(this[d]>>a)|h;
h=(this[d]&g)<<b;}for(d=f-1;d>=0;--d){e[d]=0;}e[f]=h;e.t=this.t+f+1;e.s=this.s;e.clamp();}function bnpRShiftTo(g,d){d.s=this.s;var e=Math.floor(g/this.DB);if(e>=this.t){d.t=0;return;}var b=g%this.DB;var a=this.DB-b;var f=(1<<b)-1;d[0]=this[e]>>b;for(var c=e+1;c<this.t;++c){d[c-e-1]|=(this[c]&f)<<a;d[c-e]=this[c]>>b;}if(b>0){d[this.t-e-1]|=(this.s&f)<<a;}d.t=this.t-e;d.clamp();}function bnpSubTo(d,f){var e=0,g=0,b=Math.min(d.t,this.t);while(e<b){g+=this[e]-d[e];f[e++]=g&this.DM;g>>=this.DB;}if(d.t<this.t){g-=d.s;while(e<this.t){g+=this[e];f[e++]=g&this.DM;g>>=this.DB;}g+=this.s;}else{g+=this.s;while(e<d.t){g-=d[e];f[e++]=g&this.DM;g>>=this.DB;}g-=d.s;}f.s=(g<0)?-1:0;if(g<-1){f[e++]=this.DV+g;}else{if(g>0){f[e++]=g;}}f.t=e;f.clamp();}function bnpMultiplyTo(c,e){var b=this.abs(),f=c.abs();var d=b.t;e.t=d+f.t;while(--d>=0){e[d]=0;}for(d=0;d<f.t;++d){e[d+b.t]=b.am(0,f[d],e,d,0,b.t);}e.s=0;e.clamp();if(this.s!=c.s){BigInteger.ZERO.subTo(e,e);}}function bnpSquareTo(d){var a=this.abs();var b=d.t=2*a.t;while(--b>=0){d[b]=0;
}for(b=0;b<a.t-1;++b){var e=a.am(b,a[b],d,2*b,0,1);if((d[b+a.t]+=a.am(b+1,2*a[b],d,2*b+1,e,a.t-b-1))>=a.DV){d[b+a.t]-=a.DV;d[b+a.t+1]=1;}}if(d.t>0){d[d.t-1]+=a.am(b,a[b],d,2*b,0,1);}d.s=0;d.clamp();}function bnpDivRemTo(n,h,g){var w=n.abs();if(w.t<=0){return;}var k=this.abs();if(k.t<w.t){if(h!=null){h.fromInt(0);}if(g!=null){this.copyTo(g);}return;}if(g==null){g=nbi();}var d=nbi(),a=this.s,l=n.s;var v=this.DB-nbits(w[w.t-1]);if(v>0){w.lShiftTo(v,d);k.lShiftTo(v,g);}else{w.copyTo(d);k.copyTo(g);}var p=d.t;var b=d[p-1];if(b==0){return;}var o=b*(1<<this.F1)+((p>1)?d[p-2]>>this.F2:0);var A=this.FV/o,z=(1<<this.F1)/o,x=1<<this.F2;var u=g.t,s=u-p,f=(h==null)?nbi():h;d.dlShiftTo(s,f);if(g.compareTo(f)>=0){g[g.t++]=1;g.subTo(f,g);}BigInteger.ONE.dlShiftTo(p,f);f.subTo(d,d);while(d.t<p){d[d.t++]=0;}while(--s>=0){var c=(g[--u]==b)?this.DM:Math.floor(g[u]*A+(g[u-1]+x)*z);if((g[u]+=d.am(0,c,g,s,0,p))<c){d.dlShiftTo(s,f);g.subTo(f,g);while(g[u]<--c){g.subTo(f,g);}}}if(h!=null){g.drShiftTo(p,h);if(a!=l){BigInteger.ZERO.subTo(h,h);
}}g.t=p;g.clamp();if(v>0){g.rShiftTo(v,g);}if(a<0){BigInteger.ZERO.subTo(g,g);}}function bnMod(b){var c=nbi();this.abs().divRemTo(b,null,c);if(this.s<0&&c.compareTo(BigInteger.ZERO)>0){b.subTo(c,c);}return c;}function Classic(a){this.m=a;}function cConvert(a){if(a.s<0||a.compareTo(this.m)>=0){return a.mod(this.m);}else{return a;}}function cRevert(a){return a;}function cReduce(a){a.divRemTo(this.m,null,a);}function cMulTo(a,c,b){a.multiplyTo(c,b);this.reduce(b);}function cSqrTo(a,b){a.squareTo(b);this.reduce(b);}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0;}var a=this[0];if((a&1)==0){return 0;}var b=a&3;b=(b*(2-(a&15)*b))&15;b=(b*(2-(a&255)*b))&255;b=(b*(2-(((a&65535)*b)&65535)))&65535;b=(b*(2-a*b%this.DV))%this.DV;return(b>0)?this.DV-b:-b;}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(a.DB-15))-1;
this.mt2=2*a.t;}function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);if(a.s<0&&b.compareTo(BigInteger.ZERO)>0){this.m.subTo(b,b);}return b;}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b;}function montReduce(a){while(a.t<=this.mt2){a[a.t++]=0;}for(var c=0;c<this.m.t;++c){var b=a[c]&32767;var d=(b*this.mpl+(((b*this.mph+(a[c]>>15)*this.mpl)&this.um)<<15))&a.DM;b=c+this.m.t;a[b]+=this.m.am(0,d,a,c,0,this.m.t);while(a[b]>=a.DV){a[b]-=a.DV;a[++b]++;}}a.clamp();a.drShiftTo(this.m.t,a);if(a.compareTo(this.m)>=0){a.subTo(this.m,a);}}function montSqrTo(a,b){a.squareTo(b);this.reduce(b);}function montMulTo(a,c,b){a.multiplyTo(c,b);this.reduce(b);}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0;}function bnpExp(h,j){if(h>4294967295||h<1){return BigInteger.ONE;
}var f=nbi(),a=nbi(),d=j.convert(this),c=nbits(h)-1;d.copyTo(f);while(--c>=0){j.sqrTo(f,a);if((h&(1<<c))>0){j.mulTo(a,d,f);}else{var b=f;f=a;a=b;}}return j.revert(f);}function bnModPowInt(b,a){var c;if(b<256||a.isEven()){c=new Classic(a);}else{c=new Montgomery(a);}return this.exp(b,c);}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;
BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function Arcfour(){this.i=0;this.j=0;this.S=new Array();}function ARC4init(d){var c,a,b;for(c=0;c<256;++c){this.S[c]=c;}a=0;for(c=0;c<256;++c){a=(a+this.S[c]+d[c%d.length])&255;b=this.S[c];this.S[c]=this.S[a];this.S[a]=b;}this.i=0;this.j=0;}function ARC4next(){var a;this.i=(this.i+1)&255;this.j=(this.j+this.S[this.i])&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[(a+this.S[this.i])&255];}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour();}var rng_psize=256;var rng_state;var rng_pool;var rng_pptr;function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=(a>>8)&255;rng_pool[rng_pptr++]^=(a>>16)&255;rng_pool[rng_pptr++]^=(a>>24)&255;if(rng_pptr>=rng_psize){rng_pptr-=rng_psize;}}function rng_seed_time(){rng_seed_int(new Date().getTime());}if(rng_pool==null){rng_pool=new Array();rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t){rng_pool[rng_pptr++]=z.charCodeAt(t)&255;}}while(rng_pptr<rng_psize){t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=t>>>8;rng_pool[rng_pptr++]=t&255;}rng_pptr=0;rng_seed_time();}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr){rng_pool[rng_pptr]=0;}rng_pptr=0;}return rng_state.next();}function rng_get_bytes(b){var a;for(a=0;a<b.length;++a){b[a]=rng_get_byte();}}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
function parseBigInt(b,a){return new BigInteger(b,a);}function linebrk(c,d){var a="";var b=0;while(b+d<c.length){a+=c.substring(b,b+d)+"\n";b+=d;}return a+c.substring(b,c.length);}function byte2Hex(a){if(a<16){return"0"+a.toString(16);}else{return a.toString(16);}}function pkcs1pad2(e,h){if(h<e.length+11){alert("Message too long for RSA");return null;}var g=new Array();var d=e.length-1;while(d>=0&&h>0){var f=e.charCodeAt(d--);if(f<128){g[--h]=f;}else{if((f>127)&&(f<2048)){g[--h]=(f&63)|128;g[--h]=(f>>6)|192;}else{g[--h]=(f&63)|128;g[--h]=((f>>6)&63)|128;g[--h]=(f>>12)|224;}}}g[--h]=0;var b=new SecureRandom();var a=new Array();while(h>2){a[0]=0;while(a[0]==0){b.nextBytes(a);}g[--h]=a[0];}g[--h]=2;g[--h]=0;return new BigInteger(g);}function RSAKey(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null;}function RSASetPublic(b,a){if(b!=null&&a!=null&&b.length>0&&a.length>0){this.n=parseBigInt(b,16);this.e=parseInt(a,16);}else{alert("Invalid RSA public key");}}function RSADoPublic(a){return a.modPowInt(this.e,this.n);
}function RSAEncrypt(d){var a=pkcs1pad2(d,(this.n.bitLength()+7)>>3);if(a==null){return null;}var e=this.doPublic(a);if(e==null){return null;}var b=e.toString(16);if((b.length&1)==0){return b;}else{return"0"+b;}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;if(typeof LOGIN==="undefined"){LOGIN=function(){};}LOGIN._NEOSERVICES=["CH_TR","TR","SHOTONLINE","K_SUNONLINE","K_BATOO","K_MA9","PUPPYRED","K_HON","K_12SKY2","K_FSTYLE"];LOGIN.DOWNLOAD_URL="http://images.hangame.co.kr/static/patch/한게임 보안로그인 3단계 모듈.exe";LOGIN.isNeoService=function(b){if(STR.isBlank(b)){return false;}b=b.toUpperCase();for(var a=0;a<LOGIN._NEOSERVICES.length;a++){if(b===LOGIN._NEOSERVICES[a]){return true;}}return false;};LOGIN.setLoginTage=function(){};function gomember(a){if(a==0){top.location.href=HG.urls.memberssl+"/register/index.nhn?docref="+escape(top.location.href);}else{if(a==1){C.openWin(HG.urls.memberssl+"/auth/findidpwd.nhn?m=findid","hangame",{width:"460",height:"440",scroll:"no",resize:"yes",status:"no"});}else{if(a==2){C.openWin(HG.urls.eventpark+"/common/security/hangameSSL.html","hangame",{width:"385",height:"420",scroll:"no",resize:"yes",status:"no"});}else{if(a==3){C.openWin(HG.urls.eventpark+"/common/security/enc_help1.html","hangame",{width:"570",height:"650",scroll:"no",resize:"yes",status:"no"});
}else{if(a==4){C.openWin(HG.urls.eventpark+"/common/security/enc_help2.html","hangame",{width:"570",height:"650",scroll:"no",resize:"yes",status:"no"});}else{if(a==5){C.openWin(HG.urls.memberssl+"/auth/findidpwd.nhn?m=findid","hangame",{width:"460",height:"440",scroll:"no",resize:"yes",status:"no"});}else{if(a==6){C.openWin(HG.urls.memberssl+"/auth/findidpwd.nhn?m=findpwd","hangame",{width:"460",height:"470",scroll:"no",resize:"yes",status:"no"});}}}}}}}}function CKKeyProInstall(){C.debug("CKKeyProInstall");document.location.href=LOGIN.DOWNLOAD_URL;}function onActiveXInst(){C.debug("onActiveXInst");var a=document.getElementById("waitframe");if(typeof a==="undefined"||a==null){a=document.createElement("<iframe name='waitframe' id='waitframe' frameborder='0' height='0' width='0' style='display:none;' src='about:blank'></iframe>");document.body.appendChild(a);}C.get("waitframe").src="/common/waitInst.nhn?wait=8&cwait=0";return false;}LOGIN.isNHNdomain=function(){var a=document.domain;if(a.indexOf("hangame.com")>=0||a.indexOf("naver.com")>=0||a.indexOf("nhncorp.com")>=0){return true;
}else{return false;}};LOGIN.getCookieValue=function(d){var a,c=document.cookie.split("; ");for(var b=0;b<c.length;b++){a=c[b].split("=");if(d.toLowerCase()==unescape(a[0].toLowerCase())){return a[1];}}return"";};LOGIN.isHangameLogined=function(){var a=LOGIN.getCookieValue("HG_LOGIN");if(a.length>0){return true;}else{return false;}};LOGIN.checkSSLCookie=function(){return document.cookie.indexOf("CAT=N")==-1?true:false;};LOGIN.getSSLCookieValue=function(){var b=LOGIN.getCookieValue("CAT");if(b.length>0){var a=b.split("+");if(a.length>1){return a[1];}}return"2";};if(typeof LOGIN==="undefined"){LOGIN=function(){};}LOGIN.openPopup=function(b){var a=HG.urls.ids+"/wlogin.nhn?popup=true";if(STR.isEmpty(b)){a+="&popclose=Y&nxtURL=";}else{a+="&popclose=N&nxtURL="+encodeURIComponent(b);}C.openWin(a,"Wlogin",C.winOptionPopup);};LOGIN.isHangameLoggined=function(){};LOGIN.goMember=function(){};LOGIN.goUserMove=function(){};LOGIN.logout=function(){};if(typeof LOGIN==="undefined"){LOGIN=[];}LOGIN.FLASH=[];LOGIN._FLASH_LOADED=false;LOGIN._FLASH_ID="login_flash_swf";LOGIN._FLASH_CONTAINER="login_flash";LOGIN._FLASH_SWF_RENEWAL_URL="http://images.hangame.co.kr/static/flashlogin/Login_20100303.swf";LOGIN.isFlashExists=function(){var b=nhn.FlashObject.find(LOGIN._FLASH_ID);C.debug("objFlash",b);if((typeof b==="undefined"||b==null)){return false;}if(!LOGIN._FLASH_LOADED){return false;}try{b.setID(LOGIN._SAVEDID);}catch(a){return false;}return true;};LOGIN.getFlash=function(){return nhn.FlashObject.find(LOGIN._FLASH_ID);};LOGIN.isAllowedFlashVersion=function(){return nhn.FlashObject.isLaterVersion(9,0,124);};LOGIN.ensureFlashLoaded=function(b,e,d){var a=LOGIN.isFlashExists();C.debug("isLoaded",a);var f=jindo.$Agent().flash();C.debug("oFlash",f);if(!f.installed){e("installed");return;}var c=LOGIN.isAllowedFlashVersion();C.debug("_isAllowedflashVersion",c);if(!c){e("installed");return;}if(!a){nhn.FlashObject.showAt(LOGIN._FLASH_CONTAINER,d);}else{if(typeof b==="function"){b();
}}};LOGIN.FLASH._enc="";LOGIN.FLASH.getEncValue=function(){var a={success:true,reason:0,exception:null,secval:null,seckeyname:null};var b=LOGIN.FLASH._enc.split(",");if(b[1]==null){a.success=false;a.reason=1;}else{a.seckeyname=b[0];a.secval=b[1];}return a;};function getID(){return LOGIN._SAVEDID;}function setID(a){if(a!==""){LOGIN._SAVEDID=a;}}function getSessionKey(){var a=null;LOGIN.KeyManager.getKey(function(d){a=d;});try{var c=a.session+","+a.name+","+a.evalue+","+a.nvalue;C.debug("session key",c);return c;}catch(b){return"";}}function sendEncryptData(c,a,b){C.debug("id",c,"pwLength",a,"enc_data(encrypt)",b);LOGIN.FLASH._enc=b;}function capsLockToggled(a){C.debug("capslock status",a);if(typeof LOGIN._OPTIONS.onCapslock==="function"){LOGIN._OPTIONS.onCapslock(true);}}function showMessage(b){var a;switch(b){case"IDWasEmpty":a=LOGIN.VALIDATE_EMPTY_ID;break;case"PasswdWasEmpty":a=LOGIN.VALIDATE_EMPTY_PW;break;default:break;}alert(a);LOGIN.FLASH.setFocus();}function loadComplete(){C.debug("flash load complete");
LOGIN._FLASH_LOADED=true;LOGIN.trySecureKeyLoading();}function KeyDown(){LOGIN.trySecureKeyLoading();}function passwordEnter(){LOGIN.action();}LOGIN.FLASH.setFocus=function(){nhn.FlashObject.find(LOGIN._FLASH_ID).focus();nhn.FlashObject.find(LOGIN._FLASH_ID).focusing();};function changeStep(a){if(a==2){nhn.FlashObject.find(LOGIN._FLASH_ID).focus();}else{nhn.FlashObject.find(LOGIN._FLASH_ID).killfocus();}nhn.FlashObject.find(LOGIN._FLASH_ID).changeStep(a);}function killfocus(){nhn.FlashObject.find(LOGIN._FLASH_ID).killfocus();}if(typeof LOGIN==="undefined"){LOGIN=[];}LOGIN.MODE_NONE=0;LOGIN.MODE_JS=1;LOGIN.MODE_FLASH=2;LOGIN.MODE_ACTIVEX=3;LOGIN._beforeSecureMode=null;LOGIN._currentSecureMode=null;LOGIN._FORM=null;LOGIN._ID="turtle2";LOGIN._PW="earthworm2";LOGIN._PW2="PW@";LOGIN._DEFAULTOPTIONS={AREA_IDPW:"login_box",AREA_FLASH:"login_flash",AREA_ACTIVEX:"login_activex",SLIDER:"new_login_slider",CHECKBOX:"ajax_checkbox",ACTIVEX_IFRAME_URL:"./iframe_activex.jsp"};LOGIN._OPTIONS=LOGIN._DEFAULTOPTIONS;LOGIN._CHECKBOXIMG={IMG_CHECK_OFF:"http://images.hangame.co.kr/hangame/main/login/check_off.gif",IMG_CHECK_ON:"http://images.hangame.co.kr/hangame/main/login/check_on.gif",IMG_UNCHECK_OFF:"http://images.hangame.co.kr/hangame/main/login/uncheck_off.gif",IMG_UNCHECK_ON:"http://images.hangame.co.kr/hangame/main/login/uncheck_on.gif"};LOGIN.VALIDATE_EMPTY_ID="아이디를 입력해 주세요.";LOGIN.VALIDATE_EMPTY_PW="비밀번호를 입력해 주세요.";LOGIN.VALIDATE_EMPTY_SOCIALID="주민등록번호를 입력해 주세요.";LOGIN.VALIDATE_OVER_SOCIALID="주민등록번호를 올바르게 입력해주세요.";LOGIN.VALIDATE_EMPTY_NAME="이름을 입력해 주세요.";
LOGIN.VALIDATE_SPECIALCHAR_ID="아이디에 특수문자는 입력할 수 없습니다.";LOGIN.VALIDATE_SPECIALCHAR_PW="비밀번호에 특수문자는 입력할 수 없습니다.";LOGIN.BJUMIN="${param.bJumin}";LOGIN.BOANERR="${param.boanerr}";LOGIN.IPINUSER="${param.ipinuser}";LOGIN.FLAGS={};LOGIN.FLAGS.NEO=false;LOGIN.FLAGS.MAIN=false;LOGIN.FLAGS.CUSTOMER=false;LOGIN.FLAGS.PUBLISHING=false;LOGIN.FLAGS.OTHER=false;LOGIN.FLAGS.OBGATE=false;LOGIN.FLAGS.COMMON_SECURE=false;LOGIN._SAVEDID="";LOGIN.checkbox=null;LOGIN.slider=null;LOGIN.oCheck=null;LOGIN.DO_PHASE_CHANGE=function(a,b){$j("#login_steptxt").text(a);};LOGIN.DO_CAPSLOCK=function(isCapslockOn){var strHideCapsLock='$j("#CapslockInfo").hide();';if(isCapslockOn){$j("#CapslockInfo").show();setTimeout(strHideCapsLock,2000);}else{eval(strHideCapsLock);}};LOGIN.initCheckbox=function(){var a=false;C.debug("LOGIN.checkSSLCookie()",LOGIN.checkSSLCookie());if(LOGIN.checkSSLCookie()){a=true;}C.get("agree").style.visibility="visible";LOGIN.checkbox=new nhn.CheckBox(jindo.$("ajax_checkbox"),{classPrefix:"checkbox-"}).attach({beforeChange:function(b){C.debug(b);
},change:function(b){C.debug(b);}});LOGIN.checkbox.setChecked(a);};LOGIN._findNearst=function(e){if(arguments.length<1){return null;}var c;var b;var d;var a=0;for(a=1;a<arguments.length;a++){d=Math.abs(e-arguments[a]);if(d<b||typeof c==="undefined"){c=arguments[a];b=d;}}return c;};LOGIN.initSlider=function(a,d){C.debug("쿠키 보안레벨",LOGIN.getSSLCookieValue());var c=LOGIN.getSSLCookieValue();LOGIN.slider=new nhn.Slider(jindo.$(LOGIN._OPTIONS.SLIDER),{minValue:1,maxValue:3});var b={min:0,mid:0,max:0};LOGIN.slider.values(0,1,false);b.min=LOGIN.slider.positions()[0];LOGIN.slider.values(0,2,false);b.mid=LOGIN.slider.positions()[0];LOGIN.slider.values(0,3,false);b.max=LOGIN.slider.positions()[0];C.debug("Slider position",b);LOGIN.slider.attach({beforechange:function(e){if(e.pos<b.min){e.pos=b.min;}else{if(e.pos>b.max){e.pos=b.max;}else{e.pos=LOGIN._findNearst(e.pos,b.min,b.mid,b.max);}}},change:function(f){var e=Math.round(f.value);C.debug("round",e);LOGIN.sliderCallback(e);}});LOGIN._currentSecureMode=c;LOGIN.slider.values(0,c,true);
LOGIN.setSecureMode(Math.round(LOGIN.slider.values()[0]),true);};LOGIN.sliderCallback=function(a){if(typeof a!=="number"){a=parseInt(a,10);}if(a<1||a>3){a=1;}LOGIN.setSecureMode(a);};function closePopup(a){LOGIN.slider.values(0,a,true);LOGIN.setSecureMode(a,true);}LOGIN.getSecureLevel=function(){var a;try{a=LOGIN.slider.values();}catch(b){a=parent.LOGIN.slider.values();}if(typeof a!=="undefined"){return a[0];}return null;};LOGIN.setSecureMode=function(i,a){a=typeof a!=="undefined"?a:false;if(i==LOGIN._currentSecureMode&&!a){return;}LOGIN.initMessageLayer();var d;try{d=LOGIN.getFlash();if(LOGIN._currentSecureMode===LOGIN.MODE_JS||LOGIN._currentSecureMode===LOGIN.MODE_ACTIVEX){if(typeof LOGIN.getCurrentIDField()==="object"){LOGIN._SAVEDID=LOGIN.getCurrentIDField().value;}}}catch(j){C.debug("ax exception",j);LOGIN._SAVEDID="";}finally{if(typeof d!=="undefined"&&d){try{d.changeStep(i);}catch(j){}}}C.debug("SAVED ID",LOGIN._SAVEDID);if(i==LOGIN.MODE_JS){var b=null;var h=null;try{b=C.get(LOGIN._ID);b.value=LOGIN._SAVEDID;
h=C.get(LOGIN._PW);h.value="";LOGIN._doInputStatusChange(b,"ID",false);LOGIN._doInputStatusChange(h,"PASSWORD",false);}catch(j){C.debug(j);}}else{if(i==LOGIN.MODE_FLASH){var f=function(){C.debug("flash inited.");};var k=function(l){C.debug("플래시 초기화 에러.",l);if(l=="installed"){var e={nLevel:"1",title:"ly_txt_setflash",btn01:"ly_btn_loginstep1",brn01_alt:"설치하기"};LOGIN.loadMessageLayer(e,LOGIN.closeMessageLayer);}else{if(l=="loading"){var e={nLevel:"1",title:"ly_txt_step2_failure"};LOGIN.loadMessageLayer(e,LOGIN.closeMessageLayer);}else{var e={nLevel:"1",title:"ly_txt_step2_failure"};LOGIN.loadMessageLayer(e,LOGIN.closeMessageLayer);}}};if(typeof LOGIN._OPTIONS.FLASH_TAG!=="undefined"){LOGIN.ensureFlashLoaded(f,k,LOGIN._OPTIONS.FLASH_TAG);}else{throw"flash_tag is not defined";}}else{if(i==LOGIN.MODE_ACTIVEX){var c=jindo.$Agent().navigator();if(c.ie){g=C.get(LOGIN._OPTIONS.ACTIVEX_IFRAME);if(g){g.src=LOGIN._OPTIONS.ACTIVEX_IFRAME_URL;}}}}}LOGIN._beforeSecureMode=LOGIN._currentSecureMode;LOGIN._currentSecureMode=i;LOGIN.paintForm();
var g=null;if(LOGIN._beforeSecureMode==LOGIN.MODE_ACTIVEX&&i!=LOGIN.MODE_ACTIVEX){g=LOGIN.getActiveXFrame();if(g){try{g.contentWindow.document.innerHTML="";g.src="about:blank";}catch(j){}}}setTimeout(LOGIN.trySecureKeyLoading);};LOGIN._oCoverLayer;LOGIN._setupCoverLayer=function(){LOGIN._oCoverLayer=document.createElement("div");LOGIN._oCoverLayer.id=C.getUniqueId("activexframe_coverframe");var b=C.get(LOGIN._OPTIONS.ACTIVEX_IFRAME);LOGIN._oCoverLayer.className=b.className;var c;for(c in b.style){try{LOGIN._oCoverLayer[c]=b.style[c];}catch(f){}}var d;var a=function(k){var h;if(k&&k.parentNode){h=k.parentNode;}else{return $j("body").css("background-color");}var g;try{var i;if(document.defaultView&&document.defaultView.getComputedStyle){i=document.defaultView.getComputedStyle(h,null);g=i.getPropertyValue("background-color");}else{if(document.body.currentStyle){i=h.parentNode.currentStyle;g=i.backgroundColor;}}if(g=="transparent"){g=a(h);}return g;}catch(j){g=$j("body").css("background-color");}};d=a(b);LOGIN._oCoverLayer.style.position="absolute";
LOGIN._oCoverLayer.style.display="none";LOGIN._oCoverLayer.style.zIndex=$j("#"+LOGIN._OPTIONS.ACTIVEX_IFRAME).css("z-index");LOGIN._oCoverLayer.style.backgroundColor=d;b.parentNode.insertBefore(LOGIN._oCoverLayer,b);C.addEvent(b,"onload",function(){if(typeof LOGIN._oCoverLayer==="object"){$j(LOGIN._oCoverLayer).hide();}});};LOGIN.bindElement=function(e,a){e=C.get(e);if(typeof e==="undefined"){return;}LOGIN._FORM=e;var b=e[LOGIN._ID];if(typeof b==="undefined"){throw"id field is not defined";}C.addEvent(b,"onclick",function(){LOGIN._doInputStatusChange(b,"ID",true);});C.addEvent(b,"onfocus",function(){LOGIN._doInputStatusChange(b,"ID",true);});C.addEvent(b,"onfocus",LOGIN.trySecureKeyLoading);C.addEvent(b,"onblur",function(){LOGIN._doInputStatusChange(b,"ID",false);});C.addEvent(b,"onkeypress",function(f){LOGIN.processInputKey(f,"ID");});var d=e[LOGIN._PW];if(typeof d==="undefined"){throw"pw field is not defined";}C.addEvent(d,"onclick",function(){LOGIN._doInputStatusChange(d,"PASSWORD",true);});C.addEvent(d,"onfocus",function(){LOGIN._doInputStatusChange(d,"PASSWORD",true);
});C.addEvent(d,"onfocus",LOGIN.processCapslock);C.addEvent(d,"onblur",function(){LOGIN._doInputStatusChange(d,"PASSWORD",false);});C.addEvent(d,"onkeypress",function(f){LOGIN.processInputKey(f,"PW");});C.addEvent(d,"onkeypress",LOGIN.processCapslock);C.addEvent(d,"onkeypress",LOGIN.trySecureKeyLoading);if(typeof a==="object"){$j.each(a,function(f,g){LOGIN._OPTIONS[f]=g;});}if(typeof LOGIN._OPTIONS.SUBMIT_BUTTON!=="undefined"){var c=C.get(LOGIN._OPTIONS.SUBMIT_BUTTON);C.addEvent(c,"onclick",LOGIN.action);}LOGIN._setupCoverLayer();LOGIN.initFlags();LOGIN.initSlider();LOGIN.initCheckbox();};LOGIN.initFlags=function(){if(typeof LOGIN._FORM.svctype==="object"){LOGIN.FLAGS.PUBLISHING=(LOGIN._FORM.svctype.value==="publishing");}if(typeof LOGIN._FORM.serviceid==="object"){LOGIN.FLAGS.NEO=LOGIN.isNeoService(LOGIN._FORM.serviceid.value);}};LOGIN._doInputStatusChange=function(c,b,a){if(typeof LOGIN._OPTIONS.onDefaultStatusChange==="function"){LOGIN._OPTIONS.onDefaultStatusChange(c,b,a);}};LOGIN.getActiveXFrame=function(){var a=C.get(LOGIN._OPTIONS.ACTIVEX_IFRAME);
return a;};LOGIN.getCurrentIDField=function(){if(LOGIN._currentSecureMode==LOGIN.MODE_JS){return document.getElementById(LOGIN._ID);}if(LOGIN._currentSecureMode==LOGIN.MODE_FLASH){return null;}if(LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){var a=LOGIN.getActiveXFrame();if(a){if(typeof a.contentWindow.LOGIN!=="undefined"){return a.contentWindow.LOGIN.AX.getIDField();}}}};LOGIN.getCurrentPWField=function(){if(LOGIN._currentSecureMode==LOGIN.MODE_JS){return document.getElementById(LOGIN._PW);}if(LOGIN._currentSecureMode==LOGIN.MODE_FLASH){return null;}if(LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){var a=LOGIN.getActiveXFrame();if(a){return a.contentWindow.LOGIN.AX.getPWField();}}};LOGIN.validate=function(){var b={success:false,reason:0,exception:null};var a=LOGIN.getCurrentIDField();if(typeof a==="undefined"||a==null){b.reason=10;return b;}var c=LOGIN.getCurrentPWField();if(typeof c==="undefined"||c==null){b.reason=11;return b;}if(STR.isBlank(a.value)){b.reason=20;return b;}if(STR.isBlank(c.value)){b.reason=21;
return b;}if(STR.contains(a.value,",")){b.reason=22;return b;}if(STR.contains(c.value,",")){b.reason=23;return b;}b.success=true;return b;};LOGIN.processInputKey=function(d,b){var a=new jindo.$Event(d);var c=a.key().keyCode;C.debug("process",a.element.name,b,c);if(c==13){a.stop();if(b=="ID"){try{var f=LOGIN.getCurrentPWField();f.focus();}catch(d){C.debug(d);}return;}if(b=="PW"){LOGIN.action();}}};LOGIN.processCapslock=function(f){var b=new jindo.$Event(f);var d=b.key();var c=d.keyCode;var a=(c>64&&c<91&&!d.shift)||(c>96&&c<123&&d.shift);C.debug("in keycode",c);if(LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){var g=LOGIN.getActiveXFrame();if(g){try{a=g.contentWindow.LOGIN.CK.isCapslockOn();}catch(f){}}}if(typeof LOGIN._OPTIONS.onCapslock==="function"){LOGIN._OPTIONS.onCapslock(a);}};LOGIN.initMessageLayer=function(){var a=$j("#ly_lgtxt_area");a.hide();};LOGIN.LOADMESSAGELAYER=function(c,b,a){LOGIN.loadMessageLayer(c,b,a);};LOGIN.loadMessageLayer=function(c,b,a){if(typeof c!=="undefined"){LOGIN.initMessageLayer();
C.get("ly_inbox_img").className=(typeof c.title!="undefined")?c.title:"";C.get("ly_btn_area_btn01_img").className=(typeof c.btn01!="undefined")?c.btn01:"ly_btn_close";C.get("ly_btn_area_btn01_img").alt=(typeof c.brn01_alt!="undefined")?c.brn01_alt:"닫기";C.get("ly_btn_area_btn02_img").className=(typeof c.btn02!=="undefined")?c.btn02:"";C.get("ly_btn_area_btn02_img").alt=(typeof c.btn02_alt!=="undefined")?c.btn02_alt:"";C.addEvent(C.get("ly_topclose"),"onclick",function(){LOGIN.closeMessageLayer(c.nLevel);});if(typeof b==="function"){C.addEvent(C.get("ly_btn_area_btn01"),"onclick",function(){b(c.nLevel);});}if(typeof a==="function"){C.addEvent(C.get("ly_btn_area_btn02"),"onclick",function(){a(c.nLevel);});}C("ly_lgtxt_area").show();}};LOGIN.CLOSEMESSAGELAYER=function(a){LOGIN.closeMessageLayer(a);};LOGIN.closeMessageLayer=function(a){closePopup(a);};LOGIN.paintForm=function(){var e=$j("#"+C.getID(LOGIN._OPTIONS.AREA_IDPW));var c=document.getElementById(LOGIN._OPTIONS.AREA_FLASH);var b=$j("#"+C.getID(LOGIN._OPTIONS.AREA_ACTIVEX));
var a=jindo.$Agent().navigator();e.hide();if(a.ie||a.opera){c.style.display="none";}else{c.style.display="block";c.style.visibility="hidden";c.style.width="0px";c.style.height="0px";}b.hide();if(LOGIN._currentSecureMode==LOGIN.MODE_JS){e.show();}if(LOGIN._currentSecureMode==LOGIN.MODE_FLASH){if(a.ie||a.opera){c.style.display="block";}else{c.style.width="";c.style.height="";c.style.visibility="visible";}}if(LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){$j(LOGIN._oCoverLayer).show();b.show();if(!a.ie){var d={nLevel:"2",title:"ly_txt_step3_none"};LOGIN.loadMessageLayer(d,LOGIN.closeMessageLayer);}}var f=LOGIN._OPTIONS.onPhaseChange;if(typeof f==="function"){f(LOGIN._currentSecureMode,LOGIN._beforeSecureMode);}};LOGIN._isClicked=false;LOGIN._isInSubmitProcess=false;LOGIN.setAntiDoubleClick=function(a){if(a===true){LOGIN._isClicked=true;setTimeout(LOGIN.setAntiDoubleClick,1000);}else{LOGIN._isClicked=false;}};LOGIN.getLenChar=function(a){a=a+"";return String.fromCharCode(a.length);};LOGIN.action=function(){C.debug("LOGIN.action called");
if(LOGIN._isClicked){return;}else{LOGIN.setAntiDoubleClick(true);}if(LOGIN._currentSecureMode==LOGIN.MODE_JS||LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){var a=LOGIN.validate();if(!a.success){if(typeof LOGIN._OPTIONS.onError==="function"){LOGIN._OPTIONS.onError(a.reason,a.exception);}if(a.reason==20||a.reason==22){LOGIN.getCurrentIDField().focus();}else{if(a.reason==21||a.reason==23){LOGIN.getCurrentPWField().focus();}}return;}}LOGIN.submit();};LOGIN._wait=function(b){var c=new Date().getTime();var a=c;while(a-c<b){a=new Date().getTime();}};LOGIN._useNoneMode=false;LOGIN._submitInvalidKeyRetryingCount=0;LOGIN.submit=function(){C.debug("LOGIN.submit called");if(LOGIN._isInSubmitProcess){alert("로그인 처리 중");return;}if(!LOGIN.KeyManager.isValid()&&LOGIN._useNoneMode!==true){LOGIN._submitInvalidKeyRetryingCount++;C.debug("submitInvalidKeyRetryingCount",LOGIN._submitInvalidKeyRetryingCount);if(LOGIN._submitInvalidKeyRetryingCount>3){if(LOGIN._currentSecureMode==LOGIN.MODE_FLASH||LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){LOGIN._notifyError(1,null);
LOGIN._isInSubmitProcess=false;LOGIN._submitInvalidKeyRetryingCount=0;return;}else{if(LOGIN._currentSecureMode==LOGIN.MODE_JS){LOGIN._useNoneMode=true;setTimeout(LOGIN.submit,10);return;}}}var c=LOGIN._submitInvalidKeyRetryingCount*200;LOGIN.KeyManager.load(false);LOGIN._wait(c);setTimeout(LOGIN.submit,c);return;}LOGIN._submitInvalidKeyRetryingCount=0;LOGIN._isInSubmitProcess=true;if(LOGIN._currentSecureMode==LOGIN.MODE_JS){if(LOGIN._useNoneMode===true){LOGIN.submitNoneMode();return;}var l;var a=true;LOGIN.KeyManager.getKey(function(e){l=e;},function(){a=false;});if(!a){LOGIN._notifyError(1,null);LOGIN._isInSubmitProcess=false;return;}C.debug("seckey",l);var d=STR.Base64.encode(LOGIN.getCurrentIDField().value);var o=LOGIN.getCurrentPWField().value;var m=new RSAKey();m.setPublic(l.evalue,l.nvalue);var b=new C.StringBuilder();b.append(LOGIN.getLenChar(l.session));b.append(l.session);b.append(LOGIN.getLenChar(d));b.append(d);b.append(LOGIN.getLenChar(o));b.append(o);var j=m.encrypt(b.toString());var k=LOGIN._FORM;
k.keyname.value=l.name;k.earthworm.value="earthworm";k.earthworm2.value="";k.turtle.value=j;k.secutype.value=LOGIN.MODE_JS;k.turtle2.value="";k.bartype.value=LOGIN.getSecureLevel();k.force.value=(LOGIN.checkbox.getChecked())?"Y":"N";k.hanilogin.value="N";k.action=LOGIN.getLoginServer(k)+"/login.nhn";try{k.nxtURL.value=STR.isBlank(k.nxtURL.value)?parent.document.URL:k.nxtURL.value;}catch(n){}}else{if(LOGIN._currentSecureMode==LOGIN.MODE_FLASH){var g=LOGIN.getFlash();if(g){g.requestLogin();}else{LOGIN._notifyError(40,"");LOGIN._isInSubmitProcess=false;return;}var h=LOGIN.FLASH.getEncValue();if(h.success){var k=LOGIN._FORM;k.keyname.value=h.seckeyname;k.earthworm.value="earthworm";k.earthworm2.value="";k.turtle.value=h.secval;k.secutype.value=LOGIN.MODE_FLASH;k.turtle2.value="";k.bartype.value=LOGIN.getSecureLevel();k.force.value=(LOGIN.checkbox.getChecked())?"Y":"N";k.hanilogin.value="N";k.action=LOGIN.getLoginServer(k)+"/login.nhn";try{k.nxtURL.value=STR.isBlank(k.nxtURL.value)?parent.document.URL:k.nxtURL.value;
}catch(n){}}else{if(h.reason>=20){LOGIN._notifyError(h.reason,h.exception);}LOGIN._isInSubmitProcess=false;return;}}else{if(LOGIN._currentSecureMode==LOGIN.MODE_ACTIVEX){var i=LOGIN.getActiveXFrame();if(!i){LOGIN._notifyError(31,null);return;}var h=i.contentWindow.LOGIN.CK.getEncValue();if(h.success){C.debug("activex enc value",h.secval);var k=LOGIN._FORM;k.keyname.value=h.seckeyname;k.earthworm.value="earthworm";k.earthworm2.value="";k.turtle.value=h.secval;k.secutype.value=LOGIN.MODE_ACTIVEX;k.turtle2.value="";k.bartype.value=LOGIN.getSecureLevel();k.force.value=(LOGIN.checkbox.getChecked())?"Y":"N";k.hanilogin.value="N";k.action=LOGIN.getLoginServer(k)+"/login.nhn";try{k.nxtURL.value=STR.isBlank(k.nxtURL.value)?parent.document.URL:k.nxtURL.value;}catch(n){}}else{LOGIN._notifyError(h.reason,h.exception);LOGIN._isInSubmitProcess=false;return;}}}}k.submit();LOGIN._isInSubmitProcess=false;};LOGIN.submitNoneMode=function(){C.debug("using none mode");LOGIN._isInSubmitProcess=true;var a=LOGIN._FORM;a.turtle.value=a.turtle2.value;
a.earthworm.value=a.earthworm2.value;a.bartype.value=LOGIN.getSecureLevel();a.seculogin.value="";a.secutype.value=LOGIN.MODE_NONE;a.hanilogin.value="N";a.force.value=(LOGIN.checkbox.getChecked())?"Y":"N";a.action=LOGIN.getLoginServer(a)+"/login.nhn";try{a.nxtURL.value=STR.isBlank(a.nxtURL.value)?parent.document.URL:a.nxtURL.value;}catch(b){}a.submit();LOGIN._isInSubmitProcess=false;};LOGIN._notifyError=function(b,a){if(typeof LOGIN._OPTIONS.onError==="function"){LOGIN._OPTIONS.onError(b,a);}};LOGIN.isPublishingLogin=function(a){if((typeof a.svctype==="object")&&(a.svctype.value==="publishing")){return true;}else{return false;}};LOGIN.getLoginServer=function(a){if(typeof a==="object"){if(LOGIN.isPublishingLogin(a)){if(a.secutype.value==LOGIN.MODE_NONE){return HG.getServiceHost("pubids",undefined,undefined,"https://");}else{return HG.getServiceHost("pubid");}}else{if(a.secutype.value==LOGIN.MODE_NONE){return HG.getServiceHost("ids",undefined,undefined,"https://");}else{return HG.getServiceHost("id");}}}return HG.getServiceHost("id");
};var __ndsFrame;function setNdsClickTag(a){a=escape(a);C.debug("C.get('__ndsIframe')",C.get("__ndsIframe"));if(C.get("__ndsIframe")){C.debug("ndsFrame 없네 그려주자");}C.debug("C.get('__ndsIframe')",C.get("__ndsIframe"));__ndsLoadSub(a);}function __ndsLoadSub(a){var b=C.get("__ndsIframe");if(b){b.src="/common/ndsCount.nhn?destinationURL="+a;}else{setTimeout("__ndsLoadSub('"+a+"')",500);}}var loginNdsList=new Array(new Array("minilogin-login","/i:1000000888/c:5508?https://www.hangame.com/login_login"),new Array("minilogin-seculogin1","/i:1000008913/c:6782?https://ids.hangame.com/login.nhn"),new Array("minilogin-seculogin2","/i:1000008914/c:7800?https://ids.hangame.com/login.nhn"),new Array("minilogin-seculogin3","/i:1000009692/c:8800?https://ids.hangame.com/login.nhn"));function clickLoginCommonCount(c){var a=getLoginNdsLinkUrl(c);try{if(typeof(setNdsClickTag)=="function"){C.debug("여기",a);setNdsClickTag(a);}else{C.debug("여기2");parent.setNdsClickTag(a);}}catch(b){C.debug("clickLoginCommonCount error",b);}}var getLoginNdsLinkUrl=function(b){for(var a=0;
a<loginNdsList.length;a++){if(b==loginNdsList[a][0]){return loginNdsList[a][1];}}};if(typeof LOGIN==="undefined"){LOGIN=[];}LOGIN.trySecureKeyLoading=function(){C.debug("Trying secure key loading");var a=LOGIN.KeyManager.isValid();if(!a){LOGIN.KeyManager.load();}};LOGIN.KeyManager={_keyUrl:HG.getServiceHost("lform",{local:"dev"})+"/key/keys_jsonp_jindo.php",_keyUrlOriginal:HG.getServiceHost("lform",{local:"dev"})+"/key/keys.php",_keyUrlIframe:HG.getServiceHost("lform",{local:"dev"})+"/key/keys_iframe.php",_interval:60000,_isLoading:false,lastLoaded:null};LOGIN.KeyManager.isValid=function(){if(typeof LOGIN.KeyManager.lastLoaded==="undefined"||LOGIN.KeyManager.lastLoaded==null){return false;}if(LOGIN.KeyManager._isLoading){return false;}var a=LOGIN.KeyManager.lastLoaded.key;var b=LOGIN.KeyManager.lastLoaded.loadedTime;if(typeof a==="undefined"||a==null||typeof b==="undefined"||b==null){return false;}var c=C.DateTime.getNow();if(c.getUnixTime()-b.getUnixTime()>LOGIN.KeyManager._interval){return false;}return true;};LOGIN.KeyManager.getKey=function(c,b){var a=function(){if(typeof c==="function"){c(LOGIN.KeyManager.lastLoaded.key);
}};if(LOGIN.KeyManager.isValid()){a();}else{LOGIN.KeyManager.load(false);C.doTry(LOGIN.KeyManager.isValid,a,b);}};LOGIN.keyLoadCallback=function(b){try{var a=LOGIN.KeyManager._parseKey(b);if(a!==null){LOGIN.KeyManager.lastLoaded={key:a,loadedTime:C.DateTime.getNow()};C.debug("보안키 로딩 종료",LOGIN.KeyManager.lastLoaded.key,LOGIN.KeyManager.lastLoaded.loadedTime);}else{C.debug("보안키 에러");LOGIN.KeyManager.lastLoaded=null;}}catch(c){C.debug("keyLoadCallback error");}finally{LOGIN.KeyManager._isLoading=false;}};LOGIN.KeyManager.load=function(b){if(LOGIN.KeyManager._isLoading){return;}LOGIN.KeyManager._isLoading=true;C.debug("보안키 로딩 시작");if(typeof b==="undefined"){b=true;}var c=function(g){LOGIN.keyLoadCallback(null);if(C.getEnvPhase()=="local"||C.getEnvPhase()=="dev"||C.getEnvPhase()=="alpha"){var h="";for(k in g){h+=k+": "+g[k];if(typeof g[k]==="function"){h+="\n\t"+g[k]();}if(typeof g[k]==="object"){var f=g[k];for(kk in f){h+="\n\t\t"+kk+":"+f[kk];}}h+="\n";}C.debug(h);}};C.debug("key url",LOGIN.KeyManager._keyUrl);var a=jindo.$Agent().navigator();
if(a.ie&&a.version==6){LOGIN.KeyManager.loadKeyIE6(c);}else{C.debug("none-IE6 key loading process");var d=jindo.$Ajax(LOGIN.KeyManager._keyUrl,{type:"jsonp",callbackname:"callback",jsonp_charset:"euc-kr",timeout:3,onload:function(f){try{var g=f.json();if(typeof g.key!=="undefined"){LOGIN.keyLoadCallback(g.key);}else{LOGIN.keyLoadCallback(null);}}catch(h){C.debug("json callback error",h);LOGIN.keyLoadCallback(null);}},onerror:c,ontimeout:c});d.request();}};LOGIN.KeyManager.loadKeyIE6=function(d){C.debug("IE6 key loading process");var b=jindo.$Agent().flash();var a=false;if(b.installed){C.debug("Using flash-cross-domain");var c={crossdomain:"true",url:LOGIN.KeyManager._keyUrlOriginal,callback:function(g){a=true;try{if(typeof g!=="undefined"){LOGIN.keyLoadCallback(g);}else{LOGIN.keyLoadCallback(null);}}catch(f){C.debug("IE6 key callback error",f);LOGIN.keyLoadCallback(null);}},error:d};AJAX.send(c);}if(!a){LOGIN.KeyManager._loadKeyIE6ByIframe();}};LOGIN.KeyManager._loadKeyIE6ByIframe=function(){C.debug("Using iframe call");
var a=jindo.$("<iframe>");a.id="__login_iframe_"+Math.floor(Math.random()*10000);a.style.display="none";document.body.appendChild(a);C.debug("iframe created",a.id);a.src=LOGIN.KeyManager._keyUrlIframe;};LOGIN.KeyManager._parseKey=function(a){if(STR.isBlank(a)){return null;}try{var b=a.split(",");var c={session:b[0],name:b[1],evalue:b[2],nvalue:b[3]};return c;}catch(d){}return null;};nhn.Component=jindo.$Class({_eventHandlers:null,_options:null,$init:function(){var a=this.constructor.getInstance();if(typeof a=="undefined"){this.constructor._aInstance=a=[];}a[a.length]=this;this._eventHandlers={};this._options={};this._options._setters={};},option:function(d,f){var c=(typeof d);if(c=="undefined"){return this._options;}else{if(c=="string"){if(typeof f!="undefined"){this._options[d]=f;if(typeof this._options._setters[d]=="function"){this._options._setters[d](f);}return this;}else{return this._options[d];}}else{if(c=="object"){try{for(var a in d){this._options[a]=d[a];if(typeof this._options._setters[a]=="function"){this._options._setters[a](d[a]);}}}catch(b){}return this;}}}},optionSetter:function(f,b){var d=(typeof f);if(d=="undefined"){return this._options._setters;}else{if(d=="string"){if(typeof b!="undefined"){this._options._setters[f]=jindo.$Fn(b,this).bind();return this;}else{return this._options._setters[f];}}else{if(d=="object"){try{for(var a in f){this._options._setters[a]=jindo.$Fn(f[a],this).bind();
}}catch(c){}return this;}}}},fireEvent:function(b,n){var n=n?(n instanceof jindo.$Event?n._event:n):{};var f=this["on"+b];var k=this._eventHandlers[b];var l=typeof f=="function";var h=typeof k!="undefined";if(!l&&!h){return true;}k=k.concat();var j=(function(i){try{if(i instanceof Event){return true;}}catch(e){}try{if(i instanceof MouseEvent){return true;}}catch(e){}try{if(i instanceof KeyEvent){return true;}}catch(e){}try{if(("cancelBubble" in i||"preventBubble" in i)&&"type" in i){return true;}}catch(e){}return false;})(n);if(!j){try{if(typeof n._extends=="undefined"){n._extends=[];n.stop=function(){if(n._extends.length>0){n._extends[n._extends.length-1].bCanceled=true;}};}n._extends.push({sType:b,bCanceled:false});n.sType=b;}catch(d){j=true;}}if(j){n=jindo.$Event(n);}var g=[n];for(var c=2,m=arguments.length;c<m;c++){g.push(arguments[c]);}if(l){f.apply(this,g);}if(h){for(var c=0,o;o=k[c];c++){o.apply(this,g);}}if(j){return !n.bCanceled;}var a=n._extends.pop();return !a.bCanceled;},attach:function(c,b){if(arguments.length==1){jindo.$H(arguments[0]).forEach(jindo.$Fn(function(d,e){this.attach(e,d);
},this).bind());return this;}var a=this._eventHandlers[c];if(typeof a=="undefined"){a=this._eventHandlers[c]=[];}a.push(b);return this;},detach:function(e,d){if(arguments.length==1){jindo.$H(arguments[0]).forEach(jindo.$Fn(function(f,g){this.detach(g,f);},this).bind());return this;}var a=this._eventHandlers[e];if(typeof a=="undefined"){return this;}for(var b=0,c;c=a[b];b++){if(c===d){a=a.splice(b,1);break;}}return this;},detachAll:function(c){var a=this._eventHandlers;if(arguments.length){if(typeof a[c]=="undefined"){return this;}delete a[c];return this;}for(var b in a){delete a[b];}return this;}});nhn.Component.factory=function(a,f){var b=[];if(typeof f=="undefined"){f={};}for(var c=0;c<a.length;c++){try{oInstance=new this(a[c],f);b[b.length]=oInstance;}catch(d){}}return b;};nhn.Component.getInstance=function(){return this._aInstance;};nhn.HTMLComponent=jindo.$Class({tagName:"",$init:function(){return;}}).extend(nhn.Component);nhn.HTMLComponent.paint=function(){var a=this.getInstance();if(typeof a=="undefined"){return;
}for(var b=0;b<a.length;b++){if(a[b]&&a[b].paint){a[b].paint();}}};nhn.HTMLComponent.factory=function(d,g){if(typeof d=="string"){var c=d;if(/^(\w+)\s*(?:\[(\w+)\s*=\s*(\w+)\])?$/.test(this.prototype.tagName)){var b=[];d=document.getElementsByTagName(RegExp.$1);if(RegExp.$2&&RegExp.$3){for(var e=0;e<d.length;e++){if(d[e].getAttribute(RegExp.$2)==RegExp.$3){b[b.length]=d[e];}}d=b;}if(c){var f=new RegExp("\\b"+c+"\\b","i");for(var e=0,b=[];e<d.length;e++){if(f.test(d[e].className)){b[b.length]=d[e];}}d=b;}}else{return[];}}this._tmpFactory=nhn.Component.factory;var d=this._tmpFactory(d,g);delete this._tmpFactory;return d;};nhn.DragArea=jindo.$Class({_bIsActivating:false,$init:function(b,a){this.option({className:"dragable",flowOut:true,setCapture:false,threshold:0});this.option(a||{});this._el=b;this.bIsIE=jindo.$Agent().navigator().ie;this._oDragInfo={prepare:false};this._bIsDragging=false;this._wfOnMouseDown=jindo.$Fn(this._onMouseDown,this);this._wfOnMouseMove=jindo.$Fn(this._onMouseMove,this);this._wfOnMouseUp=jindo.$Fn(this._onMouseUp,this);
this._wfOnDragStart=jindo.$Fn(this._onDragStart,this);this._wfOnSelectStart=jindo.$Fn(this._onSelectStart,this);this.activate();},_findDraggableElement:function(b){if(jindo.$$.test(b,"input[type=text]")||b.tagName=="TEXTAREA"){return null;}var a=this;var d="."+this.option("className");var c=function(e){if(e==null){return false;}if(!a._el.tagName||a._el===e){return true;}return jindo.$Element(a._el).isParentOf(e);};var b=jindo.$$.test(b,d)?b:jindo.$$.getSingle("! "+d,b);if(!c(b)){b=null;}return b;},isDragging:function(){return this._bIsDragging&&!this._oDragInfo.prepare;},stopDragging:function(){this._wfOnMouseMove.detach(document,"mousemove");this._wfOnMouseUp.detach(document,"mouseup");this._wfOnMouseUp.detach(document,"contextmenu");var a=this._oDragInfo;if(!a.prepare){var c=a.element;var b=jindo.$Element(c);if(!this.fireEvent("dragend",{area:this._el,handle:a.handle,element:a.element,x:parseInt(b.css("left"))||0,y:parseInt(b.css("top"))||0})){return;}}if(this.bIsIE&&this._elSetCapture){this._elSetCapture.releaseCapture();
this._elSetCapture=null;}this._bIsDragging=false;this._oDragInfo.prepare=false;this.fireEvent("handleup",{handle:a.handle,element:a.element});},_attachEvent:function(){if(this.isActivating()){return;}this._wfOnMouseDown.attach(this._el,"mousedown");if(this.bIsIE){this._wfOnDragStart.attach(this._el,"dragstart");this._wfOnSelectStart.attach(this._el,"selectstart");}this._bIsActivating=true;},_detachEvent:function(){if(!this.isActivating()){return;}this._wfOnMouseDown.detach(this._el,"mousedown");if(this.bIsIE){this._wfOnDragStart.detach(this._el,"dragstart");this._wfOnSelectStart.detach(this._el,"selectstart");}this._bIsActivating=false;},attachEvent:function(){this.activate();},detachEvent:function(){this.deactivate();},activate:function(){this._attachEvent();},deactivate:function(){this._detachEvent();},isEventAttached:function(){return this.isActivating();},isActivating:function(){return this._bIsActivating;},_onMouseDown:function(c){if(this._bIsDragging||this._oDragInfo.prepare){return;}if(!c.mouse().left){return;
}var b=this._findDraggableElement(c.element);if(!b){return;}var a=c.pos();this._oDragInfo={prepare:true,button:c._event.button,handle:b,element:b,pageX:a.pageX,pageY:a.pageY};this.fireEvent("handledown",{handle:b,element:b,event:c});this._wfOnMouseMove.attach(document,"mousemove");this._wfOnMouseUp.attach(document,"mouseup");this._wfOnMouseUp.attach(document,"contextmenu");c.stop(jindo.$Event.CANCEL_DEFAULT);},_onMouseMove:function(t){this._bIsDragging=true;var l=this._oDragInfo;var b=t.pos();if(l.prepare){var f=this.option("threshold");var d={pageX:0,pageY:0};if(f){d.pageX=b.pageX-l.pageX;d.pageY=b.pageY-l.pageY;var o=Math.sqrt(d.pageX*d.pageX+d.pageY*d.pageY);if(f>o){return;}}var a=this._findDraggableElement(t.element);if(this.bIsIE&&this.option("setCapture")){this._elSetCapture=(this._el==document)?document.body:a;this._elSetCapture.setCapture(true);}var c={area:this._el,handle:l.handle,element:l.element,diff:d,event:t};if(!this.fireEvent("dragstart",c)){this._bIsDragging=false;return;}var g=jindo.$Element(c.element);
l.prepare=false;l.handle=c.handle;l.element=c.element;l.objectX=parseInt(g.css("left"))||0;l.objectY=parseInt(g.css("top"))||0;}var i={x:b.pageX-l.pageX,y:b.pageY-l.pageY};var c={area:this._el,handle:l.handle,element:l.element,event:t,x:l.objectX+i.x,y:l.objectY+i.y,gapX:i.x,gapY:i.y};if(!this.fireEvent("beforedrag",c)){return;}if(this.option("flowOut")==false){var n=c.element;var q=jindo.$$.getSingle("! [@position!=static]",c.element);var p=[n.offsetWidth,n.offsetHeight];if(q){var h=(q.scrollWidth>q.clientWidth)?q.scrollWidth:q.clientWidth+q.scrollLeft;var u=(q.scrollHeight>q.clientHeight)?q.scrollHeight:q.clientHeight+q.scrollTop;var s={width:h,height:u};}else{var m=jindo.$Document().scrollSize();var r=jindo.$Document().clientSize();var j=r;if(m.width>r.width||m.height>r.height){j=m;}var s=j;}if(c.x!==null){if(c.x<0){c.x=0;}else{if(c.x+p[0]>s.width){c.x=s.width-p[0];}}}if(c.y!==null){if(c.y<0){c.y=0;}else{if(c.y+p[1]>s.height){c.y=s.height-p[1];}}}}var k=l.element;if(c.x!==null){k.style.left=c.x+"px";}if(c.y!==null){k.style.top=c.y+"px";
}if(!this.fireEvent("drag",c)){return;}},_onMouseUp:function(a){if(a.type=="mouseup"&&a.mouse().right){return;}if(a.type=="contextmenu"){this._oDragInfo.prepare=false;a.stop();}this.stopDragging();},_onDragStart:function(a){a.stop(jindo.$Event.CANCEL_DEFAULT);},_onSelectStart:function(a){if(this._bIsDragging||this._findDraggableElement(a.element)){a.stop(jindo.$Event.CANCEL_DEFAULT);}}}).extend(nhn.Component);nhn.Transition=jindo.$Class({_nFPS:15,_aQueue:null,_oTimer:null,_bIsWaiting:true,_bIsPlaying:false,$init:function(a){this._aQueue=[];this._oTimer=new nhn.Timer();this.option({effect:nhn.Effect.linear,correction:false});this.option(a||{});},fps:function(a){if(arguments.length>0){this._nFPS=a;return this;}return this._nFPS;},abort:function(){this._aQueue=[];this._oTimer.abort();if(this._bIsPlaying){this.fireEvent("abort");}this._bIsWaiting=true;this._bIsPlaying=false;this._oNow=null;},start:function(){this.abort();return this.precede.apply(this,arguments);},pause:function(){if(this._oTimer.abort()){this.fireEvent("pause");
}},resume:function(){var a=this;if(!this._oNow){return;}if(this._bIsWaiting==false&&this._bIsPlaying==true){this.fireEvent("resume");}this._goOn();this._bIsWaiting=false;this._bIsPlaying=true;this._oTimer.start(function(){var b=!a._goOn();if(b){a._bIsWaiting=true;setTimeout(function(){a._try();},0);}return !b;},this._oNow.interval);},precede:function(g,a){if(typeof g=="function"){this._aQueue.push(g);}else{var d={duration:g,lists:[]};for(var c=arguments,f=c.length,b=1;b<f-1;b+=2){var e=[];jindo.$H(c[b+1]).forEach(function(h,i){if(/^(@|style\.)(\w+)/i.test(i)){e.push(["csses",RegExp.$2,h]);}else{e.push(["attrs",i,h]);}});d.lists.push({element:"tagName" in c[b]?jindo.$Element(c[b]):c[b],values:e});}this._aQueue.push(d);}this._try();return this;},_dequeue:function(){var b=this._aQueue.shift();if(!b){return;}if(typeof b=="function"){return b;}var e=b.lists;for(var f=0,l=e.length;f<l;f++){var g=e[f].element;for(var d=0,k=e[f].values,h=k.length;d<h;d++){var a=k[d][0];var c=k[d][2];if(typeof c!="function"){if(c instanceof Array){c=this.option("effect")(c[0],c[1]);
}else{c=this.option("effect")(c);}}if(c.setStart){if(g instanceof jindo.$Element){switch(a){case"csses":c.setStart(g.css(k[d][1]));break;case"attrs":c.setStart(g.$value()[k[d][1]]);break;}}else{c.setStart(g.getter(k[d][1]));}}k[d][2]=c;}}return b;},_try:function(){var a=this;if(!this._bIsWaiting){return false;}var c;do{c=this._dequeue();if(!c){if(this._bIsPlaying){this._bIsPlaying=false;this.abort();this.fireEvent("end");}return false;}if(!this._bIsPlaying){this.fireEvent("start");}if(typeof c=="function"){this._bIsPlaying=true;c.call(this);}}while(typeof c=="function");var b=1000/this._nFPS;this._oNow={lists:c.lists,ratio:0,interval:b,step:b/c.duration};this.resume();return true;},_goOn:function(){var f=this._oNow;var d=f.ratio;var k=f.lists;var e={};d=parseFloat(d.toFixed(5));if(d>1){d=1;}var q=this.option("correction");for(var l=0,t=k.length;l<t;l++){var m=k[l].element;for(var h=0,o=k[l].values,n=o.length;h<n;h++){if(m instanceof jindo.$Element){var s=o[h][1];var r=o[h][2](d);if(q){var c=/[0-9]([^0-9]*)$/.test(r)&&RegExp.$1||"";
if(c){var g=parseFloat(r);var b;var p=g;g+=e[s]||0;g=parseFloat(g.toFixed(5));if(l==t-1){r=Math.round(g)+c;}else{b=parseFloat(/(\.[0-9]+)$/.test(g)&&RegExp.$1||0);r=parseInt(g)+c;e[s]=b;}}}switch(o[h][0]){case"csses":m.css(s,r);break;case"attrs":m.$value()[s]=r;break;}}else{m.setter(o[h][1],o[h][2](d));}this.fireEvent("playing",{element:m});}}f.ratio+=f.step;return d!=1;}}).extend(nhn.Component);nhn.Effect=function(d){if(this instanceof arguments.callee){throw new Error("You can't create a instance of this");}var b=/^(\-?[0-9\.]+)(%|px|pt|em)?$/;var a=/^rgb\(([0-9]+)\s?,\s?([0-9]+)\s?,\s?([0-9]+)\)$/i;var e=/^#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;var f=/^#([0-9A-F])([0-9A-F])([0-9A-F])$/i;var c=function(g){var h;if(b.test(g)){g=parseFloat(g),h=RegExp.$2;}else{if(a.test(g)){g=[parseInt(RegExp.$1),parseInt(RegExp.$2),parseInt(RegExp.$3)],h="color";}else{if(e.test(g=g.replace(f,"#$1$1$2$2$3$3"))){g=[parseInt(RegExp.$1,16),parseInt(RegExp.$2,16),parseInt(RegExp.$3,16)],h="color";}}}return{value:g,unit:h};};return function(i,k){var j;
if(arguments.length>1){i=c(i),k=c(k),j=k.unit;}else{k=c(i),i=null,j=k.unit;}if(i&&k&&i.unit!=k.unit){throw new Error("unit error");}i=i&&i.value;k=k&&k.value;var l,h;var g=function(q){var n=i;var u=k;var t=function(p,r){return(r-p)*d(q)+p+j;};if(j=="color"){var o=parseInt(t(n[0],u[0]))<<16;o|=parseInt(t(n[1],u[1]))<<8;o|=parseInt(t(n[2],u[2]));o=o.toString(16).toUpperCase();for(var m=0;6-o.length;m++){o="0"+o;}return"#"+o;}return t(n,u);};if(i===null){g.setStart=function(m){if(isNaN(parseInt(m))){m=0+j;}m=c(m);if(m.unit!=j){throw new Error("unit eror");}i=m.value;};}return g;};};nhn.Effect.linear=nhn.Effect(function(a){return a;});nhn.Effect.easeIn=nhn.Effect(function(a){y=Math.sqrt(1-(a*a));return(1-y);});nhn.Effect.easeOut=nhn.Effect(function(a){y=Math.sqrt((2-a)*a);return y;});nhn.Effect.overphase=nhn.Effect(function(a){a/=0.69643223;y=Math.sqrt((2-a)*a)+0.1;return y.toFixed(7);});nhn.Effect.bounce=nhn.Effect(function(a){if(a<(1/2.75)){return(7.5625*a*a);}else{if(a<(2/2.75)){return(7.5625*(a-=(1.5/2.75))*a+0.75);
}else{if(a<(2.5/2.75)){return(7.5625*(a-=(2.25/2.75))*a+0.9375);}else{return(7.5625*(a-=(2.625/2.75))*a+0.984375);}}}});(function(){var a=jindo.$Element.prototype.css;jindo.$Element.prototype.css=function(c,b){if(c=="opacity"){return typeof b!="undefined"?this.opacity(parseFloat(b)):this.opacity();}return b!="undefined"?a.call(this,c,b):a.call(this,c);};})();nhn.Timer=jindo.$Class({_timer:null,_lastest:null,_remained:0,_delay:null,_callback:null,$init:function(){},start:function(c,a){var b=this;this.abort();this.fireEvent("wait");this._lastest=new Date().getTime();this._remained=0;this._delay=a;this._callback=c;this.resume();return true;},_clearTimer:function(){var a=false;if(this._timer){clearInterval(this._timer);a=true;}this._timer=null;return a;},abort:function(){var a;if(a=this._clearTimer()){this.fireEvent("abort");}return a;},pause:function(){var a=new Date().getTime()-this._lastest;this._remained=this._delay-a;if(this._remained<0){this._remained=0;}return this._clearTimer();},resume:function(){var b=this;
if(!this._callback){return false;}var a=function(c,d){b._clearTimer();b._timer=setInterval(function(){if(!b._timer){return;}b.fireEvent("run");var e=b._callback();b._lastest=new Date().getTime();if(!e){clearInterval(b._timer);b._timer=null;b.fireEvent("end");return;}b.fireEvent("wait");if(d){a(b._delay,false);}},c);};if(this._remained){a(this._remained,true);this._remained=0;}else{a(this._delay,false);}return true;}}).extend(nhn.Component);nhn.CheckBox=jindo.$Class({tagName:"input[type=checkbox]",$init:function(b,a){this.option({classPrefix:"checkbox-"});this.option(a||{});this._elWrapper=jindo.$(b);this._welWrapper=jindo.$Element(b);this._assignHTMLElements();this.wfOnClickInput=jindo.$Fn(this._onClickInput,this);this.wfOnClickWrapper=jindo.$Fn(this._onClickWrapper,this);this.wfOnFocusInput=jindo.$Fn(this._onFocusInput,this);this.wfOnBlurInput=jindo.$Fn(this._onBlurInput,this);this.activate();this.paint();},_assignHTMLElements:function(){var b=this._elWrapper;this._elInput=jindo.$$.getSingle("input",b);if(this._elInput.type=="radio"){this.tagName="input[type=radio]";
this.option("classPrefix","radio-");}var a=this.option("classPrefix");this._elSubstitute=jindo.$$.getSingle("."+a+"mark",b);this._welSubstitute=jindo.$Element(this._elSubstitute);},getInput:function(){return this._elInput;},getChecked:function(){return this.getInput().checked;},setChecked:function(a){this.getInput().checked=a;this.paint();return this;},enable:function(){this.getInput().disabled=false;this.paint();return this;},disable:function(){this.getInput().disabled=true;this.paint();return this;},_onClickInput:function(b){b.stop(jindo.$Event.CANCEL_DEFAULT);var a=this;setTimeout(function(){a._welWrapper.fireEvent("click");},1);},_onClickWrapper:function(c){var a=this._elInput;a.focus();if(a.disabled||c.element===a){return;}if(!this.fireEvent("beforeChange",{checked:a.checked})){return;}if(a.type=="checkbox"){a.checked=!a.checked;this.paint();}else{if(a.type=="radio"){a.checked=true;var b=this;jindo.$A(this.constructor.getInstance()).forEach(function(d){if(d.getInput().name==b.getInput().name){d.paint();}});
}}},_onFocusInput:function(a){this._welWrapper.addClass(this.option("classPrefix")+"focused");},_onBlurInput:function(a){this._welWrapper.removeClass(this.option("classPrefix")+"focused");},isActivating:function(){return this._bIsActivating;},activate:function(){if(this.isActivating()){return;}this._welWrapper.addClass(this.option("classPrefix")+"applied");this.wfOnClickInput.attach(this._elInput,"click");this.wfOnClickWrapper.attach(this._elWrapper,"click");this.wfOnFocusInput.attach(this._elInput,"focus");this.wfOnBlurInput.attach(this._elInput,"blur");this._bIsActivating=true;},deactivate:function(){if(!this.isActivating()){return;}this._welWrapper.removeClass(this.option("classPrefix")+"applied");this.wfOnClickInput.detach(this._elInput,"click");this.wfOnClickWrapper.detach(this._elWrapper,"click");this.wfOnFocusInput.detach(this._elInput,"focus");this.wfOnBlurInput.detach(this._elInput,"blur");this._bIsActivating=false;},paint:function(){var a=this.option("classPrefix");if(this._elInput.disabled){this._welWrapper.addClass(a+"disabled");
}else{this._welWrapper.removeClass(a+"disabled");}if(this._elInput.checked){this._welSubstitute.addClass(a+"checked");}else{this._welSubstitute.removeClass(a+"checked");}this.fireEvent("change",{checked:this._elInput.checked});}}).extend(nhn.HTMLComponent);nhn.Slider=jindo.$Class({_elTrack:null,_oDragArea:null,_aThumbs:null,_aPoses:null,_oSwap:null,_bIsEventAttached:false,$init:function(c,b){this.option({vertical:false,jump:true,classPrefix:"slider-",adjustValue:null,minValue:0,maxValue:1});this.option(b||{});if(!this.option("vertical")){this._oSwap={y:"y",x:"x",clientX:"clientX",pageX:"pageX",offsetWidth:"offsetWidth",left:"left"};}else{this._oSwap={y:"x",x:"y",clientX:"clientY",pageX:"pageY",offsetWidth:"offsetHeight",left:"top"};}this._sRand="S"+parseInt(Math.random()*100000000);this._elTrack=jindo.$(c);this._aThumbs=jindo.$$("."+this.option("classPrefix")+"thumb",this._elTrack);var a=jindo.$ElementList(this._aThumbs);a.addClass(this._sRand);this._aPoses=[];this._onTrackMouseDownFn=jindo.$Fn(this._onTrackMouseDown,this);
this._initDragArea();this.activate();this._detectChange();c=null;},getTrack:function(){return this._elTrack;},getThumb:function(a){return this._aThumbs[a];},_initDragArea:function(){var b=this;var a=this._oSwap;this._oDragArea=new nhn.DragArea(this._elTrack,{className:this._sRand,flowOut:false}).attach({beforedrag:function(g){var c=b._getThumbIndex(g.handle);var f={index:c,pos:g[a.x],jump:false};if(!b.fireEvent("beforechange",f)){return false;}var d=b._getAdjustedPos(c,f.pos);if(d===false){return g.stop();}g[a.x]=d;g[a.y]=null;},drag:function(d){var c=b._getThumbIndex(d.handle);b._fireChangeEvent(c);}});},getDragArea:function(){return this._oDragArea;},_fireBeforeChangeEvent:function(a,c,b){},_fireChangeEvent:function(b){var a=this.option("adjustBy");if(!this._detectChange()){return;}var d=this._aPoses[b];var c={index:b,pos:d,value:this._getValue(b,d)};this.fireEvent("change",c);},_attachEvent:function(){if(this._bIsEventAttached){return;}this._onTrackMouseDownFn.attach(this._elTrack,"mousedown");this._bIsEventAttached=true;
},_detachEvent:function(){if(!this._bIsEventAttached){return;}this._onTrackMouseDownFn.detach(this._elTrack,"mousedown");this._bIsEventAttached=false;},activate:function(){this.getDragArea().activate();this._attachEvent();},deactivate:function(){this.getDragArea().deactivate();this._detachEvent();},_onTrackMouseDown:function(h){var n=this;if(!this.option("jump")){return;}var b=0;var o=this._oSwap;var c=h.element;var f="."+this.option("classPrefix")+"thumb";var m=jindo.$$.test(c,f)||jindo.$$.getSingle("! "+f,c);if(m){return;}var a=h.pos()[o.pageX];a-=jindo.$Element(this._elTrack).offset()[o.left];var k=9999999;for(var g=0,l;l=this._aThumbs[g];g++){var j=parseInt(jindo.$Element(l).css(o.left))||0;j+=parseInt(l[o.offsetWidth]/2);var d=Math.abs(a-j);if(d<k){k=d;b=g;}}var l=this._aThumbs[b];a-=parseInt(l[o.offsetWidth]/2);h.stop(jindo.$Event.CANCEL_DEFAULT);this.positions(b,a);},_getTrackInfo:function(c){var b=this._oSwap;var h=this._aThumbs[c];var e=h[b.offsetWidth];var g=this._elTrack[b.offsetWidth];var d=g-e;var f=this.option("maxValue");
var a=this.option("minValue");return{maxPos:d,max:f,min:a};},_getValue:function(b,d){if(typeof d=="undefined"){d=this._aPoses[b];}var a=this._getTrackInfo(b);var c=Math.min(Math.max(d*(a.max-a.min)/a.maxPos+a.min,a.min),a.max);var e;if(e=this.option("adjustValue")){c=e.call(this,c);}return c;},_getAdjustedPos:function(b,e){var c=e;var a=this._getTrackInfo(b);var g;if(g=this.option("adjustValue")){var d=Math.min(Math.max(c*(a.max-a.min)/a.maxPos+a.min,a.min),a.max);var f=g.call(this,d);if(d!=f){c=a.maxPos*(f-a.min)/(a.max-a.min);}}c=Math.max(c,0);c=Math.min(c,a.maxPos);return c;},_detectChange:function(){var c=this.positions();var d=false;for(var b=0,a=c.length;b<a;b++){if(c[b]!==this._aPoses[b]){d=true;}}this._aPoses=c;return d;},_getThumbIndex:function(c){for(var b=0,a=this._aThumbs.length;b<a;b++){if(this._aThumbs[b]==c){return b;}}return -1;},positions:function(c,a,d){if(typeof d=="undefined"){d=true;}var h=this._oSwap;switch(arguments.length){case 0:var g=[];for(var e=0,f=this._aThumbs.length;e<f;e++){g[e]=this.positions(e);
}return g;case 1:return parseInt(jindo.$Element(this._aThumbs[c]).css(h.left));default:if(d){var b={index:c,pos:a,jump:true};if(!this.fireEvent("beforechange",b)){return false;}var j=this._getAdjustedPos(c,b.pos);if(j===false){return this;}jindo.$Element(this._aThumbs[c]).css(h.left,j+"px");this._fireChangeEvent(c);return this;}var j=this._getAdjustedPos(c,a);jindo.$Element(this._aThumbs[c]).css(h.left,j+"px");return this;}},values:function(d,f,g){if(typeof g=="undefined"){g=true;}switch(arguments.length){case 0:var c=[];for(var e=0,b=this._aThumbs.length;e<b;e++){c[e]=this._getValue(e);}return c;case 1:return this._getValue(d,this.positions(d));default:var a=this._getTrackInfo(d);this.positions(d,(f-a.min)*a.maxPos/(a.max-a.min),g);return this;}}}).extend(nhn.Component);