
var pop;

function openPopup ( url, w, h) {
    cx = (screen.width - w) / 2;
    cy = (screen.height - h) / 2;
    
    if ( pop && pop.closed != true )
      {
        pop.close();
      }
   	pop = window.open(url,
                      '',
                      'top=' + cy + ',left=' + cx
                      + ',width=' + w 
                      + ',height=' + h
                      + ',resizable=yes,scrollbars=no,menubar=no,location=no,toolbar=no,dependend=yes');
   pop.focus();
}


function openDlg ( url ) {
	h = 120;
	w = 240;
    
    if ( pop && pop.closed != true )
      {
        pop.close();
      }
	pop = window.open(url,
                      '',
                      'top=0,left=0,width='
                      + w + ',height='
                      + h - 50
                      +
                      ',resizable=yes,scrollbars=yes,menubar=no,location=no,toolbar=no,dependend=yes');
    pop.resizeTo(w, h);
    pop.moveTo( screen.width / 2, screen.height / 2);
    pop.focus();
}


function close_this()
{
  opener.location.reload();
  window.close();
}

