/**右侧固定浮动导航**/ var default_top_ps = 200; var evans_agt = navigator.useragent.tolowercase(); var evans_ie = ((evans_agt.indexof("msie") != -1) && (evans_agt.indexof("opera") == -1) && (evans_agt.indexof("omniweb") == -1)); var evans_mymovey = new number(); function evans_ietruebody() { return (document.compatmode && document.compatmode != "backcompat") ? document.documentelement: document.body } function evans_getscrolltop() { return evans_ie ? evans_ietruebody().scrolltop: window.pageyoffset } function evans_heartbeat() { evans_diffy = evans_getscrolltop(); evans_mymovey += math.floor((evans_diffy - document.getelementbyid('fdmenu').style.top.replace("px", "") + default_top_ps) * 0.1); document.getelementbyid('fdmenu').style.top = evans_mymovey + "px" } var evans_tmpintval = window.setinterval("evans_heartbeat()", 1); if (document.getelementbyid('kfboxclose')) { document.getelementbyid('kfboxclose').onclick = function() { window.clearinterval(evans_tmpintval); document.getelementbyid('fdmenu').style.display = 'none' } } var popupdelay = 0; var maxpoptimes = 3; var prepoptime = '10'; function tong_movediv() { this.move = function(id, evt, t) { if (id == "") { return } var o = document.getelementbyid(id); if (!o) { return } evt = evt ? evt: window.event; o.style.position = "absolute"; o.style.zindex = 200; var obj = evt.srcelement ? evt.srcelement: evt.target; var w = o.offsetwidth; var h = o.offsetheight; var l = o.offsetleft; var t = o.offsettop; var div = document.createelement("div"); document.body.appendchild(div); div.style.csstext = "filter:alpha(opacity=10,style=0);opacity:0.2;width:" + w + "px;height:" + h + "px;top:" + t + "px;left:" + l + "px;position:absolute;background:#000"; div.setattribute("id", id + "temp"); this.move_onlymove(id, evt, t) }; this.move_onlymove = function(id, evt, t) { var o = document.getelementbyid(id + "temp"); if (!o) { return } var evt = evt ? evt: window.event; var relleft = evt.clientx - o.offsetleft; var reltop = evt.clienty - o.offsettop; if (!window.captureevents) { o.setcapture() } else { window.captureevents(event.mousemove | event.mouseup) } document.onmousemove = function(e) { if (!o) { return } e = e ? e: window.event; var bh = math.max(document.body.scrollheight, document.body.clientheight, document.body.offsetheight, document.documentelement.scrollheight, document.documentelement.clientheight, document.documentelement.offsetheight); var bw = math.max(document.body.scrollwidth, document.body.clientwidth, document.body.offsetwidth, document.documentelement.scrollwidth, document.documentelement.clientwidth, document.documentelement.offsetwidth); var sbw = 0; if (document.body.scrollwidth < bw) sbw = document.body.scrollwidth; if (document.body.clientwidth < bw && sbw < document.body.clientwidth) sbw = document.body.clientwidth; if (document.body.offsetwidth < bw && sbw < document.body.offsetwidth) sbw = document.body.offsetwidth; if (document.documentelement.scrollwidth < bw && sbw < document.documentelement.scrollwidth) sbw = document.documentelement.scrollwidth; if (document.documentelement.clientwidth < bw && sbw < document.documentelement.clientwidth) sbw = document.documentelement.clientwidth; if (document.documentelement.offsetwidth < bw && sbw < document.documentelement.offsetwidth) sbw = document.documentelement.offsetwidth; if (e.clientx - relleft <= 0) { o.style.left = 0 + "px" } else if (e.clientx - relleft >= bw - o.offsetwidth - 2) { o.style.left = (sbw - o.offsetwidth - 2) + "px" } else { o.style.left = e.clientx - relleft + "px" } if (e.clienty - reltop <= 1) { o.style.top = 1 + "px" } else if (e.clienty - reltop >= bh - o.offsetheight - 30) { o.style.top = (bh - o.offsetheight) + "px" } else { o.style.top = e.clienty - reltop + "px" } }; document.onmouseup = function() { if (!o) return; if (!window.captureevents) { o.releasecapture() } else { window.releaseevents(event.mousemove | event.mouseup) } var o1 = document.getelementbyid(id); if (!o1) { return } var l0 = o.offsetleft; var t0 = o.offsettop; var l = o1.offsetleft; var t = o1.offsettop; kf54mymove.move_e(id, l0, t0, l, t, t); document.body.removechild(o); o = null } }; this.move_e = function(id, l0, t0, l, t, t) { if (typeof(window["ct" + id]) != "undefined") { cleartimeout(window["ct" + id]) } var o = document.getelementbyid(id); if (!o) return; var sl = st = 8; var s_l = math.abs(l0 - l); var s_t = math.abs(t0 - t); if (s_l - s_t > 0) { if (s_t) { sl = math.round(s_l / s_t) > 8 ? 8 : math.round(s_l / s_t) * 6 } else { sl = 0 } } else { if (s_l) { st = math.round(s_t / s_l) > 8 ? 8 : math.round(s_t / s_l) * 6 } else { st = 0 } } if (l0 - l < 0) { sl *= -1 } if (t0 - t < 0) { st *= -1 } if (math.abs(l + sl - l0) < 52 && sl) { sl = sl > 0 ? 2 : -2 } if (math.abs(t + st - t0) < 52 && st) { st = st > 0 ? 2 : -2 } if (math.abs(l + sl - l0) < 16 && sl) { sl = sl > 0 ? 1 : -1 } if (math.abs(t + st - t0) < 16 && st) { st = st > 0 ? 1 : -1 } if (s_l == 0 && s_t == 0) { return } if (t) { o.style.left = l0 + "px"; o.style.top = t0 + "px"; return } else { if (math.abs(l + sl - l0) < 2) { o.style.left = l0 + "px" } else { o.style.left = l + sl + "px" } if (math.abs(t + st - t0) < 2) { o.style.top = t0 + "px" } else { o.style.top = t + st + "px" } window["ct" + id] = window.settimeout("kf54mymove.move_e('" + id + "', " + l0 + " , " + t0 + ", " + (l + sl) + ", " + (t + st) + "," + t + ")", 1) } } }; // javascript document