var whiteplace = new Array(2),
    rol = new Array();
    whiteplace[0]=rol;
    whiteplace[1]=rol;
var x, y;
var dom = (document.getElementById && document.getElementsByTagName);

if (dom)
{
  window.onload = init;
}

function getObj(name)
{
  if (document.getElementById) return document.getElementById(name);
  else if (document.all) return document.all[name];
  else return null;
}

function obarvi(j_obj,timeout,isenable)
{
  if (isenable)
    getObj(j_obj).style.background="pink";
  else
    window.setTimeout("obarvi('"+j_obj+"',"+timeout+",1)",timeout);
}

function okno(url)
{
  window.open("foto.htm?"+url, "_blank", "width=40,height=40,menubar=no,resizable=no,scrollbars=no");
}

function add(jmeno, odkaz)
{
  var hl = document.createElement("span");
  hl.className="hidden";
  hl.innerHTML="--&gt; ";
  getObj("box1").appendChild(hl);
  
  hl = document.createElement("a");
  hl.href=odkaz;
  hl.innerHTML=jmeno;
  getObj("box1").appendChild(hl);
  
  hl = document.createElement("br");
  hl.className="hidden"
  getObj("box1").appendChild(hl);
}

function divadd(jmeno)
{
  var hl = document.createElement("div");
  hl.className="m-nadpis";
  hl.innerHTML=jmeno;
  getObj("box1").appendChild(hl);
}

function chImg(obj) {
  getObj('mainimg').src=obj.src.replace('esm/','');
  getObj('mainimg').scrollIntoView();
}

function init()
{
  if (screen.width>1024) document.body.style.fontSize="100%";
}

