//CREATE RING LIST
hurls = new Array;   titles = new Array;
descs = new Array;   keys=   new Array;     emails=   new Array;  
var ringmax = 0;            var thisInd = 1;      var temp;    var tempInd;
var isListed = 0;

hurls[ringmax]='http://members.aol.com/lordhighrikonian/rikoring.html'; titles[ringmax]="The Lord High Rikonian's Exclusive Webring";
descs[ringmax]="An exclusive Webring. Only confirmed allies of the <i>Lord High Rikonian of the Allmighty Dimensional Realms of Rikonia, Defender of the Realm, Overlord of the Mighty Rikonian Hordes of Death and Destruction, Supreme Star Admiral of the Rikonian Starfleet, Chief Inquisitor, Destroyer of Worlds, Slayer of Kings, Dictator For Life (and beyond), Head of Programming for RTV, and all around great guy</i> need apply";
keys[ringmax]='rikoring'; emails[ringmax]='lordhighrikonian@hotmail.com';

ringmax = ringmax+1;
hurls[ringmax]='http://members.aol.com/lordhighrikonian/rpg.html'; titles[ringmax]='Realm of Rikonian';
descs[ringmax]='Come here for new Heroes Unlimited&trade; super powers and robotics, ultra heroes and more!';
keys[ringmax]='riko'; emails[ringmax]='lordhighrikonian@hotmail.com';

ringmax = ringmax+1;
hurls[ringmax]='http://members.aol.com/lordhighrikonian/rikocomic.html'; titles[ringmax]="Rikonian's Unnamed Comic";
descs[ringmax]='Follow the adventures of Riko, two demigods, a wannabe karate master and a host of badly photoshopped celebrities and zombies.';
keys[ringmax]='rikocomic'; emails[ringmax]='lordhighrikonian@hotmail.com';

ringmax = ringmax+1;
hurls[ringmax]='http://www.proteus454.freeservers.com';
titles[ringmax]="The Philosopher's Stone [Proteus454]";
descs[ringmax]="What do you get when Socrates gets a calcium buildup in his kidneys? The same thing that happens when a zany Canadian puts a bunch of funky RPG and humor stuff on a Web server: a Philosopher's Stone";
keys[ringmax]='proteus'; emails[ringmax]='proteus454@hotmail.com';

ringmax = ringmax+1;
hurls[ringmax]='http://members.tripod.com/~heroesunlimited/';
titles[ringmax]="BruteForce";
descs[ringmax]="BruteForce has Heroes Unlimted powers, NPCs, house rules, adventure ideas and more. If Brute Force doesn't work, then, er, I guess his site doesn't get updated.";
keys[ringmax]='bruteforce'; emails[ringmax]='proteus454@hotmail.com';

ringmax = ringmax+1;
hurls[ringmax]='http://blazingfrost.com/Roomeys/';
titles[ringmax]="The Roomeys";
descs[ringmax]="See the amazing Blaze's HAND-DRAWN heroes: The Roomeys! A comic based upon real people in real-life situations";
keys[ringmax]='azraelrommies'; emails[ringmax]='azraelpal@aol.com';




function writeLink(temp, linkText)
{
  var wlUrl;
  if (temp<0)  {temp=ringmax};
  if (temp>ringmax)  {temp=0};
  tempInd = temp;  
  wlUrl = hurls[temp];
  document.write('<a href="' + wlUrl + '">' + linkText + '</a>');
}

function writeLinkBreakout(temp, linkText)
{
  var wlUrl;
  if (temp<0)  {temp=ringmax};
  if (temp>ringmax)  {temp=0};
  tempInd = temp;  
  wlUrl = hurls[temp];
  document.write('<a href="' + wlUrl + '" target=_top>' + linkText + '</a>');
}

function writeRandomSite()
{
  var randomnumber = Math.random() ;
  var rand1 = Math.round( (ringmax-1) * randomnumber) + 1 ;
  document.write(hurls[rand1]);
}

function randomSite()
{
  var randomnumber = Math.random() ;
  var rand1 = Math.round( (ringmax-0) * randomnumber) + 0 ;
  document.location=hurls[rand1];
}

function linkFont()
{
  var linkFontTemp = document.linkColor;
  document.write('<font color="' + linkFontTemp + '">');
}

function getIndex(thisKey)
{
  var tempkey='';
  temp = 0;
  while (temp <= ringmax)
  {
    if(thisKey == keys[temp])
    {
      thisInd = temp;
      temp = ringmax+10;
      isListed=1;
    }
    temp = temp+1;
  }
  if(thisInd<0){thisEnd=ringmax}
  if(thisInd>0){thisEnd=0}
}

