function tabOver(o , color , isHand) { o.style.backgroundColor = color; if (isHand) o.style.cursor="default"; } function tabOut(o , color) { o.style.backgroundColor = color; } function isEmpty(s) { return ((s == null) || (s.length == 0)) } var defaultEmptyOK = false; var whitespace = " \t\n\r"; function isWhitespace(s){ var i; // Is s empty? if (isEmpty(s)) return true; // Search through string's characters one by one // until we find a non-whitespace character. // When we do, return false; if we don't, return true. for (i = 0; i < s.length; i++) { // Check that current character isn't whitespace. var c = s.charAt(i); if (whitespace.indexOf(c) == -1) return false; } // All characters are whitespace. return true; } function isEmail (s){ if (isEmpty(s)) if (isEmail.arguments.length == 1) return defaultEmptyOK; else return (isEmail.arguments[1] == true); // is s whitespace? if (isWhitespace(s)) return false; // there must be >= 1 character before @, so we // start looking at character position 1 // (i.e. second character) var i = 1; var sLength = s.length; // look for @ while ((i < sLength) && (s.charAt(i) != "@")) { i++ } if ((i >= sLength) || (s.charAt(i) != "@")) return false; else i += 2; // look for . while ((i < sLength) && (s.charAt(i) != ".")) { i++ } // there must be at least one character after the . if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false; if (s.split("@").length>2) return false; else return true; } function stringLeftTrim(s) { return (typeof(s) != "string") ? null : s.replace(/^ +/, ""); } function stringRightTrim(s) { return (typeof(s) != "string") ? null : s.replace(/ +$/, ""); } function stringTrim(s) { return stringRightTrim(stringLeftTrim(s)); } function popupWindowForOpen(url, windowName, width, height) { subWin = window.open(url, windowName, "resizable=yes, width=" + width + ", height=" + height + ", left=" +((screen.width - width)/2 ) + ", top=" + ((screen.height - height)/2 ) + ", scrollbars=yes"); self.window.onfocus = new Function( windowName + ".closed ? '' : " + windowName + ".focus()"); } function Map() { this.keys = new Array(); this.data = new Object(); this.put = function(key, value) { if(this.data[key] == null){ this.keys.push(key); } this.data[key] = value; }; this.get = function(key) { return this.data[key]; }; this.remove = function(key) { this.keys.remove(key); this.data[key] = null; }; this.each = function(fn){ if(typeof fn != 'function'){ return; } var len = this.keys.length; for(var i=0;i