//  Winifred W. Tipton
//  5/29/2002 7:19PM

/** Constants used on several pages
*/
  var frameWidth;
  var picHeight;
  var nf = false;

  var colBlack="#000000";
  var colWhite="#ffffff";

  if (self == parent)
    nf = true;

  function go_logo()
  {
    document.write('<center><img src="Images/LogoCenter.gif" alt="Not Coming Soon logo" width=623 height=54></center><br>');
  }

  function go_logo_new(inColor)
  {
      if (nf == true)
      {
          if (inColor == colWhite)
          {
            if ( frameWidth > 640 )
            {
             document.write('<tr><td><img width="200" height="69" alt="NotComingSoon.com Logo" src="Images/LogoWhiteBG200.gif" align="right" /></td></tr>');
            }
            else
            {
             document.write('<tr><td><img width="100" height="34" alt="NotComingSoon.com Logo" src="Images/LogoWhiteBG100.gif" align="right" /></td></tr>');
            }
          }
          else
          {
            if ( frameWidth > 640 )
            {
             document.write('<tr><td><img width="200" height="69" alt="NotComingSoon.com Logo" src="Images/LogoBlackBG200.gif" align="right" /></td></tr>');
            }
            else
            {
             document.write('<tr><td><img width="100" height="34" alt="NotComingSoon.com Logo" src="Images/LogoBlackBG100.gif" align="right" /></td></tr>');
            }
          }
      }
  }

  function go_contents ()
  {
        document.write('<tr><td><h5><a href="contents.htm">Contents</a></h5></td></tr>');
  }


function setPicture (picSrc,
                    picRatio,
                    picAlt)
/*****************************************************************
 picSrc = image file name
 picRatio = image aspect ratio
 picAlt = alt text
*****************************************************************/
{
  var picWidth=700;  // standard width
  var picTitle=document.title; // page title

  if ( w != null )
  {
    alert('w.close()');
    w.close();
  }

  if ( (frameWidth * .9) < picWidth)
  {
    picWidth= frameWidth * .9;
  }

  var newWidth = frameWidth;
  if ( (picWidth * 1.1) < newWidth )
  {
    newWidth = picWidth * 1.1
  }

  picHeight = picWidth / picRatio;

  var newHeight = picHeight * 1.4

  var w =  window.open(picSrc,
                      'temp',
                      'width='+newWidth+',height='+newHeight+',scrollbars=yes,resizable=yes'
                      )
  var d= w.document;
  d.writeln ('<html>');
  writeHead(d, picTitle);
  writeBody(d, picSrc, picWidth, picRatio, picAlt, picTitle);
  d.writeln ('</html>');
  d.close();
  w.focus();

}  // setPicture (src, w, ar, a, ttl)

function writeHead(d, title)
/*****************************************************************
  Write Header to HTML doc
                               6/1/2002 1:08PM
 d = document object of new window
 title = page title
*****************************************************************/
{
  d.writeln ('<head>');
  d.writeln ('<link rel="stylesheet" href="site.css" type="text/css">');
  writeTitle (d, title);
  d.writeln ('</head>');

}  // writeHead(d, title)

function writeTitle ( d,  title)
/*****************************************************************
  Write Title to new HTML page
                               6/1/2002 1:06PM
 d = document object of new window
 title = page title
*****************************************************************/
{
  d.writeln ('<title>');
  d.writeln (title);
  d.writeln ('</title>');
}  // writeTitle ( d,  title)


function writeBody(  d, picSrc, picWidth, picRatio, picAlt, picTitle )
/*****************************************************************
  Write out the html to display a picture.
                               6/1/2002 1:14PM
 d = document object of new window
 picSrc = image file name
 picWidth = image width
 picRatio = image aspect ratio
 picAlt = alt text
*****************************************************************/
{
  d.writeln ('<body>');


  d.writeln('<h1>',picTitle,'</h1>');
  d.writeln('<img src=',picSrc,'  align="top" width=',picWidth,' height=',picHeight,' alt="',picAlt,'">');
  d.writeln('<div  align="left"><p>',picAlt,'</p></div>');

  d.writeln ('</body>');
}  // writeBody

function go_write_picture_link( tnPic, fullPic, aspectRatio, desc, size )
/*****************************************************************
  tnPic = path to thumbnail
  fullPic = path to large picture
  aspectRatio = width to height
  desc = text to include
  size = disk space for full pic
                              12/30/2002 6:44PM
*****************************************************************/
{
  var tnWidth = 140;
  var fullWidth = 700;
  var tnHeight = tnWidth / aspectRatio;

    // write open anchor
  document.writeln('<a href="javascript:setPicture(\'Images/', fullPic,'\',\'', aspectRatio,'\',\'',desc,'\')")>');
  // write displayed stuff
  document.writeln('<img src="Images/', tnPic,'" width="', tnWidth,'" height="', tnHeight, '" alt="Thumbnail of', desc,'" class="TN" /><p>', desc,' (~', size,')</p>' );
  // write close anchor
  document.writeln('</a>');
}  // go_write_picture_link

function set_Pic(picName,
                    picWidth,
                    picRatio,
                    picAlt)
{
    var nf = false;
    if (self == parent)
        nf = true;

    var picSrc = 'Images/'+picName;
    var picHeight;


    if ( frameWidth> 700)
    {
        picWidth=700;
    }
    else
    {
    if ( frameWidth> 600)
        {
            picWidth=600;
        } else {
            picWidth=500;
        }
    }

    picHeight = picWidth / picRatio;

    document.write('<img src="',picSrc,'" width=',picWidth,' height=',picHeight,' alt="',picAlt,'" align="top" />');
}

