// JavaScript Document
function viewFoto(URL){
	var URL = URL;
	var Maxbreedte = screen.width - 50;
	var Maxhoogte = screen.height - 100;
	Nieuwscherm =window.open("../Pages/Foto_popup.php?Foto="+URL,"foto_up","toolbar=no,location=no,scrollbars=no,status=no,menubar=no,resizable=no,width="+Maxbreedte+"px,height="+Maxhoogte+"px");
	Nieuwscherm.focus();
}
function SizeFoto(){
	var VerhoudingOrigineel = eval(pic).width / eval(pic).height;
	var Maxbreedte = screen.width - 20;
	var Maxhoogte = screen.height - 20;
	
	if(Maxbreedte>900){
		Maxbreedte = 900;
	}

	if(Maxhoogte>600){
		Maxhoogte = 600;
	}
	
	if(Maxbreedte<eval(pic).width){
		eval(pic).width = Maxbreedte;
	}
	if(Maxhoogte<eval(pic).height){
		eval(pic).height = Maxhoogte;
		eval(pic).width = (Maxhoogte*VerhoudingOrigineel);
	}

	var PositieLinks = (screen.width-eval(pic).width+28)/2;
	var PositieBoven = (screen.height-eval(pic).height+100)/2;

	window.moveTo(PositieLinks, 0);
	window.resizeTo(eval(pic).width+28, eval(pic).height+130);
	window.moveTo(PositieLinks, 0);

}
function puldown(){
	if(document.getElementById("puldown").className == 'puldown_aan'){
		document.getElementById("puldown").className='puldown_uit';
		}
		else{
			document.getElementById("puldown").className='puldown_aan';
			}
	}

function NieuwsbriefControle(){
	var Foutmelding = '';
	submitOK='True';

	if (document.Nieuwsbrief.Email.value.length==0){
		document.Nieuwsbrief.Email.style.border = '1px solid #ff0000';
		submitOK='False';
	}
	else{
		document.Nieuwsbrief.Email.style.border = '1px solid #000000';
	}

	if (submitOK=='False'){
		alert('U dient een geldig e-mail adres in te vullen');
		return false;
	}
}

function StuurDoorControle(){
	var Foutmelding = '';
	submitOK='True';

	if (document.StuurDoorFormulier.Email.value.length==0){
		document.StuurDoorFormulier.Email.style.border = '1px solid #ff0000';
		submitOK='False';
	}
	else{
		document.StuurDoorFormulier.Email.style.border = '1px solid #000000';
	}

	if (submitOK=='False'){
		alert('U dient een geldig e-mail adres in te vullen');
		return false;
	}
}
