﻿function over(image, dir, imgName) { if (document.images) { var img = (imgName) ? findObject(imgName) : findObject(image); img.rsrc = img.src; img.src = dir + image + "_on.jpg"; } }
function out(image) { if (document.images) { var img = findObject(image); img.src = img.rsrc; } }
function findObject(name, doc) {
    if (!doc) doc = document; var obj = null; if (!(obj = doc[name]) && doc.all) { obj = doc.all[name]; }
    if (!obj && document.layers) { for (var i = 0; !obj && i < doc.layers.length; i++) { obj = findObject(name, doc.layers[i].document); } }
    if (!obj && doc.getElementById) { obj = doc.getElementById(name); }
    return obj;
}
function popupVehicleFeatures(url)
{ var newWindow; newWindow = window.open(url, 'name', 'width=950,height=800,left=50,top=50, screenX=50,screenY=50,status=no,scrollbars=yes, resize=yes'); if (window.focus) { newWindow.focus() } }
function popupTruckFeatures(url)
{ var newWindow; newWindow = window.open(url, 'name', 'width=640,height=430,left=50,top=50, screenX=50,screenY=50,status=no,scrollbars=yes, resize=yes'); if (window.focus) { newWindow.focus() } }
function popupColors(url)
{ var newWindow; newWindow = window.open(url, 'name', 'width=850,height=600,left=50,top=50, screenX=50,screenY=50,status=no,scrollbars=yes, resize=yes'); if (window.focus) { newWindow.focus() } }
function popupWebCam(url)
{ var newWindow; newWindow = window.open(url, 'name', 'height=600,width=900, top=50, left=50,screenX=50,screenY=50,status=no,scrollbars=yes,resize=no'); if (window.focus) { newWindow.focus() } }
function popupSpecials(url)
{ var newWindow; newWindow = window.open(url, 'name', 'height=620,width=920, top=50, left=50,screenX=50,screenY=50,status=no,scrollbars=yes,resize=no'); if (window.focus) { newWindow.focus() } }
function popupAutoLoanCalculator(url)
{ var newWindow; newWindow = window.open(url, 'name', 'height=350,width=275, top=50, left=50,screenX=50,screenY=50,status=no,scrollbars=no,resize=no'); if (window.focus) { newWindow.focus() } }
function popupMileageIntervals(url)
{ var newWindow; newWindow = window.open(url, 'name', 'height=400,width=750, top=50, left=50,screenX=50,screenY=50,status=no,scrollbars=yes,resize=no'); if (window.focus) { newWindow.focus() } }
function popupServiceCenterSlideShow(url)
{ var newWindow; newWindow = window.open(url, 'name', 'toolbar=no,menubar=no,directories=no,location=no,width=530,height=420,left=50,top=50, screenX=50,screenY=50,status=no,scrollbars=no, resize=no'); if (window.focus) { newWindow.focus() } }
function popupVideo(url)
{ var newWindow; newWindow = window.open(url, 'Video', 'toolbar=no,menubar=no,directories=no,location=no,width=350,height=250,left=50,top=50, screenX=50,screenY=50,status=no,scrollbars=no, resize=no'); if (window.focus) { newWindow.focus() } }
function openResizablePopup(url)
{ var newWindow; newWindow = window.open(url, 'name', 'height=620,width=920, top=50, left=50,screenX=50,screenY=50,status=no,scrollbars=yes,resizable=yes'); if (window.focus) { newWindow.focus() } }
function popupCoupon(url)
{ var newWindow; newWindow = window.open(url, 'name', 'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=530,height=180'); if (window.focus) { newWindow.focus() } }
function popupServiceMaintenanceCoupon(url)
{ var newWindow; newWindow = window.open(url, 'name', 'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=530,height=270'); if (window.focus) { newWindow.focus() } }
function popupInternetCoupon(url)
{ var newWindow; newWindow = window.open(url, 'name', 'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=0,resizable=0,width=630,height=440'); if (window.focus) { newWindow.focus() } }
function openNewWindow(url)
{ var newWindow; newWindow = window.open(url); if (window.focus) { newWindow.focus() } }
function openNewWindow(url)
{ var newWindow; newWindow = window.open(url); if (window.focus) { newWindow.focus() } }
function createMarker(point, html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }
function loadGoogleMap(centerLat, centerLng, locLat, locLng, dealershipImg, displayedAddress, submittedAddress) { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(centerLat, centerLng), 12); var point = new GLatLng(locLat, locLng); var markerHTML = '<div id="mapOverlay">'; markerHTML += '<p class="address">' + '<img class="dealer" src="' + dealershipImg + '" width="100" height="56" align="left" />'; markerHTML += displayedAddress + '</p>'; markerHTML += '<form action="http://maps.google.com/maps" method="get" target="_blank">'; markerHTML += '<input class="text" type="text" size="38" maxlength="40" name="saddr" id="saddr" value="Enter your starting address" onclick="if(this.value==\'Enter your starting address\'){this.value=\'\'}" /><br />'; markerHTML += '<input class="submit" value="Get Directions" type="submit">'; markerHTML += '<input type="hidden" name="daddr" value="' + submittedAddress + '"/>'; markerHTML += '</form></div>'; var marker = createMarker(point, markerHTML); map.addOverlay(marker); marker.openInfoWindowHtml(markerHTML); } }
function minor()
{ NewWindow = window.open('servicemenu/minor.aspx', 'newWin', 'width=494, height=355, left=100, top=100, toolbar=No, location=No, scrollbars=Yes, status=No, resizable=Yes, fullscreen=No'); NewWindow.focus(); }
function intermediate()
{ NewWindow = window.open('servicemenu/intermediate.aspx', 'newWin', 'width=494, height=650, left=100, top=100, toolbar=No, location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); }
function major()
{ NewWindow = window.open('servicemenu/major.aspx', 'newWin', 'width=494, height=600, left=100, top=100, toolbar=No, location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); }
function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } }
function changeImages() { if (document.images && (preloadFlag == true)) { for (var i = 0; i < changeImages.arguments.length; i += 2) { document[changeImages.arguments[i]].src = changeImages.arguments[i + 1]; } } }
var preloadFlag = false; function preloadImages() { if (document.images) { Directions_over = newImage("images/Directions-over.jpg"); PurePrice_over = newImage("images/PurePrice-over.jpg"); xd_over = newImage("images/xd-over.jpg"); tc_over = newImage("images/tc-over.jpg"); xb_over = newImage("images/xb-over.jpg"); preloadFlag = true; } }

