if (document.images)
{
  preload_image_object = new Image();
  // set image url
  image_url = new Array();

  image_url[0] = "http://www.autosurgery.co.uk/images/main_logo.jpg";
  image_url[1] = "http://www.autosurgery.co.uk/images/drwheels.jpg";
  image_url[2] = "http://www.autosurgery.co.uk/images/drchipsandscuffs.jpg";
  image_url[3] = "http://www.autosurgery.co.uk/images/drdents.jpg";
  image_url[4] = "http://www.autosurgery.co.uk/images/bigdivbg1.jpg";  
  image_url[5] = "http://www.autosurgery.co.uk/images/smalldivbg_a.jpg";  
  image_url[6] = "http://www.autosurgery.co.uk/images/smalldivbg2_a.jpg";  
  image_url[7] = "http://www.autosurgery.co.uk/images/smalldivbg.jpg";  
  image_url[8] = "http://www.autosurgery.co.uk/images/tick.jpg";
  image_url[9] = "http://www.autosurgery.co.uk/images/tick1.jpg";  

  var i = 0;
  for(i=0; i<=image_url.length; i++) 
    preload_image_object.src = image_url[i];
}

//------------------CAR MANUFACTURER DD's-------------------------------------------------
      function drawmanus(objForm)
      {
        var manu = new Array();
        
          manu[0] = '--';
          manu[1] = 'AC';
          manu[2] = 'AIXAM';
          manu[3] = 'ALFA ROMEO';
          manu[4] = 'ALVIS';        
          manu[5] = 'ASIA';
          manu[6] = 'ASTON MARTIN';
          manu[7] = 'AUDI';
          manu[8] = 'AUSTIN';
          manu[9] = 'BENTLEY';
          manu[10] = 'BMW';
          manu[11] = 'BRISTOL';
          manu[12] = 'BUICK';
          manu[13] = 'CADILLAC';
          manu[14] = 'CATERHAM';
          manu[15] = 'CHEVROLET';
          manu[16] = 'CHRYSLER';
          manu[17] = 'CITROEN';
          manu[18] = 'COLEMAN MILNE';
          manu[19] = 'DAEWOO';
          manu[20] = 'DAIHATSU';
          manu[21] = 'DAIMLER';
          manu[22] = 'DATSUN';
          manu[23] = 'DAX';
          manu[24] = 'DE TOMASO';
          manu[25] = 'DELOREAN';
          manu[26] = 'DODGE';
          manu[27] = 'FERRARI';
          manu[28] = 'FIAT';
          manu[29] = 'FORD';
          manu[30] = 'FSO';
          manu[31] = 'GINETTA';
          manu[32] = 'GMC';
          manu[33] = 'HILLMAN';
          manu[34] = 'HOLDEN';
          manu[35] = 'HONDA';
          manu[36] = 'HUMMER';
          manu[37] = 'HYUNDAI';
          manu[38] = 'INFINITI';
          manu[39] = 'ISUZU';
          manu[40] = 'JAGUAR';
          manu[41] = 'JEEP';
          manu[42] = 'JENSON';
          manu[43] = 'KIA';
          manu[44] = 'KOENIGSEGG';
          manu[45] = 'LADA';
          manu[46] = 'LAMBORGHINI';
          manu[47] = 'LANCIA';
          manu[48] = 'LAND ROVER';
          manu[49] = 'LEXUS';
          manu[50] = 'LIGIER';
          manu[51] = 'LINCOLN';
          manu[52] = 'LOTUS';
          manu[53] = 'MAHINDRA';
          manu[54] = 'MARCOS';
          manu[55] = 'MASERATI';
          manu[56] = 'MAYBACH';
          manu[57] = 'MAZDA';
          manu[58] = 'MACLAREN';
          manu[59] = 'MERCEDES-BENZ';
          manu[60] = 'MERCURY';
          manu[61] = 'MG';
          manu[62] = 'MICROCAR';
          manu[63] = 'MINI';
          manu[64] = 'MITSUBISHI';
          manu[65] = 'MITSUOKA';
          manu[66] = 'MORGAN';
          manu[67] = 'MORRIS';
          manu[68] = 'NISSAN';
          manu[69] = 'NOBLE';
          manu[70] = 'OPEL';
          manu[71] = 'PAGANI';
          manu[72] = 'PANTHER';
          manu[73] = 'PERODUA';
          manu[74] = 'PEUGEOT';
          manu[75] = 'PILGRIM';
          manu[76] = 'PLYMOUTH';
          manu[77] = 'PONTIAC';
          manu[78] = 'PORSCHE';
          manu[79] = 'PROTON';
          manu[80] = 'RELIANT';
          manu[81] = 'RENAULT';
          manu[82] = 'RILEY';
          manu[83] = 'ROLLS ROYCE';
          manu[84] = 'ROVER';
          manu[85] = 'SAAB';
          manu[86] = 'SEAT';
          manu[87] = 'SINGER';
          manu[88] = 'SKODA';
          manu[89] = 'SMART';
          manu[90] = 'SSANGYONG';
          manu[91] = 'SUBARU';
          manu[92] = 'SUNBEAM';
          manu[93] = 'SUZUKI';
          manu[94] = 'TALBOT';
          manu[95] = 'TATA';
          manu[96] = 'TOYOTA';
          manu[97] = 'TRIUMPH';
          manu[98] = 'TVR';
          manu[99] = 'ULTIMA';
          manu[100] = 'VAUXHALL';
          manu[101] = 'VOLKSWAGEN';
          manu[102] = 'VOLVO';
          manu[103] = 'WESTFIELD';
          manu[104] = 'WOLSELEY';
          manu[105] = 'YUGO';

       
        for(var i=0;i<manu.length;i++)
        {
          objForm.selManufacturer.options[i] = new Option(manu[i],manu[i]);
        }  

      }
      


      function drawmodels(prmManu,objForm)
      {
        var model = new Array();
       
        //-----first initialise the model select list...
        objForm.model.options.length = 1;
        objForm.model.options[0] = new Option('--','--');


        switch(prmManu.toUpperCase())
        {
          case "AC":
            model[0] = "ACE";
            model[1] = "COBRA";
            model[2] = "MKV";
            model[3] = "SHELBY";
            model[4] = "SUPERBLOWER";
         
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              

            break;

          case "AIXAM":
            model[0] = "400";
            model[1] = "500";
            model[2] = "500.5";
            model[3] = "MAC 500";
            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
            
            break;

          case "ALFA ROMEO":
            model[0] = "145";
            model[1] = "146";
            model[2] = "147";            
            model[3] = "155";
            model[4] = "156";
            model[5] = "164";            
            model[6] = "166";
            model[7] = "33";            
            model[8] = "75";
            model[9] = "BRERA";
            model[10] = "GUILIA";            
            model[11] = "ALPHASUD";                              
            model[12] = "GT";
            model[13] = "GTV";                              
            model[14] = "RZ";
            model[15] = "SPIDER";                              
            model[16] = "SPORTWAGON";
            model[17] = "SZ";                              
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              

            break;   

          case "ALVIS":
            model[0] = "TD21";
            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
            
            break;

          case "ASIA":
            model[0] = "ROCSTA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              

            break;            

          case "ASTON MARTIN":
            model[0] = "DB4";
            model[1] = "DB5";
            model[2] = "DB6";            
            model[3] = "DB7";
            model[4] = "DB9";
            model[5] = "DBS";            
            model[6] = "LAGONDA";
            model[7] = "V8";            
            model[8] = "VANQUISH";
            model[9] = "VANTAGE";                              
            model[10] = "MIRAGE";
            model[11] = "VOLANTE";                              
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              

            break; 
          case "AUDI":
            model[0] = "100";
            model[1] = "100 AVANT";
            model[2] = "200";            
            model[3] = "80";
            model[4] = "90";
            model[5] = "A2";            
            model[6] = "A3";
            model[7] = "A4";            
            model[8] = "A4 AVANT";
            model[9] = "A6";                              
            model[10] = "A6 AVANT";
            model[11] = "A8";
            model[12] = "ALLROAD";
            model[13] = "AVANT";
            model[14] = "CABRIOLET";
            model[15] = "CONVERTIBLE";
            model[16] = "COUPE";
            model[17] = "QUATTRO";            
            model[18] = "RS2";
            model[19] = "RS4 AVANT";
            model[20] = "RS6";
            model[21] = "S2";            
            model[22] = "S3";
            model[23] = "S4";
            model[24] = "S4 AVANT";
            model[25] = "S6";            
            model[26] = "S6 AVANT";
            model[27] = "S8";
            model[28] = "TT";
            model[29] = "V8";    
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "AUSTIN":
            model[0] = "A35";
            model[1] = "ALLEGRO";
            model[2] = "HEALEY";            
            model[3] = "MAESTRO";
            model[4] = "MAXI";
            model[5] = "METRO";            
            model[6] = "MINI";
            model[7] = "MONTEGO";            
            model[8] = "PRINCESS";
            model[9] = "SEVEN";             
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
            
            break;
          case "BENTLEY":
            model[0] = "ARNAGE";
            model[1] = "AZURE";
            model[2] = "BROOKLANDS";            
            model[3] = "CONTINENTAL";
            model[4] = "CORNICHE";
            model[5] = "EIGHT";            
            model[6] = "MULSANNE";
            model[7] = "R-TYPE";            
            model[8] = "SERIES I";
            model[9] = "SERIES II";             
            model[10] = "SERIES III";
            model[11] = "T SERIES";
            model[12] = "TURBO R";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "BMW":
            model[0] = "1 SERIES";
            model[1] = "1602";
            model[2] = "2002";            
            model[3] = "3 SERIES";
            model[4] = "5 SERIES";
            model[5] = "6 SERIES";            
            model[6] = "7 SERIES";
            model[7] = "8 SERIES";            
            model[8] = "ALPINA";
            model[9] = "CSA";             
            model[10] = "M COUPE";
            model[11] = "M ROADSTAR";
            model[12] = "M3";            
            model[13] = "M5";
            model[14] = "M6";
            model[15] = "X3";            
            model[16] = "X5";
            model[17] = "Z1";            
            model[18] = "Z3";
            model[19] = "Z4";                               
            model[20] = "Z8";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
            break;            
          case "BRISTOL":
            model[0] = "412";
            model[1] = "BLENHEIM";
            model[2] = "FIGHTER";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "BUICK":
            model[0] = "LE SABRE";
            model[1] = "PARK AVENUE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "CADILLAC":
            model[0] = "CTS";
            model[1] = "ELDORADO";
            model[2] = "ESCALADE";            
            model[3] = "FLEETWOOD";
            model[4] = "SEVILLE";
            model[5] = "SRX";            
            model[6] = "XLR";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "CATERHAM":
            model[0] = "SUPER SEVEN";
            model[1] = "SUPER SPRINT";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "CHEVROLET":
            model[0] = "ASTRO";
            model[1] = "AVALANCHE";
            model[2] = "BLAZER";            
            model[3] = "CAMARO";
            model[4] = "COLORADO";
            model[5] = "CORVETTE";            
            model[6] = "GMC";
            model[7] = "KALOS";            
            model[8] = "LACETTI";
            model[9] = "LUMINA";             
            model[10] = "MATIZ";
            model[11] = "S10";
            model[12] = "SILVERADO";            
            model[13] = "SSR";
            model[14] = "SUBURBAN";
            model[15] = "TACUMA";            
            model[16] = "TAHOE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "CHRYSLER":
            model[0] = "300C";
            model[1] = "CHEROKEE";
            model[2] = "CROSSFIRE";            
            model[3] = "GRAND CHEROKEE";
            model[4] = "GRAND VOYAGER";
            model[5] = "JEEP";            
            model[6] = "LE BARON";
            model[7] = "NEON";            
            model[8] = "PROWLER";
            model[9] = "PT CRUISER";             
            model[10] = "SEBRING";
            model[11] = "VIPER";
            model[12] = "VOYAGER";            
            model[13] = "WRANGLER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "CITROEN":
            model[0] = "2 CV";
            model[1] = "AX";
            model[2] = "BERLINGO";            
            model[3] = "BX";
            model[4] = "C2";
            model[5] = "C3";            
            model[6] = "C4";
            model[7] = "C5";            
            model[8] = "C8";
            model[9] = "CX";             
            model[10] = "DS";
            model[11] = "SAFARI";
            model[12] = "SAXO";            
            model[13] = "SYNERGIE";
            model[14] = "VISA";
            model[15] = "XANTIA";            
            model[16] = "XM";
            model[17] = "XSARA";            
            model[18] = "XSARA PICASSO";
            model[19] = "ZX";                               
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "COLEMAN MILNE":
            model[0] = "DORCHESTER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "DAEWOO":
            model[0] = "ESPERO";
            model[1] = "KALOS";
            model[2] = "KORANDO";            
            model[3] = "LACETTI";
            model[4] = "LANOS";
            model[5] = "LEGANZA";            
            model[6] = "MATIZ";
            model[7] = "MUSSO";            
            model[8] = "NEXIA";
            model[9] = "NUBIRA";             
            model[10] = "TACUMA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "DAIHATSU":
            model[0] = "APPLAUSE";
            model[1] = "CHARADE";
            model[2] = "COPEN";            
            model[3] = "CUORE";
            model[4] = "FOURTRAK";
            model[5] = "GRAND MOVE";            
            model[6] = "HIJET";
            model[7] = "MIRA";            
            model[8] = "MOVE";
            model[9] = "SIRION";             
            model[10] = "SPORTRAK";
            model[11] = "TERIOS";
            model[12] = "YRV";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "DAIMLER":
            model[0] = "DOUBLE SIX";
            model[1] = "EMPRESS";
            model[2] = "LIMOUSINE";            
            model[3] = "SALOON";
            model[4] = "SOVEREIGN";
            model[5] = "SUPER V8";            
            model[6] = "V8";
            model[7] = "XJ SERIES";            
            model[8] = "XJ12";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "DATSUN":
            model[0] = "PATROL";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "DAX":
            model[0] = "RUSH";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "DE TOMASO":
            model[0] = "PANTRA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "DELOREAN":
            model[0] = "DMC-12";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "DODGE":
            model[0] = "DAKOTA";
            model[1] = "DURANGO";
            model[2] = "MAGNUM";            
            model[3] = "RAM";
            model[4] = "STEALTH";
            model[5] = "VIPER";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;           
          case "FERRARI":
            model[0] = "246";
            model[1] = "250";
            model[2] = "288";            
            model[3] = "308";
            model[4] = "328";
            model[5] = "330";            
            model[6] = "348";
            model[7] = "360";            
            model[8] = "365";
            model[9] = "400";             
            model[10] = "412";
            model[11] = "456";
            model[12] = "512";            
            model[13] = "550";
            model[14] = "575M";
            model[15] = "612";            
            model[16] = "DAYTONA";
            model[17] = "DINO";            
            model[18] = "ENZO";
            model[19] = "F355";                               
            model[20] = "F40";
            model[21] = "F430";
            model[22] = "MONDIAL";
            model[23] = "TESTAROSSA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "FIAT":
            model[0] = "124";
            model[1] = "126";
            model[2] = "130";            
            model[3] = "500";
            model[4] = "BARCHETTA";
            model[5] = "BRAVA";            
            model[6] = "BRAVO";
            model[7] = "CINQUECENTO";            
            model[8] = "COUPE";
            model[9] = "CROMA";             
            model[10] = "DOBLO";
            model[11] = "IDEA";
            model[12] = "MAREA";            
            model[13] = "MULTIPLA";
            model[14] = "PANDA";
            model[15] = "PUNTO";            
            model[16] = "SEICENTO";
            model[17] = "SPIDER";            
            model[18] = "STILO";
            model[19] = "TEMPRA";                               
            model[20] = "TIPO";
            model[21] = "ULYSEE";
            model[22] = "UNO";
            model[23] = "X10";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "FORD":
            model[0] = "CAPRI";
            model[1] = "COURTINA";
            model[2] = "COUGAR";            
            model[3] = "ECONOLINE";
            model[4] = "ESCORT";
            model[5] = "EXCURSION";            
            model[6] = "EXPLORER";
            model[7] = "F150";            
            model[8] = "F250";
            model[9] = "F350";             
            model[10] = "FIESTA";
            model[11] = "FOCUS";
            model[12] = "FOCUS C-MAX";            
            model[13] = "FUSION";
            model[14] = "GALAXY";
            model[15] = "GRANADA";            
            model[16] = "GT";
            model[17] = "KA";            
            model[18] = "MAVERICK";
            model[19] = "MODEL T";                               
            model[20] = "MONDEO";
            model[21] = "MUSTANG";
            model[22] = "ORION";            
            model[23] = "PILOT V8";
            model[24] = "PROBE";
            model[25] = "PUMA";            
            model[26] = "RANGER";
            model[27] = "RS2000";            
            model[28] = "SAPPHIRE";
            model[29] = "SCORPIO";             
            model[30] = "SHERROD";
            model[31] = "SIERRA";
            model[32] = "STREET KA";            
            model[33] = "THUNDERBIRD";
            model[34] = "WINDSTAR";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "FSO":
            model[0] = "CARO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                
          case "GINETTA":
            model[0] = "G-SERIES";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                          
          case "GMC":
            model[0] = "SIERRA";
            model[1] = "YUKON";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          case "HILLMAN":
            model[0] = "IMP";
            model[1] = "MINX";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                
          case "HOLDEN":
            model[0] = "HSV";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                               
          case "HONDA":
            model[0] = "ACCORD";
            model[1] = "AERODECK";
            model[2] = "BALLADE";            
            model[3] = "BEAT";
            model[4] = "CIVIC";
            model[5] = "CONCERTO";            
            model[6] = "CR-V";
            model[7] = "CR-X";            
            model[8] = "FR-V";
            model[9] = "HR-V";             
            model[10] = "INSIGHT";
            model[11] = "INTEGRA";
            model[12] = "JAZZ";            
            model[13] = "LEGEND";
            model[14] = "LOGO";
            model[15] = "NSX";            
            model[16] = "ODYSSEY";
            model[17] = "PRELUDE";            
            model[18] = "S2000";
            model[19] = "SHUTTLE";                               
            model[20] = "STEPWAGON";
            model[21] = "STREAM";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "HUMMER":
            model[0] = "H1";
            model[1] = "H2";
            model[2] = "H3";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "HYUNDAI":
            model[0] = "ACCENT";
            model[1] = "AMICA";
            model[2] = "ATOZ";            
            model[3] = "COUPE";
            model[4] = "ELANTRA";
            model[5] = "GETZ";            
            model[6] = "LANTRA";
            model[7] = "MATRIX";            
            model[8] = "PONY";
            model[9] = "S-COUPE";             
            model[10] = "SANTA FE";
            model[11] = "SONATA";
            model[12] = "STELLAR";            
            model[13] = "TERRACAN";
            model[14] = "TRAJET";
            model[15] = "TUCSON";            
            model[16] = "X2";
            model[17] = "XG30";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          case "INFINITI":
            model[0] = "FX";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "ISUZU":
            model[0] = "BIGHORN";
            model[1] = "D-MAX";
            model[2] = "PIAZZA";            
            model[3] = "RODEO";
            model[4] = "TF";
            model[5] = "TROOPER";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                          
          case "JAGUAR":
            model[0] = "E-TYPE";
            model[1] = "MARK I";
            model[2] = "MARK II";            
            model[3] = "S-TYPE";
            model[4] = "SOVEREIGN";
            model[5] = "V8";            
            model[6] = "X-TYPE";
            model[7] = "XJ SERIES";            
            model[8] = "XJS";
            model[9] = "XK";             
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "JEEP":
            model[0] = "CHEROKEE";
            model[1] = "GRAND CHEROKEE";
            model[2] = "RENEGADE";            
            model[3] = "WRANGLER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "JENSON":
            model[0] = "INTERCEPTOR";
            model[1] = "S-V8";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "KIA":
            model[0] = "CARENS";
            model[1] = "CERATO";
            model[2] = "CLARUS";            
            model[3] = "MAGENTIS";
            model[4] = "MENTOR";
            model[5] = "PICANTO";            
            model[6] = "PRIDE";
            model[7] = "RIO";            
            model[8] = "SEDONA";
            model[9] = "SHUMA";             
            model[10] = "SORENTO";
            model[11] = "SPORTAGE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "KOENIGSEGG":
            model[0] = "CC";
            model[1] = "CCR";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "LADA":
            model[0] = "NIVA";
            model[1] = "RIVA";
            model[2] = "SAMARA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                          
          case "LAMBORGHINI":
            model[0] = "COUNTACH";
            model[1] = "DIABLO";
            model[2] = "GALLARDO";            
            model[3] = "LM";
            model[4] = "MURCIELAGO";
            model[5] = "URRACO";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;           
          case "LANCIA":
            model[0] = "BETA";
            model[1] = "DEDRA";
            model[2] = "DELTA";            
            model[3] = "MONTE CARLO";
            model[4] = "PRISMA";
            model[5] = "THEMA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          case "LAND ROVER":
            model[0] = "DEFENDER";
            model[1] = "DISCOVERY";
            model[2] = "FREELANDER";            
            model[3] = "LIGHTWEIGHT";
            model[4] = "RANGE ROVER";
            model[5] = "SERIES II";            
            model[6] = "SERIES III";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "LEXUS":
            model[0] = "GS";
            model[1] = "IS";
            model[2] = "LS";            
            model[3] = "RX";
            model[4] = "SC";
            model[5] = "SOARER";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "LIGIER":
            model[0] = "AMBRA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "LINCOLN":
            model[0] = "BLACKWOOD";
            model[1] = "LS";
            model[2] = "NAVIGATOR";            
            model[3] = "TOWN CAR";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "LOTUS":
            model[0] = "340R";
            model[1] = "CARLTON";
            model[2] = "ECLAT";            
            model[3] = "ELAN";
            model[4] = "ELISE";
            model[5] = "ELITE";            
            model[6] = "ESPRIT";
            model[7] = "EXCEL";            
            model[8] = "EXIGE";
            model[9] = "XI";             
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "MAHINDRA":
            model[0] = "INDIAN";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;             
          case "MARCOS":
            model[0] = "LM";
            model[1] = "MANTARA";
            model[2] = "MANTARAY";            
            model[3] = "MANTIS";
            model[4] = "MANTULA";
            model[5] = "MARTINA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "MASERATI":
            model[0] = "320";
            model[1] = "3200";
            model[2] = "4200";            
            model[3] = "BITURBO";
            model[4] = "CONVERTIBLE";
            model[5] = "GHIBLI";            
            model[6] = "GRANSPORT";
            model[7] = "QUATTROPORTE";            
            model[8] = "SPYDER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                        
          case "MAYBACH":
            model[0] = "57";
            model[1] = "62";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                              
          case "MAZDA":
            model[0] = "121";
            model[1] = "323";
            model[2] = "626";            
            model[3] = "B-SERIES";
            model[4] = "BONGO";
            model[5] = "DEMIO";            
            model[6] = "EUNOS";
            model[7] = "MAZDA 2";            
            model[8] = "MAZDA 3";
            model[9] = "MAZDA 6";             
            model[10] = "MPV";
            model[11] = "MX-3";
            model[12] = "MX-5";            
            model[13] = "MX-6";
            model[14] = "PREMACY";
            model[15] = "RX-7";            
            model[16] = "RX-8";
            model[17] = "TRIBUTE";            
            model[18] = "XEDOS";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "MACLAREN":
            model[0] = "M6";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "MERCEDES-BENZ":
            model[0] = "180";
            model[1] = "190";
            model[2] = "200";            
            model[3] = "220";
            model[4] = "230";
            model[5] = "240";            
            model[6] = "250";
            model[7] = "260";            
            model[8] = "280";
            model[9] = "300";             
            model[10] = "310";
            model[11] = "320";
            model[12] = "350";            
            model[13] = "380";
            model[14] = "400";
            model[15] = "410";            
            model[16] = "420";
            model[17] = "450";            
            model[18] = "500";
            model[19] = "560";                               
            model[20] = "600";
            model[21] = "A CLASS";
            model[22] = "AMG";            
            model[23] = "C CLASS";
            model[24] = "CE CLASS";
            model[25] = "CL";            
            model[26] = "CLK";
            model[27] = "CLS";            
            model[28] = "E CLASS";
            model[29] = "G CLASS";             
            model[30] = "M CLASS";
            model[31] = "S CLASS";
            model[32] = "SE CLASS";            
            model[33] = "SEC CLASS";
            model[34] = "SEL CLASS";
            model[35] = "SL CLASS";                              
            model[36] = "SLK";             
            model[37] = "SLR MCLAREN";
            model[38] = "TE SERIES";
            model[39] = "V CLASS";            
            model[40] = "VANEO";
            model[41] = "VIANO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "MERCURY":
            model[0] = "GRAND MARQUIS";
            model[1] = "MONTEREY";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                    
          case "MG":
            model[0] = "MAESTRO";
            model[1] = "MAGNETTE";
            model[2] = "METRO";            
            model[3] = "MGA";
            model[4] = "MGB";
            model[5] = "MGC";            
            model[6] = "MGF";
            model[7] = "MIDGET";            
            model[8] = "MONTEGO";
            model[9] = "ROADSTER";             
            model[10] = "RV8";
            model[11] = "SV";
            model[12] = "TD";            
            model[13] = "TF";
            model[14] = "XPOWER";
            model[15] = "ZR";            
            model[16] = "ZS";
            model[17] = "ZT";            
            model[18] = "ZT-T";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "MICROCAR":
            model[0] = "MC1";
            model[1] = "VIRGO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "MINI":
            model[0] = "COOPER";
            model[1] = "COOPER S";
            model[2] = "ONE";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "MITSUBISHI":
            model[0] = "3000GT";
            model[1] = "CARISMA";
            model[2] = "CHALLENGER";            
            model[3] = "CHARIOT";
            model[4] = "COLT";
            model[5] = "CORDIA";            
            model[6] = "DELICA";
            model[7] = "ECLIPSE";            
            model[8] = "FTO";
            model[9] = "GALANT";             
            model[10] = "GRANDIS";
            model[11] = "GTO";
            model[12] = "L200";            
            model[13] = "LANCER";
            model[14] = "LAGNUM";
            model[15] = "OUTLANDER";            
            model[16] = "PAJERO";
            model[17] = "RALLIART";            
            model[18] = "RVR";
            model[19] = "SHOGUN";
            model[20] = "SHOGUN PININ";             
            model[21] = "SIGMA";
            model[22] = "SPACE RUNNER";
            model[23] = "SPACE STAR";            
            model[24] = "SPACE WAGON";
            model[25] = "STARION";
            model[26] = "STRADA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "MITSUOKA":
            model[0] = "VIEWT";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "MORGAN":
            model[0] = "4/4";
            model[1] = "AERO";
            model[2] = "PLUS 4";            
            model[3] = "PLUS 8";
            model[4] = "ROADSTER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
            
            break;          
          case "MORRIS":
            model[0] = "ITAL";
            model[1] = "MINI";
            model[2] = "MINOR";            
            model[3] = "OXFORD";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "NISSAN":
            model[0] = "100 NX";
            model[1] = "200 SX";
            model[2] = "280 ZX";            
            model[3] = "300 ZX";
            model[4] = "350 Z";
            model[5] = "ALMERA";            
            model[6] = "ALMERA TINO";
            model[7] = "BLUEBIRD";            
            model[8] = "CHERRY";
            model[9] = "CUBE";             
            model[10] = "FIGARO";
            model[11] = "GLORIA";
            model[12] = "LARGO";            
            model[13] = "LAUREL";
            model[14] = "MAXIMA";
            model[15] = "MICRA";            
            model[16] = "MINSTRAL";
            model[17] = "MURANO";            
            model[18] = "NAVARA";
            model[19] = "PATHFINDER";
            model[20] = "PATROL";             
            model[21] = "PRAIRIE";
            model[22] = "PRIMERA";
            model[23] = "PULSAR";            
            model[24] = "QX";
            model[25] = "SERENA";
            model[26] = "SILVIA";  
            model[27] = "SKYLINE";
            model[28] = "STANZA";
            model[29] = "SUNNY";
            model[30] = "TERRANO";
            model[31] = "TITAN";
            model[32] = "X-TRAIL";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "NOBLE":
            model[0] = "M12";
            model[1] = "M400";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "OPEL":
            model[0] = "ASTRA";
            model[1] = "KADETT";
            model[2] = "MANTA";            
            model[3] = "MONZA";
            model[4] = "OMEGA";
            model[5] = "TIGRA";            
            model[6] = "VECTRA";
            model[7] = "ZAFIRA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "PAGANI":
            model[0] = "ZONDA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "PANTHER":
            model[0] = "KALLISTA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "PERODUA":
            model[0] = "KELISA";
            model[1] = "KENARI";
            model[2] = "NIPPA";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "PEUGEOT":
            model[0] = "106";
            model[1] = "205";
            model[2] = "206";            
            model[3] = "206 SW";
            model[4] = "304";
            model[5] = "305";            
            model[6] = "306";
            model[7] = "307";            
            model[8] = "307 SW";
            model[9] = "309";             
            model[10] = "405";
            model[11] = "406";
            model[12] = "407";            
            model[13] = "505";
            model[14] = "605";
            model[15] = "607";            
            model[16] = "806";
            model[17] = "807";            
            model[18] = "PARTNER COMBI";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "PILGRIM":
            model[0] = "SUMO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "PLYMOUTH":
            model[0] = "PROWLER";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "PONTIAC":
            model[0] = "FIERO";
            model[1] = "FIREBIRD";
            model[2] = "TRANS AM";            
            model[3] = "TRANS SPORT";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "PORSCHE":
            model[0] = "356";
            model[1] = "911";
            model[2] = "911 GT3";            
            model[3] = "912";
            model[4] = "917";
            model[5] = "924";            
            model[6] = "928";
            model[7] = "944";            
            model[8] = "968";
            model[9] = "BOXSTER";             
            model[10] = "CARRERA GT";
            model[11] = "CAYENNE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "PROTON":
            model[0] = "COMPACT";
            model[1] = "COUPE";
            model[2] = "GEN-2";            
            model[3] = "GL";
            model[4] = "GLS";
            model[5] = "IMPIAN";            
            model[6] = "JUMBUCK";
            model[7] = "PERSONA";            
            model[8] = "PROTON";
            model[9] = "SATRIA";             
            model[10] = "WIRA";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "RELIANT":
            model[0] = "RIALTO";
            model[1] = "ROBIN";
            model[2] = "SCIMITAR";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "RENAULT":
            model[0] = "11";
            model[1] = "12";
            model[2] = "14";            
            model[3] = "15";
            model[4] = "16";
            model[5] = "17";            
            model[6] = "18";
            model[7] = "19";            
            model[8] = "20";
            model[9] = "21";             
            model[10] = "25";
            model[11] = "30";
            model[12] = "4";            
            model[13] = "5";
            model[14] = "6";
            model[15] = "7";            
            model[16] = "8";
            model[17] = "AVANTIME";            
            model[18] = "CLIO";
            model[19] = "ESPACE";
            model[20] = "FUEGO";             
            model[21] = "GRAND ESPACE";
            model[22] = "GRAND SCENIC";
            model[23] = "KANGOO";            
            model[24] = "LAGUNA";
            model[25] = "MEGANE";
            model[26] = "MEGANE SCENIC";            
            model[27] = "MODUS";
            model[28] = "SAFRANE";
            model[29] = "SCENIC";
            model[30] = "SPORT SPIDER";
            model[31] = "VEL SATIS";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "RILEY":
            model[0] = "ELF";
            model[1] = "RM SERIES";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "ROLLS ROYCE":
            model[0] = "20/25";
            model[1] = "25/30";
            model[2] = "CORNICHE";            
            model[3] = "PARK WARD";
            model[4] = "PHANTOM";
            model[5] = "SILVER CLOUD";            
            model[6] = "SILVER DAWN";
            model[7] = "SILVER SERAPH";            
            model[8] = "SILVER SHADOW";
            model[9] = "SILVER SPIRIT";             
            model[10] = "SILVER SPUR";
            model[11] = "SILVER WRAITH";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "ROVER":
            model[0] = "100";
            model[1] = "200";
            model[2] = "2000";            
            model[3] = "2200";
            model[4] = "25";
            model[5] = "3500";            
            model[6] = "400";
            model[7] = "45";            
            model[8] = "600";
            model[9] = "75";             
            model[10] = "800";
            model[11] = "CABRIOLET";
            model[12] = "CITY ROVER";            
            model[13] = "COUPE";
            model[14] = "MAESTRO";
            model[15] = "METRO";            
            model[16] = "MGF";
            model[17] = "MINI";            
            model[18] = "MONTEGO";
            model[19] = "STIRLING";
            model[20] = "STREET WISE";             
            model[21] = "TOURER";
            model[22] = "VITESSE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "SAAB":
            model[0] = "9-3";
            model[1] = "9-5";
            model[2] = "90";            
            model[3] = "900";
            model[4] = "9000";
            model[5] = "96";            
            model[6] = "99";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "SEAT":
            model[0] = "ALHAMBRA";
            model[1] = "ALTEA";
            model[2] = "AROSA";            
            model[3] = "CORDOBA";
            model[4] = "IBIZA";
            model[5] = "LEON";            
            model[6] = "MARBELLA";
            model[7] = "TOLEDO";            
            model[8] = "VARIO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "SINGER":
            model[0] = "LE MANS";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "SKODA":
            model[0] = "FABIA";
            model[1] = "FAVORIT";
            model[2] = "FELICIA";            
            model[3] = "OCTAVIA";
            model[4] = "SUPERB";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "SMART":
            model[0] = "CDI";
            model[1] = "CITY-CABRIOLET";
            model[2] = "CITY-COUPE";            
            model[3] = "CROSSBLADE";
            model[4] = "FORFOUR";
            model[5] = "FORTWO";            
            model[6] = "PASSION";
            model[7] = "PULSE";            
            model[8] = "PURE";
            model[9] = "ROADSTER";             
            model[10] = "ROADSTER-COUPE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "SSANGYONG":
            model[0] = "KORANDO";
            model[1] = "MUSSO";
            model[2] = "REXTON";            
            model[3] = "RODIUS";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;          
          case "SUBARU":
            model[0] = "1600";
            model[1] = "1800";
            model[2] = "FORESTER";            
            model[3] = "IMPREZA";
            model[4] = "JUSTY";
            model[5] = "LEGACY";            
            model[6] = "OUTBACK";
            model[7] = "SVX";            
            model[8] = "VIVIO";
            model[9] = "XT";             
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "SUNBEAM":
            model[0] = "ALPINE";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "SUZUKI":
            model[0] = "ALTO";
            model[1] = "BALENO";
            model[2] = "CAPPUCCINO";            
            model[3] = "GRAND VITARA";
            model[4] = "IGNIS";
            model[5] = "JIMNY";            
            model[6] = "LIANA";
            model[7] = "SAMURAI";            
            model[8] = "SJ";
            model[9] = "SWIFT";             
            model[10] = "VITARA";
            model[11] = "WAGON-R";
            model[12] = "X-90";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;   
          case "TALBOT":
            model[0] = "ALPINE";
            model[1] = "HORIZON";
            model[2] = "SAMBA";            
            model[3] = "SUNBEAM";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "TATA":
            model[0] = "GURKHA";
            model[1] = "SAFARI";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                     
          case "TOYOTA":
            model[0] = "4-RUNNER";
            model[1] = "ALTEZZA";
            model[2] = "AVENSIS";            
            model[3] = "AVENSIS-VERSO";
            model[4] = "AYGO";
            model[5] = "BB";            
            model[6] = "CAMRY";
            model[7] = "CARINA";            
            model[8] = "CELICA";
            model[9] = "CORROLA";            
            model[10] = "CORROLA-VERSO";
            model[11] = "CORONA";             
            model[12] = "CROWN";
            model[13] = "ESTIMA";
            model[14] = "GRANVIA";            
            model[15] = "HARRIER";
            model[16] = "HIACE";
            model[17] = "HILUX";            
            model[18] = "LANDCRUISER";
            model[19] = "LITEACE";            
            model[20] = "LUCIDA";
            model[21] = "MR-S";
            model[22] = "MR-2";             
            model[23] = "NOAH";
            model[24] = "PASEO";
            model[25] = "PICNIC";            
            model[26] = "PRADO";
            model[27] = "PREVIA";
            model[28] = "PRUIS"; 
            model[29] = "RAV-4";
            model[30] = "SERA";
            model[31] = "SOURER";            
            model[32] = "SPACECRUISER";
            model[33] = "STARLET";
            model[34] = "SUPRA";            
            model[35] = "SURF";
            model[36] = "TERCEL";            
            model[37] = "TOWNACE";
            model[38] = "WILL";             
            model[39] = "YARIS";
            model[40] = "YARIS-VERSO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "TRIUMPH":
            model[0] = "DOLOMITE";
            model[1] = "GT6";
            model[2] = "HERALD";            
            model[3] = "SPITFIRE";
            model[4] = "STAG";
            model[5] = "TOLEDO";            
            model[6] = "TR4";
            model[7] = "TR6";            
            model[8] = "TR7";
            model[9] = "TR8";             
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "TVR":
            model[0] = "280I";
            model[1] = "3000M";
            model[2] = "350I";            
            model[3] = "450";
            model[4] = "CERBERA";
            model[5] = "CHIMAERA";            
            model[6] = "GRIFFITH";
            model[7] = "S CONVERTIBLE";            
            model[8] = "S2";
            model[9] = "S3";             
            model[10] = "SAGARIS";
            model[11] = "T350";
            model[12] = "TAIMAR";            
            model[13] = "TAMORA";
            model[14] = "TASMIN";
            model[15] = "TUSCAN";            
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "ULTIMA":
            model[0] = "SPORT";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "VAUXHALL":
            model[0] = "AGILA";
            model[1] = "ASTRA";
            model[2] = "BELMONT";            
            model[3] = "CALIBRA";
            model[4] = "CARLTON";
            model[5] = "CAVALIER";            
            model[6] = "CHEVETTE";
            model[7] = "CORSA";            
            model[8] = "FRONTERA";
            model[9] = "MERIVA";             
            model[10] = "MONARO";
            model[11] = "MONTEREY";
            model[12] = "NOVA";            
            model[13] = "OMEGA";
            model[14] = "SENETOR";
            model[15] = "SIGNUM";            
            model[16] = "SINTRA";
            model[17] = "TIGRA";            
            model[18] = "VECTRA";
            model[19] = "VIVA";
            model[20] = "VX220";             
            model[21] = "ZAFIRA";  
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          case "VOLKSWAGEN":
            model[0] = "BEETLE";
            model[1] = "BORA";
            model[2] = "CARAVELLE";            
            model[3] = "CORRADO";
            model[4] = "DERBY";
            model[5] = "GOLF";            
            model[6] = "JETTA";
            model[7] = "K70";            
            model[8] = "KARMANN";
            model[9] = "LUPO";             
            model[10] = "PASSAT";
            model[11] = "PHAETON";
            model[12] = "POLO";            
            model[13] = "SANTANA";
            model[14] = "SCRIROCCO";
            model[15] = "SHARAN";            
            model[16] = "TOUAREG";
            model[17] = "TOURAN";            
            model[18] = "VENTO";  
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          case "VOLVO":
            model[0] = "164";
            model[1] = "240";
            model[2] = "260";            
            model[3] = "264";
            model[4] = "340";
            model[5] = "360";            
            model[6] = "440";
            model[7] = "460";            
            model[8] = "480";
            model[9] = "740";             
            model[10] = "760";
            model[11] = "850";
            model[12] = "940";            
            model[13] = "960";
            model[14] = "C70";
            model[15] = "CROSS COUNTRY";            
            model[16] = "P1800";
            model[17] = "S40";            
            model[18] = "S60";
            model[19] = "S70";
            model[20] = "S80";             
            model[21] = "S90";
            model[22] = "TORSLANDA";
            model[23] = "V40";            
            model[24] = "V50";
            model[25] = "V70";
            model[26] = "V90"; 
            model[27] = "XC70";
            model[28] = "XC90";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;  
          case "WESTFIELD":
            model[0] = "1600";
            model[1] = "2000";
            model[2] = "7";            
            model[3] = "MEGABIRD";
            model[4] = "MEGABLADE";
            model[5] = "SEI";            
            model[6] = "SEIGHT";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;
          case "WOLSELEY":
            model[0] = "16/60";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break; 
          case "YUGO":
            model[0] = "45";
            model[1] = "TEMPO";
            for(var i=0;i<model.length;i++)
            {
              objForm.model.options[i] = new Option(model[i],model[i]);
            }              
                        
            break;                                 
          default:
            alert('No choice...');
            break;
          }
        }





