// Path of the Master database: var DBNameHTML = "/clients/luanda-jinja/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 openSearch( sQuery ) { if(sQuery != "") { window.location = DBNameHTML + '/v01013/Zoeken?OpenDocument&ctxSearchResults1=(start=1~count=5~query=' + sQuery + ')'; } else { alert("Vul een trefwoord in!"); } } function checkEnter() { if( event.keyCode == 13 ) openSearch( document.forms[0].Search.value ); } function checkContent( oInput ) { if( oInput.value == "" ) oInput.value = ""; } //END SEARCH //PRINT function openPrintWindow() { // Opens a window that presents the DIV Content to be printed var oDoc = document; var oToPrint = oDoc.getElementById( "ToPrint" ); if (navigator.appVersion.indexOf("MSIE")==-1) { window.print(); } else { if( oToPrint ) { if( oDoc.styleSheets ) { var oBody = oDoc.body; var popupWidth = oBody.clientWidth; var popupHeight = oBody.clientHeight; // ((Web - Document Print Template - All) | f9917WWA1 var URL = DBNameHTML_C + "/f9917WWA1?ReadForm"; // alert(oDoc.getElementById( "ToPrint" ).innerHTML); // Create object that passes the parameters to the dialog box var oDialogArguments = new Object(); oDialogArguments.title = oDoc.title; oDialogArguments.styleSheets = oDoc.styleSheets; oDialogArguments.scripts = oDoc.scripts; oDialogArguments.Content = oDoc.getElementById( "ToPrint" ); oDialogArguments.DBNameHTML = DBNameHTML; oDialogArguments.DBNameHTML_C = DBNameHTML_C; var Features = 'center:no;edge:raised;help:no;resizable:yes;scroll:yes;status:no;unadorned:yes;dialogWidth:' + popupWidth + ';dialogHeight:' + popupHeight; var returnValue = window.showModalDialog( URL, oDialogArguments, Features ); //window.open(URL); } } else { // Print ID couldn't be found, just print the document window.print(); } } } //END PRINT