Well, I figured out a solution. Just in case someone in the future has the same problem as me, here's what I did:
(1) Delete all that script in the <head> section (2) Do this in the <body>: <a href="%%picture%%" rel="lytebox"><img style="display:none" src="% %picture%%" onLoad="this.style.display='block'" alt=""></a> So all I did was call up a picture in the database (which may or may not exist), giving it a default state of 'display:none', and if it actually found a picture, then show it. Seems kind of...improper, but it works in both IE6 and FF, which is good enough for me.