/*!



 * Ext JS Library 3.1.1



 * Copyright(c) 2006-2010 Ext JS, LLC



 * licensing@extjs.com



 * http://www.extjs.com/license



 */



Ext.onReady(function(){



    Ext.QuickTips.init();







    // Menus can be prebuilt and passed by reference



    var dateMenu = new Ext.menu.DateMenu({



        handler: function(dp, date){



            Ext.example.msg('Date Selected', 'You chose {0}.', date.format('M j, Y'));



        }



    });







    var colorMenu = new Ext.menu.ColorMenu({



        handler: function(cm, color){



            Ext.example.msg('Color Selected', 'You chose {0}.', color);



        }



    });







    var store = new Ext.data.ArrayStore({



        fields: ['abbr', 'state'],



        data : Ext.servicesdata.onlineserv // from states.js



    });







    var combo = new Ext.form.ComboBox({



        store: store,



        displayField: 'state',



        typeAhead: true,



        mode: 'local',



        triggerAction: 'all',



        emptyText: 'Select a state...',



        selectOnFocus: true,



        width: 135,



        getListParent: function() {



            return this.el.up('.x-menu');



        },



        iconCls: 'no-icon'



    });







    var menu = new Ext.menu.Menu({



        id: 'mainMenus',



        style: {



            overflow: 'visible'     // For the Combo popup



        },



        items: [



            combo,                  // A Field in a Menu



            {



                text: 'I like Ext',



                checked: true,       // when checked has a boolean value, it is assumed to be a CheckItem



                checkHandler: onItemCheck



            }, '-', {



                text: 'Radio Options',



                menu: {        // <-- submenu by nested config object



                    items: [



                        // stick any markup in a menu



                        '<b class="menu-title">Choose a Theme</b>',



                        {



                            text: 'Aero Glass',



                            checked: true,



                            group: 'theme',



                            checkHandler: onItemCheck



                        }, {



                            text: 'Vista Black',



                            checked: false,



                            group: 'theme',



                            checkHandler: onItemCheck



                        }, {



                            text: 'Gray Theme',



                            checked: false,



                            group: 'theme',



                            checkHandler: onItemCheck



                        }, {



                            text: 'Default Theme',



                            checked: false,



                            group: 'theme',



                            checkHandler: onItemCheck



                        }



                    ]



                }



            },{



                text: 'Choose a Date',



                iconCls: 'calendar',



                menu: dateMenu // <-- submenu by reference



            },{



                text: 'Choose a Color',



                menu: colorMenu // <-- submenu by reference



            }



        ]



    });







    var tb = new Ext.Toolbar();



    tb.render('toolbar');







    tb.add(



		   //{



//            text:'Button w/ Menu',



//            iconCls: 'bmenu',  // <-- icon



//            menu: menu  // assign menu by instance



//        },



		



		//{



//            text: 'Users',



//            iconCls: 'user',



//            menu: {



//                xtype: 'menu',



//                plain: true,



//                items: {



//                    xtype: 'buttongroup',



//                    title: 'User options',



//                    autoWidth: true,



//                    columns: 2,



//                    defaults: {



//                        xtype: 'button',



//                        scale: 'large',



//                        width: '100%',



//                        iconAlign: 'left'



//                    },



//                    items: [{



//                        text: 'User<br/>manager',



//                        iconCls: 'edit'



//                    },{



//                        iconCls: 'add',



//                        width: 'auto',



//                        tooltip: 'Add user'



//                    },{



//                        colspan: 2,



//                        text: 'Import',



//                        scale: 'small'



//                    },{



//                        colspan: 2,



//                        text: 'Who is online?',



//                        scale: 'small'



//                    }]



//                }



//            }



//        },



//		



//		'-',



//		



        new Ext.Toolbar.Button({



            text: 'Home',



            handler: onButtonClick,



            tooltip: {text:'Back to the City of Houston home page', title:'Home'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: 'http://www.houstontx.gov'



            



        }



		



		),



		'-',



		new Ext.Toolbar.Button({



            text: 'I Want To...',



            handler: onButtonClick,



            tooltip: {text:'You can find services that we offer ', title:'I Want To...'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'Accident Report Form', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/pdfs/AccidentRep08.pdf'



                },



				



				{



                    text: 'Adopt a Pet', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/barc/petadoption.html'



                },



				



				{



                    text: 'Apply for a Job', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/jobs/index.html'



					



                }, 



				



				{



                    text: 'Do Business with the City', 



					handler: onItemClick,



					url:'http://purchasing.houstontx.gov/doing_business.html'



					



                }, 



				



				{



                    text: 'Download Bids & RFPs', 



					handler: onItemClick,



					url:'http://purchasing.houstontx.gov/bids.html'



					



                }, 



				



				{



                    text: 'View the Purchasing Catalog', 



					handler: onItemClick,



					url:'http://purchasing.houstontx.gov/catalog/'



                }, 



				



				{



                    text: 'File A Minor Police Report', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/online_report.htm'



					



                },



				



				{



                    text: 'Get Well Water Tested', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/health/Lab/INFO%20SHT.pdf'



					



                },



				



				{



                    text: 'Find Food Establishment Inspection Results', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/redirect/foodinspection.html'



					



                },



				



				{



                    text: 'Intern with the City of Houston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/volunteer/internships.html'



					



                },



				



				{



                    text: 'Library - Renew a Book', 



					handler: onItemClick,



					url:'https://catalog.houstonlibrary.org/patroninfo~S1'



                },



				



				{



                    text: 'Library - Pay a Fine', 



					handler: onItemClick,



					url:'https://catalog.houstonlibrary.org/patroninfo~S1'



					



                },



				



				{



                    text: 'Pay a Fine', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/courts/FinesAndFees.html'



                },



				



				{



                    text: 'Pay a Parking Citation', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/parking/resolve.htm'



					



                },



				



				{



                    text: 'File a Public Information Act Request', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/pia.html'



                },



				



				{



                    text: 'Play on a Public Golf Course', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/municipalgolf/index.html'



                },



				//{



                //    text: 'Open a New Water Service Account', 



				//	handler: onItemClick,



				//	url:'http://www.publicworks.houstontx.gov/resource/ucs/openaccount.htm'



               // },



				{



                    text: 'Order a Birth Certificate', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/health/BirthCert/index.html'



                },



				{



                    text: 'Purchase an Accident Report', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/redirect/vectrareports.html'



                },



				{



                    text: 'Register to Vote', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/redirect/voterregistration.html'



                },



				{



                    text: 'Relocate to Houston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/relocation.html'



                },



				{



                    text: 'Report Graffiti Violations', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/npc/npc_vis_blight.htm'



                },



				{



                    text: 'Report a Parking Meter Problem', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/parking/reportproblem.htm'



                },



				{



                    text: 'Report a Street Light Outage', 



					handler: onItemClick,



					url:'http://www.centerpointenergy.com/outage'



                },



				{



                    text: 'Review 2007 - 2008 SNAP Plan Activity', 



					handler: onItemClick,



					url:'http://pdinet.pd.ci.houston.tx.us/snap_public/index.asp'



                },



				{



                    text: 'Submit a Health Dept. Research Request', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/health/request.html'



                },{



                    text: 'View City Employees Benefits', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/hr/benpages/ben_main.htm'



                },



				{



                    text: 'View Ethics and Conflicts of Interest', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/council/conflict.html'



                },



				{



                    text: 'Volunteer with the City of Houston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/volunteer/index.html'



                },



				



				{



                    //text: 'Weather', 



//					handler: onItemClick,



					



                },



				{



                    //text: 'Wortham Center', 



//					handler: onItemClick,



					



                },



				{



                    //text: 'More...', 



//					handler: onItemClick,



					



                }]



            }



        }),



	



		'-',



		



		new Ext.Toolbar.Button({



            text: 'Government',



            handler: onButtonClick,



            tooltip: {text:'Find out about the Mayor and City Council', title:'Government'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'Mayor', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/mayor/index.html'



                },



				



				{



                    text: 'City Controller', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/controller/index.html'



                },



				



				{



                    text: 'City Council', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/council/index.html'



                }, 



				



				{



                    text: 'Who Is My Council Member', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/council/whoismycm.html'



                }, 



				



				{



                    text: 'City Council Agenda', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/citysec/agendas/index.html'



                }, 



				



				{



                    text: 'City Hall History', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/cityhallhistory.html'



                }, 



				



				{



                    text: 'City Seal', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/cityseal.html'



                },



				



				{



                    text: 'Campaign Finance Reports Electronic Filing System', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/campaignfinance/index.html'



                },



				



				{



                    text: 'City Secretary', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/citysec/index.html'



                },



				



				{



                    text: 'Ethics and Conflicts of Interest', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/council/conflict.html'



                },



				



				{



                    text: 'Harris County', 



					handler: onItemClick,



					url:'http://www.hctx.net'



                },



				



				{



                    text: 'Ft. Bend County', 



					handler: onItemClick,



					url:'http://www.co.fort-bend.tx.us'



                },



				



				{



                    text: 'Montgomery County', 



					handler: onItemClick,



					url:'http://www.co.montgomery.tx.us'



                },



				



				{



                    text: 'State of Texas', 



					handler: onItemClick,



					url:'http://www.texas.gov'



                },



				



				{



                    text: 'More...', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/govt/index.html'



                }]



            }



        }),



	



		'-',



		new Ext.Toolbar.Button({



            text: 'Residents',



            handler: onButtonClick,



            tooltip: {text:'Find out about tours and Court locations', title:'Residents'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'Animal Control and Adoptions', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/barc/index.html'



                },



				



				{



                    text: 'Applications, Forms, Surveys', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/forms/index.html'



                },



				



				{



                    text: 'Area School Districts', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/education.html'



                }, 



				



				{



                    text: 'Birth / Death Certificates', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/health/BirthCert/index.html'



                }, 



				



				{



                    text: 'CitizensNet Registration', 



					handler: onItemClick,



					url:'http://cohapp.cityofhouston.gov/citizensnet'



                }, 



				



				{



                    text: 'CitizensNet Archive', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/citizensnet/index.html'



                }, 



				



				{



                    text: 'City Hall Tours', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/cao/cityhalltours.html'



                },



				



				{



                    text: 'City Holidays', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/cityholidays.html'



                },



				



				{



                    text: 'Civic Art', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/municipalart/index.html'



                },



				



				{



                    text: 'Contact Us', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/contactus/index.html'



                },



				



				{



                    text: 'Driver Safety Course (DSC)', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/courts/HowDoIRequestDefensiveDriving.html'



                },



				



				{



                    text: 'Education Initiatives', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/education/index.html'



                },



				



				{



                    text: 'Emergency Management', 



					handler: onItemClick,



					url:'http://www.houstonoem.net'



                },



				



				{



                    text: 'Environment (Green Houston)', 



					handler: onItemClick,



					url:'http://www.greenhoustontx.gov//index.html'



                },



				



				{



                    text: 'Historic Landmarks and Districts', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/histpres/index.html'



                },



				



				{



                    text: 'Historic Preservation', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/planning/HistoricPres/hist_pres.html'



                },



				{



                    text: 'Jones Hall', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/joneshall/index.htm'



                },



				{



                    text: 'Maps to City Facilities', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/maps/index.html'



                },



				{



                    text: 'Municipal Channel (HTV)', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/htv/index.html'



                },



				{



                    text: 'Municipal Courts Locations', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/courts/index.html'



                },



				{



                    text: 'Neighborhood Protection Corps', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/npc.htm'



                },



				{



                    text: 'Parking Management', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/parking/index.htm'



                },



				{



                    text: 'Pay a Fine', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/courts/HowDoIPayMyTicket.html'



                },



				{



                    text: 'People with Disabilities Office', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/disabilities/index.html'



                },



				{



                    text: 'Red Light Cameras Info', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/trafficsafety.htm'



                },



				{



                    text: 'Traffic', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/redirect/transtar.html'



                },



				{



                    text: 'Veterans Affairs Office', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/vetaffairs/index.html'



                },



				{



                    text: 'Virtual Houston', 



					handler: onItemClick,



					url:'http://mycity.houstontx.gov/public'



                },



				{



                    text: 'Water / Sewer Rates 2010 (.pdf)', 



					handler: onItemClick,



					url:'http://documents.publicworks.houstontx.gov/documents/divisions/resource/ucs/2010_water_rates.pdf'



                },



				//{
//
//
//
//                    text: 'Weather', 
//
//
//
//					handler: onItemClick,
//
//
//
//					url:'http://www.houstontx.gov/oem/weather.html'
//
//
//
//                },



				{



                    text: 'Wortham Center', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/worthamcenter/index.htm'



                },



				{



                    text: 'More...', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/residents/index.html'



                }]



            }



        }),



	



		'-',



		new Ext.Toolbar.Button({



            text: 'Business',



            handler: onButtonClick,



            tooltip: {text:'Find out about Permits and Ordinances', title:'Business'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'Boards & Commissions', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/boards/index.html'



                },



				



				{



                    text: 'Brownfields', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/finance/brownfields/index.html'



                },



				



				{



                    text: 'Building Permits', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/permits/index.html'



                }, 



				



				{



                    text: 'Code Enforcement', 



					handler: onItemClick,



					url:'http://www.publicworks.houstontx.gov/planning/enforcement.html'



                }, 



				



				{



                    text: 'Code of Ordinances', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/codes/index.html'



                }, 



				



				{



                    text: 'Current Contracting Opportunities', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/aacc/current.html'



                }, 



				



				{



                    text: 'Delinquent Taxpayers', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/taxpayers.html'



                }, 



				



				{



                    text: 'E.B. Cape Training Center', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/capecenter/index.html'



                },



				



				{



                    text: 'Hurricane Ike Mediation Program', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/ikemediation.html'



                },



				



				{



                    text: 'LARA / Houston HOPE', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/lara/index.html'



                },



				



				{



                    text: 'Municipal Settings Designations', 



					handler: onItemClick,



					url:'http://www.publicworks.houstontx.gov/planning/msd.html'



                },



				



				{



                    text: 'MWDBE / SBE Directory', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/redirect/mwdbe.html'



                },



				



				{



                    text: 'One Stop Business Center', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/onestop/index.html'



                },



				



				{



                    text: 'Real Property For Sale', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/generalservices/realbids.html'



                },



				



				{



                    text: 'Register as a City Supplier', 



					handler: onItemClick,



					url:'https://purchasing.houstontx.gov/vendor_registration.html'



                },



				



				{



                    text: 'More...', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/business/index.html'



                }]



            }



        }),



	



		'-',



		new Ext.Toolbar.Button({



            text: 'Departments',



            handler: onButtonClick,



            tooltip: {text:'Find a City Department', title:'Departments'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'Department Directors', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/departments.html'



                },



				



				{



                    text: '311 Houston Service Center', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/311/index.html'



                },



				



				{



                    text: 'Administration & Regulatory Affairs', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/ara/index.html'



                }, 



				



				{



                    text: 'Affirmative Action & Contract Compliance', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/aacc/index.html'



                }, 



				



				{



                    text: 'Citizens Assistance Office', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/cao/index.html'



                }, 



				



				{



                    text: 'City Secretary', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/citysec/index.html'



                }, 



				



				{



                    text: 'Convention & Entertainment Facilities', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/cef/index.html'



                },



				



				{



                    text: 'Finance', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/finance/index.html'



                },



				



				{



                    text: 'Fire', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/fire/index.html'



                },



				



				{



                    text: 'General Services', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/generalservices/index.html'



                },



				



				{



                    text: 'Health & Human Services', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/health/index.html'



                },



				



				{



                    text: 'Housing & Community Development', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/housing/index.html'



                },



				



				{



                    text: 'Houston Airport System', 



					handler: onItemClick,



					url:'http://www.fly2houston.com'



                },



				



				{



                    text: 'Houston Emergency Center', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/hec/index.html'



                },



				



				{



                    text: 'Human Resources', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/hr/index.html'



                },



				{



                    text: 'Information Technology', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/itd/index.html'



                },



				{



                    text: 'Legal', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/legal/index.html'



                },



				{



                    text: 'Library', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/library/index.html'



                },



				{



                    text: 'Municipal Courts', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/courts/index.html'



                },



				{



                    text: 'Parks & Recreation', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/parks/index.html'



                },



				{



                    text: 'Planning & Development', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/planning/index.html'



                },



				{



                    text: 'Police', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/police/index.html'



                },



				{



                    text: 'Public Works & Engineering', 



					handler: onItemClick,



					url:'http://www.publicworks.houstontx.gov/index.html'



                },



				{



                    text: 'Solid Waste Management', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/solidwaste/index.html'



                }]



            }



        }),



	



		'-',



		new Ext.Toolbar.Button({



            text: 'Visitors',



            handler: onButtonClick,



            tooltip: {text:'Learn about the history of City Hall', title:'Visitors'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



            menu : {



                items: [



						{



                    text: 'About Houston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/index.html'



                },



				



				{



                    text: 'Airports', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/airports.html'



                },



				



				{



                    text: 'Civic Art', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/municipalart/index.html'



                }, 



				



				{



                    text: 'Cultural Affairs', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/culturalaffairs/index.html'



                }, 



				



				{



                    text: 'History of City Hall', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/cityhallhistory.html'



                }, 



				



				{



                    text: 'Home Page Photo Gallery', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/homepagephotos/index.html'



                }, 



				



				{



                    text: 'Houston Tourism', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/tourism.html'



                },



				



				{



                    text: 'Miller Outdoor Theatre', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/events/miller.html'



                },



				



				{



                    text: 'Photo Tour of Houston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/abouthouston/phototour/index.html'



                },



				



				



				{



                    text: 'More...', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/visitors/index.html'



                }]



            }



        }),



	



		'-',



		new Ext.Toolbar.Button({



            text: 'En Espanol',



            handler: onButtonClick,



            tooltip: {text:'City of Houston Spanish Website', title:'En Espanol'},



            iconCls: 'blist',



			handler: onButtonClick,



			url: '#',



            // Menus can be built/referenced by using nested menu config objects



			menu : {



                items: [



						{



                    text: 'Comercio', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/comercio/index.html'



                },



				



				{



                    text: 'Departamentos', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/departamentos/index.html'



                },



				



				{



                    text: 'Gobierno', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/gobierno/index.html'



                }, 



				



				



				



				{



                    text: 'InfoHouston', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/infohouston/index.html'



                }, 



				



				{



                    text: 'Residentes', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/residentes/index.html'



                },



				



				



				



				



				{



                    text: 'Visitantes', 



					handler: onItemClick,



					url:'http://www.houstontx.gov/espanol/visitantes/index.html'



                }]



            }



            



        })



		



		



	);







    //menu.addSeparator();



    // Menus have a rich api for



    // adding and removing elements dynamically



    var item = menu.add({



        text: 'Dynamically added Item'



    });



    // items support full Observable API



    item.on('click', onItemClick);







    // items can easily be looked up



    //menu.add({



