// (C) Henry McDaniel 2000, for Encyclopedia of MUDs


window.defaultStatus="MudWords.Com";
  
function away(where, name, flag)
{
  var option = "resizeable,height=530,width=670,scrollbars,toolbar=yes";

  if(flag)
       option += ",location=yes";

  window.open( where, name, option );
}

function printstuff(what)
{

if(what=="preview")
 window.open(parent.frames[1].location, 'Print',"resizeable"+
 "height=530,width=670,scrollbars,toolbar=no" );
else
 parent.frames[1].print();
}


// Open sponsor's home page in a seperate window
function sponsor()
{
  away( "http://www.atyzyk.com", 'Sponsor' );
}

// Change status window text
function wstatus(text)
{
  window.status = text;
}

// Display something in the main content window
// Also changes which menu button is lit depending
// on what part of the site we're viewing.

function show(text)
{
var stext = text;
var start;
var split;


 if(text=='home')
  {
    text='left.html';
    parent.frames[0].menu(); // clear buttons
    parent.frames[1].location = text;
  }
else   // light a button as needed
   {

     parent.frames[1].location = text;

if(1==2)
{    
     split = stext.indexOf("..");
     if(split > -1)
        {        
           split += 3; // skip "../"
           start = stext.substring(split,stext.length);
           stext = start;
         }
        else
        split = 0;

     split = stext.indexOf("/");
     if(split > 0)
         {  
            start = stext.substring(0, split);
            stext = start;
          }
}
         // Tell menu() to light or squelch button(s) and use flag to
         // prevent menu() seeking related index page.
         parent.frames[0].menu(stext,1);
   }
}

