function switch_tab (link_id) {
	var id = link_id.slice(link_id.indexOf("l_")+2);
	alert(id);
  }

function switch_zakusky () {
  if (document.getElementById('b_torty').style.display=="none") { return true; }
  else {
    document.getElementById('b_torty').style.display="none";
    document.getElementById('b_zakusky').style.display="block";
    document.getElementById('l_torty').className="button";
    document.getElementById('l_zakusky').className="button active";
    return false;
    }
}
function switch_torty () {
  if (document.getElementById('b_zakusky').style.display=="none") { return true; }
  else {
    document.getElementById('b_torty').style.display="block";
    document.getElementById('b_zakusky').style.display="none";
    document.getElementById('l_torty').className="button active";
    document.getElementById('l_zakusky').className="button";
    return false;
    }
}    

//alert ("abc");
//alert(.length);
//var links = document.getElementById('thumbs_home').getElementsByTagName('a');
//var boxes = document.getElementById('thumbs_home').getElementsByTagName('div');

/*.onMouseOver = function () {
  switch_tab(this.id);
  return false;
}*/

function potvrdit (text) {
  return confirm(text);
  }

function show_hide_images () {
  var images = document.getElementsByTagName('img');
  //alert(images.length);
  for (i=0;1<images.length;i++) {
    if (images[i].className=="i") {
      images[i].style.display="block";
      }
    }
  }
// Fader 
function colorFade(B,H,C,F,M,E){var I,A,O,G,K,D,N,L,P,D;var J=document.getElementById(B);M=M||20;E=E||20;clearInterval(J.timer);A=colorConv(F);O=A[0];G=A[1];K=A[2];if(!J.r){I=colorConv(C);r=I[0];g=I[1];b=I[2];J.r=r;J.g=g;J.b=b}N=Math.round(Math.abs(J.r-O)/M);L=Math.round(Math.abs(J.g-G)/M);P=Math.round(Math.abs(J.b-K)/M);if(N==0){N=1}if(L==0){L=1}if(P==0){P=1}J.step=1;J.timer=setInterval(function(){animateColor(B,H,M,O,G,K,N,L,P)},E)}function animateColor(B,E,K,M,D,H,L,I,N){var G=document.getElementById(B);var C;if(G.step<=K){var A=G.r;var F=G.g;var J=G.b;if(A>=M){A=A-L}else{A=parseInt(A)+parseInt(L)}if(F>=D){F=F-I}else{F=parseInt(F)+parseInt(I)}if(J>=H){J=J-N}else{J=parseInt(J)+parseInt(N)}C="rgb("+A+","+F+","+J+")";if(E=="background"){G.style.backgroundColor=C}else{if(E=="border"){G.style.borderColor=C}else{G.style.color=C}}G.r=A;G.g=F;G.b=J;G.step=G.step+1}else{clearInterval(G.timer);C="rgb("+M+","+D+","+H+")";if(E=="background"){G.style.backgroundColor=C}else{if(E=="border"){G.style.borderColor=C}else{G.style.color=C}}}}function colorConv(A){var B=[parseInt(A.substring(0,2),16),parseInt(A.substring(2,4),16),parseInt(A.substring(4,6),16)];return B};