function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Železnice - Albula</TITLE> \n";
txt += "<META http-equiv='content-type' content='text/html; charset=iso-8859-2'> \n";
txt += "<LINK href='../../etc/mv.css' type=text/css rel=STYLESHEET> \n\n";
txt += "<link rel='shortcut icon' href='http://www.martinvalek.net/favicon.ico' /> \n";
txt += "<sc" + "ript language='JavaScript'> \n";
txt += "<!-- \n";
// Celkový počet fotek
txt += "pocet_obrazku = 39; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/2009-09-1479.jpg'; \n";
txt += "images[2] = 'fotky/2009-09-1487.jpg'; \n";
txt += "images[3] = 'fotky/2009-09-1469.jpg'; \n";
txt += "images[4] = 'fotky/2009-09-1501.jpg'; \n";
txt += "images[5] = 'fotky/2009-09-1957.jpg'; \n";
txt += "images[6] = 'fotky/2009-09-2301.jpg'; \n";
txt += "images[7] = 'fotky/2009-09-2342.jpg'; \n";
txt += "images[8] = 'fotky/2009-09-2293.jpg'; \n";
txt += "images[9] = 'fotky/2009-09-2351.jpg'; \n";
txt += "images[10] = 'fotky/2010-02-1918.jpg'; \n";
txt += "images[11] = 'fotky/2010-02-0401.jpg'; \n";
txt += "images[12] = 'fotky/2010-02-0405.jpg'; \n";
txt += "images[13] = 'fotky/2010-02-0455.jpg'; \n";
txt += "images[14] = 'fotky/2010-02-0469.jpg'; \n";
txt += "images[15] = 'fotky/2010-02-2026.jpg'; \n";
txt += "images[16] = 'fotky/2010-02-1989.jpg'; \n";
txt += "images[17] = 'fotky/2010-02-1996.jpg'; \n";
txt += "images[18] = 'fotky/2010-02-2010.jpg'; \n";
txt += "images[19] = 'fotky/2010-02-1970.jpg'; \n";
txt += "images[20] = 'fotky/2010-02-1956.jpg'; \n";
txt += "images[21] = 'fotky/2010-02-1922.jpg'; \n";
txt += "images[22] = 'fotky/2010-02-1926.jpg'; \n";
txt += "images[23] = 'fotky/2010-02-0482.jpg'; \n";
txt += "images[24] = 'fotky/2010-02-0503.jpg'; \n";
txt += "images[25] = 'fotky/2010-09-3599.jpg'; \n";
txt += "images[26] = 'fotky/2010-09-3566.jpg'; \n";
txt += "images[27] = 'fotky/2010-09-3627.jpg'; \n";
txt += "images[28] = 'fotky/2010-09-3696.jpg'; \n";
txt += "images[29] = 'fotky/2010-09-3681.jpg'; \n";
txt += "images[30] = 'fotky/2010-09-3841.jpg'; \n";
txt += "images[31] = 'fotky/2010-09-4160.jpg'; \n";
txt += "images[32] = 'fotky/2010-09-4207.jpg'; \n";
txt += "images[33] = 'fotky/2010-09-4231.jpg'; \n";
txt += "images[34] = 'fotky/2010-09-4274.jpg'; \n";
txt += "images[35] = 'fotky/2010-09-4326.jpg'; \n";
txt += "images[36] = 'fotky/2010-09-4896.jpg'; \n";
txt += "images[37] = 'fotky/2010-09-5115.jpg'; \n";
txt += "images[38] = 'fotky/2010-09-5142.jpg'; \n";
txt += "images[39] = 'fotky/2010-09-5184.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = 'Ge 4/4 I RhB, BEX 950 Bernina Express, Filisur - Alvaneu'; \n";
txt += "comment[2] = 'Ge 6/6 II RhB, 5151, Alvaneu - Filisur'; \n";
txt += "comment[3] = 'Ge 4/4 III Nr. 646 RhB, RE 1156, Filisur - Alvaneu'; \n";
txt += "comment[4] = 'Ge 4/4 III Nr. 642 RhB, R 1845, Wiesen - Filisur'; \n";
txt += "comment[5] = 'Ge 4/4 III Nr. 647 RhB, GEX 908 Glacier Express, Bergün/Bravuogn - Muot'; \n";
txt += "comment[6] = 'Ge 4/4 III Nr. 647 RhB, RE 1128, Muot - Bergün/Bravuogn'; \n";
txt += "comment[7] = 'Ge 4/4 III Nr. 641 RhB, RE 1132, Muot - Bergün/Bravuogn'; \n";
txt += "comment[8] = 'Ge 4/4 I Nr. 609 RhB, BEX 951 Bernina Express, Bergün/Bravuogn - Muot'; \n";   
txt += "comment[9] = 'Ge 4/4 III Nr. 648 RhB, RE 1129, Bergün/Bravuogn - Muot'; \n"; 
txt += "comment[10] = 'Ge 4/4 III Nr. 644 RhB, R 1168, Filisur'; \n";   
txt += "comment[11] = 'G 4/5 Nr. 107 RhB, Alvaneu - Filisur'; \n";
txt += "comment[12] = 'Ge 6/6 I Nr. 414 RhB, Alvaneu - Filisur'; \n";
txt += "comment[13] = 'Ge 4/4 III Nr. 650 RhB, RE 1141, Alvaneu - Filisur'; \n";
txt += "comment[14] = 'Ge 4/4 III Nr. 652 RhB, RE 1144, Filisur - Alvaneu'; \n";
txt += "comment[15] = 'Ge 6/6 II Nr. 707 RhB, RE 1136, Filisur - Alvaneu'; \n";
txt += "comment[16] = 'Ge 4/4 I Nr. 602 RhB, R 829, Alvaneu - Filisur'; \n";
txt += "comment[17] = 'Ge 4/4 III Nr. 643 RhB, RE 1132, Filisur - Alvaneu'; \n";
txt += "comment[18] = 'Ge 4/4 III Nr. 641 RhB, RE 1133, Alvaneu - Filisur'; \n";
txt += "comment[19] = 'Ge 4/4 III Nr. 642 RhB, RE 1129, Alvaneu - Filisur'; \n";
txt += "comment[20] = 'Ge 4/4 III Nr. 644 RhB, RE 1125, Alvaneu - Filisur'; \n";
txt += "comment[21] = 'Ge 6/6 II Nr. 707 RhB, RE 1121, Alvaneu - Filisur'; \n";
txt += "comment[22] = 'Ge 4/4 III Nr. 641 RhB, RE 1124, Filisur - Alvaneu'; \n";
txt += "comment[23] = 'Ge 4/4 II Nr. 630, R 1833, Wiesen - Filisur'; \n";
txt += "comment[24] = 'Ge 6/6 I Nr. 414 + G 4/5 Nr. 107 RhB, Filisur - Wiesen'; \n";   
txt += "comment[25] = 'Ge 6/6 II Nr. 706 RhB, 5135, Alvaneu - Filisur'; \n";   
txt += "comment[26] = 'Ge 4/4 III Nr. 651 RhB, RE 1137, Alvaneu - Filisur'; \n";
txt += "comment[27] = 'Ge 6/6 I Nr. 415 RhB, Alvaneu - Filisur'; \n";
txt += "comment[28] = 'Ge 4/4 II RhB, RE 1148, Filisur - Alvaneu'; \n";
txt += "comment[29] = 'Ge 6/6 II RhB, RE 1145, Alvaneu - Filisur'; \n";
txt += "comment[30] = 'Ge 6/6 II Nr. 706 RhB, 5164, Filisur - Alvaneu'; \n";
txt += "comment[31] = 'Ge 4/4 III Nr. 643 RhB, RE 1129, Stugl'; \n";
txt += "comment[32] = 'Ge 4/4 III Nr. 652 RhB, RE 1137, Filisur - Stugl'; \n";
txt += "comment[33] = 'Ge 4/4 III Nr. 647 RhB, RE 1141, Filisur - Stugl'; \n";
txt += "comment[34] = 'Ge 4/4 III Nr. 652 RhB, RE 1152, Stugl - Filisur'; \n";
txt += "comment[35] = 'Ge 4/4 III Nr. 647 RhB, RE 1126, Stugl - Filisur'; \n";
txt += "comment[36] = 'Ge 4/4 III Nr. 642 RhB, GEX 905, Preda - Muot'; \n";
txt += "comment[37] = 'Ge 4/4 II Nr. 614 RhB, RE 1133, Muot - Preda'; \n";
txt += "comment[38] = 'Ge 4/4 III Nr. 642, RE 1137, Muot - Preda'; \n";
txt += "comment[39] = 'ABe 8/12 RhB, BEX 960, Wiesen'; \n";   
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '14.9.2009'; \n";
txt += "date[2] = '14.9.2009'; \n";
txt += "date[3] = '14.9.2009'; \n";
txt += "date[4] = '14.9.2009'; \n";
txt += "date[5] = '17.9.2009'; \n";
txt += "date[6] = '20.9.2009'; \n";
txt += "date[7] = '20.9.2009'; \n";
txt += "date[8] = '20.9.2009'; \n";
txt += "date[9] = '20.9.2009'; \n";
txt += "date[10] = '20.2.2010'; \n";
txt += "date[11] = '14.2.2010'; \n";
txt += "date[12] = '14.2.2010'; \n";
txt += "date[13] = '14.2.2010'; \n";
txt += "date[14] = '14.2.2010'; \n";
txt += "date[15] = '21.2.2010'; \n";
txt += "date[16] = '21.2.2010'; \n";
txt += "date[17] = '21.2.2010'; \n";
txt += "date[18] = '21.2.2010'; \n";
txt += "date[19] = '21.2.2010'; \n";
txt += "date[20] = '21.2.2010'; \n";
txt += "date[21] = '21.2.2010'; \n";
txt += "date[22] = '21.2.2010'; \n";
txt += "date[23] = '14.2.2010'; \n";
txt += "date[24] = '14.2.2010'; \n";
txt += "date[25] = '9.9.2010'; \n";
txt += "date[26] = '9.9.2010'; \n";
txt += "date[27] = '9.9.2010'; \n";
txt += "date[28] = '9.9.2010'; \n";
txt += "date[29] = '9.9.2010'; \n";
txt += "date[30] = '9.9.2010'; \n";
txt += "date[31] = '11.9.2010'; \n";
txt += "date[32] = '11.9.2010'; \n";
txt += "date[33] = '11.9.2010'; \n";
txt += "date[34] = '11.9.2010'; \n";
txt += "date[35] = '11.9.2010'; \n";
txt += "date[36] = '14.9.2010'; \n";
txt += "date[37] = '14.9.2010'; \n";
txt += "date[38] = '14.9.2010'; \n";
txt += "date[39] = '14.9.2010'; \n";
// Časovač na automatické přepínání fotek
txt += "var timer; \n";    
// Nastavení obrázku
txt += "function SetPic (){ \n";
txt += "document.images.imgprev.src = images[actpic];} \n";
// Nastavení komentáře obrázku
txt += "function SetKom (){ \n";
txt += "function dominnerText(node, text) { \n";
txt += "while (node.hasChildNodes()) { \n";
txt += "node.removeChild(node.firstChild); \n";
txt += "} \n";
txt += "node.appendChild(document.createTextNode(text)); \n";
txt += "} \n";
txt += "dominnerText(document.getElementById('popis'), comment[actpic])}; \n";
// Nastavení data obrázku
txt += "function SetDat (){ \n";
txt += "function dominnerText(node, text) { \n";
txt += "while (node.hasChildNodes()) { \n";
txt += "node.removeChild(node.firstChild); \n";
txt += "} \n";
txt += "node.appendChild(document.createTextNode(text)); \n";
txt += "} \n";
txt += "dominnerText(document.getElementById('datum'), date[actpic])}; \n";
// Následující snímek
txt += "function NextPic (){ \n";
txt += "if (actpic == pocet_obrazku) actpic = pocet_obrazku; \n";
txt += "else actpic++; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "document.SetPic.previous.value='<<<'; \n";
txt += "if (actpic == pocet_obrazku){ \n";
txt += "document.SetPic.next.value='';  \n";
txt += "document.SetPic.slshow.value=''; \n";
txt += "if (show == true) {show = false; \n";
txt += "StopSlideShow ();} \n";
txt += "} \n";
txt += "} \n";
// Předchozí snímek
txt += "function PrevPic (){ \n";
txt += "if (actpic != 1) { \n";
txt += "actpic--; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "document.SetPic.next.value = '>>>'; } \n";
txt += "if (show == false) { \n";
txt += "document.SetPic.slshow.value='slideshow';} \n";
txt += "if (actpic == 1) { \n";
txt += "document.SetPic.previous.value=''; } \n";
txt += "} \n";
// Snímek volaný z galerie
txt += "function AktPic (){ \n";
//txt += "actpic = 1; \n";
txt += "actpic = " + i + "; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat (); \n";
txt += "if (actpic == 1){ \n";
txt += "document.SetPic.previous.value=''; } \n";
txt += "if (actpic == pocet_obrazku){ \n";
txt += "document.SetPic.next.value='';  \n";
txt += "document.SetPic.slshow.value=''; } \n";
txt += "} \n";
// Poslední snímek
txt += "function LastPic (){ \n";
txt += "actpic = pocet_obrazku; \n";
txt += "SetPic(); \n";
txt += "SetKom (); \n";
txt += "SetDat ();} \n";
// Spuštění slideshow
txt += "function SlideShow (){ \n";
txt += "timer = setInterval ('NextPic();', 20000);} \n";
// Zastavení slideshow
txt += "function StopSlideShow (){ \n";
txt += "clearInterval (timer);} \n";
// Ovladac slideshow
txt += "function OvladacSlideShow () {  \n";
txt += "if (show == false && actpic != pocet_obrazku) { show = true; \n";
txt += "SlideShow (); \n";
txt += "document.SetPic.slshow.value='stop';} \n";
txt += "else \n";
txt += "{if (actpic != pocet_obrazku) { show = false; \n";
txt += "StopSlideShow (); \n";
txt += "document.SetPic.slshow.value='slideshow';} \n";
txt += "} \n";
txt += "} \n";
// Ovladac zmeny barvy tlacitek
txt += "function KurzorNadNahledy() { \n";
txt += "document.SetPic.nahledy.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoNahledy() { \n";
txt += "document.SetPic.nahledy.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadSlshow() { \n";
txt += "document.SetPic.slshow.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoSlshow() { \n";
txt += "document.SetPic.slshow.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadPredchozi() { \n";
txt += "document.SetPic.previous.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoPredchozi() { \n";
txt += "document.SetPic.previous.style.color = '#3C3E35'; } \n";
txt += "function KurzorNadDalsi() { \n";
txt += "document.SetPic.next.style.color = '#ffffff'; } \n";
txt += "function KurzorMimoDalsi() { \n";
txt += "document.SetPic.next.style.color = '#3C3E35'; } \n";
txt += "// --> \n";
txt += "//--> </sc" + "ript> \n";

