// inicjacja tablic menu
function makeMenu(PopMenuTable,MenuText,MenuPage){
	this.popMenu = PopMenuTable;
	this.text = MenuText;
	this.page = MenuPage;
}

function makePopMenu(MenuText,MenuPage){
	this.text = MenuText;
	this.page = MenuPage;
}

// wyswietlanie prawego menu
function WyswPMenu(AktHtm) {
len = Menu.length;
   var i;

 for ( var num=0; num<len; num++){   
    PiszRamka(num);
  }
}


function PiszRamka(nrOpcji){

PustaRamka();
document.write("<table border=0 width=100% cellpadding=0 cellspacing=0>");
document.write("<tr><td bgcolor=#887037 >");
document.write("<table border=0 width=100% cellpadding=3 cellspacing=1>");
document.write("<tr><td bgcolor=white align=center background='obrazki/tloc.gif' class='SmallWhiteBold'>");
document.write(Menu[nrOpcji].text);
document.write("</td>");
document.write("</tr>");
document.write("<tr><td bgcolor=white align=center class='SmallBlack'>&nbsp");

WyswOpcje(nrOpcji);

document.write("</td></tr> ");
document.write("</table>");

document.write("</td></tr>");
document.write("</table>");
}

function WyswOpcje(nrOpcji){

var lenpop = Menu[nrOpcji].popMenu.length; 
for ( var j=0; j<lenpop; j++)
  { 
      document.write("<a href=");
      document.write(Menu[nrOpcji].popMenu[j].page);
      if ( Menu[nrOpcji].popMenu[j].page.substring(0,4)=="http" ){
          document.write(" target=_blank");
      }
      document.write(" class='link'><b>");
      document.write(Menu[nrOpcji].popMenu[j].text);
      document.write("</b></a><br>");
   
   }
}

function PustaRamka(){
document.write("<table border=0 hight=1 width=100% cellpadding=0 cellspacing=0>");
document.write("<tr><td bgcolor=white ></td></tr></table>");

}

// koniec prawego menu



// data -> slownie
function DajAktDat() {
   
   var today = new Date();
   var todayYear = today.getYear();

   if (todayYear < 1900) todayYear += 1900;
   return tabDay[today.getDay()]+", "+today.getDate()+" "+tabMon[today.getMonth()]+" "+todayYear+" r.";
}


// pory roku
function PoryRoku() {
   
   var today = new Date();
   var todayMonth = today.getMonth()+1;
   var pfx="z"
   var hgt="200"

   if (todayMonth>=1) pfx= "";
   if (todayMonth>2) pfx= "w_";
   if (todayMonth>5) pfx="";
   if (todayMonth>11) pfx="z"
   document.write("<td bgcolor=white  align=center background='obrazki/"+pfx+"budynek.gif' height='"+hgt+"'>")
   document.write("&nbsp;</td>");
                
}

// wyswietlenie naglowka strony
function MiripNag(tytul){

document.write("<TABLE bgColor=white border=0 borderColor=white cellPadding=0 cellSpacing=0 height=10 width=780>");
document.write("<TR>");
document.write("<TD height=10 width=5 bgcolor=white>&nbsp</TD>")
if (tytul=="STRONA G"){
   document.write("<TD height=10 width=200 align=center background='obrazki/tlo.gif' class='SmallBlack'>");
   document.write(DajAktDat()+"</TD>");
   document.write("<TD height=10 width=370 align=center background='obrazki/tlo.gif' class='SmallWhiteBold'>");
   document.write("<b>STRONA GŁÓWNA</b></TD>");
   document.write("<TD height=10 width=200 align=center background='obrazki/tlo.gif' class='SmallBlack'>");
   document.write("&nbsp</TD>");
}else{
   document.write("<TD height=20 width=200 align=center background='obrazki/tlo.gif' class='SmallBlack'>");
   document.write(DajAktDat()+"</TD>");
   document.write("<TD height=20 width=409 align=center background='obrazki/tlo.gif' class='SmallWhiteBold'>");
   document.write("<b>"+tytul+"</b></TD>");
   document.write("<TD height=20 width=150 align=center background='obrazki/tlo.gif' class='SmallWhiteBold'>");
   document.write("<a href='index.htm' class='link'><b>Strona główna   </b></a><br>");
}
document.write("<TD height=20 width=5 bgcolor=white></TD>");
document.write("</TR>");
document.write("</TABLE>");

}

// wypisywanie informacji w srodkowej kolumnie strony glownej
function sNews(tytul) {

document.write("<tr>");
document.write("<td align=center background='obrazki/tlo.gif' cellspacing=5 class='SmallBlack'><b>"+tytul+"</b>");
document.write("</td>");
document.write("<tr><td bgcolor=white align=justify class='SmallBlack'>");
}

function kNews(){
document.write('</td>');
document.write('</tr>');  
}

// wyswietlanie obrazka w osobnym oknie
function OpenFotoWindow(width,height) {
   width=width+30;
   height=height+20;
   popup=window.open('','FotoWindow','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height);
   popup.focus();
}

// koncowka strony
function PrawaStrona(tytul) {

document.write("<TD valign=top align=center background='obrazki/krop.gif' width=11>&nbsp</TD>"); 
document.write("<TD valign=top align=center bgColor=white width=150>");        
pmirip_menu(tytul);
document.write("<TD height=80 width=5 bgcolor=white></TD>");

}

function dr(opis){
document.write(opis);
}

<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------------ -->

function LeonardoNag(tytul){

document.write("<TABLE border=0 bgColor=white cellPadding=0 cellSpacing=5 height=80 width=780>");
document.write("<TR>");
document.write("<TD height=80 width=780 background='leonardo/bmiripleo.jpg' >&nbsp</TD>");
document.write("</TR>");
document.write("</TABLE>");

document.write("<TABLE bgColor=white border=0  cellPadding=0 cellSpacing=0 height=10 width=780>");
document.write("<TR><TD height=20 width=620 align=center bgcolor=navy class='SmallWhiteBold'>");
document.write("<b>:: Wspólnotowy program akcyjny w kształceniu zawodowym  </b> Faza 2: 2000 – 2006 Procedura B ::</TD>");
document.write("<TD height=20 width=150 align=center bgcolor=navy class='SmallWhiteBold'>");
document.write("<a href='index.htm' class='ylink'><b>Strona główna   </b></a><br></TD>");
document.write("<TD height=20 width=5 bgcolor=white></TD>");
document.write("</TR>");
document.write("</TABLE>");

}

function pisz_wyd(mm_rok,mm_mc,mm_day,mm_godz_min,opis){

var dt_dzis = new Date();
var dt_zdarzenia=new Date();
dt_zdarzenia.setYear(mm_rok);
dt_zdarzenia.setMonth(mm_mc-1);

dt_zdarzenia.setDate(mm_day);

var dt_txt = mm_day+" "+tabMon[mm_mc-1]+" "+mm_rok;
//+", "+tabDay[dt_zdarzenia.getDay()];

styl_wysw = "vSmallRed"

if (dt_dzis<dt_zdarzenia) styl_wysw="vSmallBlack";
if (dt_dzis>dt_zdarzenia) styl_wysw="vSmallNavy";


document.write("<TR><TD vAlign=top class="+styl_wysw+">"+dt_txt+"</TD>")
document.write("<TD vAlign=center class="+styl_wysw+">"+mm_godz_min+"</TD>")
document.write("<TD vAlign=center class="+styl_wysw+">"+opis+"</TD></TR>")


}






