var file = { 'index.html':'[an error occurred while processing the directive]', 'sb_catalogue_option.pdf':'[an error occurred while processing the directive]', 'sb_catalogue_services.pdf':'[an error occurred while processing the directive]', 'sb_catalogue_services_3G.pdf':'[an error occurred while processing the directive]', 'sb_catalogue_services_smartphone.pdf':'[an error occurred while processing the directive]', 'sb_catalogue_specs.pdf':'[an error occurred while processing the directive]' } function fsizeGetBB(path){ if(!path){txt = 'ファイルを指定してください'} else if(!file[path]){txt = '指定されたファイルがデータベースに登録されていません'} else {txt = file[path].replace(' ','').replace('k','K') + 'バイト'} document.write(txt); }