nn4 = document.layers;
ie4 = document.all;
nn6 = document.getElementById && !ie4;

function w(imgName, winWidth, winHeight){
	if (nn4 || ie4 || nn6){
		posX = Math.round((screen.width - winWidth) / 2);
		posY = Math.round((screen.height - winHeight) / 2);
		posCode = (nn4 || nn6)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
	}else{
		posCode = "";
	}
	newWindow = window.open('','','menubar=no,toolbar=no,scrollbars=no,status=no,width='+winWidth+',height='+winHeight+','+posCode);

	newWindow.document.clear();
	newWindow.document.open('text/html');
	newWindow.document.write('<html><head><title>' + location.hostname + '</title><style type="text/css">body,html{margin:0px;padding:0px}</style></head><body><img src="' + imgName + '" alt="" width="' + winWidth + '" height="' + winHeight + '"></body></html>');
	newWindow.document.close();

	if (newWindow.focus()) newWindow.focus();
	return false;
}
