var poy=-1;
var pox=-1;

function vytvorxmlhttp()
{
  var xmlHttp= false;
  
      if (window.ActiveXObject) 
          {xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
       else if (window.XMLHttpRequest) 
          {xmlHttp = new XMLHttpRequest();}
          else
          {window.alert("Nelze vytvořit")}
    return xmlHttp;
}

var xHttp;

function DejNick(dataSource) 
  {
     xHttp = vytvorxmlhttp();
     xHttp.open("GET", dataSource); 
     xHttp.onreadystatechange = function()
     { 
       if (xHttp.readyState == 4 && xHttp.status == 200) 
       { 
          if(xHttp.responseText == "Obsazeny")
          {
             var oznam = document.getElementById("oznam");
             oznam.innerHTML = "<font color='red'>Nelze použit.</font>";
          }else{
             var oznam = document.getElementById("oznam");
             oznam.innerHTML = "Lze použit.";
          }
       }
     } 
     xHttp.send(null); 
   }

   function KontrolaNicku(udalost) 
   {
        udalost = (udalost) ? udalost: window.event;
        txt = (udalost.target) ? udalost.target : udalost.srcElement;

        if (udalost.type == "keyup") 
        {
          var oznam = document.getElementById("oznam");
          oznam.innerHTML = "<span>Zkoumá se...</span>";
          if (txt.value)
          {
          DejNick("validace.php?promenna=" + txt.value);
          }else{
          oznam.innerHTML = "<span>Prázdný znak nelze.</span>";
          }
        }
    }

function MouseOver(id)
{
window.document.getElementById(id).style.display='block';
}

function MouseOut(id)
{
window.document.getElementById(id).style.display='none';
}

var dayarray=new Array("Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota")
var montharray=new Array("Leden","Únor","Březen","duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec")

function IdValue(id,val)
{
window.document.getElementById(id).value=val;
}

function IdValueP(id,val)
{
  var v = window.document.getElementById(id); 
	var add = val;
	v.focus();
	if (window.document.selection) {
		sel = window.document.selection.createRange();
		sel.text = add;
	} else if( v.selectionStart || v.selectionStart == "0" ) {
		var startPos = v.selectionStart;
		var endPos = v.selectionEnd;
		var len = v.value.length;
		v.value = v.value.substring(0, startPos) + add + v.value.substring(endPos, len);
	} else {
		v.value += add;
	}

}

function IdBlockNone(id)
{
window.document.getElementById(id).style.display=(window.document.getElementById(id).style.display=='block') ? 'none':'block';
}

function cas(id) {
rok = new Array("ledena", "února", "březena", "dubena", "května", "června", "července", "srpena", "září", "října", "listopadu", "prosince");
tyden = new Array("neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota");
datum = new Date();
with(datum){
den = getDay();

d = getDate();
m = getMonth();
r = getYear();

h = getHours();
min = getMinutes();
s = getSeconds();
if (s<10)
s="0"+s;
if (min<10)
min="0"+min;
if (h<10)
h="0"+h;
if (d<10)
d="0"+d;
if (r<2000)
r+=1900;
}

window.document.getElementById("clock").innerHTML=tyden[den]+" "+d+"."+rok[m]+" "+r+" "+h+":"+min+":"+s;

window.setTimeout("cas()", 1000);
}

function OpenWindow(url,nazev,vyska,sirka,zhora,zleva,historie,vrchnilista,radeksadresou,stavovyradek,vybraneadresy,nabidkaprohlizece,posuvniky,zmenavelikosti)
{
window.open(url,nazev,"height="+vyska+"px, width="+sirka+"px, top="+zhora+"px, left="+zleva+"px, copyhistory="+historie+", toolbar="+vrchnilista+", location="+radeksadresou+", status="+stavovyradek+", directories="+vybraneadresy+", menubar="+nabidkaprohlizece+", scrollbars="+posuvniky+", resizable="+zmenavelikosti);
}

var posundown=0;
var posunx;
var posuny;
var posunid;
var px;
var py;

function xy(e){
var ev=(!e)?window.event:e;//IE:Moz
if (ev.pageX){//Moz
posunx=ev.pageX+window.pageXOffset;
posuny=ev.pageY+window.pageYOffset;
}
else if(ev.clientX){//IE
posunx=ev.clientX+document.body.scrollLeft;
posuny=ev.clientY+document.body.scrollTop;
}
else{return false}//old browsers
}

function xyWrite(id)
{
document.getElementById(id).innerHTML=' '+posunx+':'+posuny+' ';
}

function spustitposun(id,x,y) 
{
 posundown=1;
 posunid=id;
 px=x;
 py=y;
}

function posun() 
{
 if (posundown==1)
 { 
 window.document.getElementById(posunid).style.left=posunx-px;
 window.document.getElementById(posunid).style.top=posuny-py;
 if (posunid=='menu')
{
 poy=posuny-py;
 pox=posunx-px;
}
 }                                     
}

function ukoncitposun(url,xp,yp) 
{
 posundown=0;
 var ulozitposun=vytvorxmlhttp();
 if(ulozitposun.readyState==4 || ulozitposun.readyState==0)
  {
  x=posunx-xp;
  y=posuny-yp;
  ulozitposun.open("GET",url+'?top='+y+'&left='+x,true);
  }
 ulozitposun.send(null);
}

function usporadat(id,y,x) 
{ 
 window.document.getElementById(id).style.top=y;
 if (id=='menu')
{
 poy=y;
 pox=x;
}
 window.document.getElementById(id).style.left=x;
}

function usporadat2(id,y,x,url) 
{ 
 window.document.getElementById(id).style.top=y;
 if(id=='menu')
{
 poy=y;
 pox=x;
}
 window.document.getElementById(id).style.left=x;
 
 posundown=0;
 var ulozitposun=vytvorxmlhttp();
 if(ulozitposun.readyState==4 || ulozitposun.readyState==0)
  {
  ulozitposun.open("GET",url+'?top='+y+'&left='+x,true);
  }
 ulozitposun.send(null);                                     
}

function KonrolaFormulare(Form) {
    for( var i=0; i<Form.length; i++ ) {
     with(Form.elements[i]) { 
      if( type=="text" || type=="password" ) {
        if( name.indexOf("num")==0 ) {
            if( (value.length==0) || isNaN(parseInt(value)) ) {
                alert('V poli má být číselná hodnota"' + name.slice(3) + '".');
                focus();
                return false;        
            }
        } else {
            if( value.length==0) {
                alert('Pole nesmí být prázdné"' + name + '".');
                focus();
                return false;        
            }
        }
      }
     }
    }
    return true;
}

 //onSubmit="return Validate(this)"
 
function zkontroluj_email(adresa)
{
    re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
    return adresa.search(re) == 0;
}

function zkontroluj_formular(id)
{
  if (!zkontroluj_email(window.document.getElementById(id).value))
  {
    alert("Odesílatel nemá správně vyplněnou adresu!");
    window.document.getElementById(id).focus();
    return false;
  }
  return true;  
}

function PosuvneMenu(top,left)
{
if (poy>-1)
 window.document.getElementById('menu').style.posTop = window.document.body.scrollTop+poy;
else
 window.document.getElementById('menu').style.posTop = window.document.body.scrollTop+top;

if (pox>-1)
 window.document.getElementById('menu').style.posLeft = window.document.body.scrollLeft+pox;
else
 window.document.getElementById('menu').style.posLeft = window.document.body.scrollLeft+top;
}

function PoslatProm(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).value=='')
  {
  window.alert ("Pole je prázdné");
  }else{
  poslat.open("GET",url+'?'+id+'='+window.document.getElementById(id).value,true);
  window.document.getElementById(id).value='';
  window.alert("Změněno");
  } 
  }
 poslat.send(null);
}

