var furniture = new furniture();

function furniture()
{
	this.searchFurniture = function(page)
	{
		if (!page)
			page = 1;

		$('fs_p').value = page;
		//window.location = "/main/products.php?"+Form.serialize('wt_form')+'&fs_p='+page;
		$('wt_menu').submit();
	}
	
	
	this.searchFurnitureBrand = function(brandSelectObj)
	{
		window.location = brandSelectObj.options[brandSelectObj.selectedIndex].value;
		brandSelectObj.selectedIndex = 0;
	}
	
	this.searchFurnitureDesigner = function(designerSelectObj)
	{
		window.location = designerSelectObj.options[designerSelectObj.selectedIndex].value;
		designerSelectObj.selectedIndex = 0;
	}
	
	this.furnitureMNChanged = function()
	{
		var mn = $('fs_mn').options[$('fs_mn').selectedIndex].value;
		$('fs_mn').selectedIndex = 1;
		if (mn != '' && mn != -1)
			//window.open(mn,'_blank','directories=0,menubar=0,scrollbars,resizable');
			window.location = mn;
		else
			furniture.searchFurniture();
	}
	
	
	this.searchFurnitureCategory = function(catSelectObj)
	{
		$('fs_cat').value = catSelectObj.options[catSelectObj.selectedIndex].value;
		furniture.searchFurniture();
	}
	
	this.searchFurnitureOption = function(radio_button)
	{
		$(radio_button).checked = true;
		furniture.searchFurniture();
	}	
	
	
	this.furnitureClearSearch = function()
	{
		$('fs_cat').value = '';
		if ($('fs_cs'))
			$('fs_cs').selectedIndex = 0;
		$('fs_mn').selectedIndex = 0;
		$('fs_d').selectedIndex = 0;
//		$('fs_c').selectedIndex = 0;
		$('fs_s').selectedIndex = 0;
		$('fs_s1').selectedIndex = 0;
		$('fs_l').selectedIndex = 0;
		$('fs_io_all').checked = true;
		$('fs_loc').value = '';
		
		furniture.searchFurniture(1);
	}
}