function openWindow( targetURL, winName, winWidth, winHeight, winPosY, winPosX )
{
    if ( targetURL == "" )
    {
        alert( "kein Ziel" );
        return false;
    }
    if ( targetURL == "" )
    {
        alert( "kein Fenstername" );
        return false;
    }
    if ( ( ! winWidth ) || ( winWidth == "" ) )
        winWidth = "600";
    if ( ( ! winHeight ) || ( winHeight == "" ) )
        winHeight = "400";
    if ( ( ! winPosY ) || ( winPosY == "" ) )
        winPosY = "40";
    if ( ( ! winPosX ) || ( winPosX == "" ) )
        winPosX = "40";
        
    if ( ! eval("window." + winName) || eval( winName + ".closed") )
		window[winName] = window.open(targetURL,winName,"width=" + winWidth + ",height=" + winHeight + ",top=" + winPosY +  ",left=" + winPosX +  ",screenY=" + winPosY +  ",screenX=" + winPosX +  ",scrollbars=no,resizable=yes");
    else
    {
        if ( window[winName].location.href != targetURL )
            window[winName].location.href = targetURL;
	}
    eval( winName + ".focus();" );
}

function closeWindow()
{
    if ( opener )
        opener.focus();
    this.close();
}