// a function to show the image extrapolation results

function OpenExtrapolationWindow(oImageName, sImageName, nameTag)
{
   // create the window
   var features = 'resizable=yes,scrollbars=yes';
   var newWindow = open('', 'textureWindow', features);

   // write the document content
   with(newWindow.document)
   {
      open();
      writeln('<html>');
      writeln('<head>');
      writeln('<center><title>');
      writeln('Image Extrapolation Example: ' + nameTag);
      writeln('</title></center>');
      writeln('<body bgcolor="#FFF8EF">');
      writeln('<center>');
      writeln('<p><table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0>');
      writeln('<td valign=middle align=center>');
      writeln('<p><table border=0 cellspacing=20%>'); 
      writeln('<td align=center><img src="' + oImageName + '"> <br>Original </td>');
      writeln('<td align=center><img src="' + sImageName + '"> <br>Extrapolated </td>');
      writeln('</table>');

      writeln('<p><table boder=0>');
      writeln('<td align=left><em>Texture Extrapolation Example. (Left) Texture sample (Right) Extrapolated result. Note that the central portion is the same as the original.</em>');
      writeln('</td>');
      writeln('</table>');

      writeln('</td>');
      writeln('</table>');
      writeln('</center>');
      writeln('</body>');
      writeln('</head>');
      writeln('</html>');
      close();
   }
}
