function nowe_okno (win_url, win_name, win_width, win_height) {

    var odstepwysokosc=(screen.height-win_width)/2;
    var odstepszerokosc=(screen.width-win_height)/2;
    var winprops = 'scrollbars=1,width='+win_width+', height='+win_height+',resizable=0,toolbar=0,location=0,directories=0,menubar=0,screenX='+odstepszerokosc+'+,screenY='+odstepwysokosc+',left='+odstepszerokosc+'+,top='+odstepwysokosc;
    var win = window.open(win_url, win_name, winprops);

    if (parseInt(navigator.appVersion) >= 4) { 
        win.window.focus(); 
    }
}

function dodaj_do_grupy(id_grupy, id_art) {
    opener.document.location = '/panel/grupy/'+id_grupy+'.html?dodaj='+id_art;
}

function zmien_grupe(id_grupy) {
    opener.document.location = '/panel/grupy/'+id_grupy+'.html';
}

function pokaz_ukryj_warstwe(nazwa,ukryj) {
    if (document.getElementById(nazwa).style.display == 'none') {
        document.getElementById(nazwa).style.display = 'block';
    } else {
        document.getElementById(nazwa).style.display = 'none';
    }
    if (ukryj != '') {
        document.getElementById(ukryj).style.display = 'none';
    }
}

function pokaz_komunikat(id) {
    var komunikat = document.getElementById(id);
    var kontentTresc = document.getElementById('kontent-tresc');
    komunikat.style.width = kontentTresc.offsetWidth - 35 + 'px';

    komunikat.style.position = 'absolute';
    komunikat.style.top = 0 + 'px';
    setTimeout("ukryj_komunikat('"+id+"')", 1500);
}

function ukryj_komunikat(id) {
    var komunikat = document.getElementById(id);
    komunikat.style.display = 'none';
}

function gratka_onload() {
    if (wszystkie_onload != null) {
        wszystkie_onload();
    }
    var obj = document.getElementsByTagName('object');
    var oParam = document.createElement("param");
    oParam.name = "wmode";
    oParam.value = "transparent";
    
    for (i=0; i < obj.length; i++) {
        obj[i].appendChild(oParam);
    }
}

