var numStrips = 3;

function rdmStrip() {

   var num = Math.floor(Math.random() * numStrips) + 1;
 
   document.write('<td width=196 background=\"./images/strip_0' + num + '.gif\"></td>');

}

var win;

function openWin(pic) {
  if (win) {
    closeWin();
  }

  var h, w;
  var img = new Image();

  img.src = "./images/" + pic + ".gif";

  h = img.height + 20;
  w = img.width + 20;

  win = window.open("./images/" + pic + ".gif", "newWin", "width=" + w + ",height=" + h + ",resizeable=0,status=0,scrollbars=0,menu=0,location=0");
}

function closeWin() {
  win.close();
}

function createPageHeader() {
  document.writeln('<table bgcolor=black width=\"100%\" align=center>');
  document.writeln('  <tr>');
  document.writeln('    <td align=left>');
  document.writeln('      <a href=\"http://www.partsunknown.net\"><img src=\"./images/header_logo_med.gif\" border=0></a>');
  document.writeln('    </td>');
  document.writeln('    <td align=center>');
/*
  document.writeln('            <a href=\"con_200712.html\"><img name=\"btn_newCon\" src=\"./images/btn_newCon_off.gif\" border=0 onMouseOver=\"over(\'btn_newCon\')\" onMouseOut=\"out(\'btn_newCon\')\"></a>');
*/
/*
  document.writeln('      <a href=\"http://www.freecomicbookday.com/the_comics.asp\" target=\"_blank\"><img src=\"./images/FCBD08_horLogos_100.jpg\"></a>');
*/

  document.writeln('      <img src=\"./images/header_20th_01.jpg\">');

  document.writeln('    </td>');
  document.writeln('    <td align=right>');
  document.writeln('      <table cellpadding=0 cellspacing=0 border=0>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <img src=\"./images/header_address.gif\">');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"mailto:punk906@bellsouth.net\"><img name=\"btn_email\" src=\"./images/btn_email_off.gif\" border=0 onMouseOver=\"over(\'btn_email\')\" onMouseOut=\"out(\'btn_email\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('      </table>');
  document.writeln('    </td>');
  document.writeln('  </tr>');
  document.writeln('</table>');
}

function createMenu() {
  document.writeln('      <table cellpadding=0 cellspacing=0 border=0>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"http://www.partsunknown.net\"><img name=\"btn_home\" src=\"./images/btn_home_off.gif\" border=0 onMouseOver=\"over(\'btn_home\')\" onMouseOut=\"out(\'btn_home\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"history.html\"><img name=\"btn_history\" src=\"./images/btn_history_off.gif\" border=0 onMouseOver=\"over(\'btn_history\')\" onMouseOut=\"out(\'btn_history\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"cons.html\"><img name=\"btn_cons\" src=\"./images/btn_cons_off.gif\" border=0 onMouseOver=\"over(\'btn_cons\')\" onMouseOut=\"out(\'btn_cons\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"heroes.html\"><img name=\"btn_heroes\" src=\"./images/btn_heroes_off.gif\" border=0 onMouseOver=\"over(\'btn_heroes\')\" onMouseOut=\"out(\'btn_heroes\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"photos.html\"><img name=\"btn_photos\" src=\"./images/btn_photos_off.gif\" border=0 onMouseOver=\"over(\'btn_photos\')\" onMouseOut=\"out(\'btn_photos\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"location.html\"><img name=\"btn_location\" src=\"./images/btn_location_off.gif\" border=0 onMouseOver=\"over(\'btn_location\')\" onMouseOut=\"out(\'btn_location\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"links.html\"><img name=\"btn_links\" src=\"./images/btn_links_off.gif\" border=0 onMouseOver=\"over(\'btn_links\')\" onMouseOut=\"out(\'btn_links\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');

  document.writeln('        <tr>');
  document.writeln('          <td align=center>');
  document.writeln('            <a href=\"./book.html\"><img name=\"btn_book" src=\"./images/btn_book_off.gif\" border=0 onMouseOver=\"over(\'btn_book\')\" onMouseOut=\"out(\'btn_book\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');

  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"http://www.diamondcomics.com/shipping.asp\" target=\"_blank\"><img name=\"btn_newComics" src=\"./images/btn_newComics_off.gif\" border=0 onMouseOver=\"over(\'btn_newComics\')\" onMouseOut=\"out(\'btn_newComics\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('        <tr>');
  document.writeln('          <td>');
  document.writeln('            <a href=\"buying.html\"><img name=\"btn_buying" src=\"./images/btn_buying_off.gif\" border=0 onMouseOver=\"over(\'btn_buying\')\" onMouseOut=\"out(\'btn_buying\')\"></a>');
  document.writeln('          </td>');
  document.writeln('        </tr>');
  document.writeln('      </table>');
}

