var STEP_SIZE = 20;
var INTERVAL = 50;
var _targetHeight = parseInt(240);

function setFlashHeight(height) {
  _targetHeight = parseInt(240) + parseInt(height);
//  alert("new height = " + targetHeight);
  
  setTimeout("stepFlashHeight()", INTERVAL);
}

function stepFlashHeight() {
  var flash = document.getElementById("flashmovie");
  var currentHeight = parseInt(flash.getAttribute("height"));
  
//  alert("currentheight = " + currentHeight);
  
  var newHeight = _targetHeight;
  
  var difference = _targetHeight - currentHeight; 
  if(difference < -STEP_SIZE) {
    newHeight = currentHeight - STEP_SIZE;
    setTimeout("stepFlashHeight();", INTERVAL);
  } else if (difference > STEP_SIZE) {
    newHeight = currentHeight + STEP_SIZE;
    setTimeout("stepFlashHeight();", INTERVAL);
  } else {
    newHeight = _targetHeight;
  }
  flash.setAttribute("height", newHeight);
}
