// Path of the Master database: var DBNameHTML = "/clients/vvaa/webportal.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 ); } var aME = new Array(); // test // Parameters: Concept, Title, Parent, Button_URL_1, Button_Target_1, Button_URL_2, Button_Target_2, Button_URL_3, Button_Target_3, Button_URL_4, Button_Target_4, ImageStoreDoc, ImageName, FontFace function menuEntry( sConcept, sBTitle, sParent, sBURL1, sBTarget1, sBURL2, sBTarget2, sBURL3, sBTarget3, sBURL4, sBTarget4, sImageStoreDoc, sImageName, sFontFace ) { // Object constructor this.sConcept = sConcept; this.sBTitle = sBTitle; this.sParent = sParent; this.sBURL1 = sBURL1; this.sBTarget1 = sBTarget1; this.sBURL2 = sBURL2; this.sBTarget2 = getTargetName( sBTarget2 ); this.sBURL3 = sBURL3; this.sBTarget3 = getTargetName( sBTarget3 ); this.sBURL4 = sBURL4; this.sBTarget4 = getTargetName( sBTarget4 ); this.sImageStoreDoc = sImageStoreDoc; this.sImageName = sImageName; this.sFontFace = sFontFace; // Private function function getTargetName( sTarget ) { var sReturnValue = sTarget; switch( sTarget ) { case "Content Page" : sReturnValue = "rechts"; break; case "Cluster Navigator" : sReturnValue = "links"; break; case "Top Navigator" : sReturnValue = "boven"; break; case "Extra Frame" : sReturnValue = "londer"; break; } return sReturnValue; } // end getTargetName( ) } // end menuEntry( ) function mE( sConcept, sBTitle, sParent, sBURL1, sBTarget1, sBURL2, sBTarget2, sBURL3, sBTarget3, sBURL4, sBTarget4, sImageStoreDoc, sImageName, sFontFace ) { // alert (sBURL1); // Menu Entry: create an object instance in the array oMenuEntry = new menuEntry( sConcept, sBTitle, sParent, sBURL1, sBTarget1, sBURL2, sBTarget2, sBURL3, sBTarget3, sBURL4, sBTarget4, sImageStoreDoc, sImageName, sFontFace ); if (aME.push ) { pushed = aME.push( oMenuEntry ); } else { aME = aME.concat(oMenuEntry ) } } // end mE( ) function writeMenuItems (type) { var html = "" if( aME.length > 0 ) { for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == type && aME[i].sBURL1 != "#" ) { html = html + ''; } //The next line is to deal with empty menu-items if ( aME[i].sConcept == type && aME[i].sBURL1 == "#" ) html += "
"; } // alert (html); document.write(html); } } function writeSubMenuItems (type) { var html = ""; var label = ""; if( aME.length > 0 ) { for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == type) { html = html + '
'; if (aME[i].sBTitle == '') { //Geen tekst: losse button boven menu html = html + '
'; } else { if ((aME[i].sBURL1 == '') || (aME[i].sBURL1 == '#')) { //Wel tekst, geen URL: titel aan de bovenkant van het menu //html = html + '
' //html = html + aME[i].sBTitle html = html + '
'; } else { if ((aME[i].sBTitle == '') || (aME[i].sBTitle == ' ')) { label = ''; } else { label = '' + aME[i].sBTitle + ''; } if (aME[i].sImageName == '') { html = html + '' + label + ''; } else { html = html + ''; } } } html = html + '
'; } } html = html + '
' document.write(html); //alert (html); } } function writeSubMenuItemsDynamisch (type) { var html = ""; var label = ""; if( aME.length > 0 ) { for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == type) { if (aME[i].sBTitle == '' || aME[i].sBTitle == '') { //Geen tekst: losse button boven menu html = html + '
'; } else { if ((aME[i].sBURL1 == '') || (aME[i].sBURL1 == '#')) { //Wel tekst, geen URL: titel aan de bovenkant van het menu html = html + '
' html = html + '
' html = html + aME[i].sBTitle html = html + '
' //html = html + '
'; } else { html = html + '
'; if ((aME[i].sBTitle == '') || (aME[i].sBTitle == ' ')) { label = ''; } else { label = '' + aME[i].sBTitle + ''; } if (aME[i].sImageName == '') { html = html + '' + label + ''; } else { html = html + ''; } html = html + '
'; } } } } html = html + '
' document.write(html); //alert (html); } } function writeMenuItemsWithHighlight (type, highlight) { var html = "" if( aME.length > 0 ) { for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == type && aME[i].sBURL1 != "#" ) { html = html + ''; } //The next line is to deal with empty menu-items //alert(aME[i].sBURL1) if ( aME[i].sConcept == type && aME[i].sBURL1 == "#" ) html += "
"; } // alert (html); document.write(html); } } function writeMenuItemsHorizontalTable (type) { var html = "" if( aME.length > 0 ) { html = ''; for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == (type)) { html = html + ''; } } html = html + '
'; html = html + ''; html = html + '
'; // alert (html); document.write(html); } } function writeMenuItemsHorizontalTableWithHighlight (type, highlight) { var html = "" if( aME.length > 0 ) { html = ''; for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == (type)) { html = html + ''; } } html = html + '
'; html = html + ''; html = html + '
'; // alert (html); document.write(html); } } function writeMenuItemsHorizontalTableWithHighlight2 (type, highlight) { // used in div "top_links" #toplinkstable . script: ButtonsRightTopMenu var html = "" if( aME.length > 0 ) { html = ''; for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == (type)) { html = html + ''; } } html = html + '
'; html = html + ''; html = html + '
'; //alert (html); document.write(html); } } function writeMenuItemsHorizontalTable2 (type) { var html = "" if( aME.length > 0 ) { html = ''; for( var i=0; i < aME.length; i++ ) { if (aME[i].sConcept == (type)) { html = html + ''; } } html = html + '
'; html = html + ''; html = html + '
'; // alert (html); document.write(html); } }