function PopUp(URL, w, h)
	{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + w + ',height=' + h);");
	}

var Open = ""
var Closed = ""

function preload(){
	if(document.images){
		Open = new Image(20,7)    
		Closed = new Image(20,7)
		Open.src = "images/algemeen/pijlover.gif"
		Closed.src = "images/algemeen/pijl.gif"
	}
}


	
function PopUpWindow(URL, w, h)
	{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + w + ',height=' + h);");
	}


function PopUpScroll(URL, w, h)
	{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + w + ',height=' + h);");
	}

function OpenWindow(URL, w, h)
	{
	w = window.open(URL, '', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1 width=' + w + ',height=' + h);
	}

function validate_inruil() {
  validity = true; 
  if (!check_empty(document.form.kenteken.value))
        { validity = false; alert('U heeft geen kenteken ingevuld!'); }
	else if (!check_empty(document.form.kmstand.value))
        { validity = false; alert('U heeft geen kilometerstand ingevuld!'); }
	else if (!check_empty(document.form.naam.value))
        { validity = false; alert('U heeft geen naam ingevuld!'); }
	else if (!check_email(document.form.email.value))
        { validity = false; alert('Het E-mail adres is ongeldig!'); }
	else if (!check_empty(document.form.telefoon.value))
        { validity = false; alert('U heeft geen telefoonnr ingevuld!'); }
	return validity;
}

function validate_form() {
  validity = true; 
  if (!check_empty(document.form.naam.value))
        { validity = false; alert('U heeft geen naam ingevuld!'); }
 
  if (!check_email(document.form.email.value))
        { validity = false; alert('Het E-mail adres is ongeldig!'); }
return validity;
}

function check_empty(text) {
  return (text.length > 0); // returns false if empty
}

function check_email(adres) {
  if ((adres == "")
    || (adres.indexOf ('@') == -1)
    || (adres.indexOf ('.') == -1))
      return false;
  return true;
}

function ShowFoto(fotoId, title) {
   w=window.open('','newwin','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=375');
   w.document.write('<html>');
   w.document.write('<head>');
   w.document.write('<title>'+title+'</title>');
   w.document.write('</head>');
   w.document.write('<body topmargin=0 leftmargin=0><img border=0 src=images/content/nieuws/fotos/zoom/'+fotoId+'.jpg width=500 height=375></body>');
   w.document.write('</html>');
   w.document.close();
}
