Tekst1a='Wiele firm decyduje się na wydanie druków, w których dokonują autoprezentacji. Rzadko jednak '+ 'przygotowane są one z precyzyjnym określeniem celów jakim mają służyć. Zaletą tych publikacji jest '+ 'niewątpliwie brak ograniczeń objętościowych, o pozwala szeroko rozwinąć swoją ofertę i szczegółowo '+ 'poinformować klientów o produktach lub usługach.';
Tekst1b='Dzięki temu, korzystając z najnowocześniejszych '+
'technik drukarskich, można stworzyć materiał o wyjątkowym i niepowtarzalnym charakterze. Materiały '+ 'drukowane, w zależności od ich adresata i celu, mogą przybierać różne formy, np. folderu, plakatu. '+
'Zawsze jednak trzeba je projektować, mając na';

Tekst1c='względzie funkcje, jaką mają do spełnienia. '+
'Wskaźnikiem pozytywnej reakcji na te materiały będzie ilość korespondencji i zamówień, skierowanych '+
'do działu wskazanego w stopce adresowej.';
var ktory;
var gal1_min = new Array();
gal1_min[1]="../images/klucz.jpg";
gal1_min[2]="../images/materia.jpg";
gal1_min[3]="../images/oxford.jpg";
gal1_min[4]="../images/zegarmistrz.jpg";
gal1_min[5]="../images/persp.jpg";
gal1_min[6]="../images/waga.jpg";
gal1_min[7]="../images/lupa.jpg";
gal1_min[8]="../images/nest1.jpg";
gal1_min[9]="../images/tunel1.jpg";
gal1_min[0]="../images/blysk.jpg";


var gal2_min = new Array();
gal2_min[1]="../images/einstein.jpg";
gal2_min[2]="../images/bigb.jpg";
gal2_min[3]="../images/eifel.jpg";
gal2_min[4]="../images/wielblad.jpg";

var head="display:''";
var menu_txt, menu1_txt, menu2_txt, menu3_txt, menu4_txt, zn=0;

menu1_arr = new Array();
menu1_arr[1]='HTML';
menu1_arr[2]='DHTML';
menu1_arr[3]='Flash+FlashScript';
menu1_arr[4]='PHP';
menu1_arr[5]='JavaScript';
menu1_arr[6]='C/C++';
menu1_arr[7]='Visual Basic';
menu1_arr[8]='Delphi';
menu1_arr[9]='Oracle Builder';
menu1_arr[10]='Macromedia Dreamweaver';
menu1_arr[11]='Macromedia Fireworks';

menu2_arr = new Array();
menu2_arr[1]='graphic design and layout for websites';
menu2_arr[2]='constructing and programming interactive elements';
menu2_arr[3]='publishing websites';
menu2_arr[4]='advertisement banners';
menu2_arr[5]='building interfaces for self-managing website';

menu3_arr = new Array();
menu3_arr[1]='graphic design for promotion printed matter (CorelDraw, Photoshop, QuarkXpress)';
menu3_arr[2]='multimedia presentations';

menu4_arr = new Array(); 
menu4_arr[1]='design automatic procedures for collecting and processing data from interactive websites';
menu4_arr[2]='websites integration with database built in Oracle, MySql';
menu4_arr[3]='creating database structure';
menu4_arr[4]='building interfaces for self-managing websites';
menu4_arr[5]='programming autoresponders';


menu1_txt='';
menu2_txt='';
menu3_txt='';
menu4_txt='';

menu_txt='<p>'+
         '<a href="javascript:pokaz_menu_g1()"><img border="0" src="../images/button/close_x.jpg" align="right" width="10" height="10"></a><br>'+
		  '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../services.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;services</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria1/show1_g1.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 1</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria2/show1_g2.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 2</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria3/show1_g3.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 3</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../contact.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;contact</a><br>'+
         '&nbsp;&nbsp;</p>';

menu_txt_g2='<p>'+
         '<a href="javascript:pokaz_menu_g2()"><img border="0" src="../images/button/close_x.jpg" align="right" width="10" height="10"></a><br>'+
		  '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../services.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;services</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria1/show1_g1.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 1</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria2/show1_g2.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 2</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria3/show1_g3.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 3</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../contact.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;contact</a><br>'+
         '&nbsp;&nbsp;</p>';

menu_txt_g3='<p>'+
         '<a href="javascript:pokaz_menu_g3()"><img border="0" src="../images/button/close_x.jpg" align="right" width="10" height="10"></a><br>'+
		  '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../services.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;services</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria1/show1_g1.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 1</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria2/show1_g2.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 2</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../galeria3/show1_g3.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;gallery 3</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="../contact.htm"><img border="0" src="../images/button/menu_bt10.jpg">&nbsp;contact</a><br>'+
         '&nbsp;&nbsp;</p>';

menu_txt_ser='<p>'+
         '<a href="javascript:pokaz_menu_ser()"><img border="0" src="images/button/close_x.jpg" align="right" width="10" height="10"></a><br>'+
		  '&nbsp;&nbsp;&nbsp;&nbsp;<a href="services.htm"><img border="0" src="images/button/menu_bt10.jpg">&nbsp;services</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="galeria1/show1_g1.htm"><img border="0" src="images/button/menu_bt10.jpg">&nbsp;gallery 1</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="galeria2/show1_g2.htm"><img border="0" src="images/button/menu_bt10.jpg">&nbsp;gallery 2</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="galeria3/show1_g3.htm"><img border="0" src="images/button/menu_bt10.jpg">&nbsp;gallery 3</a><br>'+
         '&nbsp;&nbsp;&nbsp;&nbsp;<a href="contact.htm"><img border="0" src="images/button/menu_bt10.jpg">&nbsp;contact</a><br>'+
         '&nbsp;&nbsp;</p>';

var czas_gear,czas_menu,czas_kamera,czas_bgrd,czas_dymy,czas_home, czas_bulb,stars_cz, wygas, wygas_lx,czas_onoff;
var id_pic,plik_pic, pic, imie, nr, skad, min_timer;

var starsrc1="images/star.jpg";

var starsrc="../images/star.jpg";
var linksrc="../images/arrow_lx_2.gif";

var starsrc_w="../images/wish_w.jpg";
var starsrc_r="../images/wish_r.jpg";

var starsrc_w1="images/wish_w.jpg";
var starsrc_r1="images/wish_r.jpg";

var nr_of_stars = 18;
var dy, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i;


doc_width = 800;
doc_height = 600;

dy = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j=3;
k=4;
var ff=1;

  x_odl= new Array();
  pict_move= new Array();
  pict_kat= new Array();
  x_odl[1]=240;
  x_odl[2]=340;
  x_odl[3]=440;
  x_odl[4]=540;
  x_odl[5]=640;
  x_odl[6]=740;
  x_odl[7]=840;
  pict_move[1]="../images/kat_4_m.jpg";
  pict_move[2]="../images/kat_1_m.jpg";
  pict_move[3]="../images/kat_2_m.jpg";
  pict_move[4]="../images/kat_3_m.jpg";
  pict_move[5]="../images/kat_6_m.jpg";
  pict_move[6]="../images/kat_5_m.jpg";
  pict_move[7]="../images/kat_4_m.jpg";

  pict_kat[1]="../images/kat_4.jpg";
  pict_kat[2]="../images/kat_1.jpg";
  pict_kat[3]="../images/kat_2.jpg";
  pict_kat[4]="../images/kat_3.jpg";
  pict_kat[5]="../images/kat_6.jpg";
  pict_kat[6]="../images/kat_5.jpg";
  pict_kat[7]="../images/kat_4.jpg";
   //w          h
  pict_kat[11]=298;  pict_kat[21]=314;
  pict_kat[12]=298;  pict_kat[22]=347;
  pict_kat[13]=298;  pict_kat[23]=339;
  pict_kat[14]=298;  pict_kat[24]=329;
  pict_kat[15]=258;  pict_kat[25]=330;
  pict_kat[16]=298;  pict_kat[26]=266;
  pict_kat[17]=298;  pict_kat[27]=314;

  rozjod=700;
  rozjdo=600;
  sciemnijod=500;
  sciemnijdo=400;
  speed_min=4;

//animacja menu
c_podpowiedzi= new Array();
c_podpowiedzi[0]="../images/button/c_menu_bok_l.jpg";
c_podpowiedzi[1]="../images/button/c_menu.jpg";
c_podpowiedzi[2]="../images/button/c_zoom.jpg";
c_podpowiedzi[3]="../images/button/c_bgrnd.jpg";
c_podpowiedzi[4]="../images/button/c_tour.jpg";
c_podpowiedzi[5]="../images/button/c_sh_lx.jpg";
c_podpowiedzi[6]="../images/button/c_spec.jpg";
c_podpowiedzi[7]="../images/button/c_lights.jpg";
c_podpowiedzi[8]="../images/button/c_home.jpg";
c_podpowiedzi[9]="../images/button/c_menu_bok_p.jpg";

c_podpowiedzi_ser= new Array();
c_podpowiedzi_ser[0]="images/button/c_menu_bok_l.jpg";
c_podpowiedzi_ser[1]="images/button/c_menu.jpg";
c_podpowiedzi_ser[2]="images/button/c_zoom.jpg";
c_podpowiedzi_ser[3]="images/button/c_bgrnd.jpg";
c_podpowiedzi_ser[4]="images/button/c_tour.jpg";
c_podpowiedzi_ser[5]="images/button/c_sh_lx.jpg";
c_podpowiedzi_ser[6]="images/button/c_spec.jpg";
c_podpowiedzi_ser[7]="images/button/c_lights.jpg";
c_podpowiedzi_ser[8]="images/button/c_home.jpg";
c_podpowiedzi_ser[9]="images/button/c_menu_bok_p.jpg";

fcj= new Array();
fcj[1]= 'show_przyc_menu()';
fcj[2]= 'show_przyc_kamera()';
fcj[3]= 'show_przyc_background()';
fcj[4]= 'show_przyc_dymy()';
fcj[5]= 'show_przyc_home()';
fcj[6]= 'show_anim_1()';
fcj[7]= 'show_przyc_bulb()';
fcj[8]= 'show_przyc_onoff()';

fcj_ser= new Array();
fcj_ser[1]= 'show_przyc_menu_ser()';
fcj_ser[2]= 'show_przyc_kamera()';
fcj_ser[3]= 'show_przyc_background()';
fcj_ser[4]= 'show_przyc_dymy_ser()';
fcj_ser[5]= 'show_przyc_home_ser()';
fcj_ser[6]= 'show_anim_1()';
fcj_ser[7]= 'show_przyc_bulb_ser()';
fcj_ser[8]= 'show_przyc_onoff()';

czas= new Array();
czas[1]= 'czas_menu';
czas[2]= 'czas_kamera';
czas[3]= 'czas_bgrd';
czas[4]= 'czas_dymy';
czas[5]= 'czas_home';
czas[6]= 'czas_gear';
czas[7]= 'czas_bulb';

poz_arr = new Array();
poz_arr[1]=420;
poz_arr[2]=370;
poz_arr[3]=315;
poz_arr[4]=270;
poz_arr[5]=220;
poz_arr[6]=165;
poz_arr[7]=110;
poz_arr[8]=75;


poz_menu = new Array();
poz_menu[1]=240;
poz_menu[2]=190;
poz_menu[3]=165;
poz_menu[4]=160;
poz_menu[5]=100;
poz_menu[6]=80;
poz_menu[7]=60;
poz_menu[8]=25;

poz_arr_g2 = new Array();
poz_arr_g2[1]=820;
poz_arr_g2[2]=770;
poz_arr_g2[3]=715;
poz_arr_g2[4]=670;
poz_arr_g2[5]=620;
poz_arr_g2[6]=565;
poz_arr_g2[7]=510;
poz_arr_g2[8]=475;


poz_menu_g2 = new Array();
poz_menu_g2[1]=640;
poz_menu_g2[2]=590;
poz_menu_g2[3]=565;
poz_menu_g2[4]=560;
poz_menu_g2[5]=500;
poz_menu_g2[6]=480;
poz_menu_g2[7]=460;
poz_menu_g2[8]=425;


poz_arr_g3 = new Array();
poz_arr_g3[1]=820;
poz_arr_g3[2]=poz_arr_g3[1]-50;//590;
poz_arr_g3[3]=poz_arr_g3[2]-70;//535;
poz_arr_g3[4]=poz_arr_g3[3]-45;//490;
poz_arr_g3[5]=poz_arr_g3[4]-50;//440;
poz_arr_g3[6]=poz_arr_g3[5]-55;//385;
poz_arr_g3[7]=poz_arr_g3[6]-55;//330;
poz_arr_g3[8]=poz_arr_g3[7]-40;//290;


poz_menu_g3 = new Array();
poz_menu_g3[1]=630;
poz_menu_g3[2]=poz_menu_g3[1]-40//420;
poz_menu_g3[3]=poz_menu_g3[2]-55//365;
poz_menu_g3[4]=poz_menu_g3[3]-5//360;
poz_menu_g3[5]=poz_menu_g3[4]-60//300;
poz_menu_g3[6]=poz_menu_g3[5]-20//280;
poz_menu_g3[7]=poz_menu_g3[6]-40//260;
poz_menu_g3[8]=poz_menu_g3[7]-5//225;

