// JavaScript Document

// imageName = ./fotos/foto01.jpg
// imageWidth = largura da foto
// imageHeight = altura da foto
// windowName = Nome da Janela -> PS: não pode conter espaços, senao dá erro!
function openPictureWindow(imageName,imageWidth,imageHeight,windowName)
{		
        newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left=0,top=0");
        newWindow.document.open();
        newWindow.document.write('<html><title>'+windowName+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()"><div align="center">');
        newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+'>');
        newWindow.document.write('</div></body></html>');
        newWindow.document.close();
        newWindow.focus();
}
function openPictureWindowLegenda(imageName,imageWidth,imageHeight,windowName,legendaFoto)
{		
		var alturaJanela = parseInt(imageHeight) + 30;
		var larguraJanela = parseInt(imageWidth) + 2;				
        newWindow = window.open("","newWindow","width="+larguraJanela+",height="+alturaJanela+",scrollbars=no,left=0,top=0");
        newWindow.document.open();
        newWindow.document.write('<html><title>'+windowName+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()"><div align="center">');
        newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' border=1>');		
		newWindow.document.write('<br><table width="100%"  border="0" cellspacing="5" cellpadding="0">');	
		newWindow.document.write('<tr valign="middle"><td height="15" ><div align=center><font color="#000000" size="2" face="Trebuchet, Tahoma, sans-serif"><strong>'+legendaFoto+'<strong></font></div></td></tr></table>');
        newWindow.document.write('</div></body></html>');
        newWindow.document.close();
        newWindow.focus();
}
