function validateForm(inOrderLine, inAction){

    switch(inAction){

        case 'chg':

            if(document.getElementById("Qty_" + inOrderLine).value == 0){
                if(!confirm("Setting the quantity to zero will remove this product from the cart.\nContinue?")){
                    return false;
                }
                else{
                    inAction = 'del';
                }
            }
            break;
            
        case 'del':
        
            if(!confirm("Are you sure you wish to remove this item from your shopping cart?")){
                return false;
            }
            break;
            
        default:
            break;
    }
    
	document.forms['frmShoppingCart'].txtOrderLineID.value = inOrderLine;
	document.forms['frmShoppingCart'].txtOrderLineQty.value = document.getElementById("Qty_" + inOrderLine).value;
	document.forms['frmShoppingCart'].txtActionTaken.value = inAction;
	document.forms['frmShoppingCart'].submit();

}
