   var l = new Array( l_max_no );
   var il = new Array( l_max_no );
   var rl = new Array( l_max_no );
   for( var _i=1;_i<(l_max_no+1);_i++ ){
        l[_i] = new Image(20,20);
   	l[_i].src = "../images/l"+_i+".gif";
        il[_i] = new Image(20,20);
   	il[_i].src = "../images/il"+_i+".gif";
        rl[_i] = new Image(20,20);
   	rl[_i].src = "../images/rl"+_i+".gif";
   }

   var toc = Image(20,20); var itoc = Image(20,20); var rtoc = Image(20,20);
   toc.src = '../images/toc.gif'; itoc.src = '../images/itoc.gif'; rtoc.src = '../images/rtoc.gif';
   var qh = Image(20,20); var iqh = Image(20,20); var rqh = Image(20,20);
   qh.src = '../images/qh.gif'; iqh.src = '../images/iqh.gif'; rqh.src = '../images/rqh.gif';
   var glos = Image(20,20); var iglos = Image(20,20); var rglos = Image(20,20);
   glos.src = '../images/glos.gif'; iglos.src = '../images/iglos.gif'; rglos.src = '../images/rglos.gif';
   var tq = Image(20,20); var itq = Image(20,20); var rtq = Image(20,20);
   tq.src = '../images/tq.gif'; itq.src = '../images/itq.gif'; rtq.src = '../images/rtq.gif';
   var left = new Image(20,20); var rleft = new Image(20,20);
   var right = new Image(20,20); var rright = new Image(20,20); 
   left.src = '../images/left_20.gif'; rleft.src = '../images/rleft_20.gif';		
   right.src = '../images/right_20.gif'; rright.src = '../images/rright_20.gif';		


   function put_image( image, alt ){
       document.write("<img src="+l[image].src+" name=l"+image+" alt="+alt+" width=\"20\" height=\"20\" border=\"0\" align=\"absmiddle\" onMouseOver=\"this.src=rl["+image+"].src;\" onMouseOut=\"this.src=l["+image+"].src;\" >");
   };
   function put_c_image( image, alt ){
       document.write("<img src="+il[image].src+" name=l"+image+" alt="+alt+" width=\"20\" height=\"20\" border=\"0\" align=\"absmiddle\" onMouseOver=\"this.src=il["+image+"].src;\" onMouseOut=\"this.src=il["+image+"].src;\" >");
   };
   function top_button_bar(){

      document.write("<a href='index.htm' target='_self'>");
      if( l_no == "toc" ){
	      document.write("<img src="+itoc.src+" alt=' Contents ' width='18' height='20' border='0' align='absmiddle' ></a>&nbsp;" );
       }
       else {
	      document.write("<img src="+toc.src+" alt=' Contents ' width='18' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rtoc.src;\" onMouseOut=\"this.src=toc.src;\" ></a>&nbsp;" );
       }
      for(var _i=1;_i<(l_max_no+1);_i++){
	    document.write("<a href=\""+p_coursename+"_"+_i+"_1.htm\" target=\"_self\">");
	    if( l_no == _i ){
		put_c_image( _i, "\"Lesson "+_i+"\"" );
	    }
	    else {
		put_image( _i, "\"Lesson "+_i+"\"" );
	    }
	    document.write("</a>");
        }

      document.write("&nbsp;<a href='"+p_coursename+"_tq.htm' target='_self'>");
      if( l_no == "tq" ){
      	document.write("<img src="+itq.src+" alt=' Self test ' width='18' height='20' border='0' align='absmiddle' ></a>" );
      } else {
      	document.write("<img src="+tq.src+" alt=' Self test ' width='18' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rtq.src;\" onMouseOut=\"this.src=tq.src;\" ></a>" );
      }

      document.write("&nbsp;<a href='"+p_coursename+"_glos.htm' target='_self'>");
      if( l_no == "glos" ){
	      document.write("<img src="+iglos.src+" alt=' Glosary ' width='18' height='20' border='0' align='absmiddle' ></a>" );
      }
       else {
	      document.write("<img src="+glos.src+" alt=' Glosary ' width='18' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rglos.src;\" onMouseOut=\"this.src=glos.src;\" ></a>" );
      }
      document.write("<a href='"+p_coursename+"_qh.htm' target='_self'>");
      if( l_no == "qh" ){
      	document.write("<img src="+iqh.src+" alt=' Help ' width='18' height='20' border='0' align='absmiddle' ></a>" );
      } else {
      	document.write("<img src="+qh.src+" alt=' Help ' width='18' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rqh.src;\" onMouseOut=\"this.src=qh.src;\" ></a>" );
      }

   }

   function go_left(){
	if( p_no > 1 ) {
            document.write("<a href='"+p_coursename+ "_"+l_no+"_"+(p_no-1)+".htm'  target='_self'>");
            document.write("<img src="+left.src+" alt=' Go to previous page ' width='20' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rleft.src;\" onMouseOut=\"this.src=left.src;\" ></a>" );
        }
   }
   function go_right(){
	if( p_no < p_max_no ) {
            document.write("<a href='"+p_coursename+ "_"+l_no+"_"+(p_no-(-1))+".htm'  target='_self'>");
            document.write("<img src="+right.src+" alt=' Go to next page ' width='20' height='20' border='0' align='absmiddle' onMouseOver=\"this.src=rright.src;\" onMouseOut=\"this.src=right.src;\" ></a>" );
        }
   }

   function top_navi_bar(){
        go_left();
	document.write(" " + p_no + " z " + p_max_no + " ");
        go_right();
   }
   function bottom_left_navi(){
	go_left(); 
	if( p_no > 1 ) { document.write(" Poprzednia" ); }
   }
   function bottom_center_navi(){
	for( var _i=1;_i<(p_max_no+1);_i++ ){
            if( _i == p_no ) {
                document.write(_i + "&nbsp;");
            } else {
                document.write("<a href="+p_coursename+"_"+l_no+"_"+_i+".htm >" + _i + "</a>&nbsp;");
            }
        }
   }
   function bottom_right_navi(){
	if( p_no < p_max_no ) { document.write("Nastêpna " ); }
	go_right(); 
   }
   function doc_footer(){
	document.write("&copy;&nbsp;"+p_autor+" - "+p_institution+"&nbsp;");
   }
