function drive_it_now(DealerID,vehicleVIN,vehicleZipCode,vehiclePrice,vehicleMSRP,vehicleStyle,vehicleOptions,vehicleTransmission,vehicleOdometer,vehicleExtColor,vehicleIntColor,vehicleCondition,vehiclePhoto,button_id,demo_customer,listing_id,modal,vehicleStockNum,mode) { var winHeight = din_jQuery(window).height(); if (winHeight > 605) {winHeight = 605;} if (mode == 'mobile') { src_content = mobile_din_url + '/driveitnow.php?DealerID=' + DealerID + '&vehicleVIN=' + vehicleVIN + '&vehicleStyle=' + vehicleStyle + '&vehiclePhoto=' + encodeURIComponent(vehiclePhoto) + '&vehicleZipCode=' + vehicleZipCode + '&vehiclePrice=' + vehiclePrice +'&vehicleMSRP=' + vehicleMSRP + '&vehicleOptions=' + vehicleOptions + '&vehicleTransmission=' + vehicleTransmission + '&vehicleOdometer=' + vehicleOdometer + '&vehicleExtColor=' + vehicleExtColor + '&vehicleIntColor=' + vehicleIntColor + '&vehicleCondition=' + vehicleCondition + '&ebayItemNumber=' + ebayItemNumber + '&ebaySellerID=' + eBaySellerID + '&demo_customer=' + demo_customer + '&listing_id=' + listing_id + '&modal=' + modal + '&vehicleStockNum=' + vehicleStockNum; window.location = src_content; } else { src_content = ''; din_jQuery.modal(src_content,{closeHTML: "",height:winHeight}); } } if(typeof window.drive_it_now_button != 'function') { function drive_it_now_button(skip_write) { vehicleZipCode = vehicleZipCode.replace('-',''); vehicleZipCode = vehicleZipCode.substring(0,5); dinButtons[arr_count] = new Array(); dinButtons[arr_count][0] = DealerID; dinButtons[arr_count][1] = vehicleVIN; dinButtons[arr_count][2] = vehicleStyle; dinButtons[arr_count][3] = vehiclePhoto; dinButtons[arr_count][4] = vehicleZipCode; dinButtons[arr_count][5] = vehiclePrice; dinButtons[arr_count][6] = vehicleMSRP; dinButtons[arr_count][7] = vehicleOptions; dinButtons[arr_count][8] = vehicleTransmission; dinButtons[arr_count][9] = vehicleOdometer; dinButtons[arr_count][10] = vehicleExtColor; dinButtons[arr_count][11] = vehicleIntColor; dinButtons[arr_count][12] = vehicleCondition; dinButtons[arr_count][13] = ebayItemNumber; dinButtons[arr_count][14] = eBaySellerID; dinButtons[arr_count][15] = display_text; dinButtons[arr_count][16] = href_class; dinButtons[arr_count][17] = 'din_' + arr_count; dinButtons[arr_count][18] = demo_customer; dinButtons[arr_count][19] = listing_id; dinButtons[arr_count][20] = button_id; dinButtons[arr_count][21] = mode; dinButtons[arr_count][22] = modal; dinButtons[arr_count][23] = imageWidth; dinButtons[arr_count][24] = display_text_preq; dinButtons[arr_count][25] = vehicleStockNum; dinButtons[arr_count][26] = Acode; dinButtons[arr_count][27] = UserID; dinButtons[arr_count][28] = display_text_nopreq; if (!skip_write ) { if (mode == 'mobile') { document.write('
'); } else { document.write('
'); } } arr_count++; } } function loadjscssfile(filename, filetype){ //make sure we don't load the same file twice var arr2str = ext_files_loaded.toString(); if (arr2str.search(filename) == -1) { if (filetype=="js"){ //if filename is a external JavaScript file var fileref=document.createElement('script') fileref.setAttribute("type","text/javascript") fileref.setAttribute("src", filename) } else if (filetype=="css"){ //if filename is an external CSS file var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", filename) } if (typeof fileref!="undefined") { document.getElementsByTagName("head")[0].appendChild(fileref) } ext_files_loaded.push(filename); } } function load_din_buttons() { if (din_jQueryLoaded) { for(loop_count=0; loop_count