
function tuwas() {
    alert("hi");
}

function showImage(aImg,posX,posY,imgWidth,imgHeight,imgDescr) {
    // alert(document.body.scrollTop);
    var Container = document.createElement("DIV");

    if(document.getElementById("shadow") == null) {
        var shadow = document.createElement("DIV");
        shadow.id = "shadow";
        // document.body.appendChild(shadow);
    }
    var img = document.createElement("IMG");
    img.src = aImg;
    img.onclick = function() {
        document.body.removeChild(Container);
        // document.body.removeChild(document.getElementById("shadow"));
    }
    Container.appendChild(img);
    Container.style.position = "absolute";
    Container.style.left = posX + "px";
    Container.style.top = parseInt(posY) + parseInt(document.body.scrollTop) + "px";
    Container.style.zindex = "500";
    document.body.appendChild(Container);

    
   /*
    XGetRequest(url);


   removePopup(block.getAttribute("target"));
   Container.id = block.getAttribute("target");   // alert(); return;
   Container.style.position = "absolute";
   Container.style.left = block.getAttribute("posX") + "px";
   Container.style.top = block.getAttribute("posY") + "px";
   Container.style.zindex = "200";
   Inhalt = block.getElementsByTagName("content")[0].firstChild.nodeValue;
   Container.innerHTML = Inhalt;      // menuID + ": </br>" +
   document.body.appendChild(Container); */
}

function lightbox(imageID) {
    var shadow = document.createElement("DIV");
    shadow.id = "SHADOW";
    document.body.appendChild(shadow);

    url = "image.php?imageID=" + imageID;
    XGetRequest(url);
}

function nextLightbox(imageID) {
    removePopup("LIGHT");
    url = "image.php?imageID=" + imageID;
    XGetRequest(url);
}

function closeLightbox(imageID) {
    removePopup("LIGHT");
    removePopup("SHADOW");
}
