function onEndCrop( coords, dimensions ) {
  $('cropX').value = coords.x1;
  $('cropY').value = coords.y1;
  $('cropWidth').value = dimensions.width;
  $('cropHeight').value = dimensions.height;
}

Event.observe(window, 'load', function() { 
new Cropper.Img('cropImage',{displayOnInit:true,minWidth:480,minHeight:502,ratioDim:{x: 480,y:502},onEndCrop:onEndCrop});
new Draggable( 'test-abs' );
});

				