var domainName="ijji.com";var serviceDomainName=document.domain;var sessionCookiePrefix="NHN_S_";function getFixDomain(){var a=document.domain;if(a.indexOf(domainName)>=0){return domainName;}else{var c=a.indexOf(".");var b=a.split(".");if(b.length>2){return a.substring(c+1,a.length);}else{return a;}}}function getServiceDomain(a){if((location.host).indexOf("dev")==0||(location.host).indexOf("alpha")==0){return"alpha-"+a;}if((location.host).indexOf("beta")==0){return"beta-"+a;}return a;}function setDomain(){if(typeof(_doNotSetDomain)=="boolean"&&_doNotSetDomain==true){return;}document.domain=getFixDomain();}function getCookie(b){var a;var d=document.cookie.split("; ");for(var c=0;c<d.length;c++){a=d[c].split("=");if(b.toLowerCase()==unescape(a[0].toLowerCase())){return a[1];}}return"";}function setCookie(c,f){var a=setCookie.arguments;var i=setCookie.arguments.length;var b=(2<i)?a[2]:null;var h=(3<i)?a[3]:null;var d=(4<i)?a[4]:null;var g=(5<i)?a[5]:false;document.cookie=c+"="+escape(f)+((b==null)?"":("; expires="+b.toGMTString()))+((h==null)?"":("; path="+h))+((d==null)?"":("; domain=."+getFixDomain()))+((g==true)?"; secure":"");}function deleteCookie(a){document.cookie=a+"=dumy; expires=Fri, 31 Dec 1999 23:59:59 GMT;";}function getPhase(a){if(a.indexOf("dev-")==0||a.indexOf("alpha-")==0){return"alpha";}else{if(a.indexOf("beta-")==0){return"beta";}}return"";}function adjustIjjiUrl(b,f){var g=getPhase(location.host);var c=parseUri(b);var a=getPhase(c.host);if(g==a){return b;}var d=c.host;if(d.indexOf(domainName)<0){return b;}if(a=="alpha"||a=="beta"){c.host=g+(g.length>0?"-":"")+d.substr(d.indexOf("-")+1);if(f){c.protocol="http";}}else{if(a==""){c.host=g+(g.length>0?"-":"")+d;}}return unparseUri(c);}function parseUri(f){var d=parseUri.options,a=d.parser[d.strictMode?"strict":"loose"].exec(f),c={},b=14;while(b--){c[d.key[b]]=a[b]||"";}c[d.q.name]={};c[d.key[12]].replace(d.q.parser,function(h,g,i){if(g){c[d.q.name][g]=i;}});return c;}parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function unparseUri(a){return a.protocol+"://"+a.host+(a.port.length>0?":"+a.port:"")+(a.relative.length>0?a.relative:"");}function defaultIfEmpty(obj,value){if(obj==null||obj==""||obj==undefined||obj=="undefined"){return value;}if(typeof value=="boolean"||typeof value=="number"){return eval(obj);}return obj;}function isCp1252CharCode(a){var c=new Array(338,339,352,353,376,381,382,402,710,732,8211,8212,8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250,8364,8482);if(a>0&&a<=255){return true;}for(var b=0;b<c.length;b++){if(c[b]==a){return true;}}return false;}function getInvalidCp1252Chars(c){var a=new Array();for(var b=0;b<c.length;b++){if(!isCp1252CharCode(c.charCodeAt(b))){a.push(c.charAt(b));}}if(a.length==0){return null;}return a;}function isCp1252Str(b){for(var a=0;a<b.length;a++){if(!isCp1252CharCode(b.charCodeAt(a))){return false;}}return true;}function isXPSP2(){if(!isMSIE()){return false;}var a=window.navigator.userAgent;if(a.indexOf("SV1")){return true;}if(isXP()&&a.indexOf("MSIE 7.")!=-1){return true;}if(isVista()){return true;}return false;}function isXP(){if(!isMSIE()){return false;}var a=window.navigator.userAgent;if(a.indexOf("NT 5.1")!=-1){return true;}return false;}function isVista(){if(!isMSIE()){return false;}var a=window.navigator.userAgent;if(a.indexOf("NT 6.")!=-1){return true;}return false;}function isMSIE(){var a=window.navigator.userAgent;if(a.indexOf("MSIE")!=-1){return true;}else{return false;}}function isFirefox(){var a=window.navigator.userAgent;if(a.toUpperCase().indexOf("FIREFOX")!=-1){return true;}else{return false;}}function isGameSupportedBrowser(){return isMSIE()||isFirefox();}function isXPComEnabled(){if(isMSIE()){return false;}var a=window.navigator.userAgent;if(a.toUpperCase().indexOf("GECKO")!=-1){return true;}if(a.toUpperCase().indexOf("OPERA")!=-1){return true;}return false;}function isWindows(){var a=window.navigator.userAgent;if(a.toUpperCase().indexOf("WINDOWS")!=-1){return true;}return false;}function viewActiveObject(a){document.write(a);}function openSimpleFrameWindow(b,d,c,a){return window.open(b,d,"scrollbars=no,statusbar=no,toolbar=no, menu=no,width="+c+",height="+a);}function addEvent(b,a){addEventOnObject(window,b,a,false);}function removeEvent(b,a){removeEventFromObject(window,b,a,false);}function addEventOnObject(f,d,b,a){if(d.substring(0,2)=="on"){d=d.substring(2);}if(f.addEventListener){f.addEventListener(d,b,a);return true;}else{if(f.attachEvent){var c=f.attachEvent("on"+d,b);return c;}}}function removeEventFromObject(f,d,b,a){if(d.substring(0,2)=="on"){d=d.substring(2);}if(f.removeEventListener){f.removeEventListener(d,b,a);return true;}else{if(f.detachEvent){var c=f.detachEvent("on"+d,b);return c;}}}function favor(){window.external.AddFavorite("http://www.ijji.com","ijji - Where Gamers Unite!");}String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");};String.prototype.cut=function(a,c){var f=this;var b=0;for(var d=0;d<f.length;d++){b+=(f.charCodeAt(d)>128)?2:1;if(b>a){return f.substring(0,d)+c;}}return f;};function isExcludedNdsUrl(b){var a=new Array("channel.ijji.com","lcs.ijji.com");for(var c=0;c<a.length;c++){if(location.host.indexOf(a[c])>=0){return true;}}return false;}try{jQuery(document).ready(function(){if(typeof(_doNotSetNDS)=="boolean"&&_doNotSetNDS==true){return;}if(isExcludedNdsUrl(location.host)){return;}if(document.URL.indexOf("/nds/u")>=0){return;}var a="";if(location.protocol=="https:"){a="https://"+getServiceDomain("billing")+".ijji.com/nds/u{"+getNDSI18NAddedURL(document.URL)+"}";}else{a="http://lcs.ijji.com/u{"+getNDSI18NAddedURL(document.URL)+"}";}jQuery("body").append('<iframe src="'+a+'" id="__ndsIframe" width="0" height="0" style="display:none;"/>');});}catch(e){}function toggleDisplay(a){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="";}else{document.getElementById(a).style.display="none";}}function parseCurrency(g){var c=new String(g);var f=3;var b=new Array();if(c.length<=f){return c;}for(var d=0;d<c.length/f;d++){if(c.length<(d+1)*f){b[b.length]=c.substr(0,c.length-d*f);}else{b[b.length]=c.substr(c.length-(d+1)*f,f);}}var a="";for(var d=0;d<b.length;d++){if(a==""){a=b[d];}else{a=b[d]+","+a;}}return a;}function goPlay(c,a){var b=document.getElementById("startFrame");if(b==null){var d=document.createElement("iframe");d.setAttribute("id","startFrame");d.style.border="0px";d.style.width="0px";d.style.height="0px";d.style.visibility="hidden";b=document.body.appendChild(d);}b.src="/common/prelaunch.nhn?gameId="+c+"&subId="+a+"&posx="+__mouse_pos_x+"&posy="+__mouse_pos_y;}function gamestart(b){var a=document.getElementById("startFrame");if(a==null){var c=document.createElement("iframe");c.setAttribute("id","startFrame");c.style.border="0px";c.style.width="0px";c.style.height="0px";c.style.visibility="hidden";a=document.body.appendChild(c);}a.src="/common/pregamestart.nhn?gameId="+b+"&posx="+__mouse_pos2_x+"&posy="+__mouse_pos2_y;}function showDownloadPopup(a){var b=document.getElementById("alertLayer");if(a){b.style.display="block";}else{b.style.display="none";}}function startDownloadAutoInstaller(){showDownloadPopup(false);var a="/nhnusa/dist/hansetup/ijjiAutoInstaller.exe";if((location.host).indexOf("dev")==0||(location.host).indexOf("alpha")==0){a="http://alpha.ijji.com"+a;}else{a="http://cdn.ijjimax.com"+a;}location.href=a;}function showAd(c,f,a){var d=2;var b=Math.floor(Math.random()*d);if(b==0){getAdExpo9(c,f,a);}else{getAdExpo9(c,f,a);}}function getAdExpo9(c,d,a){var b=new expo9_ad();b.addBlockingCategories=c;b.size=d+"x"+a;b.showAd();}var _crmPopup=null;function hasCrmAlert(){var a="services.ijji.com/crm/popupcheck";if((location.host).indexOf("dev")==0||(location.host).indexOf("alpha")==0){a="alpha-"+a;}else{if((location.host).indexOf("beta")==0){a="beta-"+a;}}a="http://"+a;ajaxHttpRequest(a,"showCrmLayer");}function showCrmLayer(d){var b=document.getElementById("crm_layer");if(!b||!d||d.popupyn!="Y"){return;}if(d.popuptype=="POPUP"){popupCrm(d.popupURL);return;}var a=document.createElement("P");a.className="txt";a.appendChild(document.createTextNode(d.message));a.appendChild(document.createElement("BR"));var c=document.createElement("A");c.appendChild(document.createTextNode("Click for details!"));c.href="javascript:popupCrm('"+d.popupURL+"');";a.appendChild(c);b.appendChild(a);b.style.display="block";}function popupCrm(a){if(!a){return;}_crmPopup=window.open(a,"CRM2","fullscreen=no,titlebar=no,toolbar=no,directories=no,status=no,menubar=no,width=200,height=200");document.getElementById("crm_layer").style.display="none";}function closeCrmLayer(){document.getElementById("crm_layer").style.display="none";}var __userSelectedLocale="i18n_userSelectedLocale";var __determinedLanguage="i18n_lang";var __defaultLanguageCode="en";var __ndsLangParam="_lang";var __langOrder=new Array("en","es","de");function getLangCode(){var a=getCookie(__determinedLanguage);if(a==null||a.length==0){return __defaultLanguageCode;}return a;}function getUserSelectedLangCode(){return getCookie(__userSelectedLocale);}function getLanguageName(b){var a={en:"English",es:"Español",de:"Deutsch"};return a[b];}function getLangNum(){var b=getLangCode();for(var a=0;a<__langOrder.length;a++){if(b==__langOrder[a]){return a;}}return 0;}function setLangCode(c){var a=1000*60*60*24*365*10;var b=new Date((new Date()).getTime()+(a));setCookie(__userSelectedLocale,c,b,"/","."+domainName);}function setLangCodeNReload(g,f,a){setLangCode(g);try{var c=location.host;c=c.substr(0,c.indexOf("."));f=f+"_"+c;if(location.protocol=="https:"){var b=adjustIjjiUrl("https://billing.ijji.com/wbers/wbers/post.php?project=multilang&subject=initsel&lang="+g+"&section="+f,false);}else{var b=adjustIjjiUrl("http://wbers.ijji.com/wbers/post.php?project=multilang&subject=initsel&lang="+g+"&section="+f);}jQuery("body").append('<iframe src="'+b+'" id="__wbersIframe" width="0" height="0" style="display:none;"/>');}catch(d){}if(a){return;}setTimeout("location.reload(true);",500);}function getNDSI18NAddedURL(a){if(a==null||a.length<=0){return a;}var c=new Array(/^(http|https):\/\/[^\.]*luminary\.ijji\.com/,/^(http|https):\/\/[^\.]*rohan\.ijji\.com/,/^(http|https):\/\/[^\.]*channel\.ijji\.com/,/^(http|https):\/\/[^\.]*avatar\.ijji\.com/,/^(http|https):\/\/[^\.]*game\.ijji\.com/,/^(http|https):\/\/[^\.]*flash\.ijji\.com/,/^(http|https):\/\/[^\.]*miningboy\.ijji\.com/);for(var b=0;b<c.length;b++){if(c[b].test(a)){return a;}}a=a.replace(/[\?&]+$/,"");var d=a.indexOf("?");if(d>0){return a+"&"+__ndsLangParam+"="+getLangCode();}return a+"?"+__ndsLangParam+"="+getLangCode();}function ialert(){var a=getLangNum();var b="";if(a<arguments.length){b=arguments[a];}else{if(arguments.length>=1){b=arguments[0];}}alert(b);}function findAbsPos(c){var b=0;var a=0;var d=0;if(c.offsetParent){do{b+=c.offsetLeft;a+=c.offsetTop;d++;c=c.offsetParent;}while(c&&d<100);}return new Array(b,a);}var cookieShowPrmrCoupon;var cookieUsePrmrCoupon;function hasPremierCoupon(a,c,d,f){if(typeof(a)=="undefined"){a="";}if(typeof(c)=="undefined"){c="";}if(typeof(d)=="undefined"){d="";}if(typeof(f)=="undefined"){f="";}cookieShowPrmrCoupon="showPremierCoupon"+c+a;cookieUsePrmrCoupon="usePremierCoupon"+c;var g=getCookie(cookieShowPrmrCoupon);if(g==null||g.length==0){var b="premier.ijji.com/coupon/chkCoupon.nhn";if((location.host).indexOf("dev")==0||(location.host).indexOf("alpha")==0){b="alpha-"+b;}else{if((location.host).indexOf("beta")==0){b="beta-"+b;}}b="http://"+b+"?ctype="+d+"&pcode="+f;ajaxHttpRequest(b,"showPremierCouponLayer");}}function showPremierCouponLayer(a){var d=document.getElementById("prmrCouponLayer");if(!d||!a||a.rtn!="0"){return;}var c=document.getElementById("ajax_pcoupon");if(c){c.innerHTML=a.pname;}var b=document.getElementById("ajax_pcoupon_pgcoin");if(b){b.innerHTML=a.pgcoin;}d.style.display="block";}function closePremierCouponLayer(){document.getElementById("prmrCouponLayer").style.display="none";var b=1;var a=new Date();a.setDate(a.getDate()+b);document.cookie=cookieShowPrmrCoupon+"=N; path=/; domain="+getFixDomain()+"; expires="+a.toGMTString()+"; ";}function usePremierCoupon(){var c=1;var b=new Date();b.setDate(b.getDate()+c);document.cookie=cookieUsePrmrCoupon+"=Y; path=/; domain="+getFixDomain()+"; expires="+b.toGMTString()+"; ";var a="premier.ijji.com/premieroptions/ccart.nhn";if((location.host).indexOf("dev")==0||(location.host).indexOf("alpha")==0){a="alpha-"+a;}else{if((location.host).indexOf("beta")==0){a="beta-"+a;}}a="http://"+a;document.location.href=a;}var __mouse_pos_x=0;var __mouse_pos_y=0;var __mouse_pos2_x=0;var __mouse_pos2_y=0;document.onmousemove=mtrack;function mtrack(b){var c=getScrollXY();if(typeof(window.screenLeft)=="number"){__mouse_pos_x=event.screenX-window.screenLeft+c[0];__mouse_pos_y=event.screenY-window.screenTop+c[1];__mouse_pos2_x=event.screenX-top.screenLeft;__mouse_pos2_y=event.screenY-top.screenTop;}else{if(typeof(event)!="undefined"){__mouse_pos_x=event.clientX;__mouse_pos_y=event.clientY;__mouse_pos2_x=event.clientX;__mouse_pos2_y=event.clientY;}else{__mouse_pos_x=b.pageX;__mouse_pos_y=b.pageY;var a=getWindowsPos();__mouse_pos2_x=b.pageX+a.x;__mouse_pos2_y=b.pageY+a.y;}}}function getWindowsPos(){var b=window;pos={x:0,y:0};while(b&&b!=top){var a=b.frameElement;while(a){pos.x+=a.offsetLeft;pos.y+=a.offsetTop;a=a.offsetParent;}b=b.parent;}return pos;}function getScrollXY(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft;}}}return[b,a];}Date.prototype.getTimeZone=function(){return this.timeZone;};Date.prototype.setTimeZone=function(a){this.timeZone=a.toUpperCase();};Date.prototype.adjustTimeZone=function(){var b=new Date(this.getFullYear(),2,8,2,0);if(b.getDay()>0){b=new Date(this.getFullYear(),2,8+7-b.getDay(),1,59,59);}pdtStartInPDT=new Date(b.getTime()+1000*60*60);var a=new Date(this.getFullYear(),10,1,1,0);if(a.getDay()>0){a=new Date(this.getFullYear(),10,7-a.getDay(),1,0);}pstStartInPDT=new Date(a.getTime()+1000*60*60);if(this.getTimeZone()=="PDT"){if(this.getTime()>=pstStartInPDT.getTime()){this.setTime(this.getTime()-1000*60*60);this.setTimeZone("PST");}}else{if(this.getTimeZone()=="PST"){if(this.getTime()>b.getTime()&&this.getTime()<a.getTime()){if(this.getHours()<3){this.setTime(this.getTime()+1000*60*60);}this.setTimeZone("PDT");}}}};var __ijji_local_clock=new Date();function setIjjiLocalServerTime(g,h,b,a,d,f,c){__ijji_local_clock=new Date(g,h,b,a,d,f);__ijji_local_clock.setTimeZone(c);__ijji_local_clock.adjustTimeZone();}function startIjjiClockTimer(){__ijji_local_clock.setTime(__ijji_local_clock.getTime()+1000);__ijji_local_clock.adjustTimeZone();setTimeout("startIjjiClockTimer()",1000);}function getIjjiLocalClockDate(){return __ijji_local_clock;}function getIjjiLocalTimeString(){var b=__ijji_local_clock.getHours();var a=__ijji_local_clock.getMinutes();var c=__ijji_local_clock.getSeconds();if(b<10){b="0"+b;}if(a<10){a="0"+a;}if(c<10){c="0"+c;}return b+":"+a+":"+c;}function getIjjiLocalDateString(){var b=__ijji_local_clock.getMonth()+1;var a=__ijji_local_clock.getDate();if(b<10){b="0"+b;}if(a<10){a="0"+a;}return __ijji_local_clock.getFullYear()+"-"+b+"-"+a;}addEventOnObject(window,"onload",startIjjiClockTimer,false);setDomain();function quantCall(){var a="http://pixel.quantserve.com/pixel/p-bab2-LCsBITgs.gif";if("https:"==document.location.protocol){a="https://secure.quantserve.com/pixel/p-bab2-LCsBITgs.gif";}var b=document.createElement("img");b.setAttribute("name","quantImg");b.setAttribute("src",a);b.setAttribute("height",1);b.setAttribute("width",1);b.style.display="none";document.body.appendChild(b);}addEvent("onload",quantCall);function includeJavaScriptMsg(b,a,c){if(b==null){return;}if(a==null){a="/scripts/msg";}if(c==null){c=getLangCode();}document.write('<script type="text/javascript" src="'+a+"/"+c+"/"+b+'.js"><\/script>');}function helpWbers(){try{$j.get("${conf['url/wbers']}/wbers/post.php?project=multilang&subject=help&referer="+location+"&host="+location.host);}catch(a){}}function reactorDownWbers(c){try{var a=adjustIjjiUrl("http://wbers.ijji.com/wbers/post.php?project=multilang&subject=reactordown&section="+c+"&lang="+getLangCode());$j("body").append('<iframe src="'+a+'" id="__wbersReactorFrame" width="0" height="0" style="display:none;"/>');}catch(b){}}
