You have extra semicolons in your code:
if(document.getElementById('Paddle2').style.top=="251px");
^ = empty statement
{ /* A block of code */ }
In example above, if truthy, it executes an empty statement, and the codeblock will be executed anyway, despite of the result of the comaprison. Just remove all semicolons after if
s.
if
at MDN
Also code blocks should not end with semicolon, unless they are a part of declaration or definition.