
 
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 srovnej() {
  a = document.getElementById('left').offsetHeight;
b = document.getElementById('right').offsetHeight;
c = document.getElementById('content').offsetHeight;

if(a>=b && a>c) {vyska=a};
if(b>a  && b>c) {vyska=b};
if(b<=c  && a<=c) {vyska=c};

if(vyska-c>0) {vyska=vyska-c}
else {vyska=0}

vyska = vyska+"px";

document.getElementById('cesta007').style.marginTop = vyska;


}
function owncountry(co,kde) {
      if(co=="other") {
      showin(kde);
      } else {
      hide(kde);
      }  
}
function ownstate(co,kde) {
      if(co=="other") {
      showin(kde);
      } else {
      hide(kde);
      }
      
}

function taxa(subtotal,taxa) {
    taxa = taxa/100;
    oddelovac = '.';
    taxa = subtotal * taxa;
    taxa = Math.ceil(taxa);
    total = subtotal + taxa;
    
    taxa_s = taxa.toString() ;
     if(taxa>999) {taxa=taxa_s.substr(0, taxa_s.length-3)+oddelovac+taxa_s.substr(taxa_s.length-3, taxa_s.length);}
     else {taxa = taxa_s;}
    
    total_s = total.toString() ;
       if(total>999) {total=total_s.substr(0, total_s.length-3)+oddelovac+total_s.substr(total_s.length-3, total_s.length);}
     else {total = total_s;}
     document.getElementById('idtaxa').style.color = "#555";  
    value('$ '+taxa,'idtaxa');
     value('$ '+total,'idtotal');
}


 
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;




function topmargin() {




srovnej();









}
    
  function imgsrc(kde6,cesta6) {
  
        cesta6_s = cesta6.toString() ;
        if(cesta6_s.length>10) cast_cesta6_s=cesta6_s.substr(0, 10);
        if(cast_cesta6_s=="/index.php") {
           cesta6=cesta6_s.substr(10, cesta6_s.length)
           }  
          
  
           document.getElementById(kde6).src= cesta6; 
 }
  
function value(co4,kde4) {
             document.getElementById(kde4).firstChild.nodeValue = co4; 
    }  

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;  
    }
    
