/*  ****  lists.htms JavaScript Sheet  ****  */

/*  This set of scripts will display a "Window.Alert" to inform the visitor
    that he is bing redirected to an external site It works for all anchor ("a")
    links with a class name of "external"
*/    

    addLoadEvent(exitNote);

/*  ****************   exitNote   ****************  */


   function exitNote()
    {
                                       // Find all of the anchor elements.
        var anchor_list = document.getElementsByTagName("a");

                                       // Search for elements with class name = "external".
        for ( var i=0; i < anchor_list.length-1; i+=1)
               {
                  if (anchor_list[i].className == "external")
                     {
                                       // Define the necessary events.
                         var this_node = anchor_list[i];
                         this_node.onclick = exitSite;
                     }
               }            
    }
    
/*  ****************   exitSite   ****************  */

    function exitSite()
        {
            window.alert(" Your are about to leave the Venter Surname Project!  \n The Surname Project is not responsible for the content nor the \n accuracy of the information at the site to which you are going.");
            var next_site = this.getAttribute("href");
            next_site.getAttribute("target");
            window.location = next_site;       
            return false;
        }