//----------------------------------------------------------------------------------------
function fnValidateForm(objForm)
{
  var frm = objForm;
  with(objForm)
  {
    if(selManufacturer.value == '--')
    {
      alert('Please choose your vehicle manufacturer');
      selManufacturer.focus();
      return false;
    }
    
    if(model.value == '--')
    {
      alert('Please choose your vehicle model');
      model.focus();
      return false;
    }

    if(color.value == '')
    {
      alert('Please enter the colour of the car..');
      color.focus();
      return false;
    }
    
    if(fname.value == '')
    {
      alert('Please enter your Firstname..');
      fname.focus();
      fname.select();
      return false;
    }
    
    if(lname.value == '')
    {
      alert('Please enter your Lastname..');
      lname.focus();
      lname.select();
      return false;
    }    

    if(priContact.value == '')
    {
      alert('Please enter a contact number. We will need this number to confirm your booking..');
      priContact.focus();
      priContact.select();
      return false;
    }

    if(isNaN(priContact.value))
    {
      alert('Primary Contact Number must contain numbers only. Please correct.');
      priContact.focus();
      priContact.select();
      return false;
    }

   if(secdContact.value != '' && isNaN(secdContact.value))
   {
      alert('Secondary Contact Number must contain numbers only. Please correct.');
      secdContact.focus();
      secdContact.select();
      return false;   
   }

   if(email.value != '')
   {
     if(!fnValidateEmail(email))
     {
       return false;
     }
   }
   
   //---now validate address fields
   
   if(housenum.value == '')
   {
     alert('Please enter your House Name or Number...');
     housenum.focus();
     return false;
   }
   
   if(street.value == '')
   {
     alert('Please enter your Street...');
     street.focus();
     return false;
   }   

   if(city.value == '')
   {
     alert('Please enter your City...');
     city.focus();
     return false;
   }

   if(pcode.value == '')
   {
     alert('Please enter your Postcode...');
     pcode.focus();
     return false;
   }
   else
   {
     //---now validate the postcode
     if(!fnValidatePostcode(objForm, objForm.pcode))
     {
       return false;
     }
   }

   if(dents.checked == false && wheels.checked == false && chips.checked == false && tints.checked == false && ice.checked == false && valet.checked == false)
   {
     alert('Please choose which Doctor you wish to see...');
     dents.focus();
     return false;
   }
   
   if(desc.value == '')
   {
     alert('Please provide us a general description of the nature of your problem...');
     desc.focus();
     return false;
   }

  }
  
  fnConfirmDetails(objForm);
}


