function PopupZamenaj(website) 
{
    var hcenter;
    var wcenter;
    hcenter         = screen.height;
    hcenter         = (screen.height)
                    ? ((screen.height - 120) / 2)
                    : 120;
    wcenter         = screen.width;
    wcenter         = (screen.width)
                    ? ((screen.width - 300) / 2)
                    : 300;
    
    var winFeatures = '  location   = no'            +
                      ', menubar    = no'            +
                      ', scrollbars = no'            +
                      ', status     = no'            +
                      ', titlebar   = no'            +
                      ', toolbar    = no'            +
                      ', resizable  = no'            +
                      ', height     = 120'              +
                      ', width      = 300';
                      
    var sizer       = window.open(""
                                , ""
                                , "left = " + wcenter + 
                                  ",top = " + hcenter  + "," + 
                                  winFeatures);
        
    sizer.location = website;
}

function Document(website
                , height
                , width) 
{
    var hcenter;
    var wcenter;
        hcenter     = screen.height;
        hcenter     = (screen.height)
                    ? ((screen.height - height) / 2)
                    : height;
        wcenter     = screen.width;
        wcenter     = (screen.width)
                    ? ((screen.width - width) / 2)
                    : width;
                    
    
    var winFeatures = (height == 0 &&
                       width  == 0)
                    ? ''
                    : '  left   = ' + wcenter + 
                      ', top    = ' + hcenter + 
                      ', height     = ' + height    +
                      ', width      = ' + width;
                      
    window.open(website
              , ""
              , winFeatures
              , "");
}

function Popup(website
             , height
             , width) 
{
    var hcenter;
    var wcenter;
        hcenter     = screen.height;
        hcenter     = (screen.height)
                    ? ((screen.height - height) / 2)
                    : height;
        wcenter     = screen.width;
        wcenter     = (screen.width)
                    ? ((screen.width - width) / 2)
                    : width;
    
    var winFeatures = '  location   = no'        +
                      ', menubar    = no'        +
                      ', scrollbars = no'        +
                      ', status     = no'        +
                      ', titlebar   = no'        +
                      ', toolbar    = no'        +
                      ', resizable  = no'        +
                      ', height     = ' + height    +
                      ', width      = ' + width;
                      
    var sizer       = window.open(""
                                , ""
                                , "left = " + wcenter + 
                                  ",top = " + hcenter  + "," + 
                                  winFeatures);
        
    sizer.location = website;
}

function PopupExpanding(website
                      , control) 
{
    var hcenter;
    var wcenter;
    var winFeatures;
    
    switch (control)
    {
        case "MailSender":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 610) / 2)
                            : 610;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 922) / 2)
                            : 922;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = 610'      +
                              ', width      = 922';
            break;
        }
        case "PredlogZaObjavoPrireditve":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 610) / 2)
                            : 610;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 922) / 2)
                            : 922;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no' +
                              ', scrollbars = yes' +
                              ', height     = 610'   +
                              ', width      = 922';
            break;
        }
        case "Dokumenti":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 120) / 2)
                            : 120;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 300) / 2)
                            : 300;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = 120'      +
                              ', width      = 300';
            break;
        }
        case "VirtualniSprehod":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 120) / 2)
                            : 120;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 300) / 2)
                            : 300;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = ' + screen.height +
                              ', width      = ' + screen.width;
            break;
        }
        case "RSSFeeds":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 800) / 2)
                            : 800;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 800) / 2)
                            : 800;
            winFeatures     = ' location    = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', scrollbars = yes'     +
                              ', height     = 800'      +
                              ', width      = 800';
            break;
        }
        case "SpletniPortaleNogeDetails":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 600) / 2)
                            : 600;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 600) / 2)
                            : 600;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', scrollbars = yes'     +
                              ', height     = 600'      +
                              ', width      = 600';
            break;
        }
        case "Sifrant":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 300) / 2)
                            : 300;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 800) / 2)
                            : 800;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = 300'      +
                              ', width      = 800';
            break;
        }
        case "VsebineDokumentiChild":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 300) / 2)
                            : 300;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 800) / 2)
                            : 800;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = 300'      +
                              ', width      = 800';
            break;
        }
        case "VsebineIzbire":
        {
            hcenter         = screen.height;
            hcenter         = (screen.height)
                            ? ((screen.height - 300) / 2)
                            : 300;
            wcenter         = screen.width;
            wcenter         = (screen.width)
                            ? ((screen.width - 300) / 2)
                            : 300;
            winFeatures     = '  location   = no'    +
                              ', menubar    = no'    +
                              ', status     = no'    +
                              ', titlebar   = no'    +
                              ', toolbar    = no'    +
                              ', height     = 300'      +
                              ', width      = 300';
            break;
        }
    }
                      
    var heightspeed = 25;    // vertical scrolling speed (higher = slower)
    var widthspeed  = 35;    // horizontal scrolling speed (higher = slower)
    var leftdist    = 10;   // distance to left edge of window
    var topdist     = 10;   // distance to top edge of window

    if (window.resizeTo && navigator.userAgent.indexOf("Opera") == -1) 
    {
        var winwidth;   //window.screen.availWidth - leftdist;
        var winheight;  //window.screen.availHeight - topdist;
        
        switch (control)
        {
            case "MailSender":
            {
                winheight   = 610;
                winwidth    = 922;
                break;
            }
            case "PredlogZaObjavoPrireditve":
            {
                winheight   = 610;
                winwidth    = 922;
                break;
            }
            case "Dokumenti":
            {
                winheight   = 120;
                winwidth    = 300;
                break;
            }
            case "Sifrant":
            {
                winheight   = 300;
                winwidth    = 800;
                break;
            }
            case "VsebineDokumentiChild":
            {
                winheight   = 300;
                winwidth    = 800;
                break;
            }
            case "VirtualniSprehod":
            {
                winheight   = screen.height;
                winwidth    = screen.width;
                break;
            }
            case "RSSFeeds":
            {
                winheight   = 800;
                winwidth    = 800;
                break;                
            }
            case "SpletniPortaleNogeDetails":
            {
                winheight   = 600;
                winwidth    = 600;
                break;
            }
            case "VsebineIzbire":
            {
                winheight   = 300;
                winwidth    = 300;
                break;
            }
        }
        
        var sizer       = window.open(""
                                    , ""
                                    , "  left = " + wcenter + 
                                      ", top  = " + hcenter  +
                                      ", "        + winFeatures);
                                      
        for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
        {
            sizer.resizeTo("1", sizeheight);
        }
        
        for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
        {
            sizer.resizeTo(sizewidth, sizeheight);
        }
        
        sizer.location = website;
    }
    else
    {
        window.open(website,'mywindow');
    }
}

function Report(report) 
{   
    var winFeatures = '  location   = no'                +
                      ', menubar    = yes'                 +
                      ', scrollbars = no'                +
                      ', status     = no'                +
                      ', titlebar   = no'                +
                      ', toolbar    = no'                +
                      ', resizable  = yes'                 +
                      ', left       = 0'                    + 
                      ', top        = 0'                    +
                      ", contenttype= application/x-msword" +
                      ', height     = 0'                    +
                      ', width      = 0';
                             
    var report      = window.open(report
                                , ""
                                , winFeatures);
    
    
}