// If the current page has no other parent, load index.html plus a search string
// passing the current page URL as a search parameter.
function checkFrameset() {
   var minNav3 = (navigator.appName == "Netscape" && 
      parseInt(navigator.appVersion) >= 3)
   var minIE4 = (navigator.appName.indexOf("Microsoft") >= 0 && 
      parseInt(navigator.appVersion) >= 4)
   var minDOM = minNav3 || minIE4   // Baseline DOM required for this function 
   var isNav4 = (navigator.appName == "Netscape" && 
      parseInt(navigator.appVersion) == 4)
   if (parent == window) {
      // Don't do anything if running NN4 so that the frame can be printed on its own.
      if (isNav4 && window.innerWidth == 0) {
         return
      }
      if (minDOM) {
         // Use replace() to keep current page out of history.
         location.replace("index.html?main=" + escape(location.href))
      } else {
         location.href = "index.html?main=" + escape(location.href)
      }
   }
}
// Invoke the function.
checkFrameset()
