/**
 * delFromSampleBasket
 *
 * @copyright  2009 Daniel Mundt <daniel.mundt@loko-media.com>
 * @license    http://www.loko-media.com/
 * @version    0.0
 * @since      Function available since Release 0.0
 *
 * @param      string $strArticle   article id used for ajax applications
 */
function delFromSampleBasket(article){
    var strDiv = "detailBarContent";
    var  strExePath = "/modules/delItemSampleBasket/index.php?article=" + article;

    //browser switch
    if(document.all){
        var strDivBrowser = document.all[strDiv];
    }else{
        var strDivBrowser = document.getElementById(strDiv);
    }

    //request executable script
    var xmlhttp = null;

    // Mozilla
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.open("GET", strExePath, true);

    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState != 4) {
            strDivBrowser.style.display = "block";
            strDivBrowser.innerHTML = 'Der Artikel wird gelöscht. Bitte warten ...';
        }

        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            strDivBrowser.style.display = "none";
            location.reload();
            var objFeedback = window.alert(xmlhttp.responseText);
        }
    }
    xmlhttp.send(null);
}