
// ----------------------------------------------------------------------------
// automatic table of contents trick
// ----------------------------------------------------------------------------
// from http://lekkimworld.com/2005/08/01/using_javascript_to_generate_table_of_contents_for_a_webpage.html

function buildTOC() {
   // get bullet list holder
   var toc = document.getElementById("toc");
   
   // get all anchors on the page
   var anchors = document.anchors;
   for (var i=0; i<anchors.length; i++) {
      // create list item
      var li = document.createElement("li");

      // create text for anchor in TOC
      var txt = null;
      if (document.all) {
         txt = document.createTextNode(anchors[i].innerText);
      } else {
         txt = document.createTextNode(anchors[i].text);
      }

      // create anchor
      var a = document.createElement("a");
      a.href = "#" + anchors[i].name;
      
      // add text to anchor
      a.appendChild(txt);      

      // add anchor to list element
      li.appendChild(a);

      // add list item to list
      toc.appendChild(li);
   }
}

// set onload event handler
window.onload = buildTOC;

//[<ul id="toc"></ul>
//<script type="text/javascript"> ... </script>]
//[<a name="section1" class="no_style">]Section 1[</a>]
// ...
//[<a name="section2" class="no_style">]Section 2[</a>]
//...
//[<a name="section3" class="no_style">]Section 3[</a>]
//...

// ----------------------------------------------------------------------------
// stat counter
// ----------------------------------------------------------------------------
// for coccinelle 
//var sc_project=2778905; 
//var sc_invisible=0; 
//var sc_partition=28; 
//var sc_security="84a2a516"; 
//var sc_text=2; 
//
//Visits: 
//<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c29.statcounter.com/2778905/0/84a2a516/0/" alt="blog counter" /></a></div></noscript>
//<a href="http://my.statcounter.com/project/standard/stats.php?project_id=2778905&amp;guest=1">View Stats</a>


// for homepage
//<!-- Start of StatCounter Code -->
//<script type="text/javascript">
//sc_project=3744224; 
//sc_invisible=0; 
//sc_partition=45; 
//sc_security="3c393ea2"; 
//sc_text=2; 
//</script>
//
//<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a href="http://www.statcounter.com/free_invisible_web_tracker.html" target="_blank"><img class="statcounter" src="http://c46.statcounter.com/3744224/0/3c393ea2/0/" alt="hit tracker" ></a></div></noscript>
//<!-- End of StatCounter Code --><br><a href="http://my.statcounter.com/project/standard/stats.php?project_id=3744224&guest=1">View Stats</a>


// ----------------------------------------------------------------------------
// add last modified via javascript ?





// ----------------------------------------------------------------------------
//;src: homepage of nicolas palix, phoenix group, labri
//;<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAtLKd9HAzi4SK5kgUZEMDQRQZoDWODywnOHPh0fIktZ3dxcsGqBRjBoq8VwtfTjNGwL3LCy3aaXnoeQ" 
//;            type="text/javascript"></script>
//;
//;    <a name="LaBRI"><div id="map" style="width: 1000px; height: 700px"></div></a>
//;    <script type="text/javascript">
//;    //<![CDATA[
//;
//;    var point = new GLatLng(44.80834530507879,-0.5967807769775391);
//;    var map = new GMap2(document.getElementById("map"));
//;    map.addControl(new GLargeMapControl());
//;    map.setCenter(point, 16);
//;    map.setMapType(G_HYBRID_MAP);
//;
//;
//;    var marker = new GMarker(point);
//;    var html = "This is the <b><a href=\"http://www.labri.fr\">LaBRI</a></b><br/>where I work in the <a href=\"http://phoenix.labri.fr\">Phoenix team</a>";
//;
//;	GEvent.addListener(marker, 'click', function() {
//;		marker.openInfoWindowHtml(html);
//;	});
//;    
//;    map.addOverlay(marker);
//;    
//;    //]]>
//;    </script>
