
function sm_imgview_show(image) {
	
	w = 10 ;
	h = 10 ;
	var win = window.open("imgview.php?img=" + image, "sm_imgview", "left=" + (screen.availWidth-w)/2 + ", top=" + (screen.availHeight-h)/2 + ", width=" + w + ", height=" + h + ", location=0, menubar=0, resizable=1, scrollbars=0, status=0, dependent=1") ;
	win.focus() ;
}

function sm_imgview_loaded() {
	
	var iWidth, iHeight ;
	if (self.innerHeight) { // all except Explorer
	
		iWidth = self.innerWidth ;
		iHeight = self.innerHeight ;
		
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	
		iWidth = document.documentElement.clientWidth ;
		iHeight = document.documentElement.clientHeight ;
		
	} else if (document.body) { // other Explorers
	
		iWidth = document.body.clientWidth ;
		iHeight = document.body.clientHeight ;
	}
	
	window.moveTo((screen.availWidth - document.images[0].width) / 2, (screen.availHeight - document.images[0].height) / 2) ;
	window.resizeBy(document.images[0].width - iWidth, document.images[0].height - iHeight) ;
	
	self.focus() ;
}
