quick_search_data = new Array();

i = 0;

quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/stainlesscups.jpg';
quick_search_data[i]['link'] = '/products/cups_bushings.asp';
quick_search_data[i]['text'] = '<h3>Cups</h3><p>Porous Cups provide additional surface area for improved life and permeability compared to discs. <br><a href="'+quick_search_data[i]['link']+'">Learn more about Porous Cups >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/bushings.jpg';
quick_search_data[i]['link'] = '/products/cups_bushings.asp';
quick_search_data[i]['text'] = '<h3>Bushings</h3><p>Porous Bushings provide additional porous surface area for improved life and permeability compared to discs. <br><a href="'+quick_search_data[i]['link']+'">Learn more about Bushings >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/discs.jpg';
quick_search_data[i]['link'] = '/products/discs.asp';
quick_search_data[i]['text'] = '<h3>Discs</h3><p> Porous Metal Discs are used as filters, frits, snubbers, aerators, or as base components or assemblies. <br><a href="'+quick_search_data[i]['link']+'">Learn more about Discs >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/flame.jpg';
quick_search_data[i]['link'] = '/products/flame_arrestors.asp';
quick_search_data[i]['text'] = '<h3>Flame Arrestors</h3><p>Flame Arrestors are used in many process/analytical instrument applications as safety devices for handling combustible gases. <br><a href="'+quick_search_data[i]['link']+'">Learn more about Flame Arrestors >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/restrictors.jpg';
quick_search_data[i]['link'] = '/products/restrictors.asp';
quick_search_data[i]['text'] = '<h3>Restrictors</h3><p>Analytical/Process Instruments use restrictors as Calibrated leaks, timing devices, fuses, vents, breathers, and fluid metering devices. <br><a href="'+quick_search_data[i]['link']+'">Learn more about Restrictors >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/tubes.jpg';
quick_search_data[i]['link'] = '/products/tubes.asp';
quick_search_data[i]['text'] = '<h3>Tubes</h3><p>Porous Seamless Tubes can be manufactured in outside diameters ranging from 0.25î (6.35 mm) to 3î (50.8 mm). <br><a href="'+quick_search_data[i]['link']+'">Learn more about Tubes >></a></p>';

i++;
quick_search_data[i] = new Array();
quick_search_data[i]['image'] = '/images/quick-search/spargers.jpg';
quick_search_data[i]['link'] = '/products/spargers.asp';
quick_search_data[i]['text'] = '<h3>Spargers</h3><p>Porous Sintered metal tube assemblies are used as Spargers, Carbonators, Bubblers and Aerators. The Porous Metal tubes are used to agitate liquids, to add controlled amounts of gases to beverages and chemical processes and to improve heat transfer in a process.<br><a href="'+quick_search_data[i]['link']+'">Learn more about Spargers >></a></p>';


var last_page_product_index = parseInt(read_cookie('quick_search_number'));
if (isNaN(last_page_product_index)) {
	var current_product_index = 1;
} else {
	var current_product_index = last_page_product_index;
}

var product_count = quick_search_data.length;

function focus_product(product_id) {

	current_product_index = product_id;

	product_image = get_element('quick-search-product-image');
	product_image_link = get_element('quick-search-product-image-link');
	product_text_div = get_element('quick-search-product-text');
	
	product_image.src = quick_search_data[current_product_index]['image'];
	product_image_link.href = quick_search_data[current_product_index]['link'];
	product_text_div.innerHTML = quick_search_data[current_product_index]['text'];
	
	create_cookie('quick_search_number', current_product_index+1);

}

function change_product(direction) {
	
	if (direction == 1 && product_count == current_product_index + 1)
		current_product_index = 0;
	else if (direction == -1 && current_product_index == 0){
		current_product_index = product_count - 1;
	}
	else {
		current_product_index = current_product_index + direction;
	}
	product_image = get_element('quick-search-product-image');
	product_image_link = get_element('quick-search-product-image-link');
	product_text_div = get_element('quick-search-product-text');
	
	product_image.src = quick_search_data[current_product_index]['image'];
	product_image_link.href = quick_search_data[current_product_index]['link'];
	product_text_div.innerHTML = quick_search_data[current_product_index]['text'];
	
	create_cookie('quick_search_number', current_product_index+1);
}

function next_product() {
	change_product(1);	
}

function previous_product() {
	change_product(-1);	
}