// (c) 2002-2004 by  T.Bley | UltraMixer

//window.captureEvents(Event.LOAD);
//window.onabort =  test;

function test(evt)
{
	//alert (evt.pageX); //NS, Mozilla
	//alert(event.x);
	if(document.getElementById("popup").style.visibility=="visible")
	{
	    hidePopup();
	}
}

function hidePopup()
{
  document.getElementById("popup").style.visibility = "hidden";
}


function showPopup(evt)
{
var xc;
var yc;
	//if(isIE4 || isOP7)
if(window.event)
	{
        xc = window.event.x;
        yc = window.event.y;
	}
	else
	{
		xc = evt.pageX;
		yc = evt.pageY;
	var pos = findPos(document.getElementById("dlbutton"));
	xc = pos[0];
//	yc = pos[1];
xc = 300;
yc = 540;
	}

    //viewportheight=(document.compatMode=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;
    //xc=Math.round((document.body.clientWidth/2)-109);
    //yc=Math.round((viewportheight/2)-32)+document.body.scrollTop;

    // reposition div

    if(document.layers)
{
    document.getElementById("popup").left = xc;
    document.getElementById("popup").top = yc;
}
else
{
    //dom
    document.getElementById("popup").style.left = xc + "px";
    document.getElementById("popup").style.top = yc + "px";
}


    //op
    if (isOP6)
	{
        document.getElementById("popup").style.pixelLeft = xc;
        document.getElementById("popup").style.pixelTop = yc-document.body.scrollTop;
	}

    // show div
    document.getElementById("popup").style.visibility = "visible";
}
