//var globals function Globals(hiddenId) { this.vars = null; this.hiddenId = hiddenId; this.dom = new DomWB(); /*if (typeof (dom) == 'undefined' || dom == null) { dom = new Dom(); }*/ } //Globals.dom = null; Globals.prototype.getVars = function() { if (this.vars == null) { this.vars = new Array(); var hiddenArray = this.dom.getById(this.hiddenId); if (hiddenArray != null) { var aryItems = hiddenArray.value.split(';'); for (var i=0; i 0) { this.dom.appendChild(e[0], hiddenArray); } } var sValues = ''; var sKey for (sKey in this.vars) { sValues += sKey + '=' + this.vars[sKey] + ';'; } hiddenArray.value = sValues; return true; } /*dom*/ /*var dom;*/ function DomWB() { Globals.dom = this; } DomWB.prototype.getById = function(sID, oCtl) { if (oCtl == null) oCtl = document; if (oCtl.getElementById) return oCtl.getElementById(sID); else return oCtl.all(sID); } DomWB.prototype.getByTagName = function(sTag, oCtl) { if (oCtl == null) oCtl = document; if (oCtl.getElementsByTagName) return oCtl.getElementsByTagName(sTag); else if (oCtl.all.tags) return oCtl.all.tags(sTag); else return null; } DomWB.prototype.createElement = function(sTagName) { if (document.createElement) return document.createElement(sTagName); else return null; } DomWB.prototype.attachEvent = function(element, eventName, handler) { if(element.addEventListener) { element.addEventListener(eventName, handler, false); } else if(element.attachEvent) { element.attachEvent('on'+eventName, handler); } } DomWB.prototype.appendChild = function (oParent, oChild) { if (oParent.appendChild) return oParent.appendChild(oChild); else return null; } DomWB.prototype.removeChild = function (oChild) { if (oChild.parentNode.removeChild) return oChild.parentNode.removeChild(oChild); else return null; } function StringBuilder() { this.buffer = ""; } StringBuilder.prototype.Append = function(s) { if (s != null && s != 'undefined') { this.buffer += s.toString(); } } StringBuilder.prototype.toString = function() { return this.buffer; }