function addToCard(omschrijving, aantal, tag, stukprijs)
{
     new Ajax.Request('/admin_bin/addToShoppingCart.aspx?omschrijving=' + omschrijving + '&aantal=' + aantal + '&tag=' + tag + '&stukprijs=' + stukprijs, { onSuccess:addToCard_Do, onFailure:null, onError:null});
     $('winkelmandje_show').style.display = 'none';
     $('winkelmandje_moment').style.display = '';
}

function addToCard_Do(t)
{
    try 
    {
        if (t.responseText != "ERROR")
        {
           $('winkelmandje_show').innerHTML = t.responseText;
        }
        $('winkelmandje_moment').style.display = 'none';
        $('winkelmandje_afreken').style.display = '';
        $('winkelmandje_show').style.display = '';
        $('winkelmandje_head').style.display = '';
    }
    catch (err)
    {
        alert(err.message);
    }
}


function getPageTop(oElement)
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetTop;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;

}

function getPageLeft(oElement)
{
    var iReturnValue = 0;
    while( oElement != null ) 
    {
        iReturnValue += oElement.offsetLeft;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}


function showImageOnObject(obj, imageFile)
{
    var img = new Image();
    img.src = imageFile;
    img.style.position = "absolute";
    img.style.top = getPageTop(obj);
    img.style.left = getPageLeft(obj);
    img.style.display = 'none';
    img.style.border = '1px solid #c7ccd0';
    document.body.appendChild(img);
    new Effect.Appear(img, {duration: 0.2, to: 0.9 });
    img.onmouseout = new Function("new Effect.Fade(this, {duration: 0.2, to: 0 });");
    img.onclick = new Function("new Effect.Fade(this, {duration: 0.2, to: 0 });");
}
