function ShowImage(chapter, path, caption)
{
  wnd = open("", "displayWindow", "width=700,height=600");
  wnd.document.open();
  wnd.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title>'+'</title></head>');
  wnd.document.write('<body bgcolor="CCCCCC"><center>');
  wnd.document.write('<img src="/' + chapter + '.img/' + path + '.jpg" alt="'+'"><br>');
  wnd.document.write('<br/><input type="button" value="Закрыть" onClick="window.close()">');
  wnd.document.write('</center></body></html>');
  wnd.document.close();

}

function ShowImageold(chapter, path, caption)
{
  wnd = open("", "displayWindow", "width=700,height=600");
  wnd.document.open();
  wnd.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title>' + caption + '</title></head>');
  wnd.document.write('<body bgcolor="FFFFFF"><center>');
  wnd.document.write('<img src="/' + chapter + '.img/' + path + '.jpg" alt="' + caption +'"><br>');
  wnd.document.write("<h3 style='font-family: Arial; font-weight: normal;'>" + caption + "<h3>");
  wnd.document.write('<input type="button" value="Закрыть" onClick="window.close()">');
  wnd.document.write('</center></body></html>');
  wnd.document.close();

}

function ShowVideo(path)
{
  window.open("http://okorka.ru/video/" + path + ".html","","resizable,scrollbars,width=640,height=480");
}

function preload()
{
  tn = new Array();
  var i, a = preload.arguments;
  for (i=1; i<a.length; i++)
    {
      tn[i-1] = new Image();
      tn[i-1].src = "/" + a[0] + ".img/" + a[i] + "_1tn.jpg";
    }
}
