function displayCategory(productGroup)
{
    window.location  = "/store?cat="+ productGroup + "&filterBV=" + filterBV
}

function showDetails(productId, bibleVersionId)
{		init_popupWindow('store/product_info', 680, 680,
               "pid=" + productId + "&bibleVersionId=" +
               bibleVersionId)
}

function addToCart(element, productId, bibleVersionId)
{
    var params = "pid="+  productId + "&bibleVersionId=" + bibleVersionId

    var f = function() {
        element.innerHTML="Added"
        new Ajax.Updater('cart_container', '/store/index_cart')
        afterCartAdded(view);
        interface_bugFix();

    }

    new Ajax.Updater('compact_cart_container', '/store/cart', {
		parameters: params,
		onComplete: f
	});
    return false;
}

// variant of the removeCartItem that work on the shop index page
function removeCartItemIndex(ordinal)
{
    new Ajax.Updater("cart_container", "/store/index_cart",
       {parameters: "n=" +ordinal})
    cartChanged = true
    return false
}

function discountCodeSubmit(form)
{
    new Ajax.Updater('cart_container', '/store/index_cart', {
		parameters: Form.serialize(form)
    });

}
