////////////////////// INSTRUCTIONS ////////////////////////// // IN ORDER TO WORK THE HTML DOCUMENT MUST HAVE A DIV WITH THE ID "INFO" // document.getElementById('info').style.display = "none"; //this to see if it is below ie7 if so hide function browserTest(){ version=0; if (navigator.appVersion.indexOf("MSIE")!=-1){ temp=navigator.appVersion.split("MSIE"); version=parseFloat(temp[1]); if (version<7){ //NON IE browser will return 0 //DO NOTHING BECAUSE YOUR NOT ie7 or up } else { watchMouse(); //your ie7 so it's all good }; } else{ watchMouse(); //your not explorer so it's all good }; } ////////////// function watchMouse() { if (!document.getElementsByTagName) return false; var links = document.getElementsByTagName("img"); for (var i=0; i < links.length; i++) { if (links[i]) { links[i].onmouseover = function() { if(this.className == 'hints'){ if (this.name == ''){ document.getElementById('info').style.display = "none"; }else { document.getElementById('info').style.display = "block"; document.getElementById('infoContent').innerHTML = this.name; } } return false;}} links[i].onmouseout= function() { document.getElementById('info').style.display = "none"; document.getElementById('infoContent').innerHTML = ''; opac=0; return false;} } document.onmousemove = showValues; } function showValues(e) { var posx = 0; var posy = 0; if (!e) var e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } // posx and posy contain the mouse position relative to the document // move info tab document.getElementById('info').style.left = posx + 10 + 'px'; document.getElementById('info').style.top = posy - 50 + 'px'; //document.getElementById('infoContent').style.minWidth = '110px'; //document.getElementById('info').style.minWidth = '170px'; } function getElementsByClassName(strClassName){}; window.onload = browserTest;