﻿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('pol-parametry').className='v1'
			document.getElementById('pol-parametry-CIS').className='v2'

			document.getElementById(co).className=''
			document.getElementById('pol-'+co).className=document.getElementById('pol-'+co).className + '-sel'
};

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;
}