 
 /* here is the stuff i pulled out of the page */
 	var strChooseBrand = 'Choose Printer Brand...';
	var strChooseType = 'Choose Printer Family...';
	var strChooseModel = 'Choose Printer Model...';
	var strChooseCart = "Choose Cartridge #...";

	// Clear select element's records **********************************************
	function ClearList(OptionList,Caption) 
	{	
		OptionList.length = 0;
		OptionList.options[0] = new Option(Caption,'');
		OptionList.options[0].selected = true;
	}

	// First Select Element initialization *****************************************
	function Init(parent, Caption, BrandPredefinedIndex) 
	{

		ClearList(parent.brand, Caption);
		ClearList(parent.model, '');
		ClearList(parent.cart, '');

		for (var i = 0; i < BrandList.length; i++) {
			if (BrandList[i]) {
				AddOptionToSelectElement(parent.brand, BrandList[i], BrandList[i]);
			}
		}

		if (BrandPredefinedIndex > 0) {
			parent.brand.options[BrandPredefinedIndex].selected = true;
			RefreshList(parent, 'brand');
		}
	}

	// Add record to the SelectElement *********************************************
	function AddOptionToSelectElement(SelectElement, OptionText, OptionValue)
	{
		var SelectElementOptions = SelectElement.options;
		var Where;
		if (SelectElementOptions.length < 0) { Where = 0; }
		else { Where = SelectElementOptions.length; }
		SelectElementOptions[Where] = new Option(OptionText, String(OptionValue).replace(/\//g, '-'));
	}

	// Load models for appropriate Brand and Type ***********************************
	function LoadModels(parent,TypeIndex,BrandIndex) 
	{
		var i = 0;
		if (ModelList[BrandIndex][TypeIndex] )  {
			names = ModelList[BrandIndex][TypeIndex];
			for (i=0; i < names.length; i++) {
				parent.model.options [i+1] = new Option (names[i], names[i]); 
			}
		}
		parent.model.options[0].selected = true;
		return i;
	}

	// Load models for appropriate Brand and Type ***********************************
	function LoadCarts(parent,BrandIndex) 
	{
		var i = 0;
		if (CartList[BrandIndex] )  {
			var names = CartList[BrandIndex];
			var values = CartListOEM[BrandIndex];
			for (i=0; i < names.length; i++) {
				
				parent.cart.options [i+1] = new Option (names[i], values[i]); 
			}
		}
		parent.cart.options[0].selected = true;
		return i;
	}
	// Load models for appropriate Brand and Type ***********************************
	function LoadTypes(parent,BrandIndex) 
	{
		var i = 0;
		if (FamilyList[BrandIndex] )  {
			names = FamilyList[BrandIndex];
			for (i=0; i < names.length; i++) {
				parent.type.options [i+1] = new Option (names[i], names[i]); 
			}
		}
		parent.type.options[0].selected = true;
		return i;
	}

	// Refresh select records *******************************************************
	function RefreshList(parent, ElementName) 
	{	
		if (ElementName == "brand") {
			var CurrentBrandIndex = parent.brand.selectedIndex;
			ClearList(parent.model, strChooseModel);
			

		} else if (ElementName == "cart") {

			var CurrentBrandIndex = parent.brand.selectedIndex-1;		
			ClearList(parent.cart, strChooseCart);
			if (! LoadCarts(parent, CurrentBrandIndex) ) {
				ClearList(parent.cart, '');
			}
		} else if (ElementName == "type") {

			var CurrentBrandIndex = parent.brand.selectedIndex-1;		
			ClearList(parent.type, strChooseType);
			if (! LoadTypes(parent, CurrentBrandIndex) ) {
				ClearList(parent.type, '');
			}
		} else if (ElementName == "model") {
			var CurrentTypeIndex = parent.type.selectedIndex-1;
			var CurrentBrandIndex = parent.brand.selectedIndex-1;		
			ClearList(parent.model, strChooseModel);
			if (! LoadModels(parent, CurrentTypeIndex, CurrentBrandIndex) ) {
				ClearList(parent.model, '');
			}
		}
	}

