/*!
 * Ext JS Library 3.3.1
 * Copyright(c) 2006-2010 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.onReady(function(){
    Ext.QuickTips.init();

    // Menus can be prebuilt and passed by reference
    var sMenu = new Ext.menu.Menu({
        id: 'softMenu',
        items: [
            {
                text: 'Overview',
                handler: function clicked() { window.location.href="http://www.perfectpart.com/MESSoftware.aspx" }
            },
            {
                text: 'Informational Video',
                handler: function clicked() { window.location.href="http://www.perfectpart.com" }
            },
            {
                text: 'Genealogy & Traceability',
                handler: function clicked() { window.location.href="http://www.perfectpart.com/Traceability.aspx" }
            },
            {
                text: 'Electronic Work Instructions',
                handler: function clicked() { window.location.href="http://www.perfectpart.com/WorkInstruction.aspx" }
            }
          ]
        });
      
    var tb = new Ext.Toolbar();
    tb.render('toolbar');
    
    tb.add(
        {
            
            iconCls: 'p2',
            width: 35,
            handler: function clicked() { window.location.href="http://www.perfectpart.com" }
        },
        {
            
            iconCls: 'fb',
            width: 35,
            handler: function clicked() { window.location.href="https://www.facebook.com/pages/PerfectPart/204272871178" }
        },
        {
            text:'Software',
            width: 260,
            menu: sMenu     
        },
        {
            text: 'Work Enforcement',
            width: 260,
            handler: function clicked() { window.location.href="http://www.perfectpart.com/ErrorProofing.aspx" }
        }              
        );

    
    tb.doLayout();

});
