function changeImg(imgobj,imgfile){
  document.getElementById(''+imgobj+'').src=''+ imgfile +''	;
}

function openWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
  }
  
function swapimg(obj,newimg,act){
	x=document.getElementById(obj);
	if(!x.oSrc){
	x.oSrc=x.src;
	}
	if(act){
	  if(!document.swapact){
	    document.swapact=x;
	  }
	  else{
		ox=document.swapact;
		ox.src=ox.oSrc;
		document.swapact=x;
	  }
	}
	x.src=newimg;
  }
  
  function swapback(idname){
    obj=document.getElementById(idname);
    if(document.swapact!=obj){
	  obj.src=obj.oSrc;
	}
  }
  
  function setClass(idname,stylename){
	   obj=document.getElementById(idname);
	   obj.className=''+stylename+'';
  }
  
  function hidediv(id) {
    document.getElementById(''+ id +'').style.display = 'none';
}

function showdiv(id) {
    document.getElementById(''+ id +'').style.display = 'block';
}

function showhide(id){
  obj = document.getElementsByTagName("div");
  if(obj[id].style.display=='block'){
    hidediv(id);
  }
  else{
    showdiv(id);
  }
}

function menuover(num){
	
  if(document.actmenu){
    hidediv('menusub'+document.actmenu);
  }
  
  document.actmenu=num;
  showdiv('menusub'+num);
}
  
function menuout(){
  if(document.actmenu){
	hidediv('menusub'+document.actmenu);
  }
}


function showonlygroup(prefix,num){
  plen=prefix.length;
  obj = document.getElementsByTagName("div");
  for(c=0;c<obj.length;c++){
    if(obj[c].id.substr(0,plen)==prefix){
	  if(obj[c].id == ''+prefix +num+''){
		 showdiv(''+obj[c].id+'');
	  }
	  else{
		 hidediv(''+obj[c].id+'');   
	  }
	}
  }
}


function mainoverimg(id){
	document.getElementById('subimg'+id).src='images/arrow1.gif';
}
function mainoutimg(id){
	document.getElementById('subimg'+id).src='images/arrow.gif';
}


function suboverimg(id){
	document.getElementById('subimg'+id).src='images/arrow1.gif';
}
function suboutimg(id){
	document.getElementById('subimg'+id).src='images/arroww.gif';
}

function collexp(id){
  obj = document.getElementsByTagName("div");
  imgobj=document.getElementById(id);
  if(obj[id].style.display=='block'){
    hidediv(id);
	imgobj.src='images/arrow1.gif';
  }
  else{
    showdiv(id);
	imgobj.src='images/arrow3.gif';
  }
	  
}

function reqformcheck(theform){
  if(!validRequired(theform.achternaam,'naam'))
    return false;
  if(!validRequired(theform.voornaam,'voornaam'))
    return false;
  if(!validRequired(theform.telefoon,'telefoon'))
    return false;
  if(!validRequired(theform.adres,'adres'))
    return false;
  if(!validRequired(theform.postcode,'postcode'))
    return false;
  if(!validRequired(theform.woonplaats,'plaats'))
    return false;
  if(!validRequired(theform.email,'email'))
    return false;
	
  return true;
}
