var photoWindow;

function openPhotoViewer(productID, currentImage){
	if (photoWindow != null){
		photoWindow.close();	
	}
	photoWindow = window.open("image_viewer.php?ProductID=" + productID + "&Image=" + currentImage , "PhotoViewer", "width=660, height=575, top = 40, left = 100");	
}