function showWindow(windowname)
{
    var Fenster = document.getElementById(windowname);
    centerElement(Fenster);
    Fenster.style.display = 'block';
}

function hideWindow(windowname)
{
    var Fenster = document.getElementById(windowname);
    Fenster.style.display = 'none';
}

function centerElement(element)
{
    var offx,offy;
    if (self.pageYOffset) // all except Explorer
    {
    	offx = self.pageXOffset;
    	offy = self.pageYOffset;
    }
    else if (document.documentElement && document.documentElement.scrollTop)
    	// Explorer 6 Strict
    {
    	offx = document.documentElement.scrollLeft;
    	offy = document.documentElement.scrollTop;
    }
    else if (document.body) // all other Explorers
    {
    	offx = document.body.scrollLeft;
    	offy = document.body.scrollTop;
    }
    //alert(offx + '/' + offy);

    var innerx,innery;
    if (self.innerHeight) // all except Explorer
    {
    	innerx = self.innerWidth;
    	innery = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    	// Explorer 6 Strict Mode
    {
    	innerx = document.documentElement.clientWidth;
    	innery = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
    	innerx = document.body.clientWidth;
    	innery = document.body.clientHeight;
    }
    //alert(innerx + '/' + innery);

    var ex, ey;
    ex = element.style.width;
    ey = element.style.height;
    ex = ex.replace(/px/g, '');
    ey = ey.replace(/px/g, '');
    //alert(ex + '/' + ey);

/*
    var ux, uy;
    var um = document.getElementById('umlauf');
    ux = um.style.left;
    uy = um.style.top;
    ux = ux.replace(/px/g, '');
    uy = uy.replace(/px/g, '');
    //alert(ux + '/' + uy);
*/

    var x,y;
    x = Math.round(980 / 2 - ex / 2 + offx);
    y = Math.round(innery / 2 - ey / 2 + offy - 200);
    //alert(x + '/' + y);

    element.style.left = x + 'px';
    element.style.top = y + 'px';
}