poz_arr_ser = new Array();
poz_arr_ser[1]=445;
poz_arr_ser[2]=poz_arr_ser[1];//590;
poz_arr_ser[3]=poz_arr_ser[2];//535;
poz_arr_ser[4]=poz_arr_ser[3];//490;
poz_arr_ser[5]=poz_arr_ser[4];//440;
poz_arr_ser[6]=poz_arr_ser[5]-58;//385;
poz_arr_ser[7]=poz_arr_ser[6]-55;//330;
poz_arr_ser[8]=poz_arr_ser[7]-40;//290;


poz_menu_ser = new Array();
poz_menu_ser[1]=260;
poz_menu_ser[2]=poz_menu_ser[1]//420;
poz_menu_ser[3]=poz_menu_ser[2]//365;
poz_menu_ser[4]=poz_menu_ser[3]//360;
poz_menu_ser[5]=poz_menu_ser[4]//300;
poz_menu_ser[6]=poz_menu_ser[5]-10//280;
poz_menu_ser[7]=poz_menu_ser[6]-10//260;
poz_menu_ser[8]=poz_menu_ser[7]-5//225;


cal_g1 = new Array();
tcal_g1 = new Array();
rcal_g1 = new Array();
wcal_g1 = new Array();

cal_g1[1]='Movie designed in Macromedia Flash with use of Flash Script.';
cal_g1[2]='Icons designed in PhotoShop and Corel Draw.';
cal_g1[3]='Elements animated in JavaScript with use of Timeout variables.';
cal_g1[4]='Combination of pictures made in PhotoShop.';
cal_g1[5]='Transparent gif-element animated in JavaScript. Size and position are calculated by function on the basis of line equation.';
cal_g1[6]='Elements placed on the layers and controlled by functions.';
cal_g1[7]='Used: filter alfa effect, style change, dynamic elements.';

tcal_g1[1]=320;
tcal_g1[2]=140;
tcal_g1[3]=220;
tcal_g1[4]=320;
tcal_g1[5]=400;
tcal_g1[6]=320;
tcal_g1[7]=400;

rcal_g1[1]=680;
rcal_g1[2]=100;
rcal_g1[3]=80;
rcal_g1[4]=300;
rcal_g1[5]=280;
rcal_g1[6]=120;
rcal_g1[7]=85;

wcal_g1[1]=110;
wcal_g1[2]=330;
wcal_g1[3]=100;
wcal_g1[4]=120;
wcal_g1[5]=230;
wcal_g1[6]=100;
wcal_g1[7]=100;
szybkosc=500;

xy_lx1 = new Array();
xy_lx2 = new Array();
xy_lx1_g2 = new Array();
xy_lx2_g2 = new Array();
// nieparzyste = top
// parzyste = right

xy_lx_g2=new Array();
xy_lx_g3=new Array();
xy_lx = new Array();
// numery pod slowem galeria1
xy_lx[1]=128;xy_lx[2]=712;
xy_lx[3]=128;xy_lx[4]=692;
xy_lx[5]=128;xy_lx[6]=668;
xy_lx[7]=128;xy_lx[8]=644;
xy_lx[9]=128;xy_lx[10]=620;
xy_lx[11]=128;xy_lx[12]=596;
xy_lx[13]=128;xy_lx[14]=576;
xy_lx[15]=128;xy_lx[16]=552;
xy_lx[17]=128;xy_lx[18]=528;
xy_lx[19]=128;xy_lx[20]=504;
// ikony menu
xy_lx[21]=118;xy_lx[22]=400;
xy_lx[23]=118;xy_lx[24]=350;
xy_lx[25]=118;xy_lx[26]=300;
xy_lx[27]=118;xy_lx[28]=250;
xy_lx[29]=118;xy_lx[30]=200;
xy_lx[31]=118;xy_lx[32]=150;
xy_lx[33]=118;xy_lx[34]=100;
xy_lx[35]=118;xy_lx[36]=50;

// obrazy w galeria1
xy_lx[37]=200;xy_lx[38]=344;//7
xy_lx[39]=200;xy_lx[40]=420;//2
xy_lx[41]=200;xy_lx[42]=500;//9
xy_lx[43]=254;xy_lx[44]=500;//6
xy_lx[45]=254;xy_lx[46]=420;//0

xy_lx[47]=438;xy_lx[48]=420;//8
xy_lx[49]=438;xy_lx[50]=344;//5
xy_lx[51]=492;xy_lx[52]=344;//3
xy_lx[53]=492;xy_lx[54]=420;//4
xy_lx[55]=492;xy_lx[56]=500;//1
//polozenie dla ramki nr1 gal1
//sa w pliku strony


noc_pic=new Array();
noc_pic[1]="../images/mini/wielkof.jpg";
noc_pic[2]="../images/mini/kat_3.jpg";
noc_pic[3]="../images/mini/klucz.jpg";
noc_pic[4]="../images/mini/eifel.jpg";
noc_pic[5]="../images/mini/materia.jpg";
noc_pic[6]="../images/mini/aparat.jpg";
noc_pic[7]="../images/mini/zd1.jpg";
noc_pic[8]="../images/mini/mat_prom.jpg";
noc_pic[9]="../images/mini/einstein.jpg";
noc_pic[10]="../images/mini/nest1.jpg";
noc_pic[11]="../images/mini/twarz.jpg";
noc_pic[12]="../images/mini/persp.jpg";
noc_pic[13]="../images/mini/schody_tlo.jpg";
noc_pic[14]="../images/mini/tunel1.jpg";
noc_pic[15]="../images/mini/oxford.jpg";
noc_pic[16]="../images/mini/twarz2.jpg";
noc_pic[17]="../images/mini/waga.jpg";
noc_pic[18]="../images/mini/wielblad.jpg";
noc_pic[19]="../images/mini/zd4.jpg";
noc_pic[20]="../images/mini/lupa.jpg";
noc_pic[21]="../images/mini/zd3.jpg";
noc_pic[22]="../images/mini/blysk.jpg";
noc_pic[23]="../images/mini/zd5.jpg";
noc_pic[24]="../images/mini/zd6.jpg";
noc_pic[25]="../images/mini/zegarmistrz.jpg";


var ttrg1_1,ttrg1_2,ttrg1_3,ttrg1_4,ttrg1_5,ttrg1_6,ttrg1_7,ttrg1_8,ttrg1_9,ttrg1_10;
var ttrg1_11,ttrg1_12,ttrg1_13,ttrg1_14,ttrg1_15,ttrg1_16,ttrg1_17,ttrg1_18,ttrg1_19,ttrg1_20;
var ttrg1_21,ttrg1_22,ttrg1_23,ttrg1_24,ttrg1_25,ttrg1_26;

var ttrg2_1,ttrg2_2,ttrg2_3,ttrg2_4,ttrg2_5,ttrg2_6,ttrg2_7,ttrg2_8,ttrg2_9,ttrg2_10;
var ttrg2_11,ttrg2_12,ttrg2_13,ttrg2_14,ttrg2_15,ttrg2_16,ttrg2_17,ttrg2_18,ttrg2_19,ttrg2_20;
var ttrg2_21,ttrg2_22,ttrg2_23,ttrg2_24,ttrg2_25,ttrg2_26;


var ttrg3_1,ttrg3_2,ttrg3_3,ttrg3_4,ttrg3_5,ttrg3_6,ttrg3_7,ttrg3_8,ttrg3_9,ttrg3_10;
var ttrg3_11,ttrg3_12,ttrg3_13,ttrg3_14,ttrg3_15,ttrg3_16,ttrg3_17,ttrg3_18,ttrg3_19,ttrg3_20;
var ttrg3_21,ttrg3_22,ttrg3_23,ttrg3_24,ttrg3_25,ttrg3_26;

var odpal; 


// uklad ramki i potrzebnych param
gdzie_top = new Array();
      gdzie_top[1]=452;
      gdzie_top[4]=452;	      
      gdzie_top[3]=452;
      gdzie_top[8]=398;	      
      gdzie_top[5]=398;
      gdzie_top[9]=160;
      gdzie_top[2]=160;
      gdzie_top[7]=160;
      gdzie_top[6]=210;
      gdzie_top[0]=210;
      
gdzie_right = new Array();
      gdzie_right[1]=496;
      gdzie_right[4]=418;
      gdzie_right[3]=340;
      gdzie_right[8]=418;
      gdzie_right[5]=340;
      gdzie_right[9]=496;
      gdzie_right[2]=419;
      gdzie_right[7]=340;
      gdzie_right[6]=496;
      gdzie_right[0]=419;

x1 = new Array();									
      x1[1]=496;
      x1[4]=418;
      x1[3]=340;
      x1[8]=418;
      x1[5]=340;
      x1[9]=496;
      x1[2]=419;
      x1[7]=340;
      x1[6]=496;
      x1[0]=419;

y1 = new Array();
      y1[1]=452;
      y1[4]=452;	
      y1[3]=452;
      y1[8]=398;
      y1[5]=398;
      y1[9]=160;
      y1[2]=160;
      y1[7]=160;
      y1[6]=210;
      y1[0]=210;

      x2=351;
      y2=240; 
      
      speed_it=2; 
      width_zm=100;
      height_zm=70;
      width_org=250;
      height_org=176;
      jak_zm_h=height_zm/height_org*100;

      zn=0;
      duze_male='male';
      tcal_g1[5]=400;
      rcal_g1[5]=280;
      a = new Array();
      b = new Array();
      il_krokow = new Array();
      zm_wsk = new Array();
      zw_wsk=0;
      o_ile_pow_w_kroku_y = new Array();

//function przelicz_parametry_ramki()
{      
 for (o=0;o<10;o++)    
 { 
     a[o]=(y1[o]-y2)/(x1[o]-x2);
     b[o]= y1[o]-(a[o]*x1[o]);
     il_krokow[o]=Math.abs(y2-y1[o])/speed_it;
     o_ile_pow_w_kroku_y[o]=(100-jak_zm_h)/Math.abs(y2-y1[o])*speed_it;
     zm_wsk[o]=il_krokow[o];
     xy_lx[57]=200;
     xy_lx[58]=200;

     xy_lx1[o]=y1[o]-10; 
     xy_lx2[o]=x1[o]-80; 
 }
}


cal_g2 = new Array();
tcal_g2 = new Array();
rcal_g2 = new Array();
wcal_g2 = new Array();

cal_g2[1]='Function written for animation frame-gif-element, on the basis of start and end position, calculates the trajectory.';
cal_g2[2]='Icons designed in PhotoShop and Corel Draw.';
cal_g2[3]='Elements animated in JavaScript with use of Timeout variables.';
cal_g2[4]='Combination of pictures made in PhotoShop.';
cal_g2[5]='Transparent gif-element animated in JavaScript. Size and position are calculated by function on the basis of line equation.';
cal_g2[6]='Elements placed on the layers and controlled by functions.';
cal_g2[7]='Used: filter alfa effect, style change, dynamic elements.';
cal_g2[8]='Functon TOUR, on each site, shows how many possibilites and choices of interactive changes one can make.';

tcal_g2[1]=180;
tcal_g2[2]=140;
tcal_g2[3]=40;
tcal_g2[4]=490;
tcal_g2[5]=330;
tcal_g2[6]=220;
tcal_g2[7]=400;
tcal_g2[8]=520;

rcal_g2[1]=580;
rcal_g2[2]=500;
rcal_g2[3]=380;
rcal_g2[4]=300;
rcal_g2[5]=180;
rcal_g2[6]=120;
rcal_g2[7]=85;
rcal_g2[8]=205;

wcal_g2[1]=140;
wcal_g2[2]=330;
wcal_g2[3]=150;
wcal_g2[4]=300;
wcal_g2[5]=240;
wcal_g2[6]=100;
wcal_g2[7]=100; 
wcal_g2[8]=450;


cal_ser = new Array();
tcal_ser = new Array();
rcal_ser = new Array();
wcal_ser = new Array();

cal_ser[1]='Icons designed in PhotoShop and Corel Draw.';
cal_ser[2]='Elements animated in JavaScript with use of Timeout variables.';
cal_ser[3]='Functions change style properties like: display, visibility, position.';
cal_ser[4]='Menu animated and controlled by JavaScript functions.';
cal_ser[5]='Elements placed on the layers and controlled by functions.';
cal_ser[6]='Used: filter alfa effect, style change, dynamic elements.';

tcal_ser[1]=40;
tcal_ser[2]=140;
tcal_ser[3]=380;
tcal_ser[4]=220;
tcal_ser[5]=330;
tcal_ser[6]=220;


rcal_ser[1]=460;
rcal_ser[2]=250;
rcal_ser[3]=680;
rcal_ser[4]=350;
rcal_ser[5]=180;
rcal_ser[6]=120;


wcal_ser[1]=200;
wcal_ser[2]=330;
wcal_ser[3]=150;
wcal_ser[4]=300;
wcal_ser[5]=240;
wcal_ser[6]=100;


cal_g3 = new Array();
tcal_g3 = new Array();
rcal_g3 = new Array();
wcal_g3 = new Array();

