A javascript playpen bastardised from some mozilla code to generate photomosaics