function confirmdelete(pagina,woning) {
  if (confirm("Weet u zeker dat u deze woning wilt verwijderen?")) {
    window.location.href = "?id=" + pagina + "&del=" + woning;
  }
}

function check(theForm) {
  if (theForm.welkewoning.value=="") {
    alert("Kies een woning uit.");
    return false;
  }
  if (theForm.inschrijfnummer.value=="") {
    theForm.inschrijfnummer.focus();
    alert("Vul uw inschrijfnummer in.");
    return false;
  }
  if (theForm.naam.value=="") {
    theForm.naam.focus();
    alert("Vul uw naam in.");
    return false;
  }
  if (theForm.adres.value=="") {
    theForm.adres.focus();
    alert("Vul uw adres in.");
    return false;
  }
  if (theForm.postcode.value=="") {
    theForm.postcode.focus();
    alert("Vul uw postcode in.");
    return false;
  }
  if (theForm.woonplaats.value=="") {
    theForm.woonplaats.focus();
    alert("Vul uw woonplaats in.");
    return false;
  }
  if (theForm.telefoon.value=="") {
    theForm.telefoon.focus();
    alert("Vul uw telefoonnumer in.");
    return false;
  }
  if (theForm.email.value=="") {
    theForm.email.focus();
    alert("Vul uw email in.");
    return false;
  }
  return true;
}


function contactcheck(theForm) {
  if (theForm.naam.value=="") {
    theForm.naam.focus();
    alert("Vul uw naam in.");
    return false;
  }
  if (theForm.adres.value=="") {
    theForm.adres.focus();
    alert("Vul uw adres in.");
    return false;
  }
  if (theForm.postcode.value=="") {
    theForm.postcode.focus();
    alert("Vul uw postcode in.");
    return false;
  }
  if (theForm.woonplaats.value=="") {
    theForm.woonplaats.focus();
    alert("Vul uw woonplaats in.");
    return false;
  }
  if (theForm.telefoon.value=="") {
    theForm.telefoon.focus();
    alert("Vul uw telefoonnumer in.");
    return false;
  }
  if (theForm.email.value=="") {
    theForm.email.focus();
    alert("Vul uw email in.");
    return false;
  }
  return true;
}


  var cookie = getCookie("style");

  if(cookie != "") {
    changeStyle(cookie);
  }

function changeStyle(title) {
  var lnks = document.getElementsByTagName('link');
  for (var i = lnks.length - 1; i >= 0; i--) {
    if (lnks[i].getAttribute('rel').indexOf('style')> -1 && lnks[i].getAttribute('title')) {
      lnks[i].disabled = true;
      if (lnks[i].getAttribute('title') == title)
        lnks[i].disabled = false;
    }
      setCookie("style", title, 365);
  }
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    }
  }
return ""
}
