/* qlhtml.js - html quick link menu - 2006.06.27 */

function view($pg){
 var $loc = 'http://geoffmclane.com/html/'+$pg;
 window.location.href=$loc;
}

function item( lnk, dsc, fd )
{
 this.lnk = lnk;
 this.dsc = dsc;
 this.fd = fd;
}

function QuickLinks()
{
 var n, max;
 var $dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
 var $fn = location.href.substring($dir.length,location.href.length+1);
 var ma = new Array(
  new item( "index.htm", "2006/06/27", "HTML Index" ),
  new item( "dhtml-01.htm", "2006/06/27", "Dynamic HTML" ),
  new item( "css.htm", "2006/06/27", "css - a brief view" ),
  new item( "css-02.htm", "2010/03/16","css - brief summary" ),
  new item( "html.htm", "2006/06/27", "HTML" ),
  new item( "html1.htm", "2005/05/16", "HTML Reference" ),
  new item( "dhtml2.htm", "2005/05/13", "DHTML2" ),
  new item( "dhtml-02.htm", "2005/05/13", "DHTML-02" ),
  new item( "dhtml.htm", "2005/05/13", "DHTML" )
 );
 max = ma.length;
 document.writeln("<table width=\"100%\">");
 document.writeln("<tr><td align=\"center\">");
 document.writeln("<form method=\"post\" name=\"tops\" action=\"\">");
 document.writeln("<b>Quick Links</b> ");
 document.writeln("<select name=\"tops\">");
 var $selnx = 0;
 for( n = 0; n < max; n++ )
 {
  var $opt = "<option value=\"" + ma[n].lnk;
  if( $selnx ) {
   $opt += "\" selected>";
   $selnx = 0;
  } else {
   $opt += "\">";
  }
  $opt += (ma[n].fd + " (" + ma[n].dsc + ")");
  document.writeln($opt);
  document.writeln("</option>");
  if( ma[n].lnk == $fn ) {
   $selnx = 1;
  }
 }
 document.writeln("</select>");
 document.write("<input type=\"button\" value=\"Go\" onClick=\"view(document.tops.tops[document.tops.tops.selectedIndex].value)\" name=\"button\">");
 document.writeln("</form>");
 document.writeln("</td></tr>");
 document.writeln("</table>");
}

/* eof - qlhtml.js */

