Figures by javascript