/*
  Written by Martin Hello.
  Copyright (c) 2002 Vendit BV
*/

var ie4 = (navigator.userAgent.indexOf("MSIE 4")!=-1) && (parseInt(navigator.appVersion) == 4);
var ie5 = (navigator.userAgent.indexOf("MSIE 5.0")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ie55 = (navigator.userAgent.indexOf("MSIE 5.5")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ie6 = (navigator.userAgent.indexOf("MSIE 6")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ie7 = (navigator.userAgent.indexOf("MSIE 7")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ie8 = (navigator.userAgent.indexOf("MSIE 8")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ns4 = (navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4);
ie55up = (ie55 || ie6 || ie7 || ie8)

var Company = "Vendit BV";
var lastmod = new Date(document.lastModified);

window.defaultStatus = "(c) " + lastmod.getFullYear() + " " + Company;
window.onerror = CancelError;
document.oncontextmenu = HandleRightClick;

if (document.layers) { 
  window.captureEvents(Event.MOUSEDOWN);
  window.onmousedown = HandleRightClick;
}

function ShowText(id, str) {
  if (ns4) {
    with (document[id].document) {
      open();
      write(str);
      close();
    }
  } else {
    id.innerHTML = str;
  }
}

function CancelError() {
  return true;
}

function HandleRightClick(e) {
  if (navigator.appName == "Netscape") {
    if (e.which == 2 || e.which == 3) {
      return false;
    } else {
      return true;
    }
  } else {
    if (event.ctrlKey) {
      return true;
    } else {
      return false;
    }
  }
  return false;
}

function SetCookie(name, value, expire) {
  document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function GetCookie(name) {
  var search = name + "="
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { 
      offset += search.length
      end = document.cookie.indexOf(";", offset)
      if (end == -1) {
        end = document.cookie.length
        return unescape(document.cookie.substring(offset, end))
      }
    }
  }
}

function ConfirmCookieReset() {
  return confirm("Deze actie zal uw zgn. cookie opnieuw instellen welke\nnodig is voor goed functioneren van deze website.\n\nGelieve dit alleen te doen op advies van onze heldesk.\n\nDoorgaan ?");
}

function PrintVraag(id) {
  WinPrint = window.open("PrintVraag.asp?QvQaID=" + id, "WinPrint", "width=640,height=400");
}

