function checkFrames(sub) {
  if (top.location == sub.location) {
    strPath = sub.location.pathname.toString();
    strDoc = getFileName(strPath);
    strType = strDoc.substring(0,3);
    strRight = sub.location.pathname + sub.location.search;
    if (strDoc == "des.cont.htm") strRight = "des.start.htm";
    if (strDoc == "sbs.cont.htm") strRight = "sbs.start.htm";
    top.location.replace("des.htm?type=" + strType + ",right=" + strRight);
  }
}

function getArgs() {
  var args = new Object();
  var query = location.search.substring(1); // de query-string
  var pairs = query.split(","); // opsplitsen
  for (var i = 0; i < pairs.length; i++) {
    var pos = pairs[i].indexOf('=');  // zoeken naar "name=value"
    if (pos == -1) continue;
    var argname = pairs[i].substring(0, pos);
    var value = pairs[i].substring(pos + 1);
    args[argname] = unescape(value);
  }
  return args;
}

function getFileName(strPath) { // get filename out of path
  nPos1 = strPath.lastIndexOf("/");
  nPos2 = strPath.lastIndexOf("\\");
  if ((nPos1 < 0) && (nPos2 < 0)) {
    return strPath;
  }
  if (nPos2 > nPos1) {
    nPos1 = nPos2;
  }
  return strPath.substring(nPos1 + 1);
}
