// ## globalNav.js // Contains the dynamic functionality for the drop down navigation found at the top of most templates. // FUNCTION LIST: // init(); // menuOn(); // menuOff(); // menuLinkOn(); // menuLinkOff(); // linkSwap(); // arrowSwap(); // TEMPLATE(S) USED: // brochure_request.html // coming_veh.html // contact.html // corporate.html // dealer_results.html // gallery.html // line_up.html // main.html // performance.html // specs.html // vehicles_home.html var menuTimeout; var currentMenu; var imgPathNav = "img/menu/"; // Image path location for Global Nav menu images. var imgPath = "img/"; // Image path location for all other images. var navIsLoaded = false; // Initializing the global navigation // change init() to globalNavInit() function init() { if (typeof(hasExtraInit)!="undefined"){ extraInit(); } doStatusOff(); } // Swaps the link image. // input: imgName - name of the image // ON - on or off state function linkSwap(imgName, ON) { var theImage = typeof(imgName) == "string" ? eval("document." + imgName) : imgName; if (ON){ re=/(\.[^.]*)$/i; replacement='_f2$1'; } else { re=/_f2(\.[^.]*)$/i; replacement='$1'; } theImage.src = theImage.src.replace(re, replacement); }