        var MyWindow;
        var WindowWidth  = 860;
        var WindowHeight = 600;
        var results;

        function PrintHelpText(MyWindow,HelpText,HeadText) {

//            MyWindow.document.open();

            MyWindow.document.writeln("<html>");
			MyWindow.document.writeln("<head>");
			MyWindow.document.writeln("<title>");
            MyWindow.document.writeln(HeadText);			
			MyWindow.document.writeln("</title>");
			MyWindow.document.writeln("<meta name=\"Description\" content=\"\">	");
			MyWindow.document.writeln("<meta name=\"keywords\" content=\"\">");
			MyWindow.document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">");
			MyWindow.document.writeln("<link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\">");
                        MyWindow.document.writeln("<script language=\"JavaScript\" src=\"window.js\"></script>");
			MyWindow.document.writeln("</head>");
			MyWindow.document.writeln("<body bgcolor=#ffffff bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0>");
			MyWindow.document.writeln("<table width=730 height=100% cellpadding=0 cellspacing=0 border=0>");
			MyWindow.document.writeln("<tr>");
			MyWindow.document.writeln("<td valign=top align=center>");
			MyWindow.document.writeln("<table cellpadding=0 cellspacing=0 border=0>");
			MyWindow.document.writeln("<tr>");
			MyWindow.document.writeln("<td><img src=\"images/wmonk1.jpg\" width=121 height=160 alt=\"\" border=0></td>");
			MyWindow.document.writeln("<td><img src=\"images/woldirish.gif\" width=280 height=160 alt=\"\" border=0></td>");
			MyWindow.document.writeln("<td><img src=\"images/wbottles.gif\" width=299 height=160 alt=\"\" border=0></td>");
			MyWindow.document.writeln("</tr><tr>");
			MyWindow.document.writeln("<td><img src=\"images/wmonk2.jpg\" width=121 height=46 alt=\"\" border=0></td>");
			MyWindow.document.writeln("<td><img src=\"images/wmonk3.jpg\" width=280 height=46 alt=\"\" border=0\"></td>");
			MyWindow.document.writeln("<td><img src=\"images/wgallery.gif\" width=299 height=46 alt=\"\" border=0></td>");
			MyWindow.document.writeln("</tr>");
			MyWindow.document.writeln("</table>");
			MyWindow.document.writeln("<table width=100% cellpadding=10 cellspacing=0 border=0>");
			MyWindow.document.writeln("<tr>");
			MyWindow.document.writeln("<td width=100% aling=center><p class=menu align=center>Фотографии:<br><br>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic1.html\"><img src=\"fotos/pub5-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic2.html\"><img src=\"fotos/pub6-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic3.html\"><img src=\"fotos/pub7-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic4.html\"><img src=\"fotos/pub8-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic5.html\"><img src=\"fotos/pub9-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic6.html\"><img src=\"fotos/pub10-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic7.html\"><img src=\"fotos/pub11-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic8.html\"><img src=\"fotos/pub12-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic9.html\"><img src=\"fotos/pub13-s.jpg\" width=50 height=38 alt=\"\" border=0></a><br>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic10.html\"><img src=\"fotos/pub14-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic11.html\"><img src=\"fotos/pub15-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic12.html\"><img src=\"fotos/pub16-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic13.html\"><img src=\"fotos/pub17-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic14.html\"><img src=\"fotos/pub18-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic15.html\"><img src=\"fotos/pub19-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic16.html\"><img src=\"fotos/pub20-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic17.html\"><img src=\"fotos/pub21-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic18.html\"><img src=\"fotos/pub22-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("</td>");
			MyWindow.document.writeln("</tr><tr>");
			MyWindow.document.writeln("<td align=center><p align=center>");
			MyWindow.document.writeln(HelpText);
			MyWindow.document.writeln("</td>");
			MyWindow.document.writeln("</tr>");
			MyWindow.document.writeln("</table>");
			MyWindow.document.writeln("<table width=100% cellpadding=10 cellspacing=0 border=0>");
			MyWindow.document.writeln("<tr>");
			MyWindow.document.writeln("<td width=100% aling=center><p class=menu align=center>Фотографии:<br><br>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic1.html\"><img src=\"fotos/pub5-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic2.html\"><img src=\"fotos/pub6-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic3.html\"><img src=\"fotos/pub7-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic4.html\"><img src=\"fotos/pub8-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic5.html\"><img src=\"fotos/pub9-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic6.html\"><img src=\"fotos/pub10-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic7.html\"><img src=\"fotos/pub11-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic8.html\"><img src=\"fotos/pub12-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic9.html\"><img src=\"fotos/pub13-s.jpg\" width=50 height=38 alt=\"\" border=0></a><br>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic10.html\"><img src=\"fotos/pub14-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic11.html\"><img src=\"fotos/pub15-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic12.html\"><img src=\"fotos/pub16-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic13.html\"><img src=\"fotos/pub17-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic14.html\"><img src=\"fotos/pub18-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic15.html\"><img src=\"fotos/pub19-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic16.html\"><img src=\"fotos/pub20-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic17.html\"><img src=\"fotos/pub21-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("<a class=g href=\"gallery/pic18.html\"><img src=\"fotos/pub22-s.jpg\" width=50 height=38 alt=\"\" border=0></a>");
			MyWindow.document.writeln("</td>");
			MyWindow.document.writeln("</tr>");
			MyWindow.document.writeln("</table>");
			MyWindow.document.writeln("<table width=100% cellpadding=20 cellspacing=0 border=0>");
			MyWindow.document.writeln("<tr>");
			MyWindow.document.writeln("<td align=right><p class=menu align=right><a href=\"javascript: void(1)\" onClick=\"window.close()\">Закрыть окно</a></td>");
			MyWindow.document.writeln("</tr>");
			MyWindow.document.writeln("</table>");
			MyWindow.document.writeln("</td></tr></table>");
			MyWindow.document.writeln("</body>");
			MyWindow.document.writeln("</html>");


            MyWindow.document.close();

        }

        //*** OpenHelpWindow ***

