//browser detection var agt=navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_opera = (agt.indexOf("opera") != -1); var is_ie = ((agt.indexOf("msie") != -1) && (!is_opera)); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_mac = (agt.indexOf("mac")!=-1); function init() { //========================================================================================== // if supported, initialize TransMenus //========================================================================================== // Check isSupported() so that menus aren't accidentally sent to non-supporting browsers. // This is better than server-side checking because it will also catch browsers which would // normally support the menus but have javascript disabled. // // If supported, call initialize() and then hook whatever image rollover code you need to do // to the .onactivate and .ondeactivate events for each menu. //========================================================================================== if (TransMenu.isSupported()) { TransMenu.initialize(); } } // this is a crappy example image swapper. Use whichever you want. function swapImage(imgName, sFilename) { document.images[imgName].src = sFilename; }