function createPageFooter() {
  document.writeln('<table bgcolor=black width=100% cellpadding=2 cellspacing=2 border=0>');
  document.writeln('  <tr>');
  document.writeln('    <td bgcolor=white align=center>');
  document.writeln('      <font size=1>');
  document.writeln('      All images and characters are &copy; their respective owners, and are used for illustrative purposes only.<br>');
  document.writeln('      This website developed and maintained by <a href="mailto:info@noceanstudios.com?subject=[Parts Unknown Website]">Nocean Studios</a>.');
  document.writeln('    </td>');
  document.writeln('  </tr>');
  document.writeln('</table>');
}

function createHeroBlock(hero) {
// alert('hero = ' + hero + '*');
  if (hero) {
    if (heroNames[hero]) {
      document.write('<font size=3><b>' + heroNames[hero] + '</b></font>');
      if (heroWeb[hero]) {
        document.write('&nbsp;&nbsp;[ <a href=\"http://' + heroWeb[hero] + '\" target=\"_blank\">Website</a> ]');
      }
      if (heroBio[hero]) {
        document.write('&nbsp;&nbsp;[ <a href=\"http://' + heroBio[hero] + '\" target=\"_blank\">Bio</a> ]');
      }
      document.writeln('<br>');

      if (heroPortrait[hero]) {
        document.write('<img src=\"./images/portrait_' + hero + '.gif\" align=left>');
      }

// alert('heroName = ' + heroNames[hero]);
      if (heroText[hero]) {
        document.write(heroText[hero] + '<p>');
      } else {
        document.write('Coming soon...');
      }
     document.writeln('<p>');
    }
  } else {
    document.location.href = "heroes.html";
  }
}

function getHeroCode() {
  var loc = window.location.href; 
// alert('loc = ' + loc);
  var searchString = loc.split("?")[1];
// alert('searchString = ' + searchString);
  var varsArray = searchString.split("&");
  var paramsArray;
  for (i=0; i<varsArray.length; i++) {
    // eval(varsArray[i]);
    // alert('varArray[' + i + '] = ' + varsArray[i]);
    paramsArray = varsArray[i].split("=");
    return (paramsArray[1]);
  }
}

function openPhotoWin(photoName) {
//  if (win) {
//    closeWin();
//  }

  win = window.open("./photo_page.html?idx=" + photoName, "newWin", "resizeable=0,status=0,scrollbars=0,menu=0,location=0");

  win.focus();
}

function closeWin() {
  win.close();
}

function createPhotoBlock(photoName) {
  document.write('<img src=\"./images/' + photoName + '.gif\">');
}

function getPhotoName() {
  var loc = window.location.href; 
// alert('loc = ' + loc);
  var searchString = loc.split("?")[1];
// alert('searchString = ' + searchString);
  var varsArray = searchString.split("&");
  var paramsArray;
  for (i=0; i<varsArray.length; i++) {
    // eval(varsArray[i]);
    // alert('varArray[' + i + '] = ' + varsArray[i]);
    paramsArray = varsArray[i].split("=");
    return (paramsArray[1]);
  }
}

function createCaptionBlock(photoName) {
  if (captions[photoName]) {
    document.writeln(captions[photoName]);
  }
}


var captions = new Array();

captions['photo_20060222_01'] = 'The crowd lines up to see John Hitchcock (l) and Scott Hampton';
captions['photo_20060222_02'] = 'Scott Hampton gladly signs for an ecstatic fan';
captions['photo_20060222_03'] = 'John Hitchcock puts his Hancock on his first major published work';
captions['photo_20060222_04'] = 'John Hitchcock (background) and Scott Hampton keep at it until every fan is served';

captions['photo_20051008_01'] = 'Award-winning author Orson Scott Card signs a book for a fan';
captions['photo_20051008_02'] = 'Fans line up by the hundreds to see author Orson Scott Card';
captions['photo_20051008_03'] = 'Award-winning illustrator Bernie Wrightson (l) and his wife Liz';
captions['photo_20051008_04'] = 'Bernie Wrightson (l) chats with a fan';
captions['photo_20051008_05'] = 'Randy Green (l) and Casey Jones provide some artwork for the fans';
captions['photo_20051008_06'] = 'Retailer David Shankle displays a wealth of four-color treasures';
captions['photo_20051008_07'] = 'Comics were everywhere on the convention floor';
captions['photo_20051008_08'] = 'John Hitchcock (l) and Scott Hampton at the end of another successful convention';

