
  var mailwin = null;

//Open een nieuw browserwindow met mailwin.htm
  function MailWindow(){
    mailwin = window.open('vraag.html','Stuur_een_bericht', 'width=360, height=320, resizable=1, menubar=1, scrollbars=1, top=30, left=30')
    self.name = 'defret'
  }//MailWindow

//Dit verzend een mail naar het opgegeven adres op het frettiggestoord domein.
  function MailTo(adres, subject){
    location = "mailto:" + adres + "@" + "wanadoo.nl?subject=" + subject;
  }//Mailto

//Schrijf de datum dat het document voor het laatst is bewerkt in het document
  function writeLastModify(){

        lastModDate = new Date(document.lastModified)
        lastModMonth = lastModDate.getMonth() + 1
        lastModDay = lastModDate.getDate()
        lastModYear = lastModDate.getYear()
        if (lastModYear < 9){
           lastModYear= (lastModYear + 2000)}

        document.write('Laatste wijziging: ');
        document.write(lastModDay + " - " + lastModMonth + " - " + lastModYear)
        document.write('<br />');
        document.write('©2000-2005 <a href="javascript:MailTo(\'de.fret\',\'Website\')">F.Reijsbergen</a><br />');
  }//writeLastModify


//Kijk of er een Cookie Mok bestaat, als dat niet het geval is
//plaats dan een Cookie Mok en laat geluidhoren
  function MokMok(){
    if (GetCookie("Mok") == null){
        SetCookie("Mok","MokMok",null, "/",null,false);
        document.write("<embed SRC='media/listen.wav' height='0' autostart='true' volume='100%' hidden />")}
  }//MokMok

//Functies voor het lezen en schrijven van Cookies
  function getCookieVal (offset){
        var endstr = document.cookie.indexOf (";", offset);
                if (endstr == -1)
                        endstr = document.cookie.length;
                return unescape(document.cookie.substring(offset, endstr));
  }//getCookieVal

  function GetCookie (name){
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen){
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg)
                        return getCookieVal (j);
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0)
                        break;}
        return null;
  }//GetCookie

  function SetCookie (name, value){
        var argv = SetCookie.arguments;
        var argc = SetCookie.arguments.length;
        var expires = (2 < argc) ? argv[2] : null;
        var path = (3 < argc) ? argv[3] : null;
        var domain = (4 < argc) ? argv[4] : null;
        var secure = (5 < argc) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) +
     ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
  }//SetCookie