//if(top.frames.length>0) {top.location.href=self.location;}

function wopen(link,title,wi,he) {
   ScreenWidth = screen.availwidth;
   ScreenHeight = screen.availheight;

   xpos = (ScreenWidth/2)-wi;
   if (xpos<0) {xpos=0;}
   ypos = 30;

   window.open(link,title,'dependent=yes,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,top='+ypos+',left='+xpos+',width='+wi+',height='+he);
}

function wconfopen(project) {
   try {
      if (top.window.name!='confpopup') {
         popupwindow = window.open('confindex.php?project='+ project,'confpopup','dependent=yes,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1');
         popupwindow.name = 'confpopup';
         //self.location.href="popup.php";
         popupwindow.focus();

      } else {
         self.location.href='confindex.php?project=' + project;
      }
   } catch (e) {
      popupwindow = window.open('confindex.php?project='+ project,'confpopup','dependent=yes,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1');
      popupwindow.name = 'confpopup';
      //self.location.href="popup.php";
      popupwindow.focus();
   }
}