//----------------------------------------------------------------------------------------
function fnTrimSpaces(obj)
{
  var str = obj.value;
  var reg = new RegExp(" ");
  var index = str.search(reg);
  
  if(index > -1)
  {
    obj.value = str.replace(reg,"");
    fnTrimSpaces(obj);
    return false;    
  }
}


//----------------------------------------------------------------------------------------
function fnValidateEmail(obj)
{
  var msg = 'Your email address is not valid. Please enter a valid email address.';
  if(obj.value != '')
  {
    if(obj.value.indexOf("@") == -1)
    {
      alert(msg);
      obj.focus();
      obj.select();
      return false;
    }
    
    if(obj.value.indexOf(".") == -1)
    {
      alert(msg);
      obj.focus();
      obj.select();
      return false;
    }
  }
  return true;
}


//----------------------------------------------------------------------------------------
function fnConfirmDetails(objForm)
{
  var line = "\n----------------\n";
  var space = " ";
  var msg = "Please confirm the following details." +line+ "Vehicle details : - ";

  with(objForm)
  {
    msg += "\n" + selManufacturer.value + space + model.value + "\nColour : " + color.value.toUpperCase() +line;
    msg += "Your Details : - \n";
    msg += selTitle.value.toUpperCase() + space + fname.value.toUpperCase() + space + lname.value.toUpperCase();
    msg += "\n" + housenum.value.toUpperCase() + space + street.value.toUpperCase();
    msg += "\n" + city.value.toUpperCase();
    msg += "\n" + pcode.value.toUpperCase();
    msg += "\nPrimary Contact number - " + priContact.value;

    if(secdContact.value != '')
    {
      msg += "\nSecondary Contact number - " + secdContact.value;
    }
  
    if(email.value != '')
    {
      msg += "\nEmail - " + email.value;
    }
    
    msg += line + "\n";
    msg += "You have chosen to see the following doctor(s) at the Auto Surgery :- " + "\n";

    if(dents.checked == true)
    {
      msg += " >> Dr. Dents\n";
    }  

    if(wheels.checked == true)
    {
      msg += " >> Dr. Wheels\n";
    }  
    
    if(chips.checked == true)
    {
      msg += " >> Dr. Chips\'n\'Scuffs\n";
    }      

    if(tints.checked == true)
    {
      msg += " >> Dr. Tints\n";
    }      

    if(ice.checked == true)
    {
      msg += " >> Dr. I.C.E.\n";
    }      
    
    if(valet.checked == true)
    {
      msg += " >> Dr. Valet\n";
    }          

    msg += line + '\nIf the above details are correct, then please press "OK". If you wish to make changes then press "CANCEL".'
  }
  
  if(confirm(msg))
  {
    objForm.action = 'process.php';
    objForm.submit();
  }
}


