var GrRek_Flash = 0, GrRek_TL_Aktywna = 0, GrRek_TL_Margines = 20, GrRek_TL_oknoSzerokosc = 0, GrRek_TL_oknoWysokosc = 0, GrRek_TL_selekty = 0, GrRek_TL_Czas = 0, GrRek_Domena; function GrRek_TL_selektyWidoczne(tryb) { tryb = tryb ? 'visible' : 'hidden'; if (!GrRek_TL_selekty) { GrRek_TL_selekty = document.getElementsByTagName ? document.getElementsByTagName('SELECT') : document.all.tags('SELECT'); } for (i = 0; i < GrRek_TL_selekty.length; i++) { if (GrRek_TL_selekty[i].style) { GrRek_TL_selekty[i].style.visibility = tryb; } } } function GrRek_URL(clientId, bannerId, zoneId, source) { return '?bannerid=' + bannerId + '&clientid=' + clientId + '&zoneid=' + zoneId + '&source=' + source + '&block=0&cb=' + (new Date()).getTime(); } function GrRek_FlashTworz(plik, url, szerokosc, wysokosc) { if (GrRek_Flash) { var log = ''; if (url.indexOf('?') == 0) { plik += '?clickTAG=' + GrRek_Domena + 'adclick.php' + url; log += ''; } else if (url) { plik += '?clickTAG=' + url; } return '' + '' + '' + '' + log; } } function GrRek_TL_oknoRozmiar() { if (self.innerHeight) { GrRek_TL_oknoSzerokosc = self.innerWidth; GrRek_TL_oknoWysokosc = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { GrRek_TL_oknoSzerokosc = document.documentElement.clientWidth; GrRek_TL_oknoWysokosc = document.documentElement.clientHeight; } else if (document.body) { GrRek_TL_oknoSzerokosc = document.body.clientWidth; GrRek_TL_oknoWysokosc = document.body.clientHeight; } if (GrRek_TL_oknoSzerokosc > 0) { GrRek_TL_oknoSzerokosc -= 2 * GrRek_TL_Margines; GrRek_TL_oknoWysokosc -= 2 * GrRek_TL_Margines; } else { GrRek_TL_oknoSzerokosc = 100; GrRek_TL_oknoWysokosc = 100; } } function GrRek_TL_Dostosuj() { if (GrRek_TL_Aktywna == 1) { GrRek_TL_oknoRozmiar(); var e = document.getElementById('GrRek_TL_div'); e.style.width = GrRek_TL_oknoSzerokosc; e.style.height = GrRek_TL_oknoWysokosc; e.style.top = document.body.scrollTop + GrRek_TL_Margines; e.style.left = document.body.scrollLeft + GrRek_TL_Margines; e = document.getElementById('GrRek_TL_element'); e.style.width = GrRek_TL_oknoSzerokosc; e.style.height = GrRek_TL_oknoWysokosc; } } function GrRek_TL_Stop() { if (GrRek_TL_Aktywna == 1) { var e = document.getElementById('GrRek_TL_div'); e.style.visibility = 'hidden'; GrRek_TL_selektyWidoczne(1); GrRek_TL_Aktywna = 0; } } function GrRek_TL_Start() { GrRek_TL_Aktywna = 1; GrRek_TL_Dostosuj(); GrRek_TL_selektyWidoczne(0); window.onresize = GrRek_TL_Dostosuj; window.onscroll = GrRek_TL_Dostosuj; document.getElementById('GrRek_TL_div').style.visibility = 'visible'; if (GrRek_TL_Czas > 0) { setTimeout('GrRek_TL_Stop()', GrRek_TL_Czas); } } // jak url zaczyna się od znaku zapytania to dotyczy naszego serwera reklam function GrRek_TL_Inicjuj(domena, plik, url, czas) { if (GrRek_Flash) { GrRek_Domena = domena; GrRek_TL_Czas = czas; GrRek_TL_Dostosuj(); document.write('
' + GrRek_FlashTworz(plik, url, GrRek_TL_oknoSzerokosc, GrRek_TL_oknoWysokosc) + '
'); window.onload = GrRek_TL_Start; } } document.write( '\n' + '\n' + '\n' + '\n' + '\n' + '\n'); // kompatebilność wstecz (do usunięcia) function NMAdToplayerInit(plik, clientId, bannerId, zoneId, source) { GrRek_TL_Inicjuj('http://ads3.naszemiasto.pl/', plik, GrRek_URL(clientId, bannerId, zoneId, source), 0); } function NMAdToplayerStop() { GrRek_TL_Stop(); }