// Hypercube - Menu script
// Revision 01
// Mike Bennett July 2008
// Revision history
// ================
// Rev     Date            Reason
// 01           
//
// Notes:
// gLnk option 0: opens in new window
// gLnk option 3: opens in target frame (by default - 0 1 and 2 are defined in script, with an Else)

// Page without a tree under it:
//        menu1 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>sample</span>", "upper/features.html"))
//              aux71 = insDoc(menu7, gLnk(3, "<span class='MenuText'>Spare</span>", "types/features.html")) 

// Page with a tree:
//        menu2 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Sample</span>", "taxonomy/features.html"))


// Old Root:
// foldersTree = gFld("<span class='MenuTitle'>Repository</span>", "root.html")
        USETEXTLINKS = 1

   foldersTree = gFld("<span class='MenuTitle'>Financial Instruments</span>", "taxonomy/features.html")
        USETEXTLINKS = 1




// Financial Instrument Taxonomy Menu

//      menu2 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Financial Instruments</span>", "taxonomy/features.html"))

// changed reference from menu2 to foldersTree for all financial instruments. 

        aux21 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Common Instruments</span>", "taxonomy/common/features.html"))

        aux22 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Equities</span>", "taxonomy/equity/features.html"))

// version of Debt for when there are no sub links
        aux23 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Debt</span>", "taxonomy/debt/features.html"))

// version of debt which would work if linking to each sub set directly from here 

//        aux23 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Debt</span>", "taxonomy/debt/features.html"))

// Added links to Bonds and Structured Products debt diagram pages; reordered these but kept original numbering. 
// Unable to link through upper frame to the individual frame sets. Would need to duplicate each set. 
// so removed

//             aux232 = insDoc(aux23, gLnk(3, "<span class='MenuText'>Common</span>", "taxonomy/debt/features.html"))

//             aux233 = insDoc(aux23, gLnk(3, "<span class='MenuText'>Bonds</span>", "taxonomy/debt/bonds/features.html"))

//             aux234 = insDoc(aux23, gLnk(3, "<span class='MenuText'>Structured Finance</span>", "taxonomy/debt/assetbacked/features.html"))

//             aux235 = insDoc(aux23, gLnk(3, "<span class='MenuText'>Short Term Debt</span>", "taxonomy/debt/shortterm/features.html"))

        aux26 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Rights</span>", "taxonomy/rights/features.html"))

        aux25 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Traded Options</span>", "taxonomy/options/features.html"))

        aux24 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>Futures</span>", "taxonomy/futures/features.html"))

// Reinstate the below if and when a separate page or section is created to link directly to a transactions view of OTC instruments. Currently links to the Diagrams page in main OTC section. And change the above to be a folder again if so.  

//             aux271 = insDoc(aux27, gLnk(3, "<span class='MenuMainTitle'>OTC Transactions</span>", "taxonomy/otc/features3.html"))

        aux28 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>CIV (Funds)</span>", "taxonomy/civ/features.html"))


//Indicators and Indices shown as separate level but manitained in taxonomy set. 

        menu3 = insDoc(foldersTree, gLnk(3, "<span class='MenuTitle'>Indices and Indicators</span>", "taxonomy/indicators/features.html"))

//              aux31 = insFld(menu3, gFld("<span class='MenuMainTitle'>Spare</span>", "taxonomy/indicators/features.html"))

// Moved OTC to end of this section to reflect scoping and planning 

        aux27 = insDoc(foldersTree, gLnk(3, "<span class='MenuMainTitle'>OTC Derivatives</span>", "taxonomy/otc/features.html"))



// Components Menu

        menu4 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Components</span>", "components/features.html"))

// Version of Contract terms without the additional navigation to the formula diagram
//              aux42 = insDoc(menu4, gLnk(3, "<span class='MenuMainTitle'>Contractual Terms</span>", "components/contractual/features.html"))

