function filterbyBrand(brand_id,orig_url)
{
	document.getElementById("brand_id_filter").value = brand_id;
	document.cat_form.action = orig_url;
	document.cat_form.submit();
}
if(screen.width>=1400)
{
	<!--1400 -->
	writeCookie('18');
}
else if(screen.width>=1280)
{
	<!--1200 -->
	writeCookie('16');
}			
else 
{
	<!--1024 -->
	writeCookie('10');
}
<!--
function destroyCookie(total)
{
	var total;
	var today = new Date();
	var the_date = new Date("December 31, 2001");
	var the_cookie_date = the_date.toGMTString();
	var the_cookie = "totalBrand=";
	var the_cookie = the_cookie + ";expires=" + the_cookie_date;
	document.cookie=the_cookie;
}

function writeCookie(total)
{
	var total;
	var today = new Date();
	var the_date = new Date("December 31, 2013");
	var the_cookie_date = the_date.toGMTString();
	var the_cookie = "totalBrand=" + total;
	var the_cookie = the_cookie + ";expires=" + the_cookie_date;
	document.cookie=the_cookie;
}
