<script>
window.my_title = function(doc,i){
if (doc.doctype == 'pdf' ) {
var m = doc.uri.match(/([^#]*)(#.*)?/);
var t = m[1].replace(/.*\/([^/]+\/?)/, '$1') + (m[2]||'');
t = decodeURIComponent(t);
return [{id:0, text:t, type:'custom'}];
}
}
</script>