cal_g3[2]='Icons designed in PhotoShop and Corel Draw.';
cal_g3[1]='Elements animated in JavaScript with use of Timeout variables.';
cal_g3[6]='Combination of pictures made in PhotoShop.';
cal_g3[4]='Elements placed on the layers and controlled by functions.';
cal_g3[5]='Used: filter alfa effect, style change, dynamic elements.';
cal_g3[3]='Functon TOUR, on each site, shows how many possibilites and choices of interactive changes one can make.';

tcal_g3[1]=180;
tcal_g3[2]=140;
tcal_g3[3]=340;
tcal_g3[4]=530;
tcal_g3[5]=330;
tcal_g3[6]=220;
tcal_g3[7]=400;
tcal_g3[8]=520;

rcal_g3[1]=580;
rcal_g3[2]=500;
rcal_g3[3]=530;
rcal_g3[4]=250;
rcal_g3[5]=180;
rcal_g3[6]=120;
rcal_g3[7]=85;
rcal_g3[8]=205;

wcal_g3[1]=140;
wcal_g3[2]=330;
wcal_g3[3]=150;
wcal_g3[4]=300;
wcal_g3[5]=140;
wcal_g3[6]=100;
wcal_g3[7]=100; 
wcal_g3[8]=450;


//menu
xy_lx_g3[1]=128;xy_lx_g3[2]=750;
xy_lx_g3[3]=128;xy_lx_g3[4]=xy_lx_g3[2]-60;
xy_lx_g3[5]=128;xy_lx_g3[6]=xy_lx_g3[4]-50;
xy_lx_g3[7]=128;xy_lx_g3[8]=xy_lx_g3[6]-50;
xy_lx_g3[9]=128;xy_lx_g3[10]=xy_lx_g3[8]-50;
xy_lx_g3[11]=128;xy_lx_g3[12]=xy_lx_g3[10]-50;
xy_lx_g3[13]=128;xy_lx_g3[14]=xy_lx_g3[12]-50;
//ramka
xy_lx_g3[15]=268;xy_lx_g3[16]=540;
// cyfry
xy_lx_g3[17]=522;xy_lx_g3[18]=622;
xy_lx_g3[19]=522;xy_lx_g3[20]=590;
xy_lx_g3[21]=522;xy_lx_g3[22]=558;
xy_lx_g3[23]=522;xy_lx_g3[24]=522;
xy_lx_g3[25]=522;xy_lx_g3[26]=488;
xy_lx_g3[27]=522;xy_lx_g3[28]=452;



var ii=1;
var time1;

function wylacz()
{ 
 if (document.katalog_min.style.visibility=='visible')
 { 
   document.katalog_min.style.visibility='hidden';
 }
 else
 { 
   document.katalog_min.style.visibility='visible';
 }
} 

function wylacz_min(ii)
{ 

 document.getElementById("z"+ii).style.visibility='hidden'; 
 ii++;
 if (ii>=17)
  {
   ii=1; 
   return;
  }
 time1=setTimeout("wylacz_min("+ii+")",5);
} 

function uderzyc(ktory)
{
 for (i=1;i<=6;i++)
 {
  for (o=1;o<=16;o++)
  {
   document.getElementById("z"+o).style.visibility='visible';
  }
  document.images["g3_"+i].src="../images/button/"+i+"w.jpg";    
  if (i==ktory) 
  {
   document.images["g3_"+i].src="../images/button/"+i+"r.jpg";
   document.katalog.src=pict_kat[ktory];
   document.katalog.width=pict_kat['1'+ktory];
   document.katalog.height=pict_kat['2'+ktory];
   
  }
 }
 wylacz_min(1);
} 

function zaslon()
{
 if (document.getElementById("z"+ii).style.visibility=='visible')
 { 
   wylacz_min(1);
 }
 else
 { 
  for (o=1;o<=16;o++)
  {
   document.getElementById("z"+o).style.visibility='visible';
  }
 }

}

var k=1; 

function tour_g3(pic_g3)
{
  zatrzymaj_tour_g3();
  document.getElementById("lx_arrow_g3").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
   time_step=300;
	//pokaz menu1 123456...
   ttrg3_1=setTimeout("tour_part1_g3("+pic_g3+")",time_step);
    
   time_step=time_step+700;
   //pokaz obrazek dla 1
   ttrg3_2=setTimeout("tour_part2_g3("+pic_g3+")",time_step); 

   time_step=time_step+1200;
	//pokaz naglowek dla ikony menu           
   ttrg3_3=setTimeout("tour_part6_g3()",time_step);

   time_step=time_step+1200;   
   //ikona menu click wl
   ttrg3_4=setTimeout("pokaz_menu_g3();",time_step);

   time_step=time_step+400;   
   //pokaz pod menu
   ttrg3_5=setTimeout("tour_part6_1_g3()",time_step);    
 
   time_step=time_step+400;   
   //pokaz pod menu
   ttrg3_6=setTimeout("tour_part6_2_g3()",time_step);  

   time_step=time_step+400;
   //pokaz naglowek rama
   ttrg3_7=setTimeout("tour_part7_g3()",time_step);
	    
   time_step=time_step+700;
   //wylacz tlo
   ttrg3_8=setTimeout("zaslon()",time_step);
    
   time_step=time_step+700;    
   //wlacz tlo
    ttrg3_9=setTimeout("zaslon()",time_step);


    time_step=time_step+700;
    //pokaz naglowek tour
    ttrg3_10=setTimeout("tour_part8_g3()",time_step);

    time_step=time_step+700;
    //pokaz naglowek linx
    ttrg3_11=setTimeout("tour_part9_g3()",time_step);

    time_step=time_step+700;
    //pokaz opis dymy
    ttrg3_12=setTimeout("tour_part10_g3()",time_step);

    time_step=time_step+700;
    //wlacz dymy
    ttrg3_13=setTimeout("pokaz_dym_g3()",time_step);
    
    time_step=time_step+1000;    
    //wylacz dymy
    ttrg3_14=setTimeout("pokaz_dym_g3()",time_step);

    time_step=time_step+700;
    //pokaz nopis bulb
    ttrg3_15=setTimeout("tour_part11_g3()",time_step);
        
    time_step=time_step+600;    
    //wlacz ciemnosc
    ttrg3_16=setTimeout("document.images.lamp.click()",time_step);
        
    time_step=time_step+1200;    
    // wylacz ciemnosc
    ttrg3_17=setTimeout("document.images.lamp.click()",time_step);

    time_step=time_step+100;
    //pokaz nopis bulb
    ttrg3_18=setTimeout("tour_part11_g3()",time_step);
    
    time_step=time_step+700;
    //pokaz opis home
    ttrg3_19=setTimeout("tour_part12_g3()",time_step);
    
    time_step=time_step+500;   
    //wygas napis 
    ttrg3_20=setTimeout("tour_part13_g3()",time_step);    
}




// uklad ramki i potrzebnych param
gdzie_top_g2 = new Array();
      gdzie_top_g2[1]=389;
      gdzie_top_g2[2]=379;	      
      gdzie_top_g2[3]=409;
      gdzie_top_g2[4]=389;	      
      
gdzie_right_g2 = new Array();
      gdzie_right_g2[1]=478;
      gdzie_right_g2[2]=368;
      gdzie_right_g2[3]=259;
      gdzie_right_g2[4]=147;

x1_g2 = new Array();									
      x1_g2[1]=478;
      x1_g2[2]=368;
      x1_g2[3]=259;
      x1_g2[4]=147;

y1_g2 = new Array();
      y1_g2[1]=389;
      y1_g2[2]=379;	
      y1_g2[3]=409;
      y1_g2[4]=398;

      x2_g2=238;
      y2_g2=160; 
      
      speed_it_g2=4; 
      width_zm_g2=70;
      height_zm_g2=100;
      width_org_g2=236;
      height_org_g2=316;
      jak_zm_h_g2=height_zm_g2/height_org_g2*100;

      zn_g2=0;
      duze_male='male';
     // tcal_g2[5]=400;
     // rcal_g2[5]=280;
      a_g2 = new Array();
      b_g2 = new Array();
      il_krokow_g2 = new Array();
      zm_wsk_g2 = new Array();
      zw_wsk_g2=0;
      o_ile_pow_w_kroku_y_g2 = new Array();

//function przelicz_parametry_ramki_g2()
{      
 for (o=0;o<10;o++)    
 { 
     a_g2[o]=(y1_g2[o]-y2_g2)/(x1_g2[o]-x2_g2);
     b_g2[o]= y1_g2[o]-(a_g2[o]*x1_g2[o]);
     il_krokow_g2[o]=Math.abs(y2_g2-y1_g2[o])/speed_it_g2;
     o_ile_pow_w_kroku_y_g2[o]=(100-jak_zm_h_g2)/Math.abs(y2_g2-y1_g2[o])*speed_it_g2;
     zm_wsk_g2[o]=il_krokow_g2[o];
     xy_lx1_g2[o]=y1_g2[o]+20;
     xy_lx2_g2[o]=x1_g2[o]-90; 
 }
}

function move_rama(no_r)
{
 /*if(document.getElementById('dv_menu').style.visibility=='visible')
 {
  document.getElementById('dv_menu').style.visibility='hidden';
  document.getElementById('dv_menu_tlo').style.visibility='hidden';
 }*/
 if (resztaFlag==true)
  { //alert('pomniejszanie');
    document.getElementById('rama_pict').style.visibility='visible';
    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
    changeImages('rama', '../images/button/rama1a.jpg'); 
     if (duze_male=='duze') 
      {
 	    if (zn==0) 
 	     {
 	      document.klucz.style.visibility='hidden';
 	      document.getElementById('rama_pict_x').style.visibility='hidden';
 	      changeImages('switch_rama', '../images/button/camera_w.jpg');
 	      ++zn;
 	     }
	  document.images["rama_gl"].height=(zm_wsk[no_r]*o_ile_pow_w_kroku_y[no_r]+jak_zm_h)/100*height_org;
     document.images["rama_gl"].width=(width_org*document.images["rama_gl"].height)/height_org;
     --zm_wsk[no_r];
     //alert();
     gdzie_right[no_r]=Math.floor((gdzie_top[no_r]-b[no_r])/a[no_r]);
     if (no_r==1||no_r==3||no_r==4||no_r==5||no_r==8)
     {
     //na dole
     gdzie_top[no_r]+=speed_it;         
     }
     else
     {
     //na gorze
     gdzie_top[no_r]-=speed_it; 
     }
      if (zm_wsk[no_r]<0)
       {
	     document.klucz.style.visibility='hidden';
	     document.getElementById('rama_pict_x').style.visibility='hidden';
         zm_wsk[no_r]=il_krokow[no_r];
		  zn=0;
	  
         gdzie_top[no_r]=y1[no_r];
         gdzie_right[no_r]=x1[no_r];	
         document.getElementById('rama_pict').style.top=gdzie_top[no_r];
         document.getElementById('rama_pict').style.right=gdzie_right[no_r];          
         duze_male='male';
         return
        }

      xy_lx1[no_r]=y1[no_r]-10; 
      xy_lx2[no_r]=x1[no_r]-80;      
      document.getElementById("cal_fro5").style.top=400;
      document.getElementById("cal_tlo5").style.top=400;
      rcal_g1[5]=280;        
      document.getElementById('rama_pict').style.top=gdzie_top[no_r];
      document.getElementById('rama_pict').style.right=gdzie_right[no_r];   
      czas_rama = setTimeout('move_rama('+no_r+')',2); 
  }  
 else
  {    //alert('powiekszanie');
 	   if (zn==0) {changeImages('switch_rama', '../images/button/camera_r.jpg');} 
	   document.images["rama_gl"].height=(zw_wsk*o_ile_pow_w_kroku_y[no_r]+jak_zm_h)/100*height_org;
      document.images["rama_gl"].width=(width_org*document.images["rama_gl"].height)/height_org;
      gdzie_right[no_r]=(gdzie_top[no_r]-b[no_r])/a[no_r];
      if (no_r==1||no_r==3||no_r==4||no_r==5||no_r==8)
      {
      //na dole
      gdzie_top[no_r]-=speed_it;    
      }
      else
      {
      //na gorze
      gdzie_top[no_r]+=speed_it;
      }
      ++zw_wsk;           
      if (zw_wsk>il_krokow[no_r])
      {
       zm_wsk[no_r]=il_krokow[no_r];
       clearTimeout(); 
       document.klucz.style.visibility='visible';
       document.getElementById('rama_pict_x').style.visibility='visible';
       zw_wsk=0;
       
       gdzie_top[no_r]=y2;
       gdzie_right[no_r]=x2;
       document.getElementById('rama_pict').style.top=gdzie_top[no_r];
       document.getElementById('rama_pict').style.right=gdzie_right[no_r];        
       duze_male='duze';      
       return
      }
      xy_lx1[no_r]=y2+90;
      xy_lx2[no_r]=x2-60;  
        
      document.getElementById("cal_fro5").style.top=380;
      document.getElementById("cal_tlo5").style.top=380;
      rcal_g1[5]=280;
      document.getElementById('rama_pict').style.top=gdzie_top[no_r];
      document.getElementById('rama_pict').style.right=gdzie_right[no_r]; 
      czas_rama = setTimeout('move_rama('+no_r+')',2);
  }
 }
}


