function openImage(imageName,posLeft,posTop) {
	imageWidth = document.getElementById("img").width;
	imageHeight = document.getElementById("img").height;
	newWindow = window.open("","newWindow","width="+(imageWidth+20)+",height="+imageHeight+",status=yes, scrollbars=yes, resizable=yes");
	newWindow.document.open();
	newWindow.document.write('<html><head><title>Clique na Imagem para Ampliar</title>');
	newWindow.document.write('<style type="text/css">@import "css/main.css";</style>');
	newWindow.document.write('<script language="javascript">');
	newWindow.document.write('i=1;');
	newWindow.document.write('function aumenta(obj,imageWidth){');
	newWindow.document.write('	if(obj.width!=imageWidth*2) {');
	newWindow.document.write('		i++;');
	newWindow.document.write('    	obj.height=obj.height*2;');
	newWindow.document.write('		obj.width=obj.width*2;');
	newWindow.document.write('	} else {');
	newWindow.document.write('		i=1;');
	newWindow.document.write('    	obj.height=obj.height/2;');
	newWindow.document.write('		obj.width=obj.width/2;');
	newWindow.document.write('	};');
	newWindow.document.write('this.resizeTo(obj.width+30, obj.height+90);');
	newWindow.document.write('this.moveTo(0,0);');
	newWindow.document.write('}');
	newWindow.document.write('<'+'/script>');
	newWindow.document.write('</head>');
	newWindow.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" style="background:url(images/carrega.jpg) no-repeat center;">');
	newWindow.document.write('<div align="right"><a href="#" onClick="javascript:window.print();" onKeyPress="javascript:window.print();" class="bt_print"><img src="images/print.jpg"/>&nbsp;&nbsp;Imprimir este documento.</a></div>');
	newWindow.document.write('<a href="#"><img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Clique na Imagem Para Ampliar" border="0" onClick="aumenta(this,'+imageWidth+')"></a>'); 
	newWindow.document.write('</body></html>');
}


function openImageNew(imageName,posLeft,posTop, iWidth, iHeight) {
	imageWidth = iWidth;
	imageHeight = iHeight;
	
	newWindow = window.open("","newWindow","width="+(imageWidth+20)+",height="+imageHeight+",status=yes, scrollbars=yes, resizable=yes");
	newWindow.document.open();
	newWindow.document.write('<html><head><title>Clique na Imagem para Ampliar</title>');
	newWindow.document.write('<style type="text/css">@import "css/main.css";</style>');
	newWindow.document.write('<script language="javascript">');
	newWindow.document.write('i=1;');
	newWindow.document.write('function aumenta(obj,imageWidth){');
	newWindow.document.write('	if(obj.width!=imageWidth*2) {');
	newWindow.document.write('		i++;');
	newWindow.document.write('    	obj.height=obj.height*2;');
	newWindow.document.write('		obj.width=obj.width*2;');
	newWindow.document.write('	} else {');
	newWindow.document.write('		i=1;');
	newWindow.document.write('    	obj.height=obj.height/2;');
	newWindow.document.write('		obj.width=obj.width/2;');
	newWindow.document.write('	};');
	newWindow.document.write('this.resizeTo(obj.width+30, obj.height+90);');
	newWindow.document.write('this.moveTo(0,0);');
	newWindow.document.write('}');
	newWindow.document.write('<'+'/script>');
	newWindow.document.write('</head>');
	newWindow.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" style="background:url(images/carrega.jpg) no-repeat center;">');
	newWindow.document.write('<div align="right"><a href="#" onClick="javascript:window.print();" onKeyPress="javascript:window.print();" class="bt_print"><img src="images/print.jpg"/>&nbsp;&nbsp;Imprimir este documento.</a></div>');
	newWindow.document.write('<a href="#"><img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Clique na Imagem Para Ampliar" border="0" onClick="aumenta(this,'+imageWidth+')"></a>'); 
	newWindow.document.write('</body></html>');
}