// common Javascript for the wt pages
function HideMenu(){
  var CenterLeftCol=document.getElementById('CenterLeftCol');
  var CenterCenterCol=document.getElementById('CenterCenterCol');
  if(CenterLeftCol.style.display == ''){
    CenterLeftCol.style.display='none';
    CenterCenterCol.style.backgroundImage='url(\/images\/split-close.gif)';
  }else{
    CenterLeftCol.style.display='';
    CenterCenterCol.style.backgroundImage='url(\/images\/split-open.gif)';
   }
}
var m='';       // this will have the on load stuff...
// addLoadEvent(<functionname>)  note: use addLoadEvent(f) and NOT addLoadEvent(f())    
function addLoadEvent(func) {
    var oldonload = window.onload;      // the old function (if any)
    var sfunc = func;
    m += "#" + typeof func + "#";
  if (typeof func == "string")                  // we may try to pass string and not a function
    {
    m += func;
    m += ' ';
    func = function(){try {eval(sfunc)} catch (e){}} ;      // evaluate later
  }
    // is the parameter was string, pack in a function
  if (typeof window.onload == "string"){        
        var o=window.onload;
        window.onload =function(){try{eval(o)}catch(e){}};
      }
  if (typeof window.onload != 'function') { // not a function? null maybe? just override...
    window.onload = func;           
  } else {
    window.onload = function() {
      if (oldonload) {oldonload();}
      try {func()} catch(e){};
    }
  }
}

// -------  used by the default.aspx main page  ------
    var lastDiv
    var lastmenu;
    var lastbg = '#0099cc';
    function changeVisibility(id){
      if (lastDiv){
        lastDiv.style.visibility='hidden';
        lastDiv.style.display='none'}
      lastDiv=document.getElementById(id);
      if(lastDiv){
        lastDiv.style.visibility='';
        lastDiv.style.display=''};
      return false;
    }
    
    function tdclick(t,id){changeVisibility(id);}
    
    function test1(a){   };

    addLoadEvent("changeVisibility('c0')");
    addLoadEvent("test1('uno')");
    // addLoadEvent("test1('dos')");
    
// ---------------------------------------------------