var agt = navigator.userAgent.toLowerCase();
var ie = (agt.indexOf("msie") != -1);
var ns = (navigator.appName.indexOf("Netscape") != -1) || (navigator.appName.indexOf("Opera") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);
var rqversion = 6; // požadovaná verze pluginu
var isFlashPlugin = false;
if (ie && win)
{
  document.writeln('<script type="text/vbscript">');
  document.writeln(' On Error Resume Next');
  document.writeln(' isFlashPlugin = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+rqversion+'"))');
  document.writeln('</script>');
}
if (ns || !win)
{
  if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
  {
    if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1)
    {
      var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1,versionIndex);
      versionIndex = parseInt( versionString );
      if ( versionIndex >= rqversion )
        isFlashPlugin = true;
    }
  }
}

function ShowID (id) {
	if (id.style.display == "") {
		id.style.display = "none";
	} else {
		id.style.display = "";
	}
}

function Hide (id, txt) {
	if (id.style.display != "") {
			if (txt != 'dopln_sluzby') 	dopln_sluzby.style.display = "none";
			if (txt != 'ceniky') 	ceniky.style.display = "none";
			if (txt != 'terminy') 	terminy.style.display = "none";
			if (txt != 'mista') 	mista.style.display = "none";
			if (txt != 'mapky') 	mapky.style.display = "none";
	}
}

function TopItem(txt, url, barva, id) {
	if (url == "") {
		document.write('<a href="#" class="TopMenu" onclick="Hide('+id+','+"'"+id+"'"+');ShowID('+id+')" style="color:'+barva+'">'+txt+'</a>');
	} else {
		document.write('<a class="TopMenu" href="'+url+'" style="color:'+barva+'">'+txt+'</a>');
	}	
}

function Item1(txt, url, barva, id) {
	if (url == "") {
		document.write('<a href="#" onclick="ShowID('+id+')" class="Menu1" style="cursor:hand; color:'+barva+'">'+txt+'</a>');
	} else {
		document.write('<a class="Menu1" href="'+url+'" style="color:'+barva+'">'+txt+'</a>');
	}	
}

function Item2(txt, url, barva, id) {
	if (url == "") {
		document.write('<a href="#" onclick="ShowID('+id+')" class="Menu2" style="cursor:hand; color:'+barva+'">'+txt+'</a>');
	} else {
		document.write('<a class="Menu2" href="'+url+'" style="color:'+barva+'">'+txt+'</a>');
	}	
}

function Rozbal(akt_menu1, akt_menu2, id) {
	if ((id == akt_menu1) || (id == akt_menu2)) return ''; else return 'none';
}

