/* Make sure we are in the proper context */
var indexPage = /index\.shtml$/;
var insidePage = /inside\.shtml/;
var meRegExp = /\/(\w+)\.shtml/;
var myLoc = new String(window.location);
var isIndexPage = myLoc.match(indexPage);
var isInsidePage = myLoc.match(insidePage);
var mePage = myLoc.match(meRegExp);

if ((window == top) && !(isIndexPage) && !(isInsidePage))
{  if (mePage)
   {  top.location.replace("inside.shtml?" + mePage[1]);
   }
}

function chooseIframe()
{  var locString = new String (document.location);
   var pageName = locString.substring(locString.indexOf('?') + 1);
   var frameLoc = pageName /* + '.shtml' PrP calls don't end with ".shtml" */;
   
   if (pageName)
   { window.frames[0].location = frameLoc;
   }
}
