var normalImages = new Array( ); var overImages = new Array(); /* adds an entry for your image for switching, the entry contains a pair of images params: - name: the name of your set of images, this will be it's key - normalPath: the path to the image on it's normal state - overPath: the path to the image on it's higlighted state */ function addImageEntry( name, normalPath, overPath ) { normalImages[name] = new Image; normalImages[name].src = normalPath; overImages[name] = new Image; overImages[name].src = overPath; } /* switches your image to it's over state params: - name: the name of the field to switch - img: the name (key) for your set of images */ function overSwitch( name, img ) { if ( document.images ) document.images[name].src = overImages[img].src; } /* switches your image to it's normal state params: - name: the name of the field to switch - img: the name (key) for your set of images */ function outSwitch( name, img ) { if ( document.images ) document.images[name].src = normalImages[img].src; } function toggleHidden(id) { if (document.getElementById(id).style.display == 'none' ) { document.getElementById(id).style.display = 'block'; } else { document.getElementById(id).style.display = 'none'; } } function showElement(id) { document.getElementById(id).style.display = 'block'; } function hideElement(id) { document.getElementById(id).style.display = 'none'; } function showTooltip(text, e) { doShowTooltip(text, e, '8pt', 'auto'); } function showTooltipFontChange(text, e, fontSize) { doShowTooltip(text, e, fontSize, 'auto'); } function showTooltipBoxChange(text, e, boxWidth) { doShowTooltip(text, e, '8pt', boxWidth); } function doShowTooltip(text, e, fontSize, boxWidth) { if (document.all) { // if IE // grab the x-y pos.s if browser is IE tempX = event.clientX+ document.documentElement.scrollLeft; tempY = event.clientY + document.documentElement.scrollTop; winW = document.body.offsetWidth; } else { // grab the x-y pos.s if browser is NS tempX = e.pageX; tempY = e.pageY; winW = window.innerWidth; } // catch possible negative values in NS4 if (tempX < 0){tempX = 0;} if (tempY < 0){tempY = 0;} var newDiv; if (!document.getElementById('tooltipId')) { newDiv = document.createElement('div'); newDiv.setAttribute('id', 'tooltipId'); newDiv.style.position = 'absolute'; newDiv.style.zIndex = '1000'; newDiv.style.background = 'black'; newDiv.style.width = boxWidth; } else { newDiv = document.getElementById('tooltipId'); } document.body.appendChild(newDiv); newDiv.innerHTML = '