// isLeeg( string) // Controleert of de gegeven string leeg is of alleen maar spaties bevat // returned true wanneer de string leeg is anders false // function isLeeg( deString){ return( trim( deString).length == 0); } // trim( string) // Haalt alle spaties aan het begin en het eind van een string weg // function trim( deString) { deString = String( deString); // Verwijder alle spaties aan het begin while( isSpatie( deString.charAt(0))) { deString = deString. substring( 1, deString.length); } // Verwijder de spaties aan het eind while( isSpatie( deString.charAt( deString.length - 1))) { deString = deString.substring( 0, deString.length - 1); } return( deString); } // isSpatie() // Controleer of het karakter een spatie, tab of nieuwe regel is // function isSpatie( karakter){ karakter = String( karakter); return( karakter == ' ' || karakter == '\n' || karakter == '\r' || karakter == '\t'); } function IncludeJavaScript(bestand) { document.write(''); } function toggleZieOokdialog() { if($(".ui-dialog").css("display") == "block") { verbergZieOokdialog(); } else { toonZieOokdialog(); } } function verbergZieOokdialog() { // pijltje dichtklappen $(".zieookknop-open").each( function() { var huidigeClass = $(this).attr("class"); $(this).removeClass(huidigeClass); $(this).addClass("zieookknop"); } ); // dialog verbergen $(".ui-dialog").each( function() { $(this).css({display: 'none'}); } ); } function toonZieOokdialog() { // verberg evt. de openstaande zie ook dialog verbergZieOokdialog(); // pijltje openklappen $(".zieookknop").each( function() { var huidigeClass = $(this).attr("class"); $(this).removeClass(huidigeClass); $(this).addClass(huidigeClass + "-open"); } ); // dialog tonen $(".dialogzieook").css("display","block"); $(".dialogzieook").dialog("open"); $(".ui-dialog").each( function() { var offset = $(".zieookknop-open").offset(); $(this).css({display: 'block', position: 'absolute', top: offset.top + 26, left: offset.left - 2, width: 320, height: 276, overflow: 'hidden', background: 'none'}); } ); } function bodygrootte() { if($('body').height() < $('html').height()) {$('body').css('height','100%');} } function logorechtsonder() { if($('#rechtermenu').height() != null) { var maxtop = $('#rechtermenu').height() + 100; var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body; var dsoctop=document.all? iebody.scrollTop : pageYOffset; var offset = $(".logoelsevier").offset(); var newtop = $(window).height() - 50; if(offset.top maxbreedte) { $(this).width(maxbreedte); } }); } function notitieEditor( textareaID) { if($("#" + textareaID).html() == null) { } else { var oFCKeditor = new FCKeditor( textareaID ); oFCKeditor.StartupFocus = true; oFCKeditor.Width = "450"; oFCKeditor.Height = "400"; oFCKeditor.ToolbarSet = "Basic"; oFCKeditor.BasePath = "fckeditor/"; oFCKeditor.ReplaceTextarea(); } } function verwijderNotitie( notitieID) { if(window.opener.document.getElementById('annotatieimage') != null) { window.opener.document.getElementById('annotatieimage').src = 'layout/img/annotatie_img.gif'; } document.location.href = 'annotatie_mod.asp?verwijderen=true¬itieID=' + notitieID; window.close(); } function bewerkNotitie( notitieID) { var textarea = '
'; var button = '
'; var revert = $('#tebewerkennotitietekst').html(); $('#tebewerkennotitietekst').after(textarea+button).remove(); $('#bewaarKnop').click(function(){bewaarNotitie(this, false);}); $('#previewKnop').click(function(){previewNotitie(this, false);}); $('#annuleerKnop').click(function(){bewaarNotitie(this, revert);}); $('#verwijderKnop').click(function(){verwijderNotitie(notitieID);}); $('.previewknoppen').css("display","none"); notitieEditor('notitie'); } function previewNotitie(obj, cancel) { if(!cancel) { var oEditor = FCKeditorAPI.GetInstance('notitie'); var t = oEditor.GetHTML() ; } else { var t = cancel; } if(t=='') t='(geen tekst)'; $(obj).parent().parent().after('
' + t.replace(/\n/g,'
') + '
').remove(); $('.previewknoppen').css("display","block"); } function bewaarNotitie(obj, cancel) { var notitieID = $(obj).parents('.notitietekstcontainer').find('.notitieID').html(); if(!cancel) { var oEditor = FCKeditorAPI.GetInstance('notitie'); var t = oEditor.GetHTML() ; var html = $.ajax({ url: "annotatie_mod.asp", data: "updaten=true¬itieID=" + notitieID + "&documentXMLID=" + $('#documentID').html() + "¬itie=" + escape(t), async: false }).responseText; } else { var t = cancel; } if(t=='') t='(geen tekst)'; $(obj).parent().parent().after('
' + t.replace(/\n/g,'
') + '
').remove(); window.close(); } function toonVoetnoot(kruimel,melding){ var scherm, strs; scherm=window.open("","voetnootscherm","toolbar=no,resizable,location=no,menubar=no,scrollbars=yes,width=400,height=300"); strs = '' + '' + "Voetnoot" + "" + "" + "" + "
" + "Sluiten
" + "
" + "Print
" + "

