var global = {}; global.namespace = function (str) {var arr = str.split ( "."), o = global, i; for (i = (arr [0] = "global")? 1 : 0; i <arr.length; i ++) {o [arr [i]] = o [arr [i]] || {}; o = O [ARR [i]]; }}; // dom 相关 global.namespace ( "dom"); global.dom.getNextNode = function (node) {node = node = "String"? document.getElementById (노드) : 노드; var nextnode = node.nextibling; if (! nextnode) {return null; } if (! document.all) {while (true) {if (nextNode.NodeType == 1) {break; } else {if (nextNode.NexTsibling) {nextNode = nextNode.NexTsibling; } else {break; }}} return nextNode; }} global.dom.setOpacity = 함수 (노드, 레벨) {node = node == "String"? document.getElementById (노드) : 노드; if (docum } else {node.style.opacity = level / 100; }}; global.dom.getElementsByClassName = function (str, root, tag) {if (root) {root = typeof root == "String"? document.getElementById (루트) : 루트; } else {root = document.body; } 태그 = 태그 || "*"; var els = root.getElementsByTagName (tag), arr = []; for (var i = 0, n = els.length; i <n; i ++) {for (var j = 0, k = els [i] .className.split ( ""), l = k.length; j <l; 부서지다; }}} return arr;} global.namespace ( "event"); global.event.stopPropagation = function (e) {e = window.event || 이자형; if (document.all) {e.cancelbubble = true; } else {e.StopPropagation (); }}; global.event.geteventTarget = function (e) {e = window.event || 이자형; 반환 e.srcelement || e.target;}; global.event.on = function (node, eventtype, handler) {node = node == "string"? document.getElementById (노드) : 노드; if (document.all) {node.attachevent ( "on" + eventtype, handler); } else {node.adeventListener (EventType, handler, false); }}; // lang 相关 global.namespace ( "lang"); global.lang.trim = function (ostr) {return ostr.replace (/^/s+|/s+$/g, "";}; global.lang.isnumber = function (s) {return! is nan (s); isboolean (s) {return typeof s === "boolean";} 함수 isfunction (s) {return typeof s === "function";} 함수 isnull (s === null;} 함수 isundefined (s) {return typeof s == ""retempty (s) ismempty (s) {s) /^/s***/.test(s);} function isArray (s) {return s instanceof array;} global.dom.get = function (node) {node = node === "String"? document.getElementById (노드) : 노드; return node;} function $ (노드) {node = node == "string"? document.getElementById (노드) : 노드; return node;} global.lang.extend = function (서브 클래스, 슈퍼 클래스) {var f = function () {}; f. prototype = superclass.prototype; subclass.prototype = new f (); Subclass.prototype.constructor = 서브 클래스; 서브 클래스 .superclass = subclass.prototype; if (superclass.prototype.constructor == Object.Prototype.constructor) {superclass.prototype.constructor = 슈퍼 클래스; }}; global.namespace ( "쿠키"); global.cookie = {read : function (name) {var cookiest = ";" + document.cookie + ";"; var index = cookiest.IndexOf ( ";" + name + "="); if (index! = -1) {var s = cookiestr.substring (index + name.length + 3, cookiestr.length); 반환 unescape (s.substring (0, s.indexof ( ";"))); } else {return null; }}, set : 함수 (이름, 값, 만료) {var expdays = 만료 * 24 * 60 * 60 * 1000; var expdate = 새로운 날짜 (); expdate.settime (expdate.gettime () + Expdays); var expstring = 만료? "; 만료 =" + expdate.togmtstring () : ""; var pathstring = "; path =/"; document.cookie = name + "=" + Escape (value) + expstring + pathstring; }, del : 함수 (이름, 값, 만료) {var exp = new 날짜 (새 날짜 (). gettime () -1); var s = this.read (이름); if (s! = null) {docum }}};