var bannerUrl=0;

main = function() {
  startList();
}
window.onload=main;

// Dropdown for IE 6

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("leftmenu");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace
	(" over", "");
   }
   }
  }
 }
}


// Form Colours

var search_input = document.getElementById("searchString");
  
  search_input.onfocus = function() {
      this.className = "over";
	  if (this.value=='vyhµadaj...') this.value=''
  }
  
  search_input.onblur = function() {
      this.className = "";
	  if (this.value=='') this.value='vyhµadaj...'
  }
  
// Photo Show
function slideShow(a, isSlide) {
	hideSelects(0);
	
	wTop=document.all? (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop) : pageYOffset;	

	document.getElementById('slideshow').style.top=(wTop+30)+"px"
	document.getElementById('slide').style.display='block'
	if (isSlide==1) {
		document.getElementById('slideNavigation').style.display='block'
		slideMove(a);
	} else {
		document.getElementById('slideImg').style.display='none'
		document.getElementById('slideLoading').style.display='block'
		document.getElementById('slideNavigation').style.display='none'
		document.getElementById('slideImg').src=a
	}
}

function slideHide(a) {
	if (a==1 || !bannerUrl)  {
		document.getElementById('slide').style.display='none';
		hideSelects(1);
	} else if (bannerUrl) {
		document.location.href=bannerUrl;
	}
}

function slideMove(aa) {
	if (aa.length==0) aa=1;
	if (aa==1 || aa==-1) {
		slideShowCurrent=slideShowCurrent-(-aa)
		if (slideShowPhotos.length<=slideShowCurrent) {
			slideShowCurrent=0;
		}
		if (slideShowCurrent<0) {
			slideShowCurrent=slideShowPhotos.length-1;
		}
	} else {
		for (var t in slideShowPhotos) {
			if (slideShowPhotos[t][0]==aa) {
				slideShowCurrent=t
			}
		}
	}
	document.getElementById('slideImg').style.display='none'
	document.getElementById('slideLoading').style.display='block'
	document.getElementById('slideImg').src=slideShowPhotos[slideShowCurrent][0]
}


function slideLoaded() {
	document.getElementById('slideLoading').style.display='none'
	document.getElementById('slideImg').style.display='block'
}

function hideSelects(a) {
	if (document.getElementById) {
		var tags = ['select', 'iframe', 'object'];
		for (var t in tags) {
			var elms = document.getElementsByTagName(tags[t]);
			for (var e = 0; e < elms.length; e++) {
				elms[e].style.visibility = a ? 'visible' : 'hidden';
			}
		}
	}
}

