function fotografie(i)
{
var txt;

txt = "<HTML> \n";
txt += "<HEAD> \n";
txt += "<TITLE>Martin Válek - fotografie</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 = 19; \n"; 
txt += "show = false; \n"; 
// jména suborů
txt += "images = new Array (); \n";
txt += "images[1] = 'fotky/2007-03-0016.jpg'; \n";
txt += "images[2] = 'fotky/2007-03-0059.jpg'; \n";
txt += "images[3] = 'fotky/2007-03-0095.jpg'; \n";
txt += "images[4] = 'fotky/2007-03-0174.jpg'; \n";
txt += "images[5] = 'fotky/2007-03-0185.jpg'; \n";
txt += "images[6] = 'fotky/2007-03-0235.jpg'; \n";
txt += "images[7] = 'fotky/2007-03-0260.jpg'; \n";
txt += "images[8] = 'fotky/2007-03-0284.jpg'; \n";
txt += "images[9] = 'fotky/2007-03-0688.jpg'; \n";
txt += "images[10] = 'fotky/2007-03-0716.jpg'; \n";
txt += "images[11] = 'fotky/2007-03-0774.jpg'; \n";
txt += "images[12] = 'fotky/2007-06-0227.jpg'; \n";
txt += "images[13] = 'fotky/2007-08-0904.jpg'; \n";
txt += "images[14] = 'fotky/2007-08-0947.jpg'; \n";
txt += "images[15] = 'fotky/2007-08-1051.jpg'; \n";
txt += "images[16] = 'fotky/2008-02-0413.jpg'; \n";
txt += "images[17] = 'fotky/2008-02-0430.jpg'; \n";
txt += "images[18] = 'fotky/2008-02-0459.jpg'; \n";
txt += "images[19] = 'fotky/2008-02-0559.jpg'; \n";
// Komentáře fotografií
txt += "comment = new Array () \n";
txt += "comment[1] = 'VT 27 + VT 28 Regentalbahn, Os 7572, Špičák'; \n";
txt += "comment[2] = 'VT 17 + VT 15 Regentalbahn, Os 7575, Železná Ruda město - Špičák'; \n";
txt += "comment[3] = '750.213 ČD, Os 7542, Špičák - Železná Ruda město'; \n";
txt += "comment[4] = '814.014 ČD, Os 17544, Janovice nad Úhlavou'; \n";
txt += "comment[5] = '750.213 ČD, Os 7504, Janovice nad Úhlavou'; \n";
txt += "comment[6] = '831.043 ČD, Os 7553, Zelená Lhota - Dešenice'; \n";
txt += "comment[7] = '750.236 ČD, Os 7501, Dešenice - Nýrsko'; \n";
txt += "comment[8] = '750.078 ČD, Os 7546, Nýrsko - Dešenice'; \n";   
txt += "comment[9] = '754.024 ČD, Os 7504, Dešenice - Zelená Lhota'; \n";
txt += "comment[10] = '754.024 ČD, Os 7549, Zelená Lhota - Dešenice'; \n";   
txt += "comment[11] = '831.136 ČD, Os 7544, Dešenice - Zelená Lhota'; \n";
txt += "comment[12] = '750.078 ČD, Sp 1960, Špičák'; \n";   
txt += "comment[13] = '754.024 ČD, Os 7504, Špičák - Železná Ruda město'; \n";
txt += "comment[14] = 'VT 24 + VT 16 Regentalbahn, Os 7574, Špičák - Železná Ruda město'; \n";   
txt += "comment[15] = '750.213 ČD, Os 7501, Železná Ruda město - Špičák'; \n";
txt += "comment[16] = '754.006 ČD, Os 7504, Dešenice - Zelená Lhota'; \n";   
txt += "comment[17] = '754.024 ČD, R 850, Nýrsko - Dešenice'; \n";
txt += "comment[18] = '842.021 ČD, Os 7544, Nýrsko - Dešenice'; \n";   
txt += "comment[19] = '754.024 ČD, Os 7548, Nýrsko - Dešenice'; \n";
// Data fotografií
txt += "date = new Array () \n";
txt += "date[1] = '4.3.2007'; \n";
txt += "date[2] = '4.3.2007'; \n";
txt += "date[3] = '4.3.2007'; \n";
txt += "date[4] = '11.3.2007'; \n";
txt += "date[5] = '11.3.2007'; \n";
txt += "date[6] = '11.3.2007'; \n";
txt += "date[7] = '11.3.2007'; \n";
txt += "date[8] = '11.3.2007'; \n";
txt += "date[9] = '26.3.2007'; \n";
txt += "date[10] = '26.3.2007'; \n";
txt += "date[11] = '26.3.2007'; \n";
txt += "date[12] = '10.6.2007'; \n";
txt += "date[13] = '25.8.2007'; \n";
txt += "date[14] = '25.8.2007'; \n";
txt += "date[15] = '25.8.2007'; \n";
txt += "date[16] = '24.2.2008'; \n";
txt += "date[17] = '24.2.2008'; \n";
txt += "date[18] = '24.2.2008'; \n";
txt += "date[19] = '24.2.2008'; \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='Šumava'> \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(); 
}	