function listSites()
{
  var lsDesc;  var lsTitle;  var lsUrl;
  var lsi=0;
  document.write('<UL>');
  while (lsi<=ringmax)
  {
    document.write('<LI><b>');
    lsTitle=titles[lsi];
    writeLink(lsi, lsTitle);
    document.write('</b>: ');
    document.write(descs[lsi]);
    lsi=lsi+1
  }
  document.write('</UL>');
}

function ringTable(thisKey)
{
  getIndex(thisKey);
  document.write('<TABLE border="2" align="center">');

  //Tell if listed
  if (isListed==0)
  {
    thisInd=0;
    document.write('<TR><TD colspan="5">');
    document.write('<marquee>This is a Non-Rikonian site</marquee>');
    document.write('</TD></TR>');
  }

  document.write('<TR>');
  document.write('<TD>');
  document.write('<img src="http://members.aol.com/RikoGrafX/pics/stormr-1.jpg">');
  document.write('</TD>');
  document.write('<TD align="center" colspan="3">');
  document.write('<font size="5" color="red"');
  document.write('face="Borg-9, Bajoran, Visitation, Black Chancery, Blood of Dracula, Serpentine dBol, Metal Lord, Comic Sans MS">');
  document.write("Lord High Rikonian's<br>Exclusive Webring</font><br><marquee>Are you Rikonian enough to be listed?</marquee>");
  document.write('</TD>');
  document.write('<TD>');
  document.write('<img src="http://members.aol.com/RikoGrafX/pics/stormr-1.jpg">');
  document.write('</TD>');
  document.write('</TR>');
  document.write('<TR>');
  document.write('</TR>');

  document.write('<TD>');
  writeLink(thisInd-1, 'Previous');
  document.write('</TD>');

  document.write('<TD>');
  linkFont();
//  document.write('<u><a onClick="randomSite()">Random Site</a></u></font>');
  document.write('<a href="');
  writeRandomSite();
  document.write('">Random Site</a>');
  
  document.write('</TD>');

  document.write('<TD>');
  document.write('<a href="mailto:' + emails[thisInd] + '">Contact me</a>');
  document.write('</TD>');

  document.write('<TD>');
  document.write('<a href="http://members.aol.com/LordHighRikonian/rikoring.html">List Sites</a>');
//  document.write('<a href="rikoring.html">List Sites</a>');
  document.write('</TD>');

  document.write('<TD align="right">');
  writeLink(thisInd+1, 'Next');
  document.write('</TD>');

  document.write('</TABLE>');
}

function ringTableBreakout(thisKey)
{
  getIndex(thisKey);
  document.write('<TABLE border="2" align="center">');

  //Tell if listed
  if (isListed==0)
  {
    thisInd=0;
    document.write('<TR><TD colspan="5">');
    document.write('<marquee>This is a Non-Rikonian site</marquee>');
    document.write('</TD></TR>');
  }

  document.write('<TR>');
  document.write('<TD>');
  document.write('<img src="http://members.aol.com/surfname01/pics/stormr-1.jpg">');
  document.write('</TD>');
  document.write('<TD align="center" colspan="3">');
  document.write('<font size="5" color="red"');
  document.write('face="Borg-9, Bajoran, Visitation, Black Chancery, Blood of Dracula, Serpentine dBol, Metal Lord, Comic Sans MS">');
  document.write("Lord High Rikonian's<br>Exclusive Webring</font><br><marquee>Are you Rikonian enough to be listed?</marquee>");
  document.write('</TD>');
  document.write('<TD>');
  document.write('<img src="http://members.aol.com/surfname01/pics/stormr-1.jpg">');
  document.write('</TD>');
  document.write('</TR>');
  document.write('<TR>');
  document.write('</TR>');

  document.write('<TD>');
  writeLinkBreakout(thisInd-1, 'Previous');
  document.write('</TD>');

  document.write('<TD>');
  linkFont();
//  document.write('<u><a onClick="randomSite()">Random Site</a></u></font>');
  document.write('<a href="');
  writeRandomSite();
  document.write('" target=_top>Random Site</a>');
  
  document.write('</TD>');

  document.write('<TD>');
  document.write('<a href="mailto:' + emails[thisInd] + '">Contact me</a>');
  document.write('</TD>');

  document.write('<TD>');
  document.write('<a href="http://members.aol.com/LordHighRikonian/rikoring.html">List Sites</a>');
//  document.write('<a href="rikoring.html">List Sites</a>');
  document.write('</TD>');

  document.write('<TD align="right">');
  writeLinkBreakout(thisInd+1, 'Next');
  document.write('</TD>');

  document.write('</TABLE>');
}

