// Path of the Master database:
var DBNameHTML = "/nmt/KRT/cms.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 );
}
//SEARCH
function entsub( sQuery )
{
if (window.event && window.event.keyCode == 13)
{
if(sQuery != "")
{
window.location = '/nmt/KRT/cms.nsf/v01013/Zoekresultaten?OpenDocument&ctxSearchResults1=(start=1~count=1000~query=(' + sQuery + '))&q='+sQuery;
return false;
}
else
{
alert("Vul een trefwoord in!");
}
}
}
function openSearch( sQuery )
{
if(sQuery != "")
{
window.location = '/nmt/KRT/cms.nsf/v01013/Zoekresultaten?OpenDocument&ctxSearchResults1=(start=1~count=1000~query=(' + sQuery + '))&q='+sQuery;
return false;
}
else
{
alert("Vul een trefwoord in!");
}
}
function checkEnter()
{
if( window.event && window.event.keyCode == 13 )
{
openSearch( document.forms[0].Search.value );
return false;
}
}
function checkContent( oInput )
{
if( oInput.value == "" ) oInput.value = "";
}
//END SEARCH
//BOOKMARK
function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
//END BOOKMARK
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;
}
}