function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&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<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function moveonurl(url) { top.ogn_main.location = url; } function movetopurl(url) { top.location = url; } function movebodyurl(url) { top.frmTopMenu.main_url.value = url; top.frmTopMenu.submit(); } function moveoparentbodyurl(url) { opener.top.frmTopMenu.main_url.value = url; opener.top.frmTopMenu.submit(); } function MoveUrl(url) { window.navigate(url); } function BackUrl(n) { var count = -1; if (n != null) count = 0 - n; history.go(count); } function OpenWindow(url, w, h, name) { attr = "scrollbars=yes,toolbar=yes,location=no,directories=no,resizable= yes,status=yes,menubar=no,width=" + w+ ", height= " + h; if (name == null) name = 'default'; win = window.open(url, name, attr); win.focus(); } function CloseWindow() { window.close(); if (opener != null) opener.focus(); } function PopUpCalendar(dest, srcForm) { //popup ÇüÅÂÀÇ calendar win = window.open("/common/asp/calendar.asp?target=" + dest + "&formName=" + srcForm,"calendar", "menubar=no, toolbar=no, width=300, height=250, top=100, left=300, alwaysRaised=Yes, dependent=yes"); win.focus(); } // date´Â YYYY-MM-DD formatÀÌ´Ù function getWeeks(date) { var reqDate; if (date != null) { var dateArray = date.split("-"); var year = dateArray[0]; if (year < 100) { year += 1900 } reqDate = new Date(dateArray[0], dateArray[1]-1, dateArray[2]); } else { reqDate = new Date() } var firstDay = (new Date(reqDate.getYear(), reqDate.getMonth(), 1)).getDay(); var monthOfWeek = Math.ceil((reqDate.getDate()+firstDay) / 7); return reqDate.getYear() + "-" + (reqDate.getMonth()+1) + "-" + monthOfWeek; } function onStatus(strTmp) { if(strTmp == null) { strTmp = ":::¿Â°ÔÀÓ³Ý:::"; } window.status = strTmp; } // ÄíÅ°°ü·Ã // ÄíÅ°¼ÂÆà ÇÔ¼ö. ¾ÕÀ¸·Î expires ÀÏ ¸¸Å­ Áö³­ ³¯ÀÚ±îÁö À¯È¿ÇÑ ÄíÅ° ¼ÂÆà // path = "/", domain="ongamenet.com" function SetTermCookie (name, value, expires, path, domain) { var argv = SetTermCookie.arguments; var argc = SetTermCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expires ); document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + todayDate.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } // ÄíÅ° »èÁ¦ function clearOnCookie(name,path, domain) { var argv = clearOnCookie.arguments; var argc = clearOnCookie.arguments.length; var path = (argc > 1) ? argv[1] : null; var domain = (argc > 2) ? argv[2] : null; var today = new Date(); var expire_date = new Date(today.getTime() - 60*60*24*1000); document.cookie = name + "= " + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((expire_date == null) ? "" : ("; expires=" + expire_date.toGMTString())); } // ========================================== // Rel B // ========================================== // Æ˾÷ °ü·Ã ÇÔ¼ö function open_window(url, name, width, height, feature) { var oWnd; if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) { // browser version >= ie 4 if(width < window.screen.width && height < window.screen.height) { var windowX = Math.ceil( (window.screen.width - width) / 2 ); var windowY = Math.ceil( (window.screen.height - height) / 2 ); oWnd = window.open(url, name, feature+",width=" + width +",height=" + height+",left="+windowX+",top="+windowY); } else { oWnd = window.open(url, name, feature+",width=" + width +",height=" + height); } } else { oWnd = window.open(url, name, feature+",width=" + width +",height=" + height); } return oWnd; } function open_wnd(url, name, width, height) { var oWnd = open_window(url, name, width, height, "toolbar=0,menubar=0,resizable=no,scrollbars=no"); return oWnd; } // onLoad Handler function LH_create() { this.LIST = new Array(); this.add = LH_add; this.exec = LH_exec; } function LH_add(strExec) { this.LIST[this.LIST.length] = strExec; } function LH_exec() { var list_len = this.LIST.length; for (var i = 0; i < list_len; i++) { eval(this.LIST[i]); } } // ¹®ÀÚ¿­ ¹ÙÀÌÆ® ¾ò¾î¿À±â function GetByteLen(s) { var temp; var mycount; mycount = 0; len = s.length; for(k=0;k 4) {mycount += 2;} else {mycount++;} } return mycount; } //¹®ÀÚ¿­ Null °ª Á¦¿ÜÇϱâ function isEmptyString(strText) { var strCheck = strText + ""; if ((strCheck != "") && (strCheck != null)) { for (i=0; i < strCheck.length; i++) { if(strCheck.substring(i , i+1) == " ") return true; } return false; } return true; } // ¹®ÀÚ¿­Áß ¼ýÀÚ °¡ ÀÖ´ÂÁö ÆǺ° function isNumeric(strText) { var ch; for (i=0; i < strText.length; i++) { ch = strText.substring(i , i+1); if(ch < "0" || ch > "9") return false; } return true; } //¼ýÀÚ¸é true ¾ÆÀθé false function isNumber(str){ count=0; if (str.length < 1) return false; for (i=0;i<'0' || str.charAt(i)>'9') count++; } if(count!=0) return false; else return true; } function onlyNumber() { if((event.keyCode < 45 ) || (event.keyCode > 57)) { event.returnValue = false; } } function IsAlphaNumeric(checkStr) { var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { return true; break; } } return false; } function SCharDebug_keypress() { var ch ; ch = event.keyCode; if ( (ch >= 0 && ch < 13)||(ch >= 14 && ch < 48)||(ch >= 58 && ch < 65)||(ch >= 91 && ch < 97) || (ch > 122 && ch < 256) ){ alert ( 'ÇØ´ç Ç׸ñ¿¡ Ư¼ö ¹®ÀÚ¸¦ »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. '); event.returnValue = false; } } // ¼ýÀÚÁß ¾ÕÂÊÀÇ "0" À» Á¦¿ÜÇÏ°í ¹Ýȯ function ZeroCheck(strValue){ var Result ; Result = strValue.substring(strValue.indexOf("0") + 1, strValue.length); return Result } // ÇÑ±Û ½ºÆ®¸µ ó¸® ÇÔ¼ö // string String::cut(int len, string tail) String.prototype.cut = function(len, tail) { var str = this; var l = 0; for (var i=0; i 128) ? 2 : 1; if (l > len) return str.substring(0,i) + tail; } return str; } // bool String::bytes(void) String.prototype.bytes = function() { var str = this; var l = 0; for (var i=0; i 128) ? 2 : 1; return l; } // string String::trim(); String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } // == Iframe Handling == // iframe resize½Ã ÃÖ¼Ò width, height var frmMinWidth; var frmMinHeight; var applyMinSize = false; // iframe resize½Ã ÃÖ´ë width, height var frmMaxWidth; var frmMaxHeight; var applyMaxSize = false; function setMinSize(width, height) { frmMinWidth = width; frmMinHeight = height applyMinSize = true; } function setMaxSize(width, height) { frmMaxWidth = width; frmMaxHeight = height applyMaxSize = true; } function resizeIframe(name) { if (name == null || name == "") { name = "boardmain"; } try { var oBody = document.frames(name).document.body; var oIFrame = document.all(name); //var frmWidth = oBody.scrollWidth + (oIFrame.offsetWidth - oIFrame.clientWidth); //var frmHeight = oBody.scrollHeight + (oIFrame.offsetHeight - oIFrame.clientHeight); var frmWidth = oBody.scrollWidth; var frmHeight = oBody.scrollHeight; if (applyMinSize) { frmWidth = Math.max(frmWidth, frmMinWidth); frmHeight = Math.max(frmHeight, frmMinHeight); } if (applyMaxSize) { frmWidth = Math.min(frmWidth, frmMaxWidth); frmHeight = Math.min(frmHeight, frmMaxHeight); } if (frmHeight == 0) oIFrame.style.height = 400; else oIFrame.style.height = frmHeight; if (frmWidth == 0) oIFrame.style.width = 630; else oIFrame.style.width = frmWidth; } catch (e) { window.status = "IFrame Resize Error"; } } function parentResizeIframe(name) { if (parent && parent != this && parent.resizeIframe != null) { parent.resizeIframe(name); } } //iframeSize('cpboard'); //setTimeout("iframeSize('cpboard')",1000); function iframeSize(frame_name) { var dbody = document.body; var body_height = dbody.scrollHeight + (dbody.offsetHeight-dbody.clientHeight); var body_width = dbody.scrollWidth + (dbody.offsetWidth-dbody.clientWidth); if (body_height == 0) { setTimeout("iframeSize('"+frame_name+"')", 1000); return false; } parent.document.all(frame_name).height = body_height; parent.document.all(frame_name).width = body_width; } function popupSize() { var dbody = document.body; var body_height = dbody.scrollHeight + (dbody.offsetHeight-dbody.clientHeight) + 27; var body_width = dbody.scrollWidth + (dbody.offsetWidth-dbody.clientWidth) + 6; if (body_height > 600) body_height = 600; resizeTo(585, body_height); //resizeTo(body_width, body_height); } // F5¸¦ ´­·¶À»¶§ iframe ³»ºÎ¸¸ refresh µÇµµ·Ï ó¸® document.onkeydown = trapRefresh; function trapRefresh() { if (event.keyCode == 116) { event.keyCode = 0; event.cancelBubble = true; event.returnValue = false; document.location.reload(); } } function parentPlusIframe(name, height) { if (parent && parent != this && parent.plusIframe != null) { parent.plusIframe(name, height); } } function plusIframe(name, height) { if (name == null || name == "") { name = "boardmain"; } try { var oBody = document.frames(name).document.body; var oIFrame = document.all(name); var frmHeight = oBody.scrollHeight; if (applyMinSize) { frmHeight = Math.max(frmHeight, frmMinHeight); } if (applyMaxSize) { frmHeight = Math.min(frmHeight, frmMaxHeight); } oIFrame.style.height = frmHeight + height; } catch (e) { window.status = "IFrame Size Plus Error"; } } function doResize(name) { if (name == null || name == "") { name = "boardmain"; } try { var oBody = document.frames(name).document.body; var oIFrame = document.all(name); //var frmWidth = oBody.scrollWidth + (oIFrame.offsetWidth - oIFrame.clientWidth); //var frmHeight = oBody.scrollHeight + (oIFrame.offsetHeight - oIFrame.clientHeight); var frmWidth = oBody.scrollWidth; var frmHeight = oBody.scrollHeight; if (applyMinSize) { frmWidth = Math.max(frmWidth, frmMinWidth); frmHeight = Math.max(frmHeight, frmMinHeight); } if (applyMaxSize) { frmWidth = Math.min(frmWidth, frmMaxWidth); frmHeight = Math.min(frmHeight, frmMaxHeight); } // oIFrame.style.height = frmHeight; container1.height = frmHeight; // oIFrame.style.width = frmWidth; container1.width = frmWidth; } catch (e) { window.status = "Ongamenet"; } } // ·Î±×ÀÎ °ü·Ã function iddomain_check(f) { //f = document.frmLogin; if (isEmptyString(f.id.value) || f.id.value.length < 4 ) { alert("¾ÆÀ̵𸦠Á¤È®È÷ ÀÔ·ÂÇØ Áֽʽÿä. "); f.id.focus(); f.id.select(); return false; } if (IsAlphaNumeric(f.id.value) == true) { alert("¾ÆÀ̵ð´Â ¿µ¹®ÀÚ¿Í ¼ýÀÚ¸¸ Çã¿ëÀÌ µË´Ï´Ù."); f.id.focus(); f.id.select(); return false; } if (isEmptyString(f.txtDomain.value) || f.txtDomain.value.length < 4 ) { alert("µµ¸ÞÀÎÀ» ¼±ÅÃÇϰųª Á¤È®È÷ ÀÔ·ÂÇØ Áֽʽÿä."); f.txtDomain.focus(); return false; } return true; } function chgDomain2(rdo) { if (rdo.title=="direct") { frmLogin.txtDomain.disabled = false; frmLogin.txtDomain.value = ""; frmLogin.txtDomain.focus(); } else { frmLogin.txtDomain.disabled = true; frmLogin.txtDomain.value = rdo.title; } } function chgDomain(rdo) { if (rdo.title=="direct") { frmLogin.txtDomain.disabled = false; frmLogin.txtDomain.value = ""; frmLogin.txtDomain.focus(); } else { frmLogin.txtDomain.disabled = true; frmLogin.txtDomain.value = rdo.title; } }