//----------------------------------------------------------------------------------------
function fnValidateLogin(objForm)
{
  with(objForm)
  {
    if(uid.value == '')
    {
      alert('Please enter your "Username"...');
      uid.focus();
      return false;
    }
    
    if(pass.value == '')
    {
      alert('Please enter your "Password"...');
      pass.focus();
      return false;
    }
    submit();
    return true;
  }
}


//-----------------------------------------------------------------------------------------
function fnLogout(objForm)
{
  with(objForm)
  {
    action='logout.php';
    submit();
  }
  /*
  if(prmLogid != '')
  {
    document.location = 'logout.php?logmeout='+prmLogid;
  }
  */
}



//------------------------------------------------------------------
function fnShowDate(objForm,prmDay)
{
  var theMonth,theYear;

  with(objForm)
  {
    theMonth = month.value;
    theYear = year.value;        
   
    if(month.value.length == 1)
    {
      theMonth = '0' + month.value;
    }
  
    if(prmDay.length == 1 )
    {
      prmDay = '0' + prmDay;
    }
  
    provisionaldate.value = prmDay + '/' + theMonth + '/' + theYear;
  }
}

//---------------------------------------------------------------
function fnConfirmApp(objForm)
{
  var line = "\n-------------------------------------------------\n";
  var newline = "\n";
  var msg = 'Please confirm the following details : ' + line;
  msg += 'PROVISIONAL BOOKING DATE';
  msg += line;

  with(objForm)
  {

    if(provisionaldate.value == '' || provisionaltime.value == '')
    {
      alert('Please complete your provisional booking. Your provisional Date or Time is incomplete...');
      return false;
    }
    else
    {
      msg += 'Provisional Booking Date : ' + provisionaldate.value + newline;
      msg += 'Provisional Booking Time : ' + provisionaltime.value + newline + newline;

      if(radLoc[0].checked == true)
      {
        msg += 'LOCATION : Home Address';
      }
      
      if(radLoc[1].checked == true)
      {
        if(housenum2.value == '' && street2.value == '' && city2.value == '' && pcode2.value == '')
        {
          alert('Please provide your "other" address...');
          housenum.focus();
          return false
        }
        else
        {
          if(housenum2.value == '')
          {
            alert('Please enter the Property Name or Number...');
            housenum2.focus();
            return false;
          }

          if(street2.value == '')
          {
            alert('Please enter the Street...');
            street2.focus();
            return false;
          }

          if(city2.value == '')
          {
            alert('Please enter the City...');
            city2.focus();
            return false;
          }

          if(pcode2.value == '')
          {
            alert('Please enter the Postcode...');
            pcode2.focus();
            return false;
          }
          else
          {
            if(!fnValidatePostcode(objForm,objForm.pcode2))
            {
              return false;
            }          
          }


          msg += 'LOCATION : Other Address' + newline;
          msg += housenum2.value.toUpperCase();
          msg += ' ' + street2.value.toUpperCase();
          msg += newline + city2.value.toUpperCase();
          msg += newline + pcode2.value.toUpperCase();

        }  
      }

      msg += line;
      msg += 'PLEASE NOTE (this is a "provisional booking")';
      msg += line;
      msg += 'We will do our very best to ensure our specialist will see you on your preferred booking date and time. ';
      msg += '\nHowever, during busy periods we may need to re-adjust your booking accordingly. One of our staff members will contact you shortly to confirm your booking date.\n';
      msg += '\nIf the provisional date and time are correct, then please click the "OK" button. If you wish to make any changes then please click "CANCEL".';

      if(confirm(msg))
      {
        userconfirmed.value = 'true';
        action = 'processbooking.php';
        submit();
      }            
      return true;
    }  
  }
}


