
<!-- Paste this code into an external JavaScript file named: linkList.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Lee Underwood :: http://javascript.internet.com/ */

// With thanks to CrazyMerlin and konithomimo over at the
// Web Developer.com JavaScript forums

function linkList() {
  if (!document.getElementsByTagName) return false;
  var theTitle=document.getElementsByTagName("a");
  if (theTitle.length>0) {
    document.write("<h4>• Links Listed on Page</h4>");
    for (i=0; i<theTitle.length; i++) {
      if (theTitle[i].className == "link") {
        var titleText = theTitle[i].title;
        document.write("• <a href=\'"+theTitle[i]+"\'>"+titleText+"</a><br>");
      }
    }
  }
}
