﻿function openWindow(img, width, height)
        {       
                var NewWindow
                var left = (screen.width-width)/2;
                var top = (screen.height-height)/2;

                var sFeatures = "top="+top+", left="+left+", width="+width+", height="+height+", "
                        + "toolbar=no, menubar=no, location=no, directories=no, resizable=no, scrollbars=no";
                NewWindow = open("", "myWin", sFeatures, true);
                NewWindow.document.open();
                NewWindow.document.writeln("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"+
                "<html xmlns='http://www.w3.org/1999/xhtml'>"+
                "<head>"+
                    "<title>ФОТО</title>"+
                "</head>"+
                "<body style='margin: 0px; padding: 0px'>"+
                "<img src='"+img+"' width='"+width+" 'height='"+height+"' alt='' />"+
                "</body>"+
                "</html>");
                NewWindow.document.close();
}


   function onload_function() {
       var cont = document.getElementById("container").offsetHeight;
       document.getElementById("sh_1").style.height = cont + "px";
       document.getElementById("sh_2").style.height = cont + "px";

       var body_height = document.getElementById("body_container").offsetHeight;
       var body_width = document.getElementById("body_container").offsetWidth;
       var blink = document.getElementById("page_blink");

       blink.style.width = body_width + "px";
       if (body_height >= blink.offsetHeight) {
           blink.style.top = ((body_height - blink.offsetHeight) / 2) + "px";
       } else {
           blink.style.height = body_height + "px";
       }    
       if (navigator.userAgent.indexOf('MSIE 6') != -1) blink.style.behavior = "url(\"../png.htc\")";

       var link = document.getElementById("blinking_link");
       var i = 1;
       setInterval(function() { i *= (-1); if (i == 1) { link.className = "top_menu_four"; } else { link.className = "top_menu_four_1"; } }, 500);
   }