//--------------------------------------------------------------------------
function fnDisplayTime(objForm)
{
  with(objForm)
  {
    if(selTime.value != '')
    {
      provisionaltime.value = selTime.value.toString() + ':00';
 
      if(parseInt(selTime.value)<12)
      {
        provisionaltime.value += ' AM';
      }
      else
      {
        provisionaltime.value += ' PM';
      }            
    }  
    else
    {
      alert('Please choose what time you would like to book your provisional appointment');
    }
  }  
}

//--------------------------------------------------------------------------
function fnValidateEmailForm(objForm,blnRecomFriend)
{

if(blnRecomFriend == false)
{
  //---this function is validating email.php input.
  with(objForm)
  {
    if(emailname.value == '')
    {
      alert('Please enter your name...');
      emailname.focus();
      return false;
    }
    
    if(emailadd.value == '' && emailphone.value == '')
    {
      alert('Please provide us with either an email address and/or a phone number...');
      emailadd.focus();
      return false;
    }
    else
    {  
      if(emailadd.value != '')
      {
        if(!fnValidateEmail(emailadd)) 
        { 
          return false; 
        }
      }  
      
      if(emailphone.value != '')
      {  
        if(isNaN(emailphone.value)) 
        {
          alert('Please enter numbers only for your phone number...'); 
          emailphone.focus();
          emailphone.select();
          return false;
        }
      }  
    }

    switch(objForm.name)
    {
      case 'frmsupport':
        if(emaildesc.value == '')
        {
          alert('Please provide us with a description of the problem you\'re experiencing on our website...');
          emaildesc.focus();
          return false;
        }
        break;
      case 'frmenquiry':
        if(emaildesc.value == '')
        {
          alert('Please provide us with a details of your enquiry...');
          emaildesc.focus();
          return false;
        }
        break;
    }  

    submit();
    return true;
  }
}
else
{
  //---we are recommending a friend
  with(objForm)
  {
    if(emailname.value == '')
    {
      alert('Please enter your name...');
      emailname.focus();
      return false;
    }

    if(emailfriendname.value == '')
    {
      alert('Please enter your friends\' name...');
      emailfriendname.focus();
      return false;
    }    
    
    if(emailadd.value == '')
    {
      alert('Please enter your friends\' email address...');
      emailadd.focus();
      return false;            
    } 

    if(emailadd.value != '')
    {
      if(!fnValidateEmail(emailadd)) 
      { 
        return false; 
      }
    }  
    submit();
  }
}

}


