/*-- ------------------------------------------------------ oxsolution JAVASCRIPT functions http://www.oxsolution.com ------------------------------------------------------ --*/ //Default -------------------------------------------------- function getForm(nm,father) { return (father ? getFather().document : document).forms[nm]; } function getById(id,father) { return (father ? getFather().document : document).getElementById(id); } function getByName(nm,n) { var elms = document.getElementsByName(nm); return (n != null)? elms[(n == -1)? elms.length-1 : n] : elms; } function getByTag() { var args = arguments, where, tag, n; if (typeof args[0] == "string") { where = document; tag = args[0]; n = args[1]; }else{ where = args[0]; tag = args[1]; n = args[2]; } var elms = where.getElementsByTagName(tag); return (n != null)? elms[(n == -1)? elms.length-1 : n] : elms; } function getByCss() { var args = arguments, where, css, n; if (typeof args[0] == "string") { where = document; css = args[0]; n = args[1]; }else{ where = args[0]; css = args[1]; n = args[2]; } var elms = where.getElementsByClassName ? where.getElementsByClassName(css) : where.querySelectorAll("."+trim(css).replace(/\s+/g,".")); return (n != null)? elms[(n == -1)? elms.length-1 : n] : elms; } function startFileName() { var path = location.pathname; return path.substr(path.lastIndexOf("/")+1) || "index.php"; } function dirName(path) { //_oxdir/oxjs/ox_jsfunction.js => _oxdir/oxjs return (typeof path == "string")? path.substr(0,Math.max(path.lastIndexOf("/"),path.lastIndexOf("\\"))) : false; } function baseName(path) { //_oxdir/oxjs/ox_jsfunction.js => ox_jsfunction.js return (typeof path == "string")? path.substr(Math.max(path.lastIndexOf("/"),path.lastIndexOf("\\"))+1) : false; } function thisCharset() { var chr = "euc-kr"; foreach(getByTag("meta"), function(i,elm) { if (elm.httpEquiv.toLowerCase() == "content-type" && / charset=([-\w]+)\b/i.test(elm.content)) { chr = RegExp.$1; return false; } }); return chr; } function thisScript() { //first runtime only return getByTag("script",-1); } function thisScriptDir() { //first runtime only var dir = ""; try { dir = dirName(thisScript().src); }catch(e) { dir = "_oxdir/oxjs"; } return dir; } var dirHTC = thisScriptDir(); //Çö µð·ºÅ͸® Á¤ÀÇ //Language -------------------------------------------------- var langOX = {}; function oxLangLoad(type) { if (!type || typeof langOX[type] != "undefined") return; var tmp = document.createElement("script"); tmp.setAttribute("type","text/javascript"); tmp.setAttribute("src",dirHTC+"/lang_"+type+".js"); try { getByTag("head",0).appendChild(tmp); }catch(e) { } } function oxLangSet(type) { langOX.currentType = type; } function oxLang(key,type) { if (!type) type = langOX.currentType; if (typeof langOX[type] == "undefined") oxLangLoad(type); var msg = ""; try { if (typeof langOX[type][key] != "undefined") msg = langOX[type][key]; }catch(e) { msg = ""; } return msg; } oxLangLoad("ko"); oxLangSet("ko"); //Normal -------------------------------------------------- function empty(v) { switch (typeof v) { case "boolean": return !v; case "string": return (v == "" || v == "0"); case "number": case "bigint": return (v == 0); case "function": return null; //ÇÔ¼ö ÀÚü´Â ÆÇ´ÜÇÒ ¼ö ¾øÀ½ default: if (v == null) return true; if (v.nodeType == 1) { var n = v.childNodes.length; while (n--) { if (v.childNodes[n].nodeType == 1) return false; if (v.childNodes[n].nodeType == 3 && trim(v.childNodes[n].nodeValue) != "") return false; //ÁÖ¼®À̳ª ºó ¹®ÀÚ¿­Àº ¾ø´Â °Í°ú ¸¶Âù°¡Áö } return true; } return foreach(v,function() { return false; }); } } function trim(v) { return ltrim(rtrim(v)); } function ltrim(v) { return (""+v).replace(/^\s+/,""); } function rtrim(v) { return (""+v).replace(/\s+$/,""); } function replaceSpace(v,s) { return (""+v).replace(/\s+/g,s); } function clearSpace(v) { return replaceSpace(v,""); } function clearComma(v) { return replaceSpace(v," ").replace(/ ,+/g,",").replace(/,+ /g,",").replace(/,{2,}/g,",").replace(/^,/,"").replace(/,$/,""); } function htmlspecialchars(v) { return (""+v).replace(/&(?!#\d+;)/g,"&").replace(//g,">").replace(/"/g,"""); //replace(/'/g,"'") } function toText(v) { return htmlspecialchars(v); } function ox_varGET(key) { var args = arguments, qstr = location.search; //¹°À½Ç¥(?)¸¦ Æ÷ÇÔÇÑ Äõ¸®½ºÆ®¸µ, ÇؽÃ(#µÞºÎºÐ)´Â ¹ÌÆ÷ÇÔ if (!qstr || !key) return false; var a = qstr.substr(1).split("&"), GET = {}; for (var i=0,n=a.length,k,v; i 1) { k = v.shift(); GET[k] = v.join("="); } } return (GET[key] != null)? GET[key] : ((args.length > 1)? args[1] : false); } function foreach(o,f) { if (typeof o == "object" && o != null) { if (o.length != null) { for (var i=0,n=o.length; i 1) { for (var i=1,j; i max) { var tmp = min; min = max; max = tmp; } return min + Math.floor(Math.random() * (max - min)); } function setCookie(nm,v) { var args = arguments; var argc = args.length; var expires = (argc > 2)? new Date() : null, path = (argc > 3)? args[3] : null, domain = (argc > 4)? args[4] : null, secure = (argc > 5)? args[5] : false; if (argc > 2) expires.setTime(args[2] * 1000); document.cookie = nm+"="+escape(v) +((expires != null)? "; expires="+expires.toUTCString() : "") +((path != null)? "; path="+path : "") +((domain != null)? "; domain="+domain : "") +((secure == true)? "; secure" : ""); } function getCookie(nm) { var key = nm+"=", x = 0, y, z; while (x <= document.cookie.length) { y = x + key.length; if (document.cookie.substring(x,y) == key) { if ((z = document.cookie.indexOf(";",y)) == -1) z = document.cookie.length; return unescape(document.cookie.substring(y,z)); } x = document.cookie.indexOf(" ",x) + 1; if (x == 0) break; } return ""; } function getLastDay(y,m) { if (m < 1) { //0¿ùÀº ÀÌÀüÇØ 12¿ù y += Math.floor((m - 1) / 12); m = 12 + (m % 12); }else if (m > 12) { //13¿ùÀº ´ÙÀ½ÇØ 1¿ù y += Math.floor((m - 1) / 12); m = (m - 1) % 12 + 1; } if (m == 2) return ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)? 29 : 28; if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) return 31; return 30; } function getBytes(v) { //4¹ÙÀÌÆ® ¹®ÀÚ±îÁö¸¸ ó¸® °¡´É if (typeof v != "string") v = ""; var b = 0; for (var i=0,n=v.length,c; i= 0xFFFFFF) b += 4; else if (c >= 0xFFFF) b += 3; else if (c >= 0xFF) b += 2; else b++; } return b; } function hm_size(v) { if (typeof v != "number") v = 0; if (v < 1024) return v+" B"; if (v < 1024 * 1024) return Math.round(v / 1024)+" KB"; if (v < 1024 * 1024 * 1024) return Math.round(v / 1024 / 1024)+" MB"; return Math.round(v / 1024 / 1024 / 1024)+" GB"; } function toNumber(v) { v = clearSpace(v).replace(/,/g,""); return isNaN(v)? 0 : ((v * 1) || 0); } function toComma(v) { v += ""; var isInt = (v.indexOf(".") == -1); if (isInt) v += "."; v = v.replace(/(\d)(?=(\d{3})+\.)/g,"$1,"); if (isInt) v = v.slice(0,-1); return v; } function toPhoneNumber(num) { //cellphone_confirm, tel_confirm °°Àº ÇÔ¼ö·Î »çÀü °ËÁõ ÇÊ¿ä var v = (""+num).replace(/\D/g,""); switch (v.length) { case 7: return v.substr(0,3)+"-"+v.substr(3); case 8: return v.substr(0,4)+"-"+v.substr(4); case 9: return v.substr(0,2)+"-"+v.substr(2,3)+"-"+v.substr(5); case 10: if (v.substr(0,2) == "02") { return v.substr(0,2)+"-"+v.substr(2,4)+"-"+v.substr(6); }else{ return v.substr(0,3)+"-"+v.substr(3,3)+"-"+v.substr(6); } case 11: return v.substr(0,3)+"-"+v.substr(3,4)+"-"+v.substr(7); case 12: return v.substr(0,4)+"-"+v.substr(4,4)+"-"+v.substr(8); default: return (v.length < 7)? v : num; } } var knownColor = { "aliceblue":"#F0F8FF", "antiquewhite":"#FAEBD7", "aqua":"#00FFFF", "aquamarine":"#7FFFD4", "azure":"#F0FFFF", "beige":"#F5F5DC", "bisque":"#FFE4C4", "black":"#000000", "blanchedalmond":"#FFEBCD", "blue":"#0000FF", "blueviolet":"#8A2BE2", "brown":"#A52A2A", "burlywood":"#DEB887", "cadetblue":"#5F9EA0", "chartreuse":"#7FFF00", "chocolate":"#D2691E", "coral":"#FF7F50", "cornflowerblue":"#6495ED", "cornsilk":"#FFF8DC", "crimson":"#DC143C", "cyan":"#00FFFF", "darkblue":"#00008B", "darkcyan":"#008B8B", "darkgoldenrod":"#B8860B", "darkgray":"#A9A9A9", "darkgreen":"#006400", "darkkhaki":"#BDB76B", "darkmagenta":"#8B008B", "darkolivegreen":"#556B2F", "darkorange":"#FF8C00", "darkorchid":"#9932CC", "darkred":"#8B0000", "darksalmon":"#E9967A", "darkseagreen":"#8FBC8B", "darkslateblue":"#483D8B", "darkslategray":"#2F4F4F", "darkturquoise":"#00CED1", "darkviolet":"#9400D3", "deeppink":"#FF1493", "deepskyblue":"#00BFFF", "dimgray":"#696969", "dodgerblue":"#1E90FF", "firebrick":"#B22222", "floralwhite":"#FFFAF0", "forestgreen":"#228B22", "fuchsia":"#FF00FF", "gainsboro":"#DCDCDC", "ghostwhite":"#F8F8FF", "gold":"#FFD700", "goldenrod":"#DAA520", "gray":"#808080", "green":"#008000", "greenyellow":"#ADFF2F", "honeydew":"#F0FFF0", "hotpink":"#FF69B4", "indianred":"#CD5C5C", "indigo":"#4B0082", "ivory":"#FFFFF0", "khaki":"#F0E68C", "lavender":"#E6E6FA", "lavenderblush":"#FFF0F5", "lawngreen":"#7CFC00", "lemonchiffon":"#FFFACD", "lightblue":"#ADD8E6", "lightcoral":"#F08080", "lightcyan":"#E0FFFF", "lightgoldenrodyellow":"#FAFAD2", "lightgreen":"#90EE90", "lightgrey":"#D3D3D3", "lightpink":"#FFB6C1", "lightsalmon":"#FFA07A", "lightseagreen":"#20B2AA", "lightskyblue":"#87CEFA", "lightslategray":"#778899", "lightsteelblue":"#B0C4DE", "lightyellow":"#FFFFE0", "lime":"#00FF00", "limegreen":"#32CD32", "linen":"#FAF0E6", "magenta":"#FF00FF", "maroon":"#800000", "mediumaquamarine":"#66CDAA", "mediumblue":"#0000CD", "mediumorchid":"#BA55D3", "mediumpurple":"#9370DB", "mediumseagreen":"#3CB371", "mediumslateblue":"#7B68EE", "mediumspringgreen":"#00FA9A", "mediumturquoise":"#48D1CC", "mediumvioletred":"#C71585", "midnightblue":"#191970", "mintcream":"#F5FFFA", "mistyrose":"#FFE4E1", "moccasin":"#FFE4B5", "navajowhite":"#FFDEAD", "navy":"#000080", "oldlace":"#FDF5E6", "olive":"#808000", "olivedrab":"#6B8E23", "orange":"#FFA500", "orangered":"#FF4500", "orchid":"#DA70D6", "palegoldenrod":"#EEE8AA", "palegreen":"#98FB98", "paleturquoise":"#AFEEEE", "palevioletred":"#DB7093", "papayawhip":"#FFEFD5", "peachpuff":"#FFDAB9", "peru":"#CD853F", "pink":"#FFC0CB", "plum":"#DDA0DD", "powderblue":"#B0E0E6", "purple":"#800080", "red":"#FF0000", "rosybrown":"#BC8F8F", "royalblue":"#4169E1", "saddlebrown":"#8B4513", "salmon":"#FA8072", "sandybrown":"#F4A460", "seagreen":"#2E8B57", "seashell":"#FFF5EE", "sienna":"#A0522D", "silver":"#C0C0C0", "skyblue":"#87CEEB", "slateblue":"#6A5ACD", "slategray":"#708090", "snow":"#FFFAFA", "springgreen":"#00FF7F", "steelblue":"#4682B4", "tan":"#D2B48C", "teal":"#008080", "thistle":"#D8BFD8", "tomato":"#FF6347", "turquoise":"#40E0D0", "violet":"#EE82EE", "wheat":"#F5DEB3", "white":"#FFFFFF", "whitesmoke":"#F5F5F5", "yellow":"#FFFF00", "yellowgreen":"#9ACD32" }; function getKnownColor(v) { if (typeof v != "string" || v == "") return false; v = v.toLowerCase(); if (v == "transparent") return true; if (knownColor[v] != null) return knownColor[v]; if (!/^#?([a-f0-9]{3}|[a-f0-9]{6})$/.test(v)) return false; var hex = RegExp.$1; if (hex.length == 3) { var r = hex.substr(0,1), g = hex.substr(1,1), b = hex.substr(2); hex = r+r+g+g+b+b; } return "#"+hex.toUpperCase(); } function dec2hex(v) { var hex = "0123456789ABCDEF"; return hex.charAt(Math.floor(v / 16)) + hex.charAt(v % 16); } function hex2dec(v) { return eval("0x"+v); } function addJosa(v,josa) { var noJongsung = false, n = v.length, c, s; while (n-- > 0) { c = v.charCodeAt(n); if (c >= 48 && c <= 57) { s = "2459"; }else if (c >= 65 && c <= 90) { s = "ABCDEFGHIJKOPQSTUVWXYZ"; }else if (c >= 97 && c <= 122) { s = "abcdefghijkopqstuvwxyz"; }else if (c >= 0xAC00 && c <= 0xD7A3) { s = "°¡°¼°Å°Ü°í±³±¸±Ô±×±â°³°Â°Ô°è°ú±¥±Å±Ë±«±Í±á±î²¥²¨²¸²¿²Ø²Ù²ó²ô³¢±ú²²²¾²Ê²Ï²ã²ç²Ò²î³ª³Ä³Ê³à³ë´¢´©´º´À´Ï³»³×³é³ö´²´´³ú´µ´Ì´Ù´ô´õµ®µµµÍµÎµàµåµð´ëµ¥µ³µÂµÅµÖµØµÇµÚµïµû¶°¶Å¶Ç¶Ñ¶ß¶ì¶§¶¼¶Ì¶Î¶Ø¶Ï¶Ù¶ç¶ó·ª·¯·Á·Î·á·ç·ù¸£¸®·¡·¹·Ê·Ö·ï·ñ·Ú·ò¸¶¸Ï¸Ó¸ç¸ð¹¦¹«¹Â¹Ç¹Ì¸Å¸Þ¸ï¸ú¹¹¹¾¸þ¹¿¹Ù¹ò¹öº­º¸ºÌºÎºäºêºñ¹èº£º¶ºÁºÄºÛºÞºÆºßºü»²»µ»À»Ç»Ï»Ñ»Ø»Ú»ß»©»¾»Î»ç»þ¼­¼Å¼Ò¼î¼ö½´½º½Ã»õ¼¨¼¼¼Î¼Ý¼â½¤½¦¼è½¬½Î½á½î¾¤¾¥¾²¾¾½Ø½ê½÷½û¾¬¾®½ý¾¯¾º¾Æ¾ß¾î¿©¿À¿ä¿ìÀ¯À¸À̾־꿡¿¹¿Í¿Ö¿ö¿þ¿ÜÀ§ÀÇÀÚÀðÀúÁ®Á¶ÁÒÁÖÁêÁîÁöÀçÀ÷Á¦ÁµÁÂÁÈÁàÁâÁËÁ㥹¼ÂÇÂÉÂÞÂéÂêÂî°ÂÅÂÒÂÖÂåÂØÂèÂ÷íóÃÄÃÊÃÝÃßÃòÃ÷ġäüÃÇÃÒÃçÃéÃÖÃëīļĿÄÑÄÚÄìÄíťũŰijÄÉÄÙÄâÄèÄõÄùÄêÄûŸÅËÅÍÅßÅäÅôÅõƩƮƼÅÂÅ×ÅâÅíÅïÅýÆ¡ÅðƢƷÆÄÆÙÆÛÆìÆ÷ǥǪǻÇÁÇÇÆÐÆäÆóǡǴǣǶÇÏÇáÇãÇôȣȿÈÄÈÞÈåÈ÷ÇØÇìÇýȭȳÈÌÈÑȸÈÖÈñ"; }else continue; noJongsung = (s.indexOf(v.charAt(n)) != -1); break; } switch (josa) { case "Àº": case "´Â": case "Àº(´Â)": case "´Â(Àº)": return v+(noJongsung ? "´Â" : "Àº"); case "À»": case "¸¦": case "À»(¸¦)": case "¸¦(À»)": return v+(noJongsung ? "¸¦" : "À»"); case "ÀÌ": case "°¡": case "ÀÌ(°¡)": case "°¡(ÀÌ)": return v+(noJongsung ? "°¡" : "ÀÌ"); case "°ú": case "¿Í": case "°ú(¿Í)": case "¿Í(°ú)": return v+(noJongsung ? "¿Í" : "°ú"); case "·Î": case "À¸·Î": case "(À¸)·Î": return v+(noJongsung ? "·Î" : "À¸·Î"); } return v+josa; } function replaceJosa(msg) { foreach(["Àº(´Â)","´Â(Àº)","À»(¸¦)","¸¦(À»)","ÀÌ(°¡)","°¡(ÀÌ)","°ú(¿Í)","¿Í(°ú)","(À¸)·Î"], function(i,josa) { if (msg.indexOf(josa+" ") != -1) { var a = msg.split(josa+" "); msg = ""; do { msg += addJosa(a.shift(),josa)+" "; }while (a.length > 1); msg += a[0]; } }); return msg; } function ox_tpl(str,obj) { if (str.indexOf("JSVAR") != -1 && typeof obj == "object" && obj != null) { for (var k in obj) { str = str.replace(new RegExp("{JSVAR\\s+"+k+"\\s*}","g"),obj[k]); } } return str; } function zerofill(v,n) { v += ""; while (v.length < n) { v = "0"+v; } return v; } function oxActiveWrite(html) { document.write(html); } function ox_onError(img,path) { var err = img.getAttribute("oxError"); if (path) { if (!err) { img.setAttribute("oxError",1); img.src = path; }else if (err == 1) { img.setAttribute("oxError",2); img.src = dirHTC+"/image/noimage.gif"; } }else if (!err) { img.setAttribute("oxError",1); img.src = dirHTC+"/image/noimage.gif"; } } //Position -------------------------------------------------- function abspos(e) { if (!e) e = window.event; var p = getScrollPos(); return {"x":(e.clientX + p.x),"y":(e.clientY + p.y)}; } function documentsize() { var w = document.documentElement.clientWidth || document.body.clientWidth, h = document.documentElement.clientHeight || document.body.clientHeight; if (window.innerWidth) { if (w > window.innerWidth) w = document.body.clientWidth || window.innerWidth; if (h > window.innerHeight) h = document.body.clientHeight || window.innerHeight; } return {"width":w,"height":h}; } function documentcenter() { var o = documentsize(), p = getScrollPos(); return {"x":(Math.floor(o.width / 2) + p.x),"y":(Math.floor(o.height / 2) + p.y)}; } function getScrollPos() { return {"x":(document.documentElement.scrollLeft || document.body.scrollLeft || 0), "y":(document.documentElement.scrollTop || document.body.scrollTop || 0)}; } function getOffsetPos(elm) { var o = {"x":0,"y":0}; if (elm && elm != document.body && elm != document.documentElement) { //body ¿Ü ¿ä¼Ò´Â ´Ù¸¥ À§Ä¡ Á¤º¸(width, height, top, right, bottom, left)¸¦ ÇÔ²² ¹Ýȯ o = getBoundingClientRect(elm); var p = getScrollPos(); o.x = o.left + p.x; o.y = o.top + p.y; } return o; } function getOffsetStart(elm) { var pElm = elm.offsetParent, pos = getOffsetPos(pElm); if (pos.width == null) return pos; var vRgt = pElm.style.borderRight || "", vBtm = pElm.style.borderBottom || ""; pElm.style.borderRight = 0; pElm.style.borderBottom = 0; var x = pElm.offsetWidth - pElm.clientWidth, y = pElm.offsetHeight - pElm.clientHeight; pElm.style.borderRight = vRgt; pElm.style.borderBottom = vBtm; pos.x += x; pos.y += y; return pos; } function posInnerDoc(ly) { if (getStyle(ly,"display") == "none" || getStyle(ly,"position") != "absolute") return; var startPos = getOffsetStart(ly), o = getBoundingClientRect(ly), p = getScrollPos(), w = Math.ceil(o.width) || ly.offsetWidth, h = Math.ceil(o.height) || ly.offsetHeight, x = o.left + p.x, y = o.top + p.y; var v = ly.style.display || ""; ly.style.display = "none"; o = documentsize(); //·¹À̾ ÀϽÃÀûÀ¸·Î °¨ÃçÁø ¼ø°£¿¡ ÃøÁ¤ ly.style.display = v; v = (x + w) - (p.x + o.width); if (v > 0) ly.style.left = Math.max(x - startPos.x - v, startPos.x * -1 + p.x)+"px"; v = (y + h) - (p.y + o.height); if (v > 0) ly.style.top = Math.max(y - startPos.y - v, startPos.y * -1 + p.y)+"px"; } function getSemanticPos(e,ly) { var x = 0, y = 0, p; if (typeof e == "string") { if (e == "center") { p = documentcenter(); x = p.x; y = p.y; if (ly) { x -= parseInt(ly.offsetWidth / 2, 10); y -= parseInt(ly.offsetHeight / 2, 10); } }else if (e == "there" && ly) { p = getOffsetPos(ly); x = p.x; y = p.y; } }else if (e.clientX != null) { //e = event p = abspos(e); x = p.x; y = p.y; }else if (e.left != null) { //e = {top:?,left:?} x = e.left; y = e.top; }else if (isElement(e)) { var tmp = e; do { if (tmp.offsetHeight) { //IE¿¡¼­ À̹ÌÁö µûÀ§¸¦ °¨½Î´Â ÀζóÀÎ ¿ä¼Ò ³ôÀÌ ÃøÁ¤ ¾È µÊ p = getOffsetPos(tmp); x = p.x; y = p.y + tmp.offsetHeight; break; } tmp = getFirstChild(tmp); }while (tmp); if (x == null) { p = getOffsetPos(e); x = p.x; y = p.y; } } if (ly) { p = getOffsetStart(ly); x -= p.x; y -= p.y; } return {"x":x,"y":y}; } function slowScrollBy(x,y) { var pos = getScrollPos(), toX = pos.x + x, toY = pos.y + y, lastX = null, lastY = null; var timer = setInterval(function() { pos = getScrollPos(); if (pos.x == lastX && pos.y == lastY) { clearInterval(timer); return; } window.scrollBy(Math.ceil((toX - pos.x) / 5),Math.ceil((toY - pos.y) / 5)); lastX = pos.x; lastY = pos.y; },10); } //HTMLElement -------------------------------------------------- function hasClass(elm,css) { return (css && ((" "+(elm.className || "")+" ").indexOf(" "+css+" ") != -1)) || false; } function addClass(elm,css) { if (css) { var s = elm.className || ""; if ((" "+s+" ").indexOf(" "+css+" ") == -1) elm.className = s+" "+css; } return elm; } function removeClass(elm,css) { var s = ""; if (css) s = trim((" "+(elm.className || "")+" ").replace(new RegExp("\\s+"+css+"\\s+","g")," ")); elm.className = s; return elm; } function toggleClass(elm,css) { if (hasClass(elm,css)) removeClass(elm,css); else addClass(elm,css); return elm; } function isElement(elm,tag) { if (!elm || elm.nodeType != 1) return false; if (tag != null) { var css = trim(tag).replace(/\W+/g,".").split("."); tag = css.shift().toUpperCase(); if (tag != "" && tag != elm.tagName) return false; for (var i=0,n=css.length; i 0)? 1 : ((v < 0)? -1 : 0); } function stopBubbleEvent(e) { if (e.stopPropagation) e.stopPropagation(); e.cancelBubble = true; } function stopDefaultEvent(e) { if (e.preventDefault) e.preventDefault(); e.returnValue = false; } function eventStop(e) { if (!e) e = window.event; if (!e) return; stopBubbleEvent(e); stopDefaultEvent(e); } function ox_addBodyOnLoad(func,delay) { if (typeof func == "function") attachFunc(window, "load", (delay && delay > 0)? function() {setTimeout(func,delay)} : func); } //GET & POST -------------------------------------------------- function go_url(url) { location.href = url; } function go_link(url,tar) { var a = document.createElement("a"); a.style.display = "none"; document.body.appendChild(a); a.href = url; if (tar != null) a.target = tar; try { a.click(); }catch(e) { try { a.fireEvent("onclick"); }catch(e) { go_url(url); } } a.removeNode(true); a = null; } function a_link(url,tar) { go_link(url,tar); } function goLink(elm,n) { var a = getByTag(elm, "a", n || 0); if (a) { try { a.click(); }catch(e) { try { a.fireEvent("onclick"); }catch(e) { go_url(a.href); } } } } var oxHiddenFrame = null; var hiddenFrameBusy = false; var testMode = 0; function hiddenFrameTransBegin() { showLoading(); } function hiddenFrameTransFinish() { hideLoading(); hiddenFrameBusy = false; } function hiddenFrameClear() { if (oxHiddenFrame != null) { oxHiddenFrame.removeNode(true); oxHiddenFrame = null; } } function hiddenFrame() { hiddenFrameClear(); var seed = (new Date()).getTime(); document.body.insertAdjacentHTML("beforeend",''); oxHiddenFrame = document.body.children[document.body.children.length - 1]; return "oxHiddenFrame"+seed; } function hiddenFrameObject() { return eval(hiddenFrame()); } function hiddenFrameLink(url) { if (testMode == 0) { go_link(url,hiddenFrame()); }else{ if (testMode == 1 && !/\btestDebug=/.test(url)) url += ((url.indexOf("?") == -1)? "?" : "&")+"testDebug=2"; window.open(startFileName()+"?mt=ready","_test_open_","width=400,height=400,resizable=yes,scrollbars=yes,dependent=yes,location=yes").focus(); //Å×½ºÆ® ¸ðµå¿¡¼­´Â hiddenFrameTransFinish ÇÔ¼ö°¡ ½ÇÇàµÇÁö ¾ÊÀ½ go_link(url,"_test_open_"); } } function hiddenFramePostLink(fm,formCheck,trans) { if (hiddenFrameBusy) { alert(oxLang("busy")); return false; } if (formCheck == true && !ox_formChecker(fm)) return false; if (testMode == 0) { fm.target = hiddenFrame(); }else{ if (testMode == 1 && !/\btestDebug=/.test(fm.action)) fm.action += ((fm.action.indexOf("?") == -1)? "?" : "&")+"testDebug=2"; window.open(startFileName()+"?mt=ready","_test_open_","width=400,height=400,resizable=yes,scrollbars=yes,dependent=yes,location=yes").focus(); //Å×½ºÆ® ¸ðµå¿¡¼­´Â hiddenFrameTransFinish ÇÔ¼ö°¡ ½ÇÇàµÇÁö ¾ÊÀ½ fm.target = "_test_open_"; } fm.submit(); hiddenFrameBusy = true; if (trans == true) hiddenFrameTransBegin(); return true; } //Form -------------------------------------------------- function optionSelectedValue(lst) { if (lst.multiple) { var a = []; for (var i=0,n=lst.options.length; iÀ» Ãß°¡ÇÏ°í, ±× value _txt : ¸Ç ¾Õ¿¡