// call: <a href="javascript:void(1);" onclick="javascript: OpenHelpWindow(740,600,'<img src=\'fotos/pub5.jpg\' border=0>', 'OLD IRISH PUB в Новосибирске - Галерея&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')">


        function OpenHelpWindow(w,h,HelpText,HeadText) {

			if (!MyWindow || MyWindow.closed) {

                MyWindow = window.open("", "SYA_HLP_WINDOW",
                                       "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0," +
                                       "width=" + w + ",height=" + h);

            }else{
                CloseHelpWindow();
                MyWindow = window.open("", "SYA_HLP_WINDOW",
                                       "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0," +
                                       "width=" + w + ",height=" + h);
            }

            PrintHelpText(MyWindow,HelpText,HeadText);

            MyWindow.focus();

            return true;

        }

        //*** UpdateHelpWindow ***

        function UpdateHelpWindow(HelpText,HeadText) {

            if (MyWindow && !MyWindow.closed) { PrintHelpText(HelpText,HeadText); }

            return true;

        }

        //*** CloseHelpWindow ***

        function CloseHelpWindow() {

            if (MyWindow && !MyWindow.closed) { MyWindow.close(); }

            return true;

        }

        //*** HelpWindowHandle ***

        function HelpWindowHandle() { return MyWindow; }

        //*** MasterHandle ***

        function MasterHandle() { return self; }

        //*** CloseWindows ***

        function CloseWindows() {

            CloseHelpWindow();

            return true;

        }
//*** maxis ***
        //*** OpenGalWindow ***

        function OpenGalWindow(w,h,imgFile,titleText) {

            MyWindow = window.open(imgFile, "Gal","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0," +
                                       "width=" + w + ",height=" + h);
            MyWindow.focus();

            return true;

        }