function PoslatProm2(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).value=='')
  {
  window.alert ("Pole je prázdné");
  }else{
  poslat.open("GET",url+'?'+id+'='+window.document.getElementById(id).value,true);
  window.document.getElementById(id).value='';
  } 
  }
 poslat.send(null);
}

function PoslatProm3(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).checked==true)
  {
  poslat.open("GET",url+'?'+id+'=1',true);
  }else{
  poslat.open("GET",url+'?'+id+'=0',true);
  }
  window.alert("Změněno");
  } 
 poslat.send(null);
}

function PoslatProm4(url) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  poslat.open("GET",url,true);
  } 
 poslat.send(null);
}

function Inicializace()
{
xHttp = vytvorxmlhttp();
xHttp.open("GET", 'chat.php', true); 
xHttp.onreadystatechange = function()
{ 
if (xHttp.readyState == 4 && xHttp.status == 200) 
{
window.document.getElementById("div_chat").innerHTML=xHttp.responseText;
if(xHttp.responseText=="")
{
window.close();
} 
}
} 
 
xHttp.send(null);

xHttp2 = vytvorxmlhttp();
xHttp2.open("GET", 'chat3.php', true); 
xHttp2.onreadystatechange = function()
{ 
if (xHttp2.readyState == 4 && xHttp2.status == 200) 
{
window.document.getElementById("div_online").innerHTML=xHttp2.responseText;
if(xHttp2.responseText=="")
{
window.close();
} 
}
} 
 
xHttp2.send(null);

window.setTimeout("Inicializace()", 5000);
}


function PosuvnyObjekt(id,y,x)
{
 window.document.getElementById(id).style.posBottom = -window.document.body.scrollTop+y;
 window.document.getElementById(id).style.posLeft = window.document.body.scrollLeft+x;
}

function PosuvnyObjekt2(id,y,x)
{
 window.document.getElementById(id).style.posTop = window.document.body.scrollTop+y;
 window.document.getElementById(id).style.posLeft = window.document.body.scrollLeft+x;
}

function video(video)
{
var s1 = new SWFObject("player-viral.swf","ply","500","400","9","#804000");
 	  s1.addParam("allowfullscreen","true");
	  s1.addVariable('displayheight','1000');
		s1.addVariable('frontcolor','0x000000');
    s1.addVariable('backcolor','0x804000');
    s1.addVariable('lightcolor','0x666666');
	  s1.addVariable('screencolor','0x804000');
    s1.addVariable('displayheight','500');
		s1.addParam("allownetworking","all");
		s1.addParam("allowscriptaccess","always");
		s1.addVariable('file',video);    
		s1.addVariable('image','http://usr.bandzone.cz/band/an/analnivytok/gallery/profile.default/354864.jpg');
		s1.addVariable('logo','');
		s1.addVariable('autostart','true');
		s1.write("container");
}

