//Javascript function sendForm wordt gebruikt bij Contact formulier
function leesVoor(){
  page = window.location.href;
  window.location.href='http://asp.readspeaker.net/cgi-bin/rsxt?url='+page+'&customerid=39'
}

function sendForm() {
  if(document.frmContact.inpNaam.value == "")
  {
    alert("U dient uw naam in te vullen");
    document.frmContact.inpNaam.focus();
    return false;
  }
  if(document.frmContact.inpEmail.value == "" || (document.frmContact.inpEmail.value.indexOf('@') == -1 || document.frmContact.inpEmail.value.indexOf('.') == -1))
  {
    alert("U dient een correct e-mailadres in te vullen");
    document.frmContact.txtEmail.focus();
    return false;
  }    
    if(document.frmContact.inpOpmerking.value == "")
  {
    alert("U dient een vraag of opmerking in te vullen");
    document.frmContact.inpTelefoon.focus();
    return false;
  }  
  document.frmContact.submit()  
}
function initFonts()
{
  ua=navigator.userAgent;
  if (((ua.indexOf('IE 4') == -1) && (ua.indexOf('IE 5') == -1) && (ua.indexOf('Opera') == -1)) && ((ua.indexOf('compatible') == -1) && ((ua.indexOf('/4') == -1) && (ua.indexOf('/5') == -1))))
  {
    document.write('Sorry, your browser is too old to take advantage of this page');
  }

  var fontSize = getCookie("fontSize");
  var fontType = getCookie("fontType");

  for (i=0; (a = document.getElementsByTagName("link")[i]); i++)
  {
    if (a.getAttribute("title") == "fontSize")
    {
      if (fontSize != null)
      {
        a.setAttribute("href", fontSize);
      }
    }
    if (a.getAttribute("title") == "fontType")
    {
      if (fontType != null)
      {
        a.setAttribute("href", fontType);
      }
    }
  }
}

function SetCookie (name, value)
{      
  path='/';
  expires = new Date();
  expires.setTime(expires.getTime() + 50000);
  document.cookie = escape (name) + "=" + escape (value) + "; expires=" + expires.toGMTString() +"; path=" +path;
  location.reload();
}

function getCookie(name)
{
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1)
  {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  }
  else
  {
    begin += 2;
  }
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
  {
    end = dc.length;
  }
  return unescape(dc.substring(begin + prefix.length, end));
}
