// Path of the Master database:
var DBNameHTML = "/Passage/nl/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 != "Trefwoord...")
{
window.location = DBNameHTML_C + '/v01013/Zoeken?OpenDocument&ctxSearchResults1=(start=1~count=4~query=' + sQuery + ')&q='+sQuery ;
}
else
{
alert("Vul een trefwoord in!");
}
}
function checkEnter()
{
if( event.keyCode == 13 )
{
//20100310 JGO added check for page with searchresults, check both searchfields
if( document.forms[0].Search.value != "" && document.forms[0].Search.value != "Trefwoord..." )
{
openSearch( document.forms[0].Search.value );
}
else
{
openSearch( document.forms[0].SearchContent.value );
}
}
}
function checkContent( oInput )
{
if( oInput.value == "" ) oInput.value = "Trefwoord...";
}
//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
//DISABLE RIGHT MOUSE CLICK
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="All content Copyright © 2006. All use are expressly forbidden without written consent.";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
//alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false")
//document.oncontextmenu=new Function("alert(message);return false")
//END DISABLE RICHT MOUSE CLICK
//DISABLE TEXT SELECT
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//ENABLE TEXT SELECT ON FORMS, TO ALLOW FORMS IN FF TO BE FILLED IN
//sURL= window.location;
//nURL = String.find( "Zoeken" , "Zoek");
//alert( nURL );
//sURL.
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//END DISABLE TEXT SELECT
// Function for foto loop
var index = 0;
var images = new Array();
function rotate(){
var elmChildImg;
if (images.length == 0) return;
elmChildImg = document.getElementById('loopIMG');
if (elmChildImg != null){
index = index + 1;
if (index >= images.length){index = 0;}
elmChildImg.src = images[index];
setTimeout("rotate();", 5000);
}
}
// Function resizing iframe
function resizeToContent(){
var x =0;
var y =this.document.body.scrollHeight;
while (x < y){
x+=1;
}
parent.document.getElementById("BodyColumnFrame").style.height=x
}