﻿// JScript File
  var visibleVar="null";
  var layerRef="null",styleSwitch="null",visibleVar="null";
  function init()
  {
    if (navigator.appName == "Netscape")
    {
      layerRef="document.layers";
      styleSwitch="";
      visibleVar="show";
    }
    else
    {
      layerRef="document.all";
      styleSwitch=".style";
      visibleVar="visible";
    }
  }
  function showHideLayerSwitch(layerName)
  {
    if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar'))
      hideLayer(layerName);
    else
      showLayer(layerName);
  }

  function showLayer(layerName)
  {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
  }
  function hideLayer(layerName)
  {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
  }

function selectExample(namePhoto, idPhoto) {
    myWin= open("", "Example","width=500,height=500,status=yes,toolbar=no,menubar=yes")
    
    // открыть объект document для последующей печати 
    myWin.document.open();
  
    // генерировать новый документ 
    myWin.document.write("<html><head><title>");
    myWin.document.write(namePhoto);
    myWin.document.write("</title></head><body>");
    myWin.document.write("<center><div style='width: 360px; height: 420px; font-family: Verdana; font-size: 10pt; font-weight: bold; color: Gray; text-align: left;'>");
    myWin.document.write("<img src='examples/");
    myWin.document.write(idPhoto)
    myWin.document.write(".jpg' width='360' height='360' alt='");
    myWin.document.write(namePhoto);
    myWin.document.write("' /><p>");
    myWin.document.write(namePhoto)
    myWin.document.write("</p></div>");
    myWin.document.write("<div style='background-color: Gray; color: White; font-family: Verdana; font-size: 10pt; text-align: center;'><p style='padding: 4px; margin: 0px;'>&copy&nbsp;2006 СМороз. Все права защищены.</p><p style='padding: 4px; margin: 0px;'>Проект разработан: &laquo;In-Lab Studio&raquo;</p></div>");
    myWin.document.write("</center></body></html>");

    // закрыть документ - (но не окно!)
    myWin.document.close();
}

