var bo_ns_id = 0;



function startIeFix(){

  if(isIE()){

    document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');

  }

}



function endIeFix(){

  if(isIE()){

    document.write('</div>');

    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);

    var theCode = theObject.innerHTML;

    theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))

    document.write(theCode);

  }

}



function isIE(){

  // only for Win IE 6+

  // But not in Windows 98, Me, NT 4.0, 2000

  var strBrwsr= navigator.userAgent.toLowerCase();

  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){

    if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){

      return false;

    }

    if(strBrwsr.indexOf("win98") > -1 ||

       strBrwsr.indexOf("win 9x 4.90") > -1 ||

       strBrwsr.indexOf("winnt4.0") > -1 ||

       strBrwsr.indexOf("windows nt 5.0") > -1)

    {

      return false;

    }

    return true;

  }else{

    return false;

  }

}



/* 

<script type="text/javascript">startIeFix();</script>

>> FLASH <<

<!-- --><script type="text/javascript">endIeFix();</script>

*/



Nowe=null; 

function Show(id) { 
winwidth = 400;
winheight = 400;
xpoz = screen.width/2 - winwidth/2;
ypoz = screen.height/2 - winheight/2;
maxy = screen.height;
maxx = screen.width;
Nowe=null;
Nowe=window.open("foto/pokaz.php?id="+id+"&x="+maxx+"&y="+maxy, "","toolbar=no,menubar=no,location=no,personalbar=no, scrollbars=yes,status=no,directories=no,resizable=yes,height="+winheight+",width="+winwidth+",left="+xpoz+",top="+ypoz);
Nowe.focus();
}

function Submenu(war) {
	if (war) document.getElementById('sm').style.visibility = 'visible';
		 else document.getElementById('sm').style.visibility = 'hidden';
}

function UstawMenu() {
	document.getElementById('sm').style.left = ((document.getElementById('body').clientWidth - 754) / 2) + 381;
	if (document.getElementById('body').clientWidth < 755) document.getElementById('sm').style.left = 381;
}

function Okienko(co) {
advAJAX.setDefaultParameters({
    onInitialization : function(obj) { document.getElementById(obj.tag).innerHTML = "Przygotowywanie..."; },
    onLoading : function(obj) { document.getElementById(obj.tag).innerHTML = "Ładowanie..."; },
    onSuccess : function(obj) { document.getElementById(obj.tag).innerHTML = obj.responseText; },
    onError : function(obj) { document.getElementById(obj.tag).innerHTML = "Błąd..."; }
});
advAJAX.get({ url: "placowki/"+co+".html", tag: "placlista" });
}