var models_array = [];models_array[77] = '1275: Regular Size Car:0*1280:All Other Freight:1*1277:Atv:0*1281:Boat:1*1279:Golf Cart:0*1282:Heavy Equipment:1*1278:Motorcycle:0*1284:R/V Motorhome:1*1283:Specialized Quote Request:1'; models_array[81] = '1297:Cobra:0'; models_array[1] = '1204: Regular Size Car:0*2:2.2CL:0*3:2.3CL:0*8:2.5TL:0*4:3.0CL:0*5:3.2CL:0*9:3.2TL:0*6:3.5RL:0*11:Integra:0*12:Legend:0*13:MDX:0*14:NSX:0*15:RDX:0*7:RL:0*16:RSX:0*17:SLX:0*10:TL:0*18:TSX:0*19:Vigor:0'; models_array[2] = '1205: Regular Size Car:0*20:164:0*21:GTV:0*22:GTV-6:0*23:Milano:0*24:Spider:0*25:Spider Veloce:0'; models_array[3] = '1206: Regular Size Vehicle:0*30:Cherokee:0*28:CJ5:0*29:CJ7:0*31:Comanche:0*32:Concord:0*33:Eagle:0*35:Grand Wagoneer:0*1285:Javelin:0*1288:Rambler:0*38:Scrambler:0*40:Wagoneer:0*41:Wrangler:0'; models_array[4] = '1207: Regular Size Car:0*42:DB7:0*43:DB9:0*44:DBS:0*45:Vanquish:0*46:Vantage:0*47:Virage:0'; models_array[5] = '1208: Regular Size Car:0*48:100:0*49:200:0*50:4000:0*51:5000:0*52:80:0*53:90:0*54:A3:0*55:A4:0*56:A5:0*57:A6:0*58:A8:0*59:Allroad Quattro:0*60:Cabriolet:0*61:Coupe:0*62:Q7:0*63:Quattro:0*64:R8:0*65:RS 4:0*66:RS 6:0*67:S4:0*68:S5:0*69:S6:0*70:S8:0*71:TT:0*72:V8 Quattro:0'; models_array[82] = '1302:All Cars:0'; models_array[78] = '1287:All Cars:0'; models_array[6] = '1209: Regular Size Car:0*73:Convertible:0*74:Coupe:0*75:Sedan:0'; models_array[7] = '1210: Car:0*76:Arnage:0*77:Azure:0*78:Bentley:0*79:Brooklands:0*80:Continental:0*81:Corniche:0*82:Mulsanne:0*1286:R Type:0'; models_array[8] = '1211: Regular Size Car:0*84:128i:0*85:135i:0*87:318i:0*88:318iC:0*89:318iS:0*90:318ti:0*91:320i:0*92:323ci:0*93:323i:0*95:323ic:0*96:323is:0*94:323iT:0*97:325:0*98:325Ci:0*99:325e:0*100:325i:0*101:325iC:0*104:325is:0*102:325iT:0*103:325iX:0*105:325xi:0*106:325xiT:0*107:328Ci:0*108:328i:0*109:328iC:0*110:328iS:0*111:328xi:0*112:330Ci:0*113:330i:0*114:330xi:0*115:335i:0*116:335xi:0*118:524td:0*119:525i:0*120:525iT:0*121:525xi:0*122:528e:0*123:528i:0*124:528iT:0*125:528xi:0*126:530i:0*127:530iT:0*128:530xi:0*129:533i:0*130:535i:0*131:535xi:0*132:540i:0*133:540iT:0*134:545i:0*135:550I:0*137:633CSi:0*138:635CSi:0*139:645Ci:0*140:650CI:0*141:650CIC:0*143:733i:0*144:735i:0*145:735iL:0*146:740i:0*147:740iL:0*149:745i:0*148:745Li:0*151:750i:0*152:750iL:0*150:750Li:0*154:760i:0*153:760Li:0*156:840Ci:0*158:850Ci:0*157:850CSi:0*159:850i:0*161:L6:0*162:L7:0*164:M Coupe:0*165:M Roadster:0*167:M3:0*168:M5:0*169:M6:0*171:X3:0*172:X5:0*173:X6:0*175:Z3:0*176:Z4:0*177:Z8:0'; models_array[9] = '1212: Regular Size Car:0*178:Century:0*179:Electra:0*180:Enclave:0*182:Grand National:0*183:LaCrosse:0*184:Le Sabre:0*185:Lucerne:0*186:Park Avenue:0*187:Rainier:0*188:Reatta:0*189:Regal:0*190:Rendezvous:0*191:Riviera:0*192:Roadmaster:0*193:Skyhawk:0*194:Skylark:0*195:Somerset:0*196:Terraza:0'; models_array[10] = '1213: Regular Size Car:0*197:Allante:0*198:Brougham:0*200:Catera:0*201:Cimarron:0*199:CTS:0*203:De Ville:0*202:DTS:0*204:Eldorado:0*205:Escalade:0*206:Escalade ESV:0*207:Escalade EXT:0*208:Fleetwood:0*211:Seville:0*209:SRX:0*210:STS:0*212:XLR:0'; models_array[11] = '1214: Regular Size Car:0*213:Astro:0*214:Avalanche:0*215:Aveo:0*216:Beretta:0*217:Blazer:0*218:Camaro:0*219:Caprice:0*220:Cavalier:0*221:Celebrity:0*222:Chevette:0*223:Citation:0*224:Cobalt:0*1122:Colorado Crew Cab:0*1121:Colorado Ext Cab:0*1120:Colorado Reg Cab:0*226:Corsica:0*227:Corvette:0*228:El Camino:0*229:Equinox:0*1124:Express Van Ext:0*1123:Express Van Reg:0*232:HHR:0*233:Impala:0*235:Lumina:0*236:Lumina APV:0*234:LUV:0*237:Malibu:0*238:Metro:0*239:Monte Carlo:0*240:Nova:0*1135:Pickup crew cab long bed:0*1136:Pickup crew cab short bed:0*1140:Pickup Dually crew cab:0*1141:Pickup Dually reg cab:0*1134:Pickup ext cab long bed:0*1133:Pickup ext cab short bed:0*1132:Pickup reg cab long bed:0*1131:Pickup reg cab short bed:0*242:Prizm:0*243:S10 Blazer:0*244:S10 Pickup:0*249:Spectrum:0*250:Sprint:0*245:SSR:0*1137:Suburban 1500:0*1138:Suburban 2500:0*1139:Suburban 3500:0*252:Tahoe:0*253:Tracker:0*254:TrailBlazer:0*255:TrailBlazer EXT:0*256:Uplander:0*1292:Van Extended Length:0*1291:Van Regular Length:0*257:Venture:0'; models_array[12] = '1215: Regular Size Car:0*258:300:0*259:300M:0*260:Aspen:0*261:Caravan:0*262:Cirrus:0*263:Concorde:0*264:Conquest:0*265:Cordoba:0*266:Crossfire:0*269:Fifth Avenue:0*270:Imperial:0*271:Intrepid:0*273:LeBaron:0*272:LHS:0*274:Neon:0*275:New Yorker:0*278:Pacifica:0*279:Prowler:0*277:PT Cruiser:0*280:Sebring:0*281:Town & Country:0*282:Voyager:0'; models_array[13] = '1216: Regular Size Car:0*283:Lanos:0*284:Leganza:0*285:Nubira:0'; models_array[14] = '1217: Regular Size Car:0*286:Charade:0'; models_array[15] = '1218: Regular Size Car:0*288:200SX:0*289:210:0*290:280 ZX:0*291:300 ZX:0*292:310:0*293:510:0*294:720:0*295:810:0*296:Maxima:0*297:Pickup:0*298:Pulsar:0*299:Sentra:0*300:Stanza:0'; models_array[16] = '301:DMC-12:0*1219:Regular Size Car:0'; models_array[17] = '1220: Regular Size Car:0*302:400:0*303:600:0*304:Aries:0*305:Avenger:0*306:Caliber:0*307:Caravan:0*308:Challenger:0*309:Charger:0*310:Colt:0*311:Conquest:0*313:Dakota:0*314:Daytona:0*315:Diplomat:0*316:Durango:0*317:Dynasty:0*318:Grand Caravan:0*319:Intrepid:0*320:Journey:0*321:Lancer:0*322:Magnum:0*323:Mirada:0*324:Monaco:0*325:Neon:0*326:Nitro:0*327:Omni:0*1148:Pickup crew cab long bed:0*1149:Pickup crew cab short bed:0*1142:Pickup Dually crew cab:0*1143:Pickup Dually reg cab:0*1147:Pickup ext cab long bed:0*1146:Pickup ext cab short bed:0*1145:Pickup reg cab long bed:0*1144:Pickup reg cab short bed:0*328:Raider:0*1151:Ram SRT-10 crew cab:0*1150:Ram SRT-10 reg cab:0*1153:Ram Van Extended:0*1152:Ram Van Regular:0*337:Rampage:0*339:Shadow:0*340:Spirit:0*338:SRT-4:0*343:Stealth:0*344:Stratus:0*1290:Van Extended Length:0*1289:Van Regular Length:0*345:Viper:0'; models_array[18] = '1221: Regular Size Car:0*346:Medallion:0*347:Premier:0*348:Summit:0*349:Talon:0*350:Vision:0'; models_array[19] = '1222: Regular Size Car:0*351:308 GTB:0*352:308 GTBI:0*353:308 GTS:0*354:308 GTSI:0*355:328 GTB:0*356:328 GTS:0*357:348 GTB:0*358:348 GTS:0*359:348 Spider:0*360:348 TB:0*361:348 TS:0*362:360:0*363:456 GT:0*364:512TR:0*365:599 GTB Fiorano:0*366:612 Scaglietti:0*367:Enzo:0*368:F131:0*369:F355:0*370:F40:0*371:F430:0*372:F50:0*373:F550:0*374:F575:0*375:Mondial:0*376:Testarossa:0'; models_array[20] = '1223: Regular Size Car:0*377:124:0*378:Bertone:0*379:Brava:0*380:Pininfarina:0*381:Strada:0*382:X1/9:0'; models_array[21] = '1224: Regular Size Car:0*1155:Aerostar Extended:0*1154:Aerostar Regular:0*384:Aspire:0*385:Bronco:0*386:Bronco II:0*387:Club Wagon:0*388:Contour:0*390:Crown Victoria:0*1157:E-150/Econoline ext:0*1156:E-150/Econoline reg:0*1159:E-250/Econoline ext:0*1158:E-250/Econoline reg:0*1161:E-350/Econoline ext:0*1160:E-350/Econoline reg:0*395:Edge:0*396:Escape:0*397:Escort:0*398:Excursion:0*394:EXP:0*399:Expedition:0*400:Expedition EL:0*401:Explorer:0*402:Explorer Sport Trac:0*1167:F150 crew cab long bed:0*1166:F150 crew cab short bed:0*1165:F150 ext cab long bed:0*1164:F150 ext cab short bed:0*1163:F150 reg cab long bed:0*1162:F150 reg cab short bed:0*1173:F250 crew cab long bed:0*1172:F250 crew cab short bed:0*1171:F250 ext cab long bed:0*1170:F250 ext cab short bed:0*1169:F250 reg cab long bed:0*1168:F250 reg cab short bed:0*1179:F350 crew cab long bed:0*1178:F350 crew cab short bed:0*1180:F350 Dually crew cab:0*1181:F350 Dually reg cab:0*1177:F350 ext cab long bed:0*1176:F350 ext cab short bed:0*1175:F350 reg cab long bed:0*1174:F350 reg cab short bed:0*407:Fairmont:0*408:Festiva:0*409:Five Hundred:0*410:Flex:0*411:Focus:0*412:Freestar:0*413:Freestyle:0*414:Fusion:0*415:GT:0*1298:GT 40:0*417:LTD:0*419:Mustang:0*421:Probe:0*422:Ranger:0*423:Taurus:0*424:Taurus X:0*425:Tempo:0*426:Thunderbird:0*1294:Van Extended Length:0*1293:Van Regular Length:0*427:Windstar:0*428:ZX2 Escort:0'; models_array[22] = '1225: Regular Size Car:0*429:Metro:0*430:Prizm:0*431:Spectrum:0*432:Storm:0*433:Tracker:0'; models_array[23] = '434:Acadia:0*435:Caballero:0*436:Canyon:0*437:Envoy:0*438:Envoy XL:0*439:Envoy XUV:0*440:Jimmy:0*1189:Pickup crew cab long bed:0*1188:Pickup crew cab short bed:0*1191:Pickup Dually crew cab:0*1190:Pickup Dually reg cab:0*1187:Pickup ext cab long bed:0*1186:Pickup ext cab short bed:0*1185:Pickup reg cab long bed:0*1184:Pickup reg cab short bed:0*443:S15 Pickup:0*444:Safari:0*1183:Savana Extended:0*1182:Savana Regular:0*450:Sonoma:0*1192:Suburban 1500:0*1193:Suburban 2500:0*1194:Suburban 3500:0*453:Typhoon:0*1305:Van Extended Length:0*1304:Van Regular Length:0*454:Vandura:0*455:Yukon:0*456:Yukon XL:0'; models_array[24] = '1226: Regular Size Car:0*457:Accord:0*460:Civic:0*458:CR-V:0*459:CRX:0*461:Del Sol:0*463:Element:0*464:Fit:0*465:Insight:0*1264:Motorcycle:0*466:Odyssey:0*467:Passport:0*468:Pilot:0*469:Prelude:0*470:Ridgeline:0*471:S2000:0'; models_array[25] = '472:H1:0*473:H2:0*474:H3:0'; models_array[26] = '1227: Regular Size Car:0*475:Accent:0*476:Azera:0*477:Elantra:0*478:Entourage:0*479:Excel:0*480:Pony:0*481:Santa Fe:0*482:Scoupe:0*483:Sonata:0*484:Tiburon:0*485:Tucson:0*486:Veracruz:0*487:XG300:0*488:XG350:0'; models_array[27] = '1228: Regular Size Car:0*503:EX35:0*489:FX35:0*490:FX45:0*504:FX50:0*491:G20:0*492:G35:0*493:G37:0*494:I30:0*495:I35:0*496:J30:0*497:M30:0*498:M35:0*499:M45:0*502:Q45:0*500:QX4:0*501:QX56:0'; models_array[28] = '1229: Regular Size Car:0*505:Amigo:0*506:Ascender:0*507:Axiom:0*508:Hombre:0*518:i-280:0*519:i-290:0*520:i-350:0*521:i-370:0*510:Impulse:0*511:Oasis:0*512:Pickup:0*513:Rodeo:0*514:Stylus:0*515:Trooper:0*516:Trooper II:0*517:VehiCROSS:0'; models_array[29] = '1230: Regular Size Car:0*522:S-Type:0*523:Vanden Plas:0*524:X-Type:0*525:XF:0*526:XJ Series:0*527:XJ12:0*528:XJ6:0*529:XJ8:0*530:XJR:0*531:XJS:0*532:XK:0*533:XK8:0*534:XKE Series:0*535:XKR:0'; models_array[30] = '537:Cherokee:0*536:CJ:0*538:Comanche:0*539:Commander:0*540:Compass:0*541:Grand Cherokee:0*542:Grand Wagoneer:0*543:Liberty:0*544:Patriot:0*545:Pickup:0*546:Wagoneer:0*547:Wrangler:0'; models_array[31] = '1231: Regular Size Car:0*548:Amanti:0*549:Optima:0*550:Rio:0*551:Rio5:0*552:Rondo:0*553:Sedona:0*554:Sephia:0*555:Sorento:0*556:Spectra:0*557:Spectra5:0*558:Sportage:0'; models_array[32] = '1232: Regular Size Car:0*559:Countach:0*560:Diablo:0*561:Gallardo:0*562:Jalpa:0*563:LM:0*564:LM002:0*565:Murcielago:0'; models_array[33] = '1233: Regular Size Car:0*566:Beta:0*567:Zagato:0'; models_array[34] = '568:Defender:0*569:Discovery:0*570:Freelander:0*573:Land Rover:0*571:LR2:0*572:LR3:0*574:Range Rover:0*575:Range Rover Sport:0'; models_array[35] = '1234: Regular Size Car:0*576:ES 350:0*577:ES250:0*578:ES300:0*579:ES330:0*580:GS300:0*581:GS350:0*582:GS400:0*583:GS430:0*584:GS450h:0*585:GS460:0*586:GX470:0*587:IS 250:0*588:IS 350:0*589:IS F:0*590:IS300:0*591:LS400:0*592:LS430:0*593:LS460:0*594:LS600h:0*595:LX450:0*596:LX470:0*597:LX570:0*598:RX 400h:0*599:RX300:0*600:RX330:0*601:RX350:0*602:SC300:0*603:SC400:0*604:SC430:0'; models_array[36] = '1235: Regular Size Car:0*605:Aviator:0*606:Blackwood:0*607:Continental:0*608:LS:0*612:Mark LT:0*613:Mark VI:0*614:Mark VII:0*615:Mark VIII:0*609:MKS:0*610:MKX:0*611:MKZ:0*616:Navigator:0*617:Town Car:0*618:Zephyr:0'; models_array[37] = '1236: Regular Size Car:0*619:Elan:0*620:Elise:0*621:Esprit:0*622:Exige:0'; models_array[38] = '1237: Regular Size Car:0*623:425:0*624:430:0*625:Biturbo:0*626:Coupe:0*627:GranSport:0*628:GranTurismo:0*629:Quattroporte:0*630:Spyder:0'; models_array[39] = '1238: Maybach:0*631:57:0*632:62:0'; models_array[40] = '1239: Regular Size Car:0*633:323:0*634:626:0*635:929:0*636:B-Series Pickup:0*637:CX-7:0*638:CX-9:0*639:GLC:0*645:Mazda3:0*646:Mazda5:0*647:Mazda6:0*640:MAZDASPEED3:0*641:MAZDASPEED6:0*648:Miata MX5:0*649:Millenia:0*642:MPV:0*643:MX3:0*644:MX6:0*650:Navajo:0*651:Protege:0*652:Protege5:0*653:RX-7:0*654:RX-8:0*655:Tribute:0'; models_array[41] = '1240: Regular Size Car:0*657:190D 2.2:0*658:190D 2.5:0*659:190DT:0*660:190E 2.3:0*661:190E 2.6:0*663:240D:0*708:260E:0*709:280CE:0*710:280E:0*665:300CD:0*666:300CDT:0*667:300CE:0*668:300D:0*669:300DT:0*670:300E:0*767:300SD:0*768:300SDL:0*769:300SE:0*770:300SEL:0*753:300SL:0*671:300TD:0*672:300TDT:0*673:300TE:0*771:350SD:0*772:350SDL:0*773:380SE:0*774:380SEC:0*775:380SEL:0*754:380SL:0*755:380SLC:0*711:400E:0*776:400SE:0*777:400SEL:0*778:420SEL:0*712:500E:0*779:500SEC:0*780:500SEL:0*781:500SL:0*782:560SEC:0*783:560SEL:0*756:560SL:0*784:600SEC:0*785:600SEL:0*757:600SL:0*694:C Class (12):0*695:C220:0*696:C230:0*697:C240:0*698:C280:0*699:C300:0*700:C32 AMG:0*701:C320:0*702:C350:0*703:C36 AMG:0*704:C43:0*705:C55 AMG:0*706:C63 AMG:0*687:CL Class (6):0*688:CL500:0*689:CL55 AMG:0*690:CL550:0*691:CL600:0*692:CL63 AMG:0*693:CL65 AMG:0*674:CLK Class (7):0*675:CLK320:0*676:CLK350:0*677:CLK430:0*678:CLK500:0*679:CLK55 AMG:0*680:CLK550:0*681:CLK63 AMG:0*682:CLS Class (4):0*683:CLS500:0*684:CLS55 AMG:0*685:CLS550:0*686:CLS63 AMG:0*707:E Class (15):0*713:E300:0*714:E320:0*715:E320 CDI:0*716:E350:0*717:E420:0*718:E430:0*719:E500:0*720:E55 AMG:0*721:E550:0*722:E63 AMG:0*727:G Class (2):0*728:G500:0*729:G55 AMG:0*723:GL Class (3):0*724:GL320 CDI:0*725:GL450:0*726:GL550:0*730:ML Class (8):0*731:ML320:0*732:ML320 CDI:0*733:ML350:0*734:ML430:0*735:ML500:0*736:ML55 AMG:0*737:ML550:0*738:ML63 AMG:0*739:R Class (4):0*740:R320 CDI:0*741:R350:0*742:R500:0*743:R63 AMG:0*766:S Class (30):0*786:S320:0*787:S350:0*788:S350D:0*789:S420:0*790:S430:0*791:S500:0*792:S55 AMG:0*793:S550:0*794:S600:0*795:S63 AMG:0*796:S65 AMG:0*752:SL Class (13):0*758:SL320:0*759:SL500:0*760:SL55 AMG:0*761:SL550:0*762:SL600:0*763:SL63 AMG:0*764:SL65 AMG:0*744:SLK Class (7):0*745:SLK230:0*746:SLK280:0*747:SLK300:0*748:SLK32 AMG:0*749:SLK320:0*750:SLK350:0*751:SLK55 AMG:0*765:SLR:0'; models_array[42] = '1241: Regular Size Car:0*797:Capri:0*798:Cougar:0*799:Grand Marquis:0*800:Lynx:0*801:Marauder:0*802:Mariner:0*803:Marquis:0*804:Milan:0*805:Montego:0*806:Monterey:0*807:Mountaineer:0*808:Mystique:0*809:Sable:0*810:Topaz:0*811:Tracer:0*812:Villager:0*813:Zephyr:0'; models_array[43] = '1242: Regular Size Car:0*814:Scorpio:0*815:XR4TI:0'; models_array[44] = '1243: Mini:0*1301:Clubman:0*816:Cooper:0'; models_array[45] = '1244: Regular Size Car:0*817:3000GT:0*818:Cordia:0*819:Diamante:0*820:Eclipse:0*821:Endeavor:0*822:Expo:0*823:Galant:0*824:Lancer:0*825:Mirage:0*826:Montero:0*827:Montero Sport:0*828:Outlander:0*829:Pickup:0*830:Precis:0*831:Raider:0*832:Sapporo:0*833:Sigma:0*834:Starion:0*835:Tredia:0'; models_array[79] = '1295:All Cars:0'; models_array[72] = '1117:All:0'; models_array[46] = '1200: Regular Car:0*836:200SX:0*837:240SX:0*838:280ZX:0*839:300ZX:0*840:350Z:0*841:Altima:0*842:Armada:0*843:Frontier:0*844:GT-R:0*845:Maxima:0*846:Murano:0*847:NX:0*849:Pathfinder:0*848:PICKUP:0*850:Pulsar:0*851:Quest:0*852:Rogue:0*853:SE-R:0*854:Sentra:0*855:Stanza:0*856:Titan:0*858:Versa:0*859:Xterra:0'; models_array[47] = '1245: Regular Size Car:0*860:88:0*862:Achieva:0*863:Alero:0*864:Aurora:0*865:Bravada:0*866:Calais:0*867:Ciera:0*868:Cutlass:0*869:Cutlass Supreme:0*870:Firenza:0*871:Intrigue:0*872:Ninety-Eight:0*873:Omega:0*874:Regency:0*875:Silhouette:0*876:Toronado:0'; models_array[48] = '1246: Regular Size Car:0*877:405:0*878:504:0*879:505:0*880:604:0'; models_array[49] = '1247: Regular Size Car:0*881:Acclaim:0*882:Arrow:0*883:Breeze:0*884:Caravelle:0*885:Champ:0*886:Colt:0*887:Conquest:0*888:Gran Fury:0*889:Grand Voyager:0*890:Horizon:0*891:Laser:0*892:Neon:0*893:Prowler:0*894:Reliant:0*895:Sapporo:0*896:Scamp:0*897:Sundance:0*898:Trailduster:0*899:Voyager:0'; models_array[50] = '1248: Regular Size Car:0*900:6000:0*901:Aztek:0*902:Bonneville:0*903:Catalina:0*904:Fiero:0*905:Firebird:0*906:Firebird Formula:0*907:G5:0*908:G6:0*909:G8:0*911:Grand Am:0*912:Grand Prix:0*910:GTO:0*913:J2000:0*914:Le Mans:0*915:Montana:0*916:Parisienne:0*917:Phoenix:0*919:Solstice:0*920:Sunbird:0*921:Sunfire:0*922:T-1000:0*923:Torrent:0*924:Trans Am:0*925:Trans Sport:0*926:Vibe:0'; models_array[51] = '1249: Regular Size Car:0*927:911:0*928:911 Turbo:0*929:924:0*930:928:0*931:944:0*932:968:0*933:Boxster:0*934:Carrera GT:0*935:Cayenne:0*936:Cayman:0'; models_array[52] = '1250: Regular Size Car:0*937:181:0*938:18I:0*939:Fuego:0*940:Le Car:0*941:R18:0*942:R5:0*943:Sportwagon:0'; models_array[53] = '944:Camargue:0*945:Corniche:0*946:Park Ward:0*947:Phantom:0*948:Silver Dawn:0*949:Silver Seraph:0*950:Silver Spirit:0*951:Silver Spur:0'; models_array[54] = '1251: Regular Size Car:0*952:9-2X:0*953:9-3:0*954:9-5:0*955:9-7x:0*956:900:0*957:9000:0'; models_array[55] = '1252: Regular Size Car:0*958:Astra:0*959:Aura:0*960:ION:0*961:L100:0*962:L200:0*963:L300:0*964:LS:0*965:LW1:0*966:LW2:0*967:LW200:0*968:LW300:0*969:Outlook:0*970:Relay:0*971:SC1:0*972:SC2:0*978:Sky:0*973:SL:0*974:SL1:0*975:SL2:0*976:SW1:0*977:SW2:0*979:Vue:0'; models_array[56] = '1253: Regular Size Car:0*980:tC:0*981:xA:0*982:xB:0*983:xD:0'; models_array[80] = '1296:All Cars:0'; models_array[57] = '1254: Regular Size Car:0*984:fortwo:0'; models_array[58] = '1255: Regular Size Car:0*985:825:0*986:827:0'; models_array[59] = '1256: Regular Size Car:0*987:Baja:0*988:Brat:0*989:DL:0*990:Forester:0*991:GL:0*992:Impreza:0*993:Justy:0*994:Legacy:0*995:Loyale:0*996:Outback:0*997:RX:0*998:SVX:0*999:Tribeca or B9 Tribeca:0*1000:XT:0'; models_array[60] = '1257: Regular Size Car:0*1001:Aerio:0*1002:Esteem:0*1003:Forenza:0*1004:Grand Vitara:0*1258:Motorcycle:0*1005:Reno:0*1007:Samurai:0*1008:Sidekick:0*1009:Swift:0*1006:SX4:0*1010:Verona:0*1011:Vitara:0*1012:X-90:0*1013:XL7:0'; models_array[61] = '1259: Regular Size Car:0*1014:4Runner:0*1015:Avalon:0*1016:Camry:0*1017:Celica:0*1018:Corolla:0*1019:Corona:0*1020:Cressida:0*1021:Echo:0*1022:FJ Cruiser:0*1023:Highlander:0*1024:Land Cruiser:0*1027:Matrix:0*1025:MR2:0*1026:MR2 Spyder:0*1028:Paseo:0*1029:Pickup:0*1030:Previa:0*1031:Prius:0*1032:RAV4:0*1033:Sequoia:0*1034:Sienna:0*1035:Solara:0*1036:Starlet:0*1037:Supra:0*1038:T100:0*1039:Tacoma:0*1040:Tercel:0*1041:Tundra:0*1043:Yaris:0'; models_array[62] = '1260: Regular Size Car:0*1299:Spitfire:0*1044:TR-7:0*1045:TR-8:0*1300:Vitesse:0'; models_array[63] = '1261: Regular Size Car:0*1197:Beetle:0*1196:Bus:0*1046:Cabrio:0*1047:Cabriolet:0*1048:Corrado:0*1049:Dasher:0*1050:Eos:0*1195:Eurovan:0*1052:Fox:0*1053:GLI:0*1055:Golf:0*1054:GTI:0*1056:Jetta:0*1057:New Beetle:0*1058:Passat:0*1059:Phaeton:0*1060:Pickup:0*1061:Quantum:0*1062:R32:0*1063:Rabbit:0*1064:Scirocco:0*1065:Tiguan:0*1066:Touareg:0*1067:Vanagon:0'; models_array[64] = '1262: Regular Size Car:0*1068:240:0*1069:240 DL:0*1070:240 GL:0*1071:240 GLT:0*1072:240 SE:0*1073:244 GL:0*1074:260:0*1075:260 GLE:0*1076:740:0*1077:740 GL:0*1078:740 GLE:0*1079:740 SE:0*1080:760:0*1081:760 GLE:0*1082:765 GLE:0*1083:780:0*1084:850:0*1085:850 GLT:0*1086:850 T-5:0*1087:850 T-5R:0*1088:940:0*1089:940 GL:0*1090:940 GLE:0*1091:940 SE:0*1092:960:0*1093:C30:0*1094:C70:0*1106:DL:0*1107:GL:0*1108:GLT:0*1095:S40:0*1096:S60:0*1097:S70:0*1098:S80:0*1099:S90:0*1100:V40:0*1101:V50:0*1102:V70:0*1103:V90:0*1104:XC70 or V70 Cross Country:0*1105:XC90:0'; models_array[65] = '1263: Regular Size Car:0*1109:GV:0*1110:GVC:0*1111:GVL:0*1112:GVS:0*1113:GVX:0'; var datePickerDivID = "datepicker"; var iFrameDivID = "datepickeriframe"; var just_set = false; var dayArrayShort = new Array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'); var dayArrayMed = new Array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); var dayArrayLong = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); var monthArrayShort = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); var monthArrayMed = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'); var monthArrayLong = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); // these variables define the date formatting we're expecting and outputting. // If you want to use a different format by default, change the defaultDateSeparator // and defaultDateFormat variables either here or on your HTML page. var defaultDateSeparator = "-"; // common values would be "/" or "." var defaultDateFormat = "ymd" // valid values are "mdy", "dmy", and "ymd" var dateSeparator = defaultDateSeparator; var dateFormat = defaultDateFormat; function update_model_index() { // alert('update_model_index : ' + document.getElementById('VehicleModelID').selectedIndex); var car_make_index_for_model = document.getElementById('car_make_id').selectedIndex; Set_Cookie(car_make_index_for_model + '_car_model_index', document.getElementById('VehicleModelID').selectedIndex, '', '/', '', ''); update_hidden_model(); } function update_hidden_model() { if (document.getElementById('VehicleModelID') && document.getElementById('hidden_model_id')) { var model_index = document.getElementById('VehicleModelID').selectedIndex; document.getElementById('hidden_model_id').value = document.getElementById('VehicleModelID').options[model_index].value; var model_index_value = eval(document.getElementById('VehicleModelID').options[model_index].value); var required_specialized = 'requires_special_' + model_index_value if (document.getElementById(required_specialized)) { if (document.getElementById(required_specialized).value == 1) location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; } else if (model_index_value > 1279) location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; } else if (document.getElementById('VehicleModelID')) { model_index_value = eval(document.getElementById('VehicleModelID').options[model_index].value) if (document.getElementById(required_specialized)) { if (document.getElementById(required_specialized).value == 1) location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; } else if (eval(document.getElementById('VehicleModelID').options[model_index].value) > 1279) location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; } } function y2k(number) { return (number < 1000) ? number + 1900 : number; } function check_clear(input_control,default_name) { if (input_control.value == document.getElementById(default_name).value) input_control.value = ''; } function check_fill(input_control,default_name) { if (input_control.value == '') input_control.value = document.getElementById(default_name).value; input_control.value = trim(input_control.value); } function validateDate(newstring) { if (!newstring) { return false; } //valid characters for a Date var Chars = "0123456789/"; for (var i = 0; i < newstring.length; i++) { if (Chars.indexOf(newstring.charAt(i)) == -1) { return false; } } if(countInstances(newstring,'/')!=2) { return false; } var substrings = newstring.split('/'); if(!isDate(substrings[1],substrings[0],substrings[2]) ) { return false; } if(substrings[0].length<1 || substrings[1].length<1 || substrings[2].length<1 ) { return false; } return true; } function isDate (day,month,year) { // checks if date passed is valid // will accept dates in following format: // isDate(dd,mm,ccyy), or // isDate(dd,mm) - which defaults to the current year, or // isDate(dd) - which defaults to the current month and year. // Note, if passed the month must be between 1 and 12, and the // year in ccyy format. var today = new Date(); year = ((!year) ? y2k(today.getYear()):year); month = ((!month) ? today.getMonth():month-1); if (!day) return false; if(year < 1900 ) return false; if(year> 9999) return false; var test = new Date(year,month,day); if ( (y2k(test.getYear()) == year) && (month == test.getMonth()) && (day == test.getDate()) ) return true; else return false } function Message_window_popup(MessageText) { window.open('Window_message_popup.asp?'+MessageText,'MessageWindow','width=250,height=150,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=200,top=200'); } function ConfirmMe(Prompt_displayed) { Responseval = window.showModalDialog('Window_confirm_popup.asp?'+Prompt_displayed,'WindowName',"dialogHeight:150px; dialogWidth:250px; dialogTop:200px; dialogLeft:200px; edge:Raised; center:Yes; help: No; resizable: No; status: No;"); return Responseval; } function noenter() { // disallows form submission if enter is pressed in a text box return !(window.event && window.event.keyCode == 13); } function validEmail(str) { // validates email var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){return false} if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){return false} if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){return false} if (str.indexOf(at,(lat+1))!=-1){return false} if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){return false} if (str.indexOf(dot,(lat+2))==-1){return false} if (str.indexOf(" ")!=-1){return false} return true } function isValidEmail(str) { // validates email ...in another way var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(at,(lat+1))!=-1){ alert("You Have Entered an Invalid E-mail ID") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID") return false } return true } var newwindow; function openNewWin(url) // defines the parameters of a popup when a popup is utilized { newwindow=window.open(url,'name','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes'); if (window.focus) {newwindow.focus()} } function toggleElement(strParentId ,strId, strState) // 1 visible, 0 hidden { if(document.getElementById){ var elementRef = document.getElementById(strId); var x =document.getElementById(strParentId); var tt =findPosX(x) ; var ww =findPosY(x)+20; if((elementRef.style)&& (elementRef.style.visibility!=null)){ elementRef.style.visibility = strState; elementRef.style.left = tt + 'px'; elementRef.style.top = ww + 'px'; //adjustiFrame(strId); } } } function openWin4(URL,winName, intWidth, intHeight) { window.open(URL,"thewindow","toolbar=no,width=" + intWidth + ",height=" + intHeight + ",status=no,scrollbars=yes,resize=no,menubar=no"); } function adjustiFrame(layerName) // iframe code related to the javascript drop down menu { if (!document.getElementById(layerName + "-iframe")) { try{ var newNode = document.createElement("iFrame"); //newNode.injectInside(layerName + "-iframe"); newNode.setAttribute("id", layerName + "-iframe"); //newNode.setAttribute("src", "javascript:false;"); newNode.setAttribute("scrolling", "no"); newNode.setAttribute("frameborder", "0"); newNode.style.filter += "progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=4, Color='black', Positive='true')"; document.body.appendChild(newNode); } catch(e){} } iFrameDiv = document.getElementById(layerName + "-iframe"); var div = document.getElementById(layerName); try { iFrameDiv.style.position = "absolute"; iFrameDiv.style.width = div.offsetWidth; iFrameDiv.style.height = div.offsetHeight; iFrameDiv.style.top = div.style.top; iFrameDiv.style.left = div.style.left; iFrameDiv.style.zIndex = div.style.zIndex - 1; iFrameDiv.style.visibility = div.style.visibility; } catch(e) { } } function findPosX(obj) // code related to the javascript drop down menu that finds the position of a cell { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function findPosY(obj) // code related to the javascript drop down menu that finds the position of a cell { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } function showThisId(str) // shows a hidden object { if (document.getElementById(str)) document.getElementById(str).style.display = 'inline'; } function hideThisId(str) // hides a hidden object { if (document.getElementById(str)) document.getElementById(str).style.display = 'none'; } function getCheckedValue( strRB ){ var strTemp, i; i = 0; while (i < strRB.length ) { if ( strRB[i].checked ) strTemp = strRB[i].value; i++; } return strTemp; } function roundNum(num, dec) { var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); return result; } function stripCharsInBag (s, bag) { var i; var returnString = ""; for (i = 0; i < s.length; i++) { var c = s.charAt(i); if (bag.indexOf(c) == -1) returnString += c; } return returnString; } function stripCharsNotInBag (s, bag) { var i; var returnString = ""; for (i = 0; i < s.length; i++) { // Check that current character isn't whitespace. var c = s.charAt(i); if (bag.indexOf(c) != -1) returnString += c; } return returnString; } function countInstances(string, word) { var substrings = string.split(word); return substrings.length - 1; } var fNames = new Array('GetYourQuote','GetYourQuote2'); // Preload if (document.graphics) { var fFlipped = new Array(); for(i=0; i< fNames.length; i++) { fFlipped[i] = new Image(); fFlipped[i].src = "graphics/"+ fNames[i]+".gif"; } } function swap(s,n){ var el; if( n && document.graphics && document.graphics[n] ) el = document.graphics[n]; else if( event.srcElement && event.srcElement.src ) el = event.srcElement; if( el ) el.src = s; } function showMsg(str) { var strResponse; var strMsg = 'Please submit a custom quote request'; if(str == '1'){strMsg = 'You WILL qualify for a discount on multiple units, please call 1-800-665-5022 or submit an online quote request by clicking OK below.';} if(str == '2'){location.href='http://www.nationaltransportllc.com/request-specialized-quote.php';} if(str == '3'){strMsg = 'Because of the many variables connected with shipping your selection, we must give you a custom quote. Please call us at 1-800-665-5022, or submit an online quote by clicking OK below.';} //alert(strMsg); //strResponse= ConfirmThis(strMsg); // return(ConfirmThis(strMsg)); /* if(strResponse=='submit'){ return true; } else{ return false; } */ } function checkVehicle(str) { //Certain vehicle types require custom quotes var vehicleIndex = document.getElementById('reqdTypeOfVehicle').selectedIndex; var strVehicle = document.getElementById('reqdTypeOfVehicle').options[vehicleIndex].value; if(Right(strVehicle,1) == 0) { customQuote('2'); } } function ConfirmThis(Prompt_displayed) { //alert(Prompt_displayed); // Responseval = window.showModalDialog('custom_popup.php?'+Prompt_displayed,'WindowName',"dialogHeight:160px; dialogWidth:350px; dialogTop:200px; dialogLeft:200px; edge:Raised; center:Yes; help: No; resizable: No; status: No;"); //return Responseval; return(confirm(Prompt_displayed)); } function showThisId(str) { document.getElementById(str).style.display = 'inline'; } function hideThisId(str) { document.getElementById(str).style.display = 'none'; } function getUserSelections(str) { //This function will not var eleLoaded = document.getElementById("txtIsRunning"); //if form is not postback then these elements will exist if (eleLoaded != null){ if(getCheckedValue(document.forms[0].elements['vehicleRunning']) == 'No') {showThisId('txtIsRunning')} if(getCheckedValue(document.forms[0].elements['trailerType']) == 'Enclosed') {showThisId('txtTrailerType')} } } function resetSelections() { //will not run if form after form is submitted if (document.getElementById('car_make_id')) { if (document.getElementById('car_make_id').selectedIndex != 0) sendRequest(); update_hidden_model(); } if(document.getElementById('trailerTypeEnclosed')){ //document.getElementById('TypeOfVehicle').selectedIndex = 0; //document.getElementById('reqdFromLocationZip').value = document.getElementById('pickup_zip_default').value; //document.getElementById('reqdToLocationZip').value = document.getElementById('delivery_zip_default').value; if (document.getElementById('trailerTypeEnclosed').checked){showThisId('txtTrailerType')} if (document.getElementById('vehicleRunningNo').checked) {showThisId('txtIsRunning')} } } function set_model_cookie() { if (document.getElementById('car_make_id') && document.getElementById('VehicleModelID')) { var car_make_index_for_model = document.getElementById('car_make_id').selectedIndex; // alert('set_model_cookie : ' + document.getElementById('VehicleModelID').selectedIndex); Set_Cookie(car_make_index_for_model + '_car_model_index', document.getElementById('VehicleModelID').selectedIndex, '', '/', '', ''); // var divModels = document.getElementById("models_div"); // var car_model_select = divModels.innerHTML; // Set_Cookie(car_make_index_for_model + '_car_model_select', car_model_select, '', '/', '', ''); // alert(car_make_index_for_model + '-car_model_select'); // alert(car_model_select); // alert('cookies' + document.cookie) } } function init_NatStorage() { NatStorage = new Persist.Store('NatStore', { swf_path: 'flashStorage/persist.swf' }); } function check_cookie_values() { //will not run if form after form is submitted clearTimeout(loadTimeout); // if (Cookies == 'undefined' || Cookies == 'null') loadTimeout = setTimeout("check_cookie_values()",300); // alert('check_cookies'); try { if (document.getElementById('car_make_id')) { var car_make_index = Get_Cookie( 'car_make_index' ); if (car_make_index != null && car_make_index != 'undefined' && car_make_index != 'null') { //alert(car_make_index); document.getElementById('car_make_id').selectedIndex = car_make_index; if (document.getElementById('models_div')) { var car_model_select = Get_Cookie(car_make_index + '_car_model_select'); //alert(car_make_index + '-car_model_select'); //alert(car_model_select); if(car_model_select != null && car_model_select != 'undefined' && car_model_select != 'null') { var divModels = document.getElementById("models_div"); var divModelsSelect = divModels.innerHTML; var car_model_select_html = create_model_html(car_model_select) //alert(divModelsSelect); //alert(car_model_select_html); if (divModelsSelect != car_model_select_html) divModels.innerHTML = car_model_select_html; var car_model_index = Get_Cookie( car_make_index + '_car_model_index' ); //alert(car_model_index); if (car_model_index != null && car_model_index != 'undefined' && car_model_index != 'null') { //alert(car_make_index); if (document.getElementById('VehicleModelID') && document.getElementById('VehicleModelID').selectedIndex != car_model_index) { document.getElementById('VehicleModelID').selectedIndex = car_model_index; } } else { if (document.getElementById('VehicleModelID')) document.getElementById('VehicleModelID').selectedIndex = 0; } update_hidden_model(); //alert(car_model_select); sendRequestNoUpdate(); } else { // alert('sendRequest'); sendRequest(); } } } } } catch(e) { alert('check_cookie_values : ' + e.message); } if (document.getElementById('reqdFromLocationZip')) { var pickup_zip_value = Get_Cookie( 'pickup_zip' ); if (pickup_zip_value != null && pickup_zip_value != 'undefined' && pickup_zip_value != 'null') { //alert(car_make_index); document.getElementById('reqdFromLocationZip').value = pickup_zip_value; } } if (document.getElementById('FromCity')) { var pickup_city_value = Get_Cookie( 'pickup_city' ); if (pickup_city_value != null && pickup_city_value != 'undefined' && pickup_city_value != 'null') { //alert(car_make_index); document.getElementById('FromCity').value = pickup_city_value; } } if (document.getElementById('FromState')) { var pickup_state_index = Get_Cookie( 'pickup_state_index' ); if (pickup_state_index != null && pickup_state_index != 'undefined' && pickup_state_index != 'null') { //alert(car_make_index); document.getElementById('FromState').selectedIndex = pickup_state_index; } } if (document.getElementById('reqdToLocationZip')) { var delivery_zip_value = Get_Cookie( 'delivery_zip' ); if (delivery_zip_value != null && delivery_zip_value != 'undefined' && delivery_zip_value != 'null') { //alert(car_make_index); document.getElementById('reqdToLocationZip').value = delivery_zip_value; } } if (document.getElementById('ToCity')) { var delivery_city_value = Get_Cookie( 'delivery_city' ); if (delivery_city_value != null && delivery_city_value != 'undefined' && delivery_city_value != 'null') { //alert(car_make_index); document.getElementById('ToCity').value = delivery_city_value; } } if (document.getElementById('ToState')) { var delivery_state_index = Get_Cookie( 'delivery_state_index' ); if (delivery_state_index != null && delivery_state_index != 'undefined' && delivery_state_index != 'null') { //alert(car_make_index); document.getElementById('ToState').selectedIndex = delivery_state_index; } } if (document.getElementById('vehicleRunningNo')) { var running_check_value = Get_Cookie( 'running_check' ); if (running_check_value != null && running_check_value != 'undefined' && running_check_value != 'null') { //alert(car_make_index); if (running_check_value == 1) { document.getElementById('vehicleRunningNo').checked = 1; document.getElementById('vehicleRunningYes').checked = 0; showThisId('txtIsRunning'); } else { document.getElementById('vehicleRunningNo').checked = 0; document.getElementById('vehicleRunningYes').checked = 1; hideThisId('txtIsRunning'); } } } if (document.getElementById('trailerTypeOpen')) { var trailerType_value = Get_Cookie( 'enclosed_check' ); if (trailerType_value != null && trailerType_value != 'undefined' && trailerType_value != 'null') { //alert(car_make_index); if (trailerType_value == 1) { document.getElementById('trailerTypeEnclosed').checked = 1; document.getElementById('trailerTypeOpen').checked = 0; showThisId('txtTrailerType'); } else { document.getElementById('trailerTypeEnclosed').checked = 0; document.getElementById('trailerTypeOpen').checked = 1; hideThisId('txtTrailerType'); } } } } function setCheckedValue(radioObj, newValue) { if(!radioObj) return; var radioLength = radioObj.length; if(radioLength == undefined) { radioObj.checked = (radioObj.value == newValue.toString()); return; } for(var i = 0; i < radioLength; i++) { radioObj[i].checked = false; if(radioObj[i].value == newValue.toString()) { radioObj[i].checked = true; } } } function getCheckedValue( strRB ){ var strTemp, i; i = 0; while (i < strRB.length ) { if ( strRB[i].checked ) strTemp = strRB[i].value; i++; } return strTemp; } function specialRedirect() { location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; } function internationalRedirect() { location.href='http://www.nationaltransportllc.com/international-shipping.php'; } function customQuote(str) // if the user selects a specialized quote vehicle from the short quote form, a msg will popup. // clicking OK makes the message go away and load the request-specialized-quote.php page // clicking CANCEL makes the message go away and resets the short quote form. { if(showMsg(str) == true) { document.forms[0].action = 'http://www.nationaltransportllc.com/request-specialized-quote.php'; document.forms[0].submit(); } else{ hideThisId('txtIsrunning'); hideThisId('txtTrailerType'); resetSelections(str)} } function clearForm() { for (var i = 0; i-1) { if( strValue.length == 0 ) { alert("Please complete all required fields"); document.forms[1].elements[strName].focus(); isValidForm = false; return(isValidForm) } } } if (isValidEmail(emailID.value)==false){ emailID.value="" emailID.focus() isValidForm = false } if(isValidForm) { document.forms[1].submit(); } } function validateInternationalForm() { if (document.getElementById('TypeOfVehicle').value == '') { alert('Vehical Type Required'); document.getElementById('TypeOfVehicle').focus(); return(false); } if (document.getElementById('fromZip').value == '') { alert('From Zip Code Required'); document.getElementById('fromZip').focus(); return(false); } if (document.getElementById('toPort').value == '') { alert('To Country/Port Required'); document.getElementById('toPort').focus(); return(false); } if (document.getElementById('EmailAddress').value == '') { alert('Email Address Required'); document.getElementById('EmailAddress').focus(); return(false); } return(true); } function validateShortForm() // checks if the required fields have input on the short quote form. // if not, displays a message and puts the cursor in the missing field. // if so, submits the information and redirects to the online-instant-quote.php page { var customQuote = ''; try { if (document.getElementById('reqdTypeOfVehicle')) { var vehicleIndex = document.getElementById('reqdTypeOfVehicle').selectedIndex; if(vehicleIndex == 0) { alert('Please select a vehicle type'); document.getElementById('reqdTypeOfVehicle').focus(); isValidForm = false; return(isValidForm) } } if (document.getElementById('car_make_id')) { var car_makeIndex = document.getElementById('car_make_id').selectedIndex; if(car_makeIndex == 0) { alert('Please Select a Make'); document.getElementById('car_make_id').focus(); isValidForm = false; return(isValidForm) } } if (document.getElementById('VehicleModelID')) { var VehicleModelIndex = document.getElementById('VehicleModelID').selectedIndex; if(VehicleModelIndex == 0) { alert('Please Select a Model'); document.getElementById('VehicleModelID').focus(); isValidForm = false; return(isValidForm) } } var fromStateIndex = document.getElementById('FromState').selectedIndex; var strFromState = document.getElementById('FromState').options[fromStateIndex].value; var toStateIndex = document.getElementById('ToState').selectedIndex; var strToState = document.getElementById('ToState').options[toStateIndex].value; var toLocValue = trim(document.getElementById('reqdToLocationZip').value); var fromLocValue = trim(document.getElementById('reqdFromLocationZip').value); var toCity = trim(document.getElementById('ToCity').value); var fromCity = trim(document.getElementById('FromCity').value); } catch(e) { alert(e.message); } if(fromStateIndex == 0 && (!IsInt(fromLocValue) || fromLocValue.length != 5)) { alert('You must enter a valid 5 digit pickup zip code OR city AND state.'); document.getElementById('reqdFromLocationZip').focus(); isValidForm = false; return(isValidForm) } if(toStateIndex == 0 && (!IsInt(toLocValue) || toLocValue.length != 5)) { alert('You must enter a valid 5 digit delivery zip code OR city AND state.'); document.getElementById('reqdToLocationZip').focus(); isValidForm = false; return(isValidForm) } /* else if (toLocValue == fromLocValue) { alert('Please call us at 1-800-665-5022 to get this rate quote.'); return(false); } else if(fromLocValue == '' || fromLocValue == document.getElementById('pickup_zip_default').value) { alert('Please enter pickup location zip code'); document.getElementById('reqdFromLocationZip').focus(); isValidForm = false; return(isValidForm) } else if(toLocValue == '' || toLocValue == document.getElementById('delivery_zip_default').value) { alert('Please enter delivery location zip code'); document.getElementById('reqdToLocationZip').focus(); isValidForm = false; return(isValidForm) } else if (!IsInt(fromLocValue) || fromLocValue.length != 5) { alert('Please enter a valid zip code'); document.getElementById('reqdFromLocationZip').focus(); isValidForm = false; return(isValidForm) } else if (!IsInt(toLocValue) || toLocValue.length != 5) { alert('Please enter a valid zip code'); document.getElementById('reqdToLocationZip').focus(); isValidForm = false; return(isValidForm) } */ else { //document.forms[0].action = 'online-instant-quote.php'; document.forms[0].submit(); return(true) } if(strVehicle.indexOf('All Other') == 0) { // if(showMsg('2') == false) // { // return(false) // } // else // { location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; return(false) // } } else if(toLocVehicle.indexOf('Region') == 0 || fromLocVehicle.indexOf('Region') == 0) { // if(showMsg('3') == false) // { // return(false) // } // else // { location.href='http://www.nationaltransportllc.com/request-specialized-quote.php'; return(false) // } } else { document.forms[0].action = 'http://www.nationaltransportllc.com/online-instant-quote.php'; document.forms[0].submit(); } } function Right(str, n) { if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } } function IsNumeric(sText) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } function IsInt(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); } function ltrim(stringToTrim) { return stringToTrim.replace(/^\s+/,""); } function rtrim(stringToTrim) { return stringToTrim.replace(/\s+$/,""); } /** This is the main function you'll call from the onClick event of a button. Normally, you'll have something like this on your HTML page: Start Date: That will cause the datepicker to be displayed beneath the StartDate field and any date that is chosen will update the value of that field. If you'd rather have the datepicker display beneath the button that was clicked, you can code the button like this: So, pretty much, the first argument (dateFieldName) is a string representing the name of the field that will be modified if the user picks a date, and the second argument (displayBelowThisObject) is optional and represents an actual node on the HTML document that the datepicker should be displayed below. In version 1.1 of this code, the dtFormat and dtSep variables were added, allowing you to use a specific date format or date separator for a given call to this function. Normally, you'll just want to set these defaults globally with the defaultDateSeparator and defaultDateFormat variables, but it doesn't hurt anything to add them as optional parameters here. An example of use is: This would display the datepicker beneath the StartDate field (because the displayBelowThisObject parameter was false), and update the StartDate field with the chosen value of the datepicker using a date format of dd.mm.yyyy */ function displayDatePicker(dateFieldName, displayBelowThisObject, dtFormat, dtSep) { var targetDateField = document.getElementById(dateFieldName); var body_element = document.getElementById('main_body'); just_set = true; body_element.onclick = close_date; // if we weren't told what node to display the datepicker beneath, just display it // beneath the date field we're updating if (!displayBelowThisObject) displayBelowThisObject = targetDateField; // if a date separator character was given, update the dateSeparator variable if (dtSep) dateSeparator = dtSep; else dateSeparator = defaultDateSeparator; // if a date format was given, update the dateFormat variable if (dtFormat) dateFormat = dtFormat; else dateFormat = defaultDateFormat; var x = displayBelowThisObject.offsetLeft; var y = displayBelowThisObject.offsetTop + displayBelowThisObject.offsetHeight ; // deal with elements inside tables and such var parent = displayBelowThisObject; while (parent.offsetParent) { parent = parent.offsetParent; x += parent.offsetLeft; y += parent.offsetTop ; } drawDatePicker(targetDateField, x, y); } /** Draw the datepicker object (which is just a table with calendar elements) at the specified x and y coordinates, using the targetDateField object as the input tag that will ultimately be populated with a date. This function will normally be called by the displayDatePicker function. */ function drawDatePicker(targetDateField, x, y) { var dt = getFieldDate(targetDateField.value ); // the datepicker table will be drawn inside of a
with an ID defined by the // global datePickerDivID variable. If such a div doesn't yet exist on the HTML // document we're working with, add one. if (!document.getElementById(datePickerDivID)) { // don't use innerHTML to update the body, because it can cause global variables // that are currently pointing to objects on the page to have bad references //document.body.innerHTML += "
"; var newNode = document.createElement("div"); newNode.setAttribute("id", datePickerDivID); newNode.setAttribute("class", "dpDiv"); newNode.setAttribute("style", "visibility: hidden;"); document.body.appendChild(newNode); } // move the datepicker div to the proper x,y coordinate and toggle the visiblity var pickerDiv = document.getElementById(datePickerDivID); pickerDiv.style.position = "absolute"; pickerDiv.style.left = x + "px"; pickerDiv.style.top = y + "px"; pickerDiv.style.visibility = (pickerDiv.style.visibility == "visible" ? "hidden" : "visible"); pickerDiv.style.display = (pickerDiv.style.display == "block" ? "none" : "block"); pickerDiv.style.zIndex = 10000; // draw the datepicker table refreshDatePicker(targetDateField.name, dt.getFullYear(), dt.getMonth(), dt.getDate()); } /** This is the function that actually draws the datepicker calendar. */ function refreshDatePicker(dateFieldName, year, month, day) { // if no arguments are passed, use today's date; otherwise, month and year // are required (if a day is passed, it will be highlighted later) var thisDay = new Date(); if ((month >= 0) && (year > 0)) { thisDay = new Date(year, month, 1); } else { day = thisDay.getDate(); thisDay.setDate(1); } // the calendar will be drawn as a table // you can customize the table elements with a global CSS style sheet, // or by hardcoding style and formatting elements below var crlf = "\r\n"; var TABLE = "" + crlf; var xTABLE = "
" + crlf; var TR = ""; var TR_title = ""; var TR_days = ""; var TR_todaybutton = ""; var xTR = "" + crlf; var TD = ""; if (dayNum == day) html += TD_selected + TD_onclick + DIV_selected + dayNum + xDIV + xTD; else html += TD + TD_onclick + dayNum + xTD; // if this is a Saturday, start a new row if (thisDay.getDay() == 6) html += xTR + TR; // increment the day thisDay.setDate(thisDay.getDate() + 1); } while (thisDay.getDate() > 1) // fill in any trailing blanks if (thisDay.getDay() > 0) { for (i = 6; i > thisDay.getDay(); i--) html += TD + " " + xTD; } html += xTR; // add a button to allow the user to easily return to today, or close the calendar var today = new Date(); var todayString = "Today is " + dayArrayMed[today.getDay()] + ", " + monthArrayMed[ today.getMonth()] + " " + today.getDate(); html += TR_todaybutton + TD_todaybutton; html += " "; html += ""; html += xTD + xTR; // and finally, close the table html += xTABLE; document.getElementById(datePickerDivID).innerHTML = html; // add an "iFrame shim" to allow the datepicker to display above selection lists //adjustiFrame(); } /** Convenience function for writing the code for the buttons that bring us back or forward a month. */ function getButtonCode(dateFieldName, dateVal, adjust, label) { var newMonth = (dateVal.getMonth () + adjust) % 12; var newYear = dateVal.getFullYear() + parseInt((dateVal.getMonth() + adjust) / 12); if (newMonth < 0) { newMonth += 12; newYear += -1; } return ""; } /** Convert a JavaScript Date object to a string, based on the dateFormat and dateSeparator variables at the beginning of this script library. */ function getDateString(dateVal) { var dayString = "00" + dateVal.getDate(); var monthString = "00" + (dateVal.getMonth()+1); dayString = dayString.substring(dayString.length - 2); monthString = monthString.substring(monthString.length - 2); switch (dateFormat) { case "dmy" : return dayString + dateSeparator + monthString + dateSeparator + dateVal.getFullYear(); case "ymd" : return dateVal.getFullYear() + dateSeparator + monthString + dateSeparator + dayString; case "mdy" : default : return monthString + dateSeparator + dayString + dateSeparator + dateVal.getFullYear(); } } /** Convert a string to a JavaScript Date object. */ function getFieldDate(dateString) { var dateVal; var dArray; var d, m, y; try { dArray = splitDateString(dateString); if (dArray) { switch (dateFormat) { case "dmy" : d = parseInt(dArray[0], 10); m = parseInt(dArray[1], 10) - 1; y = parseInt(dArray[2], 10); break; case "ymd" : d = parseInt(dArray[2], 10); m = parseInt(dArray[1], 10) - 1; y = parseInt(dArray[0], 10); break; case "mdy" : default : d = parseInt(dArray[1], 10); m = parseInt(dArray[0], 10) - 1; y = parseInt(dArray[2], 10); break; } dateVal = new Date(y, m, d); } else if (dateString) { dateVal = new Date(dateString); } else { dateVal = new Date(); } } catch(e) { dateVal = new Date(); } return dateVal; } /** Try to split a date string into an array of elements, using common date separators. If the date is split, an array is returned; otherwise, we just return false. */ function splitDateString(dateString) { var dArray; if (dateString.indexOf("/") >= 0) dArray = dateString.split("/"); else if (dateString.indexOf(".") >= 0) dArray = dateString.split("."); else if (dateString.indexOf("-") >= 0) dArray = dateString.split("-"); else if (dateString.indexOf("\\") >= 0) dArray = dateString.split("\\"); else dArray = false; return dArray; } /** Update the field with the given dateFieldName with the dateString that has been passed, and hide the datepicker. If no dateString is passed, just close the datepicker without changing the field value. Also, if the page developer has defined a function called datePickerClosed anywhere on the page or in an imported library, we will attempt to run that function with the updated field as a parameter. This can be used for such things as date validation, setting default values for related fields, etc. For example, you might have a function like this to validate a start date field: function datePickerClosed(dateField) { var dateObj = getFieldDate(dateField.value); var today = new Date(); today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); if (dateField.name == "StartDate") { if (dateObj < today) { // if the date is before today, alert the user and display the datepicker again alert("Please enter a date that is today or later"); dateField.value = ""; document.getElementById(datePickerDivID).style.visibility = "visible"; adjustiFrame(); } else { // if the date is okay, set the EndDate field to 7 days after the StartDate dateObj.setTime(dateObj.getTime() + (7 * 24 * 60 * 60 * 1000)); var endDateField = document.getElementsByName ("EndDate").item(0); endDateField.value = getDateString(dateObj); } } } */ function updateDateField(dateFieldName, dateString) { var targetDateField = document.getElementsByName (dateFieldName).item(0); if (dateString) targetDateField.value = dateString; var pickerDiv = document.getElementById(datePickerDivID); pickerDiv.style.visibility = "hidden"; pickerDiv.style.display = "none"; //adjustiFrame(); targetDateField.focus(); // after the datepicker has closed, optionally run a user-defined function called // datePickerClosed, passing the field that was just updated as a parameter // (note that this will only run if the user actually selected a date from the datepicker) if ((dateString) && (typeof(datePickerClosed) == "function")) datePickerClosed(targetDateField); } /** Use an "iFrame shim" to deal with problems where the datepicker shows up behind selection list elements, if they're below the datepicker. The problem and solution are described at: http://dotnetjunkies.com/WebLog/jking/archive/2003/07/21/488.aspx http://dotnetjunkies.com/WebLog/jking/archive/2003/10/30/2975.aspx */ function adjustiFrame(pickerDiv, iFrameDiv) { // we know that Opera doesn't like something about this, so if we // think we're using Opera, don't even try var is_opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1); if (is_opera) return; // put a try/catch block around the whole thing, just in case try { if (!document.getElementById(iFrameDivID)) { // don't use innerHTML to update the body, because it can cause global variables // that are currently pointing to objects on the page to have bad references //document.body.innerHTML += "