var w3c = (document.getElementById)?true:false; var agt = navigator.userAgent.toLowerCase(); var ie = ((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1)&&(agt.indexOf("omniweb")==-1)); var ie5 = (w3c&&ie)?true:false; var ns6 = (w3c&&(navigator.appName=="Netscape"))?true:false; var op8 = (navigator.userAgent.toLowerCase().indexOf("opera") == -1) ? false : true; var fir3 = (navigator.userAgent.toLowerCase().indexOf("firefox") == -1) ? false : true; function getOffset(o) { var l = 0; var t = 0; if (ie5 || ns6 || op8 || fir3) { var p = o; while (p != null && p != document.body) { l += p.offsetLeft; t += p.offsetTop; if (!ns6) { var lw = parseInt(p.currentStyle.borderLeftWidth); var tw = parseInt(p.currentStyle.borderTopWidth); if (lw > 0) l += lw; if (tw > 0) t += tw; } p = p.offsetParent; } } else { l = o.offsetLeft; t = o.offsetTop; } o.offsetLeft2 = l; o.offsetTop2 = t; return o; } function addHandler(o,e,ne) {if(!o)return;var tmp=o[e];var args=Array.prototype.slice.call(arguments,3);o[e]=function(){if(ne)ne.apply(o,args);if(tmp)tmp.apply(o);};} function gc() {if(CollectGarbage)setTimeout(CollectGarbage,1);} function o(s) {document.write(s);} function $(n) {return document.getElementById(n);} function $$(n) {return document.getElementsByName(n);} function request(name) {var url=document.location.href;if(url.indexOf('?')!=-1){url=url.split('?');url=url[url.length-1].split('&');for(var i=0;i 12 ? (this.getHours() - 12) : this.getHours() var tmp = { 'yyyy' : this.getYear(), 'yy' : tempfunc(this.getYear(), 3, 4), 'MM' : (this.getMonth() < 9 ? '0' : '') + (this.getMonth() + 1), 'M' : this.getMonth() + 1, 'dd' : (this.getDate() < 10 ? '0' : '') + this.getDate(), 'd' : this.getDate(), 'hh' : (h12 < 10 ? '0' : '') + h12, 'h' : h12, 'HH' : (this.getHours() < 10 ? '0' : '') + this.getHours(), 'H' : this.getHours(), 'mm' : (this.getMinutes() < 10 ? '0' : '') + this.getMinutes(), 'm' : this.getMinutes(), 'ss' : (this.getSeconds() < 10 ? '0' : '') + this.getSeconds(), 's' : this.getSeconds() }; for (var p in tmp) f = f.replace(new RegExp('\\b' + p + '\\b', 'g'), tmp[p]); return f; } Date.prototype.getWeekey = function() { return def.week[this.getDay()]; } Number.prototype.round = function(r) { r = typeof(r) == 'undefined' ? 1 : r; var rv = String(this); var io = rv.indexOf('.'); var ri = io == -1 ? '' : rv.substr(io + 1, r); var le = io == -1 ? (rv + '.') : rv.substr(0, io + 1 + r); for(var a = ri.length ; a < r ; a ++) le += '0'; return le; } String.Empty = ''; String.prototype.trim = function() { return this.ltrim().rtrim(); } String.prototype.ltrim = function() { return this.replace(/^ +([^ ]*)/g, '$1'); } String.prototype.rtrim = function() { return this.replace(/([^ ]*) +$/g, '$1'); } String.prototype.format = function() { var val=this.toString(); for(var a=0,i=0; a/g, '>').replace(/\n/g, '
').replace(/\t/g, '  ').replace(/ /g, ' ').replace(/"/g, '"'); } function extractobj(obj) { var parms = Array.prototype.slice.call(arguments, 1); parms.push('span'); for(var a = 0; a < parms.length; a++) { var ts = obj.getElementsByTagName(parms[a]); for(var b = 0; b < ts.length; b++) if (ts[b].id) obj[ts[b].id] = ts[b]; } } function dialog(id, subject, bmid) { var mask_id = 'mask'; var mask = $('mask_id'); if (!mask) { mask = document.createElement('div'); mask.id = mask_id; } mask.style.height = document.body.offsetHeight + 'px'; var dg = $(id); if (!dg) { dg = document.createElement('div'); dg.id = id; dg.className = 'dialog'; dg.style.height='auto'; dg.innerHTML = '
'; extractobj(dg, 'div'); dg.subject.innerHTML = '' + subject + ''; document.body.appendChild(dg); } dg.content.innerHTML = '
loading....
'; dg.style.top = (document.body.clientHeight - dg.offsetHeight) / 2 + 'px'; dg.style.left = (document.body.offsetWidth - dg.offsetWidth - document.body.scrollLeft) / 2 + 'px'; dg.style.display = ''; dg.subject.onclick = function() { dg.style.display = mask.style.display = 'none'; return false; }; return dg; } function dialog2(id, subject, bmid) { var mask_id = 'mask2'; var mask = document.createElement('div'); mask.id = mask_id; mask.style.height = document.body.offsetHeight + 'px'; var dg = $(id); if (!dg) { dg = document.createElement('div'); dg.id = id; dg.className = 'dialog'; dg.style.height = 'auto'; dg.innerHTML = '
'; extractobj(dg, 'div'); dg.subject.innerHTML = '' + subject + ''; document.body.appendChild(dg); } dg.style.top = (document.body.clientHeight - dg.offsetHeight) / 2 + 'px'; dg.style.left = (document.body.offsetWidth - dg.offsetWidth - document.body.scrollLeft) / 2 + 'px'; dg.style.display = ''; dg.subject.onclick = function() { dg.style.display = mask.style.display = 'none'; return false; }; return dg; }