// http://ezmofo.wordpress.com/2007/01/10/expanding-divs-or-iframes/

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 + "')", 16 );
  }
  else if (mode != "o") ((document.getElementById) ? document.getElementById(mode) : eval("document.all['" + mode + "']")).style.display="none";
}

function servOC(i) {
  var trObj = (document.getElementById) ? document.getElementById('forminline' + i) : eval("document.all['forminline" + i + "']");
 // var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  var ifObj = (document.getElementById) ? document.getElementById('inlineiframe' + i) : eval("document.all['inlineiframe" + i + "']");
  if (trObj != null) {
    if (trObj.style.display=="none") {
      ifObj.style.height = "0px";
      trObj.style.display="";
      //nameObj.style.background="#ECECD9";
     //if (!ifObj.src) ifObj.src = href;
      smoothHeight('inlineiframe' + i, 0, 270, 30, 'o');
    }
    else {
     //nameObj.style.background=nColor;
      smoothHeight('inlineiframe' + i, 270, 0, 30, 'forminline' + i);
    }
  }
}