var DA_Window=null;
/* Opens specified existing file in a centered window */
function openWindow(spinFile) {
	// Initialize variables
	leftPos = 0;
	topPos = 0;
	imgNum = 0;
	sbars = 0;
	width = 260;
	height = 340;

	winWidth = width + 22;
	winHeight = height +26 +100;
		
	// center the window in the screen
	leftPos = ((screen.width/2)-(winWidth/2));
	topPos = ((screen.height/2)-(winHeight/2));
	if (topPos < 0){topPos = 0;}
	if (leftPos < 0){leftPos = 0;}

	// Create the window
	if (DA_Window && (!DA_Window.closed)){
	   DA_Window.close();
	}
	if (winHeight> screen.height){sbars=1; winHeight=(screen.height-60); }
		
	winParams = "resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + sbars + ",width=" + winWidth + ",height=" + winHeight + ",left=" + leftPos + ",top=" + topPos;
	DA_Window = window.open(spinFile, 'DA_Window', winParams )
	
	DA_Window.focus();
}
	
function highlightImage(curImage, size){
	curImage.border=size;
}
