﻿function add(id, n)
{
    n = (typeof n == 'undefined') ? 1 : n;

    var xmlhttp = createXMLHTTPObject();
    xmlhttp.open("GET", '_add.php?id='+id+'&n='+n, false);
    xmlhttp.send(null);

    if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
    {
        document.getElementById('kosar').innerHTML = xmlhttp.responseText;
       
    }
    else
    {
        alert(xmlhttp.responseText);
    }
}

function del(id)
{
    add(id, -1);
}
