  
  // initialize document called from <body> onload
  function initdoc()
  {
    var cont=document.getElementById("content");
    cont.style.visibility="hidden";
    init();
    createShadows();
    xml = new XMLProcessor("menutemplate.xsl")
    doc = document.getElementById("menutab")
// menutabieh.xml defines the tabs 
    if(xml.apply(doc,"menutabieh.xml"))
    {
        doc = document.getElementById("footerlinks");
// menufooter.xml defines the links at in the footer
        xml.apply(doc,"menufooter.xml");
//      	urlchangetimer();
    }
	  window.onresize = function() 
    {
        OnResize();
	  }  
    OnResize();
    cont.style.visibility="visible";  
  }
  function findpages()
  {
    var el=document.getElementById("query")
    var el2=document.getElementById("asearch");
    el2.href = "search.php?q="+el.value;
  }
  function OnResize()
  {
  	var elref = document.getElementById("content");
    var top = getRealTop(elref);
    var left = getRealLeft(elref);
    var right = getRealRight(elref);    
  }
  
  function urlchangetimer()
  {
   window.setTimeout("urlchangetimer()",500);
   var loc = document.location.href;
   if(loc != CurrentURL)
   {
      CurrentURL = loc;
      var args = new String(location.href);
      args = args.split("#top#");
      var url = args[0]
      if(args.length > 1)
      {
       page=args[1];
 	     menuItemSelect('mn1',page);
      }
   }
  }

