var selectedImage = ""; var locationShift = ""; if ( window.location.href.indexOf('/es/') > -1 ) { locationShift = "es_"; } function ie(){ var result = false; if ( navigator.userAgent.indexOf("MSIE") != -1 ) { result = true; } return result; } function hilite(pick){ if ( selectedImage != pick ) { if(!ie()) { document.images[pick].src= "images/menu_on_" + locationShift + pick + ".gif"; } else { var target = eval('document.all.'+pick); target.src= "images/menu_on_" + locationShift + pick + ".gif"; } } } function unhilite(pick){ if ( selectedImage != pick ) { if(!ie()) { document.images[pick].src= "images/menu_off_" + locationShift + pick + ".gif"; } else { var target = eval('document.all.'+pick); target.src= "images/menu_off_" + locationShift + pick + ".gif"; } } } function adjust(){ var file = window.location.pathname.substring(window.location.pathname.lastIndexOf("/") + 1);; var page = file.substring(0, file.indexOf(".")); if ( page != "index" ) { if(!ie()) { document.images[page].src = "images/menu_dest_" + locationShift + page + ".gif"; } else { var dest = eval('document.all.'+page); dest.src = "images/menu_dest_" + locationShift + page + ".gif"; } selectedImage = page; } } function preload() { pageNames = new Array("about", "contact", "customers", "custser", "materials", "request", "what"); menuOnImages = new Array(); for ( i = 0; i < pageNames.length; i++ ) { menuOnImages[i] = new Image(); menuOnImages[i].src = ("menu_on_" + locationShift + pageNames[i] + ".gif"); } }