Minor UI changes to upload window

Fix also the window auto-close when uploading torrent for some browsers.
Fix errors in width and height calculations

border-left/right/top/bottom are not numbers.
Fix panel height calculation in Opera