if(document.cookie.indexOf("persistentSignToken")!=-1 && document.cookie.indexOf("SSOValidate")==-1) { document.location='https://sign.netmarble.net/orange/signin?isCaptcha=false&l_url=' + document.location.href; } /* 신규태그 생성 */ function NewTag( pTagName, pID, pClassName ) { var tag = document.createElement( pTagName ); if ( pID != '' ) { tag.setAttribute( 'id', pID ); } if ( pClassName != '' ) { tag.className = pClassName; } return tag; } /* 신규태그 생성(상위노드 지정) */ function AddTag( pParentNode, pTagName, pID, pClassName ) { var tag = NewTag( pTagName, pID, pClassName ); pParentNode.appendChild( tag ); return tag; } function liCreate(url, name){ return "
  • " + name + "
  • "; } var GameCookieManager = function(){ this.lastAccessGameMark = function(gameCode){ if(gameCode == null || gameCode == '') return; this.setCookie("NM_LAST_ACCESS_GAME", gameCode, null, "/", "netmarble.net"); //window.location = goUrl; } this.getCookie = function(name){ var a_all_cookies = document.cookie.split( ';' ); var a_temp_cookie = ''; var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; // set boolean t/f default f for ( i = 0; i < a_all_cookies.length; i++ ) { // now we'll split apart each name=value pair a_temp_cookie = a_all_cookies[i].split( '=' ); // and trim left/right whitespace while we're at it cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); // if the extracted name matches passed check_name if ( cookie_name == name ) { b_cookie_found = true; // we need to handle case where cookie has no value but exists (no = sign, that is): if ( a_temp_cookie.length > 1 ) { cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } // note that in cases where cookie is initialized but no value, null is returned return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } this.setCookie = function(name, value, expires, path, domain, secure){ var cookie = name + "=" + escape(value) ; if(expires != null ){ cookie += "; expires=\"" + expires.toGMTString() + "\""; } if(path != null ){ cookie += "; path=" + path; } if(domain != null ){ cookie += "; domain=" + domain; } if(secure != null && secure == true ){ cookie += "; secure"; } document.cookie = cookie; } this.goPcVersion = function(){ var key = "NM_PC_VERSION_VIEW"; this.setCookie(key, "Y", null, "/" , ".netmarble.net", false); if(this.getCookie(key) == null){ alert('해당 서비스 이용을 위해 브라우저의 쿠키 설정을 허용으로 변경해 주세요'); return false; }else{ this.goRedirectUrl(); //window.location = this.getRedirectUrl(); } } this.goRedirectUrl = function(){ var host = location.protocol + "//" + location.host; var data = { locationUrl : host } $.getJSON('https://m-gnb.netmarble.net/getRedirectUrl?callback=?', data, function(result){ window.location = result.data; } ); } } function netmarbleMobilePortalSiteMapCall(){ var view = $("#divSitemap").css("display"); if( view == "none"){ $.getJSON('https://m-gnb.netmarble.net/gnb/sitemap?callback=?', function(result){ $("#divSitemap").html(result.data); }); } } function goMarket(appStoreUrl, androidStoreUrl){ var uagent = navigator.userAgent.toLowerCase(); //유저에이전트 문자열을 얻어 소문자로 변환 if(uagent.search("iphone") > -1 ){ if('' == appStoreUrl){ alert('준비중입니다.'); return; } window.location = appStoreUrl; }else if(uagent.search("android") > -1 ){ if('' == androidStoreUrl){ alert('준비중입니다.'); return; } window.location = androidStoreUrl; }else{ window.location = appStoreUrl; } } var GCM = new GameCookieManager(); /* Notice Rolling */ var NetmarbleFooterNoticeConst = { rollnote_t : 3000, rollnote_n : 1, rollnote : null, size : 0 }; NetmarbleFooterNotice = { /* var noticeList = [ { title : '공지사항 제목', type : '공지', link : '링크주소'}, { title : '공지사항2', type : '점검', link : '링크주소2'} ]; */ begin : function( noticeList ) { try { if ( noticeList != null ) { var noticeHtml = ''; $('#divNoteList').append( $(noticeHtml) ); NetmarbleFooterNoticeConst.rollnote_n = 1; NetmarbleFooterNoticeConst.rollnote = document.getElementById('divNoteList').getElementsByTagName('li'); NetmarbleFooterNoticeConst.size = NetmarbleFooterNoticeConst.rollnote.length; NetmarbleFooterNotice.roll_note_set(); NetmarbleFooterNotice.roll_note_start(); } } catch ( e ) { } }, roll_note_set : function(no) { if(no != null && no != "") NetmarbleFooterNoticeConst.rollnote_n = no; for(var i=0;i < NetmarbleFooterNoticeConst.rollnote.length;i++){ NetmarbleFooterNoticeConst.rollnote[i].style.display = 'none'; } NetmarbleFooterNoticeConst.rollnote[NetmarbleFooterNoticeConst.rollnote_n-1].style.display = 'block'; }, roll_note_next : function() { NetmarbleFooterNoticeConst.rollnote_n = NetmarbleFooterNoticeConst.rollnote_n + 1; if(NetmarbleFooterNoticeConst.rollnote_n == (NetmarbleFooterNoticeConst.rollnote.length+1)) NetmarbleFooterNoticeConst.rollnote_n = 1; NetmarbleFooterNotice.roll_note_set(); }, roll_note_stop : function() { if(NetmarbleFooterNoticeConst.size>1) clearInterval(rollnote_tid); }, roll_note_start : function() { if(NetmarbleFooterNoticeConst.size>1) rollnote_tid = setInterval('NetmarbleFooterNotice.roll_note_next()',NetmarbleFooterNoticeConst.rollnote_t); } }; /* End of Notice Rolling */ var callUrl = window.location.href; //old url redirect //"m." 만 판단 할 경우 m.netmarble.net 도메인이 변경 될 수 있으므로 주의 해야 함. if(callUrl.indexOf("m.sf") > 0 || callUrl.indexOf("m.modoo") > 0 || callUrl.indexOf("m.hounds")>0 || callUrl.indexOf("m.mstar")>0) { callUrl = callUrl.replace("m.","m-"); if (window.location.protocol == "http:") { var restOfUrl = callUrl.substr(5); window.location = "https:" + restOfUrl; } window.location = callUrl; } //new url http redirect if (window.location.protocol == "http:") { var restOfUrl = window.location.href.substr(5); window.location = "https:" + restOfUrl; } var headerTitle = "

    netmarble

    \ \ \

    모두의마블

    \ \ \ "; var headerDiv = NewTag("header", "header" , ""); var titleDiv = AddTag(headerDiv, "div", "divHeader", ""); var headerTitle = "

    netmarble

    \ \ \

    모두의마블

    \ \ \ "; titleDiv.innerHTML = headerTitle; $(".wrap").prepend(headerDiv); /* pv*/ var ifr_pv = document.createElement( 'img'); ifr_pv.setAttribute( 'src', 'http://nls.netmarble.net/pv.asp?nls_site=-1&nls_cate=mnetmarble&nls_url='+document.URL+'&nls_ref='+document.referrer+'&nls_screen='+screen.availWidth+'_'+screen.availHeight ); ifr_pv.setAttribute( 'width', '0'); ifr_pv.setAttribute( 'height','0'); ifr_pv.setAttribute( 'frameborder','0' ); ifr_pv.setAttribute( 'style', 'display:none;position:absolute;left:0;top:-100px;width:0;height:0;border:0px solid #f00;' ); document.body.insertBefore( ifr_pv, document.body.firstChild );