// JavaScript Document
function urlOpen(newurl) {
	window.location.href = newurl;	
}

function buildGuardianMenu() {
	var formbar = new Ext.Toolbar({
		 height: 31,
		 renderTo: 'menubar',
		 id: 'formbar-content',
		 items: [
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				text: 'Home',
				cls: 'menuFontSize',
				handler: function() { urlOpen('default.html') }
			}),
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				text: 'Our Services',
				//clickEvent: 'mouseover',
				menu : { items:
				[
				 	{
						text: "Help with Life's Challenge's (Brochure)",
						handler: function() { window.open('resources/GFAS-Brochure.pdf'); }
					},
					'-',
					{
						text: 'Conservatorship',
						handler: function() { urlOpen('conservatorship.html') }
					},
					{
						text: 'Guardianship',
						handler: function() { urlOpen('guardianship.html') }
					},
					{
						text: 'Power of Attorney',
						handler: function() { urlOpen('powerofattorney.html') }
					},
					{
						text: 'Probating Estates',
						handler: function() { urlOpen('probatingestates.html') }
					},
					{
						text: 'Representative Payee',
						handler: function() { urlOpen('representativepayee.html') }
					},
					{
						text: 'Financial Stress Buster',
						handler: function() { urlOpen('stressbuster.html') }
					},
					{
						text: 'Training on Money Skills',
						handler: function() { urlOpen('moneyskillstraining.html') }
					},
					{
						text: 'Trust Administration',
						handler: function() { urlOpen('trustadministration.html') }
					}
				]}								
			}),
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				text: 'About Us',
				//clickEvent: 'mouseover',
				menu : { items:
				[
					{
						text: 'Our Locations',
						handler: function() { urlOpen('ourlocations.html') }
					},
					{
						text: 'Our Staff',
						handler: function() { urlOpen('ourstaff.html') }
					},
					{
						text: 'Our Board',
						handler: function() { urlOpen('ourboard.html') }
					},
					{
						text: 'Our Mission, Vision, and Guiding Ideas',
						handler: function() { urlOpen('ourmission.html') }
					},
					{
						text: 'Service Area',
						handler: function() { urlOpen('servicearea.html') }
					},
					{
						text: 'Employment Opportunities',
						handler: function() { urlOpen('employmentopportunities.html') }
					},
					'-',
					{
						text: 'Recent News Stories',
						handler: function() { urlOpen('recentnewsstories.html') }
					},
					{
						text: 'Newsletters',
						handler: function() { urlOpen('newsletters.html') }
					}
				]}								
			}),
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				//clickEvent: 'mouseover',
				text: 'How <span style="text-decoration: underline">You</span> Can Help',
				menu : { items:
				[
					{
						text: 'How to Donate',
						handler: function() { urlOpen('howtodonate.html') }
					},
					{
						text: 'Thanks to Our Supporters',
						handler: function() { urlOpen('supporterthanks.html') }
					},
					{
						text: 'Volunteers Needed',
						handler: function() { urlOpen('volunteersneeded.html') }
					}
				]}
			}),
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				//clickEvent: 'mouseover',
				text: 'Refer Someone',
				menu : { items:
				[
					{
						text: 'Refer Someone for Help',
						handler: function() { urlOpen('refersomeoneforhelp.html') }
					}
				]}
			}),
/*			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				//clickEvent: 'mouseover',
				text: 'News',  // &amp; Blog',
				menu : { items:
				[
 					{
						text: 'Recent New Stories',
						handler: function() { urlOpen('recentnewsstories.html') }
					},
					{
						text: 'Newsletters',
						handler: function() { urlOpen('newsletters.html') }
					}
  /*,
					{
						text: 'Blog',
						handler: function() { urlOpen('blog.html') }
					},
					{
						text: 'News Archive',
						handler: function() { urlOpen('newsarchive.html') }
					} *//*
				]}
			}),  */
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				//clickEvent: 'mouseover',
				text: '<i>Inspire</i> CDFCU',
				menu : { items:
				[
					{
						text: 'Learn more about the <span style="font-style: italic;">Inspire</span> Proposed Community Development Federal Credit Union',
						handler: function() { urlOpen('inspire.html') }
					}
				]}
			}),
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
//				//clickEvent: 'mouseover',
				text: 'Elder Abuse Prevention',
				menu : { items:
				[
					{
						text: 'Preventing Elder Abuse',
						handler: function() { urlOpen('elderabuseprevention.html') }
					},
					{
						text: 'About the Elder Abuse Prevention Coalition',
						handler: function() { urlOpen('abouteapc.html') }
					}
				]}
			}),
			'&nbsp;',
/*			new Ext.Toolbar.Button({
				cls: 'x-btn-icon',
				icon: 'images/rssfeed.gif',
				handler: function() {
						alert('Welcome Home!')
				}								
			}),  */
			'&nbsp;',
			new Ext.Toolbar.Fill(),
			'Search:',
			'<input type="text" name="searchstr" id="searchstr" style="width: 100px;">',
			new Ext.Toolbar.Button({
				cls: 'x-btn-text',
				text: 'Go',
				handler: function() {
					var srch = document.getElementById('searchstr');
					window.open('http://www.google.com/cse?cx=004539082249651225932%3Afaqtrxytn7u&ie=UTF-8&q=' + srch.value + '&sa=Search');
				}
		   	})
		]
	})
}	// buildGuardianMenu