// MENUS
//
// menu[menuNumber][0] = new Menu(Vertical menu? (true/false), 'popout indicator', left, top, width, 'mouseover colour', 'background colour', 'border stylesheet', 'text stylesheet');
//
// Left and Top are measured on-the-fly relative to the top-left corner of
// its trigger, or for the root menu, the top-left corner of the page.
// Leftwards popout with a negative x and y relative to its trigger.
//
// menu[menuNumber][itemNumber] = new Item('Text', 'URL', 'target frame', length of menu item, additional spacing to next menu item, number of target menu to popout);
//
// If no target menu (popout) is desired, set it to 0. Likewise, if your
// site does not use frames, pass an empty string as a frame target.  Set
// the target frame to '' unless I'm using frames.
//
// The 'number of target menu to popout is the index of the menu in the menu
// array. This lets us put all the subs at the end.
//
// An example of a link with a target frame/window as well...
// menu[0][4] = new Item('  Site', 'http://gusnz.cjb.net', '_new', 40, 10, 0);
//
// Something that needs explaining - the Vertical Menu setup. You can see
// most menus below are 'true', that is they are vertical, except for the
// first root menu. The 'length' and 'width' of an item depends on its
// orientation -- length is how long the item runs for in the direction of
// the menu, and width is the lateral dimension of the menu. Just look at
// the examples and tweak the numbers, they'll make sense eventually :).
menu = new Array();

// Default colours passed to most menu constructors (just passed to functions,
// not a global variable - makes things easier to change later in bulk).
var defOver = '#5080F0', defBack = '#002080';

// Default 'length' of menu items - item height if menu is vertical,
// width if horizontal.
var defLength = 22;
var defWidth = 105;
var defSpacing = 15;
var defSubWidth = 120;

// Menu 0 is the special, 'root' menu from which everything else arises.
// This menu holds all the roots for the menus.
menu[0] = new Array();
menu[0][0] = new Menu(false, '', 10, 104, 17, defBack, '#002080', 'cascadeMenu', 'itemText');

menu[0][1] = new Item('Home', 'http://www.lonestarlending.com/index.shtml', '', defWidth, defSpacing, 0);
menu[0][2] = new Item('About Us', '/about.shtml', '', defWidth, defSpacing, 2);
menu[0][3] = new Item('News', null, '', defWidth, defSpacing, 3);
menu[0][4] = new Item('Loan Programs', null, '', defWidth, defSpacing, 4);
menu[0][5] = new Item('Resources', null, '', defWidth, defSpacing, 5);
menu[0][6] = new Item('RE Professionals', '/REProf/Landing.shtml', '', defWidth, defSpacing, 6);

