﻿//  Update and reload the cart

function cartupdateandview(productid, styleid, weight) {

    if (weight === undefined) {
        weight = 'light';
    }

    var currentimagename = document.getElementById("ctl00_contentmain_hiddencurrentimagename");

    //alert('/CartUpdateAndView.aspx?add=y&productid=' + productid + '&image=' + currentimagename.value);
    $('#ShoppingCart').load('/CartUpdateAndView.aspx?add=y&productid=' + productid + '&styleid=' + styleid + '&image=' + currentimagename.value + '&weight=' + weight + '&' + Math.random(), function() {
    });

}


function cartitemplus(cartitemid, orderimage) {

    $('#ShoppingCart').load('/CartUpdateAndView.aspx?add=y&itemid=' + cartitemid + '&image=' + orderimage + '&' + Math.random(), function() {
    });
}

function cartitemminus(id) {

    $('#ShoppingCart').load('/CartUpdateAndView.aspx?del=y&itemid=' + id + '&' + Math.random(), function() {
    });

}


