function bookMark(id) {

    if (document.getElementById('fav' + id).src.indexOf("/fav.gif")>0) {
        strURL = "/bookmark.aspx?id=" + id;
        strImg = "/grafik/unfav.gif";
    }
    else {
        strURL = "/bookmark.aspx?r=1&id=" + id;
        strImg = "/grafik/fav.gif";
      
    }
     
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    else {// code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById('fav' + id).src = strImg;
            document.getElementById('fav' + id).title = '';
        }
    }
    xmlhttp.open("GET", strURL, true);
    xmlhttp.send();
}


function removeElement(id) {
    var el = document.getElementById(id);
    el.parentNode.removeChild(el);
}
