var PopupWin;


PopupWin    = 0;


function OpenPopup ( )
{
    var iX, iY, iDX, iDY;
    var heute, iD, iM, iY, iLastD, iLastM, iLastY;
    
    
    
    
    if ( PopupWin && !PopupWin.closed )
    {
        PopupWin.focus ( );
        return;
    }

    iLastD  = 31;
    iLastM  = 3;
    iLastY  = 2007;
    
    heute   = new Date ( );
    iD      = heute.getDate ( );
    iM      = heute.getMonth ( ) + 1;
    iY      = heute.getFullYear ( );

    if ( (iY > iLastY) || (iM > iLastM) )
    {
        return;
    }
    
    if ( (iM == iLastM) && (iD > iLastD) )
    {
        return;
    }

    iDX = 650;
    iDY = 700;
    iX  = (screen.width - iDX) / 2;
    iY  = (screen.height - iDY) / 2;
   
    PopupWin = open ( "popup.html" , "PopupWin" , "left=" + iX + ",top=" + iY + ",width=" + iDX + ",height=" + iDY + ",scrollbars=yes" );
}


function ClosePopup ( )
{
    if ( PopupWin && !PopupWin.closed )
    {
        if ( navigator.appName.indexOf ( "Internet Explorer" ) != -1 )
        {
            while ( !PopupWin.closed )
            {
                PopupWin.close ( );
            }
        }
        else
        {
            PopupWin.close ( );
        }
        
        PopupWin = 0;
    }
}

