1 function MM_findObj(n, d) { //v4.01
2 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
3 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
4 if(!(x=d[n])&&d.all) x=d.all[n];
5 for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
6 for(i=0;!x&&d.layers&&i<d.layers.length;i++)
7 x=MM_findObj(n,d.layers[i].document);
8 if(!x && d.getElementById) x=d.getElementById(n);
12 function MM_changeProp(objName,x,theProp,theValue) { //v6.0
13 var obj = MM_findObj(objName);
14 if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
15 if (theValue == true || theValue == false)
16 eval("obj."+theProp+"="+theValue);
17 else eval("obj."+theProp+"='"+theValue+"'");
21 function initialize(){
22 if (document.all || document.getElementById){
23 setInterval("statmenu_ie()",10)
24 } else if (document.layers){
25 setInterval("statmenu_ns()",10)
29 function statmenu_ns(){
30 MM_changeProp('jtf','','style.top', (pageYOffset+10)+'px','DIV');
31 MM_changeProp('jtef','','style.top', (pageYOffset+115)+'px','DIV');
32 MM_changeProp('atab','','style.top', (pageYOffset+242)+'px','DIV');
35 function statmenu_ie(){
36 //var pageoffsetx=document.all? document.body.scrollLeft : window.pageXOffset
37 var pageoffsety=document.all? document.body.parentNode.scrollTop : window.pageYOffset;
38 MM_changeProp('jtf','','style.top', (pageoffsety+10)+'px','DIV');
39 MM_changeProp('jtef','','style.top', (pageoffsety+115)+'px','DIV');
40 MM_changeProp('atab','','style.top', (pageoffsety+242)+'px','DIV');
46 this.bgColor = '#FEF5D6';
47 this.textColor = 'black';
48 this.borderColor = 'black';
50 this.cursorDistance = 5;
58 this.create = function() {
59 if(!this.sobj) this.init();
61 var t = '<table border=0 cellspacing=0 cellpadding=4 width=' + this.width + ' bgcolor=' + this.bgColor + '><tr>' +
62 '<td align=left class="tooltip">'+ this.text + '</td></tr></table>';
65 t = '<table border=0 cellspacing=0 cellpadding=1><tr><td bgcolor=' + this.borderColor + '>' + t + '</td></tr></table>';
66 this.sobj.document.write(t);
67 this.sobj.document.close();
70 this.sobj.border = '1px solid ' + this.borderColor;
72 if(document.getElementById) document.getElementById('ToolTip').innerHTML = t;
73 else document.all.ToolTip.innerHTML = t;
78 this.init = function() {
79 if(document.getElementById) {
80 this.obj = document.getElementById('ToolTip');
81 this.sobj = this.obj.style;
83 else if(document.all) {
84 this.obj = document.all.ToolTip;
85 this.sobj = this.obj.style;
87 else if(document.layers) {
88 this.obj = document.ToolTip;
93 this.show = function() {
94 var ext = (document.layers ? '' : 'px');
97 if(left + this.width + this.cursorDistance > winX) left -= this.width + this.cursorDistance;
98 else left += this.cursorDistance;
100 this.sobj.left = left + ext;
101 this.sobj.top = mouseY + this.cursorDistance + ext;
104 this.sobj.visibility = 'visible';
109 this.hide = function() {
110 if(this.sobj) this.sobj.visibility = 'hidden';
114 this.setOpacity = function() {
115 this.sobj.filter = 'alpha(opacity=' + this.opacity + ')';
116 this.sobj.mozOpacity = '.1';
117 if(this.obj.filters) this.obj.filters.alpha.opacity = this.opacity;
118 if(!document.all && this.sobj.setProperty) this.sobj.setProperty('-moz-opacity', this.opacity / 100, '');
122 var tooltip = mouseX = mouseY = winX = 0;
124 if(document.layers) {
125 document.write('<layer id="ToolTip" class="tooltip" onClick="toolTip()"></layer>');
126 document.captureEvents(Event.MOUSEMOVE);
128 else document.write('<div id="ToolTip" style="position:absolute; z-index:99" class="tooltip" onClick="toolTip()"></div>');
129 document.onmouseover = getMouseXY;
131 function getMouseStub(e){
134 function getMouseXY(e) {
136 mouseX = event.clientX + document.body.scrollLeft;
137 mouseY = event.clientY + document.body.scrollTop;
143 if(mouseX < 0) mouseX = 0;
144 if(mouseY < 0) mouseY = 0;
146 if(document.body && document.body.offsetWidth) winX = document.body.offsetWidth - 25;
147 else if(window.innerWidth) winX = window.innerWidth - 25;
148 else winX = screen.width - 25;
150 if(tooltip && tooltip.active) tooltip.show();
153 function toolTip(text, width, opacity) {
155 tooltip = new TOOLTIP();
157 if(width) tooltip.width = width;
158 if(opacity) tooltip.opacity = opacity;
161 else if(tooltip) tooltip.hide();