var flashInit; var globalImageURL = "http://c.img.netmarble.in.th" ; var globalMsgTabStaus = "AXNotInstalledMessenger"; function ChangeReadyStateFlash() { flashInit = true; } //--------------------------------------------- // Open Popup : add Abuse Page //--------------------------------------------- function addAbuser(abuserID, locationCode, pType, seq, objName) { var url = "http://www.netmarble.in.th/support/abusereport/abuseReport.asp" ; var param = ""; if(typeof(abuserID) != "undefined" && typeof(abuserID) == "string" && abuserID != "undefined") param += "?violator=" + abuserID ; if(typeof(locationCode) == "string" && locationCode != "undefined") param += "&locationCode=" + locationCode ; if(typeof(pType) == "string" && pType != "undefined") param += "&pType=" + pType ; if(typeof(seq) == "string" && seq != "undefined") param += "&seq=" + seq ; if(typeof(objName) == "string" && objName != "undefined") param += "&objName=" + objName ; url = url + param ; try{ var popup = top.document.getElementById("pop").value; if(popup == 1) window.open(url,"_blank"); else top.location.href=url; }catch(e){ top.location.href=url; } } //--------------------------------------------- // open Profile -> Message Tab //--------------------------------------------- function openMessage(strUrl){ f_openWinNoResize(strUrl, 500, 700, "") } //--------------------------------------------- // open Profile //--------------------------------------------- function openProfile(strUrl,me) { strUrl = strUrl.toLowerCase() ; strUrl = strUrl.replace("/myaccount/profile/editprofile.asp","/profile/settings/"); strUrl = strUrl.replace("/myaccount/profile/","/profile/"); strUrl = strUrl.replace("/myaccount/guestbook/","/profile/guestbook/"); strUrl = strUrl.replace("/myaccount/message/","/profile/message/"); if(me !== undefined) f_openWinNoResize(strUrl, 700, 720, me) else f_openWinNoResize(strUrl, 700, 720, "") } //--------------------------------------------- // go penalty Page //--------------------------------------------- function goPenalty(target) { var url = "https://auth.netmarble.in.th/login/warn_svcpenalty.asp" ; if(target == null) { top.location.href = url ; } else if("_blank") { window.open(url,"penalty"); } else { target.location.href = url ; } } //--------------------------------------------- // AX Messenger is not istalled //--------------------------------------------- function msgGuideTab(cmd,status) { if (checkNMAutoUpdateX()) return; try{ if(navigator.plugins.length == 0 || window.showModelessDialog) { var objFlashMsg = document.getElementById("objFlashInstallMsg"); } else { return; document.getElementById("__divMessenger__").style.right = "60px"; var objFlashMsg = document.getElementById("objFlashInstallMsg_ff"); } switch(cmd) { case 1 : objFlashMsg.cmd(getMessengerTabStatus()); break; // sent Tab Status to MSG //0:close case 2 : setMessengerTabStatus(status); break; // Set Tab Status case 3 : goInstall(); break; // Go to Install Page case 4 : openMsgProfile(msgProtocolInfo.openViewMemo+uid, uid); break; // Go to Message case 5 : openMsgProfile(msgProtocolInfo.openRecentPost + uid, uid); break; // Go to My Recent Post case 6 : openMsgProfile(msgProtocolInfo.openGuestbook + uid, uid); break; // Go to Guestbook case 7 : openMsgProfile(msgProtocolInfo.openProfile+uid, uid); break; // Go to My Profile case 8 : reqMsgLogout(); break; // SignOut default : break; } }catch(e) { } } function getMessengerTabStatus() { var name = globalMsgTabStaus; if (getCookie(globalMsgTabStaus) == 1 || getCookie(globalMsgTabStaus) == "") var value = 1; else var value = 0; return value; } function setMessengerTabStatus(status) { var name = globalMsgTabStaus; createCookie( name, status) } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.domain="netmarble.com"; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } //--------------------------------------------- //addbookmark //--------------------------------------------- function addBookMark(url, title) { // user agent sniffing is bad in general, but this is one of the times // when it's really necessary var ua=navigator.userAgent.toLowerCase(); var isKonq=(ua.indexOf('konqueror')!=-1); var isSafari=(ua.indexOf('webkit')!=-1); var isMac=(ua.indexOf('mac')!=-1); var buttonStr=isMac?'Command/Cmd':'CTRL'; if(window.external && (!document.createTextNode || (typeof(window.external.AddFavorite)=='unknown'))) { // IE4/Win generates an error when you // execute "typeof(window.external.AddFavorite)" // In IE7 the page must be from a web server, not directly from a local // file system, otherwise, you will get a permission denied error. window.external.AddFavorite(url, title); // IE/Win } else if(isKonq) { NMMessageBox('confirm', 'ข้อมูล', 'คุณจำเป็นต้องกดคำสั่ง CTRL + B เพื่อบุ๊คมาร์คเว็บไซต์ของเรา.'); } else if(window.opera) { void(0); // do nothing here (Opera 7+) } else if(window.home || isSafari) { // Firefox, Netscape, Safari, iCab NMMessageBox('confirm', 'ข้อมูล', 'คุณจำเป็นต้องกดคำสั่ง '+buttonStr+' + D เพื่อบุ๊คมาร์คเว็บไซต์ของเรา.'); } else if(!window.print || isMac) { // IE5/Mac and Safari 1.0 NMMessageBox('confirm', 'ข้อมูล', 'คุณจำเป็นต้องกดคำสั่ง cmd + D เพื่อบุ๊คมาร์คเว็บไซต์ของเรา.'); } else { NMMessageBox('confirm', 'ข้อมูล', 'เพื่อบุ๊คมาร์คเว็บไซต์นี้คุณจำเป็นต้องทำเช่นนั้นด้วยตนเองผ่านทางเบราว์เซอร์ของคุณ.'); } } //--------------------------------------------- // go Login Page //--------------------------------------------- function goLoginPage(target,returnURL,domaincode) { if(domaincode == undefined) { domaincode = "netmarble"; } if(domaincode == "gpotato") { //var url = "https://secure.gpotato.com/login.php?redirect_to=" + encodeURIComponent(returnURL) ; var url = "http://www.gpotato.com/?action=login&url=" + encodeURIComponent(returnURL) ; } else { var url = "https://auth.netmarble.in.th/login/index.asp?r_url=" + encodeURIComponent(returnURL) ; } if(target == null || target == "") { top.location.href = url ; } else if("_blank") { window.open(url,"penalty"); } else { target.location.href = url ; } } //--------------------------------------------- // go Login Page //--------------------------------------------- function alertLoginPage(returnURL) { top.NMMessageBox('Confirm', 'ข้อมูล', "กรุณาลงชื่อเข้าระบบเพื่อเข้าถึงคุณลักษณะที่คุณร้องขอ!", "https://auth.netmarble.in.th/login/index.asp?r_url=" + encodeURL(returnURL)); } function f_chkMatchHost(arrStrRe, strDefaultHost) { var strHost, strCurHost, anRegExp, i, bChk; try { strCurHost = self.location.host; for(i=0, bChk = false;!bChk && i 4 || strFileFormat.length < 3) { return false; } if(strFileName.length>15) { return false; } if(!f_chkAlphaNum(strFileName)) { return false; } return true; } function f_GetSelValue(theForm,ElementName) { var strSelValue=''; var idxSelect; var bSelected=false; var Element = theForm.elements[ElementName] var ElementLen = Element.length; if(typeof(ElementLen)=='undefined') { if(Element.checked) { strSelValue = Element.value; bSelected = true; } } else { for(var idxLoop=0;idxLoop0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i -1 ) { count++; subStr = subStr.substring(idx+1); } else subStr = ""; } } catch(x) { } return count; } function strcmp(strA, strB) { return ( strA > strB ? 1 : ( strA == strB ? 0 : -1)); } function streql(strA, strB) { return ( strcmp(strA, strB) == 0 ); } function stricmp(strA, strB) { if ( typeof(strA) == "string" && typeof(strB) == "string" ) return strcmp(strA.toUpperCase(),strB.toUpperCase()); else return -1; } function strieql(strA, strB) { return ( stricmp(strA, strB) == 0 ); } function F_MsgBox_Modeless(url, w, h) { var strFeatures = "status:no;dialogWidth:"+w+"px;dialogHeight:"+h+"px;center:yes;scroll:no;unadorned:no;help:no;"; var winMsgBox = window.showModelessDialog(url, new Array(window, opener), strFeatures); } function createCode(objArr, iLength) { var arr = objArr; var randomStr = ""; for (var j=0; j 12) ? "PM" : "AM" ; var hh = parseInt(time[0],10); hh = (hh > 12) ? hh-12 : hh ; hh = (hh < 10) ? "0" + hh : hh.toString(); date = monthNameEng[parseInt(date[1],10)].substr(0,3) + " " + date[2] + ", " + date[0] + " " + hh + ":" + time[1] + " " + amPm ;//+ " [GMT+9]" //date = monthNameEng[parseInt(date[1],10)].substr(0,3) + " " + date[2] + ", " + date[0] + " " + parseInt(hh,10) + ":" + time[1] + " " + amPm + " [GMT+9]" return date ; } //--------------------------------------------- // Check ActiveX SSL // output : boolean //--------------------------------------------- function checkSSLActiveX() { return false; } //--------------------------------------------- // Check ActiveX NM Msg // output : boolean //--------------------------------------------- function checkNMAutoUpdateX() { try { if(navigator.plugins.length == 0 || window.showModelessDialog) { var axUpdaterObj = null; var axMsgObj = null ; axUpdaterObj = new ActiveXObject("NMManagerX.NetmarbleAutoUpdater.1"); if(axUpdaterObj) { return true; //axMsgObj = new ActiveXObject("GlbNMWebMessengerAX.GlbNetmarbleWebMessenger.1"); //if(axMsgObj) // return true; //else // return false; } else return false; } else { // var msg = ""; // for(key in navigator.plugins) // { // msg += key + "--" + navigator.plugins[key].name + "--" + navigator.plugins[key].filename + "--" + navigator.plugins[key].description + "
"; // } var updaterPlugin = navigator.plugins["npGlbNMFFUpdaterPlugin"]; if( updaterPlugin != null ) { return true ; } else { return false ; } } } catch(e) { return false ; } } function ajaxAsynch(url, callbackFunc) { var myAjax = new Ajax.Request( url, { method: 'get' , asynchronous: true , onCreate : function(req) { //alert('onCreate'); } , onSuccess: function() { //alert('onSuccess'); //callbackFunc(req); } , onComplete: function(req) { //alert(req); callbackFunc(req); } }); } //--------------------------------------------- // image roll-over //--------------------------------------------- function cha(obj){ var str = obj.src; if(str.indexOf('_on.gif') < 0){ ss = str.substr(0, str.indexOf('.gif')) obj.src = ss + "_on.gif"; }else{ ss = str.substr(0, str.indexOf('_on.gif')) obj.src = ss + ".gif"; } } function cha2(obj){ var str = obj.src; if(str.indexOf('_on.jpg') < 0){ ss = str.substr(0, str.indexOf('.jpg')) obj.src = ss + "_on.jpg"; }else{ ss = str.substr(0, str.indexOf('_on.jpg')) obj.src = ss + ".jpg"; } } function Div_Show(str){ document.getElementById(str).style.display = "block"; } function Div_Hide(str){ document.getElementById(str).style.display = "none"; } //--------------------------------------------- // Redirect function //--------------------------------------------- function rdCklg(code) { try { var xmlHttp = AjaxCore_createXMLHttpRequest() if(xmlHttp) { var url = "/rd/" + code; xmlHttp.open("GET", url, false); xmlHttp.send(null); } } catch(ex) {} } //--------------------------------------------- // Make Uniq Cookie //--------------------------------------------- document.writeln(""); //--------------------------------------------- // Get Server Time //--------------------------------------------- var localDate = null; function leadingZero(num) { return (num < 10) ? "0" + num : num.toString(); } function setServerClock() { try { document.getElementById('divServerTime').innerHTML = "loading..."; printServerClock(); } catch(e) { setTimeout("setServerClock()", 1); } } //Mon Sep 14 11:38:13 UTC+0900 2009 function printServerClock() { var year = 2018; var month = 9; var day = 24; var hour = 5; var minute = 24; var second = 37; if(localDate == null) { localDate = new Date(year, month-1, day); localDate.setHours(hour); localDate.setMinutes(minute); localDate.setSeconds(second); } else localDate.setMilliseconds(1000); if(localDate) { var timeString = getFormattedDate(localDate); document.getElementById('divServerTime').innerHTML = timeString; } setTimeout("printServerClock()", 1000); } function getFormattedDate(localDate) { var returnValue = ''; var monStr = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); returnValue = "Local Server Time" + monStr[localDate.getMonth()] + ' ' + leadingZero(localDate.getDate()) + ' '; returnValue += " " + leadingZero(localDate.getHours()) + ':' + leadingZero(localDate.getMinutes()) + ':' + leadingZero(localDate.getSeconds()) + "[GMT+9]"; return returnValue; } //setServerClock(); //--------------------------------------------- // Dual Time Function //--------------------------------------------- function leadingZero(num) { return (num < 10) ? "0" + num : num.toString(); } function getLocalTimeCore(time) { var returnValue = new Array(); var timeType = 0; //0=NaN, 1=hh, 2=hh:MM, 3=hh:MM:ss try { var dates = time.split('T'); var date = dates[0]; var dateArray = date.split('-'); if(dateArray.length == 3) { var year = dateArray[0]; var tmpMonth = dateArray[1]; var tmpDay = dateArray[2]; var month = parseInt(tmpMonth, 10); var day = parseInt(tmpDay, 10); var localDate = new Date(year, month - 1, day); if(dates.length == 2) { var times = dates[1]; var timeZone = -localDate.getTimezoneOffset(); var timeArray = times.split(':'); if(timeArray[0]) { var hour = parseInt(timeArray[0], 10) localDate.setHours(hour); timeType = 1; if(timeArray[1]) { var minutes = parseInt(timeArray[1], 10) localDate.setMinutes(minutes); timeType = 2; if(timeArray[2]) { var seconds = parseInt(timeArray[2], 10) localDate.setSeconds(seconds); timeType = 3; } } } var m = localDate.getMinutes(); m -= (9*60); m += timeZone localDate.setMinutes(m); } } } catch(ex) { return null; } returnValue[0] = localDate; returnValue[1] = timeType; return returnValue; } function getLocalTime(time, rtn) { var monStr = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); try { var localTimeValues = getLocalTimeCore(time); if(localTimeValues != null && localTimeValues.length == 2) { var localDate = localTimeValues[0]; var timeType = localTimeValues[1]; var userTime = monStr[localDate.getMonth()] + ' ' + leadingZero(localDate.getDate()) + ', ' + localDate.getFullYear() + ' '; if(timeType > 0) { var hour = parseInt(localDate.getHours(), 10); var apm = "AM"; //if(hour > 11) //{ // hour -= 12; // apm = "PM"; //} if(hour > 11) { if(hour != 12) hour -= 12; apm = "PM"; }else if(hour == 0) hour = 12; userTime += leadingZero(hour); if(timeType > 1) userTime += ':' + leadingZero(localDate.getMinutes()); if(timeType > 2) userTime += ':' + leadingZero(localDate.getSeconds()); userTime += ' ' + apm; } if(rtn) return userTime else document.write(userTime); } } catch(ex) { if(rtn) return time + ' [GMT+9]'; else document.write(time + ' [GMT+9]'); } } function getLocalTimeData(time) { var returnValue = ''; try { var localTimeValues = getLocalTimeCore(time); if(localTimeValues != null && localTimeValues.length == 2) { var localDate = localTimeValues[0]; var timeType = localTimeValues[1]; returnValue = localDate.getFullYear().toString() + '-' + (leadingZero(localDate.getMonth() + 1)).toString() + '-' + leadingZero(localDate.getDate()); if(timeType > 0) returnValue += 'T' + leadingZero(localDate.getHours()); if(timeType > 1) returnValue += ':' + leadingZero(localDate.getMinutes()); if(timeType > 2) returnValue += ':' + leadingZero(localDate.getSeconds()); } } catch(ex) { return ''; } return returnValue; } function Cji_Flash(Url, wd, ht, swfId, wm, vars, returnVal) { var https = (document.location.toString().indexOf("https://") == 0) ? "https" : "http" ; var TxtSwf = "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; TxtSwf += "" ; if(returnVal) return TxtSwf ; else document.write (TxtSwf); } function reqMsgLogout(uid) { location.href="https://auth.netmarble.in.th/login/logout.asp?uid="; } function newCalByte (txt,max,obj) { var curSize = 0; var chr ; var rtnArray = new Array(); rtnArray[0] = 0 ; rtnArray[1] = "" ; for(i=0; i< txt.length; i++) { chr = txt.charAt(i); //byte += encodeURL(chr).length ; if (escape(chr).length > 4) { curSize = 2; } else if(escape(chr) == "%22" || escape(chr) == "%27" || escape(chr) == "%5C") { curSize = 3; } else if(escape(chr) == "%0D" || escape(chr) == "%0A") { // input Enter is \n\r if(escape(chr) == "%0A") curSize = 3; } else { curSize = 1; } if( (rtnArray[0] + curSize ) <= max) { rtnArray[1] += txt.charAt(i); } rtnArray[0] += curSize; } return rtnArray; } function getGNBLocalTime(){ try{return "2018-09-24T05:24:37";}catch(e){return "";} } function getGNBYourTime(){ try{return getLocalTimeData(getGNBLocalTime());}catch(e){return "";} } function printGnbTimeFlash() { return; try { var flashURL = (document.location.toString().indexOf("https://") == 0) ? "https://bill.netmarble.in.th/Common/" : "http://c.img.netmarble.in.th" ; var url= flashURL + "/portal/v/swf/dualtimer/110905/global_282_180_bottomdualtimer.swf" ; var wd = "282" ; var ht = "180" ; var swfId = "global_282_180_bottomdualtimer"; var wm = "transparent"; var local_time = "2018-09-24T05:24:37" ; var your_time = getLocalTimeData(local_time); vars="local_time="+ local_time +"&your_time=" + your_time+ "&stage_code=0"; var timeSwf = Cji_Flash(url, wd, ht, swfId, wm, vars, true); if(document.getElementById("divServerTime") != null){ document.getElementById("divServerTime").innerHTML = timeSwf; } hidden_dual(); } catch(e) { setTimeout("printGnbTimeFlash()", 1); } } //flash height var mouse_ps = "out"; function flash_height(fht) { //document.getElementById("divServerTime").style.height = fht + "px"; try{ if(arguments[0] == 180){ jQuery('.p_map > dl').css('zIndex', '1'); jQuery('.clock').css('zIndex', '100'); } if(arguments[0] == 44){ jQuery('.p_map > dl').css('zIndex', '150'); jQuery('.clock').css('zIndex', '1'); } }catch(e) {} } function setmouse_ps(thisValue) { var positionValue = thisValue; mouse_ps = positionValue; } function hidden_dual() { try { if (navigator.appName == 'Microsoft Internet Explorer') { if (mouse_ps == "out") { if(document.getElementById("global_282_180_bottomdualtimer") != null) document.getElementById('global_282_180_bottomdualtimer').CloseDualTime(); } } else { if (mouse_ps == "out" && typeof(document.getElementsByName("global_282_180_bottomdualtimer")[0]) != "undefined") { document.getElementsByName('global_282_180_bottomdualtimer')[0].CloseDualTime(); } } }catch(e){} } function netmarbleClick(event) { if(typeof(hideQuickMenu) == "function") hideQuickMenu(quickMenuLayerID,false,event); //if(typeof(hidden_dual) == "function") hidden_dual(event); //if(typeof(ClockOpen) == "function") ClockOpen(event); } function removeURLParam(url, param) { var urlparts= url.split('?'); if (urlparts.length>=2) { var prefix= encodeURIComponent(param)+'='; var pars= urlparts[1].split(/[&;]/g); for (var i=pars.length; i-- > 0;) if (pars[i].indexOf(prefix, 0)==0) pars.splice(i, 1); if (pars.length > 0) return urlparts[0]+'?'+pars.join('&'); else return urlparts[0]; } else return url; } //--------------------------------------------- // Facebook API //--------------------------------------------- window.fbAsyncInit = function () { FB.init({ appId: '322930364474749', status: true, cookie: true, xfbml: true, version: 'v2.5', channelUrl: 'https://www.netmarble.in.th/channel.html' }); if(typeof(fbResult) == "function") { FB.getLoginStatus(function(response) { if (response.status === 'connected') { var uid = response.authResponse.userID; var accessToken = response.authResponse.accessToken; jQuery.getJSON("https://graph.facebook.com/v2.5/me?access_token=" + accessToken + "&callback=?", fbResult); } else { alert("noconnected"); } }); } }; // Facebook 로그인이 되어서 받은 정보 callback function. fbAsyncInit 부분에서 callback function 을 지정 /*function fbResult(data) { var user_id = data.id; var user_name = data.name; var user_email = data.email; var user_gender = (data.gender == 'male') ? 0 : 1; var user_birthday = data.birthday; var user_locale = data.locale; var user_location_tmp; if (data.location !== undefined && data.location !== null) { var user_location = data.location.name; user_location_tmp = user_location.split(","); var user_profileImage = "https://graph.facebook.com/" + user_id + "/picture?type=large"; } // TODO : 정보로 Hidden Form을 채우는 로직 작성 } jQuery( function() { var js, id = 'facebook-jssdk', ref = document.getElementsByTagName('script')[0]; if (document.getElementById(id)) { return; } js = document.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/sdk.js"; ref.parentNode.insertBefore(js, ref); }); */ (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); // facebook connect button 클릭시 호출되는 function function connectFacebook(type, Rurl) { FB.login( function (response) { if (response.authResponse) { var accessToken = response.authResponse.accessToken; var strLoginRurl = Rurl; if(Rurl) strLoginRurl = Rurl; else strLoginRurl = top.document.location.href; var strLoginRurl = removeURLParam(strLoginRurl, "err"); strLoginRurl = removeURLParam(strLoginRurl, "uid"); strLoginRurl = removeURLParam(strLoginRurl, "l_failcnt"); var strLoginRurl = encodeURIComponent(strLoginRurl); //Facebook 에서 가져온 정보를 통해 매핑하는 작업 후 돌아올 Url location.href = "https://auth.netmarble.in.th/login/channelLogin.asp?r_url="+ strLoginRurl + "&accessToken=" + accessToken + "&type=" + type; //facebookMatch.asp 에서 Facebook에서 가져온 정보를 통해 매핑 등을 하는 작업 등을 함 //location.href = "?channelCode=FACEBOOK&returnUrl="+ strLoginRurl + "&key=" + accessToken; //JAVA 인증이 적용된 경우 } else { // Connect 허용 안했을때 처리 // 현재는 무시 } }, { scope: 'email,user_birthday' }//얻어올 Facebook 에서 제공하는 정보-Facebook app 설정에서 허용된 것이어야 함 ); } function connectFacebook2(type, Rurl) { var oldToken = FB.getAccessToken(); FB.login( function (response) { if (response.authResponse && response.authResponse.accessToken != oldToken) { var accessToken = response.authResponse.accessToken; var strLoginRurl = Rurl; if(Rurl) strLoginRurl = Rurl; else strLoginRurl = top.document.location.href; var strLoginRurl = removeURLParam(strLoginRurl, "err"); strLoginRurl = removeURLParam(strLoginRurl, "uid"); strLoginRurl = removeURLParam(strLoginRurl, "l_failcnt"); var strLoginRurl = encodeURIComponent(strLoginRurl); //Facebook 에서 가져온 정보를 통해 매핑하는 작업 후 돌아올 Url location.href = "https://auth.netmarble.in.th/login/channelLogin.asp?r_url="+ strLoginRurl + "&accessToken=" + accessToken + "&type=" + type; //facebookMatch.asp 에서 Facebook에서 가져온 정보를 통해 매핑 등을 하는 작업 등을 함 //location.href = "?channelCode=FACEBOOK&returnUrl="+ strLoginRurl + "&key=" + accessToken; //JAVA 인증이 적용된 경우 } else { // Connect 허용 안했을때 처리 // 현재는 무시 FB.logout(); } }, { scope: 'email,user_birthday' , auth_type: 'reauthenticate' }//얻어올 Facebook 에서 제공하는 정보-Facebook app 설정에서 허용된 것이어야 함 ); } function disconnectFacebook(type) { } function FacebookLogout(type) { FB.logout( function (response) { } ); } function connectFacebookCheck(type, Rurl) { FB.login( function (response) { if (response.authResponse) { var accessToken = response.authResponse.accessToken; var strLoginRurl = Rurl; if(Rurl) strLoginRurl = Rurl; else strLoginRurl = top.document.location.href; var strLoginRurl = removeURLParam(strLoginRurl, "err"); strLoginRurl = removeURLParam(strLoginRurl, "uid"); strLoginRurl = removeURLParam(strLoginRurl, "l_failcnt"); var strLoginRurl = encodeURIComponent(strLoginRurl); //Facebook 에서 가져온 정보를 통해 매핑하는 작업 후 돌아올 Url location.href = "https://auth.netmarble.in.th/login/channelLogin2.asp?r_url="+ strLoginRurl + "&accessToken=" + accessToken + "&type=" + type; //facebookMatch.asp 에서 Facebook에서 가져온 정보를 통해 매핑 등을 하는 작업 등을 함 } else { // Connect 허용 안했을때 처리 // 현재는 무시 } }, { scope: 'email,user_birthday' }//얻어올 Facebook 에서 제공하는 정보-Facebook app 설정에서 허용된 것이어야 함 ); } //----------------------------------------------------------- document.onclick = netmarbleClick; //printGnbTimeFlash(); window.status = "Web1";