function Start(page) {
OpenWin = this.open(page, "NoFrameWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,status=yes,resizable=yes");
}

 if (top.location != self.location) {
	Start(self.location)
 }


  function newWindow(galleryImage,winHeight,winWidth,winName){
    galleryWindow = window.open('',winName,'height=' + winHeight + ',width=' + winWidth + ',toolbar=no,location=no,scrollbars=no')

  galleryWindow.document.write("<HTML><HEAD><TITLE>MutantsAndMasterminds.com</TITLE></HEAD>")
  galleryWindow.document.writeln("<BODY bgcolor=#000000>")
  galleryWindow.document.writeln("<div align=center><img border=0 src=" + galleryImage + "></div>")
  galleryWindow.document.writeln("</BODY></HTML>")

  galleryWindow.document.close()
    galleryWindow.focus()
  }

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		frame01_01_over = newImage("/images/frame01_01-over.gif");
		preloadFlag = true;
	} else {
		frame01_01_over = "";
		preloadFlag = false;
        }        
}


function getTo(thishref)   { 
    if (document.images) {
        top.location.replace(thishref);
    }
    else {
        top.location.href = thishref;
    }
}

function dropDownNav(){

    document.writeln ("<table width=\"200\" align=\"right\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">");
    document.writeln ("  <tr><td bgcolor=\"#00cc00\">");
    document.writeln ("<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">");
    document.writeln ("  <tr>");
    document.writeln ("    <td bgcolor=\"#000000\">");
    document.writeln ("      <div align=\"center\" class=\"netscapeLegend\">Green Ronin Catalog</div>");
    document.writeln ("      <div align=\"center\">");

  if (document.images){
    document.writeln ("  <form name=\"navSelecter\">");
    document.writeln ("    <select class=\"smallOption\" name=\"ID\" onChange=\"getTo(this[this.selectedIndex].value)\">");
    document.writeln ("      <option value=\"\" class=\"smallOption\"><span class=\"smallOption\">Please Choose:</span></option>");
    document.writeln ("      <option value=\"/catalog.shtml\" class=\"smallOption\">Catalog Index</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1002\" class=\"smallOption\">Death in Freeport</option>");      
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1003\" class=\"smallOption\">Terror in Freeport</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1004\" class=\"smallOption\">Madness in Freeport</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1006\" class=\"smallOption\">Hell in Freeport</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1007\" class=\"smallOption\">Freeport: City of Adventure</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1005\" class=\"smallOption\">Legions of Hell</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1012\" class=\"smallOption\">Armies of the Abyss</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1009\" class=\"smallOption\">Jade Dragons &amp; Hungry Ghosts</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1011\" class=\"smallOption\">Arcana: Societies of Magic</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1013\" class=\"smallOption\">Shaman's Handbook</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1008\" class=\"smallOption\">Character Record Folio</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1001\" class=\"smallOption\">Ork! The RPG</option>");
    document.writeln ("      <option value=\"/cgi-bin/product.cgi?prodid=1010\" class=\"smallOption\">Spaceship Zero: The RPG</option>");
    document.writeln ("    </select>");
    document.writeln ("  </form>");
  }
    document.writeln ("</div></div></td></tr></table></td></tr></table>");
}

///////////////////////////////////////////////////////////////////////////
// Cameron Gregory - http://www.bloke.com/
// http://www.bloke.com/javascript/Random/
// This line and about must remain .. then you can use it for free...
//
// ChangeLog
//
// 
// Fri Apr 30 12:40:50 EDT 1999
//   Added target.
// Sat Sep 21 16:36:47 EDT 1996
//   Added associate URL list.
//
// Fri Sep 13 18:36:20 EDT 1996
//   Created from the base of Selector()
//
// Usage:
//  RandomImage(images)
//  RandomImageLong(images,iparams)
//  RandomImageLink(images,urls)
//  RandomImageLinkLongTarget(images,urls,iparams,hparams)
//     images		is space or comma separated file list
//     urls		is space or comma separated list of url's
//     iparams		params to add to <img>
//     hparams		params to add to <a href..>
///////////////////////////////////////////////////////////////////////////

function RandomImageLong(images,iparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 si = 0; 
 ci=0;
 cc=0;
 imageSet = new Array();
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
  document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
}

function RandomImage(images)
{
  RandomImageLong(images," ");
}

function RandomImageLinkLongTarget(images,urls,iparams,hparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 imageSet = new Array();
 urlSet = new Array();
 si = 0; 
 ci=0;
 cc=0;
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
 si = 0; 
 ci=0;
 cc=0;
 ei = urls.length;
  for (i=1;i<ei && cc <=ind ;i++) {
    if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') {
      urlSet[cc] = urls.substring(si,i);
      cc++;
      si=i+1;
      }
    }

  //document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
  document.write("<a "+hparams+" href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\"></a>");
}

function RandomImageLinkLong(images,urls,iparams)
{
  RandomImageLinkLongTarget(images,urls,iparams,"");
}

function RandomImageLink(images,urls)
{
  RandomImageLinkLongTarget(images,urls,"border=0","");
}