A very simple project that will take one number and convert it to another based on a ratio of two ranges... I basically copied the documented "under the hood" code from Arduino's map() function, and it seems to work great! See inside to do anything, and you're welcome to backpack the script!
Here's some documentation on Arduino's map function, it'll probably explain it better than I can http://www.arduino.cc/en/Reference/Map