
var origColor;

function itemMouseOver( obj, msg, textColor )
{
  window.status = msg ;
  if ( document.all )
  {
    //obj.style.fontStyle = 'italic' ;
    origColor = obj.style.color ;
    obj.style.color = textColor ;
  }
}

function itemMouseOut( obj )
{
  window.status = '' ;
  if ( document.all )
  {
    //obj.style.fontStyle = 'normal' ;
    obj.style.color = origColor ;
  }
}


//  used by various content and menu pages
//
//  if one of these original pages is loaded directly, this reloads it in its frame context

function setFrameContext(
    url     //  in the form 'page1?page2' where
            //    page1 is the frameset page (relative path from the original page)
            //    page2 is the original page to be loaded by the frameset page (full path)
)
{
  if ( top.location == self.location )
  {
    //top.location.href = url ;
    top.location.replace( url ) ;
  }
}


//  used by the various default.htm pages to build the frameset
//
//  if the page is invoked via setFrameContext
//    if the original page is a menu page
//      it is loaded in the menu frame
//      the "plaque" page is loaded in the main frame
//    else
//      the original page is loaded in the main frame
//      the default menu page is loaded in the menu frame
//  else
//    the "plaque" page is loaded in the main frame
//    the default menu page is loaded in the menu frame

function buildUsingFrameContext(
    path    //  path from this default.htm to the root (usually zero or more '../'s)
)
{

  var mainURL = 'MenuHelp.htm' ;     //  future: each default.htm could have it's own plaque.htm
  var menuURL = 'menu.htm' ;         //  note: menu.htm is in the same folder with its default.htm

  var callingURL = top.location.href ;
  if ( callingURL.indexOf('?') != -1 )
  {
    var origURL = callingURL.substring(callingURL.indexOf('?')+1, callingURL.length) ;
    if ( origURL.lastIndexOf(menuURL) == -1 )
      mainURL = origURL ;
  }
  
  //alert( '\npath[' + path + ']\nmainURL[' + mainURL + ']\ncallingURL[' + callingURL + ']' ) ;

  document.writeln('<frameset cols="*,25%" border=1>') ;
  document.writeln('  <frame src="' + mainURL + '" marginwidth=20 marginheight=20 name="mainILIR">') ;
  document.writeln('  <frame src="' + menuURL + '" marginwidth=12 marginheight=10 name="menuILIR">') ;

  document.writeln('  <noframe>') ;
  document.writeln('    <body background="' + path + 'noframes/img/vcb.gif" link="#CC0000" alink="#FF3300" vlink="#000055">') ;
  document.writeln('    <br><br><br><br><br><br><br><br><br>') ;
  document.writeln('    <center>') ;
  document.writeln('    <hr width=50%>') ;
  document.writeln('    Sorry, your browser doesn\'t do frames.') ;
  document.writeln('    <hr width=50%>') ;
  document.writeln('    <\/center>') ;
  document.writeln('    <\/body>') ;
  document.writeln('  </noframe>') ;

  document.writeln('<\/frameset>') ;

}

