function setURLIndex(document) {

  var strBasePath = document.URL.substring(0, document.URL.lastIndexOf("/"));
  var strName     = document.URL.substring(document.URL.lastIndexOf("/") + 1);
  
  if (top.location.href != strBasePath + "/index.html" &&
      top.location.href != strBasePath + "/frameless.html" && 
      top.location.href != strBasePath + "/") {
    top.location.href =  "./frameless.html#" + strName;
  }
}
function loadURL(document) {
  var lisFrame    = document.getElementsByTagName("frame");
  var strLoad     = document.URL.split("#")
  var strBasePath = document.URL.substring(1, document.URL.lastIndexOf("/"));
  
  if (lisFrame[2].src == strLoad[1]) {
  
  } if (document.URL.indexOf("#") != -1) {
    lisFrame[2].src = "./" + strLoad[1];    
  }
}

