i almost achieved what i wanted except of one problem...this is my script now:
function win10(IMG,TITLE,DESCR,IMG2)
{
var win = new Window({className: "alphacube", title: TITLE, width:785, height:500});
win.getContent().innerHTML = "<img src='pressimg/" + IMG + "' /><br><div align='center' class='gold'><a href=\"javascript:win10('" + IMG +"','TITLE','DESCRIPTION','" + IMG2 +"')\" target='_self'>image 1</a> | <a href=\"javascript:win10('" + IMG2 +"','TITLE','DESCRIPTION','" + IMG +"')\" target='_self'>image 2</a></div><br>" + DESCR + "<br>";
win.setDestroyOnClose();
win.showCenter();
win.setConstraint(true, {left:20, right:20, top: 30, bottom:10})
win.toFront();
}
This will open the second picture in a new popup, and this is normal as the script contains the following command: var win = new Window({className: "alphacube", title: TITLE, width:785, height:500});
What i want to do is to add an if statement that will somehow display the picture in the same window, but unfortunately i'm not that good with javascript so i'll need some help...