var global = {}; global.namespace = fonction (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]]; }}. document.getElementById (Node): Node; var nextNode = node.nextsibling; 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 = function (node, niveau) {node = typeof node == "String"? document.getElementById (Node): Node; if (document.all) {node.style.filter = 'alpha (opacity =' + niveau + ')'; } else {node.style.opacity = niveau / 100; }}; Global.dom.getElementsByClassName = fonction (str, root, tag) {if (root) {root = typeof root == "String"? document.getElementById (root): root; } else {root = document.body; } tag = tag || "*"; 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; j ++) {if (k [j] == str) {arr.push (els [i]); casser; }}} return arr;} global.namespace ("event"); global.event.stoppropagation = function (e) {e = window.event || e; if (document.all) {e.cancelbubble = true; } else {e.stoppropagation (); }}; Global.event.getEventTarget = fonction (e) {e = window.event || e; return e.srcelement || e.target;}; global.event.on = fonction (node, EventType, Handler) {node = typeof node == "String"? document.getElementById (Node): Node; if (document.all) {node.attachevent ("on" + eventType, handler); } else {node.addeventListener (EventType, Handler, false); }}; // lug iSboolean (s) {return typeof s === "booléen";} fonction isfunction (s) {return typeof s === "function";} function isNull (s) {return s === null;} function isundefined (s) {return typeof s === "Undefined";} fonction isEmpty (s) {return /^/s*$/.test(s); }function isArray (s) {return s instanceof array;} global.dom.get = function (node) {node = typeof node === "string"? document.getElementById (Node): Node; return node;} function $ (node) {node = typeof node == "String"? document.getElementById (Node): Node; Node de retour;} global.lang.extend = fonction (sous-classe, superclass) {var f = function () {}; F.prototype = superclass.prototype; sous-classe.prototype = new f (); sous-class.prototype.constructor = sous-classe; sous-class.superclass = sous-class.prototype; if (superclass.prototype.constructor == object.prototype.constructor) {superclass.prototype.constructor = superclass; }}; Global.namespace ("cookie"); global.cookie = {read: function (name) {var cookiestr = ";" + document.cookie + ";"; var index = Cookiestr.Indexof (";" + name + "="); if (index! = -1) {var s = Cookiestr.SubString (index + name.length + 3, Cookiestr.Length); Retour Unescape (S.Substring (0, S.Indexof (";")); } else {return null; }}, set: function (nom, valeur, expire) {var expdays = expire * 24 * 60 * 60 * 1000; var expdate = new Date (); expdate.setTime (expdate.getTime () + expdays); var expstring = expire? "; expires =" + expdate.togmtString (): ""; var pathstring = "; path = /"; document.cookie = name + "=" + Escape (valeur) + expString + pathstring; }, del: fonction (nom, valeur, expire) {var exp = new Date (new Date (). GetTime () - 1); var s = this.read (nom); if (s! = null) {document.cookie = name + "=" + s + "; expires =" + exp.togmTString () + "; path = /"; }}};