var iUsedTransactionId = 0;
var iBaseHeight = 415;
var iDHeight = 10;
var iMod = 2;

function updateFlashHeight( iHeight ){
//	alert(iHeight);
	iUsedTransactionId ++;
	//alert( iUsedTransactionId );
	iTargetHeight = iBaseHeight + iHeight;
	iActualHeight = parseInt( document.getElementById( 'contactMap' ).style.height );
//	alert(document.getElementById( 'contactMap' ));
	iRunningHeight = ( iActualHeight > iHeight ) ? Math.round( ( iActualHeight - iHeight ) / iMod ) + iHeight : Math.round( ( iHeight - iActualHeight ) / iMod ) + iActualHeight; 
	window.setTimeout( "setFlashHeight( " + iRunningHeight + ", " + iHeight + ", " + iUsedTransactionId + " )", 40 );
}

function setFlashHeight( iRunningHeight, iTargetHeight, iTransactionId ){
  // only one height target
  if( iUsedTransactionId == iTransactionId ){
    rContactMap = document.getElementById( 'contactMap' );
    rContactMap.style.height = iRunningHeight + "px";
    if( iRunningHeight != iTargetHeight ){
      iRunningHeight = ( iRunningHeight > iTargetHeight ) ? Math.round( ( iRunningHeight - iTargetHeight ) / iMod ) + iTargetHeight : Math.round( ( iTargetHeight - iRunningHeight ) / iMod ) + iRunningHeight;
      window.setTimeout( "setFlashHeight( " + iRunningHeight + ", " + iTargetHeight + ", " + iTransactionId + " )", 40 );
    }
  }
}

