function loaddynamic()
{
  
  /* Close Window link */
  var content = document.getElementById("content");
  if(content)
  {
    var para = document.createElement("p");
    content.appendChild(para);
    var anchor = document.createElement("a");
    para.appendChild(anchor);
    var text = document.createTextNode("Close Window");
    anchor.appendChild(text);

    para.className = "more";
    anchor.href="#closewindow";
    anchor.onclick=function() 
    {
      window.close();
      return false;
    }
  }


}

//DOM-ready watcher
function domReady()
{
  //start or increment the counter
  this.n = typeof this.n == 'undefined' ? 0 : this.n + 1;
  
  //if DOM methods are supported, and the body element exists
  //(using a double-check including document.body, for the benefit of older moz builds [eg ns7.1] 
  //in which getElementsByTagName('body')[0] is undefined, unless this script is in the body section)
  //>>> and any elements the script is going to manipulate exist
  if
  (
    typeof document.getElementsByTagName != 'undefined' 
    && (document.getElementsByTagName('body')[0] != null || document.body != null)
      && document.getElementById('content') != null 
  )
  {
  //>>>-- DOM SCRIPTING GOES HERE --<<<
  
  
    loaddynamic();


  //>>>-----------------------------<<<
  }

  //otherwise if we haven't reached 60 (so timeout after 15 seconds)
  //in practise, I've never seen this take longer than 7 iterations [in kde 3.2.2 
  //in second place was IE6, which takes 2 or 3 iterations roughly 5% of the time]
  else if(this.n < 60)
  {
    //restart the watcher
    //using the syntax ('domReady()', n) rather than (domReady, n)
    //because the latter doesn't work in Safari 1.0
    setTimeout('domReady()', 250);
  }
};
//start the watcher
domReady();

