function generateLeftNav(langCode)
{
	var currURL = document.location.href;

	var subnav_main_creditcard = "";
	var subnav_main_loan       = "";
	var subnav_main_insurance  = "";
	var subnav_main_giftcard   = "";
	var subnav_main_oss        = "";
	var subnav_main_network    = "";
	var subnav_main_company    = "";
	var subnav_main_investor   = "";
	var this_section_code      = "";

	// Generate subnav
	if (currURL.indexOf('/main_creditcard/') != -1)
	{
		this_section_href = getWCMRoot() + "/" + getCurrLang() + '/main_creditcard/';
		subnav_main_creditcard += showSubNav('creditcard_list'									,this_section_href + 'creditcard_list/');
		subnav_main_creditcard += showSubNav('cash_advance'											,this_section_href + 'cash_advance/');
		subnav_main_creditcard += showSubNav('octopus_vas'											,this_section_href + 'octopus_vas/');
		subnav_main_creditcard += showSubNav('bonus_pt'													,this_section_href + 'bonus_pt/');
		subnav_main_creditcard += showSubNav('shopping_guide'										,this_section_href + 'shopping_guide/');
		subnav_main_creditcard += showSubNav('discount_merchant_month'					,this_section_href + 'discount_merchant_month/');
		subnav_main_creditcard += showSubNav('discount_merchant_year'						,this_section_href + 'discount_merchant_year/');
		subnav_main_creditcard += showSubNav('card_instalment_merchant'					,this_section_href + 'card_instalment_merchant/');
		subnav_main_creditcard += showSubNav('estatement'												,this_section_href + 'estatement/');
		subnav_main_creditcard += showSubNav('fee_schedule'											,this_section_href + 'fee_schedule/');
		subnav_main_creditcard += showSubNav('card_payment_method'							,this_section_href + 'card_payment_method/');
		subnav_main_creditcard += showSubNav('cs_hotline_guide'									,this_section_href + 'cs_hotline_guide/');
		subnav_main_creditcard += showSubNav('cardholder_agreement'							,this_section_href + 'cardholder_agreement/');
		subnav_main_creditcard += showSubNav('cardholder_agreement_majorterms'	,this_section_href + 'cardholder_agreement_majorterms/');
		subnav_main_creditcard += showSubNav('card_instalment_terms'						,this_section_href + 'card_instalment_terms/');
		subnav_main_creditcard += showSubNav('card_privacy_statement'						,this_section_href + 'card_privacy_statement/');
	}
	else if (currURL.indexOf('/main_loan/') != -1)
	{
		this_section_href = getWCMRoot() + "/" + getCurrLang() + '/main_loan/';
		/*
		// 2008-08 version
		subnav_main_loan += showSubNav('aeon_30'																, this_section_href + 'aeon_30/');
		subnav_main_loan += showSubNav('study_loan'															, this_section_href + 'study_loan/');
		subnav_main_loan += showSubNav('car_loan'																, this_section_href + 'car_loan/');
		subnav_main_loan += showSubNav('motorbike_loan'													, this_section_href + 'motorbike_loan/');
		subnav_main_loan += showSubNav('removal_loan'														, this_section_href + 'removal_loan/');
		subnav_main_loan += showSubNav('_loan_payment_method'										, this_section_href + '_loan_payment_method/');
		subnav_main_loan += showSubNav('_loan_agreement'												, this_section_href + '_loan_agreement/');
		subnav_main_loan += showSubNav('_money_lenders_ordinance'								, this_section_href + '_money_lenders_ordinance/');
		subnav_main_loan += showSubNav('_loan_privacy_policy'										, this_section_href + '_loan_privacy_policy/');
		*/
		
		// 2009-08 version
		subnav_main_loan += showSubNav('pl_rebate'									,this_section_href + 'pl_rebate/');
		subnav_main_loan += showSubNav('study_loan'								,this_section_href + 'study_loan/');
		subnav_main_loan += showSubNav('car_loan'									,this_section_href + 'car_loan/');
		subnav_main_loan += showSubNav('removal_loan'							,this_section_href + 'removal_loan/');
		subnav_main_loan += showSubNav('_loan_payment_method'			,this_section_href + '_loan_payment_method/');
		subnav_main_loan += showSubNav('_loan_agreement'					,this_section_href + '_loan_agreement/');
		subnav_main_loan += showSubNav('_money_lenders_ordinance'	,this_section_href + '_money_lenders_ordinance/');
		subnav_main_loan += showSubNav('_loan_privacy_policy'			,this_section_href + '_loan_privacy_policy/');
	}
	else if (currURL.indexOf('/main_insurance/') != -1)
	{
		this_section_href = getWCMRoot() + "/" + getCurrLang() + '/main_insurance/';

		// 2009-08 version
		/*
		subnav_main_insurance += showSubNav('accident_insurance'				,this_section_href + 'accident_insurance/');
		subnav_main_insurance += showSubNav('hospital_cash_plan'				,this_section_href + 'hospital_cash_plan/');
		subnav_main_insurance += showSubNav('priority_protection'				,this_section_href + 'priority_protection/');
		subnav_main_insurance += showSubNav('travelcare'								,this_section_href + 'travelcare/');
		subnav_main_insurance += showSubNav('domestic_insurance'				,this_section_href + 'domestic_insurance/');
		subnav_main_insurance += showSubNav('golf_insurance'						,this_section_href + 'golf_insurance/');
		//subnav_main_insurance += showSubNav('home_helper_plus'					,this_section_href + 'home_helper_plus/'); // removed at 2009-12-29
		subnav_main_insurance += showSubNav('home_insurance'						,this_section_href + 'home_insurance/');
		subnav_main_insurance += showSubNav('car_insurance'							,this_section_href + 'car_insurance/');
		subnav_main_insurance += showSubNav('worldwide_loss'						,this_section_href + 'worldwide_loss/');
		*/
	}
	else if (currURL.indexOf('/main_network/') != -1)
	{
		this_section_href = getWCMRoot() + "/" + getCurrLang() + '/main_network/';
		subnav_main_network += showSubNav('branch_network'										, this_section_href + 'branch_network/');
		subnav_main_network += showSubNav('atm_network'												, this_section_href + 'atm_network/');
		subnav_main_network += showSubNav('atm_feature'												, this_section_href + 'atm_feature/');
	}
	else if (currURL.indexOf('/main_investor/') != -1)
	{
		this_section_href = getWCMRoot() + "/" + getCurrLang() + '/main_investor/';
		subnav_main_investor += showSubNav('investor_annual_rpt'							, this_section_href + 'investor_annual_rpt/');
		subnav_main_investor += showSubNav('investor_announcement'						, this_section_href + 'investor_announcement/');
		subnav_main_investor += showSubNav('investor_announcement_rpt'				, this_section_href + 'investor_announcement_rpt/');
		subnav_main_investor += showSubNav('investor_circular'								, this_section_href + 'investor_circular/');
		subnav_main_investor += showSubNav('investor_notices_general'					, this_section_href + 'investor_notices_general/');
	}

	if (currURL.indexOf(getWCMRoot() + '/' + getCurrLang() + '/main_') != -1 || currURL.indexOf(getWCMRoot() + '/' + getCurrLang() + '/other') != -1)
	{
		document.write("<TR><TD>" + leftNavDisplay('main_home'      ,getWCMRoot() + '/' + getCurrLang() + '/'                ,langCode.toLowerCase(),false) + "</TD></TR>"                         );
	}
	document.write("<TR><TD>" + leftNavDisplay('main_creditcard',getWCMRoot() + '/' + getCurrLang() + '/main_creditcard/',langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_creditcard);
	document.write("<TR><TD>" + leftNavDisplay('main_loan'      ,getWCMRoot() + '/' + getCurrLang() + '/main_loan/'      ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_loan      );
	document.write("<TR><TD>" + leftNavDisplay('main_insurance' ,'javascript:popInsuranceSite()'                         ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_insurance );
	document.write("<TR><TD>" + leftNavDisplay('main_giftcard'  ,getWCMRoot() + '/' + getCurrLang() + '/main_giftcard/'  ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_giftcard  );
	document.write("<TR><TD>" + leftNavDisplay('main_oss'       ,'javascript:popAeonOssHome()'                           ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_oss       );
	document.write("<TR><TD>" + leftNavDisplay('main_network'   ,getWCMRoot() + '/' + getCurrLang() + '/main_network/'   ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_network   );
	document.write("<TR><TD>" + leftNavDisplay('main_company'   ,getWCMRoot() + '/' + getCurrLang() + '/main_company/'   ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_company   );
	document.write("<TR><TD>" + leftNavDisplay('main_investor'  ,getWCMRoot() + '/' + getCurrLang() + '/main_investor/'  ,langCode.toLowerCase(),false) + "</TD></TR>" + subnav_main_investor  );
}
// ----------------------------------------------------------------------












function leftNavDisplay(objName,strURL,strLangCode,boolSelected)
{
	var currURL = document.location.href;
	var strHTML    = "";

	if (objName.indexOf("main_") != -1)
	{
		var strBtnLocation     = getWCMRoot() + "/_images/leftnav_btn_" + strLangCode + "/";
		var strOverBtnLocation = getWCMRoot() + "/_images/leftnav_btn_" + strLangCode + ".over/";

		var strImgID   = "img_leftnav_"+objName;
		var strImgFile = "leftnav_" + objName + ".gif";


		// Handle exceptional section
		if (objName.indexOf("main_giftcard") != -1)
		{
			strURL = "javascript:popAeonGiftCardHome();";
		}

		strHTML += "<A HREF=\""+ strURL +"\">";
		strHTML += "<IMG ";
		strHTML += "ID=\"" + strImgID + "\" ";

		// Add-on Feature : Auto Detect if the page is selected
		if (currURL.indexOf(strURL) != -1 && objName != "main_home")
		{
			boolSelected = true;
		}

		// If the button is referencing the same section
		// don't apply hyperlink and use "OVER" button


		if (boolSelected == true)
		{
			strHTML += "SRC=\"" + strOverBtnLocation + strImgFile + "\" ";
		}
		else
		{
			strHTML += "SRC=\"" + strBtnLocation + strImgFile + "\" ";
			strHTML += "onMouseOver=\"MM_swapImage('" + strImgID + "','','" + strOverBtnLocation + strImgFile +"',1)\" ";
			strHTML += "onMouseOut=\"MM_swapImgRestore()\" ";
		}

		strHTML += "VSPACE=\"2\" BORDER=\"0\"";
		strHTML += ">";
		strHTML += "</A>";

	}
	return strHTML;
}


function leftNavGo(objName,strURL)
{

}