var poy=-1;
var pox=-1;

function vytvorxmlhttp()
{
  var xmlHttp= false;
  
      if (window.ActiveXObject) 
          {xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
       else if (window.XMLHttpRequest) 
          {xmlHttp = new XMLHttpRequest();}
          else
          {window.alert("Nelze vytvořit")}
    return xmlHttp;
}

function MouseOver(id)
{
window.document.getElementById(id).style.display='block';
}

function MouseOut(id)
{
window.document.getElementById(id).style.display='none';
}

var dayarray=new Array("Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota")
var montharray=new Array("Leden","Únor","Březen","duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec")

function IdValue(id,val)
{
window.document.getElementById(id).value=val;
}

var cislo=0;

function IdValue2(id,vala,valb)
{
cislo=cislo+1;
val2="";
for(c=0;c!=cislo;c++)
{
val2=val2+vala+cislo+valb;
}
val=val2;
document.getElementById(id).innerHTML=val;
window.document.getElementById('cislo').value=cislo+1;
}

function IdValueP(id,val)
{
  var v = window.document.getElementById(id); 
	var add = val;
	v.focus();
	if (window.document.selection) {
		sel = window.document.selection.createRange();
		sel.text = add;
	} else if( v.selectionStart || v.selectionStart == "0" ) {
		var startPos = v.selectionStart;
		var endPos = v.selectionEnd;
		var len = v.value.length;
		v.value = v.value.substring(0, startPos) + add + v.value.substring(endPos, len);
	} else {
		v.value += add;
	}

}

function IdBlockNone(id)
{
window.document.getElementById(id).style.display=(window.document.getElementById(id).style.display=='block') ? 'none':'block';
}

function cas(id) {
rok = new Array("ledena", "února", "březena", "dubena", "května", "června", "července", "srpena", "září", "října", "listopadu", "prosince");
tyden = new Array("neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota");
datum = new Date();
with(datum){
den = getDay();

d = getDate();
m = getMonth();
r = getYear();

h = getHours();
min = getMinutes();
s = getSeconds();
if (s<10)
s="0"+s;
if (min<10)
min="0"+min;
if (h<10)
h="0"+h;
if (d<10)
d="0"+d;
if (r<2000)
r+=1900;
}

window.document.getElementById("clock").innerHTML=tyden[den]+" "+d+"."+rok[m]+" "+r+" "+h+":"+min+":"+s;

window.setTimeout("cas()", 1000);
}

function OpenWindow(url,nazev,vyska,sirka,zhora,zleva,historie,vrchnilista,radeksadresou,stavovyradek,vybraneadresy,nabidkaprohlizece,posuvniky,zmenavelikosti)
{
window.open(url,nazev,"height="+vyska+"px, width="+sirka+"px, top="+zhora+"px, left="+zleva+"px, copyhistory="+historie+", toolbar="+vrchnilista+", location="+radeksadresou+", status="+stavovyradek+", directories="+vybraneadresy+", menubar="+nabidkaprohlizece+", scrollbars="+posuvniky+", resizable="+zmenavelikosti);
}

var posundown=0;
var posunx;
var posuny;
var posunid;
var px;
var py;

function xy(e){
var ev=(!e)?window.event:e;//IE:Moz
if (ev.pageX){//Moz
posunx=ev.pageX+window.pageXOffset;
posuny=ev.pageY+window.pageYOffset;
}
else if(ev.clientX){//IE
posunx=ev.clientX+document.body.scrollLeft;
posuny=ev.clientY+document.body.scrollTop;
}
else{return false}//old browsers
}

function xyWrite(id)
{
document.getElementById(id).innerHTML=' '+posunx+':'+posuny+' ';
}

function spustitposun(id,x,y) 
{
 posundown=1;
 posunid=id;
 px=x;
 py=y;
}

function posun() 
{
 if (posundown==1)
 { 
 window.document.getElementById(posunid).style.left=posunx-px;
 window.document.getElementById(posunid).style.top=posuny-py;
 if (posunid=='menu')
{
 poy=posuny-py;
 pox=posunx-px;
}
 }                                     
}

function ukoncitposun(url,xp,yp) 
{
 posundown=0;
 var ulozitposun=vytvorxmlhttp();
 if(ulozitposun.readyState==4 || ulozitposun.readyState==0)
  {
  x=posunx-xp;
  y=posuny-yp;
  ulozitposun.open("GET",url+'?top='+y+'&left='+x,true);
  }
 ulozitposun.send(null);
}

function usporadat(id,y,x) 
{ 
 window.document.getElementById(id).style.top=y;
 if (id=='menu')
{
 poy=y;
 pox=x;
}
 window.document.getElementById(id).style.left=x;
}

function usporadat2(id,y,x,url) 
{ 
 window.document.getElementById(id).style.top=y;
 if(id=='menu')
{
 poy=y;
 pox=x;
}
 window.document.getElementById(id).style.left=x;
 
 posundown=0;
 var ulozitposun=vytvorxmlhttp();
 if(ulozitposun.readyState==4 || ulozitposun.readyState==0)
  {
  ulozitposun.open("GET",url+'?top='+y+'&left='+x,true);
  }
 ulozitposun.send(null);                                     
}

function KonrolaFormulare(Form) {
    for( var i=0; i<Form.length; i++ ) {
     with(Form.elements[i]) { 
      if( type=="text" || type=="password" ) {
        if( name.indexOf("num")==0 ) {
            if( (value.length==0) || isNaN(parseInt(value)) ) {
                alert('V poli má být číselná hodnota"' + name.slice(3) + '".');
                focus();
                return false;        
            }
        } else {
            if( value.length==0) {
                alert('Pole nesmí být prázdné"' + name + '".');
                focus();
                return false;        
            }
        }
      }
     }
    }
    return true;
}

 //onSubmit="return Validate(this)"
 
function zkontroluj_email(adresa)
{
    re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
    return adresa.search(re) == 0;
}

function zkontroluj_formular(id)
{
  if (!zkontroluj_email(window.document.getElementById(id).value))
  {
    alert("Odesílatel nemá správně vyplněnou adresu!");
    window.document.getElementById(id).focus();
    return false;
  }
  return true;  
}

function PosuvneMenu(top,left)
{
if (poy>-1)
 window.document.getElementById('menu').style.posTop = window.document.body.scrollTop+poy;
else
 window.document.getElementById('menu').style.posTop = window.document.body.scrollTop+top;

if (pox>-1)
 window.document.getElementById('menu').style.posLeft = window.document.body.scrollLeft+pox;
else
 window.document.getElementById('menu').style.posLeft = window.document.body.scrollLeft+top;
}

function PoslatProm(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).value=='')
  {
  window.alert ("Pole je prázdné");
  }else{
  poslat.open("GET",url+'?'+id+'='+window.document.getElementById(id).value,true);
  window.document.getElementById(id).value='';
  window.alert("Změněno");
  } 
  }
 poslat.send(null);
}

