/* Modo de usar: javascript:popimg('img/imagem.jpg',''); */

function popimg () { // cria uma janela para mostrar uma imagem
	var img, attribs, a = popimg.arguments;
	img = a[0];
	attribs = "\'scrollbars="+a[2]+",resizable=yes\'";
	viewer = window.open ('',a[1],attribs);
	doc = viewer.document;
	doc.open();
	doc.write ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<title>Pousada Max</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n<style type=\"text/css\">body {margin:0; padding:0;}</style>\n</head>\n<body onLoad=\"window.focus();resdetect()\">\n');
	doc.write ('<a href="JavaScript:self.close()"><img src=\"'+img+'\" name=pop border=0 title="Fechar" alt="Fechar"/></a>\n');
	doc.write ('<script type="text/javascript" language="JavaScript">function resdetect(){if((screen.Width <= (document.images.pop.width)) && (screen.availHeight <= (document.images.pop.height))){window.resizeTo(screen.Width, screen.availHeight)}else{window.resizeTo(document.images.pop.width+10,document.images.pop.height+60)}}</script>\n</body>\n</html>');
	doc.close();
}