function MenuItem(name,href,img,level) {
this.name = name;
this.href = href;
this.img = img;
this.subItems = new Array();
this.level = (level == null ? 1 : level);
this.parent = null;
this.addSubItems = function(name,href,img)
{
var aSubItem = new MenuItem(name,href,img,this.level + 1)
aSubItem.parent = this;
this.subItems.push(aSubItem);
return aSubItem;
}
this.hasSubItems = function(){
return this.subItems.length > 0;
}
this.hasSpecialSubItems = function(subItemPageName){
for(var i = 0; i < this.subItems.length; i++){
if(subItemPageName != null && subItemPageName == this.subItems[i].name){
return true;
}
}
return false;
}
};
//TOP Menu
var topMenuItems = new Array();
var homeMenu= new MenuItem('Home', 'index.html','');
var careersMenu = new MenuItem('Careers','Career_As_An_AIA_Employee.html','');
var communityMenu = new MenuItem('Community','AIA_and_the_Community.html','');
var contactAIAMenu = new MenuItem('Contact AIA','Contact_AIA.html','');
//Put to Top
topMenuItems.push(homeMenu);
topMenuItems.push(careersMenu);
topMenuItems.push(communityMenu);
topMenuItems.push(contactAIAMenu);
//Main Menu
var mainMenuItems = new Array();
var aboutAIAMenu = new MenuItem('About AIA Singapore','About_AIA.html','images/home_about_aia_singapore.gif');
var yourNeedsMenu = new MenuItem('Your Needs','AIA_Your_Needs.html','images/home_your_needs.gif');
var aiaFundsMenu = new MenuItem('AIA Funds','FundPrices.aspx','images/home_aia_funds.gif');
var customerSupportMenu = new MenuItem('Customer Support','Forms.html','images/home_customer_support.gif');
var loginMenu = new MenuItem('Login','#','images/home_login.gif');
//Careers Nav
var careersWithAIAChildItems = careersMenu.addSubItems('Careers with AIA', '#', '');
careersWithAIAChildItems.addSubItems('- Consultants', 'Why_a_Career_as_an_AIA_Financial_Services_Consultant.html', '');
careersWithAIAChildItems.addSubItems('- Employees', 'Career_As_An_AIA_Employee.html', '');
//Login Nav
loginMenu.addSubItems('AIA eCare', '#', '');
loginMenu.addSubItems('FSC Access', '#', '');
loginMenu.addSubItems('Bank Access', '#', '');
loginMenu.addSubItems('Broker Access', '#', '');
//About AIA Nav
aboutAIAMenu.addSubItems('Who We Are','About_AIA.html','');
var aiaFinancialChildItems = aboutAIAMenu.addSubItems('AIA Financial Health Check','FHC_What.html','');
aiaFinancialChildItems.addSubItems('- What','FHC_What.html','');
aiaFinancialChildItems.addSubItems('- Why','FHC_Why.html','');
aiaFinancialChildItems.addSubItems('- Who','FHC_Who.html','');
aiaFinancialChildItems.addSubItems('- How','FHC_How.html','');
aiaFinancialChildItems.addSubItems('- When','FHC_When.html','');
aboutAIAMenu.addSubItems('Roadshow Events','AIA_Events.html','');
var mediaCentreChildItems = aboutAIAMenu.addSubItems('Media Centre','#','');
mediaCentreChildItems.addSubItems('- 2010 Press Releases','News.html','');
mediaCentreChildItems.addSubItems('- 2009 Press Releases','News2009.html','');
mediaCentreChildItems.addSubItems('- 2008 Press Releases','News2008.html','');
// mediaCentreChildItems.addSubItems('- 2007 Press Releases','News2007.html','');
//Your Needs Nav
yourNeedsMenu.addSubItems('For Individuals','AIA_For_Individuals.html','');
yourNeedsMenu.addSubItems('For Corporations','AIA_For_Corporations.html','');
//AIA Funds
aiaFundsMenu.addSubItems('Fund Prices', 'FundPrices.aspx', '');
aiaFundsMenu.addSubItems('Fund Factsheets', 'Fund_Factsheets.html', '');
aiaFundsMenu.addSubItems('Investment Fund Commentary', 'http://www.aia.com.sg/document/Investment_Commentary.pdf', '');
aiaFundsMenu.addSubItems('AIA Participating Fund Commentaries', 'AIA_Participating_Fund_Commentaries.html', '');
//Customer Support
customerSupportMenu.addSubItems('Customer Forms','Forms.html','');
customerSupportMenu.addSubItems('Make an Enquiry','customer_Enquiry.aspx','');
customerSupportMenu.addSubItems('E-Newsletter','E_Newsletter.html','');
customerSupportMenu.addSubItems('Knowledge Articles','Knowledge_Articles.html','');
customerSupportMenu.addSubItems('Announcements','Announcements.html','');
customerSupportMenu.addSubItems('FAQs','FAQs.html','');
//put to Main
mainMenuItems.push(aboutAIAMenu);
mainMenuItems.push(yourNeedsMenu);
mainMenuItems.push(aiaFundsMenu);
mainMenuItems.push(customerSupportMenu);
mainMenuItems.push(loginMenu);
//Special Menu, for special menu, needn't add the link
var specialMenuItems = new Array();
//*********For Individuals********************//
var forIndividualsMenu = new MenuItem('For Individuals','#','');
var protectionMenu = new MenuItem('Protection','#','');
var savingsMenu = new MenuItem('Savings', '#', '');
var investmentMenu = new MenuItem('Investment', '#', '');
var retirementMenu = new MenuItem('Retirement', '#', '');
//*********For Corporations********************//
var forCorporationsMenu = new MenuItem('For Corporations', '#', '');
//AIA Achiever Series
var aiaAchieverSeriesMenu = new MenuItem('AIA Achiever Series', '#', '');
//AIA Asset Growth
var aiaAssetGrowthMenu = new MenuItem('AIA Asset Growth', '#', '');
//AIA Family Wrapper
var aiaFamilyWrapperMenu = new MenuItem('AIA Family Wrapper', '#', '');
//AIA Gen3
var aiaGen3Menu = new MenuItem('AIA Gen3', '#', '');
//AIA Group Term Life/Total Permanent Disability
var groupTermLifeMenu = new MenuItem('AIA Group Term Life/Total Permanent Disability', '#', '');
//AIA Life Plus
var aiaLifePlusMenu = new MenuItem('AIA Life Plus', '#', '');
//AIA Premier Life
var aiaPremierLifeMenu = new MenuItem('AIA Premier Life', '#', '');
//AIA Prestige Term
var aiaPrestigeTermMenu = new MenuItem('AIA Prestige Term', '#', '');
//AIA Smart Growth 18 / 21 / 24
var aiaSmartGrowthMenu = new MenuItem('AIA Smart Growth 18 / 21 / 24', '#', '');
//AIA Club (Credit Life On Unpaid Bills)
var aiaClubMenu = new MenuItem('AIA Club (Credit Insurance On Unpaid Bills)', '#', '');
//AIA Mortgage Reducing Term Assurance
var aiaMortgageReducingTermAssuranceMenu = new MenuItem('AIA Mortgage Reducing Term Assurance', '#', '');
//AIA Flexi Personal Accident
var aiaFlexiPersonalAccidentMenu = new MenuItem('AIA Flexi Personal Accident', '#', '');
//AIA Group Accidental Death And Dismemberment
var aiaGroupAccidentalDeathMenu = new MenuItem('AIA Group Accidental Death And Dismemberment', '#', '');
//AIA Moneyback Protector 15 / 20 / 25
var aiaMoneybackProtectorMenu = new MenuItem('AIA Moneyback Protector 15 / 20 / 25', '#', '');
//AIA Personal Accident Protection Plan for Military Personnel (PAM)
var aiaPersonalAccidentProtectionMenu = new MenuItem('AIA Personal Accident Protection Plan for Military Personnel (PAM)', '#', '');
//AIA Personal Accident For Life
var aiaPersonalAccidentForLifeMenu = new MenuItem('AIA Personal Accident For Life', '#', '');
//AIA Prime Assured
var aiaPrimeAssuredMenu = new MenuItem('AIA Prime Assured', '#', '');
//AIA Star Shield
var aiaStarShieldMenu = new MenuItem('AIA Star Shield', '#', '');
//AIA Taxicare
var aiaTaxicareMenu = new MenuItem('AIA Taxicare', '#', '');
//AIA Covermax
var aiaCovermaxMenu = new MenuItem('AIA Covermax', '#', '');
//AIA Elite Homecare
var aiaEliteHomecareMenu = new MenuItem('AIA Elite Homecare', '#', '');
//AIA Around The World
var aiaAroundTheWorldMenu = new MenuItem('AIA Around The World', '#', '');
//AIA Group Travel Plan
var aiaGroupTravelPlanMenu = new MenuItem('AIA Group Travel Plan', '#', '');
//AIA Complete MaidCare
var aiaCompleteMaidCareMenu = new MenuItem('AIA Complete MaidCare', '#', '');
//AIA Golfsure Family Plus
var aiaGolfsureFamilyPlusMenu = new MenuItem('AIA Golfsure Family Plus', '#', '');
//AIA Valueshield
var aiaValueshieldMenu = new MenuItem('AIA Valueshield', '#', '');
//AIA Commercial Autoplan
var aiaCommercialAutoplanMenu = new MenuItem('AIA Commercial Autoplan', '#', '');
//AIA Commercial Autoplus
var aiaCommercialAutoplusMenu = new MenuItem('AIA Commercial Autoplus', '#', '');
//AIA Private Autoplan
var aiaPrivateAutoplanMenu = new MenuItem('AIA Private Autoplan', '#', '');
//AIA Private Autoplus
var aiaPrivateAutoplusMenu = new MenuItem('AIA Private Autoplus', '#', '');
//AIA Group Medical Plans
var aiaGroupMedicalPlansMenu = new MenuItem('AIA Group Medical Plans', '#', '');
//AIA HealthShield Gold
var aiaHealthShieldGoldMenu = new MenuItem('AIA HealthShield Gold', '#', '');
//AIA HealthShield Gold Elite
var aiaHealthShieldGoldEliteMenu = new MenuItem('AIA HealthShield Gold Elite', '#', '');
//AIA HealthShield Gold Prestige
var aiaHealthShieldGoldPrestigeMenu = new MenuItem('AIA HealthShield Gold Prestige', '#', '');
//AIA Hospitalisation Benefits
var aiaHospitalisationBenefitsMenu = new MenuItem('AIA Hospitalisation Benefits', '#', '');
//AIA Hospital & Surgical Plus Major Medical Riders
var aiaHospitalSurgicalMenu = new MenuItem('AIA Hospital & Surgical Plus Major Medical Riders', '#', '');
//AIA Platinum Health
var aiaPlatinumHealthMenu = new MenuItem('AIA Platinum Health', '#', '');
//AIA Group Short-Term / Long-Term Disability Benefit
var aiaGroupShortTermMenu = new MenuItem('AIA Group Short-Term / Long-Term Disability Benefit', '#', '');
//AIA Long Term Care
var aiaLongTermCareMenu = new MenuItem('AIA Long Term Care', '#', '');
//AIA Critical Protector Life
var aiaCriticalProtectorLifeMenu = new MenuItem('AIA Critical Protector Life', '#', '');
//AIA Critical Protector Rider
var aiaCriticalProtectorRiderMenu = new MenuItem('AIA Critical Protector Rider', '#', '');
//AIA Critical Protector Plus
var aiaCriticalProtectorPlusMenu = new MenuItem('AIA Critical Protector Plus', '#', '');
//AIA Group Critical Illness Plan
var aiaGroupCriticalIllnessPlanMenu = new MenuItem('AIA Group Critical Illness Plan', '#', '');
//AIA Cash Rewards Plan 21 / 25
var aiaCashRewardsPlanMenu = new MenuItem('AIA Cash Rewards Plan 21 / 25', '#', '');
//AIA Platinum Legacy
var aiaPlatinumLegacyMenu = new MenuItem('AIA Platinum Legacy', '#', '');
//AIA Guaranteed 8 / 15 For Life (US$)
var aiaGuaranteed815ForLifeUSMenu = new MenuItem('AIA Guaranteed 8 / 15 For Life (US$)', '#', '');
//AIA Guaranteed 10 / 15 For Life (S$)
var aiaGuaranteed1015ForLifeSMenu = new MenuItem('AIA Guaranteed 10 / 15 For Life (S$)', '#', '');
//AIA Whole Life US$ Special
var aiaWholeLifeUSSpecialMenu = new MenuItem('AIA Whole Life US$ Special', '#', '');
//AIA Edusaver (USD)
var aiaEdusaverUSDMenu = new MenuItem('AIA Edusaver (USD)', '#', '');
//AIA Investment Growth Plan Plus
var aiaInvestmentGrowthPlanPlusMenu = new MenuItem('AIA Investment Growth Plan Plus', '#', '');
//AIA Asset Builder
var aiaAssetBuilderMenu = new MenuItem('AIA Asset Builder', '#', '');
//AIA Dollars For Life
var aiaDollarsForLifeMenu = new MenuItem('AIA Dollars For Life', '#', '');
//AIA Flexi-Retirement Plan
var aiaFlexiRetirementPlanMenu = new MenuItem('AIA Flexi-Retirement Plan', '#', '');
//AIA News
var aiaNewsMenu = new MenuItem('AIA News', '#', '');
//For Individual Nav
var forIndividualChildItem = forIndividualsMenu.addSubItems('For Individuals >','AIA_For_Individuals.html','');
forIndividualChildItem.addSubItems('- Protection', 'AIA_Protection.html', '');
forIndividualChildItem.addSubItems('- Savings', 'Savings.html', '');
forIndividualChildItem.addSubItems('- Investment', 'Investment.html', '');
forIndividualChildItem.addSubItems('- Retirement', 'Retirement.html', '');
forIndividualChildItem.addSubItems('- All Products for Individuals', 'All_Products_Individuals.html', '');
forIndividualsMenu.addSubItems('For Corporations','AIA_For_Corporations.html','');
//Protection Nav
var protection1ChildItem = protectionMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >- Protection','AIA_For_Individuals.html\'>For Individuals >- Protection- Savings','AIA_For_Individuals.html\'>For Individuals >- Protection- Savings- Investment<\a>','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings2ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings2ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment2ChildItem = aiaAchieverSeriesMenu.addSubItems('- Investment >', 'Investment.html','');
Investment2ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement2ChildItem = aiaAchieverSeriesMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement2ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaAchieverSeriesMenu.addSubItems('For Corporations','AIA_For_Corporations.html','');
//AIA Asset Growth Nav
var protection3ChildItem = aiaAssetGrowthMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings3ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings3ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment3ChildItem = aiaAssetGrowthMenu.addSubItems('- Investment >', 'Investment.html','');
Investment3ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement3ChildItem = aiaAssetGrowthMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement3ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaAssetGrowthMenu.addSubItems('For Corporations','#','');
//AIA Family Wrapper Nav
var protection4ChildItem = aiaFamilyWrapperMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings5ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings5ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment5ChildItem = aiaGen3Menu.addSubItems('- Investment >', 'Investment.html','');
Investment5ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement5ChildItem = aiaGen3Menu.addSubItems('- Retirement >', 'Retirement.html','');
retirement5ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaGen3Menu.addSubItems('For Corporations','#','');
//AIA Group Term Life/Total Permanent Disability Nav
var protection6ChildItem = groupTermLifeMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings7ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
var Investment7ChildItem = aiaLifePlusMenu.addSubItems('- Investment >', 'Investment.html','');
Investment7ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var Retirement7ChildItem = aiaLifePlusMenu.addSubItems('- Retirement >', 'Retirement.html','');
Retirement7ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaLifePlusMenu.addSubItems('For Corporations','#','');
//AIA Premier Life Nav
var protection8ChildItem = aiaPremierLifeMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings8ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings8ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment8ChildItem = aiaPremierLifeMenu.addSubItems('- Investment >', 'Investment.html','');
Investment8ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var Retirement8ChildItem = aiaPremierLifeMenu.addSubItems('- Retirement >', 'Retirement.html','');
Retirement8ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaPremierLifeMenu.addSubItems('For Corporations','#','');
//AIA Prestige Term Nav
var protection9ChildItem = aiaPrestigeTermMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings10ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings10ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment10ChildItem = aiaSmartGrowthMenu.addSubItems('- Investment >', 'Investment.html','');
Investment10ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement10ChildItem = aiaSmartGrowthMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement10ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaSmartGrowthMenu.addSubItems('For Corporations','#','');
//AIA Club (Credit Life On Unpaid Bills) Nav
var protection11ChildItem = aiaClubMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Savings.html', '');
savings15ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
savings15ChildItem.addSubItems('- Education', 'AIA_Edusaver.html', '');
var Investment15ChildItem = aiaMoneybackProtectorMenu.addSubItems('- Investment >', 'Investment.html','');
Investment15ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement15ChildItem = aiaMoneybackProtectorMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement15ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaMoneybackProtectorMenu.addSubItems('For Corporations','#','');
//AIA Personal Accident Protection Plan for Military Personnel (PAM) Nav
var protection16ChildItem = aiaPersonalAccidentProtectionMenu.addSubItems('- Protection >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Investment.html','');
Investment44ChildItem.addSubItems('- Regular Investment', 'Regular_Savings_and_Investment.html', '');
var retirement44ChildItem = aiaCashRewardsPlanMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement44ChildItem.addSubItems('- Regular Savings', 'Regular_Savings_and_Investment.html', '');
aiaCashRewardsPlanMenu.addSubItems('For Corporations','#','');
//AIA Platinum Legacy Nav
var savings45ChildItem = aiaPlatinumLegacyMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >', 'Investment.html','');
Investment45ChildItem.addSubItems('- US Investment', '#', '');
var retirement45ChildItem = aiaPlatinumLegacyMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement45ChildItem.addSubItems('- US Savings Plan', '#', '');
aiaPlatinumLegacyMenu.addSubItems('For Corporations','#','');
//AIA Guaranteed 8 / 15 For Life (US$) Nav
var savings46ChildItem = aiaGuaranteed815ForLifeUSMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >', 'Investment.html','');
Investment46ChildItem.addSubItems('- US Investment', '#', '');
var retirement46ChildItem = aiaGuaranteed815ForLifeUSMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement46ChildItem.addSubItems('- US Savings Plan', '#', '');
aiaGuaranteed815ForLifeUSMenu.addSubItems('For Corporations','#','');
//AIA Guaranteed 10 / 15 For Life (S$) Nav
var savings47ChildItem = aiaGuaranteed1015ForLifeSMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >', 'Investment.html','');
Investment47ChildItem.addSubItems('- US Investment', '#', '');
var retirement47ChildItem = aiaGuaranteed1015ForLifeSMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement47ChildItem.addSubItems('- US Savings Plan', '#', '');
aiaGuaranteed1015ForLifeSMenu.addSubItems('For Corporations','#','');
//AIA Whole Life US$ Special Nav
var savings48ChildItem = aiaWholeLifeUSSpecialMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >', 'Investment.html','');
Investment48ChildItem.addSubItems('- US Investment', '#', '');
var retirement48ChildItem = aiaWholeLifeUSSpecialMenu.addSubItems('- Retirement >', 'Retirement.html','');
retirement48ChildItem.addSubItems('- US Savings Plan', '#', '');
aiaWholeLifeUSSpecialMenu.addSubItems('For Corporations','#','');
//AIA Edusaver (USD) Nav
var savings49ChildItem = aiaEdusaverUSDMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >','AIA_For_Individuals.html\'>For Individuals >', 'Retirement.html','');
retirement51ChildItem.addSubItems('- CPF Savings', 'CPF_Savings.html', '');
aiaAssetBuilderMenu.addSubItems('For Corporations','#','');
//AIA Dollars For Life Nav
var savings52ChildItem = aiaDollarsForLifeMenu.addSubItems('- Savings >','AIA_For_Individuals.html\'>For Individuals >', 'Retirement.html','');
retirement52ChildItem.addSubItems('- CPF Savings', 'CPF_Savings.html', '');
aiaDollarsForLifeMenu.addSubItems('For Corporations','#','');
//AIA Flexi-Retirement Plan Nav
var retirement53ChildItem = aiaFlexiRetirementPlanMenu.addSubItems('- Retirement >','AIA_For_Individuals.html\'>For Individuals >\n";
out += "Blank Menu\n";
out += '\n';
document.write(out);
return null;
}
var out = "";
var mainPage = searchMainMenu(mainPageName);
if(mainPage == null){
mainPage = searchTopMenu(mainPageName);
}
if(mainPage == null){
mainPage = searchSpecialMenu(mainPageName);
}
if(mainPage != null && mainPage.hasSubItems()){
out = "\n";
out += "
\n";
for(var i = 0; i < mainPage.subItems.length; i++){
var aSubItem = mainPage.subItems[i];
var aClass = "";
if(aSubItem.hasSubItems()){
if(thisPageName != null && includeItem(thisPageName, aSubItem.name)) {
out += "- " + aSubItem.name + "
\n";
}else {
out += "- " + aSubItem.name + "
\n";
}
out += '\n';
for(var j = 0; j < aSubItem.subItems.length; j++) {
var childOfSubItem = aSubItem.subItems[j];
if(childOfSubItem != null && includeItem(thisPageName, childOfSubItem.name)){
aClass = "class='active'";
} else {
aClass = "";
}
out += "- " + childOfSubItem.name + "
\n";
}
out += '
\n';
}else {
if(thisPageName != null && includeItem(thisPageName, aSubItem.name)){
aClass = "class='active'";
}
out += "- " + aSubItem.name + "
\n";
}
}
out +="
\n";
out += "
";
}
document.write(out);
}
function includeItem(thisPage, asubItem) {
if(thisPage != "" && thisPage.indexOf(asubItem) >= 0) {
return true;
}else {
return false;
}
}
function setSearch() {
if(document.forms[0].elements['searchText'].value=="" || document.forms[0].elements['searchText'].value=="Search") {
alert("Please Enter Search Text");
}else {
checkform();
}
}
function clearText() {
(document.getElementById("searchText")).value = "";
}
function hasLetter(str) {
var letterexp = /[a-z09]/i;
return letterexp.test(str);
}
/*function trapEnter() {
if(event.keyCode == 13) {
if(document.forms[0].elements['searchText'].value == "") {
alert("Please Enter Search Text");
return(false);
} else {
document.getElementById('searchBtn').click();
return false;
}
}
}*/
function trapEnter($char, $mozChar) {
if($mozChar != null) { // Look for a Mozilla-compatible browser
if($mozChar == 13) {
if(document.forms[0].elements['searchText'].value == "") {
alert("Please Enter Search Text");
return(false);
} else {
document.getElementById('searchBtn').click();
return false;
}
}
}
else { // Must be an IE-compatible Browser
if($char == 13) {
if(document.forms[0].elements['searchText'].value == "") {
alert("Please Enter Search Text");
return(false);
} else {
document.getElementById('searchBtn').click();
return false;
}
}
}
}
function checkform() {
if(!hasLetter(document.forms[0].elements['searchText'].value)) {
alert("Invalid search string");
document.forms[0].elements['searchText'].focus();
return false;
}else {
test=remove_noise(document.forms[0].elements['searchText'].value);
if(test=="1") {
alert("invalid string");
document.forms[0].elements['searchText'].focus();
return false;
}else {
strsearch = document.forms[0].elements['searchText'].value;
document.forms[0].action="eSearch.aspx?sc=" + encode64(strsearch);
document.forms[0].method="post";
document.forms[0].submit();
return true;
}
}
}
function remove_noise(phrase) { //dimensionalizing variables
noisearray = new Array();
array_phrase = new Array();
array_pruned = new Array();
noisearray = ['0','1','2','3','4','5','6','7','8','9','$','a','about','after','all','also','an','and','another','any','are','as','at','b','be','because','been','before','being','between','both','but','by','c','came','can','come','could','d','did','do','does','e','each','else','f','for','from','g','get','got','h','had','has','have','he','her','here','him','himself','his','how','i','if','in','into','is','it','its','j','just','k','l','like','m','make','many','me','might','more','most','much','must','my','n','never','now','o','of','on','only','or','other','our','out','over','p','q','r','re','s','said','same','see','should','since','so','some','still','such','t','take','Test','than','that','the','their','them','then','there','these','they','this','those','through','to','too','u','under','up','use','v','very','w','want','was','way','we','well','were','what','when','where','which','while','who','will','with','would','x','y','you','your','z'];
var array_pruned_length = 0;
var counter = 0;
var counter1 = 0;
var counter2 = 0;
var phrase1;
var length = 0;
var noise_array_counter = 0;
var search_phrase = "";
phrase1 = phrase;
//spliting the search phrase into an array
array_pruned = phrase.split(" ");
array_pruned_length = array_pruned.length;
for(counter=0;counter > 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) +
keyStr.charAt(enc3) + keyStr.charAt(enc4);
} while (i < input.length);
return output;
}
function generateTopLinks(thisPageName){
var topLinks = "";
topLinks += "