function OpenImage(img1, W1, H1, title, img2, W2, H2, img3, W3, H3) {
	var win_width;
	var win_height;

	W1 = W1 * 1;
	W2 = W2 * 1;
	W3 = W3 * 1;
	H1 = H1 * 1;
	H2 = H2 * 1;
	H3 = H3 * 1;
	
	if ( img1 && !img2 && !img3 ) {
		if (W1 <= 334 ) {
			win_width = 354;
		} else {
			win_width = W1 + 20;
		}
		win_height = H1 + 43 + 20;
	}

	if ( img1 && img2 && !img3 ) {
		if (W1 + W2 <= 324 ) {
			win_width = 354;
		} else {
			win_width = W1 + W2 + 30;
		}
		if ( H1 > H2) {
			win_height = H1 + 43 + 20;
		} else {
			win_height = H2 + 43 + 20;
		}
	}

	if ( img1 && !img2 && img3 ) {
		if (W1 + W3 <= 324 ) {
			win_width = 354;
		} else {
			win_width = W1 + W3 + 30;
		}
		if ( H1 > H3) {
			win_height = H1 + 43 + 20;
		} else {
			win_height = H3 + 43 + 20;
		}
	}

	if ( img1 && img2 && img3 ) {
		if (W2 > W3 ) {
			if (W1 + W2 <= 324 ) {
				win_width = 354;
			} else {
				win_width = W1 + W2 + 30;
			}
		} else {
			if (W1 + W3 <= 324 ) {
				win_width = 354;
			} else {
				win_width = W1 + W3 + 30;
			}
		}
		if ( H1 > (H2 + H3)) {
			win_height = H1 + 43 + 20;
		} else {
			win_height = H2 + H3 + 43 + 20;
		}
	}

	W1 = parseInt(W1);
	W2 = parseInt(W2);
	W3 = parseInt(W3);
	H1 = parseInt(H1);
	H2 = parseInt(H2);
	H3 = parseInt(H3);



	win=window.open("", "picture", "width="+parseInt(win_width)+", height="+parseInt(win_height)+",top="+parseInt((screen.height-win_height)/2)+",left="+parseInt((screen.width-win_width)/2)+",toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no"  );
	win.document.write("<html><head><title>"+title+"</title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>");
	win.document.write("<body bgcolor='#FFFFFF' marginwidth='0' marginheight='0' style='margin:0;'>" );
	win.document.write("<table width='100%' border='0' cellpadding='0' cellspacing='0'>");
	win.document.write("<tr height='43px'><td align='center' colspan='2' valign='top' bgcolor='#000000'><img src='header_small.jpg' width='354px' height='43px'></td></tr>");
	win.document.write("<tr>");
	win.document.write("<td align='center' valign='top'><img src='"+img1+"' border=0 width='"+W1+"' height='"+H1+"' style='margin:10px;'></td>");
	if ( img1 && img2 && !img3 ) {
		win.document.write("<td align='center' valign='top'><img src='"+img2+"' border=0 width='"+W2+"' height='"+H2+"' style='margin:10px 10px 10px 0;'></td>");		
	}
	if ( img1 && !img2 && img3 ) {
		win.document.write("<td align='center' valign='top'><img src='"+img3+"' border=0 width='"+W3+"' height='"+H3+"' style='margin:10px 10px 10px 0;'></td>");		
	}
	if ( img1 && img2 && img3 ) {
		win.document.write("<td align='left' valign='top'>");
		win.document.write("<img src='"+img2+"' border=0 width='"+W2+"' height='"+H2+"' style='margin:10px 10px 10px 0; display:block; clear:both;'>");		
		win.document.write("<img src='"+img3+"' border=0 width='"+W3+"' height='"+H3+"' style='margin:0 10px 10px 0; display:block; clear:both;'>");		
		win.document.write("</td>");
	}
	win.document.write("</tr></table>");
	win.document.write("</body></html>");
	win.document.close();
	win.focus();
}