//----------------------------------------------------------------------------------------
function fnDisableOtherAddress(objForm, objEle)
{
  var theValue = 'XXXX';
  var theColor = 'gray';
  with(objForm)
  {
    if(objEle.checked == true)
    {
      housenum2.disabled = true;
      housenum2.style.color = theColor;
      housenum2.value = theValue;
      
      street2.disabled = true;
      street2.style.color = theColor;
      street2.value = theValue;
      
      city2.disabled = true;
      city2.style.color = theColor;
      city2.value = theValue;      
      
      pcode2.disabled = true;
      pcode2.style.color = theColor;
      pcode2.value = theValue;      
      
    }
  }
}

//-----------------------------------------------------------------------------
function fnEnableOtherAddress(objForm, objEle)
{
  var theColor = 'black';
  var theValue = '';
  
  with(objForm)
  {
    if(objEle.checked == true)
    {
      housenum2.disabled = false;
      housenum2.value = theValue;
      housenum2.style.color = theColor;
      housenum2.select();
      housenum2.focus();
      
      street2.disabled = false;
      street2.value = theValue;
      street2.style.color = theColor;      

      city2.disabled = false;
      city2.value = theValue;
      city2.style.color = theColor;      
      
      pcode2.disabled = false;
      pcode2.value = theValue;
      pcode2.style.color = theColor;      
    }
  }
}

