var smooth_timer;

function smoothHeight(id, curH, targetH, stepH, mode) {
  diff = targetH - curH;
  if (diff != 0) {
    newH = (diff > 0) ? curH + stepH : curH - stepH;
    ((document.getElementById) ? document.getElementById(id) : eval("document.all['" + id + "']")).style.height = newH + "px";
    if (smooth_timer) window.clearTimeout(smooth_timer);
    smooth_timer = window.setTimeout( "smoothHeight('" + id + "'," + newH + "," + targetH + "," + stepH + ",'" + mode + "')", 20 );
  }
  else if (mode != "o") ((document.getElementById) ? document.getElementById(mode) : eval("document.all['" + mode + "']")).style.display="none";
}

function servOC(i, href) {
  var tabupObj = (document.getElementById) ? document.getElementById(i + 'up') : eval("document.all['" + i + "up']");
  var tabdownObj = (document.getElementById) ? document.getElementById(i + 'down') : eval("document.all['" + i + "down']");
  var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
  var ifObj = (document.getElementById) ? document.getElementById('ihif' + i) : eval("document.all['ihif" + i + "']");
  if (trObj != null) {
    if (trObj.style.display=="none") {
      trObj.style.display="";
      if (!ifObj.src) ifObj.src = href;
      smoothHeight('ihif' + i, 0, 210, 42, 'o');
      tabupObj.style.display="none";
      tabdownObj.style.display="";
    }
    else {
      smoothHeight('ihif' + i, 210, 0, 42, 'ihtr' + i);
      tabupObj.style.display="";
      tabdownObj.style.display="none";
    }
  }
}