function Menu (akt_menu1, akt_menu2) {
		document.write('');
		TopItem('Kurzy bezpečné jízdy <br><i>(Škola smyku)</i>', 'kurzy_bezpecne_jizdy.html', '#B9071A', '');
		TopItem('Kurzy s odečtem <br>trestných bodů', 'kurzy_trestne_body.html', '#B9071A', '');
		TopItem('Kurzy defenzivní jízdy', 'kurzy_defenzivni_jizdy.html', '#B9071A', '');
		TopItem('Kurzy sportovní jízdy', 'kurzy_sportovni_jizdy.html', '#B9071A', '');
		TopItem('Kurzy off road', 'kurz_bj_off_road.htm', '#B9071A', '');
		TopItem('Kurzy pro motocykly', 'kurz_bj_moto.htm', '#B9071A', '');
		TopItem('Firemní dny', 'firemni_dny.html', '#B9071A', '');
		TopItem('Autoškola', 'autoskola.html', '#B9071A', '');
		TopItem('Školení řidičů', 'skoleni_ridicu.html', '#B9071A', '');
		TopItem('Závodní licence', 'zavodni_licence.html', '#B9071A', '');
		TopItem('Půjčovna motokár', 'motokary.htm', '#B9071A', '');
		TopItem('Doplňkové služby', '', '#B9071A', 'dopln_sluzby');
			document.write('<div id="dopln_sluzby" style="display:'+Rozbal(akt_menu1, akt_menu2, 'dopln_sluzby')+'">');
				Item1('Oběd, občerstvení ', '', '#0055B0', 'obedy');
						document.write('<div id="obedy" style="display:'+Rozbal(akt_menu1, akt_menu2, 'obedy')+'">');
							Item2('Most', 'obed_Most.htm', '#666666', '');
							Item2('Vysoké Mýto', 'obed_Myto.htm', '#666666', '');
							Item2('Praha - Letná', 'obed_Praha.htm', '#666666', '');
							Item2('Místa na přání', 'obed_ostatni.htm', '#666666', '');
							Item2('Rakousko', 'obed_Rakousko.htm', '#666666', '');
						document.write('</div>');
				Item1('Ubytování', '', '#0055B0', 'ubyt');
						document.write('<div id="ubyt" style="display:'+Rozbal(akt_menu1, akt_menu2, 'ubyt')+'">');
							Item2('Most', 'ubyt_Most.htm', '#666666', '');
							Item2('Vysoké Mýto', 'ubyt_Myto.htm', '#666666', '');
							Item2('Rakousko', 'ubyt_Rakousko.htm', '#666666', '');
						document.write('</div>');
				Item1('Pronájem vozidel HCT', '', '#0055B0', 'pronajem');
						document.write('<div id="pronajem" style="display:'+Rozbal(akt_menu1, akt_menu2, 'pronajem')+'">');
							Item2('Most', 'pronajem_vozidel_Most.htm', '#666666', '');
							Item2('Vysoké Mýto', 'pronajem_vozidel_Myto.htm', '#666666', '');
							Item2('Praha - Letná', 'pronajem_vozidel_Praha.htm', '#666666', '');
							Item2('Místa na přání', 'pronajem_vozidel_ostatni.htm', '#666666', '');
						document.write('</div>');
				Item1('Testovací vůz s telemetrií', 'telemetrie_Most.htm', '#0055B0', '');
				Item1('Motokáry a čtyřkoly', '', '#0055B0', 'motokary');
						document.write('<div id="motokary" style="display:'+Rozbal(akt_menu1, akt_menu2, 'motokary')+'">');
							Item2('Most', 'motokary_Most.htm', '#666666', '');
							Item2('Vysoké Mýto', 'motokary_Myto.htm', '#666666', '');
						document.write('</div>');
				Item1('Pronájem okruhu autodromu', '', '#0055B0', 'okruh');
						document.write('<div id="okruh" style="display:'+Rozbal(akt_menu1, akt_menu2, 'okruh')+'">');
							Item2('Most', 'pronajem_okruhu_Most.htm', '#666666', '');
							Item2('Vysoké Mýto', 'pronajem_okruhu_Myto.htm', '#666666', '');
							Item2('Brno', 'pronajem_okruhu_Brno.htm', '#666666', '');
						document.write('</div>');
				Item1('Tlumočení', 'tlumoceni.html', '#0055B0', '');
				Item1('a další ...', 'dalsi.htm', '#0055B0', '');
			document.write('</div>');

		TopItem('Dárkové poukazy', 'darkove_poukazy.html', '#3E3E3E', '');

		TopItem('Ceníky, kalkulace', '', '#0055B0', 'ceniky');
			document.write('<div id="ceniky" style="display:'+Rozbal(akt_menu1, akt_menu2, 'ceniky')+'">');
				Item1('Kurzy bezpečné jízdy',  'ceniky_bj.htm', '#0055B0', '');
				Item1('Kurzy defenzivní jízdy', 'ceniky_dj.htm', '#0055B0', '');
				Item1('Kurzy sportovní jízdy', 'ceniky_sj.htm', '#0055B0', '');
				Item1('Kurzy off road', 'ceniky_off_road.htm', '#0055B0', '');
				Item1('Kurzy motocykly', 'ceniky_motocykly.htm', '#0055B0', '');
				Item1('Firemní dny', 'ceniky_firemni_dny.htm', '#0055B0', '');
				Item1('Autoškola', 'ceniky_autoskola.htm', '#0055B0', '');
				Item1('Školení řidičů', 'ceniky_sr.htm', '#0055B0', '');
				Item1('Závodní licence', 'ceniky_licence.htm', '#0055B0', '');
				Item1('Doplňkové služby', 'ceniky_sluzby.htm', '#0055B0', '');
				Item1('Dárkové poukazy', 'ceniky_poukazy.htm', '#0055B0', '');
			document.write('</div>');

		TopItem('Poptávky/Objednávky', 'omluva.htm', '#0055B0', '');

		TopItem('Termíny - rezervace', '', '#0055B0', 'terminy');
			document.write('<div id="terminy" style="display:'+Rozbal(akt_menu1, akt_menu2, 'terminy')+'">');
				Item1('Kurzy', 'terminy_kurzy.htm', '#0055B0', '');
				Item1('Závodní licence', 'terminy_licence.htm', '#0055B0', '');
			document.write('</div>');
	
		TopItem('Plánky cvičišť', '', '#3E3E3E', 'mista');
			document.write('<div id="mista" style="display:'+Rozbal(akt_menu1, akt_menu2, 'mista')+'">');
				Item1('Polygon Most', 'planek_Most.htm', '#0055B0', '');
				Item1('Cvičište Vysoké Mýto', 'planek_Myto.htm', '#0055B0', '');
				Item1('Praha - Letná', 'planek_Praha.htm', '#0055B0', '');
				Item1('Púchov (Slovensko)', 'planek_Puchov.htm', '#0055B0', '');
				Item1('Místa na přání', 'planek_ostatni.htm', '#0055B0', '');
				Item1('Rakousko', 'planek_Rakousko.htm', '#0055B0', '');
			document.write('</div>');

		TopItem('Kudy na cvičiště ?', '', '#3E3E3E', 'mapky');
			document.write('<div id="mapky" style="display:'+Rozbal(akt_menu1, akt_menu2, 'mapky')+'">');
				Item1('Polygon Most', 'mapa_Most.htm', '#0055B0', '');
				Item1('Cvicište Vysoké Mýto', 'mapa_Myto.htm', '#0055B0', '');
				Item1('Praha - Letná', 'mapa_Praha.htm', '#0055B0', '');
				Item1('Cvičište v Rakousku', 'mapa_Rakousko.htm', '#0055B0', '');
			document.write('</div>');

		TopItem('Pojištění', '', '#3E3E3E', 'pojisteni');
			document.write('<div id="pojisteni" style="display:'+Rozbal(akt_menu1, akt_menu2, 'pojisteni')+'">');
				Item1('Kurzy bezpečné jízdy', 'pojisteni_bj.htm', '#0055B0', '');
				Item1('Kurzy defenzivní jízdy', 'pojisteni_dj.htm', '#0055B0', '');
				Item1('ostatní kurzy', 'pojisteni_ostatni.htm', '#0055B0', '');
			document.write('</div>');
		TopItem('Napsali o nás', 'napsali_o_nas.html', '#3E3E3E', '');
		TopItem('Soubory ke stažení', 'download.html', '#3E3E3E', '');
		TopItem('Napište nám', 'pripominky.html', '#3E3E3E', '');
		TopItem('Mapa serveru', 'mapa.html', '#3E3E3E', '');
	document.write('');

	document.write('');
}


