
//function openPictureWindow_alt(imageName,imageWidth,imageHeight,posLeft,posTop) {
//	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
//	newWindow.document.open();
//	newWindow.document.write('<html><head><title>'+imageName+'</title></head><body scrollbars="auto" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">'); 
//	newWindow.document.write('<table><tr><td>');
//	newWindow.document.write('<img src="'+imageName+'" width="'+imageWidth+'" height="'+imageHeight+'">'); 
//	newWindow.document.write('</td></tr></table>');	
//	newWindow.document.write('</body></html>');
//	newWindow.document.close();
//	newWindow.focus();
//}


function openPictureWindow(imageName,imageWidth,imageHeight,alt) { 
	var myWidth = imageWidth;
	var myHeight = imageHeight;
	if (screen.width < imageWidth) {
	var myWidth = (screen.width-100);
	var myLeft = 80;
	}
	if (screen.height < imageHeight) {
	var myHeight = (screen.height-100);
	var myTop = 50;
	}
	if (screen.width < (imageWidth) || screen.height < (imageHeight)){

	newWindow = window.open("","newWindow","width="+myWidth+",height="+myHeight+",scrollbars=yes,resizable=no,left="+myLeft+",top="+myTop)
	}else{
	var myLeft = (screen.width-imageWidth)/0;
   	var myTop = (screen.height-imageHeight)/0;
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+myLeft+",top="+myTop)
	}	
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
