Centered Pop Up

In using the tutorial for the ‘centered pop-up’ found on this site, I have encountered a repeating problem. It goes like this:

MainPage > button loads movie that contains more buttons.

The new buttons then utilizes the ‘centered pop-up’ to load the individual windows of the site.

On the first time through the site, the button for the pop up will be pushed & the main page will go blank and give a syntax error, never popping up the pop up.

Refresh page & second time through this will not happen, everything loads as it should - no errors.

What is this & where is it coming from?

Can we see??