//-----------------------------------------------------------------------
function fnValidateDate(objForm)
{
  //---first initialise today's date and store as an integer
  var now = new Date();
  var dayToday = now.getDate().toString();
  var monthToday = now.getMonth() + 1; //adding 1 because of JS zero based arrays
  monthToday = monthToday.toString();
  var yearToday = now.getFullYear();
  
  if(dayToday.length == 1)
  {
    dayToday = '0' + dayToday;
  }

  if(monthToday.length == 1)
  {
    monthToday = '0' + monthToday;
  }  

  var fullDateToday = yearToday.toString() + monthToday.toString() + dayToday.toString();
  fullDateToday = parseInt(fullDateToday); //---convert to integer
  
 
  //---now initialise the user's date and store as integer
  with(objForm)
  {
    var userDate = provisionaldate.value;
  }
  
  var userDay = userDate.substr(0,2);
  var userMonth = userDate.substr(3,2);
  var userYear = userDate.substr(6,4);
  var userFullDate = userYear.toString() + userMonth.toString() + userDay.toString();
  userFullDate = parseInt(userFullDate); //---convert to integer
  
  if(userFullDate < fullDateToday)
  {
    alert('The date you\'ve selected for your provisional booking is in the past. Please correct.');
    //---clear down the invalid date... 
    with(objForm)
    {
      provisionaldate.value = '';
    }
    return false;
  }
  fnConfirmApp(objForm);
  return true;
}

