// -----------------------------------------------------------------------------
function checkPages(currentpage, zoekterm, taal) {


  if ((zoekterm == '') && (currentpage != '')) {
    var pos1, pos2;
    try {
      var toploc = parent.topFrame.location.href;
      pos1 = toploc.lastIndexOf('=');
      //pos2 = toploc.indexOf('.', pos1);
      var topname = toploc.substring(pos1 + 1);//, pos2);
      if (currentpage.toLowerCase() != topname.toLowerCase()) {
        //alert('Huidige "afdeling" is: ' + currentpage.toLowerCase() + '\nHoofdmenu wijkt daar vanaf: ' + topname + '\nTop menu moet worden: top.asp?i=' + currentpage.toLowerCase());
        parent.topFrame.location.href = ('top.asp?i=' + currentpage.toLowerCase() + '&x=update&taal=' + taal);
      }
    } catch (e) {

    }

    try {
      var submenuloc = parent.leftFrame1.location.href;
      pos1 = submenuloc.lastIndexOf('_');
      pos2 = submenuloc.indexOf('.', pos1);
      var subname = submenuloc.substring(pos1 + 1, pos2);
      if (currentpage.toLowerCase() != subname.toLowerCase()) {
        parent.leftFrame1.location.href = ('menu_' + currentpage.toLowerCase() + '.asp?i=' + currentpage.toLowerCase() + '&taal=' + taal);
      }
    } catch (e) {

    }

  }

}


// -----------------------------------------------------------------------------
function checkZoeken() {

  var f = document.zoekForm;

  if (f.zoekwoord.value == '') {
    alert('Vul a.u.b. een zoekwoord in!');
    return false
  }
  return true
}

// -----------------------------------------------------------------------------
function popUp(url, width, height) {
  var winPopUp;
  winPopUp = window.open(url, 'PopUp', 'width='+width+', height='+height+',scrollbars=no');
 }

// -----------------------------------------------------------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// -----------------------------------------------------------------------------
function refreshMenu() {
  parent.leftFrame1.location.href = parent.leftFrame1.location.href;
  parent.topFrame.location.href = parent.topFrame.location.href;
}

// -----------------------------------------------------------------------------