function build_menu(tablica_menu)
{
menu_txt=
'<table border="0" cellspacing="0" cellpadding="0" bordercolor="#0000FF">';
for (i=1;i<tablica_menu.length-1;i++)
 {
 menu_txt=menu_txt+
 '<tr width="532">'+
 '<td width="30" height="19" align="right"><font color="#FFFFFF" face="Arial" size="2"><img border="0" src="images/list_mid.jpg" width="4" height="19"><img border="0" src="images/list_pole.jpg" width="20" height="19"></font></td>'+
 '<td width="532" width="100%" height="19" valign="middle"><font color="#FFFFFF" face="Arial" size="2">&nbsp;&nbsp;&nbsp;'+tablica_menu[i]+'</font></td>'+
 '</tr>';
 }
menu_txt=menu_txt+
'<tr>'+
'<td width="30" height="19" align="right"><font color="#FFFFFF" face="Arial" size="2"><img border="0" src="images/list_last.jpg" width="4" height="19"><img border="0" src="images/list_pole.jpg" width="20" height="19"></font></td>'+
'<td width="532" width="100%" height="19" valign="middle"><font color="#FFFFFF" face="Arial" size="2">&nbsp;&nbsp;&nbsp;'+tablica_menu[tablica_menu.length-1]+'</font></td>'+
'</tr>'+
'</table>';
return menu_txt;
}

function build_menu1(tablica_menu)
{
menu_txt=
'<table border="0" cellspacing="0" cellpadding="0" bordercolor="#0000FF">';
for (i=1;i<tablica_menu.length-1;i++)
 {
 menu_txt=menu_txt+
 '<tr>'+
 '<td width="100%" valign="middle"><font color="#000000" face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img border="0" src="../images/button/menu_bt10.jpg"></font>'+
 '<font color="#000000" face="Arial" size="2">&nbsp;&nbsp;&nbsp;'+tablica_menu[i]+'</font></td>'+
 '</tr>';
 }
menu_txt=menu_txt+
'<tr>'+
'<td width="100%" valign="middle"><font color="#000000" face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img border="0" src="../images/button/menu_bt10.jpg"></font>'+
'<font color="#000000" face="Arial" size="2">&nbsp;&nbsp;&nbsp;'+tablica_menu[tablica_menu.length-1]+'</font></td>'+
'</tr>'+
'</table>';
return menu_txt;
}

function wlacz(ob,ob1)
{
 if (document.getElementById(ob).style.display=='none')
  {  
   document.getElementById(ob).style.display='';
   document.images["m"+ob1+"_bt"].src="images/button/minus.jpg";
  }
 else
  {
   document.getElementById(ob).style.display='none';  
   document.images["m"+ob1+"_bt"].src="images/button/plus.jpg";
  }
}
function wlacz1(ob,ob1)
{
 if (document.getElementById(ob).style.display=='none')
  {  
   document.getElementById(ob).style.display='';
   document.images["m"+ob1+"_bt"].src="../images/button/minus_w.jpg";
  }
 else
  {
   document.getElementById(ob).style.display='none';  
   document.images["m"+ob1+"_bt"].src="../images/button/plus_w.jpg";
  }
}

function wyl_ser()
{
 document.getElementById("menu1").style.display='none';
 document.getElementById("menu2").style.display='none';
 document.getElementById("menu3").style.display='none';
 document.getElementById("menu4").style.display='none';
 document.images["m1_bt"].src="images/button/plus.jpg";
 document.images["m2_bt"].src="images/button/plus.jpg";
 document.images["m3_bt"].src="images/button/plus.jpg";
 document.images["m4_bt"].src="images/button/plus.jpg";
}

function move_rama_g2(no_r)
{
 /*if(document.getElementById('dv_menu_g2').style.visibility=='visible')
 {
  document.getElementById('dv_menu_g2').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_g2').style.visibility='hidden';
 }*/
 if (resztaFlag==true)
  { //alert('pomniejszanie');
    document.getElementById('rama_pict').style.visibility='visible';
    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
    changeImages('rama', '../images/button/rama1a.jpg'); 
     if (duze_male=='duze') 
      {
 	    if (zn_g2==0) 
 	     {
 	      document.klucz.style.visibility='hidden';
 	      document.getElementById('rama_pict_x_g2').style.visibility='hidden';
 	      changeImages('switch_rama', '../images/button/camera_w.jpg');
 	      ++zn_g2;
 	     }
	  document.images["rama_gl"].height=(zm_wsk_g2[no_r]*o_ile_pow_w_kroku_y_g2[no_r]+jak_zm_h_g2)/100*height_org_g2;
     document.images["rama_gl"].width=(width_org_g2*document.images["rama_gl"].height)/height_org_g2;
     --zm_wsk_g2[no_r];

     gdzie_right_g2[no_r]=Math.floor((gdzie_top_g2[no_r]-b_g2[no_r])/a_g2[no_r]);
  
     gdzie_top_g2[no_r]+=speed_it_g2;         
  
      if (zm_wsk_g2[no_r]<0)
       {
	     document.klucz.style.visibility='hidden';
	     document.getElementById('rama_pict_x_g2').style.visibility='hidden';
         zm_wsk_g2[no_r]=il_krokow_g2[no_r];
		  zn_g2=0;
	  
         gdzie_top_g2[no_r]=y1_g2[no_r];
         gdzie_right_g2[no_r]=x1_g2[no_r];	
         document.getElementById('rama_pict').style.top=gdzie_top_g2[no_r];
         document.getElementById('rama_pict').style.right=gdzie_right_g2[no_r];          
         duze_male='male';
         return
        }

      xy_lx1_g2[no_r]=y1_g2[no_r]+20;
      xy_lx2_g2[no_r]=x1_g2[no_r]-90;   
 
      rcal_g2[5]=280;        
      document.getElementById('rama_pict').style.top=gdzie_top_g2[no_r];
      document.getElementById('rama_pict').style.right=gdzie_right_g2[no_r];   
      czas_rama = setTimeout('move_rama_g2('+no_r+')',2); 
  }  
 else
  {    //alert('powiekszanie');
 	   if (zn_g2==0) {changeImages('switch_rama', '../images/button/camera_r.jpg');} 
	   document.images["rama_gl"].height=(zw_wsk_g2*o_ile_pow_w_kroku_y_g2[no_r]+jak_zm_h_g2)/100*height_org_g2;
      document.images["rama_gl"].width=(width_org_g2*document.images["rama_gl"].height)/height_org_g2;
      gdzie_right_g2[no_r]=(gdzie_top_g2[no_r]-b_g2[no_r])/a_g2[no_r];

      gdzie_top_g2[no_r]-=speed_it_g2;    
      ++zw_wsk_g2;           
      if (zw_wsk_g2>il_krokow_g2[no_r])
      {
       zm_wsk_g2[no_r]=il_krokow_g2[no_r];
       clearTimeout(); 
       document.klucz.style.visibility='visible';
       document.getElementById('rama_pict_x_g2').style.visibility='visible';
       zw_wsk_g2=0;
       
       gdzie_top_g2[no_r]=y2_g2;
       gdzie_right_g2[no_r]=x2_g2;
       document.getElementById('rama_pict').style.top=gdzie_top_g2[no_r];
       document.getElementById('rama_pict').style.right=gdzie_right_g2[no_r];        
       duze_male='duze';      
       return
      }
 
      xy_lx1_g2[no_r]=y2_g2+190;
      xy_lx2_g2[no_r]=x2_g2-80;  
      rcal_g2[5]=280;
      document.getElementById('rama_pict').style.top=gdzie_top_g2[no_r];
      document.getElementById('rama_pict').style.right=gdzie_right_g2[no_r]; 
      czas_rama = setTimeout('move_rama_g2('+no_r+')',2);
  }
 }
}


function show_menu_over(nazwa,sx,wh,p)

{
 if(document.getElementById('dv_menu').style.visibility=='visible')
 {
  document.getElementById('dv_menu').style.visibility='hidden';
  document.getElementById('dv_menu_tlo').style.visibility='hidden';
 }
      clearTimeout(czas_menu);
      document.images["menu"].src='../images/button/menu_w.jpg';


      clearTimeout(czas_onoff);
      //document.images["switch1"].src='../images/button/off.jpg';

      clearTimeout(czas_kamera);
      document.images["switch_rama"].src='../images/button/camera_w.jpg';

      clearTimeout(czas_bgrd);
      document.images["rama"].src='../images/button/rama1.jpg';

      clearTimeout(czas_dymy);
      document.images["dymy"].src='../images/button/popisy_w.jpg';

      clearTimeout(czas_home);
      document.images["home"].src='../images/button/home_w.jpg';

      clearTimeout(czas_gear);    
      document.images["automat"].src='../images/button/gear1.jpg';

      clearTimeout(czas_bulb);    
      document.images["lamp"].src='../images/button/bulba.jpg';
  
  startday = new Date();
  clockStart = startday.getTime();
  document.c_podp.src=c_podpowiedzi[p];
  document.getElementById("c_arrow").style.right=poz_arr[sx];
  document.getElementById("c_menu").style.visibility='visible';
  document.getElementById("c_arrow").style.visibility='visible';
  document.getElementById("c_menu").style.right=poz_menu[sx];



      nazwa=setTimeout(fcj[wh],1);
      wygas=setTimeout('getSecs()',1);
} 


function show_menu_over_g2(nazwa,sx,wh)

{
 if(document.getElementById('dv_menu_g2').style.visibility=='visible')
 {
  document.getElementById('dv_menu_g2').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_g2').style.visibility='hidden';
 }
      clearTimeout(czas_menu);
      document.images["menu"].src='../images/button/menu_w.jpg';

      clearTimeout(czas_onoff);
      //document.images["switch1"].src='../images/button/off.jpg';

      clearTimeout(czas_kamera);
      document.images["switch_rama"].src='../images/button/camera_w.jpg';

      clearTimeout(czas_bgrd);
      document.images["rama"].src='../images/button/rama1.jpg';

      clearTimeout(czas_dymy);
      document.images["dymy"].src='../images/button/popisy_w.jpg';

      clearTimeout(czas_home);
      document.images["home"].src='../images/button/home_w.jpg';

      clearTimeout(czas_gear);    
      document.images["automat"].src='../images/button/gear1.jpg';

      clearTimeout(czas_bulb);    
      document.images["lamp"].src='../images/button/bulba.jpg';
  
  startday = new Date();
  clockStart = startday.getTime();
  document.c_podp.src=c_podpowiedzi[sx];
  document.getElementById("c_arrow_g2").style.right=poz_arr_g2[sx];
  document.getElementById("c_menu_g2").style.visibility='visible';
  document.getElementById("c_arrow_g2").style.visibility='visible';
  document.getElementById("c_menu_g2").style.right=poz_menu_g2[sx];
      nazwa=setTimeout(fcj[wh],1);
      wygas=setTimeout('getSecs_g2()',1);
} 

function show_menu_over_g3(nazwa,sx,wh,p)

{
 if(document.getElementById('dv_menu_g3').style.visibility=='visible')
 {
  document.getElementById('dv_menu_g3').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_g3').style.visibility='hidden';
 }
      clearTimeout(czas_menu);
      document.images["menu"].src='../images/button/menu_w.jpg';

      clearTimeout(czas_onoff);
      //document.images["switch1"].src='../images/button/off.jpg';

      clearTimeout(czas_kamera);
      document.images["switch_rama"].src='../images/button/camera_w.jpg';

      clearTimeout(czas_bgrd);
      document.images["rama"].src='../images/button/rama1.jpg';

      clearTimeout(czas_dymy);
      document.images["dymy"].src='../images/button/popisy_w.jpg';

      clearTimeout(czas_home);
      document.images["home"].src='../images/button/home_w.jpg';

      clearTimeout(czas_gear);    
      document.images["automat"].src='../images/button/gear1.jpg';

      clearTimeout(czas_bulb);    
      document.images["lamp"].src='../images/button/bulba.jpg';
  
  startday = new Date();
  clockStart = startday.getTime();
  document.c_podp.src=c_podpowiedzi[p];
  document.getElementById("c_arrow_g3").style.right=poz_arr_g3[sx];
  document.getElementById("c_menu_g3").style.visibility='visible';
  document.getElementById("c_arrow_g3").style.visibility='visible';
  document.getElementById("c_menu_g3").style.right=poz_menu_g3[sx];
      nazwa=setTimeout(fcj[wh],1);
      wygas=setTimeout('getSecs_g3()',1);
} 


function show_menu_over_ser(nazwa,sx,wh)

