var ELEMENT_NODE = 1;

function firstNodeChild(n)
{
  var node = n.firstChild;
  while (node && node.nodeType != ELEMENT_NODE) {
    node = node.nextSibling;
  }
  return node;
}

function nextNodeSibling(n)
{
  var node = n.nextSibling;
  while (node && node.nodeType != ELEMENT_NODE) {
    node = node.nextSibling;
  }
  return node;
}

var imgRollup = new Image;
imgRollup.src = '/img/product/rollup3.small.gif';
var imgRolldown = new Image;
imgRolldown.src = '/img/product/rolldown3.small.gif';

function pause(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
} 

var nextBox;
var newClass;
function toggling()
{
  if (nextBox && firstNodeChild(nextBox).tagName!="TH") {
    nextBox.className = newClass;
    nextBox = nextNodeSibling(nextBox);
  }
  setTimeout("toggling()",200);
}

function toggle(but)
{
  var box = nextNodeSibling(but.parentNode.parentNode);
  but = firstNodeChild(but);
  if (box.className=='hidden') {
    newClass = '';
    but.src = imgRollup.src;
  } else {
    newClass = 'hidden';
    but.src = imgRolldown.src;
  }
//  nextBox = box;
//  toggling();
//  return 0;
  while (box && firstNodeChild(box).tagName!="TH") {
    box.className = newClass;
    box = nextNodeSibling(box);
  }
}

