// ## vehicleHome.js // Contains the dynamic functionality, HTML, and default instructional copy associated with the "Design Your Nissan" model types on the right-hand side of the page. // FUNCTION LIST: // buildLayer(); // trimOn(); // trimOff(); // TEMPLATE(S) USED: // vehicles_home.html var trimTimeout // Builds the information layer to the right of the menu. function buildLayer(trim, text) { //var test = trimArray[trimArrayIndex].trim; var layerText = ''; layerText = ''; layerText += ''; layerText += ''; layerText += ''; layerText += ''; layerText += ''; layerText += '
' + trim + '
' + text + '
 '; trimInfo.write(layerText); trimInfo.show(); } // Resets the layer to the default instructional copy. function resetLayer() { var layerText = ''; layerText = ''; layerText += '' layerText += '
' layerText += 'Mouse over the model names on the left for brief descriptions. Click on the model names to design your very own.
 ' trimInfo.write(layerText); trimInfo.show(); } // Activates the trim information layer. function trimOn(trim, text) { if (trimTimeout) {clearTimeout(trimTimeout)} buildLayer(trim, text); } // Deactivates the trim information layer after a period of time. function trimOff() { if (is.mac) trimTimeout = setTimeout("trimInfo.hide();resetLayer();",4000) else trimTimeout = setTimeout("trimInfo.hide();resetLayer();",400) }