// a function to show the scene results

function OpenSceneWindow(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 Replacement for Real World Scenes: ' + 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>Result </td>');
      writeln('</table>');

       writeln('<p><table boder=0>');
      writeln('<td align=left><em>Image replacement for real world scenes. Part of the left image is replaced by another region within the same image, and the result is shown on the right. Can you see which region has been removed, and which region has been copied?</em>');
      writeln('</td>');
      writeln('</table>');

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