<!--BEGIN rzb_js_productsearch -->
<!--
	var master = new List();

	function List() {
		this.content = new Array();
		this.add = List_add;
		this.get = List_get;
		this.size = List_size;
	}

	function List_add(name,value,ext) {
		len = this.content.length;
		this.content[len] = new Array();
		this.content[len]["name"] = name;
		this.content[len]["value"] = value;
		this.content[len]["ext"] = ext;
	}

	function List_get(identifier) {
		return this.content[identifier];
	}

	function List_size() {
		return this.content.length;
	}

	function startFilling() {
		max = master.size();
		for(var i = 0; i < max; i++) {
			newEntry = new Option(master.content[i]["name"],'',false,false);
			newEntry.id = master.content[i]["ext"];
			document.productsearch.products.options[document.productsearch.products.length] = newEntry;
		}
	}
	
	function changedProduct() {
		selected = document.productsearch.products.selectedIndex-1;
		//alert(selected);
		clearItems();
		if (selected >= 0) {
			value = master.content[selected]["value"];
			buildItemsFor(value);
		}
	}
	
	function changedItem() {
		selected = document.productsearch.items.selectedIndex;
		if (selected > 0) {
			newWind = document.productsearch.items.options[selected].id;
			link = document.productsearch.items.options[selected].value;
			if(newWind == "t") {
			  window.open(link,'','');
			} else {
			  window.location.href = link;
			};
		}
	}

	function buildItemsFor(items) {
		max = items.size();
		for(var i = 0; i < max; i++) {
			//alert(items.content[i]["id"]);
			newEntry = new Option(items.content[i]["name"],items.content[i]["value"],false,false);
			newEntry.id = items.content[i]["ext"];
			document.productsearch.items.options[document.productsearch.items.length] = newEntry;
		}
	}

	function clearItems() {
		document.productsearch.items.length = 1;
		document.productsearch.items.options[0].selected = true;
		//for(var i = 1; i < document.productsearch.items.length-1; i++) {
			//document.productsearch.items.options[i] = null;
		//}
	}
//-->
<!--END rzb_js_productsearch -->