function Zahlavi(akt_menu1, akt_menu2) {
	document.write('<center>');
	document.write('<table height="100%" width="970" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr valign="top">');
	document.write('<td bgcolor="white"><img src="image/1x1.gif" alt="" width="1" height="1" border="0"></td>');
	document.write('<td bgcolor="#004FBC"><img src="image/1x1.gif" alt="" width="5" height="1" border="0"></td>');
	document.write('<td bgcolor="white"><img src="image/1x1.gif" alt="" width="3" height="1" border="0"></td>');
	document.write('<td bgcolor="white">');
	document.write('<table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr valign="top"><td>');
	document.write('	<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('	<tr>');
	document.write('		<td colspan="3">');


if (isFlashPlugin)
{
  document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="954" height="173" id="flash" align="middle">');
  document.writeln('<param name="allowScriptAccess" value="sameDomain" />');
  document.writeln('<param name="movie" value="flash2.swf" />');
  document.writeln('<param name="quality" value="high" />');
  document.writeln('<param name="bgcolor" value="#9ac7f1" />');
  document.writeln('<embed src="flash2.swf" quality="high" bgcolor="#9ac7f1" width="954" height="173" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  document.writeln('</object>');

	// alternativni obrazek
  document.writeln('<noembed>');
  document.writeln('<a href="index.htm"><img src="image/kolaz-2.jpg" alt="" width="954" height="173" border="0"></a>');
  document.writeln('</noembed>');
	document.write('</td>');
}
else
{
	// alternativni obrazek
  document.writeln('<a href="index.htm"><img src="image/kolaz-2.jpg" alt="" width="954" height="173" border="0"></a></td>');
}

	document.write('	</tr>');
	document.write('	<tr valign="top">');
	document.write('		<td width="10"><img src="image/m1.gif" alt="" width="10" height="40" border="0"></td>');
	document.write('		<td width="193" class="menu">');
	document.write('		<table width="193" border="0" cellspacing="0" cellpadding="0">');
	document.write('		<tr>');
	document.write('		<td><img src="image/m3.gif" alt="" width="193" height="3" border="0"></td>');
	document.write('		</tr>');
	document.write('		</table>');
	
	Menu(akt_menu1, akt_menu2);
	document.write('		<br>');
	document.write('		<center>');
	document.write('		<table border="0" cellspacing="0" cellpadding="5">');
	document.write('		<tr>');
	document.write('			<td><a href="foto_galerie.html"><img src="image/foto.gif" alt="" width="55" height="58" border="0"></a></td>');
	document.write('			<td>&nbsp;&nbsp;&nbsp;</td>');
	document.write('			<td><a href="video_galerie.html"><img src="image/video.gif" alt="" width="55" height="58" border="0"></a></td>');
	document.write('		</tr>');
	document.write('		</table>');
	document.write('		</center>');
	document.write('		<br><br><br><br><br><br><br>');
	document.write('		</td>');
	document.write('		<td>');
	document.write('		<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('		<tr>');
	document.write('			<td><map name="FPMap0"><area href="index.htm" shape="rect" coords="159, 10, 263, 34"><area href="o_hct.html" shape="rect" coords="277, 8, 389, 34"><area href="partneri.html" shape="rect" coords="392, 9, 497, 34"><area href="kontakty.html" shape="rect" coords="507, 9, 612, 34"><area href="archiv.html" shape="rect" coords="622, 9, 727, 34"></map><img border="0" src="./image/menu.gif" usemap="#FPMap0" width="750" height="40"></td>');
	document.write('		</tr>');
	document.write('		<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="25"><tr><td>');
}



function Zapati(txt) {
	document.write('		</td></tr></table></td></tr>');
	document.write('		</table>');
		
	document.write('	</td>');
	document.write('	</tr>');
	document.write('	</table></td></tr>');
	document.write('<tr valign="bottom" height="107"><td>');
	document.write('	<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('	<tr valign="top">');
	document.write('		<td width="10"><img src="image/m4.gif" alt="" width="15" height="107" border="0"></td>');
	document.write('		<td width="193" background="./image/m7.gif" align="center" style="color:#3F7BBC" bgcolor="#ffffff"><img src="image/1x1.gif" alt="" width="187" height="1" border="0"><br>');
	document.write('		HCT.CZ, a.s. ');
	document.write('		<br>tel.: (+420) 417 829 495');
	document.write('		<br>email: <a href="mailto:info@hct.cz">info@hct.cz</a> ');
	document.write('		</td>');
	document.write('		<td width="13"><img src="image/m5.gif" alt="" width="15" height="107" border="0"></td>');
	document.write('		<td width="100%" background="./image/m6.gif" align="right">');
	
	document.write('		<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="image/1x1.gif" alt="" width="1" height="20" border="0"></td><td width="100%"><font color="#0000FF"><marquee behavior="scroll" direction="left" loop="" scrolldelay="150">'+txt+'</marquee></td></tr></table>');

	
	document.write('		<br><br><table border="0" cellspacing="0" cellpadding="5">');
	document.write('		<tr>');
	document.write('		<td><a class="zapati" href="index.htm">ÚVOD</a> &nbsp;&nbsp;:&nbsp;&nbsp;');
	document.write('				<a class="zapati" href="o_hct.html">O HCT</a> &nbsp;&nbsp;:&nbsp;&nbsp;');
	document.write('				<a class="zapati" href="mapa.html">Mapa</a> &nbsp;&nbsp;:&nbsp;&nbsp;');
	document.write('				<a class="zapati" href="partneri.html">PARTNEŘI</a> &nbsp;&nbsp;:&nbsp;&nbsp;');
	document.write('				<a class="zapati" href="kontakty.html">KONTAKTY</a> &nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('				<a class="zapati" href="archiv.html">ARCHÍV</a> &nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('		</td>');
	document.write('		</tr>');
	document.write('		<tr><td align="right">© HCT a <a href="mailto:pavel.palma@volny.cz">Pavel Palma</a>, <a href="http://www.lirais.cz">Webdesign Lira IS s.r.o.</a> &nbsp;&nbsp;&nbsp;&nbsp;</td></tr>');
	document.write('		</table>');
		
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	</table>');
	document.write('</td></tr>');
	document.write('</table>');
	document.write('</td>');
	document.write('<td bgcolor="white"><img src="image/1x1.gif" alt="" width="3" height="1" border="0"></td>');
	document.write('<td bgcolor="#004FBC"><img src="image/1x1.gif" alt="" width="5" height="1" border="0"></td>');
	document.write('<td bgcolor="white"><img src="image/1x1.gif" alt="" width="1" height="1" border="0"></td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('</center>');
}