// Menu 1 - Home
menu[1] = new Array();
menu[1][0] = new Menu(true, '>', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

// Menu 2 - About Us
menu[2] = new Array();
menu[2][0] = new Menu(true, '>', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

//menu[2][1] = new Item('Loan Advisors', '/los.shtml', '', defLength, 0, 0);
menu[2][1] = new Item('Offices', '/offices.shtml', '', defLength, 0, 0);
menu[2][2] = new Item('Employment', '/employment.shtml', '', defLength, 0, 0);
menu[2][3] = new Item('Stacy\'s Gallery', 'http://lonestarlending.com/gallery/', '_blank', defLength, 0, 0);

// Menu 3 - News
menu[3] = new Array();
menu[3][0] = new Menu(true, '>', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[3][1] = new Item('Blog', '/b2evolution/index.php/', '_blank', defLength, 0, 0);
menu[3][2] = new Item('Newsletters', '/newsletter_main.shtml', '', defLength, 0, 0);
menu[3][3] = new Item('Media Room', '/coming_soon.shtml', '', defLength, 0, 0);
menu[3][4] = new Item('Our Customers', null, '', defLength, 0, 10);

// Menu 4 - Loan Programs
menu[4] = new Array();
menu[4][0] = new Menu(true, '>', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[4][1] = new Item('Homebuyers', null, '', defLength, 0, 11);
menu[4][2] = new Item('Homeowners', '/homeowner.shtml', '', defLength, 0, 0);
menu[4][3] = new Item('Investors', null, '', defLength, 0, 7);
menu[4][4] = new Item('Business Owners', '/busowner.shtml', '', defLength, 0, 0);

// Menu 5 - Resources
menu[5] = new Array();
menu[5][0] = new Menu(true, '>', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[5][1] = new Item('Calculators', '/cgi-bin/Calculators.pl', '', defLength, 0, 0);
menu[5][2] = new Item('Compare Options', '/cgi-bin/LoanCompare.pl', '', defLength, 0, 0);
menu[5][3] = new Item('Coupons', '/cgi-bin/CouponMap.pl', '', defLength, 0, 0);
menu[5][4] = new Item('Seminars', '/cgi-bin/ConsumerSeminars.pl', '', defLength, 0, 0);
menu[5][5] = new Item('Market Update', '/cgi-bin/MarketUpdate.pl', '_blank', defLength, 0, 0);
menu[5][6] = new Item('Market Snapshot', 'http://www.cnbc.com/id/15839203/site/14081545/', '_blank', defLength, 0, 0);
menu[5][7] = new Item('Partners', '/partner_main.shtml', '', defLength, 0, 0);
menu[5][8] = new Item('Glossary', '/Library/Files/glossary.shtml', '', defLength, 0, 0);
menu[5][9] = new Item('Library', '/cgi-bin/search/SearchLibrary.pl', '', defLength, 0, 0);

// Menu 6 - RE Professionals
menu[6] = new Array();
menu[6][0] = new Menu(true, '<', 0, defLength, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[6][1] = new Item('Your Customers', '/cgi-bin/REMain.pl', '', defLength, 0, 0);
menu[6][2] = new Item('Tools', '/cgi-bin/RESeminars.pl?TmplFile=Tools.tmpl', '', defLength, 0, 9);
menu[6][3] = new Item('Rate Sheets', null, '', defLength, 0, 8);
menu[6][4] = new Item('Market Update', '/cgi-bin/MarketUpdate.pl', '', defLength, 0, 0);
menu[6][5] = new Item('Cheesecakes!', '/cgi-bin/RECheesecake.pl', '', defLength, 0, 0);
//menu[6][6] = new Item('Open Houses', '/cgi-bin/REOpenHouse.pl', '', defLength, 0, 0);
//menu[6][7] = new Item('Realtor Tour', '/cgi-bin/RETour.pl', '', defLength, 0, 0);

// Sub Menu 7 - Loan Programs/Investors
menu[7] = new Array();
menu[7][0] = new Menu(true, '>', defSubWidth, 0, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[7][1] = new Item('Residential', '/investor_res.shtml', '', defLength, 0, 0);
menu[7][2] = new Item('Commercial', '/investor_comm.shtml', '', defLength, 0, 0);

// Sub Menu 8 - RE Professional/Rate Sheet
menu[8] = new Array();
menu[8][0] = new Menu(true, '>', -defSubWidth, 0, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[8][1] = new Item('Residential', '/cgi-bin/ResRates.pl', '', defLength, 0, 0);
menu[8][2] = new Item('Commercial', '/cgi-bin/CommRates.pl', '', defLength, 0, 0);

// Sub Menu 9 - RE Professional/Tools
menu[9] = new Array();
menu[9][0] = new Menu(true, '>', -defSubWidth, 0, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[9][1] = new Item('Home Flyer', '/cgi-bin/REOHFlyer.pl', '', defLength, 0, 0);
menu[9][2] = new Item('Pre-qual Tool', '/cgi-bin/REQualTool.pl', '', defLength, 0, 0);
menu[9][3] = new Item('Lone Star Cards', '/cgi-bin/REOpenFile.pl?TmplFile=LoneStarCards.tmpl', '', defLength, 0, 0);
menu[9][4] = new Item('Seminars', '/cgi-bin/RESeminars.pl?TmplFile=Seminars.tmpl', '', defLength, 0, 0);

// Sub Menu 10 - News/Our Customers
menu[10] = new Array();
menu[10][0] = new Menu(true, '>', defSubWidth, 0, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[10][1] = new Item('Residential', '/res_customers.shtml', '', defLength, 0, 0);
menu[10][2] = new Item('Commercial', '/comm_customers.shtml', '', defLength, 0, 0);

// Sub Menu 11 - Loan Programs/Homebuyer
menu[11] = new Array();
menu[11][0] = new Menu(true, '>', defSubWidth, 0, defSubWidth, defOver, defBack, 'itemBorder', 'itemText');

menu[11][1] = new Item('Programs', '/homebuyer.shtml', '', defLength, 0, 0);
menu[11][2] = new Item('Assistance', '/homebuyer_assist.shtml', '', defLength, 0, 0);

//gsb Stick the menu array in the window object so I can get it in the
//gsb window generation code.
window.menus = menu;

