Image Resizer written for JavaScript