
var CURMENU=0;
var position=0;

function moveimage1 () {
   
}

function startslideshow() {
  var cnt=1;
  var to=5000;
  var cto=-1000;

  document.slide.src='data/slideshow/' + SLIDEPICS[Math.floor(Math.random()*SLIDEPICS.length)];
  for (i=0; i < SLIDEPICS.length * 2; i++) {
    cto=cto + to;
    setTimeout("document.slide.src='data/slideshow/' + SLIDEPICS[Math.floor(Math.random()*SLIDEPICS.length)]", cto);
  }
}

function hideAll() {
  hidemenu1();
  hidemenu2();
  hidemenu3();
}

function showmenu1() {
  CURMENU=1;
  hideAll();
  toggle(S1A,'visible',1);
  setTimeout("toggle(S1B,'visible',1)", 100);
  setTimeout("toggle(S1C,'visible',1)", 200);
  setTimeout("toggle(S1D,'visible',1)", 300);
}
function hidemenu1() {
  toggle(S1A,'hidden',0);
  toggle(S1B,'hidden',0);
  toggle(S1C,'hidden',0);
  toggle(S1D,'hidden',0);
}

function showmenu2() {
  CURMENU=2;
  hideAll();
  toggle(S2A,'visible',2);
  setTimeout("toggle(S2B,'visible',2)", 100);
  setTimeout("toggle(S2C,'visible',2)", 200);
  setTimeout("toggle(S2D,'visible',2)", 300);
}
function hidemenu2() {
  toggle(S2A,'hidden',0);
  toggle(S2B,'hidden',0);
  toggle(S2C,'hidden',0);
  toggle(S2D,'hidden',0);
}

function showmenu3() {
  CURMENU=3;
  hideAll();
  toggle(S3A,'visible',3);
  setTimeout("toggle(S3B,'visible',3)", 100);
  setTimeout("toggle(S3C,'visible',3)", 200);
  setTimeout("toggle(S3D,'visible',3)", 300);
}
function hidemenu3() {
  toggle(S3A,'hidden',0);
  toggle(S3B,'hidden',0);
  toggle(S3C,'hidden',0);
  toggle(S3D,'hidden',0);
}

function toggle(me,visible,num) {
  if ((num == CURMENU) || num == 0) {
    me.style.visibility=visible;
  } 
}

function moveObjDown(obj,pos) {
  Vpos=obj.style.top;
  Vcur=parseInt(String(Vpos).substring(0, String(Vpos).length - 2)) + 2;
  obj.style.top=Vcur + "px";
  if(Vcur < pos) {
    window.setTimeout("moveObjDown("+obj.id+","+pos+");");
  }
}

function scroll_left(step) {
  position -= step;
  if (position < 0 - timeline.offsetWidth + 0)  {
      clearInterval(timer); // stop moving
      //timeline.style.left = position;
  }
  else
    {timeline.style.left = position;}
}

function scroll_right(step) {
  position += step;
  if (position > 0) {
      clearInterval(timer); // stop moving
      //timeline.style.left = position;
    }
  else
    {timeline.style.left = position;}
}

function doLeft() {
  timer = setInterval("scroll_right(2)", 10);
}

function doRight() {
  timer = setInterval("scroll_left(2)", 10);
}

function HideIMGs () {
  for (var i=0; i<IMGLIST.length; i++) {
    document.getElementById(IMGLIST[i]).style.visibility='hidden';
  }
}

function flash_nieuws () {
  flashy.style.zIndex='1';
  flashy.style.visibility='visible';
  document.flash.src='images/flashy.gif';
  window.setTimeout("flashy.style.visibility='hidden'", 1800);
  window.setTimeout("flashy.style.zIndex='1'", 1800);
}

function checkboekform () {
  if (document.boeking.naam.value == '') {
	alert ("Gelieve uw naam op te geven");
	return false;
  }
  if (document.boeking.datum.value == '') {
	alert ("Gelieve een datum op te geven voor het evenement");
	return false;
  }
  if (document.boeking.locatie.value == '') {
	alert ("Gelieve een locatie op te geven");
	return false;
  }
  apos=document.boeking.email.value.indexOf("@");
  dotpos=document.boeking.email.value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2) {
	alert("Ongedig e-mail adres");
	return false;
  }
  return true;
}

function checkticketsform () {
  if (document.tickets.name.value == '') {
        alert ("Gelieve een naam op te geven");
        return false;
  }
  apos=document.tickets.email.value.indexOf("@");
  dotpos=document.tickets.email.value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2) {
        alert("Ongedig e-mail adres");
        return false;
  }
  if (document.tickets.email.value != document.tickets.email2.value) {
	alert("De 2 opgegeven E-mail adressen zijn niet gelijk !!");
	return false;
  }
  return true;
}

