永不消失的title提示代码

2019-06-03 05:49:34刘景俊

ie4 = (document.all)? true:false 

// Microsoft Stupidity Check. 
if (ie4) { 
 if (navigator.userAgent.indexOf('MSIE 5')>0) { 
  ie5 = true; 
 } else { 
  ie5 = false; } 
} else { 
 ie5 = false; 


var x = 0; 
var y = 0; 
var snow = 0; 
var sw = 0; 
var cnt = 0; 
var dir = 1; 
var tr=1; 
if ( (ns4) || (ie4) ) { 
 if (ns4) over = document.overDiv 
 if (ie4) over = overDiv.style 
 document.onmousemove = mouseMove 
 if (ns4) document.captureEvents(Event.MOUSEMOVE) 


// 以下是页面中使用的公共函数; 

// Simple popup right 
function drs(text) { 
 dts(1,text); 



// Clears popups if appropriate 
function nd() { 
 if ( cnt >= 1 ) { sw = 0 }; 
 if ( (ns4) || (ie4) ) { 
  if ( sw == 0 ) { 
   snow = 0; 
   hideObject(over); 
  } else { 
   cnt++; 
  } 
 } 


// 非公共函数,被其它的函数调用; 

// Simple popup 
function dts(d,text) { 
 txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=""+backcolor+""><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=3 BGCOLOR=""+fcolor+""><TR><TD CLASS=P1><FONT FACE="宋体" COLOR=""+textcolor+"">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>" 
 layerWrite(txt); 
 dir = d; 
 disp(); 


  

// Common calls 
function disp() { 
 if ( (ns4) || (ie4) ) { 
  if (snow == 0)  { 
   if (dir == 2) { // Center 
    moveTo(over,x+offsetx-(width/2),y+offsety); 
   } 
   if (dir == 1) { // Right 
    moveTo(over,x+offsetx,y+offsety);