// JavaScript Document

function show_hide(id_obiektu){

    var el = document.getElementById(id_obiektu);

    if( el.scrollHeight && el.scrollHeight > 0 ){
        el.style.display = 'none';
    }else{
        el.style.display = 'block';
    }
}

function show(id_obiektu){
    var el = document.getElementById(id_obiektu);
    el.style.display = 'block';
    el.style.visibility = 'visible';
}

function show_obj( obj ){
    obj.style.display = 'block';
    obj.style.visibility = 'visible';
}

function show_obj_xy( obj, x, y ){
    obj.style.top = y;
    obj.style.left = x;
    obj.style.display = 'block';
    el.style.visibility = 'visible';
}

function hide(id_obiektu){
    var el = document.getElementById(id_obiektu);
    el.style.display = 'none';
}

function hide_obj(obj){
    obj.style.display = 'none';
    obj.style.visibility = 'hidden';
}


function otworz_okno(adres, nazwa ){
     var width = 800;
     var height = 600;
     if( !nazwa || nazwa.length == 0 ){
      nazwa = 'okno';
     }
     cx=(screen.availWidth-width)/2;
     cy=(screen.availHeight-height)/2;
     okno = window.open(adres, "okno", "height="+height+",width="+width+",top="+cy+",left="+cx+",status=1,scrollbars=1,resizable=1;");
     okno.focus();
}

function otworz_oknoWH(adres, width, height, nazwa ){
     cx = (screen.availWidth-width) / 2;
     cy = (screen.availHeight-height) / 2;

     if( !nazwa || nazwa.length == 0 ){
      nazwa = 'okno';
     }
     okno = window.open(adres, "okno", "height="+height+",width="+width+",top="+cy+",left="+cx+",status=0,scrollbars=1,resizable=1;");
     okno.focus();
}


function pokaz_zawartosc(el){
    //el.style.position = 'absolute';
    el.style.overflow = 'show';
}


function ukryj_zawartosc(el){
    el.style.overflow = 'hidden';

}
