

	// browser detection and such...
	
	// if the browser version is below 4 (browser doesn't support DHTML), redirect accordingly...
	if (parseInt(navigator.appVersion) < 4) location.replace("nodhtml.html");
	
	isIE4 = (document.all)? true:false;
	isNav4 = (document.layers)? true:false; 
	isNav6 = (document.getElementById)? true:false;
	isMac = (navigator.platform.indexOf("Mac") == -1)? false : true;
	if (isIE4) isNav6 = false;
	
	if (isNav4){ 
		doc = "document."; sty = ""; t = ".top"; l = ".left"; 
		style_sheet_include = "<link rel=stylesheet href='../style/global_nn.css' type='text/css'>";
	}
	else if (isIE4){ 
		doc = "document.all."; sty = ".style"; t = ".pixelTop"; l = ".pixelLeft";
		style_sheet_include = "<link rel=stylesheet href='../style/global_ie.css' type='text/css'>";
	}
	else if (isNav6){
		doc = "document.getElementById('"; sty = "').style"; t = ".top"; t = ".left";
		style_sheet_include = "<link rel=stylesheet href='../style/global_ie.css' type='text/css'>";
	}

	if (isMac) style_sheet_include = "<link rel=stylesheet href='../style/global_mac.css' type='text/css'>";

	// rollover function...
	function swap(img, to_state){ eval("document." + img + ".src = " + img + to_state + ".src"); }
	
	function swap_lyr(img, to_state, lyr){
		if (isNav4)	eval("document." + lyr + ".document." + img + ".src = " + img + to_state + ".src"); 
		else swap(img, to_state);
	}
		
	function check_dropdown(form_name, dd_name, err_id, lyr){
		var error_message_1 = "Please make a selection.";
		var error_message_2 = "Please make all selections.";
		if (isNav4){
			if (lyr) dropdown = eval("document." + lyr + ".document." + form_name + "." + dd_name);
			else dropdown = eval("document." + form_name + "." + dd_name);
		}
		else dropdown = eval("document." + form_name + "." + dd_name);
		if ((dropdown.selectedIndex < 2) || (dropdown.options[dropdown.selectedIndex].value == "")){
			dropdown.selectedIndex = 0;
			eval("alert(error_message_" + err_id + ")");
		}	
		else
			document.location.href = dropdown.options[dropdown.selectedIndex].value;
	}	

	// resize handler for Netscape Navigator...
	if (isNav4){
		document.captureEvents(Event.RESIZE);
		window.onresize=handle_resize;
	}
		
	var ws = window.innerWidth; var hs = window.innerHeight;		

	function handle_resize(){
		if (isNav4){
			if ((window.innerWidth != ws) || (window.innerHeight != hs)) 
				window.location.href = window.location.href;
		}
	}	

   function set_all_checkboxes(to_state){
       var total_checkboxes = document.global_search.elements.length - 5;
       for (var i=0; i <= total_checkboxes; i++){
           eval("document.global_search.param" + i + ".checked = " + to_state);
       }
   }

  



		// dynamic dropdown - global variables...
		var first_option_index = 2;		// first option (0 is 'choose a ...' 1 is a dashed line)
		
		// object constructors /////////////////////////////////////////////////
		function dyn_dropdown(form_name, lyr){
			this.form = form_name;
			this.lyr = lyr;
			this.form_reference = form_reference;
			this.brands = new Array();
			this.add_brand = add_brand;
			this.load_brands = load_brands;
			this.change_brand = change_brand;
			this.load_choices = load_choices;
			this.clear_choices = clear_choices;
		}
		
		function form_reference(){
			var form_obj = null;
			if (isNav4){
				if (this.lyr) form_obj = eval("document." + this.lyr + ".document." + this.form);
				else form_obj = eval("document." + this.form);
			}
			else form_obj = eval("document." + this.form);			
			return form_obj;
		}
		
		function add_brand(name){
			this.brands[this.brands.length] = new brand(name);
		}		
		
		function load_brands(){
			var i = first_option_index;
			var form_obj = this.form_reference();
			for (var j = 0; j < this.brands.length; j++){
				form_obj.brand.options[i] = new Option(this.brands[j].name, this.brands[j].name);
				i++;
			}
		}
		
		function change_brand(){
			var form_obj = this.form_reference();
			this.clear_choices();
			this.load_choices(form_obj.brand.selectedIndex);      
		}		
		
		function clear_choices(){
			var form_obj = this.form_reference();
			total_choices = form_obj.elements[1].length;
			for (var i = first_option_index; i < total_choices; i++){	
				form_obj.elements[1].options[i] = new Option('','');
			}
			form_obj.elements[1].options.length = 2;
		}

		function load_choices(brand_index){
			var form_obj = this.form_reference();
			if (brand_index < first_option_index)	form_obj.brand.selectedIndex = 0;
			else {
				var selected_brand = eval(this.brands[brand_index-first_option_index]);
				var i = first_option_index;
				for (var j = 0; j < selected_brand.choices.length; j++){
					form_obj.choice.options[i] = new Option(selected_brand.choices[j].name, selected_brand.choices[j].id);
					i++;
				}
			}
		}		
		
		function brand(name){
			this.name = name;			// assign brand name
			this.choices = new Array();		// create an array of choices
			this.add_choice = add_choice;
			return this;
		}		
		
		function choice(name, id){
			this.name = name;
			this.id = id;
			return this;
		}
		
		function add_choice(name, id){
			this.choices[this.choices.length] = new choice(name, id);
		}
	

