function displayPopImg( linkObj )
{
    bbPopWin = window.open( "", "bbPopper", "scrollbars=no,status=yes,top=10,left=10,width=350,height=350,resizable=yes" );
    bbPopWin.document.open();
    bbPopWin.document.write
    (   '<html><head><title>Budget Ballons</title>'
      + '<meta http-equiv="imagetoolbar" content="no" />'
      + '<style type="text/css">BODY{margin:0}</style>'
      + '<script language="JavaScript" type="text/javascript" src="/budgetballoons.js"></script>'
      + '</head>'
      + '<body oncontextmenu="return false" onload="setTimeout(\'resizeWinOnImg(document.bbOrigPhoto)\',200);">'
      + '<img name="bbOrigPhoto" id="bbOrigPhoto" src="' + linkObj.href + '" />'
      + '</body></html>'
    );
    bbPopWin.document.close();
    bbPopWin.focus();
}

function resizeWinOnImg( imgObj )
{
    // detect img dimensions
    var iw = imgObj.width;
    var ih = imgObj.height;
    if ( iw == null || ih == null ) { return; }
    // detect user screen resolution
    var sw = screen.availWidth;
    var sh = screen.availHeight;
    if( sw == null || sh == null ) { return; }
    // resize window
    var nw = ( (iw+8) > (sw-20) ) ? (sw-20) : (iw+8);
    var nh = ( (ih+48) > (sh-40) ) ? (sh-40) : (ih+48); 
    window.resizeTo( nw, nh );
}

