1 document.οnmοuseοver=showmune; 2 var sPop = null; 3 document.write(''); 7 document.write(' '); 8 function showmune(){ 9 //显示菜单 10 var o = event.srcElement; 11 var temp_t = o.title; 12 var temp_a = o.alt; 13 var str_len = 0; 14 var i = 0; 15 16 if(o.alt!=null && o.alt!=""){ o.pop=o.alt;o.alt="";} 17 if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="";} 18 if(o.pop){ 19 o.pop=o.pop.replace(/(\\n)/g,""); 20 /* 21 var temp = o.pop.split(""); 22 while(i < temp.length){ 23 //str_len = str_len < x_str_len(temp[i]) ? x_str_len(temp[i]) : str_len; //自动 24 ++i; 25 } 26 */ 27 str_len = 34; //固定长度 28 } 29 if(o.pop!=sPop){ 30 sPop = o.pop; 31 if(sPop==null || sPop==""){ 32 popLayer.filters[0].apply(); 33 popLayer.style.visibility="hidden"; 34 popLayer.filters[0].play(); 35 popLayer.style.width=""; 36 }else{ 37 if(o.dyclass!=null) popStyle=o.dyclass; 38 else popStyle="PopText"; 39 popLayer.filters[0].apply(); 40 if(o.pop.substring(0,4) != "ylhx"){ 41 o.title = temp_t; 42 o.alt = temp_a; 43 popLayer.style.visibility="hidden"; 44 }else{ 45 sPop = o.pop.substring(4,o.pop.length); 46 popLayer.style.visibility="visible"; 47 } 48 popLayer.filters[0].play(); 49 showit(str_len,i); 50 } 51 } 52 53 } 54 function showit(str_len,i){ 55 var t_ary = new Array(new Array('↖【叶绿辉香】-http://www.91ylhx.cn', 56 '↙【叶绿辉香】-http://www.91ylhx.cn'),new Array( 57 '【叶绿辉香】-http://www.91ylhx.cn↗', 58 '【叶绿辉香】-http://www.91ylhx.cn↘') 59 ); 60 var t_i1 = 0; 61 var t_i2 = 0; 62 //设定宽度和高度 63 var temp = parseInt((str_len*5+10) < 220 ? 220 :(str_len*5+10),10); 64 var X_width = parseInt((temp > 500 ? 500 : temp),10); 65 var X_height = parseInt((i+2)*20,10); 66 67 var H_left = parseInt(event.clientX,10); 68 var H_top = parseInt(event.clientY,10); 69 var bodyW = parseInt(get_wh()[0],10); 70 var bodyH = parseInt(get_wh()[1],10); 71 var ti = 10; 72 popLayer.style.left = ((H_left + X_width + ti > bodyW) ? (H_left - X_width - ti) : H_left)+document.documentElement.scrollLeft; 73 popLayer.style.top = ((H_top + X_height + ti > bodyH) ? (H_top - X_height - ti) : H_top)+document.documentElement.scrollTop; 74 t_i1 = (H_left + X_width + ti > bodyW) ? 1 : 0; 75 t_i2 = (H_top + X_height + ti > bodyH) ? 1 : 0; 76 popLayer.className=popStyle; 77 popLayer.innerHTML='
'+sPop+' |
'+sPop+' |