Feeble Attempt to Make the Javascript Work

I r not a good coder