txt += "</HEAD> \n";
txt += "<BODY OnLoad='AktPic ();'> \n";
txt += "<table width=100% height=99%> \n";
txt += "<tr height=20><td> \n";
txt += "<form name='SetPic'> \n";
txt += "<input name='nahledy' onclick='history.go(-1);' class='galerie-navigace-foto' id='nahledy' type='button' width=50px style='cursor: pointer;' value='náhledy' onMouseOver='KurzorNadNahledy()' onMouseOut='KurzorMimoNahledy()'></td> \n";
txt += "<input name='slshow' onclick='OvladacSlideShow();' class='galerie-navigace-foto' id='slideshow' type='button' style='cursor: pointer;' value='slideshow' onMouseOver='KurzorNadSlshow()' onMouseOut='KurzorMimoSlshow()'></td> \n";
txt += "<input name='previous' onClick='PrevPic();' class='galerie-navigace-foto' id='zpet' type='button' style='cursor: pointer;' value='&lt;&lt;&lt;' onMouseOver='KurzorNadPredchozi()' onMouseOut='KurzorMimoPredchozi()'></td> \n";
txt += "<input name='next' onclick='NextPic();' class='galerie-navigace-foto' id='tam' type='button' style='cursor: pointer;' value='&gt;&gt;&gt;' onMouseOver='KurzorNadDalsi()' onMouseOut='KurzorMimoDalsi()'></td></tr></form> \n";
txt += "<tr align=center valign=middle> \n";
txt += "<td> \n";
txt += "<IMG Name='imgprev' title='' alt='Albula'> \n";
txt += "<div class='popiska-text' id='popis'></div> \n";
txt += "<div class='datum-text' id='datum'></div></td></tr><table> \n";
txt += "</BODY> \n";
txt += "</HTML>";

	document.open(); 
	document.write(txt);
	document.close(); 
}	

