VERY VERY Terrible js, but it work (not good)

с горем пополам