function popup(aFileName) {
day = new Date();
id = day.getTime();
aFileName = 'images/' + aFileName;
aFileName +='.jpg';
eval("page" + id + " = window.open(aFileName, '" + id + "', 'toolbar= 0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=660,height=506');");
return false;
}
The above script assumes that you have called your file 'common.js' and that it is in the same folder as your .html files. Or, instead, do something like this: