function show_hide_layer( whichLayer ) { if ( document.getElementById ) { // this is the way the standards work var element = document.getElementById( whichLayer ); } else if ( document.all ) { // this is the way old msie versions work var element = document.all[ whichLayer ]; } else if ( document.layers ) { // this is the way nn4 works var element = document.layers[ whichLayer ]; } // zmiana widocznoďż˝ci elementu jeďż˝li istnieje // && element.style != null if ( element != null ) { //alert( 'whichLayer=' + whichLayer + ' => element.style.display=' + element.style.display ); element.style.display = element.style.display ? "" : "block"; } } function show_layer( whichLayer ) { if ( document.getElementById ) { // this is the way the standards work var element = document.getElementById( whichLayer ); } else if ( document.all ) { // this is the way old msie versions work var element = document.all[ whichLayer ]; } else if ( document.layers ) { // this is the way nn4 works var element = document.layers[ whichLayer ]; } // zmiana widocznoďż˝ci elementu jeďż˝li istnieje // && element.style != null if ( element != null ) { element.style.display = "block"; } } function hide_layer( whichLayer ) { if ( document.getElementById ) { // this is the way the standards work var element = document.getElementById( whichLayer ); } else if ( document.all ) { // this is the way old msie versions work var element = document.all[ whichLayer ]; } else if ( document.layers ) { // this is the way nn4 works var element = document.layers[ whichLayer ]; } // zmiana widoczności elementu jeżeli istnieje // && element.style != null if ( element != null ) { element.style.display = ""; } } function rotate_embed() { //return false; var divs=document.getElementById('banners').getElementsByTagName('div'); var selected=0; var count=0; //alert(divs.length); for(var i=0; i < divs.length; i++) { if (divs[i].className.match('banner')) { if (divs[i].style.display=='block') { selected=count; //alert(selected); } count++; } } if (selected==(count-1)) { var selected_next=0; } else { var selected_next=selected+1; } var count=0; for(var i=0; i < divs.length; i++) { if (divs[i].className.match('banner')) { if (count==selected_next) { divs[i].style.display='block'; } else { divs[i].style.display='none'; } count++; } } setTimeout(function () { rotate_embed();},15000); } function rotate_embed2() { //return false; var divs=document.getElementById('banners2').getElementsByTagName('div'); var selected=0; var count=0; //alert(divs.length); for(var i=0; i < divs.length; i++) { if (divs[i].className.match('banner')) { if (divs[i].style.display=='block') { selected=count; //alert(selected); } count++; } } if (selected==(count-1)) { var selected_next=0; } else { var selected_next=selected+1; } var count=0; for(var i=0; i < divs.length; i++) { if (divs[i].className.match('banner')) { if (count==selected_next) { divs[i].style.display='block'; } else { divs[i].style.display='none'; } count++; } } setTimeout(function () { rotate_embed2();},15000); } var oldonload = window.onload; window.onload = function js() { if (typeof window.onload == 'function'){ oldonload; } if(document.getElementById('banners')) { setTimeout(function () { rotate_embed();},15000);} if(document.getElementById('banners2')) { setTimeout(function () { rotate_embed2();},15000);} initTip(); }