//------------------------------------------------------
// Author: Callum Elliot
// Date: 10/04/00
// Title: drop down menu initialiser v3
// menu elements are all built from one source file
// note: need to develop the array so there is only 1
//		multi dimensional array which can be called
// 		easily within the loop
//------------------------------------------------------

//------------------------------------------------------
// User defined Variables:
// noOfMenus: total number of drop down menus
// itemsx: a new array is required for each menu
// 
// Variables:
// menu: to store each menu's html built in the for loop
//------------------------------------------------------


var noOfMenus = 7;
var items0 = new Array();
var items1 = new Array();
var items2 = new Array();
var items3 = new Array();
var items4 = new Array();
var items5 = new Array();
var items6 = new Array();

var menu = new Array(noOfMenus);

//------------------------------------------------------
// add menu 1 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items0[0] = '/html/1about/1-1company.htm';
items0[1] = 'Company';
items0[2] = '/html/1about/1-2publications.htm';
items0[3] = 'Publications';
items0[4] = '/html/1about/1-5awards.htm';
items0[5] = 'Awards';
items0[6] = '/html/1about/1-4ifa.htm';
items0[7] = 'Independent Advice';

//------------------------------------------------------
// add menu 2 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items1[0] = '/html/2news/2-2pressRelease.htm';
items1[1] = 'Press Releases';


//------------------------------------------------------
// add menu 3 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items2[0] = '/html/3contact/3-1policy.htm';
items2[1] = 'Policy Enquiries';
items2[2] = '/html/3contact/3-2productInfo.htm';
items2[3] = 'Product Info';
items2[4] = '/html/3contact/3-3literature.htm';
items2[5] = 'Literature Request';
items2[6] = '/html/3contact/3-4website.htm';
items2[7] = 'Website Feedback';
items2[8] = '/html/3contact/3-5ifap.htm';
items2[9] = 'Find An Adviser';

//------------------------------------------------------
// add menu 4 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items3[0] = '/webcentre/funds/lifefunds.jsp';
items3[1] = 'Life';
items3[2] = '/webcentre/funds/pensionfunds.jsp';
items3[3] = 'Pensions';
items3[4] = '/html/4fundprices/4-3fundperformance.htm';
items3[5] = 'Fund Performance';

//------------------------------------------------------
// add menu 5 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items4[0] = '/html/5products/5-2protection.htm';
items4[1] = 'PROTECTION';
items4[2] = '/html/5products/5-2-1personal.htm';
items4[3] = 'Personal';
items4[4] = '/html/5products/5-2-2business.htm';
items4[5] = 'Business';
items4[6] = '/html/5products/5-2-3mortgage.htm';
items4[7] = 'Mortgage';
items4[8] = '/html/5products/5-2-6lifeline.htm';
items4[9] = 'Lifeline';
items4[10] = '/html/5products/5-2-7whole.htm'
items4[11] = 'Pegasus';
items4[12] = '/html/5products/5-3quote.htm';
items4[13] = 'QUICK QUOTES';

//------------------------------------------------------
// add menu 6 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------
items5[0] = '#';
items5[1] = '#';

//------------------------------------------------------
// add menu 7 elements:
// 		url first,
//		then the Menu Link text
//------------------------------------------------------

items6[0] = '/html/2news/2-2pressRelease.htm';
items6[1] = 'Press Releases';
items6[2] = '/html/8presscentre/8-1presscentre.htm';
items6[3] = 'Spokespeople';
items6[4] = '/html/8presscentre/8-2presscentre.htm';
items6[5] = 'Press Enquiries';


//------------------------------------------------------
// Loop builds the html from the array info
// the var menu[menuNo] stores info
// data written to html doc
//------------------------------------------------------

if(document.all){
	for (var menuNo = 0; menuNo <= noOfMenus-1; menuNo++){
		items = eval('items' + menuNo);
		menu[menuNo] = '<DIV ID="menu' + (menuNo + 1) + '" CLASS="menu">';
		for (var i = 0; i<=items.length-1; i+=2){
			menu[menuNo] += '<tr><td BGCOLOR="#182D56"><A ID="lnk" HREF="' + items[i] +'">';
			menu[menuNo] += items[i+1];
			menu[menuNo] += '</a></td></tr><br>';
			}
		menu[menuNo] += '</DIV>';
		if((document.layers)||(document.all)){
		document.write(menu[menuNo]);
		}
	}
}
if(document.layers){ 
	for (var menuNo = 0; menuNo <= noOfMenus-1; menuNo++){
		items = eval('items' + menuNo);
		menu[menuNo] = '<DIV ID="menu' + (menuNo + 1) + '" CLASS="menu"><table cellpadding="2" cellspacing="0" border="0" BGCOLOR="#C4C4C4" width="150">';
		for (var i = 0; i<=items.length-1; i+=2){
			menu[menuNo] += '<tr><td BGCOLOR="#182D56"><A ID="lnk" HREF="' + items[i] +'">';
			menu[menuNo] += items[i+1];
			menu[menuNo] += '</a></TD></TR>';
			}
		menu[menuNo] += '</TABLE></DIV>';
		if((document.layers)||(document.all)){
		document.write(menu[menuNo]);
		}
	}
}
