﻿function AssignSub(oj, m) {
	pv = String(m);
	oj.options.length=1;
	oj.options[0].text   = "specializing in";
	oj.options[0].value  = "SPC";
	switch (pv) {
		case "6":
			//Appliances
			oj.options.length=20;
			oj.options[0].text   = "specializing in";
			oj.options[1].text   = "Central Vacuum Systems--Built-in";
			oj.options[2].text   = "Cooktops & Rangetops";
			oj.options[3].text   = "Dishwashers";
			oj.options[4].text   = "Dryers";
			oj.options[5].text   = "Freezers";
			oj.options[6].text   = "Garbage Disposers";
			oj.options[7].text   = "Kitchen Ranges";
			oj.options[8].text   = "Microwave Ovens";
			oj.options[9].text   = "Range Hoods";
			oj.options[10].text  = "Refrigerators";
			oj.options[11].text  = "Refrigerators--Beverage Centers";
			oj.options[12].text  = "Refrigerators--Compact";
			oj.options[13].text  = "Refrigerators--Ice Makers";
			oj.options[14].text  = "Refrigerators--Wine Storage";
			oj.options[15].text  = "Trash Compactors";
			oj.options[16].text  = "Wall Ovens";
			oj.options[17].text  = "Warming Drawers";
			oj.options[18].text  = "Washer-Dryer Combinations";
			oj.options[19].text  = "Washing Machines";
			//Value
			oj.options[0].value   = "SPC";
			oj.options[1].value   = "Central Vacuum Systems--Built-in";
			oj.options[2].value   = "Cooktops & Rangetops";
			oj.options[3].value   = "Dishwashers";
			oj.options[4].value   = "Dryers";
			oj.options[5].value   = "Freezers";
			oj.options[6].value   = "Garbage Disposers";
			oj.options[7].value   = "Kitchen Ranges";
			oj.options[8].value   = "Microwave Ovens";
			oj.options[9].value   = "Range Hoods";
			oj.options[10].value  = "Refrigerators";
			oj.options[11].value  = "Refrigerators--Beverage Centers";
			oj.options[12].value  = "Refrigerators--Compact";
			oj.options[13].value  = "Refrigerators--Ice Makers";
			oj.options[14].value  = "Refrigerators--Wine Storage";
			oj.options[15].value  = "Trash Compactors";
			oj.options[16].value  = "Wall Ovens";
			oj.options[17].value  = "Warming Drawers";
			oj.options[18].value  = "Washer-Dryer Combinations";
			oj.options[19].value  = "Washing Machines";
			break;
		case "7": 
			//Cabinets, Closets, Garage
			oj.options.length=4;
			oj.options[0].text   = "specializing in";
			oj.options[1].text   = "Cabinets";
			oj.options[2].text   = "Closet Storage";
			oj.options[3].text   = "Garage Cabinets, Storage Systems";
			//Value
			oj.options[0].value  = "SPC";
			oj.options[1].value  = "Cabinets";
			oj.options[2].value  = "Closet Storage";
			oj.options[3].value  = "Garage Cabinets, Storage Systems";
			break;
		case "8": 
			//Counter Top Materials
			oj.options.length=5;
			oj.options[0].text   = "specializing in";
			oj.options[1].text   = "Granite Counter Tops";
			oj.options[2].text   = "Laminate-Sheets";
			oj.options[3].text   = "Quartz Surfacing-Sheets";
			oj.options[4].text   = "Solid Surfacing-Sheets";
			//Value
			oj.options[0].value  = "SPC";
			oj.options[1].value  = "SPC";
			oj.options[2].value  = "SPC";
			oj.options[3].value  = "SPC";
			oj.options[4].value  = "SPC";
			break;
		case "9": 
			//Concrete - Driveways, Patios, Foundations
			oj.options.length=9;
			oj.options[0].text   = "specializing in";
			oj.options[1].text   = "Deck Drainage Systems";
			oj.options[2].text   = "Deck Railing Systems";
			oj.options[3].text   = "Decking-Composite, Plastic and Vinyl";
			oj.options[4].text   = "Decking-Trim and Accessories";
			oj.options[5].text   = "Fencing-Vinyl";
			oj.options[6].text   = "Pavers-Brick";
			oj.options[7].text   = "Pavers-Manufactured Stone";
			oj.options[8].text   = "Retaining Wall Systems";
			//Value
			oj.options[0].value  = "SPC";
			oj.options[1].value  = "SPC";
			oj.options[2].value  = "SPC";
			oj.options[3].value  = "SPC";
			oj.options[4].value  = "SPC";
			oj.options[5].value  = "SPC";
			oj.options[6].value  = "SPC";
			oj.options[7].value  = "SPC";
			oj.options[8].value  = "SPC";

			break;

	}
	return true;
}

function CreateSubs( om ,os, m) {
	var sv = String(om.options[om.selectedIndex].value);
	AssignSub(os, sv);
	return true;
}