//general product addon to the cart

/** lock action control*/
var locker = new Locker();

/**
* onLoad init
* @param msg
*/
Event.observe(window, 'load', function() {
	updateOrderedProductsList(); 
});

/**
* Update ordered products table
*/
function updateOrderedProductsList()
{
	new Ajax.Request(site_path + 'products/add_basket.php',
		{method:'post', onSuccess:onSuccessUpdateList});
}

/**
* Remove all rows with td in the table
* @param string identifier of the tbody or table tag to be cleared
*/
function clearTableContent(element_id)
{
	$(element_id).select('tr').each(function(child)
	{
		if (child.down().match('td'))
			child.remove();
	});
}