// this is the one to use if separate diagrams are navigated to from the menu. 
              aux42 = insFld(menu4, gFld("<span class='MenuMainTitle'>Contractual Terms</span>", "components/contractual/features.html"))

                  aux421 = insDoc(aux42, gLnk(3, "<span class='MenuText'>Formula Terms</span>", "components/contractual/features3a.html"))

              aux44 = insDoc(menu4, gLnk(3, "<span class='MenuMainTitle'>Identification</span>", "components/identification/features.html"))

              aux45 = insFld(menu4, gFld("<span class='MenuMainTitle'>Issuance Terms</span>", "components/issuance/features.html"))

                  aux451 = insDoc(aux45, gLnk(3, "<span class='MenuText'>Debt Issuance</span>", "components/issuance/features3a.html"))

              aux46 = insDoc(menu4, gLnk(3, "<span class='MenuMainTitle'>Listing</span>", "components/listing/features.html"))

              aux43 = insFld(menu4, gFld("<span class='MenuText'>Guaranty &amp; Collateral</span>", "components/guaranty/features.html"))

              aux43a = insDoc(aux43, gLnk(3, "<span class='MenuMainTitle'>Guaranty</span>", "components/guaranty/features3.html"))

              aux43b = insDoc(aux43, gLnk(3, "<span class='MenuMainTitle'>Collateral</span>", "components/guaranty/features3a.html"))

              aux47 = insFld(menu4, gFld("<span class='MenuMainTitle'>Restrictions &amp; Tax</span>", "components/restrictions/features.html"))

              aux47a = insDoc(aux47, gLnk(3, "<span class='MenuMainTitle'>Restrictions</span>", "components/restrictions/features3.html"))

              aux47b = insDoc(aux47, gLnk(3, "<span class='MenuMainTitle'>Tax</span>", "components/restrictions/features3a.html"))

              aux41 = insDoc(menu4, gLnk(3, "<span class='MenuText'>Classification</span>", "components/classification/features.html")) 

              aux48 = insFld(menu4, gFld("<span class='MenuMainTitle'>Schedules</span>", "components/schedules/features.html"))

                  aux481 = insDoc(aux48, gLnk(3, "<span class='MenuText'>Specified</span>", "components/schedules/features3.html"))
                  aux482 = insDoc(aux48, gLnk(3, "<span class='MenuText'>Explicit</span>", "components/schedules/features3a.html"))



// Current and Dated Information Menu

        menu5 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Dated Terms</span>", "dated/features.html")) 

              aux5A = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Common</span>", "dated/common/features.html"))

              aux5B = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Equity</span>", "dated/equity/features.html"))

              aux5C = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Debt</span>", "dated/debt/features.html"))

// Analytics and Market Data deprecated from v1.30 -->

//            aux51 = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Analytics</span>", "dated/analytics/features.html"))

//            aux52 = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Market Data</span>", "dated/marketdata/features.html"))

              aux53 = insDoc(menu5, gLnk(3, "<span class='MenuMainTitle'>Trading Status</span>", "dated/status/features.html"))

              aux54 = insFld(menu5, gFld("<span class='MenuMainTitle'>Credit Rating &amp; Status</span>", "dated/rating/features.html"))

              aux54a = insDoc(aux54, gLnk(3, "<span class='MenuMainTitle'>Credit Rating</span>", "dated/rating/features3.html"))

              aux54b = insDoc(aux54, gLnk(3, "<span class='MenuMainTitle'>Credit Status</span>", "dated/rating/features3a.html"))


// Securities Processing / business contexts menu

        menu6 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Process Terms</span>", "processing/features.html")) 

              aux61 = insDoc(menu6, gLnk(3, "<span class='MenuMainTitle'>Issuance Process</span>", "processing/issuance/features.html"))

//              aux62 = insDoc(menu6, gLnk(3, "<span class='MenuText'>Security Lifecycle</span>", "processing/features2.html"))

//              aux63 = insDoc(menu6, gLnk(3, "<span class='MenuMainTitle'>Issuance</span>", "processing/issuance/features.html"))

//              aux64 = insDoc(menu6, gLnk(3, "<span class='MenuMainTitle'>Corporate Events</span>", "processing/events/features.html"))

//              aux64 = insDoc(menu6, gLnk(3, "<span class='MenuMainTitle'>Transactions</span>", "processing/transactions/features.html"))



// Types menu

        menu7 = insDoc(foldersTree, gLnk(3, "<span class='MenuTitle'>Basic Types</span>", "types/features.html"))

//        menu7 = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Basic Types</span>", "types/features.html")) 


//              aux71 = insDoc(menu7, gLnk(3, "<span class='MenuText'>Spare</span>", "types/features.html")) 


// Loans menu

        menu8 = insDoc(foldersTree, gLnk(3, "<span class='MenuTitle'>Loans</span>", "loans/features.html"))


// Upper Ontology Menu


        menuG = insFld(foldersTree, gFld("<span class='MenuMainTitle'>Global Terms</span>", "upper/features.html"))

            auxG1 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Time</span>", "upper/time/features.html"))

            auxG2 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Geographical</span>", "upper/geo/features.html"))

            auxG3 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Mathematical</span>", "upper/math/features.html"))

            auxG4 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Information</span>", "upper/info/features.html"))


// reorder Legal v Business and add Business Entity section -  17 Mar 09

            auxG7 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Legal</span>", "upper/legal/features.html"))

            auxG5 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Business</span>", "upper/bus/features.html"))

            auxG10 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Business Entity</span>", "upper/entity/features.html"))

            auxG6 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Financial</span>", "upper/fin/features.html"))

            auxG8 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Activity</span>", "upper/act/features.html"))

            auxG9 = insDoc(menuG, gLnk(3, "<span class='MenuMainTitle'>Risk</span>", "upper/risk/features.html"))



