var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

var show_acrobat = false;

function getElementWithId(id) {
  if (NS4) {
    return eval('document.' + id)
  }
  else if (IE4) {
    return eval('document.all.' + id)
  }
  else if (IE5 || N6) {
    return document.getElementById(id)
  }
  else 
    return null;
}

function check_acrobat() {
  if (show_acrobat) {
    var ar = getElementWithId('acrobatreader');
    if (ar != null) {
      ar.style.visibility = 'visible';
    }
  }
}

/*
  Harco; voor het versturen van een url naar een vriend of vriendin
  javascript opent een popup met als parameter 'url' die gemaild wordt.
*/
function showWindowUrl(uniqueid, url, title, width, height) {

  var urlToMail = '' + document.location;
  var popupUrl = url;
  
  if (url.indexOf('?') == -1) {
    popupUrl += '?mailurl=' + escape(urlToMail)
  } else {
    popupUrl += '&mailurl=' + escape(urlToMail);
  }
  
  popupUrl += '&mailtitle=' + escape(title);
  
  var windowObj;
  windowObj = eval('top.Info' + uniqueid);

  if (windowObj !=null && (windowObj + "" != "undefined") && !windowObj.closed) {
    windowObj.focus();
  } else {
    windowObj = null;
  
    windowObj = top.open(popupUrl,'Info'+uniqueid,'toolbar=no,width=' + width + ',height=' + height + ',directories=no,status=no,scrollbars=no,resizable=yes,menubar=no,location=no');
    top.name = 'wm';

    if (windowObj != null) {
      windowObj.focus();
    }     
  }
  reload = false;
}
