function redirect_form(search_form)
{
	dimensions = new Array
	(
		'lenght_inside',
		'width_inside',
		'height_inside',
		'height_inside_bottom',
		'height_inside_top',
		'lenght_outside',
		'width_outside',
		'height_outside'
	);

var shortKeys = 	
	{
		'lenght_inside':'li',
		'width_inside':'wi',
		'height_inside':'hi',
		'height_inside_bottom':'hib',
		'height_inside_top':'hit',
		'lenght_outside':'lo',
		'width_outside':'wo',
		'height_outside':'ho',
		'categories_id':'cid',
		'inc_subcat':'incs',
		'manufacturers_id':'mid',
		'search_in_description':'sid',
		'keywords':'kws'
	};

	formElements = new Array
	(
		'osCsid',
		'keywords',
		'categories_id',
		'manufacturers_id',
		'pfrom',
		'pto',
		'search_in_description',
		'custom_checkbox_search_products_property_tropicalised',
		'custom_checkbox_search_products_property_waterproof',
		'custom_checkbox_search_products_property_fittofly',
		'custom_checkbox_search_products_property_dustproof',
		'custom_checkbox_search_products_property_impactproof'
	);
	
	var actionString = search_form.action + '?';
	var prop = '';
	for (var elem in formElements)
	{
		if (search_form.elements[formElements[elem]] != null)
		{
			if (search_form.elements[formElements[elem]].type == 'text')
			{
				search_form.elements[formElements[elem]].value = search_form.elements[formElements[elem]].value.replace(/(^\s+|\s+$)/, "");
				if (search_form.elements[formElements[elem]].value.length != 0)
				{
					if (shortKeys[formElements[elem]] != null)
					{
						actionString += shortKeys[formElements[elem]] + "=" + search_form.elements[formElements[elem]].value + "&";
					}
					else
					{
						actionString += formElements[elem] + "=" + search_form.elements[formElements[elem]].value + "&";
					}
				}
			}
			else if (search_form.elements[formElements[elem]].type == 'select-one')
			{
				if (search_form.elements[formElements[elem]].options[search_form.elements[formElements[elem]].selectedIndex].value.length != 0)
				{
					if (shortKeys[formElements[elem]] != null)
					{
						actionString += shortKeys[formElements[elem]] + "=" + 
						search_form.elements[formElements[elem]].options[search_form.elements[formElements[elem]].selectedIndex].value + "&";
					}
					else
					{
						actionString += formElements[elem] + "=" + 
						search_form.elements[formElements[elem]].options[search_form.elements[formElements[elem]].selectedIndex].value + "&";
					}
					if 
					(
						(formElements[elem] == 'categories_id') && 
						(search_form.elements['inc_subcat'].checked == true)
					)
					{
						actionString += 'incs=1&';
					}
				}
			}
			else if 
			(
				(search_form.elements[formElements[elem]].type == 'checkbox') &&
				(search_form.elements[formElements[elem]].checked == true)
			)
			{
				if (formElements[elem].substr(0, 41) == 'custom_checkbox_search_products_property_')
				{
					prop += formElements[elem].substr(41,1);
				}
				else
				{
					if (shortKeys[formElements[elem]] != null)
					{
						actionString += shortKeys[formElements[elem]] + "=1&";
					}
					else
					{
						actionString += formElements[elem] + "=" + search_form.elements[formElements[elem]].checked + "&";
					}
				}
			}
		}
	}
	
	if (prop.length > 0)
	{
		actionString += 'prop=' + prop + '&';
	}
	
	for (var dimension in dimensions)
	{
		search_form.elements['dimension_products_' + dimensions[dimension]].value
		 = search_form.elements['dimension_products_' + dimensions[dimension]].value.replace(/[^\d]/, "");
		
		if(search_form.elements['dimension_products_' + dimensions[dimension]].value.length != 0)
		{
			
			if 
			(
				search_form.elements['dimension_range_products_' + dimensions[dimension]].options[search_form.elements['dimension_range_products_' + dimensions[dimension]].selectedIndex].value
				== 'tolerance'
			)
			{
				actionString += shortKeys[dimensions[dimension]] +
				'=t' +
				search_form.elements['dimension_products_' + dimensions[dimension]].value +
				search_form.elements['dim_meas_dir_prod_' + dimensions[dimension]].options[search_form.elements['dim_meas_dir_prod_' + dimensions[dimension]].selectedIndex].value.replace(/[^pm]/g, '') +
				search_form.elements['dimension_tolerance_products_' + dimensions[dimension]].value +
				search_form.elements['dimension_measure_products_' + dimensions[dimension]].options[search_form.elements['dimension_measure_products_' + dimensions[dimension]].selectedIndex].value.substr(0,1) +
				'&';
			}
			else
			{
				actionString += shortKeys[dimensions[dimension]] + 
				'=' + search_form.elements['dimension_range_products_' + dimensions[dimension]].options[search_form.elements['dimension_range_products_' + dimensions[dimension]].selectedIndex].value.substr(2,1) +
				search_form.elements['dimension_products_' + dimensions[dimension]].value +
				'&';
			}
		}
		
	}
	window.location = actionString.replace(/\s+/g, '+').replace(/&$/, "");
	return false;
}