var popUpWin=0; 

/*
Opens a popup window with the image being passed in.
The window will be of the specified width and height.
If no width or height defined, those defined below will be used for the window.
*/
function openImage(image, width, height) 
{ 
	if(width=="" || width==undefined)
		width=400;
	if(height=="" || height==undefined)
		height=400;
	
	if(popUpWin) 
	{ 
		if(!popUpWin.closed) 
			popUpWin.close(); 
	} 
	
	//add the directory information to the image
	//URLStr = "assets/images/" + image;
	URLStr = image;
	
	//open the window
	popUpWin = window.open(URLStr, 'ImageDetail', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+''); 
	
	//set the focus to the window, in case function is called many times
	popUpWin.focus();
}