document.write('<div id="warstwa" style="position: absolute; visibility: hidden; width: 0px; height: 0px; background:url(http://panieprezydencie.com/zaslona-tlo.gif); overflow: hidden; z-index: 100000"');
document.write('onclick="this.style.visibility=\'hidden\'" onload="this.style.visibility=\'hidden\'"><table border="0" cellpadding="0" cellspacing="0"><tr><td id="td"');
document.write('align="center" valign="middle">');
document.write('</td></tr></table>');
document.write('</div>');

document.write('<div id="ogloszenie" style="position: absolute; visibility: visible; width: 0px; height: 0px; overflow: hidden; z-index: 100001"');
document.write('onclick="this.style.visibility=\'hidden\'" ><table border="0" cellpadding="0" cellspacing="0"><tr><td id="td_baner"');
document.write('align="center" valign="middle">');
document.write('</td></tr></table>');
document.write('</div>');

tresc = "pop=1";
godzin = 24;

document.write('<map name="mapa1">');
document.write('<area shape="rect" coords="1,30,400,490" href="http://niemczykiwspolnicy.pl/oferta/oferta+firmy+niemczyk+i+wspolnicy+sp.+z+o.o./" target="_blank">');
document.write('</map>');

function baner(plik, pw, ph) {


  


  
  var wysokosc = szerokosc = topx = topy = 0;
  // wspolrzedne lewego, gornego rogu
  if (window.pageXOffset != null) {
  topx = window.pageXOffset;
  }
  else if (document.body.scrollLeft != null) {
  topx = document.body.scrollLeft;
  }
  if (window.pageYOffset != null) {
  topy = window.pageYOffset;
  }
  else if (document.body.scrollTop != 0) {
  topy = document.body.scrollTop;

  }
  else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    topy = document.documentElement.scrollTop;
    topx = document.documentElement.scrollLeft;

  }
  // wielkosc obszaru okna
  if (typeof(window.innerWidth)=='number') {
    szerokosc = window.innerWidth;
    wysokosc = window.innerHeight;
  } else if(document.documentElement && (document.documentElement.clientWidth
    || document.documentElement.clientHeight)) {
    szerokosc = document.documentElement.clientWidth;
    wysokosc = document.documentElement.clientHeight;
  } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
    szerokosc = document.body.clientWidth;
    wysokosc = document.body.clientHeight;
  }
  
  objbaner = document.getElementById("ogloszenie");
objtabela = document.getElementById("td_baner");
  
    objbaner.style.top = topy + "px";
  objbaner.style.left = topx + "px";
  objbaner.style.width = szerokosc + "px";
  objbaner.style.height = wysokosc + "px";
  
  objbaner.style.visibility = "visible";
  objtabela.style.width = szerokosc + "px";
  objtabela.style.height = wysokosc + "px";
  objtabela.innerHTML="<img src='localhost/prezydent/"+plik+"' style='width:"+pw+"px; height:"+ph+"px;'  usemap='#mapa1' border='0'/>";
  
  
  

setTimeout("baner_off()",30000);




}

function baner_off(){

objbaner = document.getElementById("ogloszenie");
objtabela = document.getElementById("td_baner");
objtabela.style.visibility = "hidden";
objbaner.style.visibility = "hidden";

}


function rysuj(plik, pw, ph) {

  var wysokosc = szerokosc = topx = topy = 0;
  // wspolrzedne lewego, gornego rogu
  if (window.pageXOffset != null) {
  topx = window.pageXOffset;
  }
  else if (document.body.scrollLeft != null) {
  topx = document.body.scrollLeft;
  }
  if (window.pageYOffset != null) {
  topy = window.pageYOffset;
  }
  else if (document.body.scrollTop != 0) {
  topy = document.body.scrollTop;

  }
  else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    topy = document.documentElement.scrollTop;
    topx = document.documentElement.scrollLeft;

  }
  // wielkosc obszaru okna
  if (typeof(window.innerWidth)=='number') {
    szerokosc = window.innerWidth;
    wysokosc = window.innerHeight;
  } else if(document.documentElement && (document.documentElement.clientWidth
    || document.documentElement.clientHeight)) {
    szerokosc = document.documentElement.clientWidth;
    wysokosc = document.documentElement.clientHeight;
  } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
    szerokosc = document.body.clientWidth;
    wysokosc = document.body.clientHeight;
  }



obj = document.getElementById("warstwa");
obj2 = document.getElementById("td");

  obj.style.top = topy + "px";
  obj.style.left = topx + "px";
  obj.style.width = szerokosc + "px";
  obj.style.height = 1282 + "px";
  
  obj.style.visibility = "visible";
  obj2.style.width = szerokosc + "px";
  obj2.style.height = 1132 + "px";
  obj2.innerHTML="<img src='"+plik+"' style='width:"+pw+"px; height:"+ph+"px;' />";

}


function przeskaluj() {
  if (obj.style.visibility=="visible") rysuj();
}

function pokaz(obj, co){
	var curleft = sprawdzLeft(obj);
	var curtop = sprawdzTop(obj);

	document.getElementById(co).style.left = curleft+1+'px';
	document.getElementById(co).style.top = curtop+22+'px';
	document.getElementById(co).style.visibility = 'visible';
	document.getElementById(co).style.zIndex = '110';
}

function ukryj(co){

document.getElementById(co).style.visibility = 'hidden';
}

function sleep( seconds)
{
     if( seconds <= 0)
         return;

     var ms      = seconds * 100;
     var now     = new Date().getTime();
     var before  = now;

     while( (now - before) < ms)
         now = new Date().getTime();
}

function sprawdzLeft(obj){
	var curleft = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x){
		curleft += obj.x;
	}

	return curleft;

}
function sprawdzTop(obj){
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y){
		curtop += obj.y;
	}

	return curtop;

}
function blurAnchors(){
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
//collect all anchors A
for(var i = 0; i < a.length; i++){
// mouse onfocus, blur anchors
a[i].onfocus = function(){this.blur();};
}
}
}


