version = navigator.appVersion.toLowerCase();
agent = navigator.userAgent.toLowerCase();
ie = (version.indexOf('msie')>-1);
win = (version.indexOf('windows')>-1);
opera = (agent.indexOf('opera')>-1);
ie50 = (version.indexOf('msie 5.0')>-1);

function prncs() {
document.write(' | \074a href=\"javascript:goprn();\"\076Vytisknout stránku\074/a\076');
}
function prnen() {
document.write(' | \074a href=\"javascript:goprn();\"\076Print\074/a\076');
}
function prnde() {
document.write(' | \074a href=\"javascript:goprn();\"\076Presse\074/a\076');
}
function prnru() {
document.write(' | \074a href=\"javascript:goprn();\"\076Печатать\074/a\076');
}

function goprn() {
window.print();
}

function favcs() {
if ((opera) && (win)) return false;
else if ((ie) && (win)) document.write(' | \074a href=\"javascript:gofavcs();\"\076Přidat do záložek\074/a\076');
}
function gofavcs() {
window.external.addFavorite('http://www.praha5.cz','Městská část Praha 5');
}

function faven() {
if ((opera) && (win)) return false;
else if ((ie) && (win)) document.write(' | \074a href=\"javascript:gofaven();\"\076Add to Bookmarks\074/a\076');
}
function gofaven() {
window.external.addFavorite('http://www.praha5.cz','Prague 5');
}

function favde() {
if ((opera) && (win)) return false;
else if ((ie) && (win)) document.write(' | \074a href=\"javascript:gofavde();\"\076Als beliebte Adresse aufnehmen\074/a\076');
}
function gofavde() {
window.external.addFavorite('http://www.praha5.cz','Prag 5');
}

function favru() {
if ((opera) && (win)) return false;
else if ((ie) && (win)) document.write(', \074a href=\"javascript:gofavru();\"\076Добавить в избранное\074/a\076');
}
function gofavru() {
window.external.addFavorite('http://www.praha5.cz','Прага 5');
}




var xmlHttp

function showHint(str)
{
if (str.length==0)
  { 
  document.getElementById("txtHint").innerHTML=""
  return
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
var url="/backend/template/gethint.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

