
var showing = false;
var offset = 310;

function showMenu()
{
   var queue = Effect.Queues.get('menuxscope');
   if( queue.effects.size() == 0 && !showing )
   {
      showing = true;
      new Effect.Move($('index'), { x: offset, y: 0, queue: { position: 'end', scope: 'menuxscope', limit: 1 } }); 
      return false;
   }
}

function hideMenu()
{
   var queue = Effect.Queues.get('menuxscope');
   if( queue.effects.size() == 0 && showing )
   {
      showing = false;
      new Effect.Move($('index'), { x: -offset, y: 0, queue: { position: 'end', scope: 'menuxscope', limit: 1 } }); 
      return false;
   }
}

function ol( text, cap )
{
   return overlib(text,
                  ABOVE, 
                  HAUTO, 
                  CAPTION, cap, 
                  BGCOLOR, '#000000',
                  TEXTFONT, 'Verdana',
                  CAPTIONFONT, 'Verdana',
                  CAPTIONSIZE, '10px',
                  TIMEOUT, 4000,
                  DELAY, 100,
                  FGBACKGROUND, '../site_images/classic/indexbg.png' );
}

function showNav()
{
   indicate( "flipleft" );
   indicate( "flipright" );
   indicate( "indeximage" );
}

function indicate( element )
{
   var q = "queue_" + element;
//   new Effect.Puff($(element), { queue: { position: 'end', scope: q } }); 
//   new Effect.Appear($(element), { from: 0.0, to: 1.0, duration: 3.0, queue: { position: 'end', scope: q } }); 
   new Effect.Fade($(element), { from: 1.0, to: 0.0, duration: 0.5, queue: { position: 'end', scope: q } }); 
   new Effect.Appear($(element), { from: 0.0, to: 1.0, duration: 0.5, queue: { position: 'end', scope: q } }); 
   new Effect.Fade($(element), { from: 1.0, to: 0.0, duration: 0.5, queue: { position: 'end', scope: q } }); 
   new Effect.Appear($(element), { from: 0.0, to: 1.0, duration: 0.5, queue: { position: 'end', scope: q } }); 
   return false;
}

function showLink( im )
{
   var linkImage = $('linkImage');
   linkImage.style.display = "none";
   linkImage.src = im;

   var tmpIm = new Image();
   tmpIm.src = im;

   linkImage.width = tmpIm.width;
   if( tmpIm.width > 300 ) linkImage.width = 300;

   linkImage.height = tmpIm.height;
   if( tmpIm.height > 300 ) linkImage.height = 300;

   linkImage.style.display = "inline";
}

function ll( im, id )
{
   im.onload = removeBorder(im);
   im.src = id;
}

function removeBorder( im )
{
   return function() { im.style.border = 0; }
}

