var xmlHttp; var returnMessage; var gHostPrefix = location.href.indexOf('alpha-') > 0 ? 'alpha-' : ''; var regex = /(hangame|sayclub)/; var gSite = 'shotonline'; var host = regex.exec(window.location.hostname); if (host) { gSite = host[0]; } function getHTTPObject() { try { req = new XMLHttpRequest(); } catch (err1) { try { req = new ActiveXObject("Msxml12.XMLHTTP"); } catch (err2) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (err3) { req = false; } } } return req; } var xmlHttp = getHTTPObject(); // client download var downloading = false; var download_timer = null; function clear_download_timer() { downloading = false; if (download_timer) { clearTimeout(download_timer); } } function download_client(access) { var client_url = "http://download.shotonline.co.kr/Install/ShotOnlineInstall_Han_0304.exe"; if (access) { if (downloading) { alert("´Ù¿î·ÎµåÁßÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä."); } else { //window.open('http://203.238.190.10/ShotOnlineInstall_Han_1126.exe', '', 'left=10000,top=10000,width=1,height=1'); window.open(client_url, '', 'left=10000,top=10000,width=1,height=1'); //window.open('http://shotgrid.gridcdn.com/Popup_ShotOnlineASP.asp', 'highdown', 'left=0,top=0,width=575,height=275'); download_timer = setTimeout("clear_download_timer()", 10000); downloading = true; xmlHttp.open("get", "/download/downloadcheck.php", true); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { if (xmlHttp.status != 200) { exceptionControl(xmlHttp); } } } xmlHttp.send("/download/downloadcheck.php"); } } else { alert('·Î±×ÀÎ ÈÄ ´Ù¿î·Îµå ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.'); window.location = "/member/login.php?gotourl=http://"+window.location.hostname+"/download/download.php"; } } function game_exe() { xmlHttp.open("POST", "/member/usercheck.php", false); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlHttp.send(null); var xmlHttpData = decodeURIComponent(xmlHttp.responseText); var splitData = xmlHttpData.split("||"); var result = 0; if (gSite == 'hangame') { switch(splitData[0]) { case '0': var splitData2 = splitData[1].split("|"); if (gHostPrefix != '' && gSite == 'hangame') { alert("ÇѰÔÀÓÀ¯Àú ("+splitData2[1]+") °ÔÀÓ½ÇÇà ¼º°ø"); if (typeof setMyRecetGame == 'function') { setMyRecentGame("shotonline", splitData2[1]); } } else { // °ÔÀÓ ¼³Ä¡Ã¼Å© result = Shot.DoTheShot(splitData[1], 1); } if (result == 1) { inspection = ""; if (!inspection){ Shot.DoTheShot(splitData[1], 0); }else{ alert('ÇöÀç °ÔÀÓÁ¡°ËÁßÀÔ´Ï´Ù. '); } if (typeof setMyRecetGame == 'function') { setMyRecentGame("shotonline", splitData2[1]); } } break; case '-1': alert("¼¦¿Â¶óÀÎ ÀÔ´Ï´Ù.!! \n¼¦¿Â¶óÀÎ ±ÔÁ¤¿¡ ÀÇÇØ ¸¸ 19¼¼ ¹Ì¸¸ÀÇ »ç¿ëÀÚ´Â ¼­ºñ½º À̿뿡 Á¦ÇÑÀÌ ÀÖ½À´Ï´Ù.\nȸ¿ø´ÔÀÇ ¾çÇØ ºÎŹ µå¸³´Ï´Ù."); return false; break; case '-2': document.location.replace("http://"+gHostPrefix+"member.hangame.com/myinfo/upgrade.nhn"); break; case '-3': document.location.replace("http://"+gHostPrefix+"member.hangame.com/permissionDeniedView.nhn?code=bbswrite&next=http://"+gHostPrefix+"shotonline.hangame.com&homeurl=http://"+gHostPrefix+"shotonline.hangame.com"); break; case '-4': alert("¾à°ü µ¿ÀÇ ÈÄ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù."); document.location.replace("/member/agreement.php"); break; case '-5': alert("·Î±×ÀÎ ÈÄ °ÔÀÓÀ» ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù."); document.location.replace("/member/login.php?gotourl="+top.location); break; } } else if (gSite == 'sayclub') { switch(splitData[0]) { case '0': var splitData2 = splitData[1].split("|"); if (gHostPrefix != '' && gSite == 'sayclub') { alert("¼¼ÀÌŬ·´À¯Àú ("+splitData2[1]+") °ÔÀÓ½ÇÇà ¼º°ø"); } else { // °ÔÀÓ ¼³Ä¡Ã¼Å© result = Shot.DoTheShot(splitData[1], 1); } if (result == 1) { inspection = ""; if (!inspection){ Shot.DoTheShot(splitData[1], 0); }else{ alert('ÇöÀç °ÔÀÓÁ¡°ËÁßÀÔ´Ï´Ù. '); } } break; case '-1': alert("¼¦¿Â¶óÀÎ ÀÔ´Ï´Ù.!! \n¼¦¿Â¶óÀÎ ±ÔÁ¤¿¡ ÀÇÇØ ¸¸ 19¼¼ ¹Ì¸¸ÀÇ »ç¿ëÀÚ´Â ¼­ºñ½º À̿뿡 Á¦ÇÑÀÌ ÀÖ½À´Ï´Ù.\nȸ¿ø´ÔÀÇ ¾çÇØ ºÎŹ µå¸³´Ï´Ù."); return false; break; case '-4': alert("¾à°ü µ¿ÀÇ ÈÄ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù."); document.location.replace("/member/agreement.php"); break; case '-5': alert("·Î±×ÀÎ ÈÄ °ÔÀÓÀ» ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù."); document.location.replace("/member/login.php?gotourl="+top.location); break; } } else if (gSite == 'shotonline') { // °ÔÀÓ ¼³Ä¡Ã¼Å© result = Shot.DoTheShot("", 1); if (result == 1) { inspection = ""; if (!inspection){ Shot.DoTheShot("", 0); }else{ alert('ÇöÀç °ÔÀÓÁ¡°ËÁßÀÔ´Ï´Ù. '); } } else if (splitData[0] == '-5') { alert("°ÔÀÓÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù.\n°ÔÀÓÀ» ´Ù¿î¹ÞÀ¸½Ã·Á¸é ·Î±×ÀÎ ÇÏ¼Å¾ß ÇÕ´Ï´Ù."); document.location.replace("/member/login.php?gotourl=http://"+window.location.hostname+"/download/download.php"); result = 0; } } if (result == 2) { download_client(true); } }