function openImage(image,iWidth,iHeight) { //v3.0
	iMaxHeight = screen.availHeight;
	iMaxWidth = screen.availWidth;
	
	if (isNaN(iMaxHeight)) { 
		iXPos = 150;
		iYPos = 150;	
	} else {
		iXPos = ((iMaxWidth - iWidth)/2);
		iYPos = ((iMaxHeight - iHeight)/2) + 41;
	}
	iWidth = iWidth + 10;
	if (iWidth < 400) {
		iWidth = 450; 
	}
	iHeight = iHeight + 50;
	strfeatures = 'width=' + iWidth + ',height=' + iHeight;
	myWin = window.open('/photos/popup.asp?id='+image,image,strfeatures);
	myWin.moveTo(iXPos,iYPos);
	myWin.focus();
}

function openNextImage(image,iWidth,iHeight) { //v3.0
	//window.close()
	iMaxHeight = screen.availHeight;
	iMaxWidth = screen.availWidth;
	
	if (isNaN(iMaxHeight)) { 
		iXPos = 150;
		iYPos = 150;	
	} else {
		iXPos = ((iMaxWidth - iWidth)/2);
		iYPos = ((iMaxHeight - iHeight)/2) + 41;
	}
	iWidth = iWidth + 10;
	if (iWidth < 400) {
		iWidth = 450; 
	}
	iHeight = iHeight + 10;
	window.location = ('/photos/popup.asp?id='+image);
	//window.location = "http://www.mozilla.org";
	//alert(iWidth)
	//alert(iHeight)
	window.resizeTo(iWidth+10,iHeight+100);
	//moveTo(iXPos,iYPos);
	focus();
}

function openWin(URL,winName,iWidth,iHeight) { //v3.0
	iMaxHeight = screen.availHeight;
	iMaxWidth = screen.availWidth;
	
	if (isNaN(iMaxHeight)) { 
		iXPos = 150;
		iYPos = 150;	
	} else {
		iXPos = ((iMaxWidth - iWidth)/2);
		iYPos = ((iMaxHeight - iHeight)/2) + 41;
	}
	//alert('Xpos= ' + iXPos);
	//alert('Ypos= ' + iYPos);
	strfeatures = 'width=' + iWidth + ',height=' + iHeight + ',scrollbars=1';
	myWin = window.open(URL,winName,strfeatures);
	myWin.moveTo(iXPos,iYPos);
	myWin.focus();
}