1 var tooltip=function(){
11 var ie = document.all ? true : false;
17 tt = document.createElement('div');
18 tt.setAttribute('id',id);
19 //tt.setAttribute('style',"display: table; display: inline-block;");
20 t = document.createElement('div');
21 t.setAttribute('id',id + 'top');
22 c = document.createElement('div');
23 c.setAttribute('id',id + 'cont');
24 b = document.createElement('div');
25 b.setAttribute('id',id + 'bot');
30 //document.body.appendChild(tt);
31 var objTo = document.getElementById('topo_plugin')
32 objTo.appendChild(tt);
33 tt.style.position='absolute';
34 // tt.style.display='inline-block';
36 //tt.style.filter = 'alpha(opacity=0)';
37 objTo.onmousemove = this.pos;
40 tt.style.display = 'block';
43 //console.log("///////////////tooltip/////////",c);
44 tt.style.width = w ? w + 'px' : 'auto';
47 t.style.display = 'none';
48 b.style.display = 'none';
49 tt.style.width = tt.offsetWidth;
50 t.style.display = 'block';
51 b.style.display = 'block';
52 } //end of if(!w && ie)
56 if(tt.offsetWidth > maxw){
57 tt.style.width = maxw + 'px';
60 h = parseInt(tt.offsetHeight) + top;
61 clearInterval(tt.timer);
62 tt.timer = setInterval(function(){tooltip.fade(1)},timer);
64 //console.log("//////////////h:",h);
71 //var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
72 //var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
77 // tt.style.top =0 + 'px';
80 // tt.style.top =(u-h) + 'px';
82 tt.style.top = e.clientY +'px';
83 //console.log("top:",tt.style.top);
84 // console.log("clientY:",e.clientY);
85 tt.style.left = (e.clientX-300) + 'px';
91 if((a != endalpha && d == 1) || (a != 0 && d == -1)){
93 if(endalpha - a < speed && d == 1){
95 }else if(alpha < speed && d == -1){
99 tt.style.opacity = alpha * .01;
100 //tt.style.filter = 'alpha(opacity=' + alpha + ')';
102 clearInterval(tt.timer);
104 tt.style.display = 'none'
111 clearInterval(tt.timer);
112 tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
115 }; //end of show function