var WIN = window, DOC = WIN.document, NV = WIN.navigator, NuUtil = { UA: NV.userAgent, PF: NV.platform, NL: NV.language, BL: NV.browserLanguage, os: function() { if (/Android/.test(this.UA)) return { name:'Mobile' }; else if (/Win/.test(this.PF)) return { name:'Windows' }; else if (/Mac/.test(this.PF)) return { name:'Mac' }; else if (/Linux/.test(this.PF)) return { name:'Linux' }; else return { name:'Mobile' }; }, browser: function() { if (/Safari/.test(this.UA) || /AppleWebKit/.test(this.UA)) return { name:'Safari', version:this.UA.match(/Version\/([\w\.]+)/) }; else if (/MSIE/.test(this.UA)) return { name:'IE', version:this.UA.match(/MSIE (\d+(?:\.\d+)+(?:b\d*)?)/) }; else if (/Opera/.test(this.UA)) return { name:'Opera', version:this.UA.match(/version/.test(this.UA)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/) }; else if (/Firefox/.test(this.UA)) return { name:'Firefox', version:this.UA.match(/Firefox\/([\w\.]+)/) }; else return { name:'IE', version:0 }; }, language: function() { if (this.browser().name == 'IE') return this.BL; else return this.NL; }, is64bit: function() { return (/Win64/.test(this.PF)); } }, NuLib = { obj: function() { var o = []; for (var i = 0; i < arguments.length; i++) { if (typeof(arguments[i]) == 'string') o[i] = DOC.getElementById(arguments[i]); } if (o.length == 1) return o[0]; else return o; }, show: function() { for (var i = 0; i < arguments.length; i++) { var o = arguments[i]; if (typeof(o) == 'string') o = this.obj(o); if (o && o.style) o.style.display = 'block'; } }, hide: function() { for (var i = 0; i < arguments.length; i++) { var o = arguments[i]; if (typeof(o) == 'string') o = this.obj(o); if (o && o.style) o.style.display = 'none'; } }, addEvent: function(obj, e, handler) { var fn = handler; if (!obj.attachedEvents) obj.attachedEvents = new Array(); if (obj.attachedEvents[e]) this.removeEvent(obj, e); obj.attachedEvents[e] = fn; if (typeof(obj.addEventListener) != 'undefined') obj.addEventListener(e, handler, false); else if (typeof(obj.attachEvent) != 'undefined') obj.attachEvent('on' + e, handler); }, removeEvent: function(obj, e) { if (!obj.attachedEvents || !obj.attachedEvents[e]) return; if (typeof(obj.removeEventListener) != 'undefined') obj.removeEventListener(e, obj.attachedEvents[e], false); else if (typeof(obj.detachEvent) != 'undefined') obj.detachEvent('on' + e, obj.attachedEvents[e]); }, cancelEvent: function(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); e.cancelBubble = true; e.returnValue = false; return false; }, coords: function(obj) { var c = [0, 0]; if (obj.x) c = [obj.x, obj.y]; else if (obj.offsetParent) { do { if (obj.nodeName != 'TD' || obj.id.substr(0,5) != 'NuTip') { c[0] += obj.offsetLeft; c[1] += obj.offsetTop; } } while (obj = obj.offsetParent); } return c; }, mouseX: function(e) { var x = 0; var e = e ? e : WIN.event; if (e.pageX) x = e.pageX; else if (e.clientX && DOC.body.scrollLeft) x = e.clientX + DOC.body.scrollLeft; else if (e.clientX && DOC.documentElement.scrollLeft) x = e.clientX + DOC.documentElement.scrollLeft; else if (e.clientX) x = e.clientX; return x; }, mouseY: function(e) { var y = 0; var e = e ? e : WIN.event; if (e.pageY) y = e.pageY; else if (e.clientY && DOC.body.scrollTop) y = e.clientY + DOC.body.scrollTop; else if (e.clientY && DOC.documentElement.scrollTop) y = e.clientY + DOC.documentElement.scrollTop; else if (e.clientY) y = e.clientY; return y; }, docWidth: function() { return this._sv(WIN.innerWidth ? WIN.innerWidth : 0, (NuUtil.browser().name == 'IE') ? (DOC.documentElement ? DOC.documentElement.clientWidth : 0) : (WIN.innerWidth ? WIN.innerWidth : 0), DOC.body ? DOC.body.clientWidth : 0, true); }, docHeight: function() { return this._sv(WIN.innerHeight ? WIN.innerHeight : 0, (NuUtil.browser().name == 'IE') ? (DOC.documentElement ? DOC.documentElement.clientHeight : 0) : (WIN.innerHeight ? WIN.innerHeight : 0), DOC.body ? DOC.body.clientHeight : 0, true); }, clientWidth: function() { return this._sv(WIN.innerWidth ? WIN.innerWidth : 0, DOC.documentElement ? DOC.documentElement.clientWidth : 0, DOC.body ? DOC.body.clientWidth : 0, false); }, clientHeight: function() { return this._sv(WIN.innerHeight ? WIN.innerHeight : 0, DOC.documentElement ? DOC.documentElement.clientHeight : 0, DOC.body ? DOC.body.clientHeight : 0, false); }, scrollLeft: function() { return this._sv(WIN.pageXOffset ? WIN.pageXOffset : 0, DOC.documentElement ? DOC.documentElement.scrollLeft : 0, DOC.body ? DOC.body.scrollLeft : 0, false); }, scrollTop: function() { return this._sv(WIN.pageYOffset ? WIN.pageYOffset : 0, DOC.documentElement ? DOC.documentElement.scrollTop : 0, DOC.body ? DOC.body.scrollTop : 0, false); }, _sv: function(n_win, n_docel, n_body, for_doc) { var n_result = n_win ? n_win : 0; if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel; return n_body && (!n_result || (!for_doc && n_result > n_body)) ? n_body : n_result; }, scrollTo: function(id) { location.hash = id; }, addCss: function(css) { var style = DOC.createElement('style'); style.type = 'text/css'; if (style.styleSheet) style.styleSheet.cssText = css; else style.appendChild(DOC.createTextNode(css)); var head = DOC.getElementsByTagName('head')[0]; head.insertBefore(style, head.firstChild); }, insertHtml: function(html) { var div = DOC.createElement('div'); div.innerHTML = html; DOC.body.insertBefore(div, DOC.body.childNodes[0]); } }, SetNuTip = { THEME: 'G', enable_anchor: false, ui: null, head: null, close: null, message: null, msg: null, foot: null, theme: null, anchor: null, index: -1, imageCache: [], html: '
', create: function() { this.index = (new Date()).getTime(); NuLib.insertHtml(SetNuTip.html.replace(/@/g, this.index)); this.ui = NuLib.obj('NuTip_' + this.index); this.head = NuLib.obj('NuTip_head_' + this.index); this.close = NuLib.obj('NuTip_cls'); this.message = NuLib.obj('NuTip_message_' + this.index); this.msg = NuLib.obj('NuTip_msg_' + this.index); this.theme = NuLib.obj('NuTip_theme_' + this.index); this.foot = NuLib.obj('NuTip_foot_' + this.index); }, move: function(pt) { this.ui.style.left = pt[0] + 'px'; this.ui.style.top = pt[1] + 'px'; if (this.enable_anchor) { if (this.anchor) NuLib.hide(this.anchor); this.anchor = NuLib.obj('NuTip_a' + pt[2] + '_' + this.index); if (this.anchor) NuLib.show(this.anchor); } }, content: function(head, msg, foot) { if (head) { this.head.innerHTML = head.replace(/&@/g, ''); NuLib.show(this.head); NuLib.show(this.close); } else { this.head.innerHTML = ' '; NuLib.hide(this.head); NuLib.hide(this.close); } if (msg) { this.msg.innerHTML = msg.replace(/&@/g, ''); NuLib.show(this.msg); } else { this.msg.innerHTML = ' '; NuLib.hide(this.msg); } if (foot) { this.foot.innerHTML = foot.replace(/&@/g, ''); NuLib.show(this.foot); } else { this.foot.innerHTML = ' '; NuLib.hide(this.foot); } this.theme.className = "NuTipStyle" + this.THEME; }, show: function() { this.ui.style.zIndex = 92; NuLib.show(this.ui); }, hide: function() { NuLib.hide(this.ui); }, position : function(e) { this.move(this.calc(e)); }, calc: function(e) { var o = e.target ? e.target : e.srcElement; var margin = 0; var c = NuLib.coords(o); var result = [0, 0, 'br']; oL = c[0]; oT = c[1]; this.ui.style.zIndex = -20; this.ui.style.display = 'block'; this.ui.style.left = oL + 'px'; this.ui.style.top = oT + 'px'; this.ui.style.width = ''; this.ui.style.height = ''; this.ui.style.overflow = 'hidden'; var w = o.offsetWidth; var h = o.offsetHeight; x1 = oL; y1 = oT; x2 = oL + w; y2 = oT + h; tipW = this.ui.offsetWidth; tipH = this.ui.offsetHeight; scrL = NuLib.scrollLeft(); scrR = scrL + NuLib.docWidth(); scrT = NuLib.scrollTop(); scrB = scrT + NuLib.docHeight(); var distances = { 'left' : (x1 - scrL - tipW), 'right' : (scrR - x2 - tipW), 'top' : (y1 - scrT - tipH), 'bottom' : (scrB - y2 - tipH) }; var horzEdge = (distances['top'] <= distances['bottom'] ? 'bottom' : 'top'); var vertEdge = (distances['left'] <= distances['right'] ? 'right' : 'left'); if (vertEdge == 'left') { if (x1 - scrL < tipW) { tipW = this.ui.style.width = x1 - scrL; this.ui.style.overflow = 'auto'; } } else { if (scrR - x2 < tipW) { tipW = this.ui.style.width = scrR - x2; this.ui.style.overflow = 'auto'; } } if (horzEdge == 'top') { if (y1 - scrT < tipH) { tipH = this.ui.style.height = y1 - scrT; this.ui.style.overflow = 'auto'; } } else { if (scrB - y2 < tipH) { tipH = this.ui.style.height = scrB - y2; this.ui.style.overflow = 'auto'; } } var x = 0, y = 0, a = 0; if (distances[horzEdge] <= distances[vertEdge]) { x = (vertEdge == 'left' ? x1 - tipW - margin : x2 + margin); y = (Math.max(y1, scrT) + Math.min(y2, scrB)) / 2 - (horzEdge == 'top' ? tipH : 0); a = (vertEdge == 'left' ? 'r' : 'l') + (horzEdge == 'top' ? 'b' : 't'); } else { x = (Math.max(x1, scrL) + Math.min(x2, scrR)) / 2 - (vertEdge == 'left' ? tipW : 0); y = (horzEdge == 'top' ? y1 - tipH - margin : y2 + margin); a = (horzEdge == 'top' ? 'b' : 't') + (vertEdge == 'left' ? 'r' : 'l'); } if (tipH < 30) { this.ui.style.overflow = 'hidden'; tipH = this.ui.style.height = 30; y = scrT; } if (o.tagName == 'AREA') return [NuLib.mouseX(e), NuLib.mouseY(e), a]; else return [x, y, a]; }, close: function(e, _index) { NuLib.hide('NuTip_' + _index); NuLib.cancelEvent(e); }, preload: function() { var o = this.THEME.toLowerCase(); var list = ['graph_tip_shadow_b.png','graph_tip_shadow_l.png','graph_tip_shadow_lb.png','graph_tip_shadow_lt.png','graph_tip_shadow_r.png','graph_tip_shadow_rb.png','graph_tip_shadow_rt.png','graph_tip_shadow_t.png','graph_tip_close.png','graph_tip_glow.png']; var img = DOC.createElement('IMG'); for (var i = 0; i < list.length; i++) { this.imageCache[i] = img.cloneNode(false); this.imageCache[i].src = '../icons_eng/'+list[i]; } } }, NuTip = { timerId: null, tip: null, hideTime: 600, initialized: false, init: function() { if (!this.initialized) { SetNuTip.preload(); this.initialized = true; } }, tipOver: function(e) { NuTip.keepTip(); if (e) NuLib.cancelEvent(e); }, tipClose: function(e) { NuTip.hideTip(); if (e) NuLib.cancelEvent(e); }, showTip: function(head, msg, foot, e) { if (NuTip.timerId) { clearTimeout(NuTip.timerId); NuTip.timerId = null; } if (!this.tip) { this.tip = new Object(SetNuTip); this.tip.create(); } this.tip.content(head, msg, foot); this.tip.position(e); this.tip.show(); }, hideTip : function(delay) { if (NuTip.timerId) { clearTimeout(NuTip.timerId); NuTip.timerId = null; } if (delay) NuTip.timerId = setTimeout("NuTip.hideTip()", delay); else if (this.tip) this.tip.hide(); }, keepTip: function() { if (NuTip.timerId) { clearTimeout(NuTip.timerId); NuTip.timerId = null; } } }; NuTip.init(); NuLib.addCss('.TipMainTable{background-color:#333333;} .TipDiv{visibility:hidden;position:absolute;z-index:1000;top:-100;} .TipiFrame{visibility:hidden;position:absolute;z-index:0;top:-100;filter:alpha(opacity=0)} .TipFstCol{background-color:#B8CBEB;font-family:Arial;font-weight:normal;font-size:11px;color:#006292;text-align:center;vertical-align:middle;height:16px;white-space:nowrap;padding-left:1px;padding-top:1px;padding-bottom:1px;padding-right:1px} .TipCol{font-weight:normal;font-size:10px;color:#000000;background-color:#E4ECF4;white-space:nowrap;text-align:center; vertical-align: middle; height: 14px; font-family: Arial;padding-left:1px;padding-top:1px;padding-bottom:1px;padding-right:1px} .TipContentCol{font-weight:normal;font-size:8pt;color:#000000;background-color:#FFFF99;text-aleft;vertical-align:middle;font-family:Arial;padding-left1px;padding-top:1px;padding-bottom:1px;padding-right:1px} .TipTitleCol{font-weight:bold;font-size:8pt;color:#FFFFFF;background-color:#000099;text-alignleft;vertical-align:top;font-family:Arial;padding-left1px;padding-top:1px;padding-bottom:1px;padding-right:1px} .NuTip{position:absolute;z-index:200} .NuTip_alb,.NuTip_alt,.NuTip_arb,.NuTip_art,.NuTip_abl,.NuTip_atl,.NuTip_abr,.NuTip_atr{position:absolute;z-index:190;background-repeat:no-repeat;display:none;padding:0px;margin:0px} .NuTip_alb,.NuTip_alt,.NuTip_arb,.NuTip_art{width:30px;height:40px;font-size:0px} .NuTip_abl,.NuTip_atl,.NuTip_abr,.NuTip_atr{width:40px;height:30px;font-size:0px} .NuTip_alt{left:0px;top:25px} .NuTip_alb{left:0px;bottom:25px} .NuTip_art{right:0px;top:25px} .NuTip_arb{right:0px;bottom:25px} .NuTip_abl{left:25px;bottom:0px} .NuTip_atl{left:25px;top:0px} .NuTip_abr{right:25px;bottom:0px} .NuTip_atr{right:25px;top:0px} .NuTip_lt,.NuTip_t,.NuTip_rt,.NuTip_l,.NuTip_r,.NuTip_lb,.NuTip_b,.NuTip_rb{width:5px;height:5px;font-size:0px} .NuTip_lt{background-image:url(/icons_eng/graph_tip_shadow_lt.png);background-repeat:no-repeat;background-position:right bottom} .NuTip_t{background-image:url(/icons_eng/graph_tip_shadow_t.png);background-repeat:repeat-x;background-position:bottom} .NuTip_rt{background-image:url(/icons_eng/graph_tip_shadow_rt.png);background-repeat:no-repeat;background-position:left bottom} .NuTip_r{background-image:url(/icons_eng/graph_tip_shadow_r.png);background-repeat:repeat-y;background-position:left} .NuTip_rb{background-image:url(/icons_eng/graph_tip_shadow_rb.png);background-repeat:no-repeat;background-position:left top} .NuTip_b{background-image:url(/icons_eng/graph_tip_shadow_b.png);background-repeat:repeat-x;background-position:top} .NuTip_lb{background-image:url(/icons_eng/graph_tip_shadow_lb.png);background-repeat:no-repeat;background-position:right top} .NuTip_l{background-image:url(/icons_eng/graph_tip_shadow_l.png);background-repeat:repeat-y;background-position:right} .NuTip_head{font-size:9pt;font-weight:bold;padding-right:20px; padding-bottom:7px;white-space:nowrap;border-bottom:solid 1px #CCCCCC;} .NuTip_pan{background-image:url(/icons_eng/graph_tip_glow.png);background-repeat:repeat-x; background-position:top;padding:3px;text-align:left;color:#000000;white-space:nowrap} .NuTip_message{padding:3px;font-size:11px;} .NuTip_foot{padding-right:0px;padding-top:7px;text-align:right;border-top:solid 1px #CCCCCC;font-size:11px;color:#666666} a.NuTip_cls div{float:right;width:14px;height:14px;background-image:url(/icons_eng/graph_tip_close.png);background-position:center center;background-repeat:no-repeat;margin:1px;cursor:pointer} a.NuTip_cls:hover div{margin:0;border:solid 1px #777777} .NuTip_cls IMG{border:none} .NuTipStyleA .NuTip_pan{border:solid 1px #9999CC;background-color:#CCCCFF}.NuTipStyleA .NuTip_cls:hover IMG{border:solid 1px #9999CC;background-color:#FFEECC} .NuTipStyleB .NuTip_pan{border:solid 1px #99CC99;background-color:#CCFFCC} .NuTipStyleB .NuTip_cls:hover IMG{border:solid 1px #99CC99;background-color:#FFEECC} .NuTipStyleC .NuTip_pan{border:solid 1px #99CCCC;background-color:#CCFFFF} .NuTipStyleC .NuTip_cls:hover IMG{border:solid 1px #99CCCC;background-color:#FFEECC} .NuTipStyleD .NuTip_pan{border:solid 1px #AAAAAA;background-color:#dddddd} .NuTipStyleD .NuTip_cls:hover IMG{border:solid 1px #AAAAAA;background-color:#FFEECC} .NuTipStyleE .NuTip_pan{border:solid 1px #CC9999;background-color:#FFCCCC} .NuTipStyleE .NuTip_cls:hover IMG{border:solid 1px #CC9999;background-color:#FFEECC} .NuTipStyleF .NuTip_pan{border:solid 1px #CC99CC;background-color:#FFCCFF} .NuTipStyleF .NuTip_cls:hover IMG{border:solid 1px #CC99CC;background-color:#FFEECC} .NuTipStyleG .NuTip_pan{border:solid 1px #CCCC99;background-color:#FFFFCC} .NuTipStyleG .NuTip_cls:hover IMG{border:solid 1px #CC9933;background-color:#FFEECC}'); function showTip() { var e, head, msg, foot; for (var i = 0; i < arguments.length; i++) { var o = arguments[i]; if (typeof(o) === 'string') { if (msg == null) msg = o; else if (head == null) head = o; else if (foot == null) foot = o; } else if (typeof(o) === 'object') e = o ? o : WIN.event; } if (e) NuTip.showTip(head, msg, foot, e); } function hideTip() { NuTip.hideTip(NuTip.hideTime); } function stickTip() { NuTip.tipOver(); } function closeTip() { NuTip.tipClose(); } var LB_CHK=0,LB_SET=1,LB_DFT=2; var MLightBarStaus=null; var MOverColor='#FF8040',MOutColor='#E4ECF4',MClickColor='#FFD6C1'; function LightBarIn(OBJ) { OBJ.style.background=MOverColor; } function LightBarOut(OBJ) { if (LightBarCtrl(LB_CHK, OBJ)==OBJ.id) OBJ.style.background=MClickColor; else OBJ.style.background=MOutColor; } function LightBarCtrl(CMD, OBJ) { var POBJ = null; switch(parseInt(CMD, 10)) { case LB_CHK: return MLightBarStaus; case LB_SET: if (MLightBarStaus) { POBJ=ReturnOBJById(MLightBarStaus); POBJ.style.background=MOutColor; } MLightBarStaus=OBJ.id; break; case LB_DFT: MLightBarStaus=null; break; } return; } function SortingItem(obj, si, sd) { set_environment(obj); obj.si.value = si; obj.sd.value = sd; return true; } function set_SortBT_up(obj) { obj.style.borderTop='#EFEFEF solid 1px'; obj.style.borderLeft='#EFEFEF solid 1px'; obj.style.borderBottom='#666666 solid 1px'; obj.style.borderRight='#666666 solid 1px'; } function set_SortBT_down(obj) { obj.style.borderTop='#666666 solid 1px'; obj.style.borderLeft='#666666 solid 1px'; obj.style.borderBottom='#EFEFEF solid 1px'; obj.style.borderRight='#EFEFEF solid 1px'; } function set_SortBT_def(obj) { obj.style.border='#B8CBEB solid 1px'; } var setENV = null; function set_environment(obj) { if (setENV) { for (var i = 0; i < setENV.length; i++) obj.elements[setENV[i][0]].value=setENV[i][1]; } } function set_checkbox(obj, name, sn, max) { var count = 0; var num = 0; var oo = (sn==0)?obj.cp.value:eval('obj.cp'+sn).value; if (obj.elements[name].length == 'undefined') { num = 1+((parseInt(oo, 10)-1)*max); count = 1; } else { for (var i = 0; i < obj.elements[name].length; i++) { if (obj.elements[name][i].checked){ count++; num = i+1+((parseInt(oo, 10)-1)*max); } } } return count+'_'+num; } var _A_=1,_M_=2,_D_=3,_MultiD_=4,_MultiA_=5; function set_segment(no, m, n, e, c, o, r) { if (r) { var maximum = parseInt(m, 10); var lastest = parseInt(e, 10); var delnum = (c==_MultiD_)?parseInt(n.split("_")[0]):0; var number = (c==_MultiD_)?parseInt(n.split("_")[1]):(c==_MultiA_)?(parseInt(n, 10)+lastest):parseInt(n, 10); var current = Math.floor(number / maximum) * maximum + 1; var previous = (((Math.floor(number / maximum) - 1) < 0) ? 0 : (Math.floor(number / maximum) - 1)) * maximum + 1; var name = (parseInt(no, 10) > 0) ? 'se'+no : 'se'; if (c == _D_) { o.elements[name].value = (number % maximum) ? current : previous; } else if (c == _MultiD_) { o.elements[name].value = (number % maximum) ? current : previous; } else o.elements[name].value = (number % maximum) ? current : previous; } return r; }