﻿Browser = navigator.appName;
Verze = parseInt(navigator.appVersion);
if ((Browser == "Netscape" && Verze >= 3) || (Browser == "Microsoft Internet Explorer" && Verze >= 4)) ScriptsOn = 1;
 else ScriptsOn = 0;

function T_aktvni(a) {
 if (T_aktiv>0) {
  document['link'+T_aktiv].src=t_normal[T_aktiv-1].src
 }
 T_aktiv = a
 document['link'+T_aktiv].src=t_klik[T_aktiv-1].src
}

function T_MouseOver(a) {
 if (ScriptsOn) {
  if (T_aktiv!=a) {
   document['link'+a].src=t_najezd[a-1].src
  }
 }
}

function T_MouseOut(a) {
 if (ScriptsOn) {
  if (T_aktiv!=a) {
   document['link'+a].src=t_normal[a-1].src
  }
 }
}

function Klik(a) {
 if (ScriptsOn) {
  if (T_aktiv!=a) {
   T_aktvni(a)
  }
 }
}

var butCount = 21
var t_normal = new Array()
var t_najezd = new Array()
var t_klik = new Array()
var T_aktiv = 0

if (ScriptsOn) {
 for (i=1;i<=butCount;i++) {
  t_normal[i-1] = new Image()
  t_normal[i-1].src = "img/t_" + i + "n.gif"
  t_najezd[i-1] = new Image()
  t_najezd[i-1].src = "img/t_" + i + "a.gif"
  t_klik[i-1] = new Image()
  t_klik[i-1].src = t_najezd[i-1].src
 }
}

//----------------------------------------------------------------

function fotoClose()
{
  if (window.foto != null) window.foto.close()
}

function fotoOpen(soubor, poloha)
{

     if (window.foto != null) window.foto.close()

     if (poloha == "h")
             {
                w=400
     		h=300   
             } else
             {
                w=300
     		h=400
             } 
  
     foto=window.open("","aa","width="+w+",height="+h+'"')
     
     foto.document.open()
     foto.document.writeln('<html>')
     foto.document.writeln('<head>')
     foto.document.writeln('<title>Foto - Světluška ------------------------------</title>')
     foto.document.writeln('</head>')
     foto.document.writeln('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">')
     foto.document.write('<img src="foto/'+soubor+'.jpg" width="'+w+'" height="'+h+'">')
     foto.document.writeln('</body>')
     foto.document.writeln('</html>')
     foto.document.close()
     window.foto.focus()
}