captions['photo_20060722_01'] = 'Tom de Rosier (l), John Hitchcock, Ruben Procopio, Paul Power, Mike Royer, and Eric Toth participate in the "Remembering Alex Toth" panel at the 2006 San Diego Comic Con';
captions['photo_20060722_02'] = 'Tom de Rosier (l) and Ruben Procopio (r) react to John Hitchcock\'s (c) story';
captions['photo_20060722_03'] = 'The "Remembering Alex Toth" panel: Tom de Rosier (l), John Hitchcock, Ruben Procopio, Paul Power, Mike Royer, Eric Toth, Dana Palmer, Irwin Hasen, and David Armstrong';
captions['photo_20060722_04'] = 'John Hitchcock (l) responds to a question as Ruben Procopio looks on';
captions['photo_20060722_05'] = 'John Hitchcock (l) chats with Pierre Debs and a friend on the 2006 San Diego Comic Con floor';
captions['photo_20060722_06'] = 'John Hitchcock (l) with an attendee of the "Remembering Alex Toth" panel at the 2006 San Diego Comic Con';
captions['photo_20060722_07'] = 'John Hitchcock promotes his new book, "Dear John: The Alex Toth Doodle Book", at the 2006 San Diego Comic Con';
captions['photo_20060722_08'] = 'Proud author John Hitchcock with his new book, "Dear John: The Alex Toth Doodle Book", at the 2006 San Diego Comic Con';
captions['photo_20060722_09'] = 'John Hitchcock (l) signs a book for a fan at the 2006 San Diego Comic Con as Rocco Rob (c) looks on';
captions['photo_20060722_10'] = 'John Hitchcock (r) discusses Alex Toth at the 2006 San Diego Comic Con';
captions['photo_20060722_11'] = 'John Hitchcock (r) and publisher Jeff Parker display "Dear John: The Alex Toth Doodle Book" at the 2006 San Diego Comic Con';
captions['photo_20060722_12'] = 'John Hitchcock (l) signs a book for a fan at the 2006 San Diego Comic Con';

captions['photo_20060721_044'] = 'John Hitchcock with Everett Raymond Kinstler (l)';
captions['photo_20060721_042'] = 'John Hitchcock with Carmine Infantino (r)';
captions['photo_20060721_036'] = 'John Hitchcock with Murphy Anderson (l) and his wife Helen';
captions['photo_20060721_077'] = 'John Hitchcock begins another weekend at the Comic Con';
captions['photo_20060721_028'] = 'John Hitchcock shares a moment with good friend Scott Hampton (r)';
captions['photo_20060721_029'] = 'John Hitchcock and George Pratt (l) discuss comics';
captions['photo_20060721_092'] = 'Pierre Debs (l) prepares to put the smackdown on John Hitchcock';

captions['photo_20061202_01'] = 'Angelo Torres signs an issue of Creepy for a fan';
captions['photo_20061202_02'] = 'John Hitchcock proudly shows off Angelo Torres (r) to the Triad comic community';
captions['photo_20061202_03'] = 'Mike Wieringo (l) and Casey Jones show off their talents';
captions['photo_20061202_04'] = 'Rick Ketcham displays his artwork for the fans';
captions['photo_20061202_05'] = 'Scott Hampton (l) displays an example of Angelo Torres\' (r) artwork as John Hitchcock discusses comics';
captions['photo_20061202_06'] = 'Budd Root works on a Cavewoman painting for a fan';
captions['photo_20061202_07'] = 'Fans hunt for hidden treasures at the dealer tables';
captions['photo_20061202_08'] = 'Comic retailers display their wares';

captions['photo_20070728_01'] = 'John signs his book for a fan on the floor at the San Diego Comic Con';
captions['photo_20070728_02'] = 'John relates a story to a fan at the San Diego Comic Con';
captions['photo_20070728_03'] = 'Eric Toth (l) and Damon Toth (r) with John at the Alex Toth panel';
captions['photo_20070728_04'] = 'John chats with illustrator and animator Rubin Procopio';
captions['photo_20070728_05'] = 'John and Mark Chiarello at the Alex Toth panel';

captions['photo_spaceGhost_08'] = 'John shows a stack of postcards sent to him by Alex Toth';
captions['photo_spaceGhost_10'] = 'John shows a letter he wrote to Alex Toth, corrected by Alex';

