// item : sku code of product being clicked on
// function is called when a user clicks on a product in the fluid scroller.
// we redirect user to the product page.
function handleMerchandiserClick(item) {
	window.location.href= window.location.protocol + "//" + window.location.hostname + contextPath + "/util/go_to_product.jsp?sku_code=" + item;
}

// called from product page which add product to session which will be retrieve when rendering my table.
function addToMyTable(product_id, context) {
	new Ajax.Request(context + '/util/fluid_add_to_my_table.jsp', {
		method: 'post',
		parameters: { randid: Math.random() },
		postBody: 'product_id=' + product_id,
		onSuccess: function(transport) {
			alert('Product has been added to your table');
		}
	});
}
