var GoodOptionsCFBT3264PC = new Array(2); GoodOptionsCFBT3264PC[0] = 0; GoodOptionsCFBT3264PC[1] = 0; function CheckLockedOptionsCFBT3264PC(CatalogForm) { var FlagContinue=0; var FlagFound=0; var x=0; var OptionMatrix = new Array(100) ; OptionMatrix[0]= "Black" ; OptionMatrix[1]= "Don't Care" ; OptionMatrix[2]= "Lime Green" ; OptionMatrix[3]= "Don't Care" ; while ((x<4) && (!FlagFound)) { FlagContinue=1 ; if (((CatalogForm.opt0.options[CatalogForm.opt0.selectedIndex].text==OptionMatrix[x]) ||(OptionMatrix[x]=="Don't Care")) && (FlagContinue)) FlagContinue=1; else FlagContinue=0; x++ ; if (((CatalogForm.opt1.options[CatalogForm.opt1.selectedIndex].text==OptionMatrix[x]) ||(OptionMatrix[x]=="Don't Care")) && (FlagContinue)) FlagContinue=1; else FlagContinue=0; x++ ; if (FlagContinue) FlagFound = 1 ; } if (FlagFound) { alert("We are sorry, this option has been sold out. We should receive it in 30 days.") ; CatalogForm.opt0.selectedIndex=GoodOptionsCFBT3264PC[0]; CatalogForm.opt1.selectedIndex=GoodOptionsCFBT3264PC[1]; } else { GoodOptionsCFBT3264PC[0]=CatalogForm.opt0.selectedIndex; GoodOptionsCFBT3264PC[1]=CatalogForm.opt1.selectedIndex; } } function RecalcPriceCFBT3264PC (CatalogForm) { var price = 238.800003; if (CatalogForm.opt1.options[CatalogForm.opt1.selectedIndex].value == 1) price += -106.919998; if (CatalogForm.opt1.options[CatalogForm.opt1.selectedIndex].value == 2) price += -86.879997; CatalogForm.realtimeprice.value = FormatCurrency (price); } function CheckOptionsCFBT3264PC (CatalogForm) { CheckLockedOptionsCFBT3264PC (CatalogForm); RecalcPriceCFBT3264PC (CatalogForm); }