function PoslatProm2(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).value=='')
  {
  window.alert ("Pole je prázdné");
  }else{
  poslat.open("GET",url+'?'+id+'='+window.document.getElementById(id).value,true);
  window.document.getElementById(id).value='';
  } 
  }
 poslat.send(null);
}

function PoslatProm3(url,id) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  if (window.document.getElementById(id).checked==true)
  {
  poslat.open("GET",url+'?'+id+'=1',true);
  }else{
  poslat.open("GET",url+'?'+id+'=0',true);
  }
  window.alert("Změněno");
  } 
 poslat.send(null);
}

function PoslatProm4(url) 
{
 var poslat=vytvorxmlhttp();
 if(poslat.readyState==4 || poslat.readyState==0)
  {
  poslat.open("GET",url,true);
  } 
 poslat.send(null);
}

function Inicializace()
{
xHttp = vytvorxmlhttp();
xHttp.open("GET", 'chat.php', true); 
xHttp.onreadystatechange = function()
{ 
if (xHttp.readyState == 4 && xHttp.status == 200) 
{
window.document.getElementById("div_chat").innerHTML=xHttp.responseText;
if(xHttp.responseText=="")
{
window.close();
} 
}
} 
 
xHttp.send(null);

xHttp2 = vytvorxmlhttp();
xHttp2.open("GET", 'chat3.php', true); 
xHttp2.onreadystatechange = function()
{ 
if (xHttp2.readyState == 4 && xHttp2.status == 200) 
{
window.document.getElementById("div_online").innerHTML=xHttp2.responseText;
if(xHttp2.responseText=="")
{
window.close();
} 
}
} 
 
xHttp2.send(null);

window.setTimeout("Inicializace()", 5000);
}


function PosuvnyObjekt(id,y,x)
{
 window.document.getElementById(id).style.posBottom = -window.document.body.scrollTop+y;
 window.document.getElementById(id).style.posLeft = window.document.body.scrollLeft+x;
}

function PosuvnyObjekt2(id,y,x)
{
 window.document.getElementById(id).style.posTop = window.document.body.scrollTop+y;
 window.document.getElementById(id).style.posLeft = window.document.body.scrollLeft+x;
}

function video(video)
{
var s1 = new SWFObject("player-viral.swf","ply","500","400","9","#804000");
 	  s1.addParam("allowfullscreen","true");
	  s1.addVariable('displayheight','1000');
		s1.addVariable('frontcolor','0x000000');
    s1.addVariable('backcolor','0x804000');
    s1.addVariable('lightcolor','0x666666');
	  s1.addVariable('screencolor','0x804000');
    s1.addVariable('displayheight','500');
		s1.addParam("allownetworking","all");
		s1.addParam("allowscriptaccess","always");
		s1.addVariable('file',video);    
		s1.addVariable('image','http://usr.bandzone.cz/band/an/analnivytok/gallery/profile.default/354864.jpg');
		s1.addVariable('logo','');
		s1.addVariable('autostart','true');
		s1.write("container");
}

function maxarea(id,id2,cislo,cislo2)
{
 area = document.getElementById(id);
 alength = area.value.length;
 window.document.getElementById(id2).innerHTML="Znaků : " + cislo + " / " + alength;
 
 if(alength > cislo){
		area.value = area.value.substr(0,cislo);
		document.getElementById(id2).innerHTML="max";
	} else {
		document.getElementById(id2).innerHTML="Znaků : " + cislo + " / " + alength;
	}
}

