try 
{	
	document.execCommand("BackgroundImageCache", false, true);
} 
catch(err) 
{
}

window.onload = function()
{
	if (document.getElementById('products_container')) 
	{
		productsContainer = document.getElementById('products_container');
		productsContainer.scrollTop = scrollHeight;
		if (productsContainer.scrollHeight > productsContainer.offsetHeight)
		{
			if (document.getElementById('products_list_up'))
			{
				document.getElementById('products_list_up').style.display = 'block';
			}
			if (document.getElementById('products_list_down'))
			{
				document.getElementById('products_list_down').style.display = 'block';
			}
			if (document.getElementById('products_list_up_fake'))
			{
				document.getElementById('products_list_up_fake').style.display = 'block';
			}
			if (document.getElementById('products_list_down_fake'))
			{
				document.getElementById('products_list_down_fake').style.display = 'block';
			}
		}
		if (document.getElementById('products_list'))
		{
			document.getElementById('products_list').style.visibility = 'visible';
		}
	}
	
	if (document.getElementById('left_block'))
	{
		var Container = document.getElementById('main_block');
		var LeftBlock = document.getElementById('left_block');
		LeftBlock.style.height = Container.offsetHeight + 'px';
	}
}


var scrolltimer = null;

function scrollDiv(direction, speed)
{
	divId = "products_container";
	if (document.getElementById(divId)) 
	{
		productsContainer = document.getElementById(divId);
		var change = 1;
		change = change * speed;
		
		if("top" == direction)
		{
			productsContainer.scrollTop = productsContainer.scrollTop + change;
		}
		else if("bottom" == direction)
		{
			productsContainer.scrollTop = productsContainer.scrollTop - change;
		}
		
		scrolltimer = window.setTimeout("scrollDiv('"+direction+"', '"+speed+"')", 15);
	}
}

function stopScrollDiv()
{
	clearTimeout(scrolltimer);
}
function openProduct(url)
{
	if (document.getElementById('products_container')) 
	{
		productsContainer = document.getElementById('products_container');
		document.location.href = url+'&scroll='+productsContainer.scrollTop;
	}
}
