var BigSummitUtils = { closeWindow: function () { if (window.opener) { window.close(); } }, getBaseUrl: function () { var ret = "BigSummit/pomp.nsf"; var loc = window.location.href; var loc_l = loc.toLowerCase(); var idx = loc_l.indexOf(".nsf"); if (idx > -1) { ret = loc.substring(0,idx + 4); } return ret; }, getDocumentUnid: function() { var loc = window.location.href + "?"; loc = loc.substring(0, loc.indexOf("?")); loc = loc.substring(loc.lastIndexOf("/")+1); if (loc.length == 32) { return loc; } else { return ""; } }, isUserLoggedIn: function () { //return true; var namx = CookieUtils.get("DomAuthSessId"); if (namx != null && namx != "") { return true; } else { return false; } }, signout: function () { CookieUtils.deleteCookie("DomAuthSessId"); }, convertToNum: function (val) { var ALL_CHARS = "0123456789."; var ret = ""; for (var i = 0; i < val.length; i++) { var chr = val.substring(i, i + 1); if (ALL_CHARS.indexOf(chr) > -1) { ret += chr; if (chr == ".") { ALL_CHARS = "0123456789"; } } } return parseFloat(ret); }, getQsValue: function (sname, sdefault) { var ret = sdefault; var loc = window.location.href + "&"; var idx = loc.indexOf(sname+"="); if (idx > -1) { var sortx = loc.substring(idx+5); sortx = sortx.substring(0,sortx.indexOf("&")); ret = sortx; } return ret; }, replaceQsValue: function (source, name, value) { var hasParam = false; source = "&" + source; idx = source.indexOf("&" + name + "="); if (idx > -1) hasParam = true; if (!hasParam) { source += "&" + name + "=" + value; } else { source = source.substring(1); var params = source.split("&"); source = ""; for (var i = 0; i < params.length; i++) { source += "&"; if (params[i].indexOf(name + "=") > -1) { source += name + "=" + value; } else { source += params[i]; } } } while (source.indexOf("&") == 0) { source = source.substring(1); } return source; }, recurseCopyNodes: function (srcnode, trgnode) { if (srcnode && trgnode) { for (var i = srcnode.childNodes.length - 1; i >= 0 ; i--) { var node = srcnode.childNodes[i]; var newnode = trgnode.appendChild(node); recurseCopyNodes(node, newnode); } } }, recurseHide: function (node) { if (node) { if (node.style) { node.style.display = "none"; } recurseHide(node.nextSibling); } }, addLoadEvent: function (func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } }, getElementsByClassName: function (className, tag, elm) { var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)"); var tag = tag || "*"; var elm = elm || document; var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag); var returnElements = []; var current; var length = elements.length; for(var i=0; i 1) { bShowFirst = bShowPrev = true; } if (pageEnd < viewCount) { bShowLast = bShowNext = true; } sWrite += STRINGS.PAGING.MAINLABEL; if (bShowFirst) { sWrite += "<<" + SPACER; } if (bShowPrev) { sWrite += "<" + SPACER; } sWrite += SPACER; var idxPage = 0; for (var i = 1; i <= viewCount; i+=pageCount) { idxPage++; pageStartLast = i; var thisclass = CLASS_NORM; if (pageStart >= i && pageStart < i + pageCount) { thisclass = CLASS_SEL; } sWrite += "" + idxPage + "" + SPACER; } sWrite += SPACER; if (bShowNext) { sWrite += ">" + SPACER; } if (bShowLast) { sWrite += ">>" + SPACER; } if (pageStartFirst != pageStartLast) { document.write(sWrite); } }, openPageLink: function (start, count) { window.location.href = this.getPageLink(start, count); }, writePageLink: function (start, count) { document.write(this.getPageLink(start, count)); }, getPageLink: function (start, count) { var loc = window.location.href; if (loc.indexOf("?") == -1) { loc += "?Open"; } loc = BigSummitUtils.replaceQsValue(loc, "Start", start); loc = BigSummitUtils.replaceQsValue(loc, "Count", count); return loc; } } var CookieUtils = { exists: function (name) { var ret = false; var ck = this.get(name); if (ck != null && ck != "") ret = true; return ret; }, get: function (name) { var cname = name + "="; var dc = document.cookie; if (dc.length > 0) { begin = dc.indexOf(cname); if (begin != -1) { begin += cname.length; end = dc.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin, end)); } } return null; }, // Use this function to save a cookie. set: function (name, value, expires) { document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString()); }, // Use this function to delete a cookie. deleteCookie: function (name) { document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/"; }, getExpireDate: function (nodays) { var UTCstring; Today = new Date(); nomilli=Date.parse(Today); Today.setTime(nomilli+nodays*24*60*60*1000); UTCstring = Today.toUTCString(); return UTCstring; } } //map javascript object function Map() { this.array = new Array(); } function KeyValue( key, value ) { this.key = key; this.value = value; } Map.prototype.put = function( key, value ) { if( ( typeof key != "undefined" ) && ( typeof value != "undefined" ) ) { var found = false; for( var k = 0 ; k < this.array.length ; k++ ) { if( this.array[k].key == key ) { this.array[k].value = value; found = true; break; } } if (!found) { this.array[this.array.length] = new KeyValue( key, value ); } } } Map.prototype.get = function( key ) { for( var k = 0 ; k < this.array.length ; k++ ) { if( this.array[k].key == key ) { return this.array[k].value; } } return null; } Map.prototype.length = function() { return this.array.length; }