the popupOpen Javascript function opens a popup window with a form and this form has it's action set to the 'login.php' script, ie when submitted, the 'login.php' script is run with passed parameters the input user name/email and password of the logged in user. So, the function expects a php script for an argument (inserted in the parenthesis).
You could insert a Javascript function that opens a popup window, something like:
Code:
var newwindow;
function popupwin(url)
{
newwindow=window.open(url,'name','height=400,width=200');
if (window.focus) {newwindow.focus()}
}
where 'url' is your image file url and then insert the anchor code anywhere in your page:
Code:
<a href="javascript: popupwin('your_domain/path_to_image/image_name');">Pop it</a>