
  function nlsubcheck(theform){
    if(!validRequired(theform.inlname,"Naam"))
	  return false;
    if(!validRequired(theform.inlemail,"Email"))
	  return false;
    if(!validEmail(theform.inlemail,"Email"))
	  return false;
	  
	return true;
  }

function close_popup_wrapper(){
	$('popup_wrapper').style.display = 'none'; 
}


function hidediv(id) {
   obj = document.getElementsByTagName("div");
   obj[id].style.display = 'none';
}

function showdiv(id) {
    obj = document.getElementsByTagName("div");
    obj[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);
  }
  showdiv('menusub'+num);
  document.actmenu=num;
}
  
function menuout(){
	if(document.actmenu){
		hidediv('menusub'+document.actmenu);
		//document.getElementById('menusub'+ document.actmenu).targetA=0;
	}
}

function subover(num){
	
  if(document.actsub){
    hidediv('menusubsub'+document.actsub);
  }
  
  document.actsub=num;
  showdiv('menusubsub'+num);
}
  
function subout(){
	if( document.actsub ){
		hidediv('menusubsub'+document.actsub);
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function close_album(){
	document.getElementById('photo-background').style.display = 'none';
	document.getElementById('photo-holder').style.display = 'none';
}

function show_photoalbum(album){
//	objs = document.getElementsByTagName('div');
//	
//	total_height = 0;
//	
//	if(parseInt(navigator.appVersion)>3){
//		if(navigator.appName=="Netscape"){
//			total_height = window.innerHeight;
//		}
//		if(navigator.appName.indexOf("Microsoft")!=-1){
//			total_height = screen.height;
//		}
//	}
//	
//	for(var i = 0; i < objs.length; i++){
//		objpos = findPos(objs[i]);
//		objheight = objs[i].offsetHeight;
//		subtotal_height = objpos[1] + objheight;
//		if(subtotal_height > total_height){
//			total_height = subtotal_height;
//		}
//	}
	
	//document.getElementById('photo-background').style.height = total_height + 'px';
	document.getElementById('photo-background').style.display = 'block';
	document.getElementById('photoholder').style.display = 'block';
	
	new Ajax.Updater('photoholder', '/photoalbum.php?album='+album+'', { method: 'get' });
}

function load_photo(album, photo){
	new Ajax.Updater('photoholder', '/photoalbum.php?album='+album+'&photo='+photo, { method: 'get' });
}