function mail_vse(form)
{
for(var i = 0; i < document.getElementById(form).elements.length; i++) {
    if(document.getElementById(form).elements[i].type == "checkbox")
      document.getElementById(form).elements[i].checked = true;
  }
}

function mail_nic(form)
{
for(var i = 0; i < document.getElementById(form).elements.length; i++) {
    if(document.getElementById(form).elements[i].type == "checkbox")
      document.getElementById(form).elements[i].checked = false;
  }
}

function mail_prehodit(form)
{
for(var i = 0; i < document.getElementById(form).elements.length; i++) {
    if(document.getElementById(form).elements[i].type == "checkbox" && document.getElementById(form).elements[i].checked==true)
      document.getElementById(form).elements[i].checked = false;
    else
      document.getElementById(form).elements[i].checked = true;
  }
}

function mail_prectene(form)
{
for(var i = 0; i < document.getElementById(form).elements.length; i++)
{
 if(document.getElementById(form).elements[i].id>0)
  document.getElementById(form).elements[i].checked = true;
}
}

function teleport()
{
xHttptel1 = vytvorxmlhttp();
xHttptel1.open("GET", 'teleport1.php', true); 
xHttptel1.onreadystatechange = function()
{ 
if (xHttptel1.readyState == 4 && xHttptel1.status == 200) 
{
window.document.getElementById("teleport1").innerHTML=xHttptel1.responseText;
if(xHttptel1.responseText=="Dokončený teleport")
window.location.reload(); 
}
} 
 
xHttptel1.send(null);

window.setTimeout("teleport()", 1000);
}

function vyzkum1()
{
xHttpv1 = vytvorxmlhttp();
xHttpv1.open("GET", 'vyzkum1.php', true); 
xHttpv1.onreadystatechange = function()
{ 
if (xHttpv1.readyState == 4 && xHttpv1.status == 200) 
{
window.document.getElementById("vyzkum1").innerHTML=xHttpv1.responseText;
if(xHttpv1.responseText=="Dokončený výzkum")
window.location.reload(); 
}
} 
 
xHttpv1.send(null);

window.setTimeout("vyzkum1()", 1000);
}

function vyzkum2()
{
xHttpv2 = vytvorxmlhttp();
xHttpv2.open("GET", 'vyzkum2.php', true); 
xHttpv2.onreadystatechange = function()
{ 
if (xHttpv2.readyState == 4 && xHttpv2.status == 200) 
{
window.document.getElementById("vyzkum2").innerHTML=xHttpv2.responseText;
if(xHttpv2.responseText=="Dokončený výzkum")
window.location.reload(); 
}
} 
 
xHttpv2.send(null);

window.setTimeout("vyzkum2()", 1000);
}

