﻿function menu( co )
{
	if (co!='out')
		{
			document.getElementById('menu-'+co).className='menu-roletka'
			document.getElementById('pol-'+co).className='hover'
		}
	else
		{
			document.getElementById('menu-zajezdy').className='skryte'
			document.getElementById('menu-sluzby').className='skryte'
      document.getElementById('menu-informace').className='skryte'
      document.getElementById('menu-onas').className='skryte'

			document.getElementById('pol-zajezdy').className='menu'
			document.getElementById('pol-sluzby').className='menu'
			document.getElementById('pol-informace').className='menu'
			document.getElementById('pol-onas').className='menu'
		}
};

function ZobrazStranku(stranka,width,height)
{

	window.open(stranka,"_blank","toolbar=no,width="+width+",height="+height+",resizable=0,screenX=100,screenY=100");

};

function vyhledavani( co )
{
	document.getElementById('parametry').className='skryte';
	document.getElementById('parametry-CIS').className='skryte';
	
	document.getElementById(co).className='';
	
  if (co=='parametry-CIS'){
     document.getElementById('vyhledavani-cislo').className='polozka hover';
     document.getElementById('vyhledavani-zakladni').className='polozka';
  }
  else{
     document.getElementById('vyhledavani-cislo').className='polozka';
     document.getElementById('vyhledavani-zakladni').className='polozka hover';
  }
};

function setFav(odkaz, pageTitle, pageAddress)
{
  if (document.all && !window.opera)   // jedna se o IE
  {
    window.external.AddFavorite(pageAddress, pageTitle);
    return false;
  }

  else if (window.opera && window.print)  // jedna se o Operu
  {
    // Pouze zmeni title odkazu,
    // k oblibenym se stranka ulozi diky atributu rel.
    // Jako popisek by se normalne pouzila hodnota atributu title
    // v danem odkazu, ale to my nechceme, proto ho zmenime
  
    odkaz.title = pageTitle;
    window.alert("Budete muset odznačit zaškrtávací políčko 'Show in hotlist panel'");
    return true;
  }

  else if (window.sidebar && window.sidebar.addPanel)
  {	
    // jedna se o prohlizece na bazi Mozzily
    // je lepsi se zeptat a uvest veci na pravou miru:
    if (window.confirm("Přidat stránku jako nový panel?"))  
    {
      // prida stranku jako sidebar, ne k oblibenym!!!!
      window.sidebar.addPanel(pageTitle, pageAddress, ""); 
      return false;
    }
  }

  window.alert("Lituji, ale nezdařilo se mi přidat stránku k vašim oblíbeným položkám, budete si ji asi muset zařadit ručně (např. stiskem kláves Ctrl-D).");
  return false;
}

function recenze_hotely( co )
{
	if (document.getElementById(co).style.display=='none')
		{
			document.getElementById(co).style.display=''
		}
	else 
		{
			document.getElementById(co).style.display='none'
		}
};

function otevriOkno(url) {
  try {if (okno) {okno.close()};}
  catch(e){}
  finally {}  
  okno = window.open ('', 'okno', 'toolbar=0,scrollbars=0,status=0,menubar=0,directories=no,location=no,resizable=1,width=640,height=480');
  okno.document.write ('<html><head><title>Fotografie</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="Stylesheet" href="styles.css" type="text/css" media="screen,projection" /></head><body style="padding: 10px"><img name="img" alt="Zvětšená fotografie" onclick="window.close();"" src="' + url + '" onload="javascript:window.resizeTo(document.images[0].width+40,document.images[0].height+130);"/><p class="c">Okno zavřete kliknutím na fotografii</p></body></html>');
  okno.focus();
  return false;
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
