Look very carefully at the original script and compare it to what has been pasted into your page.
Sometimes, when the cut and paste code contains comments, the comments get wrapped around the working code which then thinks it's part of the comment and (like all good comments) takes no part in the action. Spot the differences and fix the code.
Sample script - as shown it works (prints Hello World):
Same original - does nothing because the real script line has been added to the comment.
Same original - gives an error because the script line has been split into two
Same original - gives an error because a line break is not a javascript command (often occurs with webTV).
Always be very careful pasting javascripts. Make sure you or your editor does not generate these errors.