function showMenu(object) {
 hideAll();
	show[object]=1;
	document.getElementById('dd_'+object).style.visibility='visible';
}
function hideMenu(object) {
 if (show[object]==0) {
  document.getElementById('dd_'+object).style.visibility='hidden';
 }
}

var show = new Array();
show['seek']=0;
show['believe']=0;
show['about']=0;

function hideAll() {
 show['seek']=0;
 show['believe']=0;
 show['about']=0;
 hideMenu('seek');
 hideMenu('believe');
 hideMenu('about');
}

function preHide(object) {
 show[object]=0;
 setTimeout("hideMenu('"+object+"')",1000);
}

var s=5;
var nextSlide=2;
var rotation="";
function loadSlides() {
 for (i=1;i<=s;i++)
  eval("slide"+i+" = new Image(); slide"+i+".src='/wp-content/themes/skeleton/img/pic-home-history-"+i+".jpg';");
 rotation=setTimeout("changeSlide()",2000);
}

function changeSlide() {
 if (eval("slide"+nextSlide+".src")) {
  document.getElementById("slides").style.backgroundImage="url("+eval("slide"+nextSlide+".src")+")";
  if (nextSlide<s) nextSlide++; else nextSlide=1;
 }
 rotation=setTimeout("changeSlide()",4000);
}

function stopStartSlideshow() {
	if (rotation!="") {
  clearTimeout(rotation);
		rotation="";
 } else {
  changeSlide();
 }
}