var ns = (navigator.appName == 'Netscape');
var gen3 = (parseInt(navigator.appVersion) >= 3 && parseInt(navigator.appVersion) < 4);
var ns4 = (ns && parseInt(navigator.appVersion) >= 4 && parseInt(navigator.appVersion) < 5);
var ns5 = (ns && parseInt(navigator.appVersion) >= 5 && parseInt(navigator.appVersion) < 6);
var ie = (navigator.appName == 'Microsoft Internet Explorer');
var show="visible";
var hide="hidden";
var xoxo1 = "";
var xoxo2 = "";

if (ie) {
  xoxo1 = "all.";
  xoxo2 = "style.";
}

if (ns4) {
  show="show";
  hide = "hide";
}

current_top_panel = 1;
current_bottom_panel = 1;

function topScrollRight() {
  if(current_top_panel < num_top_panels) {
    if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'toppanel'+current_top_panel+'.'+xoxo2+'visibility=\"'+hide+'\"');
    else
      eval ('document.getElementById("toppanel'+current_top_panel+'").style.visibility =\"'+hide+'\"');
	current_top_panel++;
	if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'toppanel'+current_top_panel+'.'+xoxo2+'visibility=\"'+show+'\"');
    else
      eval ('document.getElementById("toppanel'+current_top_panel+'").style.visibility =\"'+show+'\"');
  }
}

function topScrollLeft() {
  if(current_top_panel > 1) {
    if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'toppanel'+current_top_panel+'.'+xoxo2+'visibility=\"'+hide+'\"');
    else
      eval ('document.getElementById("toppanel'+current_top_panel+'").style.visibility =\"'+hide+'\"');
	current_top_panel--;
	if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'toppanel'+current_top_panel+'.'+xoxo2+'visibility=\"'+show+'\"');
    else
      eval ('document.getElementById("toppanel'+current_top_panel+'").style.visibility =\"'+show+'\"');
  }
}

function bottomScrollRight() {
  if(current_bottom_panel < num_bottom_panels) {
    if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'bottompanel'+current_bottom_panel+'.'+xoxo2+'visibility=\"'+hide+'\"');
    else
      eval ('document.getElementById("bottompanel'+current_bottom_panel+'").style.visibility =\"'+hide+'\"');
	current_bottom_panel++;
	if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'bottompanel'+current_bottom_panel+'.'+xoxo2+'visibility=\"'+show+'\"');
    else
      eval ('document.getElementById("bottompanel'+current_bottom_panel+'").style.visibility =\"'+show+'\"');
  }
}

function bottomScrollLeft() {
  if(current_bottom_panel > 1) {
    if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'bottompanel'+current_bottom_panel+'.'+xoxo2+'visibility=\"'+hide+'\"');
    else
      eval ('document.getElementById("bottompanel'+current_bottom_panel+'").style.visibility =\"'+hide+'\"');
	current_bottom_panel--;
	if ( (ns4) || (ie))
      eval ('document.'+xoxo1+'bottompanel'+current_bottom_panel+'.'+xoxo2+'visibility=\"'+show+'\"');
    else
      eval ('document.getElementById("bottompanel'+current_bottom_panel+'").style.visibility =\"'+show+'\"');
  }
}