function newwin(url, width, height, bgurl, top, left, scrollbars, resizable)
{
    if(width > 0 && height > 0)
    {
        var jetzt = new Date();
        var name = "win_" + jetzt.getTime();
        left = left != undefined ? left : 0;
        top = top != undefined ? top : 0;
        scrollbars = (scrollbars != undefined && scrollbars == 1) ? ",scrollbars=yes" : "";
        resizable = (resizable != undefined && resizable ==1) ? ",resizable=yes" : "";
        f = window.open(url, name, "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + scrollbars + resizable);
    }else{
        f = window.open(url);
    }
    if(bgurl != undefined && bgurl != "")
            location.href = bgurl;
    f.focus;
}