function cropper(img_id, crop_id, x, y, width, height) {
  $(crop_id).each( function(i) {
  	this.update('<img id="' + crop_id + '_img" src="' +
      $(img_id,this).getAttribute('src') + '" style="display:none" />');

  var scale_x = this.getWidth() / width;
  var scale_y = this.getHeight() / height;

  this.setStyle({
    position: 'relative',
    overflow: 'hidden' 
  });

  $(crop_id + '_img',this).setStyle({
    position: 'absolute',
    display: 'block',
    left: (-x * scale_x) + 'px',
    top: (-y * scale_y) + 'px',
    width: ($(img_id,this).getWidth() * scale_x) + 'px',
    height: ($(img_id,this).getHeight() * scale_y) + 'px'
  });
  });
}
