A javascript object for paginating long texts