function parcela1()
{
xHttp = vytvorxmlhttp();
xHttp.open("GET", 'parcela1.php', true); 
xHttp.onreadystatechange = function()
{ 
if (xHttp.readyState == 4 && xHttp.status == 200) 
{
window.document.getElementById("parcela1").innerHTML=xHttp.responseText;
if(xHttp1.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
 
xHttp.send(null);

window.setTimeout("parcela1()", 1000);
}

function parcela2()
{
xHttp2 = vytvorxmlhttp();
xHttp2.open("GET", 'parcela2.php', true); 
xHttp2.onreadystatechange = function()
{ 
if (xHttp2.readyState == 4 && xHttp2.status == 200) 
{
window.document.getElementById("parcela2").innerHTML=xHttp2.responseText;
if(xHttp2.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
 
xHttp2.send(null);

window.setTimeout("parcela2()", 1000);
}

function parcela3()
{
xHttp3 = vytvorxmlhttp();
xHttp3.open("GET", 'parcela3.php', true); 
xHttp3.onreadystatechange = function()
{ 
if (xHttp3.readyState == 4 && xHttp3.status == 200) 
{
window.document.getElementById("parcela3").innerHTML=xHttp3.responseText;
if(xHttp3.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp3.send(null);

window.setTimeout("parcela3()", 1000);
}

function parcela4()
{
xHttp4 = vytvorxmlhttp();
xHttp4.open("GET", 'parcela4.php', true); 
xHttp4.onreadystatechange = function()
{ 
if (xHttp4.readyState == 4 && xHttp4.status == 200) 
{
window.document.getElementById("parcela4").innerHTML=xHttp4.responseText;
if(xHttp4.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp4.send(null);

window.setTimeout("parcela4()", 1000);
}

function parcela5()
{
xHttp5 = vytvorxmlhttp();
xHttp5.open("GET", 'parcela5.php', true); 
xHttp5.onreadystatechange = function()
{ 
if (xHttp5.readyState == 4 && xHttp5.status == 200) 
{
window.document.getElementById("parcela5").innerHTML=xHttp5.responseText;
if(xHttp5.responseText=="Dokončená budova")
window.location.reload();
}
} 
xHttp5.send(null);

window.setTimeout("parcela5()", 1000);
}

function parcela6()
{
xHttp6 = vytvorxmlhttp();
xHttp6.open("GET", 'parcela6.php', true); 
xHttp6.onreadystatechange = function()
{ 
if (xHttp6.readyState == 4 && xHttp6.status == 200) 
{
window.document.getElementById("parcela6").innerHTML=xHttp6.responseText;
if(xHttp6.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp6.send(null);

window.setTimeout("parcela6()", 1000);
}

function parcela7()
{
xHttp7 = vytvorxmlhttp();
xHttp7.open("GET", 'parcela7.php', true); 
xHttp7.onreadystatechange = function()
{ 
if (xHttp7.readyState == 4 && xHttp7.status == 200) 
{
window.document.getElementById("parcela7").innerHTML=xHttp7.responseText;
if(xHttp7.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp7.send(null);

window.setTimeout("parcela7()", 1000);
}

function parcela8()
{
xHttp8 = vytvorxmlhttp();
xHttp8.open("GET", 'parcela8.php', true); 
xHttp8.onreadystatechange = function()
{ 
if (xHttp8.readyState == 4 && xHttp8.status == 200) 
{
window.document.getElementById("parcela8").innerHTML=xHttp8.responseText;
if(xHttp8.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp8.send(null);

window.setTimeout("parcela8()", 1000);
}

function parcela9()
{
xHttp9 = vytvorxmlhttp();
xHttp9.open("GET", 'parcela9.php', true); 
xHttp9.onreadystatechange = function()
{ 
if (xHttp9.readyState == 4 && xHttp9.status == 200) 
{
window.document.getElementById("parcela9").innerHTML=xHttp9.responseText;
if(xHttp9.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp9.send(null);

window.setTimeout("parcela9()", 1000);
}

function parcela10()
{
xHttp10 = vytvorxmlhttp();
xHttp10.open("GET", 'parcela10.php', true); 
xHttp10.onreadystatechange = function()
{ 
if (xHttp10.readyState == 4 && xHttp10.status == 200) 
{
window.document.getElementById("parcela10").innerHTML=xHttp10.responseText;
if(xHttp10.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp10.send(null);

window.setTimeout("parcela10()", 1000);
}

function parcela11()
{
xHttp11 = vytvorxmlhttp();
xHttp11.open("GET", 'parcela11.php', true); 
xHttp11.onreadystatechange = function()
{ 
if (xHttp11.readyState == 4 && xHttp11.status == 200) 
{
window.document.getElementById("parcela11").innerHTML=xHttp11.responseText;
if(xHttp11.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp11.send(null);

window.setTimeout("parcela11()", 1000);
}

function parcela12()
{
xHttp12 = vytvorxmlhttp();
xHttp12.open("GET", 'parcela12.php', true); 
xHttp12.onreadystatechange = function()
{ 
if (xHttp12.readyState == 4 && xHttp12.status == 200) 
{
window.document.getElementById("parcela12").innerHTML=xHttp12.responseText;
if(xHttp12.responseText=="Dokončená budova")
window.location.reload(); 
}
} 
xHttp12.send(null);

window.setTimeout("parcela12()", 1000);
}

function tezba1()
{
xHttpt1 = vytvorxmlhttp();
xHttpt1.open("GET", 'tezba1.php', true); 
xHttpt1.onreadystatechange = function()
{ 
if (xHttpt1.readyState == 4 && xHttpt1.status == 200) 
{
window.document.getElementById("tezba1").innerHTML=xHttpt1.responseText; 
}
} 
xHttpt1.send(null);

window.setTimeout("tezba1()", 1000);
}

function tezba2()
{
xHttpt2 = vytvorxmlhttp();
xHttpt2.open("GET", 'tezba2.php', true); 
xHttpt2.onreadystatechange = function()
{ 
if (xHttpt2.readyState == 4 && xHttpt2.status == 200) 
{
window.document.getElementById("tezba2").innerHTML=xHttpt2.responseText; 
}
} 
xHttpt2.send(null);

window.setTimeout("tezba2()", 1000);
}

function tezba3()
{
xHttpt3 = vytvorxmlhttp();
xHttpt3.open("GET", 'tezba3.php', true); 
xHttpt3.onreadystatechange = function()
{ 
if (xHttpt3.readyState == 4 && xHttpt3.status == 200) 
{
window.document.getElementById("tezba3").innerHTML=xHttpt3.responseText; 
}
} 
xHttpt3.send(null);

window.setTimeout("tezba3()", 1000);
}

function tezba4()
{
xHttpt4 = vytvorxmlhttp();
xHttpt4.open("GET", 'tezba4.php', true); 
xHttpt4.onreadystatechange = function()
{ 
if (xHttpt4.readyState == 4 && xHttpt4.status == 200) 
{
window.document.getElementById("tezba4").innerHTML=xHttpt4.responseText; 
}
} 
xHttpt4.send(null);

window.setTimeout("tezba4()", 1000);
}

function energie()
{
xHttpe = vytvorxmlhttp();
xHttpe.open("GET", 'energie.php', true); 
xHttpe.onreadystatechange = function()
{ 
if (xHttpe.readyState == 4 && xHttpe.status == 200) 
{
window.document.getElementById("energie").innerHTML=xHttpe.responseText; 
}
} 
xHttpe.send(null);

window.setTimeout("energie()", 1000);
}

function obyvatel()
{
xHttpo = vytvorxmlhttp();
xHttpo.open("GET", 'obyvatel.php', true); 
xHttpo.onreadystatechange = function()
{ 
if (xHttpo.readyState == 4 && xHttpo.status == 200) 
{
window.document.getElementById("obyvatel").innerHTML=xHttpo.responseText; 
}
} 
xHttpo.send(null);

window.setTimeout("obyvatel()", 1000);
}

function kapacita1()
{
xHttpk1 = vytvorxmlhttp();
xHttpk1.open("GET", 'kapacita1.php', true); 
xHttpk1.onreadystatechange = function()
{ 
if (xHttpk1.readyState == 4 && xHttpk1.status == 200) 
{
window.document.getElementById("kapacita1").innerHTML=xHttpk1.responseText; 
}
} 
xHttpk1.send(null);

window.setTimeout("kapacita1()", 1000);
}

function kapacita2()
{
xHttpk2 = vytvorxmlhttp();
xHttpk2.open("GET", 'kapacita2.php', true); 
xHttpk2.onreadystatechange = function()
{ 
if (xHttpk2.readyState == 4 && xHttpk2.status == 200) 
{
window.document.getElementById("kapacita2").innerHTML=xHttpk2.responseText; 
}
} 
xHttpk2.send(null);

window.setTimeout("kapacita2()", 1000);
}

function kapacita3()
{
xHttpk3 = vytvorxmlhttp();
xHttpk3.open("GET", 'kapacita3.php', true); 
xHttpk3.onreadystatechange = function()
{ 
if (xHttpk3.readyState == 4 && xHttpk3.status == 200) 
{
window.document.getElementById("kapacita3").innerHTML=xHttpk3.responseText; 
}
} 
xHttpk3.send(null);

window.setTimeout("kapacita3()", 1000);
}

function kapacita4()
{
xHttpk4 = vytvorxmlhttp();
xHttpk4.open("GET", 'kapacita4.php', true); 
xHttpk4.onreadystatechange = function()
{ 
if (xHttpk4.readyState == 4 && xHttpk4.status == 200) 
{
window.document.getElementById("kapacita4").innerHTML=xHttpk4.responseText; 
}
} 
xHttpk4.send(null);

window.setTimeout("kapacita4()", 1000);
}

function urovenvyzkum1()
{
xHttpuv1 = vytvorxmlhttp();
xHttpuv1.open("GET", 'urovenvyzkum1.php', true); 
xHttpuv1.onreadystatechange = function()
{ 
if (xHttpuv1.readyState == 4 && xHttpuv1.status == 200) 
{
window.document.getElementById("urovenvyzkum1").innerHTML=xHttpuv1.responseText; 
}
} 
xHttpuv1.send(null);

window.setTimeout("urovenvyzkum1()", 1000);
}

function urovenvyzkum2()
{
xHttpuv2 = vytvorxmlhttp();
xHttpuv2.open("GET", 'urovenvyzkum2.php', true); 
xHttpuv2.onreadystatechange = function()
{ 
if (xHttpuv2.readyState == 4 && xHttpuv2.status == 200) 
{
window.document.getElementById("urovenvyzkum2").innerHTML=xHttpuv2.responseText; 
}
} 
xHttpuv2.send(null);

window.setTimeout("urovenvyzkum2()", 1000);
}

function uroven1()
{
xHttpu1 = vytvorxmlhttp();
xHttpu1.open("GET", 'uroven1.php', true); 
xHttpu1.onreadystatechange = function()
{ 
if (xHttpu1.readyState == 4 && xHttpu1.status == 200) 
{
window.document.getElementById("uroven1").innerHTML=xHttpu1.responseText; 
}
} 
xHttpu1.send(null);

window.setTimeout("uroven1()", 1000);
}

function uroven2()
{
xHttpu2 = vytvorxmlhttp();
xHttpu2.open("GET", 'uroven2.php', true); 
xHttpu2.onreadystatechange = function()
{ 
if (xHttpu2.readyState == 4 && xHttpu2.status == 200) 
{
window.document.getElementById("uroven2").innerHTML=xHttpu2.responseText; 
}
} 
xHttpu2.send(null);

window.setTimeout("uroven2()", 1000);
}

function uroven3()
{
xHttpu3 = vytvorxmlhttp();
xHttpu3.open("GET", 'uroven3.php', true); 
xHttpu3.onreadystatechange = function()
{ 
if (xHttpu3.readyState == 4 && xHttpu3.status == 200) 
{
window.document.getElementById("uroven3").innerHTML=xHttpu3.responseText; 
}
} 
xHttpu3.send(null);

window.setTimeout("uroven3()", 1000);
}

function uroven4()
{
xHttpu4 = vytvorxmlhttp();
xHttpu4.open("GET", 'uroven4.php', true); 
xHttpu4.onreadystatechange = function()
{ 
if (xHttpu4.readyState == 4 && xHttpu4.status == 200) 
{
window.document.getElementById("uroven4").innerHTML=xHttpu4.responseText; 
}
} 
xHttpu4.send(null);

window.setTimeout("uroven4()", 1000);
}

function uroven5()
{
xHttpu5 = vytvorxmlhttp();
xHttpu5.open("GET", 'uroven5.php', true); 
xHttpu5.onreadystatechange = function()
{ 
if (xHttpu5.readyState == 4 && xHttpu5.status == 200) 
{
window.document.getElementById("uroven5").innerHTML=xHttpu5.responseText; 
}
} 
xHttpu5.send(null);

window.setTimeout("uroven5()", 1000);
}

function uroven6()
{
xHttpu6 = vytvorxmlhttp();
xHttpu6.open("GET", 'uroven6.php', true); 
xHttpu6.onreadystatechange = function()
{ 
if (xHttpu6.readyState == 4 && xHttpu6.status == 200) 
{
window.document.getElementById("uroven6").innerHTML=xHttpu6.responseText; 
}
} 
xHttpu6.send(null);

window.setTimeout("uroven6()", 1000);
}

function uroven7()
{
xHttpu7 = vytvorxmlhttp();
xHttpu7.open("GET", 'uroven7.php', true); 
xHttpu7.onreadystatechange = function()
{ 
if (xHttpu7.readyState == 4 && xHttpu7.status == 200) 
{
window.document.getElementById("uroven7").innerHTML=xHttpu7.responseText; 
}
} 
xHttpu7.send(null);

window.setTimeout("uroven7()", 1000);
}

function uroven8()
{
xHttpu8 = vytvorxmlhttp();
xHttpu8.open("GET", 'uroven8.php', true); 
xHttpu8.onreadystatechange = function()
{ 
if (xHttpu8.readyState == 4 && xHttpu8.status == 200) 
{
window.document.getElementById("uroven8").innerHTML=xHttpu8.responseText; 
}
} 
xHttpu8.send(null);

window.setTimeout("uroven8()", 1000);
}

function uroven9()
{
xHttpu9 = vytvorxmlhttp();
xHttpu9.open("GET", 'uroven9.php', true); 
xHttpu9.onreadystatechange = function()
{ 
if (xHttpu9.readyState == 4 && xHttpu9.status == 200) 
{
window.document.getElementById("uroven9").innerHTML=xHttpu9.responseText; 
}
} 
xHttpu9.send(null);

window.setTimeout("uroven9()", 1000);
}

function uroven10()
{
xHttpu10 = vytvorxmlhttp();
xHttpu10.open("GET", 'uroven10.php', true); 
xHttpu10.onreadystatechange = function()
{ 
if (xHttpu10.readyState == 4 && xHttpu10.status == 200) 
{
window.document.getElementById("uroven10").innerHTML=xHttpu10.responseText; 
}
} 
xHttpu10.send(null);

window.setTimeout("uroven10()", 1000);
}

function uroven11()
{
xHttpu11 = vytvorxmlhttp();
xHttpu11.open("GET", 'uroven11.php', true); 
xHttpu11.onreadystatechange = function()
{ 
if (xHttpu11.readyState == 4 && xHttpu11.status == 200) 
{
window.document.getElementById("uroven11").innerHTML=xHttpu11.responseText; 
}
} 
xHttpu11.send(null);

window.setTimeout("uroven11()", 1000);
}

function uroven12()
{
xHttpu12 = vytvorxmlhttp();
xHttpu12.open("GET", 'uroven12.php', true); 
xHttpu12.onreadystatechange = function()
{ 
if (xHttpu12.readyState == 4 && xHttpu12.status == 200) 
{
window.document.getElementById("uroven12").innerHTML=xHttpu12.responseText; 
}
} 
xHttpu12.send(null);

window.setTimeout("uroven12()", 1000);
}

function suroviny1()
{
xHttps1 = vytvorxmlhttp();
xHttps1.open("GET", 'suroviny1.php', true); 
xHttps1.onreadystatechange = function()
{ 
if (xHttps1.readyState == 4 && xHttps1.status == 200) 
{
window.document.getElementById("suroviny1").innerHTML=xHttps1.responseText; 
}
} 
xHttps1.send(null);

window.setTimeout("suroviny1()", 1000);
}

function suroviny2()
{
xHttps2 = vytvorxmlhttp();
xHttps2.open("GET", 'suroviny2.php', true); 
xHttps2.onreadystatechange = function()
{ 
if (xHttps2.readyState == 4 && xHttps2.status == 200) 
{
window.document.getElementById("suroviny2").innerHTML=xHttps2.responseText; 
}
} 
xHttps2.send(null);

window.setTimeout("suroviny2()", 1000);
}

function suroviny3()
{
xHttps3 = vytvorxmlhttp();
xHttps3.open("GET", 'suroviny3.php', true); 
xHttps3.onreadystatechange = function()
{ 
if (xHttps3.readyState == 4 && xHttps3.status == 200) 
{
window.document.getElementById("suroviny3").innerHTML=xHttps3.responseText; 
}
} 
xHttps3.send(null);

window.setTimeout("suroviny3()", 1000);
}

function suroviny4()
{
xHttps4 = vytvorxmlhttp();
xHttps4.open("GET", 'suroviny4.php', true); 
xHttps4.onreadystatechange = function()
{ 
if (xHttps4.readyState == 4 && xHttps4.status == 200) 
{
window.document.getElementById("suroviny4").innerHTML=xHttps4.responseText; 
}
} 
xHttps4.send(null);

window.setTimeout("suroviny4()", 1000);
}

window.document.onmousemove=xy;

window.document.onmousemove=xy;