//        text: 'Disabled Item',



//        id: 'disableMe'  // <-- Items can also have an id for easy lookup



//        // disabled: true   <-- allowed but for sake of example we use long way below



//    });



//    // access items by id or index



//    menu.items.get('disableMe').disable();







    // They can also be referenced by id in or components



    //tb.add('-', {



//        icon: 'list-items.gif', // icons can also be specified inline



//        cls: 'x-btn-icon',



//        tooltip: '<b>Quick Tips</b><br/>Icon only button with tooltip'



//    }, '-');







   // var scrollMenu = new Ext.menu.Menu();



//    for (var i = 0; i < 50; ++i){



//        scrollMenu.add({



//            text: 'Item ' + (i + 1)



//        });



//    }



    //scrollable menu



    //tb.add({



//        icon: 'preview.png',



//        cls: 'x-btn-text-icon',



//        text: 'Scrolling Menu',



//        menu: scrollMenu



//    });







    // add a combobox to the toolbar



    







    tb.doLayout();







    // functions to display feedback



    function onButtonClick(btn){



       // Ext.example.msg('Button Click','You clicked the "{0}" button.', btn.text);



	    var link = btn.url;



	   window.location =(link);



    }







    function onItemClick(item)



	{



       //Ext.example.msg('Menu Click', 'You clicked the "{0}" menu item.', item.text);



	   var link = item.url;



	   window.location =(link);// String.format();



							



    }







    function onItemCheck(item, checked){



       // Ext.example.msg('Item Check', 'You {1} the "{0}" menu item.', item.text, checked ? 'checked' : 'unchecked');



    }







    function onItemToggle(item, pressed){



        //Ext.example.msg('Button Toggled', 'Button "{0}" was toggled to {1}.', item.text, pressed);



    }







});