{
 if(document.getElementById('dv_menu_ser').style.visibility=='visible')
 {
  document.getElementById('dv_menu_ser').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_ser').style.visibility='hidden';
 }
      clearTimeout(czas_menu);
      document.images["menu"].src='images/button/menu_w.jpg';

      clearTimeout(czas_onoff);
      //document.images["switch1"].src='images/button/off.jpg';

      clearTimeout(czas_kamera);
      document.images["switch_rama"].src='images/button/camera_w.jpg';

      clearTimeout(czas_bgrd);
      document.images["rama"].src='images/button/rama1.jpg';

      clearTimeout(czas_dymy);
      document.images["dymy"].src='images/button/popisy_w.jpg';

      clearTimeout(czas_home);
      document.images["home"].src='images/button/home_w.jpg';

      clearTimeout(czas_gear);    
      document.images["automat"].src='images/button/gear1.jpg';

      clearTimeout(czas_bulb);    
      document.images["lamp"].src='images/button/bulba.jpg';
  
  startday = new Date();
  clockStart = startday.getTime();
  document.c_podp.src=c_podpowiedzi_ser[sx];
  document.getElementById("c_arrow_ser").style.right=poz_arr_ser[sx];
  document.getElementById("c_menu_ser").style.visibility='visible';
  document.getElementById("c_arrow_ser").style.visibility='visible';
  document.getElementById("c_menu_ser").style.right=poz_menu_ser[sx];
      nazwa=setTimeout(fcj_ser[wh],1);
      wygas=setTimeout('getSecs_ser()',1);
} 


function initStopwatch()
{
 var myTime = new Date();
        var timeNow = myTime.getTime();
        var timeDiff = timeNow - clockStart;
        this.diffSecs = timeDiff/1000;
        return(this.diffSecs);
}

function getSecs()
{
        var mySecs = initStopwatch();
        var mySecs1 = ""+mySecs;
        mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
        wygas=setTimeout('getSecs()',1000);
        if (mySecs1==3) 
	 { 
          document.getElementById("c_menu").style.visibility='hidden';
          document.getElementById("c_arrow").style.visibility='hidden';
          clearTimeout(wygas);
         }

}

function getSecs_g2()
{
        var mySecs = initStopwatch();
        var mySecs1 = ""+mySecs;
        mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
        wygas=setTimeout('getSecs_g2()',1000);
        if (mySecs1==3) 
	 { 
          document.getElementById("c_menu_g2").style.visibility='hidden';
          document.getElementById("c_arrow_g2").style.visibility='hidden';
          clearTimeout(wygas);
         }

}
function getSecs_g3()
{
        var mySecs = initStopwatch();
        var mySecs1 = ""+mySecs;
        mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
        wygas=setTimeout('getSecs_g3()',1000);
        if (mySecs1==3) 

	 { 
          document.getElementById("c_menu_g3").style.visibility='hidden';
          document.getElementById("c_arrow_g3").style.visibility='hidden';
          clearTimeout(wygas);
         }

}

function getSecs_ser()
{
        var mySecs = initStopwatch();
        var mySecs1 = ""+mySecs;
        mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
        wygas=setTimeout('getSecs_ser()',1000);
        if (mySecs1==3) 
	 { 
          document.getElementById("c_menu_ser").style.visibility='hidden';
          document.getElementById("c_arrow_ser").style.visibility='hidden';
          clearTimeout(wygas);
         }

}

function show_linx_g1(pic)
{  //gdy jest on  
 if (document.images["switch1"].src.indexOf('../images/button/on.jpg',0)!=-1)
 {
  document.getElementById("lx_arrow").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
  return
 }
 else
 {  
  pokaz_gdy_g1(pic);

 }
}  


function show_linx_g2(pic_g2)
{  //gdy jest on  
 if (document.images["switch1"].src.indexOf('../images/button/on.jpg',0)!=-1)
 {
  document.getElementById("lx_arrow_g2").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
  return
 }
 else
 {  
  pokaz_gdy_g2(pic_g2);

 }
} 

function show_linx_g3()
{  //gdy jest on  
 if (document.images["switch1"].src.indexOf('../images/button/on.jpg',0)!=-1)
 {
  document.getElementById("lx_arrow_g3").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
  return
 }
 else
 {  
  pokaz_gdy_g3();

 }
} 


function pokaz_gdy_g1(pic)
{
    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
   changeImages('switch1', '../images/button/on.jpg');
   clearTimeout(wygas_lx);

   document.getElementById("lx_arrow").style.visibility='visible';
   document.getElementById("lx_arrow").style.top=xy_lx[ff];
   document.getElementById("lx_arrow").style.right=xy_lx[ff+1];
   if (ff==xy_lx.length-2)
   {
    setTimeout('document.getElementById("lx_arrow").style.visibility=\'hidden\';',2000);
    document.getElementById("lx_arrow").style.top=xy_lx1[pic]+70;
    document.getElementById("lx_arrow").style.right=xy_lx2[pic]+60;
    clearTimeout(wygas_lx);
    changeImages('switch1', '../images/button/off.jpg');
    ff=1;
   } 
   else
   {
    ff+=2;    
    wygas_lx=setTimeout('pokaz_gdy_g1('+pic+')',150);
   }
}

function pokaz_gdy_g2(pic_g2)
{ 
    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
   changeImages('switch1', '../images/button/on.jpg');
   clearTimeout(wygas_lx);

 
   document.getElementById("lx_arrow_g2").style.visibility='visible';
   document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[ff];
   document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[ff+1];
   //alert(document.getElementById("lx_arrow_g2").style.top+' '+document.getElementById("lx_arrow_g2").style.right+' '+document.getElementById("lx_arrow_g2").style.visibility)
   if (ff==xy_lx_g2.length-2)
   {
    setTimeout('document.getElementById("lx_arrow_g2").style.visibility=\'hidden\';',2000);
    document.getElementById("lx_arrow_g2").style.top=xy_lx1_g2[pic_g2]+70;
    document.getElementById("lx_arrow_g2").style.right=xy_lx2_g2[pic_g2]+60;
    clearTimeout(wygas_lx);
    changeImages('switch1', '../images/button/off.jpg');
    ff=1;
   } 
   else
   {
    ff+=2;    
    wygas_lx=setTimeout('pokaz_gdy_g2('+pic_g2+')',150);
   }
}

function pokaz_gdy_g3()
{ 
   changeImages('switch1', '../images/button/on.jpg');
   clearTimeout(wygas_lx);

 
   document.getElementById("lx_arrow_g3").style.visibility='visible';
   document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[ff];
   document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[ff+1];
   //alert(document.getElementById("lx_arrow_g3").style.top+' '+document.getElementById("lx_arrow_g3").style.right+' '+document.getElementById("lx_arrow_g3").style.visibility)
   if (ff==xy_lx_g3.length-2)
   {
    setTimeout('document.getElementById("lx_arrow_g3").style.visibility=\'hidden\';',2000);
    //document.getElementById("lx_arrow_g3").style.top=xy_lx1_g3[pic_g3]+70;
    //document.getElementById("lx_arrow_g3").style.right=xy_lx2_g3[pic_g3]+60;
    clearTimeout(wygas_lx);
    changeImages('switch1', '../images/button/off.jpg');
    ff=1;
   } 
   else
   {
    ff+=2;    
    wygas_lx=setTimeout('pokaz_gdy_g3()',150);
   }
}

