// JavaScript - Internet Komputery Sieci - www.ix.pl
var okno = null;
 
function OtworzOkno(zdjecie,opis,rozx,rozy)
{
   var sizex = (rozx + 44);
   if (sizex<500) { sizex=500; }
   var sizey = (rozy + 104); 
   if (opis!='') { sizey=sizey+40; }
   var winl = (screen.width - sizex) / 2;
   var wint = (screen.height - sizey) / 2;

   if (okno && okno.open && !okno.closed) { okno.close(); };

   okno=window.open('','okno','width='+sizex+', height='+sizey+', top='+wint+',left='+winl+', screenY='+wint+', screenX='+winl+'  ');
   okno.document.open("text/html", "replace");
   okno.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
   okno.document.writeln('<HTML>');
   okno.document.writeln('<HEAD>');
   okno.document.writeln('<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-2">');
   okno.document.writeln('<TITLE>Kuratorium Oświaty w Bydgoszczy</TITLE>');
   okno.document.writeln('<STYLE type="text/css">');
   okno.document.writeln('A:link, A:active, A:visited { font-family:  Verdana, Arial, Helvetica, sans-serif;  font-size: 11px; font-weight: normal; line-height: 17px; color: #FF0000; background: transparent; text-decoration: none; }');
   okno.document.writeln('A:hover, A:focus { font-family:  Verdana, Arial, Helvetica, sans-serif;  font-size: 11px; font-weight: normal; line-height: 17px; color: #FF0000; background: transparent; text-decoration: underline; }');
   okno.document.writeln('body { margin: 0px;	padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; line-height:	17px; cursor:pointer; }');
   okno.document.writeln('table { font-family: Verdana; font-size: 11px; line-height: 15px; }');
   okno.document.writeln('td { font-family: Verdana; font-size: 11px; line-height: 15px; }');
   okno.document.writeln('#obrazek { border-left:	1px solid #D4D4D4; border-top: 1px solid #D4D4D4; border-right: 1px solid #D4D4D4;  border-bottom: 1px solid #D4D4D4; margin: 0px 10px 10px 10px;}');
   okno.document.writeln('#logo { padding: 0px 20px 0px 10px; }');
   okno.document.writeln('#td_down { border-bottom: 1px solid #555555;}');
   okno.document.writeln('</STYLE>');
   okno.document.writeln('</HEAD>');
   okno.document.writeln('<BODY BGCOLOR="#FFFFFF" TEXT="#555555" TOPMARGIN=0 MARGINHEIGHT=0 LEFTMARGIN=0 MARGINWIDTH=0 onClick="javascript:window.close();">');
   okno.document.writeln('<DIV ALIGN="center">');
   okno.document.writeln('<TABLE WIDTH='+sizex+' CELLSPACING=0 CELLPADDING=10>');
   okno.document.writeln('<TR>');
   okno.document.writeln('<TD BGCOLOR="#FFFFFF" ALIGN="left">');
   okno.document.writeln('<IMG SRC="images/logookno.gif" WIDTH=170 HEIGHT=50 ID="logo"><BR>');
   okno.document.writeln('</TD>');
   okno.document.writeln('<TD BGCOLOR="#FFFFFF" ALIGN="right" ID="logo">');
   okno.document.writeln('Kuratorium Oświaty w Bydgoszczy<BR>');
   okno.document.writeln('ul.Konarskiego 1-3<BR>');
   okno.document.writeln('85-066 Bydgoszcz<BR>');
   okno.document.writeln('</TD>');
   okno.document.writeln('</TR>');
   okno.document.writeln('<TR>');
   okno.document.writeln('<TD COLSPAN=2 ALIGN="center">');
   okno.document.writeln('<IMG SRC="'+zdjecie+'" ID="obrazek">');
   if (opis!='') { okno.document.writeln('<BR>'+opis); }
   okno.document.writeln('</TD>');
   okno.document.writeln('</TR>');
   okno.document.writeln('</TABLE>');
   okno.document.writeln('</DIV>');
   okno.document.writeln('</BODY></HTML>');
  
   if (parseInt(navigator.appVersion) >= 4) { okno.window.focus(); };
   okno.document.close();
}

//obsługa obiektów ActiveX, które wymagają uruchomienia np. Flash
var bo_ns_id = 0;

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;
  }
}

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);
  }
}
