http://www.developer.com/lang/other/article.php/612081/Do-the-Math.htm
Take a Tip... Okay, let's do some math! We have the image's height, width, and will soon have a new height from the user. Here's the script and its effect once again.
Do the Math
June 23, 1999