var MirrorCarManufacturer = ""; var MirrorCarModel = ""; var MirrorColour = ""; var MirrorDescription = ""; var Price = "3.00"; var BasePrice = Price; var PandP = "2"; var QTYMax = "3"; function Update_Mirror_Car_Model() { Price = "3.00"; Clear_Car_Model() Clear_Mirror_Colour() MirrorCarManufacturer = document.MirrorSelection.MirrorCarManufacturer.value; MirrorCarModel = document.MirrorSelection.MirrorCarModel.value; if (MirrorCarManufacturer == "Audi ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[1] = new Option("A4", "A4 "); document.MirrorSelection.MirrorCarModel.options[2] = new Option("Quattro", "Quattro "); } if (MirrorCarManufacturer == "BMW ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("M1", "M1 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } if (MirrorCarManufacturer == "Brabham ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("BT49", "BT49 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } if (MirrorCarManufacturer == "Ferrari ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("F40", "F40 "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Ford ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[1] = new Option("Capri", "Capri "); document.MirrorSelection.MirrorCarModel.options[2] = new Option("Escort Cosworth", "Escort Cosworth "); document.MirrorSelection.MirrorCarModel.options[3] = new Option("Escort XR3i", "Escort XR3i "); document.MirrorSelection.MirrorCarModel.options[4] = new Option("Fiesta XR2i", "Fiesta XR2i "); document.MirrorSelection.MirrorCarModel.options[5] = new Option("Focus", "Focus "); document.MirrorSelection.MirrorCarModel.options[6] = new Option("Mondeo Cosworth", "Mondeo Cosworth "); document.MirrorSelection.MirrorCarModel.options[7] = new Option("RS 200", "RS 200 "); document.MirrorSelection.MirrorCarModel.options[8] = new Option("Sierra Cosworth", "Sierra Cosworth "); } if (MirrorCarManufacturer == "Jaguar ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[1] = new Option("XJ220", "XJ220 "); document.MirrorSelection.MirrorCarModel.options[2] = new Option("XJR9", "XJR9 "); } if (MirrorCarManufacturer == "Lamborghini ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("Diablo", "Diablo "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Lancia ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("037", "037 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } if (MirrorCarManufacturer == "Ligier ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("JS11", "JS11 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } if (MirrorCarManufacturer == "Lorry Cab ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("All lorry cabs", ""); document.MirrorSelection.MirrorColour.options[0] = new Option("Chrome", "chrome "); Price = "4.95"; Update_Description() } if (MirrorCarManufacturer == "Lotus ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[1] = new Option("16", "16 "); document.MirrorSelection.MirrorCarModel.options[2] = new Option("Honda Turbo", "Honda Turbo "); document.MirrorSelection.MirrorCarModel.options[3] = new Option("Renault 98T", "Renault 98T "); } if (MirrorCarManufacturer == "MG ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("Metro Turbo", "Metro Turbo "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Porsche ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[1] = new Option("962", "962 "); document.MirrorSelection.MirrorCarModel.options[2] = new Option("GT1", "GT1 "); } if (MirrorCarManufacturer == "Renault ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("Laguna", "Laguna "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Rover ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("3500 (SD1)", "3500 (SD1) "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Sauber Mercedes ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("C9-88", "C9-88 "); Update_Mirror_Colour() } if (MirrorCarManufacturer == "Williams Honda ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("FW11", "FW11 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Yellow", "yellow "); Update_Description() } if (MirrorCarManufacturer == "Saudia ") { document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorCarModel.options[0] = new Option("Leyland Williams", "Leyland Williams C138 "); document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } } function Update_Mirror_Colour() { Clear_Mirror_Colour() MirrorCarModel = document.MirrorSelection.MirrorCarModel.value; Price = BasePrice; if (MirrorCarModel == "") { document.MirrorSelection.elements["MirrorCarModel"].disabled=false; document.MirrorSelection.elements["MirrorColour"].disabled=true; } if (MirrorCarModel == "Diablo ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("White", "white "); Update_Description() } if (MirrorCarModel == "A4 " || MirrorCarModel == "Focus " || MirrorCarModel == "Laguna " ) { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Blue", "blue "); document.MirrorSelection.MirrorColour.options[3] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[4] = new Option("White", "white "); document.MirrorSelection.MirrorColour.options[5] = new Option("Yellow", "yellow "); } if (MirrorCarModel == "XJ220 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[3] = new Option("White", "white "); Update_Description() } if (MirrorCarModel == "962 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); Update_Description() } if (MirrorCarModel == "Metro Turbo ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[3] = new Option("White", "white "); Update_Description() } if (MirrorCarModel == "Quattro " || MirrorCarModel == "Honda Turbo " || MirrorCarModel == "Renault 98T " || MirrorCarModel == "GT1 ") { document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorColour.options[0] = new Option("Black", "black "); Update_Description() } if (MirrorCarModel == "Honda Turbo ") { document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorColour.options[0] = new Option("Yellow", "yellow "); Update_Description() } if (MirrorCarModel == "F40 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[3] = new Option("White", "white "); } if (MirrorCarModel == "3500 (SD1) ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); } if (MirrorCarModel == "Capri ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Chrome", "chrome "); } if (MirrorCarModel == "Fiesta XR2i " || MirrorCarModel == "Escort XR3i " || MirrorCarModel == "Escort Cosworth " || MirrorCarModel == "Mondeo Cosworth " || MirrorCarModel == "Sierra Cosworth ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[3] = new Option("White", "white "); } if (MirrorCarModel == "RS 200 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Blue", "blue "); document.MirrorSelection.MirrorColour.options[3] = new Option("White", "white "); document.MirrorSelection.MirrorColour.options[4] = new Option("Yellow", "yellow "); } if (MirrorCarModel == "XJR9 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "red "); document.MirrorSelection.MirrorColour.options[1] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[2] = new Option("White", "white "); Update_Description() } if (MirrorCarModel == "C9-88 ") { document.MirrorSelection.elements["MirrorColour"].disabled=false; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", "black "); document.MirrorSelection.MirrorColour.options[1] = new Option("Black", "black "); document.MirrorSelection.MirrorColour.options[2] = new Option("Red", "red "); document.MirrorSelection.MirrorColour.options[3] = new Option("yellow", "yellow "); } if (MirrorCarModel == "16 ") { document.MirrorSelection.elements["MirrorColour"].disabled=true; document.MirrorSelection.MirrorColour.options[0] = new Option("Chrome", "chrome "); Price = "3.25"; Update_Description() } } function Update_Description() { MirrorCarManufacturer = document.MirrorSelection.MirrorCarManufacturer.value; MirrorCarModel = document.MirrorSelection.MirrorCarModel.value; MirrorColour = document.MirrorSelection.MirrorColour.value; MirrorDescription = "1 set of " + MirrorColour + "mirrors for " + MirrorCarManufacturer + MirrorCarModel; document.MirrorSelection.MirrorDescription.value = " " + MirrorDescription; document.MirrorSelection.PriceMirror.value = " " + Price; document.MirrorSelection.elements["MirrorAddToCart"].disabled=false; } function Add_Mirrors_To_Cart() { Item = MirrorDescription; AddToCart() } function Clear_Car_Model() { for (i=0;i<10; i++) { document.MirrorSelection.MirrorCarModel.options[i] = new Option("", ""); } document.MirrorSelection.MirrorCarModel.length=1; document.MirrorSelection.MirrorCarModel.options[0] = new Option("Select vehicle model", ""); document.MirrorSelection.elements["MirrorCarModel"].disabled=true; document.MirrorSelection.elements["MirrorColour"].disabled=true; } function Clear_Mirror_Colour() { for (i=0;i<10; i++) { document.MirrorSelection.MirrorColour.options[i] = new Option("", ""); } document.MirrorSelection.MirrorColour.length=1; document.MirrorSelection.MirrorColour.options[0] = new Option("Select mirror colour", ""); document.MirrorSelection.elements["MirrorAddToCart"].disabled=true; document.MirrorSelection.MirrorDescription.value = " Please select a set of mirrors"; document.MirrorSelection.PriceMirror.value = " -.--"; } // End --> // -->