1function miaovAddEvent(oEle, sEventName, fnHandler) 2{ 3 if(oEle.attachEvent) 4 { 5 oEle.attachEvent('on'+sEventName, fnHandler); 6 } 7 else 8 { 9 oEle.addEventListener(sEventName, fnHandler, false); 10 } 11} 12 13window.onload = function() { 14 15 var oWx = document.getElementById('wx'); 16 var aA = oWx.getElementsByTagName('a')[0] 17 var oImg = oWx.getElementsByTagName('img')[1]; 18 aA.onmouseover = function () { 19 oImg.style.display = 'block'; 20 }; 21 22 aA.onmouseout = function () { 23 oImg.style.display = 'none'; 24 }; 25 26 var oWx1 = document.getElementById('wxfoot'); 27 var aA1 = oWx1.getElementsByTagName('a')[0] 28 var oImg1 = oWx1.getElementsByTagName('img')[1]; 29 aA1.onmouseover = function () { 30 oImg1.style.display = 'block'; 31 }; 32 33 aA1.onmouseout = function () { 34 oImg1.style.display = 'none'; 35 }; 36 37 var oWx2 = document.getElementById('wxfoot2'); 38 var aA2 = oWx2.getElementsByTagName('a')[0] 39 var oImg2 = oWx2.getElementsByTagName('img')[1]; 40 aA2.onmouseover = function () { 41 oImg2.style.display = 'block'; 42 }; 43 44 aA2.onmouseout = function () { 45 oImg2.style.display = 'none'; 46 }; 47 48 var oWx3 = document.getElementById('wxfoot3'); 49 var aA3 = oWx3.getElementsByTagName('a')[0] 50 var oImg3 = oWx3.getElementsByTagName('img')[1]; 51 aA3.onmouseover = function () { 52 oImg3.style.display = 'block'; 53 }; 54 55 aA3.onmouseout = function () { 56 oImg3.style.display = 'none'; 57 }; 58 59 var oDiv = document.getElementById('miaov_float_layer'); 60 var oBtnMin = document.getElementById('btn_min'); 61 var oBtnClose = document.getElementById('btn_close'); 62 var oDivContent = oDiv.getElementsByTagName('div')[0]; 63 64 var iMaxHeight = 0; 65 66 var isIE6 = window.navigator.userAgent.match(/MSIE 6/ig) && !window.navigator.userAgent.match(/MSIE 7|8/ig); 67 68 oDiv.style.display = 'block'; 69 iMaxHeight = oDivContent.offsetHeight; 70 71 if (isIE6) { 72 oDiv.style.position = 'absolute'; 73 repositionAbsolute(); 74 miaovAddEvent(window, 'scroll', repositionAbsolute); 75 miaovAddEvent(window, 'resize', repositionAbsolute); 76 } 77 else { 78 oDiv.style.position = 'fixed'; 79 repositionFixed(); 80 miaovAddEvent(window, 'resize', repositionFixed); 81 } 82 83 oBtnMin.timer = null; 84 oBtnMin.isMax = true; 85 oBtnMin.onclick = function() { 86 startMove 87 ( 88 oDivContent, (this.isMax = !this.isMax) ? iMaxHeight : 0, 89 function() { 90 oBtnMin.className = oBtnMin.className == 'min' ? 'max' : 'min'; 91 } 92 ); 93 }; 94 95 oBtnClose.onclick = function() { 96 oDiv.style.display = 'none'; 97 oDiv.innerHTML = ""; 98 }; 99};
100 101function startMove(obj, iTarget, fnCallBackEnd) 102{ 103 if(obj.timer) 104 { 105 clearInterval(obj.timer); 106 } 107 obj.timer=setInterval 108 ( 109 function () 110 { 111 doMove(obj, iTarget, fnCallBackEnd); 112 },30 113 ); 114} 115 116function doMove(obj, iTarget, fnCallBackEnd) 117{ 118 var iSpeed=(iTarget-obj.offsetHeight)/8; 119 120 if(obj.offsetHeight==iTarget) 121 { 122 clearInterval(obj.timer); 123 obj.timer=null; 124 if(fnCallBackEnd) 125 { 126 fnCallBackEnd(); 127 } 128 } 129 130 else 131 { 132 iSpeed=iSpeed>0?Math.ceil(iSpeed):Math.floor(iSpeed); 133 obj.style.height=obj.offsetHeight+iSpeed+'px'; 134 135 ((window.navigator.userAgent.match(/MSIE 6/ig) && window.navigator.userAgent.match(/MSIE 6/ig).length==2)?repositionAbsolute:repositionFixed)() 136 } 137} 138 139function repositionAbsolute() 140{ 141 var oDiv=document.getElementById('miaov_float_layer'); 142 var left=document.body.scrollLeft||document.documentElement.scrollLeft; 143 var top=document.body.scrollTop||document.documentElement.scrollTop; 144 var width=document.documentElement.clientWidth; 145 var height=document.documentElement.clientHeight; 146 147 oDiv.style.left=left+width-oDiv.offsetWidth+'px'; 148 oDiv.style.top=top+height-oDiv.offsetHeight+'px'; 149} 150 151function repositionFixed() 152{ 153 var oDiv=document.getElementById('miaov_float_layer'); 154 var width=document.documentElement.clientWidth; 155 var height=document.documentElement.clientHeight; 156 157 oDiv.style.left=width-oDiv.offsetWidth+'px'; 158 oDiv.style.top=height-oDiv.offsetHeight+'px'; 159}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.