//------------------------------------------------------------------------
function fnPrintPage()
{
  window.print();
}


//-------------------------------------------------------------------------
function fnAdminAction(objForm,prmValue)
{
  var frm = objForm;
  theAction = 'doAction.php';
  switch(prmValue)
  {
    case '1':
      theAction +='?theaction=1';
      break;
    case '2':
      theAction +='?theaction=2';    
      break;
  }
  frm.action=theAction;
  frm.submit();  
}

//-------------------------------------------------------------------
function fnValidateActionInput(objForm)
{
  var defaultVal="XXXX";

  with(objForm)
  {
    if((bref.value == defaultVal && cref.value == defaultVal && surname.value == defaultVal && pcode.value == defaultVal)
       || (bref.value == '' || cref.value == '' || (surname.value == '' && pcode.value == ''))
      )
    {
      alert('Please enter at least one criteria...');
      bref.focus();
      return false;
    }
    else if((bref.disabled == false && isNaN(bref.value)))
    {
      alert('Please enter numbers only for booking references...'); 
      bref.value = '';
      bref.focus();
      return false;
    }
    else if((cref.disabled == false && isNaN(cref.value)))
    {
      alert('Please enter numbers only for customer references...'); 
      cref.value = '';
      cref.focus();
      return false;
    }    
    else if((surname.value != '' && pcode.value == '') || (surname.value == '' && pcode.value != ''))
    {
      alert('You must supply both the customer\'s Surname AND Postcode. Please correct.');
      if(surname.value == '')
      {
        surname.focus();
      }
      if(pcode.value == '')
      {
        pcode.focus();
      }
      return false;
    }
    else if(radAction[2].checked == true)
    {
      if(!fnValidatePostcode(objForm,objForm.pcode))
      {
        return false;
      }
      else
      {
        action = 'processAction.php';
        submit();
        return true;    
      }      
    }
    else
    {
      action = 'processAction.php';
      submit();
      return true;    
    }
  }
  
}

//----------------------------------------------------------------------------------------------
function fnEnableActionForm(objForm)
{
  with(objForm)
  {
    if(radAction[0].checked == true)
    {
      fnDisableAll(objForm);
      bref.disabled = false;
      bref.style.background = "#FF6600";
      bref.value = '';
      bref.focus();
    }
    else if(radAction[1].checked == true)
    {
      fnDisableAll(objForm);
      cref.disabled = false;
      cref.style.background = "#FF6600";
      cref.value = '';
      cref.focus();
    }
    else
    {
      fnDisableAll(objForm);
      surname.disabled = false;
      pcode.disabled = false;
      surname.style.background = "#FF6600";
      pcode.style.background = "#FF6600";      
      surname.value = '';
      pcode.value = '';      
      surname.focus();
    }
  }
}

//----------------------------------------------------------------
function fnDisableAll(objForm)
{ 
  var theValue = 'XXXX';
  var theColor = 'silver';
  with(objForm)
  {
    bref.disabled = true;
    cref.disabled = true;
    surname.disabled = true;
    pcode.disabled = true;
    
    bref.value = theValue;
    cref.value = theValue;
    surname.value = theValue;
    pcode.value = theValue;
    
    bref.style.background = theColor;
    cref.style.background = theColor;
    surname.style.background = theColor;    
    pcode.style.background = theColor;    
  }
}

//------------------------------------------------------------------
function fnValidatePostcode(objForm, obj)
{
  with(objForm)
  {
    tmp = obj.value;
    tmp = tmp.replace(/ /g,"").toUpperCase();
	
    if (tmp.match(/^[A-Z]{1,2}[0-9][0-9A-Z]?[0-9][A-Z][A-Z]$/))
    {
      obj.value = tmp.substring(0,tmp.length-3) + " " + tmp.substring(tmp.length-3,tmp.length)
      return true;
    } 
    else if(tmp.match(/^BFPO[0-9]+$/)) 
	{
      obj.value = "BFPO" + " " + tmp.substring(4,tmp.length);
      return true;
	} 
	else 
	{
      alert("Please check that you have entered a valid postcode.");
      obj.select();
      obj.focus();      
      return false;
    }
  } 
}



function fnMap()
{
  var newwindow=window.open('map.html','picWin','height=750,width=800,left=2,top=2');
}
      
function fnBooking()
{
  var newwindow=window.open('booking.php?isPopUp=true','bookWin','height=650,width=950,left=2,top=2,scrollbars=yes');
}


function fnTerms()
{
  var newwindow=window.open('terms.html','termWin','height=650,width=800,left=2,top=2,scrollbars=yes');
}

function fnPrivacy()
{
  var newwindow=window.open('privacy.html','privacyWin','height=650,width=800,left=2,top=2,scrollbars=yes');
}

function fnValet(prmValetType)
{
  var showInfo = '';

  switch(prmValetType)
  {
    case '3':
      showInfo = 'valet.html#3';
      break;
    case '4':
      showInfo = 'valet.html#4';
      break;
    case '5':
      showInfo = 'valet.html#5';
      break;
    case 'prem':
      showInfo = 'valet.html#prem';
      break;      
  }
  var newwindow=window.open(showInfo,'valetWin','height=750,width=800,left=2,top=2,scrollbars=yes');
}

