function start() {
  if (document.getElementById&&document.all) {
    navRoot = document.getElementById("nav");
    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($| )/, "");
        }
      }
    }
  }
  initBbcPopup();
}



function zetLi(a){
	b = document.getElementsByTagName('A')
	for (i=0;i<b.length;i++){
		if (b[i].title == 'Meer info'){
			b[i].className = '';
		}
	}
	a.className = 'active';
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
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", "");
   }
   }
  }
 }
}
window.onload=startList;


function checkVink(form){
   string = form.leveringsvoorwaarden.checked;
   if (!string) { 
      alert("Lees de leveringsvoorwaarden eerst!");
      form.leveringsvoorwaarden.select(); 
      return false;
   }
}

function checkForm()
{
   var canam, cvnam, cstraat, chuisnummer, cpostcode, cplaats, ctelefoon, cemail;
   with(window.document.msgform)
   {
      canam    		= achternaam;
	  cvnam	   	= voornaam;
	  cstraat  		= straat;
	  chuisnummer		= huisnummer;
	  cpostcode		= postcode;
	  cplaats		= plaats;
	  ctelefoon		= telefoonnummer;
	  cemail		= email;
   }

   if(trim(canam.value) == '')
   {
      alert('U bent vergeten uw achternaam in te vullen!');
      canam.focus();
      return false;
   }
   else if(trim(cvnam.value) == '')
   {
      alert('U bent vergeten uw voornaam in te vullen!');
      cvnam.focus();
      return false;
   }
   else if(trim(cstraat.value) == '')
   {
      alert('U bent vergeten de straat waar u woont in te vullen!');
      cstraat.focus();
      return false;
   }
   else if(trim(chuisnummer.value) == '')
   {
      alert('U bent vergeten uw huisnummer in te vullen!');
      chuisnummer.focus();
      return false;
   }
   else if(trim(cpostcode.value) == '')
   {
      alert('U bent vergeten uw postcode in te vullen!');
      cpostcode.focus();
      return false;
   }
   else if(trim(cplaats.value) == '')
   {
      alert('U bent vergeten uw woonplaats in te vullen!');
      cplaats.focus();
      return false;
   }
   else if(trim(ctelefoon.value) == '')
   {
      alert('U bent vergeten uw telefoonnummer in te vullen!');
      ctelefoon.focus();
      return false;
   }
   else if(trim(cemail.value) == '')
   {
      alert('Het opgegeven e-mailadres is niet geldig!');
      cemail.focus();
      return false;
   }
   else
   {
         canam.value    		= trim(canam.value);
	  cvnam.value    		= trim(cvnam.value);
	  cstraat.value		= trim(cstraat.value);
	  chuisnummer.value		= trim(chuisnummer.value);
	  cpostcode.value		= trim(cpostcode.value);
	  cplaats.value		= trim(cplaats.value);
	  ctelefoon.value		= trim(ctelefoon.value);
	  cemail.value		= trim(cemail.value);
	  return true;
   }
}

function trim(str)
{
   return str.replace(/^\s+|\s+$/g,'');
}

var pop;

function initBbcPopup() {
  pop = document.getElementById("bbcpopup");
  if(!pop)
    return;
  pop.style.position = "absolute";
  pop.style.left = "35%";
  pop.style.top = "40%";
  pop.style.display = "block";
  pop.style.zIndex = 1;
  pop.onclick = function() {
    pop.style.display = "none";
  }
}

var curimg=0
function rotateimages(){
document.getElementById("slideshow").setAttribute("src", "../gfx/slidehillegom/"+galleryarray[curimg])
curimg=(curimg<galleryarray.length-1)? curimg+1 : 0
}

function init(){
setInterval("rotateimages()", 2300)
}

function initAll(){
start();
init();
}

window.onload=initAll;
