function new_window(_path, _width, _height, _name) {
         LeftPosition = (screen.width) ? (screen.width-_width)/2 : 0;
         TopPosition = (screen.height) ? (screen.height-_height)/2 : 0;
         wind = parent.open(_path,'popupWindow','toolbar=0, status=0, location=0, resizable=no, scrollbars=1, width='+ _width +', height='+ _height +', top='+ TopPosition +', left='+ LeftPosition +'');
    //     wind = parent.open(_path,_name,'toolbar=1, status=1, location=1, resizable=yes, scrollbars=1');
         wind.focus();
}

function toOpenedWindow(_path, _width, _height, _name) {
         wind = self.parent.location.href(_path);
         wind.focus();
}

function toIndex(_path) {
         self.parent.location.href(_path);
}


function toOpenerViewMode(path) {
         wind = self.opener.parent.location.href(path);
         window.close();
         wind.focus();
}



function fixed_window(_path, _name) {
         _width = 1000;
         _height = 700;
         LeftPosition = (screen.width) ? (screen.width-_width)/2 : 0;
         TopPosition = (screen.height) ? (screen.height-_height)/2 : 0;
         wind = parent.open(_path,'popupWindow','toolbar=0, status=0, resizable=no, scrollbars=1, width='+ _width +', height='+ _height +', top='+ TopPosition +', left='+ LeftPosition +'');

         wind.focus();
}

function disableParent(_value) {     
  if (document.all.selectParent) { 
      if ((_value == 'menu2') || (_value == 'service')) document.all.selectParent.style.visibility = 'hidden';
      else document.all.selectParent.style.visibility = 'visible';  
  }       
  if (document.all.MenuTitle) { 
      if (_value == 'service') document.all.MenuTitle.style.visibility = 'hidden';
      else document.all.MenuTitle.style.visibility = 'visible';
  }    
}

var wind1 = null;

function show_image(_path, _width, _height) {

         LeftPosition = (screen.width) ? (screen.width-_width)/2 : 0;
         TopPosition = (screen.height) ? (screen.height-_height)/2 : 0;
         wind1 = window.open(_path,'','toolbar=0, status=0, resizable=no, scrollbars=0, width='+ _width +', height='+ _height +', top='+ TopPosition +', left='+ LeftPosition +'');
         wind1.focus();
}

function update_mainFrame() {
              window.opener.parent.frames[1].location.reload();
              window.close();
          }

function updateFrames() {
         self.opener.parent.location.reload();
         window.close();
}

function updateAddNews(path) {
         self.opener.parent.location.href(path);
         window.close();
}



