 
function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}

function winW() {
   if (window.innerWidth)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerWidth;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientWidth;
   else if
   (document.body && document.body.clientWidth)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientWidth;
   else
      return null;
}

window.onresize = topmargin;
window.onresize = detailtxt;


function detailtxt() {

  // detail sekce texty
popisall = document.getElementById('det_sek_popis_in').offsetHeight;


if(popisall>230) {
  newsifr  = 428 - popisall;
  newpopis = popisall;
  if(newsifr<=130) {
  newsifr = 123;
  newpopis = 305;
  }
  document.getElementById('det_sek_sifr').style.height = newsifr+"px";
  document.getElementById('det_sek_popis').style.height = newpopis+"px";
}
}

function topmargin() {
  okno = winH();
  sirka = winW();
  idbody = document.getElementById('body').offsetHeight;
  
  var vyska;

  
  if(okno>idbody ) { vyska=okno-idbody; 
vyska = vyska/2;
vyska = vyska-7;
 } 





  if(okno<=idbody ) vyska=0;

mill = 30+vyska ;
mill = mill+"px";


topmenu = 30+vyska ;
topmenu = topmenu+"px";

h1hp = 85+vyska ;
h1hp = h1hp+"px";

all4 = 57+vyska ;
all4 = all4+"px";

closehp = 150+vyska ;
closehp = closehp+"px";


vyska = vyska+"px";
 
document.getElementById('topmargin007').style.height = vyska;

if(navigator.appName=="Opera") { 
    document.getElementById('topmargin007').style.height = 0; 
    document.getElementById('topmargin007').style.marginTop = vyska; 
    }
document.getElementById('mill007').style.top = mill;
if(document.getElementById('h1sekce')) { document.getElementById('h1sekce').style.top = mill; }
document.getElementById('topmenu007').style.top = topmenu;

detailtxt();
nahledy();

document.getElementById('closehp').style.top = closehp;




}

 
function imgsrc(kde6,cesta6,w,h) {
            document.getElementById(kde6).src= cesta6;           
           if(w==h){w=500;h=w;}
           if(w<h){w=(500/h)*w;h=500;}
            if(w>h){h=(500/w)*h;w=500;}
            document.getElementById(kde6).style.height = h+"px";
            document.getElementById(kde6).style.width = w+"px";
               
 }
  

function nahledy() {

nahledy = document.getElementById("nahledy").firstChild.nodeValue;
    if(nahledy == "Nahledy") {
      vyskaimgs =  document.getElementById('delkanahledu').offsetHeight;
      
      if(vyskaimgs<500) {posuv = 500 - vyskaimgs;
          
        document.getElementById('posuvnik').style.height = posuv+"px";
      } else {
     document.getElementById('posuvnik').style.height = 5+"px";
      
      }

    }
}


function more() {
  show('homepage');
  show('closehp');
  
}
function mene() {
  hide('homepage');
  hide('closehp');
  
}

    function show(showco) {
              document.getElementById(showco).style.display = "block";    
    }
        function showin(showco) {
              document.getElementById(showco).style.display = "inline";    
    }
    
    
    function hide(hideco) {
              document.getElementById(hideco).style.display = "none";    
    }
        function trida(kde_id,co_trida) {
              document.getElementById(kde_id).className = co_trida;  
    }
    
// homepage menic obrazku:



function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
} 
  
  