czyzaladowany = 0;
ost1 = 0; ost2 = 0; ost3 = 0;

function init() {
okno1 = new DynLayer("g1")
okno2 = new DynLayer("g2")
okno3 = new DynLayer("g3")
czyzaladowany = 1
}


function stan(obj) {
        if (czyzaladowany == 1) {
        if (obj == 0) { okno3.hide(); okno2.hide(); okno1.hide();}
        if (obj == 1) { okno1.show(); okno2.hide(); okno3.hide();}
        if (obj == 2) { okno2.show(); okno1.hide(); okno3.hide();}
        if (obj == 3) { okno3.show(); okno2.hide(); okno1.hide();}
        }        
} 

function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}

function hideObject(obj) {
        if (ns4) obj.visibility = "hide"
        else if (ie4) obj.visibility = "hidden"
}

function newImage(arg) {
        if (document.images) { rslt = new Image(); rslt.src = arg; return rslt;}
}

function changeImages() {
        if (document.images && (preloadFlag == true)) {
                for (var i=0; i<changeImages.arguments.length; i+=2) {
                        document[changeImages.arguments[i]].src = changeImages.arguments[i+1];}
        }
}

var preloadFlag = false;
function preloadImages() {
        if (document.images) {
                top_08_over = newImage("/images/top_08-over.gif");
                top_09_top_08_over = newImage("/images/top_09-top_08_over.gif");
                top_10_top_08_over = newImage("/images/top_10-top_08_over.gif");
                top_11_top_08_over = newImage("/images/top_11-top_08_over.gif");
                preloadFlag = true;
        }
}

function openPictureWindow_Fever(imageName,alt) {
        newWindow = window.open("","okno","width=20,height=20,left=50,top=50");
        newWindow.document.open();
        newWindow.document.write('<html><title>'+alt+'</title>');
        newWindow.document.write('<script TYPE="text/javascript">');
        newWindow.document.write('function dopasuj() {szer = document.fotografia.width;wys = document.fotografia.height;top.window.resizeTo(szer,wys+20);}');
        newWindow.document.write('</script>');
        newWindow.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onClick="window.close()" onBlur="self.close()" onLoad="dopasuj();">'); 
        newWindow.document.write('<img src='+imageName+' name="fotografia" alt='+alt+'>'); 
	newWindow.document.write('<!--#include virtual="/linkor_html.php"-->');
        newWindow.document.write('</body></html>');
        newWindow.document.close();
        newWindow.focus();
}

function otworzOkno(plik,nazwa,a,b) {
        oknoNowe = window.open(plik,nazwa,'resizable=yes, scrollbars=yes, width='+a+', height='+b+'')
}

