﻿
      function openPopupTeam() {

          obj1 = document.getElementById('fadeScreen').style;
          obj2 = document.getElementById('fadeScreenContent').style;
          if (obj1.visibility == "visible") {
              obj1.visibility = "hidden";
              obj2.visibility = "hidden";
          }
          else {

              ///sdfds
           
              var pageSize = GetHeight();
              obj1.visibility = "visible";
              obj2.visibility = "visible";
              fadeScreenObj = document.getElementById('fadeScreen');
              fadeScreenObj.style.top = 0 + 'px';
              fadeScreenObj.style.left = 0 + 'px';
              fadeScreenObj.style.height = pageSize.pageHeight + 'px';
              fadeScreenObj.style.width = pageSize.pageWidth + 'px';

              contDV = document.getElementById("containerDV");
              var heightContainerDV = contDV.clientHeight;
              var widthContainerDV = contDV.clientWidth;
//              var heightContainerDV = 114;
//              var widthContainerDV = 440;
              var topContainerDV = pageSize.pageHeight - pageSize.winHeight + pageSize.winHeight / 2 - heightContainerDV / 2;
              var leftContainerDV = pageSize.pageWidth - pageSize.winWidth + pageSize.winWidth / 2 - widthContainerDV / 2;
              contDV.style.top = (topContainerDV) + 'px';
              contDV.style.left = (leftContainerDV) + 'px';
              contDV.style.height = heightContainerDV + 'px';  //114
              contDV.style.width = widthContainerDV + 'px';    //400               
              //                   contDV.style.height = (pageSize.winHeight / 2) + 'px';  //114
              //                   contDV.style.width = (pageSize.winWidth / 2) + 'px';    //400               
          }
      }
      function GetHeight() {
          var scrollX, scrollY, windowX, windowY, pageX, pageY;
          if (window.innerHeight && window.scrollMaxY) {
              scrollX = document.body.scrollWidth;
              scrollY = window.innerHeight + window.scrollMaxY;
          } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
              scrollX = document.body.scrollWidth;
              scrollY = document.body.scrollHeight;
          } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
              scrollX = document.body.offsetWidth;
              scrollY = document.body.offsetHeight;
          }

          if (self.innerHeight) {	// all except Explorer
              windowX = self.innerWidth;
              windowY = self.innerHeight;
          } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
              windowX = document.documentElement.clientWidth;
              windowY = document.documentElement.clientHeight;
          } else if (document.body) { // other Explorers
              windowX = document.body.clientWidth;
              windowY = document.body.clientHeight;
          }

          pageY = (scrollY < windowY) ? windowY : scrollY; // for small pages with total height less then height of the viewport
          pageX = (scrollX < windowX) ? windowX : scrollX; // for small pages with total width less then width of the viewport
          return { pageWidth: scrollX, pageHeight: scrollY, winWidth: windowX, winHeight: windowY };
      }
      //open HTML popUp
      var newwindow;
      function openHTMLPopup(url, name, width, height) {

          //newwindow = window.open(url, name, 'height=' + height + ',width=' + width +  ',scrollbars=yes');
          // newwindow = window.open(url, name, 'width = 800, height = 600, scrollbars = yes');
          newwindow = window.open(url, name, 'width = ' + width + ', height = ' + height + ', scrollbars = yes');
          
          if (window.focus) { newwindow.focus() }
      }
     
