var MENU_ITEMS_XP = [
	[wrap_root('Home Buying'), null, {'sw' : 110}, 
		[wrap_parent('Buying a Home'), null, null,
			[wrap_child('1st Time Buyer', null), './bc_first_time_home.htm' ],
			[wrap_child('Steps', null), './steps.htm' ],
			[wrap_child('Pre-approvals', null), './pre-approval.htm' ],
			[wrap_child('Closing costs', null), './costs.htm' ]
		],
		[wrap_parent('Special Programmes'), null, null, 
			[wrap_child('Self-employed', null), './self_employed.htm' ],
			[wrap_child('Credit Problems', null), './credit_problems.htm' ],
			[wrap_child('New Immigrants', null), './new_immigrants.htm' ]
		],
		[wrap_child('Rental Properties', null), './investment_rental_bc.htm'],
		[wrap_child('Apply Online', null), '/Apply.htm'],
	],
	[wrap_root('Refinancing'), null, {'sw' : 110}, 
		[wrap_child('Renewals', null), './renewal.htm'],
		[wrap_parent('Refinance'), null, null, 
			[wrap_child('Why Refinance', null), './Refinancing.htm' ],
			[wrap_child('Debt consolidation', null), './debt_consolidation_BC.htm' ],
		],
		[wrap_child('Apply Online', null), './Apply.htm']
	],
	[wrap_root('Rates'), null, {'sw' : 110}, 
		[wrap_child('Current Rates', null), './mortgage_rates_bc.htm'],
		[wrap_parent('Graphs'), null, null, 
			[wrap_child('This year (2008)', null), './graphs/latest_graph.htm' ],
			[wrap_child('Past 3 years', null), './graphs/2003_2007_rates.htm' ],
			[wrap_child('Past 50 years', null), './graphs/50yr_historical.htm' ]
		]
	],
      [wrap_root('Education Centre'), null, {'sw' : 110}, 
		[wrap_child('Home Buyer Seminars', null), './BC_first_time_home_buyers_seminar.htm'],
		[wrap_child('Videos', null), './videos.htm'],
		[wrap_child('Home Buyer CD', null), './vancouver_mortgage_centre.htm#home_buyer_cd'],
		[wrap_child('E-Newsletters', null), './opt_in.htm'],
		[wrap_child('Blog', 'rss.jpg'), 'http://www.bcmortgage.ca/blog/'],
		[wrap_child('Glossary', null), './glossary.htm'],
		[wrap_child('FAQs', null), './faq.htm']
	],
	[wrap_root('Tools'), null, {'sw' : 110}, 
		[wrap_child('Calculators', null), './bc_mortgage_calculator.htm'],
		[wrap_parent('Sample Forms'), null, null, 
			[wrap_child('Application Form', null), './forms/mortgage_app.PDF' ],
			[wrap_child('Job Letter', null), './forms/Salary_Letter.PDF' ],
			[wrap_child('Gift Letter', null), './forms/gift.PDF' ],
			[wrap_child('Home Buyers Plan', null),'./forms/home_buyers_plan_form.pdf' ]
		],
		[wrap_child('CMHC Publications', null), './links.htm#cmhc'],
		[wrap_child('Tax Guides', null), './links.htm#tax'],
		[wrap_child('Links', null), './links.htm']
	],
	[wrap_root('Mrtg Options'), null, {'sw' : 110}, 
		[wrap_child('Mortgage Menu', null), './mortgage_menu.htm'],
		[wrap_child('Min. Downpayment', null), './no_down_payment.htm'],
		[wrap_child('Interest Rates', null), './mortgage_rates_bc.htm'],
		[wrap_child('Amortizations', null), './amortizations.htm'],
		[wrap_child('Purchase+Improvement', null), './purchase_plus_improvement.htm'],
		[wrap_child('Insurance', null), './insurance.htm'],
		[wrap_child('Private Lenders', null), './private_mortgage.htm']
	]
]; 
var ii0 = new Image(); ii0.src = 'icons2/rss.jpg';

function wrap_parent (text,icon) {
	return [['<table cellpadding=1 cellspacing=0 border=0 width=100%><tr><td bgcolor=#EFEDDE><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=16', ' hspace=3></td><td width=100%><table cellpadding=1 cellspacing=0 border=0 width=100% height=22><tr><td class=a0>&nbsp; ', text, '</td></tr></table></td><td><img src=icons2/arr.gif width=4 height=7 align="middle" align=absmiddle hspace=3></td></tr></table>'].join(''),
	['<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=1 cellspacing=0 border=0 width=100% height=22 bgcolor=#CED1C3><tr><td><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=16', ' hspace=3></td><td width=100% class=a0>&nbsp; ', text, '</td><td><img src=icons2/arr.gif width=4 height=7 align="middle" align=absmiddle hspace=3></td></tr></table></td></tr></table>'].join(''),
	['<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=1 cellspacing=0 border=0 width=100% height=22 bgcolor=#CED1C3><tr><td><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=16', ' hspace=3></td><td width=100% class=a0>&nbsp; ', text, '</td><td><img src=icons2/arr.gif width=4 height=7 align="middle" align=absmiddle hspace=3></td></tr></table></td></tr></table>'].join('')
	];
}

function wrap_child (text,icon) {
	return [['<table cellpadding=1 cellspacing=0 border=0 width=100%><tr><td bgcolor=#EFEDDE><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=15', ' hspace=3></td><td width=100%><table cellpadding=1 cellspacing=0 border=0 width=100% height=22><tr><td class=a0>&nbsp; ', text, '</td></tr></table></td></tr></table>'].join(''),
	['<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=1 cellspacing=0 border=0 width=100% height=22 bgcolor=#CED1C3><tr><td><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=16', ' hspace=3></td><td width=99% class=a0>&nbsp; ', text, '</td></tr></table></td></tr></table>'].join(''),
	['<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=1 cellspacing=0 border=0 width=100% height=22 bgcolor=#CED1C3><tr><td><img height=16 src=', icon !=null ? 'icons2/' + icon: 'menu_files/pixel.gif width=16', ' hspace=3></td><td width=99% class=a0>&nbsp; ', text, '</td></tr></table></td></tr></table>'].join('')
	];
}

function wrap_root (text) {
	return [
	'<table cellpadding=1 cellspacing=0 border=0 width=100%><tr><td><table cellpadding=0 cellspacing=0 border=0 width=100% height=21><tr><td width=100% class=a0 align="center">&nbsp; ' + text + ' &nbsp;</td></tr></table></td></tr></table>',
	'<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=0 cellspacing=0 border=0 width=100% height=21><tr><td width=100% class=a1 align="center">&nbsp; ' + text + ' &nbsp;</td></tr></table></td></tr></table>',
	'<table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=#93A070><tr><td><table cellpadding=0 cellspacing=0 border=0 width=100% height=21><tr><td width=100% class=a1 align="center">&nbsp; ' + text + ' &nbsp;</td></tr></table></td></tr></table>'
	];
}
