var showImage ;

function popUp(image) {	
	image = image.replace('thumb.', 'full.') ;
	thisImage = new Image() ;
	thisImage.src = (image) ;
	popUpResize(image) ;
}

function popUpResize(image) {
	if((thisImage.width != 0) && (thisImage.height != 0)) {
		popUpDisplay(image) ;
	}
	else {
		doResize = "popUpResize('"+image+"')" ;
		resizeDelay = setTimeout(doResize, 20) ;
	}
}

function popUpDisplay(image) {
	newWidth = thisImage.width + 20 ;
	newHeight = thisImage.height + 20 ;
	popUpDim = "width="+newWidth+",height="+newHeight ;
	showImage = window.open(image, "popUp", popUpDim+", resizable=1, scrollbars=1") ;
}