" + kruimel + '

Voetnoot

' + melding + "

"+ ""; scherm.document.open(); scherm.document.write(strs); scherm.document.close(); scherm.focus(); } function toonPopup(titel, kruimel,melding){ var scherm, strs; scherm=window.open("","popupscherm","toolbar=no,resizable,location=no,menubar=no,scrollbars=yes,width=400,height=300"); strs = '' + '' + "" + titel + "" + "" + "" + "" + "" + "" + "
" + "Sluiten
" + "
" + "Print
" + "

" + kruimel + '

' + titel + '

' + melding + "
"+ ""; scherm.document.open(); scherm.document.write(strs); scherm.document.close(); scherm.focus(); } function toonFiguur(figuurhref){ var scherm, strs; scherm=window.open("","figuurscherm","toolbar=no,resizable,location=no,menubar=no,scrollbars=yes,width=400,height=300"); strs = '' + '' + "Figuur" + "" + "" + "" + "
" + "Sluiten
" + "
" + "Print
" + '

' + '' + "

"+ ""; scherm.document.open(); scherm.document.write(strs); scherm.document.close(); scherm.focus(); } function toonPopupBijlage( wid ){ var titel, kruimel, melding; kruimel = ''; var velden = new Array(); var html = $.ajax({ url: "bijlage_mod.asp", data: "wid=" + wid, async: false }).responseText; if (!isLeeg(html)) { velden = html.split("||"); kruimel = velden[0]; melding = velden[1]; } var scherm, strs; scherm=window.open("","popupscherm","toolbar=no,resizable,location=no,menubar=no,scrollbars=yes,width=400,height=300"); strs = '' + '' + "Bijlage" + "" + "" + "" + "" + "
" + "Sluiten
" + "
" + "Print
" + "

" + kruimel + '

Bijlage

' + melding + "
"+ ""; scherm.document.open(); scherm.document.write(strs); scherm.document.close(); scherm.focus(); } /* * autoTab Kan worden opgeroepen vanuit de keyUp handler van een veld als * onKeyUp="autoTab( this, 2, event)" */ function autoTab(input,len, e) { var isNN = (navigator.appName.indexOf("Netscape")!=-1); var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length >= len && !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)+1) % input.form.length].select(); input.form[(getIndex(input)+1) % input.form.length].focus(); } } function containsElement(arr, ele) { var found = false, index = 0; while(!found && index < arr.length) if(arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input) index = i; else i++; return index; } function kiesDatum( dag, maand, jaar, veldnaam) { var scherm, url; url = 'selecteerDatum.asp?dag='+dag+'&maand='+maand+'&jaar='+jaar+'&veld='+veldnaam; scherm = window.open( url, 'kiesdatum', 'top=200,left=450,width=180,height=240,scrollbars=no'); scherm.focus(); } function vulDatum(elem) { var dag, maand, jaar dag = document.forms['formulier'].elements[elem+'dag'].value; // if (dag.charAt(0) == '0') {dag = dag.charAt(1);} maand = document.forms['formulier'].elements[elem+'maand'].value; // if (maand.charAt(0) == '0') {maand = maand.charAt(1);} jaar = document.forms['formulier'].elements[elem+'jaar'].value; document.forms['formulier'].elements[elem+'datum'].value = dag + '-' + maand + '-' + jaar; } function vulDatumUitKalender( dag, maand, jaar, veldnaam) { document.getElementById(veldnaam+'dag').value = dag; document.getElementById(veldnaam+'maand').value = maand; document.getElementById(veldnaam+'jaar').value = jaar; vulDatum(veldnaam); } /* * vergelijkDatum( dag1, maand1, jaar1, dag2, maand2, jaar2) * Vergelijkt twee datums en returned de volgende waarden: * -1 : datum1 is kleiner dan datum2 * 0 : datum1 en datum2 zijn gelijk * 1 ; datum1 is groter dan datum2 */ function vergelijkDatums( dag1, maand1, jaar1, dag2, maand2, jaar2) { var datum1, datum2; if( dag1 == dag2 && maand1 == maand2 && jaar1 == jaar2) { return 0; } datum1 = new Date( jaar1, maand1 - 1, dag1); datum2 = new Date( jaar2, maand2 - 1, dag2); if( datum1 < datum2) { return -1; } else { return 1; } } function highlight(documentTekst, zoekterm) { var uitvoer = ""; var i = -1; var lcZoekterm = zoekterm.toLowerCase(); var lcDocumentTekst = documentTekst.toLowerCase(); while (documentTekst.length > 0) { i = lcDocumentTekst.indexOf(lcZoekterm, i+1); if (i < 0) { uitvoer += documentTekst; documentTekst = ""; } else { // alles binnen tags overslaan if (documentTekst.lastIndexOf(">", i) >= documentTekst.lastIndexOf("<", i)) { // alles binnen een evt