	function SaveOpt()
	{
		setCookie("op1", document.searchForm.option1.options[document.searchForm.option1.selectedIndex].value, 24 * 60 * 60);
		setCookie("op2", document.searchForm.option2.options[document.searchForm.option2.selectedIndex].value, 24 * 60 * 60);
		setCookie("op3", document.searchForm.option3.options[document.searchForm.option3.selectedIndex].value, 24 * 60 * 60);
		
		return 1;
	}
	function SelList(List, Value)
	{
		for(i = 0; i < List.options.length; i++){
			if(List.options[i].value == Value){
				List.selectedIndex = i;
				return;
			}
		}
		List.selectedIndex = 0;
	}

	function makeOpt1()
	{
		with(document.searchForm.option1)
		{
			options[0] = new Option("Automotive Products", "C");
			options[1] = new Option("Home Appliances and  Power Tools", "H");
			options[2] = new Option("Optical and Precision Instruments", "O");
			options[3] = new Option("Audio and  Visual Equipment", "S");
			options[4] = new Option("Toys and  Models", "T");
		}
		document.searchForm.option1.selectedIndex = 0;
		makeOpt2();
	}
	
	function makeOpt2()
	{
		deleteOpt("option2");
		
		switch(document.searchForm.option1.options[document.searchForm.option1.selectedIndex].value)
		{
			case "S":
				with(document.searchForm.option2)
				{
					options[0] = new Option("CD Player","S01");
					options[1] = new Option("Car CD Player","S02");
					options[2] = new Option("Car Navigation System","S03");
					options[3] = new Option("DVD Player","S04");
					options[4] = new Option("Video Game","S05");
				}
				break;
			case "O":
				with(document.searchForm.option2)
				{
					options[0] = new Option("Printer", "O01" );
					options[1] = new Option("CD/DVD-ROM Drive", "O03" );
					options[2] = new Option("Copy Machine / Laser Printer", "O04" );
					options[3] = new Option("Digital Camera", "O05" );
					options[4] = new Option("Vending Machine", "O06" );
				}
				break;
			case "C":
				with(document.searchForm.option2)
				{
					options[0] = new Option("Rearview Mirror", "C0100" );
					options[1] = new Option("Retractable Rearview Mirror", "C0200" );
					options[2] = new Option("Door Lock Actuator", "C0300" );
					options[3] = new Option("Steering Lock", "C0900" );
					options[4] = new Option("Air Conditioning Damper Actuator", "C0400" );
					options[5] = new Option("Door Closer", "C0500" );
					options[6] = new Option("Seat Belt Pretensioner", "C1000" );
					options[7] = new Option("Power Seat", "C1100" );
					options[8] = new Option("Power Window Lifter", "C0600" );
					options[9] = new Option("Automatic Cruise Control", "C0700" );
					options[10] = new Option("Head Light Beam Level Adjuster", "C0800" );
					options[11] = new Option("Electric Parking Brake", "C1200" );
				}
				break;
			case "H":
				with(document.searchForm.option2)
				{
					options[0] = new Option("Hair Dryer", "H0100" );
					options[1] = new Option("Styling Brush", "H0200" );
					options[2] = new Option("Blood Pressure Meter", "H0800" );
					options[3] = new Option("Electric Shaver", "H0300" );
					options[4] = new Option("Hair Clipper", "H0400" );
					options[5] = new Option("Hair Remover", "H0500" );
					options[6] = new Option("Tooth Brush", "H0600" );
					options[7] = new Option("Massager / Vibrator", "H0700" );
					options[8] = new Option("Vacuum Cleaner", "H0900" );
					options[9] = new Option("Drill / Screwdriver / Garden Tool", "H1100" );
				}
				break;
			case "T":
				with(document.searchForm.option2)
				{
					options[0] = new Option("Radio Control Model", "T01" );
					options[1] = new Option("Toy / Plastic Model", "T02" );
				}
				break;
		}
		document.searchForm.option2.selectedIndex = 0;
		makeOpt3();
	}
	
	
	function makeOpt3()
	{
		deleteOpt("option3");
		
		var Opt2Val = document.searchForm.option2.options[document.searchForm.option2.selectedIndex].value;
		switch(Opt2Val)
		{
			case "S01":
			case "S02":
			case "S04":
				with(document.searchForm.option3){
					options[0] = new Option("in general", Opt2Val + "00");
					options[1] = new Option("Spindle", Opt2Val + "01");
					options[2] = new Option("Sled", Opt2Val + "02");
					options[3] = new Option("Loading", Opt2Val + "03");
				}
				break;
			case "S03":
				with(document.searchForm.option3){
					options[0] = new Option("Monitor Opening/Closing", "S0301");
				}
				break;
			case "S05":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "S0500");
					options[1] = new Option("Loading", "S0501");
					options[2] = new Option("Vibration", "S0502");
				}
				break;
			case "C0100":
			case "C0200":
			case "C0300":
			case "C0400":
			case "C0500":
			case "C0600":
			case "C0700":
			case "C0800":
			case "C0900":
			case "C1000":
			case "C1100":
			case "C1200":
				with(document.searchForm.option3){
					options[0] = new Option("in general", Opt2Val);
				}
				break;
			case "H0100":
			case "H0200":
			case "H0300":
			case "H0400":
			case "H0500":
			case "H0600":
			case "H0700":
			case "H0800":
			case "H0900":
			case "H1000":
			case "H1100":
				with(document.searchForm.option3){
					options[0] = new Option("in general", Opt2Val);
				}
				break;
			case "O01":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "O0100");
					options[1] = new Option("Carriage Drive / Paper Feed", "O0101");
					options[2] = new Option("Scanner", "O0102");
				}
				break;
			case "O03":
				with(document.searchForm.option3){
					options[0] = new Option("Loading", "O0300");
				}
				break;
			case "O04":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "O0400");
					options[1] = new Option("Paper Feed", "O0401");
					options[2] = new Option("Toner Supply", "O0402");
				}
				break;
			case "O05":
				with(document.searchForm.option3){
					options[0] = new Option("Auto Focus / Zoom", "O0500");
				}
				break;
			case "O06":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "O0600");
				}
				break;
			case "T01":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "T0100");
					options[1] = new Option("Power Drive", "T0101");
					options[2] = new Option("Servo Mechanism", "T0102");
				}
				break;
			case "T02":
				with(document.searchForm.option3){
					options[0] = new Option("in general", "T0200");
				}
				break;
		}
		document.searchForm.option3.selectedIndex = 0;
	}
	
	function deleteOpt(category)
	{
		var length = eval("document.searchForm." + category + ".options.length");
		while (length)
		{
			length--;
			eval("document.searchForm." + category + ".options[length] = null;");
		}
	}
