function openWindow(url, width, height, scroll)
{
    var ns4 = (document.layers) ? true : false;           //NS 4
    var ie4 = (document.all) ? true : false;              //IE 4
    var dom = (document.getElementById) ? true : false;   //DOM

    if( ie4 || dom )
    {
        xMax = screen.availWidth;
        yMax = screen.availHeight;

        if( xMax <= width )
        {
            width = screen.availWidth;
        }

        if( yMax <= height )
        {
            height = screen.availHeight;
        }
    }

    else if( ns4 )
    {
        xMax = window.outerWidth;
        yMax = window.outerHeight;

        if( xMax <= width )
        {
            width = window.outerWidth;
        }

        if( yMax <= height )
        {
            height = window.outerHeight;
        }
    }

    else
    {
        xMax = 640;
        yMax = 480;
    }


    var xOffset = (xMax - width)/2;
    var yOffset = (yMax - height)/2;


    window.open(url, '_blank', 'menubar=no,scrollbars='+scroll+',resizable=no,status=no,height='+height+',width='+width+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');

    return false;
}


<!--
function screenLinkMSW(Url) {

var PopWidth=535;
var PopHeight=400;
var PopLeft = (window.screen.width-PopWidth)/2;
var PopTop = (window.screen.height-PopHeight)/2;

sonypop=window.open(Url,'SonyDSF-Gewinnspiel','toolbar=no,status=no,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,width='+PopWidth+',height='+PopHeight+',top='+PopTop+',left='+PopLeft);

}
