// Gpotato JS 전역변수 설정 { var CommonURL = "http://www.gpotato.kr/"; var FlyffURL = "http://www.flyff.com/"; var AirmatchURL = "http://www.airmatch.co.kr/"; var MurimURL = "http://murimhero.gpotato.kr/"; var CastleHeroURL = "http://castlehero.gpotato.kr/"; var ILURL = "http://eternalblade.gpotato.kr/"; var RappelzURL = "http://rappelz.galalab.kr/"; // } // Gpotato JS 전역 함수 설정 { function OnPortalLogin() { location.href = CommonURL + "member/login.aspx?RtnUrl=" + escape(document.URL); } function OnTopPortalLogin() { top.location.href = CommonURL + "member/login.aspx?RtnUrl=" + escape(CommonURL); } function OnPortalLogout() { location.href = CommonURL + "member/logout.aspx?RtnUrl=" + escape(document.URL);OnCSAny } function OnPortalJoinMember() { location.href = CommonURL + "member/default.aspx?RtnUrl=" + escape(document.URL); } function OnPortalMyPage() { alert("임시회원은 이용할 수 없는 메뉴입니다."); } function OnTopPortalCS() { top.location.href = CommonURL + "Customer/default.aspx"; } function OnPortalCS() { location.href = CommonURL + "Customer/default.aspx"; } function OnPortalSearchID() { top.location.href = CommonURL + "member/SearchMember.aspx"; } function OnPortalTempParentPage() { top.location.href = CommonURL + "member/member_under_parent.aspx"; } function OnPortalTempJoinPage() { top.location.href = CommonURL + "member/member_under_info.aspx"; } function OnPotato(){ //alert("준비중입니다."); OnPortalLogin(); } function OnPotatoLink(url, width, height){ OnPortalLogin(); } function OnZzorgi(){ OnPotatoLink('/potato/zzorgi/login.aspx', '452', '705'); } function OnChargePotato() { location.href = CommonURL + "mypage/potato.aspx"; } function GoIL() { location.href = ILURL; } function GoFlyff() { //location.href = FlyffURL; window.open(FlyffURL); } function GoCastle() { location.href = CastleHeroURL; } function GoAirmatch() { //location.href = AirmatchURL; window.open(AirmatchURL); } function GoMurim() { location.href = MurimURL; } function GoRappelz() { //location.href = RappelzURL; window.open(RappelzURL); } //} function GoPortal() { location.href = CommonURL; } // 회원가입 function OnMemberRegist() { location.href = CommonURL + "/member/"; } // 아이디/비번찾기 function OnSearchMember() { location.href = CommonURL + "/member/SearchMember.aspx"; } // 준회원 보호자인증 function OnGradeUP() { location.href = CommonURL + "/member/gradeup.aspx"; } // 나의 감자 function OnMyPotato() { alert("임시회원은 이용할 수 없는 메뉴입니다."); } // 지포테이토 소식 function OnNews() { location.href = CommonURL + "/news/default.aspx"; } // 이벤트 소식 function OnEvents() { location.href = CommonURL + "/event/default.aspx"; } // 나의문의내역 function OnMyClaim() { alert("임시회원은 이용할 수 없는 메뉴입니다."); } // 회원탈퇴 function OnMemberQuit() { alert("임시회원은 이용할 수 없는 메뉴입니다."); } // 1:1문의 function OnCS() { alert("로그인 하셔야 이용 가능합니다."); } // 비회원 1:1문의 function OnCSAny() { location.href = CommonURL + "/Customer/cs_any.aspx"; } function OnParentLocation(url) { location.href = "http://www.gpotato.kr/common/js/parent.aspx?RtnUrl=" + escape(url); } function OnMainPage() { location.href = "/default.aspx"; } function OnWriteGNB() { var html = ""; html += "
"; html += "
"; html += "
"; html += "
"; html += ""; html += ""; html += ""; html += ""; html += ""; html += "
"; html += ""; html += ""; html += "
"; html += "
"; html += " "; html += "
"; html += "
"; html += "
"; html += "
"; document.writeln(html); var Image = new Array(); Image[0] = "\"경험치"; Image[1] = "\"더블X더블"; Image[2] = "\"이터널"; PortalRolling("RollingBanner", Image); } var GNBTimer; addEvent = function (o, e, f) { var r = false; if (window.addEventListener) { o.addEventListener(e, f, false); r = true; } else if (window.attachEvent) { r = o.attachEvent('on' + e, f); } return r; } function PortalRolling(target, Image) { //상단 배너 롤링 var width = 160; var height = 38; var targetObj = document.getElementById(target); targetObj.style.width = width + "px"; targetObj.style.height = height + "px"; //targetObj.style.position = "relative"; targetObj.style.overflow = "hidden"; targetObj.style.whiteSpace = "nowrap"; var add = function(item) { var SPAN = document.createElement('span'); SPAN.innerHTML = item; SPAN.style.width = width + "px"; SPAN.style.height = height + "px"; targetObj.appendChild(SPAN); SPAN = null; } var len = Image.length; if (len == 1) { add(Image[0]); return; } else { for (var i = 0; i < len; i++) { add(Image[i]); } add(Image[0]); } var count = Math.ceil(targetObj.scrollWidth / width), now = 1, sp, ep, loop; setInterval(function() { if (now == count) targetObj.scrollLeft = 0, now = 1; ep = width * now++; loop = setInterval(function() { sp = targetObj.scrollLeft; if (sp == ep) clearInterval(loop); targetObj.scrollLeft += Math[sp < ep ? 'ceil' : 'floor']((ep - sp) / 7); }, 15); }, 2000); }