Added newmain.js and updated image.php with image cropping