revamped /viewer to be more efficient/look better/new features

altered /viewer controls and added json downloader+share url, also
added new javascript variable "site_root" defined by the php variable
$site_root in config.php.