function pokaz_dym_g1()
{
if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  for(w=1;w<cal_g1.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
  return
 }
else
 {
  for(w=1;w<cal_g1.length;w++)
   {
    with(document.getElementById("cal_tlo"+w))
    {
      style.height='';
      innerHTML=cal_g1[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':'';
      style.top=tcal_g1[w];
      style.right=rcal_g1[w];
      style.width=wcal_g1[w];
      style.visibility='visible';
    }
    with(document.getElementById("cal_fro"+w))
    {
      style.height='';
      innerHTML=cal_g1[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':''
      style.top=tcal_g1[w];
      style.right=rcal_g1[w];
      style.width=wcal_g1[w];
      style.visibility='visible';
    }
   }
  return
 }
}

function pokaz_dym_g2()
{
if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  for(w=1;w<cal_g2.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
  return
 }
else
 {
  for(w=1;w<cal_g2.length;w++)
   {
    with(document.getElementById("cal_tlo"+w))
    {
      style.height='';
      innerHTML=cal_g2[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':'';
      style.top=tcal_g2[w];
      style.right=rcal_g2[w];
      style.width=wcal_g2[w];
      style.visibility='visible';
    }
    with(document.getElementById("cal_fro"+w))
    {
      style.height='';
      innerHTML=cal_g2[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':''
      style.top=tcal_g2[w];
      style.right=rcal_g2[w];
      style.width=wcal_g2[w];
      style.visibility='visible';
    }
   }
  return
 }
}

function pokaz_dym_g3()
{
if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  for(w=1;w<cal_g3.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  

  }
  return
 }
else
 {
  for(w=1;w<cal_g3.length;w++)
   {
    with(document.getElementById("cal_tlo"+w))
    {
      style.height='';
      innerHTML=cal_g3[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':'';
      style.top=tcal_g3[w];
      style.right=rcal_g3[w];
      style.width=wcal_g3[w];
      style.visibility='visible';
    }
    with(document.getElementById("cal_fro"+w))
    {
      style.height='';
      innerHTML=cal_g3[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':''
      style.top=tcal_g3[w];
      style.right=rcal_g3[w];
      style.width=wcal_g3[w];
      style.visibility='visible';
    }
   }
  return
 }
}

function pokaz_dym_ser()
{
if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  for(w=1;w<cal_ser.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
  return
 }
else
 {
  for(w=1;w<cal_ser.length;w++)
   {
    with(document.getElementById("cal_tlo"+w))
    {
      style.height='';
      innerHTML=cal_ser[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':'';
      style.top=tcal_ser[w];
      style.right=rcal_ser[w];
      style.width=wcal_ser[w];
      style.visibility='visible';
    }
    with(document.getElementById("cal_fro"+w))
    {
      style.height='';
      innerHTML=cal_ser[w];
      var y=window.innerHeight?innerHeight:document.body.clientHeight,m=130;
      style.height=offsetHeight>m?m+'px':''
      style.top=tcal_ser[w];
      style.right=rcal_ser[w];
      style.width=wcal_ser[w];
      style.visibility='visible';
    }
   }
  return
 }
}

var wygas1, tour_wsk; 
tour_wsk=0;


function tour_part1_g1(pic)
{var zm1
if (pic==0)
  zm1=20;
else
  zm1=pic*2;
        //pokaz menu1 123456...
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[zm1-1];
        document.getElementById("lx_arrow").style.right=xy_lx[zm1];
}

function tour_part1_g3()
{

        //pokaz menu1 123456...
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[19];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[20];
}
function tour_part2_g3()
{

        //pokaz menu1 123456...
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[15];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[16];
}

function tour_part1_g2(pic_g2)
{
      document.getElementById("lx_arrow_g2").style.visibility='visible';
      if (pic_g2==1){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[17];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[18];
      }
      if (pic_g2==2){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[19];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[20];
      }
      if (pic_g2==3){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[21];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[22];
      }
      if (pic_g2==4){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[23];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[24];
      }
}

function tour_part2_g1(pic)
{
        //pokaz obrazek dla 1        
        document.getElementById("lx_arrow").style.visibility='visible';
      if (pic==1){
        document.getElementById("lx_arrow").style.top=xy_lx[55];
        document.getElementById("lx_arrow").style.right=xy_lx[56];
      }
      if (pic==2){
        document.getElementById("lx_arrow").style.top=xy_lx[39];
        document.getElementById("lx_arrow").style.right=xy_lx[40];
      }
      if (pic==3){
        document.getElementById("lx_arrow").style.top=xy_lx[51];
        document.getElementById("lx_arrow").style.right=xy_lx[52];
      }
      if (pic==4){
        document.getElementById("lx_arrow").style.top=xy_lx[53];
        document.getElementById("lx_arrow").style.right=xy_lx[54];
      }
      if (pic==5){
        document.getElementById("lx_arrow").style.top=xy_lx[49];
        document.getElementById("lx_arrow").style.right=xy_lx[50];
      }
      if (pic==6){
        document.getElementById("lx_arrow").style.top=xy_lx[43];
        document.getElementById("lx_arrow").style.right=xy_lx[44];
      }
      if (pic==7){
        document.getElementById("lx_arrow").style.top=xy_lx[37];
        document.getElementById("lx_arrow").style.right=xy_lx[38];
      }
      if (pic==8){
        document.getElementById("lx_arrow").style.top=xy_lx[47];
        document.getElementById("lx_arrow").style.right=xy_lx[48];
      }
      if (pic==9){
        document.getElementById("lx_arrow").style.top=xy_lx[41];
        document.getElementById("lx_arrow").style.right=xy_lx[42];
      }
      if (pic==0){
        document.getElementById("lx_arrow").style.top=xy_lx[45];
        document.getElementById("lx_arrow").style.right=xy_lx[46];
      }
}
function tour_part2_g2(pic_g2)
{
        //pokaz obrazek dla 1        
        document.getElementById("lx_arrow_g2").style.visibility='visible';
      if (pic_g2==1){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[25];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[26];
      }
      if (pic_g2==2){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[27];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[28];
      }
      if (pic_g2==3){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[29];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[30];
      }
      if (pic_g2==4){
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[31];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[32];
      }
     
}

function tour_part3_g1()
{
        //pokaz aparat
        show_menu_over('czas_kamera',2,2,2);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[23];
        document.getElementById("lx_arrow").style.right=xy_lx[24]; 
}   
function tour_part3_g2()
{
        //pokaz aparat
        show_menu_over_g2('czas_kamera',2,2,2);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[3];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[4]; 
} 

function tour_part4_g1(pic)
{
        //pokaz rame
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx1[pic]+75; 
        document.getElementById("lx_arrow").style.right=xy_lx2[pic]+45; 
}   
function tour_part4_g2(pic_g2)
{
        //pokaz rame
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx1_g2[pic_g2]+75; 
        document.getElementById("lx_arrow_g2").style.right=xy_lx2_g2[pic_g2]+45; 
}  
 
function tour_part5_g1(pic)
{
        move_rama(pic);
        //document.images.rama_gl.click();
        document.getElementById("lx_arrow").style.visibility='hidden'
}   
function tour_part5_g2(pic_g2)
{
        move_rama_g2(pic_g2);
        //document.images.rama_gl.click();
        document.getElementById("lx_arrow_g2").style.visibility='hidden'
}  

function tour_part6_g1()
{
        //pokaz naglowek dla ikony menu
        show_menu_over('czas_menu',1,1,1);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[21];
        document.getElementById("lx_arrow").style.right=xy_lx[22]; 
}
function tour_part6_g3()
{
        //pokaz naglowek dla ikony menu
        show_menu_over_g3('czas_menu',2,1,1);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[1];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[2]; 
}
function tour_part6_g2()
{
        //pokaz naglowek dla ikony menu
        show_menu_over_g2('czas_menu',1,1,1);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[1];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[2]; 
}

function tour_part6_1_g1()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over('czas_menu',1,1,1);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[21]+50;
        document.getElementById("lx_arrow").style.right=xy_lx[22]-40; 
}
function tour_part6_1_g2()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over_g2('czas_menu',1,1,1);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[1]+50;
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[2]-40; 
}

function tour_part6_1_g3()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over_g3('czas_menu',2,1,1);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[1]+50;
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[2]-40; 
}

function tour_part6_2_g1()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over('czas_menu',1,1,1);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[21]+70;
        document.getElementById("lx_arrow").style.right=xy_lx[22]-40; 
}
function tour_part6_2_g2()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over_g2('czas_menu',1,1,1);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[1]+70;
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[2]-40; 
}
function tour_part6_2_g3()
{
        //pokaz naglowek dla ikony menu
        //show_menu_over_g3('czas_menu',2,1,1);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[1]+70;
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[2]-40; 
}
function tour_part6_menu_g1()
{
   //ikona menu click wylaczyc
   document.images.menu.click();
   //document.getElementById("lx_arrow").style.visibility='hidden';
}

function tour_part7_g1()
{
        //pokaz naglowek rama
        show_menu_over('czas_bgrd',3,3,3);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[25];
        document.getElementById("lx_arrow").style.right=xy_lx[26]; 
}
function tour_part7_g2()
{
        //pokaz naglowek rama
        show_menu_over_g2('czas_bgrd',3,3,3);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[5];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[6]; 
}
function tour_part7_g3()
{
        //pokaz naglowek rama
        show_menu_over_g3('czas_bgrd',3,3,3);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[3];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[4]; 
}
  
function tour_part8_g1()
{  
        //pokaz naglowek tour
        show_menu_over('czas_gear',4,6,4);  
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[27];
        document.getElementById("lx_arrow").style.right=xy_lx[28];     
}    
function tour_part8_g2()
{  
        //pokaz naglowek tour
        show_menu_over_g2('czas_gear',4,6,4);  
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[7];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[8];     
}
function tour_part8_g3()
{  
        //pokaz naglowek tour
        show_menu_over_g3('czas_gear',4,6,4);  
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[5];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[6];     
}

function tour_part9_g1()
{ 
        //pokaz naglowek linx
        show_menu_over('czas_onoff',5,8,5);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[29];
        document.getElementById("lx_arrow").style.right=xy_lx[30];     
}  
function tour_part9_g2()
{ 
        //pokaz naglowek linx
        show_menu_over_g2('czas_onoff',5,8,5);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[9];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[10];     
}  
function tour_part9_g3()
{ 
        //pokaz naglowek linx
        show_menu_over_g3('czas_onoff',5,8,5);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[7];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[8];     
}

function tour_part9_1_g1()
{ 
        //pokaz naglowek linx
        show_menu_over('czas_onoff',5,8,5);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[29];
        document.getElementById("lx_arrow").style.right=xy_lx[30];     
} 
function tour_part9_1_g2()
{ 
        //pokaz naglowek linx
        show_menu_over_g2('czas_onoff',5,8,5);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[9];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[10];     
} 

function tour_part10_g1()
{
    //wlacz dymy
    show_menu_over('czas_dymy',6,4,6);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[31];
        document.getElementById("lx_arrow").style.right=xy_lx[32];  
}  
function tour_part10_g2()
{
    //wlacz dymy
    show_menu_over_g2('czas_dymy',6,4,6);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[11];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[12];  
}
function tour_part10_g3()
{
    //wlacz dymy
    show_menu_over_g3('czas_dymy',6,4,6);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[9];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[10];  
} 
function tour_part11_g1()
{
    //pokaz nopis bulb
    show_menu_over('czas_bulb',7,7,7);
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[33];
        document.getElementById("lx_arrow").style.right=xy_lx[34];     
}   
function tour_part11_g2()
{
    //pokaz nopis bulb
    show_menu_over_g2('czas_bulb',7,7,7);
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[13];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[14];     
}    
function tour_part11_g3()
{
    //pokaz nopis bulb
    show_menu_over_g3('czas_bulb',7,7,7);
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g3[11];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g3[12];     
}   
function tour_part12_g1()
{
    //pokaz opis home
    show_menu_over('czas_home',8,5,8); 
        document.getElementById("lx_arrow").style.visibility='visible';
        document.getElementById("lx_arrow").style.top=xy_lx[35];
        document.getElementById("lx_arrow").style.right=xy_lx[36];    
} 
function tour_part12_g2()
{
    //pokaz opis home
    show_menu_over_g2('czas_home',8,5,8); 
        document.getElementById("lx_arrow_g2").style.visibility='visible';
        document.getElementById("lx_arrow_g2").style.top=xy_lx_g2[15];
        document.getElementById("lx_arrow_g2").style.right=xy_lx_g2[16];    
} 
function tour_part12_g3()
{
    //pokaz opis home
    show_menu_over_g3('czas_home',8,5,8); 
        document.getElementById("lx_arrow_g3").style.visibility='visible';
        document.getElementById("lx_arrow_g3").style.top=xy_lx_g2[13];
        document.getElementById("lx_arrow_g3").style.right=xy_lx_g2[14];    
} 
function tour_part13_g1()
{
    //wygas pokaz opis home

        document.getElementById("lx_arrow").style.visibility='hidden';  
} 
function tour_part13_g2()
{
    //wygas pokaz opis home

        document.getElementById("lx_arrow_g2").style.visibility='hidden';  
} 
function tour_part13_g3()
{
    //wygas pokaz opis home

        document.getElementById("lx_arrow_g3").style.visibility='hidden';  
} 


function zatrzymaj_tour_g1()
{document.getElementById("lx_arrow").style.visibility='hidden';
 clearTimeout(ttrg1_1);
 clearTimeout(ttrg1_2);
 clearTimeout(ttrg1_3);
 clearTimeout(ttrg1_4);
 clearTimeout(ttrg1_5);
 clearTimeout(ttrg1_6);
 clearTimeout(ttrg1_7);
 clearTimeout(ttrg1_8);
 clearTimeout(ttrg1_9);
 clearTimeout(ttrg1_10);
 clearTimeout(ttrg1_11);
 clearTimeout(ttrg1_12);
 clearTimeout(ttrg1_13);
 clearTimeout(ttrg1_14);
 clearTimeout(ttrg1_15);
 clearTimeout(ttrg1_16);
 clearTimeout(ttrg1_17);
 clearTimeout(ttrg1_18);
 clearTimeout(ttrg1_19);
 clearTimeout(ttrg1_20);
 clearTimeout(ttrg1_21);
 clearTimeout(ttrg1_22);
 clearTimeout(ttrg1_23);
 //clearTimeout(ttrg1_24);
 clearTimeout(ttrg1_25);
 clearTimeout(ttrg1_26);

 return;
}

function zatrzymaj_tour_g2()
{document.getElementById("lx_arrow_g2").style.visibility='hidden';
 clearTimeout(ttrg2_1);
 clearTimeout(ttrg2_2);
 clearTimeout(ttrg2_3);
 clearTimeout(ttrg2_4);
 clearTimeout(ttrg2_5);
 clearTimeout(ttrg2_6);
 clearTimeout(ttrg2_7);
 clearTimeout(ttrg2_8);
 clearTimeout(ttrg2_9);
 clearTimeout(ttrg2_10);
 clearTimeout(ttrg2_11);
 clearTimeout(ttrg2_12);
 clearTimeout(ttrg2_13);
 clearTimeout(ttrg2_14);
 clearTimeout(ttrg2_15);
 clearTimeout(ttrg2_16);
 clearTimeout(ttrg2_17);
 clearTimeout(ttrg2_18);
 clearTimeout(ttrg2_19);
 clearTimeout(ttrg2_20);
 clearTimeout(ttrg2_21);
 clearTimeout(ttrg2_22);
 clearTimeout(ttrg2_23);
 //clearTimeout(ttrg2_24);
 clearTimeout(ttrg2_25);
 clearTimeout(ttrg2_26);
 return;
}


function zatrzymaj_tour_g3()
{document.getElementById("lx_arrow_g3").style.visibility='hidden';
 clearTimeout(ttrg3_1);
 clearTimeout(ttrg3_2);
 clearTimeout(ttrg3_3);
 clearTimeout(ttrg3_4);
 clearTimeout(ttrg3_5);
 clearTimeout(ttrg3_6);
 clearTimeout(ttrg3_7);
 clearTimeout(ttrg3_8);
 clearTimeout(ttrg3_9);
 clearTimeout(ttrg3_10);
 clearTimeout(ttrg3_11);
 clearTimeout(ttrg3_12);
 clearTimeout(ttrg3_13);
 clearTimeout(ttrg3_14);
 clearTimeout(ttrg3_15);
 clearTimeout(ttrg3_16);
 //clearTimeout(ttrg3_17);
 clearTimeout(ttrg3_18);
 clearTimeout(ttrg3_19);
 clearTimeout(ttrg3_20);

 return;
}

function tour_g1(pic)
{    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
   zatrzymaj_tour_g1();
  document.getElementById("lx_arrow").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
   time_step=100;
	//pokaz menu1 123456...
   ttrg1_1=setTimeout("tour_part1_g1("+pic+")",time_step);
   
   time_step=time_step+400;
   //pokaz obrazek dla 1
   ttrg1_2=setTimeout("tour_part2_g1("+pic+")",time_step);
   
   time_step=time_step+400;
   //pokaz aparat
   ttrg1_3=setTimeout("tour_part3_g1()",time_step);   
 
   time_step=time_step+400;
   //ikona aparat click
   ttrg1_4=setTimeout("move_rama("+pic+")",time_step);
     
   time_step=time_step+2000;
   //pokaz rame
   ttrg1_5=setTimeout("tour_part4_g1("+pic+")",time_step); 
   
   time_step=time_step+1200;   
	//rama zmniejszenie zdjecia click	
   ttrg1_6=setTimeout("tour_part5_g1("+pic+")",time_step);
 
   time_step=time_step+1200;
	//pokaz naglowek dla ikony menu           
   ttrg1_7=setTimeout("tour_part6_g1()",time_step);

   time_step=time_step+1200;   
   //ikona menu click wl
   ttrg1_8=setTimeout("pokaz_menu_g1();",time_step);
    
   time_step=time_step+400;   
   //pokaz pod menu
   ttrg1_9=setTimeout("tour_part6_1_g1()",time_step);    
 
   time_step=time_step+400;   
   //pokaz pod menu
   ttrg1_10=setTimeout("tour_part6_2_g1()",time_step);  
      
           
   time_step=time_step+400;
   //pokaz naglowek rama
   ttrg1_11=setTimeout("tour_part7_g1()",time_step);
	    
   time_step=time_step+700;
   //wylacz tlo
   ttrg1_12=setTimeout("obraz('pokaz')",time_step);
    
   time_step=time_step+700;    
   //wlacz tlo
    ttrg1_13=setTimeout("obraz('pokaz')",time_step);

    time_step=time_step+700;
    //pokaz naglowek tour
    ttrg1_14=setTimeout("tour_part8_g1()",time_step);

    time_step=time_step+700;
    //pokaz naglowek linx
    ttrg1_15=setTimeout("tour_part9_g1()",time_step);

    time_step=time_step+700;
    //pokaz opis dymy
    ttrg1_19=setTimeout("tour_part10_g1()",time_step);

    time_step=time_step+700;
    //wlacz dymy
    ttrg1_20=setTimeout("pokaz_dym_g1()",time_step);
    
    time_step=time_step+1000;    
    //wylacz dymy
    ttrg1_21=setTimeout("pokaz_dym_g1()",time_step);

    time_step=time_step+700;
    //pokaz nopis bulb
    ttrg1_22=setTimeout("tour_part11_g1()",time_step);
        
    time_step=time_step+600;    
    //wlacz ciemnosc
    ttrg1_23=setTimeout("document.images.lamp.click()",time_step);
        
    time_step=time_step+1200;    
    // wylacz ciemnosc
    ttrg1_24=setTimeout("document.images.lamp.click()",time_step);

    time_step=time_step+100;
    //pokaz nopis bulb
    ttrg1_18=setTimeout("tour_part11_g1()",time_step);
    
    time_step=time_step+700;
    //pokaz opis home
    ttrg1_25=setTimeout("tour_part12_g1()",time_step);
    
    time_step=time_step+500;   
    //wygas napis 
    ttrg1_26=setTimeout("tour_part13_g1()",time_step);    
}

function tour_g2(pic_g2)
{    document.images["pic1"].style.visibility='visible';
    document.images["pic2"].style.visibility='visible';
   zatrzymaj_tour_g2();
  document.getElementById("lx_arrow_g2").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
   time_step=300;
	//pokaz menu1 123456...
   ttrg2_1=setTimeout("tour_part1_g2("+pic_g2+")",time_step);
   
   time_step=time_step+700;
   //pokaz obrazek dla 1
   ttrg2_2=setTimeout("tour_part2_g2("+pic_g2+")",time_step);
   
   time_step=time_step+400;
   //pokaz aparat
   ttrg2_3=setTimeout("tour_part3_g2()",time_step);   
 
   time_step=time_step+400;
   //ikona aparat click
   ttrg2_4=setTimeout("move_rama_g2("+pic_g2+")",time_step);
     
   time_step=time_step+2000;
   //pokaz rame
   ttrg2_5=setTimeout("tour_part4_g2("+pic_g2+")",time_step); 
   
   time_step=time_step+1200;   
	//rama zmniejszenie zdjecia click	
   ttrg2_6=setTimeout("tour_part5_g2("+pic_g2+")",time_step);
 
   time_step=time_step+1200;
	//pokaz naglowek dla ikony menu           
   ttrg2_7=setTimeout("tour_part6_g2()",time_step);

   time_step=time_step+1200;   
   //ikona menu click wl
   ttrg2_8=setTimeout("pokaz_menu_g2();",time_step);
    
   time_step=time_step+400;   
   //pokaz pod menu
   ttrg2_9=setTimeout("tour_part6_1_g2()",time_step);    
 
   time_step=time_step+400;   
   //pokaz pod menu
   ttrg2_10=setTimeout("tour_part6_2_g2()",time_step);  
      
           
   time_step=time_step+400;
   //pokaz naglowek rama
   ttrg2_11=setTimeout("tour_part7_g2()",time_step);
	    
   time_step=time_step+700;
   //wylacz tlo
   ttrg2_12=setTimeout("obraz('pokaz')",time_step);
    
   time_step=time_step+700;    
   //wlacz tlo
    ttrg2_13=setTimeout("obraz('pokaz')",time_step);

    time_step=time_step+700;
    //pokaz naglowek tour
    ttrg2_14=setTimeout("tour_part8_g2()",time_step);

    time_step=time_step+700;
    //pokaz naglowek linx
    ttrg2_15=setTimeout("tour_part9_g2()",time_step);

    time_step=time_step+700;
    //pokaz opis dymy
    ttrg2_19=setTimeout("tour_part10_g2()",time_step);

    time_step=time_step+700;
    //wlacz dymy
    ttrg2_20=setTimeout("pokaz_dym_g2()",time_step);
    
    time_step=time_step+1000;    
    //wylacz dymy
    ttrg2_21=setTimeout("pokaz_dym_g2()",time_step);

    time_step=time_step+700;
    //pokaz nopis bulb
    ttrg2_22=setTimeout("tour_part11_g2()",time_step);
        
    time_step=time_step+600;    
    //wlacz ciemnosc
    ttrg2_23=setTimeout("document.images.lamp.click()",time_step);
        
    time_step=time_step+1200;    
    // wylacz ciemnosc
    ttrg2_24=setTimeout("document.images.lamp.click()",time_step);

    time_step=time_step+100;
    //pokaz nopis bulb
    ttrg2_18=setTimeout("tour_part11_g2()",time_step);
    
    time_step=time_step+700;
    //pokaz opis home
    ttrg2_25=setTimeout("tour_part12_g2()",time_step);
    
    time_step=time_step+500;   
    //wygas napis 
    ttrg2_26=setTimeout("tour_part13_g2()",time_step);    
}



function pokaz_menu_g1()
{
 if(document.getElementById('dv_menu').style.visibility=='visible')
 {
  document.getElementById('dv_menu').style.visibility='hidden';
  document.getElementById('dv_menu_tlo').style.visibility='hidden';
  //changeImages('switch', '../images/button/off.jpg'); 
  return
 }
 with(document.getElementById('dv_menu_tlo'))
 {
  style.height='';
  innerHTML=menu_txt;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
 } 
 with(document.getElementById('dv_menu'))
 {
  style.height='';
  innerHTML=menu_txt;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
  //changeImages('switch', '../images/button/on.jpg'); 
  return
 }
}

function pokaz_menu_g2()
{
 if(document.getElementById('dv_menu_g2').style.visibility=='visible')
 {
  document.getElementById('dv_menu_g2').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_g2').style.visibility='hidden';
  return
 }
 with(document.getElementById('dv_menu_tlo_g2'))
 {
  style.height='';
  innerHTML=menu_txt_g2;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
 } 
 with(document.getElementById('dv_menu_g2'))
 {
  style.height='';
  innerHTML=menu_txt_g2;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
  return
 }
}

function pokaz_menu_g3()
{
 if(document.getElementById('dv_menu_g3').style.visibility=='visible')
 {
  document.getElementById('dv_menu_g3').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_g3').style.visibility='hidden';
  return
 }
 with(document.getElementById('dv_menu_tlo_g3'))
 {
  style.height='';
  innerHTML=menu_txt_g3;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
 } 
 with(document.getElementById('dv_menu_g3'))
 {
  style.height='';
  innerHTML=menu_txt_g3;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
  return
 }
}


function pokaz_menu_ser()
{
if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  for(w=1;w<cal_ser.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
 }
 if(document.getElementById('dv_menu_ser').style.visibility=='visible')
 {
  document.getElementById('dv_menu_ser').style.visibility='hidden';
  document.getElementById('dv_menu_tlo_ser').style.visibility='hidden';
  return
 }
 with(document.getElementById('dv_menu_tlo_ser'))
 {
  style.height='';
  innerHTML=menu_txt_ser;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
 } 
 with(document.getElementById('dv_menu_ser'))
 {
  style.height='';
  innerHTML=menu_txt_ser;
  var y=window.innerHeight?innerHeight:document.body.clientHeight,m=350;
  style.height=offsetHeight>m?m+'px':'';
  style.visibility='visible';
  return
 }
}


function show_menu_out(nazwa)
{ 
  document.c_menu_bok_l.src="../images/button/tlo.jpg";
  document.c_podp.src="../images/button/tlo.jpg";
  document.c_menu_bok_p.src="../images/button/tlo.jpg";
  document.getElementById("c_menu").style.visibility='hidden';
  clearTimeout(nazwa);
}



function noc(galeria)
{
 if (document.images["switch1"].src.indexOf('../images/button/on.jpg',0)!=-1)
 {
  document.getElementById("lx_arrow").style.visibility='hidden';
  changeImages('switch1', '../images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
 }

 if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  var tablica;
  if (galeria=='g1') {tablica=cal_g1}
  else tablica=cal_g1;
  for(w=1;w<tablica.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
 }
 clearTimeout(czas_bulb);
 if (document.zaslona.style.visibility=='hidden')
  {
   document.zaslona.style.visibility='visible';
   document.zaslona.width="1000"; 
   document.zaslona.height="535";
   changeImages('lamp','../images/button/bulb.jpg');
   if (galeria=='g1')
   {
    document.fl01.width="1";
    document.fl01.height="1";
   }
  stars_cz=setTimeout("snr_of_starswIE_NS6()", 10);
  }
 else
  {
   document.zaslona.style.visibility='hidden';
   document.zaslona.width="1"; 
   document.zaslona.height="1";

   changeImages('lamp','../images/button/bulba.jpg');
   if (galeria=='g1')
   {
    document.fl01.width="70";
    document.fl01.height="400"; 
   }
   clearTimeout(stars_cz); 
   for (i = 0; i < nr_of_stars; ++i) 
    {
     document.getElementById("dot"+i).style.visibility='hidden'; 
    } 
   document.getElementById("dot_w").style.visibility='hidden';
   document.getElementById("dot_r").style.visibility='hidden';
   czas_bulb = setTimeout('show_przyc_bulb()',340);
 }
}

function noc_ser(galeria)
{
 if (document.images["switch1"].src.indexOf('images/button/on.jpg',0)!=-1)
 {
  document.getElementById("lx_arrow").style.visibility='hidden';
  changeImages('switch1', 'images/button/off.jpg');
  clearTimeout(wygas_lx);
  ff=1;
 }

 if(document.getElementById("cal_fro1").style.visibility=='visible')
 {
  var tablica;
  tablica=cal_ser;
  for(w=1;w<tablica.length;w++)
  {
   document.getElementById("cal_tlo"+w).style.visibility='hidden';
   document.getElementById("cal_fro"+w).style.visibility='hidden';  
  }
 }
 clearTimeout(czas_bulb);
 if (document.zaslona.style.visibility=='hidden')
  {
   document.zaslona.style.visibility='visible';
   document.zaslona.width="1000"; 
   document.zaslona.height="535";
   changeImages('lamp','images/button/bulb.jpg');
   if (galeria=='g1')
   {
    document.fl01.width="1";
    document.fl01.height="1";
   }
  stars_cz=setTimeout("snr_of_starswIE_NS6()", 10);
  }
 else
  {
   document.zaslona.style.visibility='hidden';
   document.zaslona.width="1"; 
   document.zaslona.height="1";

   changeImages('lamp','images/button/bulba.jpg');
   if (galeria=='g1')
   {
    document.fl01.width="70";
    document.fl01.height="400"; 
   }
   clearTimeout(stars_cz); 
   for (i = 0; i < nr_of_stars; ++i) 
    {
     document.getElementById("dot"+i).style.visibility='hidden'; 
    } 
   document.getElementById("dot_w").style.visibility='hidden';
   document.getElementById("dot_r").style.visibility='hidden';
   czas_bulb = setTimeout('show_przyc_bulb_ser()',340);
 }
}



function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() 
{
if (document.images)
{
//numerki menu
arys1=newImage("../images/button/1w.jpg");
arys2=newImage("../images/button/2w.jpg");
arys3=newImage("../images/button/3w.jpg");
arys4=newImage("../images/button/4w.jpg");
arys5=newImage("../images/button/5w.jpg");
arys6=newImage("../images/button/6w.jpg");
arys7=newImage("../images/button/7w.jpg");
arys8=newImage("../images/button/8w.jpg");
arys9=newImage("../images/button/9w.jpg");
arys10=newImage("../images/button/0w.jpg");
arys11=newImage("../images/button/1r.jpg");
arys12=newImage("../images/button/2r.jpg");
arys13=newImage("../images/button/3r.jpg");
arys14=newImage("../images/button/4r.jpg");
arys15=newImage("../images/button/5r.jpg");
arys16=newImage("../images/button/6r.jpg");
arys17=newImage("../images/button/7r.jpg");
arys18=newImage("../images/button/8r.jpg");
arys19=newImage("../images/button/9r.jpg");
arys20=newImage("../images/button/0r.jpg");

//menu
arys21=newImage("../images/button/menu_w.jpg");
arys22=newImage("../images/button/menu_r.jpg");
arys23=newImage("../images/button/camera_w.jpg");
arys24=newImage("../images/button/camera_r.jpg");
arys25=newImage("../images/button/rama1.jpg");
arys26=newImage("../images/button/rama1a.jpg");
arys27=newImage("../images/button/gear1.jpg");
arys28=newImage("../images/button/off.jpg");
arys29=newImage("../images/button/on.jpg");
arys30=newImage("../images/button/popisy_w.jpg");
arys31=newImage("../images/button/popisy_r.jpg");
arys32=newImage("../images/button/home_w.jpg");
arys33=newImage("../images/button/home_r.jpg");
arys34=newImage("../images/button/bulba.jpg");
arys35=newImage("../images/button/bulb.jpg");
arys36=newImage("../images/arrow_lx_2.gif");
arys37=newImage("../images/button/arrow_down_menu.jpg");
arys38=newImage("../images/schody_tlo.jpg");
arys39=newImage("../images/schody_tlo1.jpg");
arys40=newImage("../images/rama_obraz_pion.gif");
arys41=newImage("../images/rama_obraz.gif");
arys41=newImage("../images/button/close_x.jpg");

arys42=newImage("../images/button/c_bgrnd.jpg");
arys43=newImage("../images/button/c_home.jpg");
arys44=newImage("../images/button/c_lights.jpg");
arys45=newImage("../images/button/c_menu.jpg");
arys46=newImage("../images/button/c_sh_lx.jpg");
arys47=newImage("../images/button/c_spec.jpg");
arys48=newImage("../images/button/c_tour.jpg");
arys49=newImage("../images/button/c_zoom.jpg");

preloadFlag = true;
}
}

var resztaFlag = false;

function ladujImages_g1(obq) 
{
if (document.images)
{
//galeria1
brys1=newImage("../images/komp1_g.jpg");
brys2=newImage("../images/komp1_d.jpg");
brys3=newImage("../images/gallery11.jpg");
if (obq==1) {brys4=newImage("../images/klucz.jpg");}
if (obq==2) {brys4=newImage("../images/materia.jpg");}
if (obq==3) {brys4=newImage("../images/oxford.jpg");}
if (obq==4) {brys4=newImage("../images/zegarmistrz.jpg");}
if (obq==5) {brys4=newImage("../images/persp.jpg");}
if (obq==6) {brys4=newImage("../images/waga.jpg");}
if (obq==7) {brys4=newImage("../images/lupa.jpg");}
if (obq==8) {brys4=newImage("../images/nest1.jpg");}
if (obq==9) {brys4=newImage("../images/tunel1.jpg");}
if (obq==0) {brys4=newImage("../images/blysk.jpg");}
resztaFlag = true;
}
}

function ladujImages_g2(obq) 
{
if (document.images)
{
//galeria2
brys1=newImage("../images/zloz1.jpg");
brys2=newImage("../images/zloz2.jpg");
brys3=newImage("../images/gallery12.jpg");

brys4=newImage("../images/aparat.jpg");

if (obq==1) {brys5=newImage("../images/einstein.jpg");}
if (obq==2) {brys5=newImage("../images/bigb.jpg");}
if (obq==3) {brys5=newImage("../images/eifel.jpg");}
if (obq==4) {brys5=newImage("../images/wielblad.jpg");}
resztaFlag = true;
}
}

function ladujImages_g3() 
{
if (document.images)
{
//galery3
brys1=newImage("../images/gallery13.jpg");

brys2=newImage("../images/kat_1.jpg");
brys3=newImage("../images/kat_2.jpg");
brys4=newImage("../images/kat_3.jpg");
brys5=newImage("../images/kat_4.jpg");
brys6=newImage("../images/kat_5.jpg");
brys7=newImage("../images/kat_6.jpg");

brys8=newImage("../images/kat_1_m.jpg");
brys9=newImage("../images/kat_2_m.jpg");
brys10=newImage("../images/kat_3_m.jpg");
brys11=newImage("../images/kat_4_m.jpg");
brys12=newImage("../images/kat_5_m.jpg");
brys13=newImage("../images/kat_6_m.jpg");

brys14=newImage("../images/ramka.gif");
resztaFlag = true;
}
}

function ladujImages_ser() 
{
if (document.images)
{
//services & contact
brys1=newImage("images/mini/aparat.jpg");
brys2=newImage("images/mini/tunel1.jpg");
brys3=newImage("images/mini/waga.jpg");
brys4=newImage("images/mini/eifel.jpg");
brys5=newImage("images/mini/schody_tlo.jpg");
brys6=newImage("images/mini/nest1.jpg");
brys7=newImage("images/mini/zegarmistrz.jpg");
brys8=newImage("images/mini/twarz.jpg");
brys9=newImage("images/mini/wielblad.jpg");
brys10=newImage("images/mini/wielkof.jpg");
brys11=newImage("images/mini/zd5.jpg");
brys12=newImage("images/mini/zd1.jpg");
brys13=newImage("images/mini/kat_3.jpg");
brys14=newImage("images/mini/twarz2.jpg");
brys15=newImage("images/mini/zd6.jpg");
brys16=newImage("images/mini/zd4.jpg");
brys17=newImage("images/mini/mat_prom.jpg");
brys18=newImage("images/mini/einstein.jpg");
brys19=newImage("images/mini/oxford.jpg");
brys20=newImage("images/mini/persp.jpg");
brys21=newImage("images/mini/blysk.jpg");
brys22=newImage("images/mini/klucz.jpg");
brys23=newImage("images/mini/lupa.jpg");
brys24=newImage("images/mini/materia.jpg");

brys25=newImage("images/serv.jpg");
brys26=newImage("images/contact.jpg");
brys27=newImage("images/folder.jpg");
brys28=newImage("images/button/minus.jpg");
brys29=newImage("images/button/plus.jpg");
brys30=newImage("images/button/menu_bt10.jpg");
brys31=newImage("images/list_mid.jpg");
brys32=newImage("images/list_pole.jpg");
resztaFlag = true;
}
}

function snr_of_starswIE_NS6() 
{
 for (i = 0; i < nr_of_stars; ++ i) 
  { 
   yp[i] += sty[i];
   xp[i] += stx[i];
   if (xp[i] > doc_width-140) 
    {
     xp[i] = 0;
     yp[i] = Math.random()*(doc_height-am[i]-50);
     stx[i] = 2 + Math.random();
     sty[i] = 0.02 + Math.random()/10;
     doc_width = document.body.clientWidth;
     doc_height = document.body.clientHeight;
    }
   dy[i] += sty[i];
   document.getElementById("dot"+i).style.visibility='visible';
   document.getElementById("dot"+i).style.top=yp[i]+ am[i]*Math.sin(dy[i]);
   document.getElementById("dot"+i).style.left=xp[i];
   document.getElementById("dot_w").style.visibility='visible';
   document.getElementById("dot_w").style.top=yp[j]+ am[j]*Math.sin(dy[j]);
   document.getElementById("dot_w").style.left=xp[j];
   document.getElementById("dot_r").style.visibility='visible';
   document.getElementById("dot_r").style.top=yp[k]+ am[k]*Math.sin(dy[k]);
   document.getElementById("dot_r").style.left=xp[k];
  } 
 stars_cz=setTimeout("snr_of_starswIE_NS6()", 10);
}

function przerzuc_min()
{
  nr_min1=Math.random()*24;
  nr_min2=Math.random()*24;
  //jaka_min=document.images["lg"+nr_min1].src;
  alert(nr_min1);
  document.images["lg"+nr_min1].src="../images/tlo.jpg";
  //document.images["llg"+nr_min2].src=jaka_min;
  setTimeot("przerzuc_min()",20);
}




function show_anim_1()
{
 if (document.images["automat"].src.indexOf('images/button/gear2.jpg',0)!=-1)
 {
  document.images["automat"].src='../images/button/gear1.jpg';
 }
 else
 {  
  document.images["automat"].src='../images/button/gear2.jpg';
 }
 clearTimeout(czas_gear);
 czas_gear = setTimeout('show_anim_1()',100);
} 


// sekcja animacji przyciskow

//menu
function show_przyc_menu()
{
 if (document.images["menu"].src.indexOf('images/button/menu_r.jpg',0)!=-1)
 {
  document.images["menu"].src='../images/button/menu_w.jpg';
 }
 else
 {  
  document.images["menu"].src='../images/button/menu_r.jpg';
 }
 clearTimeout(czas_menu);
 czas_menu = setTimeout('show_przyc_menu()',200);
} 
//menu
function show_przyc_menu_ser()
{
 if (document.images["menu"].src.indexOf('images/button/menu_r.jpg',0)!=-1)
 {
  document.images["menu"].src='images/button/menu_w.jpg';
 }
 else
 {  
  document.images["menu"].src='images/button/menu_r.jpg';
 }
 clearTimeout(czas_menu);
 czas_menu = setTimeout('show_przyc_menu_ser()',200);
} 

//kamera
function show_przyc_kamera()
{
 if (document.images["switch_rama"].src.indexOf('images/button/camera_r.jpg',0)!=-1)
 {
  document.images["switch_rama"].src='../images/button/camera_w.jpg';
 }
 else
 {  
  document.images["switch_rama"].src='../images/button/camera_r.jpg';
 }
 clearTimeout(czas_kamera);
 czas_kamera = setTimeout('show_przyc_kamera()',500);
} 

//bacground
function show_przyc_background()
{
 if (document.images["rama"].src.indexOf('images/button/rama1a.jpg',0)!=-1)
 {
  document.images["rama"].src='../images/button/rama1.jpg';
 }
 else
 {  
  document.images["rama"].src='../images/button/rama1a.jpg';
 }
 clearTimeout(czas_bgrd);
 czas_bgrd = setTimeout('show_przyc_background()',400);
} 

//dymki-spec
function show_przyc_dymy()
{
 if (document.images["dymy"].src.indexOf('images/button/popisy_r.jpg',0)!=-1)
 {
  document.images["dymy"].src='../images/button/popisy_w.jpg';
 }
 else
 {  
  document.images["dymy"].src='../images/button/popisy_r.jpg';
 }
 clearTimeout(czas_dymy);
 czas_dymy = setTimeout('show_przyc_dymy()',500);
} 

//dymki-spec
function show_przyc_dymy_ser()
{
 if (document.images["dymy"].src.indexOf('images/button/popisy_r.jpg',0)!=-1)
 {
  document.images["dymy"].src='images/button/popisy_w.jpg';
 }
 else
 {  
  document.images["dymy"].src='images/button/popisy_r.jpg';
 }
 clearTimeout(czas_dymy);
 czas_dymy = setTimeout('show_przyc_dymy_ser()',500);
} 

//home
function show_przyc_home()
{
 if (document.images["home"].src.indexOf('images/button/home_r.jpg',0)!=-1)
 {
  document.images["home"].src='../images/button/home_w.jpg';
 }
 else
 {  
  document.images["home"].src='../images/button/home_r.jpg';
 }
 clearTimeout(czas_home);
 czas_home = setTimeout('show_przyc_home()',340);
} 


//home
function show_przyc_home_ser()
{
 if (document.images["home"].src.indexOf('images/button/home_r.jpg',0)!=-1)
 {
  document.images["home"].src='images/button/home_w.jpg';
 }
 else
 {  
  document.images["home"].src='images/button/home_r.jpg';
 }
 clearTimeout(czas_home);
 czas_home = setTimeout('show_przyc_home_ser()',340);
} 

//on_off
function show_przyc_onoff()
{
 /*if (document.images["switch1"].src.indexOf('images/button/off.jpg',0)!=-1)
 {
  document.images["switch1"].src='../images/button/on.jpg';
 }
 else
 {  
  document.images["switch1"].src='../images/button/off.jpg';
 }*/
} 


function show_przyc_bulb()
{
 if (document.images["lamp"].src.indexOf('images/button/bulba.jpg',0)!=-1)
 {
  document.images["lamp"].src='../images/button/bulb.jpg';
 }
 else
 {  
  document.images["lamp"].src='../images/button/bulba.jpg';
 }
 clearTimeout(czas_bulb);
 czas_bulb = setTimeout('show_przyc_bulb()',250);
} 

function show_przyc_bulb_ser()
{
 if (document.images["lamp"].src.indexOf('images/button/bulba.jpg',0)!=-1)
 {
  document.images["lamp"].src='images/button/bulb.jpg';
 }
 else
 {  
  document.images["lamp"].src='images/button/bulba.jpg';
 }
 clearTimeout(czas_bulb);
 czas_bulb = setTimeout('show_przyc_bulb_ser()',250);
} 

function obraz(x)
{
 if(!x){
  document.images["pic1"].style.visibility='hidden';
  document.images["pic2"].style.visibility='hidden';
  changeImages('rama', '../images/button/rama1.jpg'); 
  return
 } 
 if(document.images["pic1"].style.visibility=='visible'||document.images["pic2"].style.visibility=='visible'){
  document.images["pic1"].style.visibility='hidden';
  document.images["pic2"].style.visibility='hidden';  
  changeImages('rama', '../images/button/rama1.jpg'); 
  return
 }
  document.images["pic1"].style.visibility='visible';
  document.images["pic2"].style.visibility='visible';
  changeImages('rama', '../images/button/rama1a.jpg'); 
}

function min_anim()
{
 for (ob=1;ob<=x_odl.length-1;ob++)
  {
   if (x_odl[ob]<=140)
    {
     document.pmin7.src=pict_move[ob+1];
     document.getElementById('min7').style.right=770;
     document.getElementById("min"+ob).filters.alpha.opacity=20;
     x_odl[7]=840; 
     x_odl[ob]=739;
    } 
   else
    { 
     x_odl[ob]-=speed_min;
     if (x_odl[ob]<=rozjod&&x_odl[ob]>rozjdo)
      { //sciemnij
        document.getElementById("min"+ob).filters.alpha.opacity+=speed_min;  
      }
     if (x_odl[ob]<=rozjdo&&x_odl[ob]>=sciemnijod)
      { //utrzymaj_opacity
        document.getElementById("min"+ob).filters.alpha.opacity=100; 
        
      } 
     if (x_odl[ob]<=rozjdo-30&&x_odl[ob]>=sciemnijod-30)
              ktory=ob;

     if (x_odl[ob]<sciemnijod&&x_odl[ob]>=sciemnijdo&&document.getElementById("min"+ob).filters.alpha.opacity>0)
      { //rozjasnij
        document.getElementById("min"+ob).filters.alpha.opacity-=speed_min;  
      }    

    } 
   
   document.getElementById("min"+ob).style.right=x_odl[ob];

  }
  min_timer = setTimeout('min_anim()',20);

}