During development, I realized that the contents that go in the modal popup box appear for a split second when the page gets loaded. In repeated tries, I was actually able to grab a screen shot of the strange behaviour.
To get around this - simply set the popup panel's style to display:none.
And the modal popup extender code