function changeTab(type,keyword) // for tab changing
{
	if(type=='books')
	{
		document.search_form.action = 'search_results_books.php?q='+keyword;
	}
	else
	{
		document.search_form.action = 'search_results.php?q='+keyword;
	}
	document.getElementById('ty').value = type;
	document.getElementById('search_form').submit();
}
function BrandCat(type,id,cnt,cat_name,url_new) // for left part brand/category products
{
	document.search_form.action = url_new;
	document.getElementById('ty').value = type;
	document.getElementById('cid').value = id;
	document.getElementById('ctc').value = cnt;
	document.getElementById('cname').value = cat_name;	
	document.getElementById('search_form').submit();
}
function morecat(type)
{
	if(trimAll(type) == 'category')
	{
		document.getElementById('more_category_left').style.display = '';
		document.getElementById('more_lcat').style.display = 'none';
	}
	else if(trimAll(type) == 'brand')	
	{
		document.getElementById('more_brand_left').style.display = '';
		document.getElementById('more_lbrand').style.display = 'none';
	}
}
function changeTabPopular(type,url) // for tab changing
{
	document.search_form.action = url;
	document.getElementById('ty').value = type;
	document.getElementById('search_form').submit();
}
