var states = ['mout', 'mover', 'mdown'],
// mout, mover, mdown - Mouse outside, Mouse Over, Mouse Clicking

MENU_ITEMS_TEMPLATE = [
    [wrap_root('Level 0'), null, null, 
        [wrap_active('Level 1'), 'http://www.SOLINET.com', null,
            [wrap_active('Level 2'), null, null, 
                [wrap_active('Level 3')],
                [wrap_active('Level3')]
            ],
            [wrap_active('Level 2'), null, null,
                [wrap_active('Level 3')],
                [wrap_active('Level 3')]
            ]
        ],
        [wrap_active('Level 1'), null, null,
            [wrap_active('Level 2')],
            [wrap_active('Level 2')]
        ],
        [wrap_active('Level 1'), null]
    ],
// sb - Status bar, tt - Tooltip, sw - Width of item - see user manual for more
    ['Level 0', 'test.htm', {'sb' : 'Test details', 'sw' : 70, 'tt' : 'Test'},
        ['Level 1', null, null],
        ['Level 1', null, null]
    ]
]


MENU_ITEMS_HOME =[
    [wrap_active("Company"), null, {'sw' : 85, 'bw' : 130},
       wrap_highlight(["Welcome", "/company_welcome.htm", null]),
       wrap_highlight(["Profile", "/company.htm", null]),
       wrap_highlight(["Simplicity", "/company_simplicity.htm", null]),
       wrap_highlight(["Quality Assurance", '/company_quality.htm', null]),
       wrap_highlight(["Cooperation", '/company_cooperation.htm', null]),
       wrap_highlight(["Synergy", '/company_synergy.htm', null]),
       wrap_highlight(["References", '/company_references.htm', null]),
       [wrap_active("Careers..."), null, {'sw' : 65, 'bw' : 150},
            wrap_highlight(["Career Opportunities", '/careers.htm', null]),
            wrap_highlight(["Lifestyle", '/lifestyle.htm', null]),
            wrap_highlight(["Salaries", '/salaries.htm', null]),
            wrap_highlight(["Stuttgart", '/stuttgart.htm', null]),
            wrap_highlight(["Economy", '/economy.htm', null]),
            wrap_highlight(["Parktour", '/parktour.htm', null]),
            wrap_highlight(["Positions", '/positions.htm', null]),
            wrap_highlight(["How To Apply", '/how_to_apply.htm', null])
            ],
       wrap_highlight(["Contact", '/contact.htm', null])
    ],
    
    [wrap_active("Sales"), null, {'bw' : 130, 'sw' : 60},
       wrap_highlight(["Special Offers", '/special_offers.htm', null]),    
    
    [wrap_active('Applications...'), null, {'sw' : 90, 'bw' : 220},

        wrap_highlight(["Gateways", '/emulation.htm', null]), 
        wrap_highlight(["Conformance & Signaling Testers", '/test_tools.htm', null]),
        wrap_highlight(["Network Analysis", '/network_analysis.htm', null]),
        wrap_highlight(["Traffic Generation", '/tgen.htm', null]),
        
    ],
  
     [wrap_active("Platforms..."), null, {'bw' : 150, 'sw' : 60},
        wrap_highlight(["Overview", '/safire.htm', null]),
        wrap_highlight(["SAFIRE Tool Chain", 'http://www.solinet.com/datasheets/ds-9001-01%20safire%20professional.htm', null]),
        wrap_highlight(["Signaling Libraries", '/signaling_libraries.htm', null]),
        wrap_highlight(["Physical Interfaces", '/interfaces_introduction.htm', null]),
        wrap_highlight(["Units", '/units_rack_portables.htm', null]),
        wrap_highlight(["Test Suites", 'http://www.acats-forum.org/test_suite_summary.htm', null]),
    ],


      wrap_highlight(["Catalogue", 'http://www.SOLINETSHOP.com', null]),
      wrap_highlight(["Datasheets", '/datasheets_and_downloads.htm', null]),
      wrap_highlight(["Resellers Lounge", "/resellers.asp", {'tt' : 'Product Sales Brochures and price lists are available from the Resellers lounge','sb' : 'Product Sales Brochures and price lists are available from the Resellers lounge'}]),




    [wrap_active("Background..."), null, {'sw' : 85, 'bw' : 180},
[wrap_active("Datasheets..."), '/datasheets_and_downloads.htm', {'bw' : 270, 'sw' : 60},
                
                        [wrap_active("Mobile..."), null, {'bw' : 500},                    
                            wrap_highlight(["CDMA Simulator and Emulator", "/datasheets/cdma_simulator_emulator.htm", null]),
                            wrap_highlight(["CDMA 1X IS634 Simulator, Emulator and Analyzer", "/datasheets/cdma_is634_analyzer_simulator_emulator.htm", null]),          
                            wrap_highlight(["GPRS QoS Testing", "/datasheets/gprs_qos_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["GPRS SGSN Emulator with Gb, Gn and Gr Interfaces", "/datasheets/gprs_sgsn_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["GPRS Home Network HLR Analyzer, Simulator and Emulator", "/datasheets/gprs_sgsn_ggsn_hlr_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["GSM Core Network CS MSC/VLR Analyzer, Simulator and Emulator", "/datasheets/gsm_msc_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["GSM/GPRS Network HLR Analyzer, Simulator and Emulator", "/datasheets/gsm_gprs_hlr_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["GSM GPRS UMTS MAP Tester", '/datasheets/gsm_gprs_umts_map_p1_p2_p2p.htm', null]),    
                            wrap_highlight(["UMTS Analyzer, Simulator and Emulator for (3G) IuPS and IuCS Interfaces", "/datasheets/umts_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS GGSN Emulator with (3G) Gn/Gp and Gi Interfaces", "/datasheets/umts_ggsn_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS HLR Emulator with (3G) C, D, E, Gr, Gc Interfaces", "/datasheets/umts_hlr_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS MSCU Emulator with (3G) IuCS Interface", "/datasheets/umts_mscu_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS Node B Emulator (CS) with (3G) IuB Interface", "/datasheets/umts_nodeb_cs_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS Node B Emulator (PS) with (3G) IuB Interface", "/datasheets/umts_nodeb_ps_analyzer_simulator_emulator.htm", null]),            
                            wrap_highlight(["UMTS RNC Emulator with (3G) IuCS and IuB Interfaces", "/datasheets/umts_rnc_cs_analyzer_simulator_emulator.htm", null]),          
                            wrap_highlight(["UMTS RNC Emulator with (3G) IuPS and IuB Interfaces", "/datasheets/umts_rnc_ps_analyzer_simulator_emulator.htm", null]),
                            wrap_highlight(["UMTS SGSN Emulator with (3G) IuPS and Gn/Gp Interfaces", "/datasheets/umts_sgsn_analyzer_simulator_emulator.htm", null]),           
                        ],      
                        [wrap_active('Fixed Network...'), null, {'sw' : 90, 'bw' : 250},
                                wrap_highlight(["V5.1 and V5.2 Signaling Tester", '/datasheets/v5_signaling_tester.htm', null]),
                                wrap_highlight(["ISDN Signaling Tester", '/datasheets/isdn_signaling_tester.htm', null]),
                        ],
                        wrap_highlight(["ATM Analyzer, Simulator and Emulator", "/datasheets/atm_analyzer_simulator_emulator.htm", {'bw' : 330}]),
                  ],     
        [wrap_active('Network Analysis...'), null, {'sw' : 80, 'bw' : 230},
        wrap_highlight(["Call Monitoring", "/lawful_interception.htm"]),
        wrap_highlight(["Notebook Based Packages", "/solinet_notebook_packages.htm"]),
        
        wrap_highlight(["Functionality Summary", '/network_analysis_functionality_summary.htm', null]), 
        wrap_highlight(["Network Observation Case Study", '/network_observation_case_study.htm', null]), 
                
        ],   
        wrap_highlight(["Product Range Overview", "/product_overview_concept.htm"]),
        
        
        
       
        
 ],
    
   
     ],
    
        
                
    [wrap_active("Support"), null, {'sw' : 75, 'bw' : 180},
        wrap_highlight(["Overview", '/support.htm', {'sw' : 65}]),
        wrap_highlight(["Training Workshops", '/training.htm', {'sw' : 65}]),
        wrap_highlight(["Maintenance Agreement", '/maintenance.htm', {'sw' : 65}]),
        wrap_highlight(["FAQs", '/faqs.htm', {'sw' : 65}]),
        wrap_highlight(["Glossary", '/glossary.htm', {'sw' : 65}]),
        wrap_highlight(["Support Lounge", "/support_lounge.asp", {'tt' : 'Software updates are available from the support lounge','sb' : 'Software updates are available from the support lounge'} ])
         ],  


//    [wrap_active("Test"), null, {'sw' : 75, 'bw' : 180},
//        wrap_highlight(["Overview", null, {'sw' : 65},
//              wrap_highlight(["Training Workshops", '/training.htm', {'sw' : 65}]),
//              wrap_highlight(["Maintenance Agreement", '/maintenance.htm', {'sw' : 65}]),
//              wrap_highlight(["Glossary", '/glossary.htm', {'sw' : 65}]),
//            ]),
//        wrap_highlight(["Training Workshops", '/training.htm', {'sw' : 65}]),
//        wrap_highlight(["Glossary", '/glossary.htm', {'sw' : 65}]),
//        wrap_highlight(["Support Lounge", "/support_lounge.asp", {'tt' : 'Software updates are available from the support lounge','sb' : 'Software updates are available from the support lounge'} ])
//         ],  

    

    [wrap_highlight("Contact"), '/contact.htm', {'sw' : 60},
        
         ]



];


MENU_ITEMS_SEARCH_BAR = [
    ['', null, null,] 
];


MENU_ITEMS_ABOUT_US =[
    [wrap_active("About Us"), "/about_us.htm", {'sw' : 58, 'bw' : 120},
        ["Overview", '/about_us.htm', null],
        ["Company Profile...", "/company.htm", {'bw' : 120},
            ["Welcome", "/company.htm", null],
            ["Simplicity", "/company_simplicity.htm", null],
            ["Quality Assurance", '/company_quality.htm', null],
            ["Cooperation", '/company_cooperation.htm', null],
            ["Synergy", '/company_synergy.htm', null],
            ["References", '/company_references.htm', null],
        ],
        ["Offices", '/offices.htm', null],
        ["Links", '/links.htm', null]
    ]
];

MENU_ITEMS_CAREERS =[
    [wrap_active("Careers"), "/careers.htm", {'sw' : 65, 'bw' : 120},
        ["Overview", '/careers.htm', null],
        ["Lifestyle", '/lifestyle.htm', null],
        ["Salaries", '/salaries.htm', null],
        ["Stuttgart", '/stuttgart.htm', null],
        ["Economy", '/economy.htm', null],
        ["Parktour", '/parktour.htm', null],
        ["Positions", '/positions.htm', null],
        ["How To Apply", '/how_to_apply.htm', null]
        ]
];

//  These functions print html around the text specified before inserting it into menu

function wrap_active(caption) { 
        var path = String(window.location).split(/\//);
        var file = path[path.length - 1].split(/\?/);   


    if (caption == CURRENT_SECTION) 
        {
        return '<img border="0" src="/images/menu_right_arrow.png">' + "&nbsp;" + caption + "&nbsp;"; 
        }
    else if (caption == SUB_SECTION1) 
        {
        return '<img border="0" src="/images/menu_right_arrow.png">' + "&nbsp;" + caption + "&nbsp;"; 
        }    
    else if (caption == SUB_SECTION2) 
        {
        return '<img border="0" src="/images/menu_right_arrow.png">' + "&nbsp;" + caption + "&nbsp;"; 
        }      
        
    else
            return caption; 
//        return '<font color="white">' + caption + '</font>'; 
}

function old_wrap_highlight (item) {
        var path = String(window.location).split(/\//);
        var file = path[path.length - 1].split(/\?/);   
        
        if ('/'+file[0] == item[1])
                item[0] = '<img border="0" src="/images/menu_right_arrow.png">' + "&nbsp;" +  item[0];
        else
                item[0] = item[0];
        return (item);
}   


function wrap_highlight (item) {
    if (String(window.location).match(item[1])) {
        item[0] = '<img border="0" src="/images/menu_right_arrow.png">' + "&nbsp;" +  item[0];
    }
    return (item);
}


function wrap_root (text, c) {
    var res = [];
    for (var i in states)
        res[i] = text + '&nbsp;&nbsp;'
    return res;
}
