		var chairs = new Array('chairs_contemporary_side_chair.html',
			'chairs_lounge_seating.html','chairs_executive_seating.html',
			'chairs_traditional_side_chair.html','chairs_wood_side_chair.html');
		var desks = new Array();
		var tables = new Array();
		var stations = new Array('work_stations_native.html','work_stations_jofco_caseworks_modern.html');
		var shelving = new Array('cabinets_shelving_4_post.html','cabinets_mayline_techworks.html');
		var files = new Array();
		var folders = new Array();
		var labels = new Array();
		var computers = new Array();
		var allCategories = new Array();
		allCategories['desks'] = desks;
		allCategories['tables'] = tables;
		allCategories['chairs'] = chairs;
		allCategories['stations'] = stations;
		allCategories['shelving'] = shelving;
		allCategories['files'] = files;
		allCategories['folders'] = folders;
		allCategories['labels'] = labels;
		allCategories['computer'] = computers;


		function nextProduct(direction,productType)
		{
			var urlRoot = document.location.href.substr(0,document.location.href.lastIndexOf('/') + 1)
			var currentCategory = document.location.href.substr(document.location.href.lastIndexOf('/') + 1);
			var products = allCategories[productType];
			var currentIndex = -1;
			var newIndex = -1;
			for(var i=0;i<products.length;i++)
			{
				if(currentCategory == products[i])
				{
					currentIndex = i;
				}
			}
			if(currentIndex > -1)
			{
				// goto next position if at the beginning or end of the array
				if( (currentIndex == 0) && (direction == -1) ) newIndex = products.length - 1;
				else if( (currentIndex == (products.length - 1)) && (direction == 1) ) newIndex = 0;
				else newIndex = currentIndex + direction;// goto next position in array
			}
			document.location.href = urlRoot + products[newIndex];
		}
	
		function getProductAry(prod)
		{
			var productAry = null;
			for(prop in allCategories)
			{
				var val = allCategories[prop];
				alert(val + " = " + prod);
				if(val == prod)
				{
					productAry = allCategories[prop];
				}
			}
			return allCategories[prod];
		}
