function loadImg( path, hw )
 {
  var win;

  var s=screen, heightWin=s.height, widthWin=s.width;
  var topWin, leftWin;
  var constWidth, constHeight;

  if( hw == 'w' )
    constWidth = 670, constHeight = 490;
  else
    constWidth = 390, constHeight = 550;

  if( widthWin < constWidth )
    leftWin = 0;
  else 
    leftWin = (widthWin - constWidth)/2;

  if( heightWin < constHeight )
    topWin = 0;
  else 
    topWin = ( heightWin - constHeight )/2;

  var f='status=0,scrollbars=0,copyhistory=0,width='+constWidth+',height='+constHeight+',top='+topWin+',left='+leftWin+' ';
  
  win=window.open ( path, '', f );
}

function open_img( path )
{
  var win;
  var f='status=1,scrollbars=1,copyhistory=0,resizable=1';
  win=window.open ( path, "photo", f );
  win.focus();
}

