
function JumpLink(opt, url)
{
  this.opt = opt;
  this.url = url;
}

// The contents we wish to scroll through
var jumpLinks = new Array();

jumpLinks[0] = new JumpLink('The Lunar Loony', 'http://www.lunarloony.com/');
jumpLinks[1] = new JumpLink('TNT Disco', 'http://www.tntdisco.co.uk/');
jumpLinks[2] = new JumpLink('EZONE', 'http://www.tntweb.f9.co.uk/ezone/');
jumpLinks[3] = new JumpLink('MORE', 'http://www.tntweb.f9.co.uk/more/');

function jumpSelect()
{
  debug('jumpSelect()');

  var selectObj = document.forms[0].elements[0];
  var selectedIdx = selectObj ? selectObj.selectedIndex : -1;

  debug('Selected index=' + selectedIdx);

  if (selectObj && selectedIdx > 0 && selectedIdx < selectObj.length)
  {
    var url = selectObj[selectedIdx].value;
    if (url && url != '')
    {
      debug('Loading url "' + url + '"');

      self.window.open(url, "_blank");
    }
  }
}

function jumpWrite(doc)
{
  doc.writeln('Alternatively use the box below to link straight to a selection.<br>');
  doc.writeln('<table border=0 cellpadding=2 cellspacing=0>');
  doc.writeln('<tr><td valign=middle class=jumpform><font size=3><form ');
  doc.writeln('onSubmit="javascript:jumpSelect();"><select ');
  doc.writeln('onChange="javascript:jumpSelect();">');
  for (var i = 0; i < jumpLinks.length; i++)
  {
    doc.writeln('<option value=' + jumpLinks[i].url + '>' +
      jumpLinks[i].opt + '</option>');
  }
  doc.writeln('</select></font></td>');
  doc.writeln('<td valign=middle class=linkform><font size=3><span id=jumpBut');
  doc.writeln('style="position:relative; visiblity:hidden;"><a name=jumpLnk');
  doc.writeln('href="javascript:jumpSelect();" target="_self"');
  doc.writeln('title="Click to view this selection"><img name=jumpImg ');
  doc.writeln('src="../images/enterup.gif" height=24 width=24 border=0');
  doc.writeln('alt="Click to view this selection"></a></span></font></td>');
  doc.writeln('</tr></table>');
}
