function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>®eleznice - Allgäu</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";
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 = 26; \n"; 
txt += "show = false; \n"; 
// jména suborù
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/2009-02-0021.jpg'; \n";
txt += "images[2] = 'fotky/2009-02-0066.jpg'; \n";
txt += "images[3] = 'fotky/2009-02-0076.jpg'; \n";
txt += "images[4] = 'fotky/2009-02-0119.jpg'; \n";
txt += "images[5] = 'fotky/2009-02-0131.jpg'; \n";
txt += "images[6] = 'fotky/2009-02-0146.jpg'; \n";
txt += "images[7] = 'fotky/2009-02-0188.jpg'; \n";
txt += "images[8] = 'fotky/2009-04-1736.jpg'; \n";
txt += "images[9] = 'fotky/2009-04-1742.jpg'; \n";
txt += "images[10] = 'fotky/2009-04-1703.jpg'; \n";
txt += "images[11] = 'fotky/2009-04-1294.jpg'; \n";
txt += "images[12] = 'fotky/2009-04-1327.jpg'; \n";
txt += "images[13] = 'fotky/2009-04-1754.jpg'; \n";
txt += "images[14] = 'fotky/2009-04-1848.jpg'; \n";
txt += "images[15] = 'fotky/2009-04-1816.jpg'; \n";
txt += "images[16] = 'fotky/2009-04-1777.jpg'; \n";
txt += "images[17] = 'fotky/2009-04-1827.jpg'; \n";
txt += "images[18] = 'fotky/2009-04-2034.jpg'; \n";
txt += "images[19] = 'fotky/2009-04-2041.jpg'; \n";
txt += "images[20] = 'fotky/2009-04-1626.jpg'; \n";
txt += "images[21] = 'fotky/2009-04-1642.jpg'; \n";
txt += "images[22] = 'fotky/2009-04-1906.jpg'; \n";
txt += "images[23] = 'fotky/2009-04-1517.jpg'; \n";
txt += "images[24] = 'fotky/2009-04-1489.jpg'; \n";
txt += "images[25] = 'fotky/2009-04-1955.jpg'; \n";
txt += "images[26] = 'fotky/2009-04-2010.jpg'; \n";
// Komentáøe fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = '218 421+419 DB, EC 191, Hergatz'; \n";
txt += "comment[2] = '612 073/573 DB, RB 32922, Hergatz'; \n";
txt += "comment[3] = '218 445+416 DB, EC 196, Hergatz'; \n";
txt += "comment[4] = '612 577/077 DB, RE 32732, Röthenbach (Allgäu) - Hergatz'; \n";
txt += "comment[5] = '223 068 Arriva, ALX 38704, Röthenbach (Allgäu) - Hergatz'; \n";
txt += "comment[6] = '612 574/074 DB, RE 32734, Röthenbach (Allgäu) - Hergatz'; \n";
txt += "comment[7] = '612 081/581 DB, RE 32736, Röthenbach (Allgäu) - Hergatz'; \n";
txt += "comment[8] = '232 205 DB Schenker, R 15464, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[9] = '232 618+461 DB Schenker, FS 45190, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[10] = '223 070 Arriva, ALX 38712, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[11] = '612 084/584 DB, RE 3983, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[12] = '218 405+419 DB, EC 196, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[13] = '612 573/073 DB, RE 3983, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[14] = '225 032+030 DB Schenker, CFN 46685, Röthenbach (Allgäu) - Oberstaufen'; \n";
txt += "comment[15] = '612 083/583 DB, RB 32922, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[16] = '612.650/150+075/575 DB, RE 32730, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[17] = '612 075/575 DB, RB 32773, Röthenbach (Allgäu) - Oberstaufen'; \n";
txt += "comment[18] = '223 061 Arriva, ALX 38710, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[19] = '612 084/584, RB 32940, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[20] = '612 650/150 DB, RB 32940, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[21] = '612 585/085, RE 3992, Röthenbach (Allgäu) - Oberstaufen'; \n";
txt += "comment[22] = '232 461+618 DB Schenker, FS 45197, Röthenbach (Allgäu) - Oberstaufen'; \n";
txt += "comment[23] = '223 070 Arriva, ALX 38711, Röthenbach (Allgäu) - Oberstaufen'; \n";
txt += "comment[24] = '232 182+589 DB Schenker, FS 45192, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[25] = '218 202 DB, Lr 75774, Oberstaufen - Röthenbach (Allgäu)'; \n";
txt += "comment[26] = '232 330+413 DB Schenker, FS 45198, Oberstaufen - Röthenbach (Allgäu)'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '18.2.2009'; \n";
txt += "date[2] = '18.2.2009'; \n";
txt += "date[3] = '18.2.2009'; \n";
txt += "date[4] = '18.2.2009'; \n";
txt += "date[5] = '18.2.2009'; \n";
txt += "date[6] = '18.2.2009'; \n";
txt += "date[7] = '18.2.2009'; \n";
txt += "date[8] = '25.4.2009'; \n";
txt += "date[9] = '25.4.2009'; \n";
txt += "date[10] = '24.4.2009'; \n";
txt += "date[11] = '24.4.2009'; \n";
txt += "date[12] = '24.4.2009'; \n";
txt += "date[13] = '25.4.2009'; \n";
txt += "date[14] = '25.4.2009'; \n";
txt += "date[15] = '25.4.2009'; \n";
txt += "date[16] = '25.4.2009'; \n";
txt += "date[17] = '25.4.2009'; \n";
txt += "date[18] = '25.4.2009'; \n";
txt += "date[19] = '25.4.2009'; \n";
txt += "date[20] = '24.4.2009'; \n";
txt += "date[21] = '24.4.2009'; \n";
txt += "date[22] = '25.4.2009'; \n";
txt += "date[23] = '24.4.2009'; \n";
txt += "date[24] = '24.4.2009'; \n";
txt += "date[25] = '25.4.2009'; \n";
txt += "date[26] = '25.4.2009'; \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='Allgäu'> \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(); 
}	

