imageNames[imageNames.length] = 'prev';
imageNames[imageNames.length] = 'next';

self.focus();
window.name = 'popups';
mainWindow = opener;