// **********************************************************************
// *                                                                    *
// *                         The Caml Website                           *
// *                                                                    *
// *      Maxence Guesdon and Vincent Simonet, INRIA Rocquencourt       *
// *                                                                    *
// *  Copyright (c) 2002 Institut National de Recherche en              *
// *  Informatique et en Automatique.  All rights reserved.             *
// *  This software is distributed only by permission and without any   *
// *  warranty.                                                         *
// *                                                                    *
// **********************************************************************



function installCamlSidebar() { 
  if ((window.sidebar) && (window.sidebar.addPanel)) {
      try {
         window.sidebar.addPanel("Caml", 
	 SIDEBAR_URL + "/content/main.xul",""); 
      }
      catch (e) {
         alert('An error occurred when trying to add our tab to your Sidebar.');
      }
  } else { 
      alert('Sorry, you can only add the '+tabName+' tab if you are '+
            'running Netscape 7 or Mozilla.');
  } 
}


function updateField(n, v) {
  var element = document.getElementById(n);
  var newElement = document.createElement('a');
  var newText = document.createTextNode(v);
  newElement.setAttribute('href', v);
  newElement.appendChild(newText);

  var newText2 = document.createTextNode(n + '=');
  element.appendChild(newText2);
  element.appendChild(newElement);
}

function updateFields() {
  updateField('SIDEBAR_URL', SIDEBAR_URL);
  updateField('NEWS', NEWS);
  updateField('MANUAL', MANUAL);
  updateField('LIBRARY', LIBRARY);
  updateField('SEARCH', SEARCH);
}

