/*
**
** Author:	www.QZ.pl
** Language:	JScript
**
*/

function ShowHide(layer_open, layer_close) {
        if (layer_open != '') {
            expandLayer(layer_open);
        }
        if (layer_close != '') {
            expandLayer(layer_close);
        }
    }

    function expandLayer(name) {
        var itm = null;

        if (document.getElementById) {
            itm = document.getElementById(name);
        } else if (document.all) {
            itm = document.all[name];
        } else if (document.layers) {
            itm = document.layers[name];
        }

        if (!itm) {
        // Just don't panik, it's ok
        } else if (itm.style) {
            if (itm.style.display == "none") {
                itm.style.display = "";
            } else {
                itm.style.display = "none";
            }
        } else {
            itm.visibility = "show";
        }
    }


function okno(url)
{
window.open(url)
}

function okno_quiz(url, w, h) {
var Left=(screen.width-w)/2;
var Top=(screen.height-h)/2;
var Win = window.open(url,"",'width=' + w + ',height=' + h + ', resizable=0, scrollbars=yes, menubar=no, left='+Left+', top='+Top );
}

function OblKal(form, waga, czas, czynnosc)
{
czynnosc=document.kaloromierz.czynnosc.options[document.kaloromierz.czynnosc.selectedIndex].value;
form.wynik.value=(Math.round(waga*czynnosc)*(czas/60));
}

function dowcip()
{
window.open('dowcip.htm','dowcip','left=0,top=0,toolbar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,menubar=no,width=450,height=200');
}

function rotator()
{
var how_many_ads = 4;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;

if (ad==1) {
url="http://www.bingo.net.pl/unikalna_terapia/index.htm";
banner="images/banery/baner_bingo_350x100.jpg";
width="340";
height="73";
document.write('<right>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' border=0 alt=\"Bingo - najlepsze sole kosmetyczne i lecznicze\"></a>');
document.write('</right>');
}

if (ad==2) {
url="http://www.allegro.pl/item321714458__schudnij_i_odtruj_organizm.html";
banner="images/banery/350x100anim-rot.gif";
width="350";
height="100";
document.write('<rightr>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' border=0"></a>');
document.write('</right>');
}

if (ad==3) {
url="http://www.allegro.pl/item322314822_energizujaca_sol_do_stop_z_guarana.html";
banner="images/banery/rotator3.gif";
width="340";
height="100";
document.write('<right>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' border=0 alt=\"Naturalne produkty\">');
document.write('</right>');
}


if (ad==4) {
url="http://www.allegro.pl/item322315053_redual_tradzik_lojotok_pryszcze_100_naturalny.html";
banner="images/banery/rotator4_340x100.gif";
width="340";
height="100";
document.write('<right>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' border=0 alt=\"Dead Sea Mud Musk\">');
document.write('</right>');
}
}

function rotator1()
{
var how_many_ads = 1;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;

if (ad==1) {
url="http://www.bingo.net.pl/";
banner="images/banery/bingobath.png";
width="120";
height="337";
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' border=0></a>');
document.write('</center>');
}
}

     function pokaz(name) {
        var itm = null;

        if (document.getElementById) {
            itm = document.getElementById(name);
        } else if (document.all) {
            itm = document.all[name];
        } else if (document.layers) {
            itm = document.layers[name];
        }

        if (!itm) {
        // Just don't panik, it's ok
        } else if (itm.style) {
                itm.style.display = "";
        } else {
            itm.visibility = "show";
        }
    }
    
    function ukryj(name) {
        var itm = null;

        if (document.getElementById) {
            itm = document.getElementById(name);
        } else if (document.all) {
            itm = document.all[name];
        } else if (document.layers) {
            itm = document.layers[name];
        }

        if (!itm) {
        // Just don't panik, it's ok
        } else if (itm.style) {
            if (itm.style.display == "") {
                itm.style.display = "none";
            } else {
                itm.style.display = "none";
            }
        } else {
            itm.visibility = "show";
        }
    }
