function popupView(img) { 
	photo= new Image(); 
	photo.src=(img); 
	checkPhoto(img); 
} 

function checkPhoto(img){ 
	if((photo.width!=0) && (photo.height!=0)) { 
		showPhoto(img); 
	} 
	else { 
		tryAgain="checkPhoto('"+img+"')"; 
		interval=setTimeout(tryAgain,20); 
	} 
} 

function showPhoto(img){ 
	iLength=photo.width+20; 
	iHeight=photo.height+20; 
	sParameters="width="+iLength+",height="+iHeight; 
	window.open(img,"",sParameters); 
} 

