

function rootURI() {

  var siteName ="diogenes";

  posWeb = location.href.lastIndexOf( siteName);
  if (posWeb != -1)
    {first  = 0;
     last   = posWeb + siteName.length;     
     result = location.href.slice( first, last + 1)}
  return( result)} 


function adjustStatus() {

  if (!parent.diogenes)
    {theURI = rootURI();
     subPath = location.href.substring( theURI.length);
     location.href = theURI + "index.html?" + subPath}}
     
function callFrame() {

  var subPath = location.search;
  if (subPath)
    {frames.main.location.href = rootURI() + subPath.substring( 1,subPath.length)}}
    

function printURI() {

 with( document) {
   write( '<p class="center">URI: <b>');
   write( location.href);
   write( '</b></p>')}}
