function CountUp(uid,max,ret,id)
{
	var countcur = parseFloat($('#'+uid).text());
	count = countcur + 1;
    if(countcur >= max)
    {
        count = max;
    }
    else
    {
        $('#'+uid).html(count);
        GetData('shopcart','go<#>resumm<|>type<#>up<|>uid<#>'+id+'<|>count<#>1<|>countnew<#>'+count+'',ret,'ajax');
    }
}
function CountDown(uid,max,ret,id)
{
    var countcur = parseFloat($('#'+uid).text());
	count = countcur - 1;
    if(count < 1)
    {
        count = 1;
    }
    else
    {
        $('#'+uid).html(count);
        GetData('shopcart','go<#>resumm<|>type<#>down<|>uid<#>'+id+'<|>count<#>1<|>countnew<#>'+count+'',ret,'ajax');
    }
}
function myconfirm(uid)
{
    jConfirm('Вы уверены что хотите удалить позицию?', 'Подтверждение', function(result) {
        if(result === true)
        {
            GetData('shopcart','go<#>del<|>uid<#>'+uid+'','row_'+uid+'','ajax');
        }        
    });
}
function myconfirmclear(mid)
{
    jConfirm('Вы уверены что хотите очистить корзину?', 'Подтверждение', function(result) {
        if(result === true)
        {
            $('#shopcart_clear').html('');
            $('#shopcart_order_form').html('');
            $('#shopcart_main').html('');
            GetData(mid,'go<#>clear','orderlist','ajax');
        }        
    });
}
function Modal()
{
    var allDialogs = [];
    var dialog = new Boxy("<div id='shopcartbox'></div>", {
        modal: true,
        unloadOnHide:true, 
        title:'Корзина',
        fixed:false,
        closeText:'<img src="/img/sys/boxy_close.png" />',
        y:true
    });
    allDialogs.push(dialog);
    return false;
}

