function mostrar_foto(x,w,h)
{
	var l = ( (window.screen.width  - w) / 2 );
	var t = ( (window.screen.height - h) / 2 );
	var popup=window.open('','mostrar_foto','leftmargin=0,topmargin=0,marginheight=0,marginwidth=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,top='+t+',left='+l+',screenX='+l+',screenY='+t+',height='+h+',width='+w+'');

	d=popup.document;
	// these lines set the foreground & background color.
	d.write('<title>'+x+'</title>');
	d.write('<center><form>');
	// this line sets the image as background
	// the image tag.
	d.write('<table border="0" width="100%" height="100%" valign="middle">')
	d.write('  <tr>')
	d.write('    <td width="100%">')
	d.write('<center>')
	d.write('<img name="img" src="" alt="" border="1" onClick="self.close()"><br><br>');
	d.write('<body bgcolor="#ffffff">')
	d.write('<input type="button" value="Fechar" onClick="self.close()">')
	d.write('</form></center>')
	// these lines displays the image.
	d.write('</center>')
	d.write('    </td>')
	d.write('  </tr>')
	d.write('</table>')
	d.images["img"].src=x
	d.close();
}
