// Path of the Master database: var DBNameHTML = "/passage/personal/goertz.nsf"; // Path of the current database: var DBNameHTML_C = ""; var sPathName = document.location.pathname; var iNSFPos = sPathName.toUpperCase().indexOf( ".NSF" ); if( iNSFPos == -1 ){ var iSlashPos = sPathName.indexOf( "/", 1 ); DBNameHTML_C = sPathName.substring( 0, iSlashPos ); } else { DBNameHTML_C = sPathName.substring( 0, iNSFPos + 4 ); } function sShowInfo( author, libraryCategory, keywords, source, dateRevision, dateCreated, dateModified, datePublished ) { // Can show a popup window containing document information as passed by the variables } function evAClick() { // Handles any clicked A HREF tags that have been assigned by initAEventHandler var oObject = window.event.srcElement; // Find the A element (sometimes the click event happens in an IMG element, inside an A element) while( oObject.tagName != "A" ) { oObject = oObject.parentElement; } var sFeatures = "directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0"; var oWindow = window.open( oObject.href, "_blank", sFeatures ); window.event.returnValue = false; } /************************* * Attach onClick event to all A links that point to $FILE URLs * To attach, call initAEventHandler( ) at the end of a Layout Definition *************************/ function initAEventHandler() { var aAs = document.body.getElementsByTagName( "A" ); for( var i=0; i < aAs.length; i++ ) { if( aAs[i].href.toUpperCase().indexOf( "$FILE" ) > -1 ) aAs[i].onclick = evAClick; } } function doShowNavigationTrail( sLCN, sKWN, sTN ) { // Calls function showNavigationTrail that should be present on the // frame that includes JS page NavigationTrail oNavigationFrame = parent.frames["boven"]; if( oNavigationFrame ) { if( oNavigationFrame.showNavigationTrail ) { oNavigationFrame.showNavigationTrail( this.document, sLCN, sKWN, sTN ); } } } function writeDocIcons( ) { // Write out the HTML for the attachment, dependant on the type of attachment // Needs Passage 1.87i ML BF or higher if( window.sDocIcons ) { var sFileExt = ""; var aDocIcons = sDocIcons.split( ", " ); for( var iIcons = 0; iIcons < aDocIcons.length; iIcons++ ) { aFileParts = aDocIcons[ iIcons ].split( "." ); sFileExt = aFileParts[ aFileParts.length - 1 ]; switch( sFileExt.toUpperCase( ) ) { case "SWF" : writeSWF( aDocIcons[ iIcons ] ); break; default : // Image file writeImage( aDocIcons[ iIcons ] ); } // switch } // for } // if( sDocIcons ) } function writeSWF( sDocAttFileName ) { // Write out HTML for a Flash object - NB fixed width & height! var iWidthSWF = '119'; var iHeightSWF = '289'; var sSWFHTML = ''; sSWFHTML += ''; sSWFHTML += ''; sSWFHTML += ''; sSWFHTML += ''; sSWFHTML += ''; document.write( sSWFHTML ); } function writeImage( sDocAttFileName ) { document.write( '' + sDocAttFileName + '' ); }