<!--
function LocalPredefinedFunction(functionString)
{
	var params = functionString.split(";");

	switch(params[0])
	{
		/***************************************************************************************************************
		* Function		: LPF_useHealthnetFunction(name)
		* Description		: Call javascript functions in healthnet calculator section
		* Parameter Usage	: name		: name of the function
		* Location		: /hk/personal/insur/healthnet/calculator/js/calculator.js
		* Author		: Andy Yeung (XMHK)
		* Creation Date		: 23 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"LPF_useHealthnetFunction":
			if(params.length!=2)
			{
				alert("Invalid parameters for Popup_newBrowser - LocalPredefinedFunction('LPF_useHealthnetFunction;functionName')");
			}
			else
			{
				LPF_useHealthnetFunction(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: Popup_newBrowser(url, status, location, scroll, mbar, toolbar, resize, width, height, winname)
		* Description		: Open a new browser (popup)
		* Parameter Usage	: url		:target URL
		* 			  status	:the status of the target browser (yes/no)
		* 			  location	:has address bar or not (yes/no)
		* 			  scroll	:has scroll bar or not (yes/no)
		* 			  mbar		:has menu bar or not (yes/no)
		* 			  toolbar	:has toolbar or not (yes/no)
		* 			  resize	:resizable or not (yes/no)
		* 			  height	:height of the target browser
		*			  width		:width of the target browser
		*			  winname 	:window name (default is set to "nb")
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Rachel, Tse Wing Yi
		* Creation Date		: 16 Dec 2003
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		* 01MAR2004 	Arnold		Add an optional parameter, window name, at the end of the parameter list
		*
		***************************************************************************************************************/
		case"Popup_newBrowser":
			if(params.length!=10 && params.length!=11)
			{
				alert("Invalid parameters for Popup_newBrowser - LocalPredefinedFunction('Popup_newBrowser;url;status;location;sbar;mbar;tbar;resize;height;width;winname')");
			}
			else
			{
				Popup_newBrowser(params[1], params[2], params[3], params[4], params[5], params[6], params[7], params[8], params[9], params[10]);
			}
			break;

		/***************************************************************************************************************
		* Function		: DoubleClickAdTag(placement, alttext, width, height, secure)
		* Description		: Display DoubleClick Ad Tag
		* Parameter Usage	: placement	: an id to locate the ad slot
		* 			: wide		: width of the ad slot
		* 			: height	: height of the ad slot
		*			: alttext	: text appear when the image is being loaded or mouseover
		*			: secure	: A 'y' or 'n' to indicate whether it is a secure site
		* Author		: DoubleClick
		* Creation Date		: 2004-02-13
		* Side effect		: No
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"DoubleClickAdTag":
			if(params.length!=6)
			{
				alert("Invalid parameters for DoubleClickAdTag - LocalPredefinedFunction('DoubleClickAdTag;placement;alttext;width;height;secure')");
			}
			else
			{
				DoubleClickAdTag(params[1], params[2], params[3], params[4], params[5]);
			}
			break;

		/***************************************************************************************************************
		* Function		: DoubleClickSpotlightTag(src, type, cat, secure)
		* Description		: Display DoubleClick Spotlight Tag
		* Parameter Usage	: src	: advertiser ID in DFA
		* 			: type	: spotlight group ID in DFA
		* 			: cat	: spotlight activity ID in DFA
		*			: secure	: A 'y' or 'n' to indicate whether it is a secure site
		* Author		: DoubleClick
		* Creation Date		: 2004-02-13
		* Side effect		: No
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"DoubleClickSpotlightTag":
			if(params.length!=5)
			{
				alert("Invalid parameters for DoubleClickSpotlightTag - LocalPredefinedFunction('DoubleClickAdTag;src;type;cat;secure')");
			}
			else
			{
				DoubleClickSpotlightTag(params[1], params[2], params[3], params[4]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_MouseOut()
		* Description		: Restore original image when mouse out
		* Parameter Usage	: N/A
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 16 Jan 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************
		* Remarks - LPF_MouseOut() is exactly the same as function MM_swapImgRestore() in /hk/personal/card/common/js/cs01g.js
		***************************************************************************************************************/
		case "LPF_MouseOut":
			LPF_MouseOut();
			break;

		/***************************************************************************************************************
		* Function		: LPF_Print()
		* Description		: Print the current window
		* Parameter Usage	: N/A
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 16 Jan 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_Print":
			LPF_Print();
			break;

		/***************************************************************************************************************
		* Function		: LPF_Redirect(url)
		* Description		: Redirect the current page to a new URL
		* Parameter Usage	: url	:target URL
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 16 Jan 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_Redirect":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_Redirect - LocalPredefinedFunction('LPF_Redirect;???')");
			}
			else
			{
				LPF_Redirect(params[1]);
      			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_Digital_Order(lang, cookievalue)
		* Description		: To logon PIB with digital order
		* Parameter Usage	: lang		:zh or en or cn
		* 			  cookievalue	:cookievalue
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Rachel, Tse Wing Yi (HSBC eCD)
		* Creation Date		: 28 Jan 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case"LPF_Digital_Order":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_Digital_Order - LocalPredefinedFunction('LPF_Digital_Order;lang;cokkievalue')");
			}
			else
			{
				LPF_Digital_Order(params[1], params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_setCookie
		* Description		: To logon PIB with digital order
		* Parameter Usage	: Name:		name
		* 			  value:	cookievalue
		*			  path:		/
		*			  domain:	.hsbc.com.hk
		*			  secure:	true/false
		*			  expires:	expires
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Henry, Tam Lup Kei (HSBC eCD)
		* Creation Date		: 6 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* --------------------------------------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"LPF_setCookie":
			if(params.length!=7)
			{
				alert("Invalid parameters for setCookie - LocalPredefinedFunction('LPF_setCookie;name;value;path;domain;secure;expire')");
			}
			else
			{
				LPF_setCookie(params[1], params[2], params[3],params[4],params[5],params[6]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_digital_order_form
		* Description		: output digital order form to htm
		* Parameter Usage	: no parameter
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Henry, Tam Lup Kei
		* Creation Date		: 6 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	-------------------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"LPF_digital_order_form":
			LPF_digital_order_form();
			break;

		/***************************************************************************************************************
		* Function		: LPF_preloadImages(imgarraystr)
		* Description		: Preload the images in imgarray
		* Parameter Usage	: imgarray - array of image files
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Kenneth Cheung (Grey Interactive)
		* Creation Date		: 12 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_preloadImages":
			if(params.length!=2)
			{
				alert("Invalid parameters for preloadImages - LocalPredefinedFunction('LPF_preloadImages;???')");
			}
			else
			{
				LPF_preloadImages(params[1]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_DisplayLayer(layerarraystr)
		* Description		: Show or Hide a layer by setting the display property
		* Parameter Usage	: layerarraystr is in format of "layer1,property1,layer2,property2 ..."
		*                   where layer1, layer2 ... = id of the layer
		*                         property1, property2 ... = show or hide
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 12 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_DisplayLayer":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_DisplayLayer - LocalPredefinedFunction('LPF_DisplayLayer;???')");
			}
			else
			{
				LPF_DisplayLayer(params[1]);
			}
			break;

		/***************************************************************************************************************
      * Function		: LPF_SwapImage(imgArrayStr)
      * Description		: Show or Hide a layer by setting the display property
      * Description		: Change the src property of specified images
      * Parameter Usage	: imgArrayStr - in the format of "imgName1,imgPath1,imgName2,imgPath2..."
		*                   where imgName1, imgName2 ... = name of image to be changed
		*                         imgFullpath1, imgFullpath2 ... = path of the image
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 13 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_SwapImage":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_SwapImage - LocalPredefinedFunction('LPF_SwapImage;???')");
			}
			else
			{
				LPF_SwapImage(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_ClearTimeout()
		* Description			: Clear a previously set timeout
		* Parameter Usage		: N/A
		* Location				: /hk/personal/common/js/pfscommon.js
		* Author					: Arnold (Grey Interactive)
		* Creation Date		: 16 Feb 2004
		* Side effect			: N/A
		* Amendment History	:
		* Date      By             Description
		* ---------	------------   --------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_ClearTimeout":
			LPF_ClearTimeout();
			break;

		/***************************************************************************************************************
		* Function		: LPF_SetTimeout(fn, t)
		* Description		: Run a function after default time
		* Parameter Usage		: fn - the function you want to run in window.setTimeout. "|" is used instead of ";" when running
		*							       two or more functions as ";" is used as a seperator in LocalPredefinedFunction.
		*							  t - the time to wait before run the function in milliseconds
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 16 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date      By             Description
		* ---------	------------   --------------------------------------------------------------------------------
		* 24Feb2004 Arnold			Direct call the function instead of using LocalPredefinedFunction according to IT comment
		***************************************************************************************************************/
		case "LPF_SetTimeout":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_SetTimeout - LocalPredefinedFunction('LPF_SetTimeout;???;???')");
			}
			else
			{
				LPF_SetTimeout(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_writeFlash(swfsrc,swfwidth,swfheight,swfclassid,swfcodebase,swfpluginspage,imgurl,imgwidth,imgheight,imghref,imgtarget,imgalt,imgborder,otherparam)
		* Description		: Generate codes for displaying Flash if appropriate plugin is installed.
		*			  Otherwise it will display a graphic file with an option of hyperlink.
		* Parameter Usage	: swfsrc - Specifies the location (URL) of the movie to be loaded.
		*						  swfwidth - Specifies the width of the movie in either pixels or percentage of browser window.
		*						  swfheight - Specifies the height of the movie in either pixels or percentage of browser window.
		*						  swfclassid - Identifies the ActiveX control for the browser. OBJECT only.
		*						  swfcodebase - Identifies the location of the Flash Player ActiveX control so that the browser
		*						                can automatically download it if it is not already installed. OBJECT only.
		*						  swfpluginspage - Identifies the location of the Flash Player plug-in so that the user can
		*						                   download it if it is not already installed. EMBED only.
		*						  imgurl - url of the image file to be called
		*						  imgwidth - width of the image file (blank if same width as Flash)
		*						  imgheight - height of the image file (blank if same height as Flash)
		*						  imghref - hyperlink of the image file (no link if blank)
		*						  imgtarget - target window of the hyperlink (ignore if hyperlink is blank)
		*						  imgalt - alt text of image (default blank)
		*						  imgborder - border of image  (default 0)
		*						  otherparam - Other optional attributes and possible values. The format of the string is a
		*						               set of name,value combinations separated by '|'.
		*						               Please read http://www.macromedia.com/support/flash/ts/documents/tag_attributes.htm
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 24 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		* 23Feb2004 Arnold			add parameters: imgalt, imgborder, swfquality, swfmenu
		***************************************************************************************************************/
		case "LPF_writeFlash":
			if(params.length!=15)
			{
				alert("Invalid parameters for LPF_writeFlash - LocalPredefinedFunction('LPF_writeFlash;???;???;???;???;???;???;???;???;???;???;???;???;???;???')");
			}
			else
			{
				LPF_writeFlash(params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_ShowHideLayer(layerarraystr)
		* Description		: Show or Hide a layer by setting the visibility property.
		* Parameter Usage	: layerarraystr is in format of "layer1,property1,layer2,property2 ..."
		*                   where layer1, layer2 ... = id of the layer
		*                         property1, property2 ... = show or hide
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Arnold (Grey Interactive)
		* Creation Date	: 17 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_ShowHideLayer":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_ShowHideLayer - LocalPredefinedFunction('LPF_ShowHideLayer;???')");
			}
			else
			{
				LPF_ShowHideLayer(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_Fade(obj, speed, direction, endOpacity)
		* Description		: Fade in/out effect of an object
		*			  The starting opacity should be set by document.opacityValue = ???; before calling this function
		* Parameter Usage	: obj - id of the object
		*			  speed - the speed for fade in/out. The value must be between 1 and 100
		*			  direction - in or out
		*			  endOpacity - the value of opacity when the fading effect ends. This must be between 0 and 100
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 18 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_Fade":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_Fade - LocalPredefinedFunction('LPF_Fade;???;???;???;???')");
			}
			else
			{
				LPF_Fade(params[1],params[2],params[3],params[4]);
			}
			break;

		/***************************************************************************************************************
		* Function		   : LPF_SetOpacity(obj, n)
		* Description		: Change the opacity of an object
		* Parameter Usage	: obj - id of the object
		*                   n - opacity : from 0 to 100; 0 is invisible; 100 is normal display (no transparency)
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 17 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_SetOpacity":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_SetOpacity - LocalPredefinedFunction('LPF_SetOpacity;???;???')");
			}
			else
			{
				LPF_SetOpacity(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_OnChange_Pulldown(formname, elt)
		* Description			: This is to handle the onChange event of pulldown menu
		* Parameter Usage		: formname - name of Form which contains the pulldown menu (the <select> tag) element
		*							  elt - name of the pulldown menu element
		*							  The value of that element must be in format of "param||typeOfBrowser", "||" is as the seperator.
		*							  typeOfBrowser : popup - popup new browser
		*							                        - The param has the same format as Popup_newBrowser's parameters
		*							                             i.e. url;status;location;scroll;mbar;toolbar;resize;width;height
		*							                  redirect - redirect to other url in current browser
		*							                           - The param is the url of the page redirect to
		*							                  displaylayer - call the LPF_DisplayLayer function
		*							                               - The param is the parameters string that will pass to LPF_DisplayLayer function
		* Location				: /hk/personal/common/js/pfscommon.js
		* Author					: Arnold (Grey Interactive)
		* Creation Date		: 20 Feb 2004
		* Side effect			: N/A
		* Projects			: Mortgage
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		* 24Feb2004 Arnold      	Remove "anchor" from typeOfBrowser values - IT comment
		* 16Nov2004 Arnold      	Add "displaylayer" to typeOfBrowser values
		***************************************************************************************************************/

		case "LPF_OnChange_Pulldown":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OnChange_Pulldown - LocalPredefinedFunction('LPF_OnChange_Pulldown;???;???')");
			}
			else
			{
				LPF_OnChange_Pulldown(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_affordCheck()
		* Description			: This is to call mortgage afford checking
		* Parameter Usage		: Null
		*							 
		* Location			: /hk/personal/mortgage/common/js/mortgage.js
		* Author			: Arnold (Grey Interactive)
		* Creation Date			: 8 Dec 2004
		* Side effect			: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_affordCheck":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_affordCheck - LocalPredefinedFunction('LPF_affordCheck;')");
			}
			else
			{
				LPF_affordCheck();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_homePaymentCheck()
		* Description			: This is to call mortgage homePayment checking
		* Parameter Usage		: Null
		*							                
		* Location			: /hk/personal/mortgage/common/js/mortgage.js
		* Author			: Arnold (Grey Interactive)
		* Creation Date			: 8 Dec 2004
		* Side effect			: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_homePaymentCheck":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_homePaymentCheck - LocalPredefinedFunction('LPF_homePaymentCheck;')");
			}
			else
			{
				LPF_homePaymentCheck();
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_SetOpacityValue(v)
		* Description			: Set document.opacityValue's value
		* Parameter Usage		: v - value you want to set document.opacityValue to
		* Location				: /hk/personal/common/js/pfscommon.js
		* Author					: Arnold (Grey Interactive)
		* Creation Date		: 24 Feb 2004
		* Side effect			: N/A
		* Amendment History	:
		* Date      By             Description
		* ---------	------------   --------------------------------------------------------------------------------
		*
		***************************************************************************************************************
		* Remarks: document.opacityValue is used for LPF_Fade function
		***************************************************************************************************************/
		case "LPF_SetOpacityValue":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_SetOpacityValue - LocalPredefinedFunction('LPF_SetOpacityValue;???')");
			}
			else
			{
				LPF_SetOpacityValue(params[1]);
			}
			break;



		/***************************************************************************************************************
		* Function		: LPF_MouseOver(imgName, imgOther, imgPath, imgControl)
		* Description		: Display another image when mouse over
		*						  When user only wants to change one image when mouseover (most mouse over effect is this case), set imgControl to 1
		*						  When uesr needs to change two images to the same image when mouseover, set imgControl to 2
		*						  If user wants to change the image only when it's currently displaying a specific image, use imgControl = "e"
		*						  If user wants to change the image only when it's currently not displaying a specific image, use imgControl = "ne"
		*						    (eg see www.hsbc.com.hk/hk/personal/bank/waystobank.htm. There are 3 states for the buttons,
		*						     on, off and over. Normally it will show the off state. When user moves mouse over it, it will
		*						     change to over state. It will return to off when mouse out. When the user clicks the button,
		*						     it will change to on state. When the button is at on state, there will be no image change whether
		*						     the user mouseover or mouseout the button)
		* Parameter Usage	: imgName		: The name of image
		*                   imgPath		: Path of the image for display when mouse over
		*                   imgOther		: This usage depends on the value of imgControl
		*                   imgControl	: If this is 1, then only change the src of the image with name = imgName to imgPath
		*													imgOther will have no use in this case.
		*											  If this is 2, imgOther should another image name.
		*													Both the imgName and imgOther will change to imgPath
		*											  If this is "e", imgOther should be an image src.
		*													If imgName's src = imgOther, then change imgName's src to imgPath. Otherwise no change.
		*											  If this is "ne", imgOther should be an image src.
		*													If imgName's src != imgOther, then change imgName's src to imgPath. Otherwise no change.
		*											  Other values will be treated as case 1
		* Supported browsers : IE 6, Netscape 7
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 6 Feb 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date      By             Description
		* ---------	------------   --------------------------------------------------------------------------------
		* 04MAR2004 Arnold			Declare parameters
		* 12MAR2004 Arnold			Merge this with LPF_SwapImage_Condition()
		* 18MAR2004 Arnold			Add description, amended according to IT comment
		****************************************************************************************************************
		*
		***************************************************************************************************************/

		case "LPF_MouseOver":
			if(params.length!=5)
			{
				alert("Invalid parameters for MouseOver - LocalPredefinedFunction('LPF_MouseOver;???;???;???;???')");
			}
			else
			{
				LPF_MouseOver(params[1], params[2], params[3], params[4]);
			}
			break;




		/***************************************************************************************************************
		* Function		: LPF_addCss(pciefile, maciefile, pcnsfile, macnsfile)
		* Description		: Add css file to html
		* Parameter Usage	: pciefile - style sheet for PC's IE
		*			  pcnsfile - style sheet for PC's Netscape 7 (if not specified, it will use pciefile)
		*			  maciefile - style sheet for MAC's IE
		*			  macnsfile - style sheet for MAC's Netscape 7 (if not specified, it will use maciefile)
		* Supported browsers	: IE6, Netscape 7 for PC; IE, Netscape 6 for mac
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 22 Mar 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		         Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************
		* Remarks: require hsbc.js
		***************************************************************************************************************/
		case "LPF_addCss":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_addCss - LocalPredefinedFunction('LPF_AddCSS;???;???;???;???')");
			}
			else
			{
				LPF_addCss(params[1],params[2],params[3],params[4]);
			}
			break;




		/***************************************************************************************************************
		* Function		: LPF_Popup_submitToNewBrowser(formname, winname, status, location, scroll, mbar, toolbar, resize, width, height)
		* Description		: Submit a form and set its target to a new browser (popup)
		* Pre-requisites	: 1) The "target" attribute in the <form> being submitted should be the same as the window name (winname)
		*			  2) Should not assign any window name to the HTM in the popup window
		* Parameter Usage	: formname	:form name
		*			  winname 	:window name
		*			  status	:the status of the target browser (yes/no)
		* 			  location	:has address bar or not (yes/no)
		* 			  scroll	:has scroll bar or not (yes/no)
		* 			  mbar		:has menu bar or not (yes/no)
		* 			  toolbar	:has toolbar or not (yes/no)
		* 			  resize	:resizable or not (yes/no)
		*			  width		:width of the target browser
		* 			  height	:height of the target browser
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Garfield (Rapp Collins Worldwide (HK) Ltd.)
		* Creation Date		: 13 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_Popup_submitToNewBrowser":
			if(params.length!=11)
			{
				alert("Invalid parameters for LPF_Popup_submitToNewBrowser - LocalPredefinedFunction('LPF_Popup_submitToNewBrowser;formname;winname;status;location;sbar;mbar;tbar;resize;width;height')");
			}
			else
			{
				LPF_Popup_submitToNewBrowser(params[1], params[2], params[3], params[4], params[5], params[6], params[7], params[8], params[9], params[10]);
			}
			break;



		/* ------- The functions below are for Home and Away only -------- */

		/***************************************************************************************************************
		* Function		: HA_genCountryPulldown()
		* Description		: Generate "Select country" pulldown
		* Parameter Usage	: N/A
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browser	: IE6, NS4, NS7
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 20 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_genCountryPulldown":
			HA_genCountryPulldown();
			break;


		/***************************************************************************************************************
		* Function		: HA_genMainCountryPulldown()
		* Description		: Generate "Select country" pulldown for main page
		* Parameter Usage	: N/A
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browser	: IE6, NS4, NS7
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 7 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_genMainCountryPulldown":
			HA_genMainCountryPulldown();
			break;
		
		/***************************************************************************************************************
		* Function		: HA_genLink( url, classname, display, popparam)
		* Description		: Generate the whole <a href="..." class="...">...</a>
		* Parameter Usage	: url - the base url
		*			  classname - value of class
		*			  display - html code for display of the link
		*			  popparam - the parameters when the link is a popup, this is optional.
		*				     This parameter uses | as seperator.
		*				     If this is not specified, the link will refresh current browser
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date	: 20 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_genLink":
			if(params.length!=5)
			{
				alert("Invalid parameters for HA_genLink - LocalPredefinedFunction('HA_genLink;???;???;???;???')");
			}
			else
			{
				HA_genLink(params[1],params[2],params[3],params[4]);
			}
			break;

		/***************************************************************************************************************
		* Function		: HA_AddParam2URL( url, fromcountry, country, lang, cardtype, category )
		* Description		: Add parameters to URL. The URL will become url?fromcountry=<fromcountry>&country=<country>&lang=<lang>
		* Parameter Usage	: url - the base url
		*			  fromcountry - value of fromcountry
		*			  country - value of country
		*			  lang - value of lang
		*			  cardtype - value of cardtype
		*			  category - value of category
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 20 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_AddParam2URL":
			if(params.length!=7)
			{
				alert("Invalid parameters for HA_AddParam2URL - LocalPredefinedFunction('HA_AddParam2URL;???;???;???;???;???;???')");
			}
			else
			{
				return HA_AddParam2URL(params[1],params[2],params[3],params[4],params[5],params[6]);
			}
			break;

		
		/***************************************************************************************************************
		* Function		: HA_marquee_vertical( content, marquee_width, marquee_height, marquee_speed, pause_it )
		* Description		: Generate a vertical marquee with specified width and height
		* Parameter Usage	: content - The content of the marquee
		* 			  marquee_width  - The width of the marquee
		* 			  marquee_height - The height of the marquee
		* 			  marquee_speed - The speed of the marquee
		* 			  pause_it - Stop the marquee or not when mouse over
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Edmond (Grey Interactive)
		* Creation Date		: 21 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_marquee_vertical":
			if(params.length!=5)
			{
				alert("Invalid parameters for HA_marquee_vertical - LocalPredefinedFunction('HA_marquee_vertical;???;???;???;???;???;???')");
			}
			else
			{
				HA_marquee_vertical(params[1],params[2],params[3],params[4]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: HA_populate()
		* Description		: Populate the marquee
		* Parameter Usage	: N/A
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Edmond (Grey Interactive)
		* Creation Date		: 21 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_populate":
			return HA_populate();
			break;
		
		/***************************************************************************************************************
		* Function		: HA_scrollmarquee()
		* Description		: Scroll the marquee
		* Parameter Usage	: actualheight - Height of the marquee area
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Edmond (Grey Interactive)
		* Creation Date		: 21 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_scrollmarquee":
			if(params.length!=2)
			{
				alert("Invalid parameters for HA_scrollmarquee - LocalPredefinedFunction('HA_scrollmarquee;???')");
			}
			else
			{
				HA_scrollmarquee(params[1]);
			}
			break;

		
		/***************************************************************************************************************
		* Function		: HA_genOfferLayer(layername, cardtype, tl1, sp1, wd1, hb1, je1, tl2, sp2, wd2, hb2, je2, persistshow)
		* Description		: Generate a offer layer specific for Home and Away country landing page
		* Parameter Usage	: layername - name of the layer
		*			  cardtype - Card Type - either pp, pl, pr, re
		*			  tl1 - use only with pp, show the tl category link at first column
		*			  sp1 - use only with pp, show the sp category link at first column
		*			  wd1 - use only with pp, show the wd category link at first column
		*			  hb1 - use only with pp, show the hb category link at first column
		*			  je1 - use only with pp, show the je category link at first column
		*			  tl2 - use with other, show the tl category link at second column
		*			  sp2 - use with other, show the sp category link at second column
		*			  wd2 - use with other, show the wd category link at second column
		*			  hb2 - use with other, show the hb category link at second column
		*			  je2 - use with other, show the je category link at second column
		*			  persistshow - if set, the layer will be always show
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browser : IE6, NS4, NS7
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 22 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_genOfferLayer":
			if(params.length!=14)
			{
				alert("Invalid parameters for HA_genOfferLayer - LocalPredefinedFunction('HA_genOfferLayer;???;???;???;???;???;???')");
			}
			else
			{
				return HA_genOfferLayer(params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: HA_AddParam2swf( swf, fromCountry, country, language )
		* Description		: Add parameters to swf. The URL will become swf?localCountry=<localCountry>&currentCountry=<currentCountry&language=<language>
		* Parameter Usage	: swf - the url of flash
		*			  fromCountry - value of fromCountry
		*			  country - value of country
		*			  language - value of language
		* Supported Browser	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 22 April 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_AddParam2swf":
			if(params.length!=5)
			{
				alert("Invalid parameters for HA_AddParam2swf - LocalPredefinedFunction('HA_AddParam2swf;???;???;???;???')");
			}
			else
			{
				return HA_AddParam2swf(params[1],params[2],params[3],params[4]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: HA_writeFlash(swfsrc,swfwidth,swfheight,swfclassid,swfcodebase,swfpluginspage,imgurl,imgwidth,imgheight,imghref,imgtarget,imgalt,imgborder,otherparam)
		* Description		: Generate codes for displaying Flash if appropriate plugin is installed.
		*			  Otherwise it will display a graphic file with an option of hyperlink.
		* Parameter Usage	: swfsrc - Specifies the location (URL) of the movie to be loaded.
		*			  swfwidth - Specifies the width of the movie in either pixels or percentage of browser window.
		*			  swfheight - Specifies the height of the movie in either pixels or percentage of browser window.
		*			  swfclassid - Identifies the ActiveX control for the browser. OBJECT only.
		*			  swfcodebase - Identifies the location of the Flash Player ActiveX control so that the browser
		*			                can automatically download it if it is not already installed. OBJECT only.
		*			  swfpluginspage - Identifies the location of the Flash Player plug-in so that the user can
		*			                   download it if it is not already installed. EMBED only.
		*			  imgurl - url of the image file to be called
		*			  imgwidth - width of the image file (blank if same width as Flash)
		*			  imgheight - height of the image file (blank if same height as Flash)
		*			  imghref - hyperlink of the image file (no link if blank)
		*			  imgtarget - target window of the hyperlink (ignore if hyperlink is blank)
		*			  imgalt - alt text of image (default blank)
		*			  imgborder - border of image  (default 0)
		*			  otherparam - Other optional attributes and possible values. The format of the string is a
		*			               set of name,value combinations separated by '|'.
		*			               Please read http://www.macromedia.com/support/flash/ts/documents/tag_attributes.htm
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browser : IE6, NS4, NS7
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 22 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_writeFlash":
			if(params.length!=15)
			{
				alert("Invalid parameters for HA_writeFlash - LocalPredefinedFunction('HA_writeFlash;???;???;???;???;???;???;???;???;???;???;???;???;???;???')");
			}
			else
			{
				HA_writeFlash(params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: HA_trimString(content,len)
		* Description		: Generate string of HTML code which contain HTML break code <br></br> seperated by len
		* Parameter Usage	:
		* Supported Browser 	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Edmond (Grey Interactive)
		* Creation Date		: 23 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_trimString":
			if(params.length!=3)
			{
				alert("Invalid parameters for HA_trimString - LocalPredefinedFunction('HA_trimString;???;???;???;???;???;???;???;???;???;???;???;???;???;???')");
			}
			else
			{
				return HA_trimString(params[1],params[2]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: HA_genPPLink()
		* Description		: Generate string of HTML code which contain PL and PR links
		* Parameter Usage	: N/A
		* Supported Browser 	: IE6, NS4, NS7
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Author		: Edmond (Grey Interactive)
		* Creation Date		: 23 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_genPPLink":
			HA_genPPLink();
			break;
		
		/***************************************************************************************************************
		* Function		: HA_writeMainFlash(swfwidth,swfheight,swfclassid,swfcodebase,swfpluginspage,imgurl,imgwidth,imgheight,imghref,imgtarget,imgalt,imgborder,otherparam)
		* Description		: Generate codes for displaying Flash if appropriate plugin is installed.
		*			  Otherwise it will display a graphic file with an option of hyperlink.
		* Parameter Usage	: swfsrc - Specifies the location (URL) of the movie to be loaded.
		*			  swfwidth - Specifies the width of the movie in either pixels or percentage of browser window.
		*			  swfheight - Specifies the height of the movie in either pixels or percentage of browser window.
		*			  swfclassid - Identifies the ActiveX control for the browser. OBJECT only.
		*			  swfcodebase - Identifies the location of the Flash Player ActiveX control so that the browser
		*			                can automatically download it if it is not already installed. OBJECT only.
		*			  swfpluginspage - Identifies the location of the Flash Player plug-in so that the user can
		*			                   download it if it is not already installed. EMBED only.
		*			  imgurl - url of the image file to be called
		*			  imgwidth - width of the image file (blank if same width as Flash)
		*			  imgheight - height of the image file (blank if same height as Flash)
		*			  imghref - hyperlink of the image file (no link if blank)
		*			  imgtarget - target window of the hyperlink (ignore if hyperlink is blank)
		*			  imgalt - alt text of image (default blank)
		*			  imgborder - border of image  (default 0)
		*			  otherparam - Other optional attributes and possible values. The format of the string is a
		*			               set of name,value combinations separated by '|'.
		*			               Please read http://www.macromedia.com/support/flash/ts/documents/tag_attributes.htm
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browser : IE6, NS4, NS7
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 22 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "HA_writeMainFlash":
			if(params.length!=14)
			{
				alert("Invalid parameters for HA_writeMainFlash - LocalPredefinedFunction('HA_writeMainFlash;???;???;???;???;???;???;???;???;???;???;???;???;???;???')");
			}
			else
			{
				HA_writeMainFlash(params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
			}
			break;

		
		/***************************************************************************************************************
		* Function		: HA_escapeString( str )
		* Description		: Change the special characters (&, ", <, >) to html code (&amp;, &quot;, &lt;, &gt;)
		* Parameter Usage	: str - input string
		* Location		: /hk/personal/card/homeaway/common/js/homeandaway.js
		* Supported Browsers	: IE6
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 13 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/

		case "HA_escapeString":
			if(params.length!=2)
			{
				alert("Invalid parameters for HA_escapeString - LocalPredefinedFunction('HA_escapeString;???')");
			}
			else
			{
				return HA_escapeString(params[1]);
			}
			break;

/* ------- End Home and Away functions -------- */
			

		/***************************************************************************************************************
		* Function		: LPF_generatePortfolioChart(strForm)
		* Description		: Validate and submit the form to the next page.
		* Parameter Usage	: strForm - The form name
		* Location		: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author		: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_generatePortfolioChart":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_generatePortfolioChart - LocalPredefinedFunction('LPF_generatePortfolioChart;???')");
			}
			else
			{
				LPF_generatePortfolioChart(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_resetPortfolioForm(strForm)
		* Description			: Reset all form values to be blank
		* Parameter Usage	: strForm - The form name
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_resetPortfolioForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_resetPortfolioForm - LocalPredefinedFunction('LPF_resetPortfolioForm;???')");
			}
			else
			{
				LPF_resetPortfolioForm(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_getPortfolioQueryString(strParaName)
		* Description			: Get the query string value from the URL
		* Parameter Usage	: strParaName - The parameter you want to get from the query string
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_getPortfolioQueryString":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_getPortfolioQueryString - LocalPredefinedFunction('LPF_getPortfolioQueryString;???')");
			}
			else
			{
				LPF_getPortfolioQueryString(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_writePortfolioMarketValue(intNum)
		* Description			: Write the market value from the query string
		* Parameter Usage	: intNum - The number of position of the query string parameter 
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_writePortfolioMarketValue":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_writePortfolioMarketValue - LocalPredefinedFunction('LPF_writePortfolioMarketValue;???')");
			}
			else
			{
				LPF_writePortfolioMarketValue(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_writePortfolioMarketPercent(intNum)
		* Description			: Write the investment percentage according to the market value from the query string
		* Parameter Usage	: intNum - The number of position of the query string parameter 
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_writePortfolioMarketPercent":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_writePortfolioMarketPercent - LocalPredefinedFunction('LPF_writePortfolioMarketPercent;???')");
			}
			else
			{
				LPF_writePortfolioMarketPercent(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_getPortfolioMarketValue(intNum)
		* Description			: Get the percentage of market value from the query string
		* Parameter Usage	: intNum - The number of position of the query string parameter 
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 5 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_getPortfolioMarketValue":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_getPortfolioMarketValue - LocalPredefinedFunction('LPF_getPortfolioMarketValue;???')");
			}
			else
			{
				return LPF_getPortfolioMarketValue(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_getPortfolioMarketValueForInput(intNum)
		* Description			: Get the market value from the query string for the Input screen
		* Parameter Usage	: intNum - The number of position of the query string parameter 
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 5 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_getPortfolioMarketValueForInput":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_getPortfolioMarketValueForInput - LocalPredefinedFunction('LPF_getPortfolioMarketValueForInput;???')");
			}
			else
			{
				return LPF_getPortfolioMarketValueForInput(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_formatCalculatorNumber(dblExpr, intDP)
		* Description			: Format the number with a decimal place
		* Parameter Usage	: dblExpr - The number want to be formatted
		*								  intDP - The number of decimal place
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_formatCalculatorNumber":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_formatCalculatorNumber - LocalPredefinedFunction('LPF_formatCalculatorNumber;???')");
			}
			else
			{
				LPF_formatCalculatorNumber(params[1], params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_rebalancePortfolio()
		* Description			: Back to the previous page to do the rebalancement
		* Parameter Usage	: na
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_rebalancePortfolio":
			LPF_rebalancePortfolio();
			break;

		/***************************************************************************************************************
		* Function				: LPF_calculateNetWorthValues(strForm)
		* Description			: Calculate and display all values on the Net Worth form
		* Parameter Usage	: strForm - The form name
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_calculateNetWorthValues":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_calculateNetWorthValues - LocalPredefinedFunction('LPF_calculateNetWorthValues;???')");
			}
			else
			{
				LPF_calculateNetWorthValues(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_resetNetWorthForm(strForm)
		* Description			: Reset all form values
		* Parameter Usage	: strForm - The form name
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 15 Apr 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_resetNetWorthForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_resetNetWorthForm - LocalPredefinedFunction('LPF_resetNetWorthForm;???')");
			}
			else
			{
				LPF_resetNetWorthForm(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_printChart()
		* Description			: Print the chart image according to the inputted URL, Parameter Name and Value
		* Parameter Usage	: na
		* Location				: /hk/chinese/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 3 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_printChart":
			LPF_printChart();
			break;

		/***************************************************************************************************************
		* Function				: LPF_returnPortfolioValues()
		* Description			: Return the inputted values on the input screen of Portfolio if any
		* Parameter Usage	: na
		* Location				: /hk/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 5 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_returnPortfolioValues":
			LPF_returnPortfolioValues();
			break;
			
		/***************************************************************************************************************
		* Function				: LPF_getPortfolioQueryStringForInput(strParaName)
		* Description			: Get the query string value from the URL for the Input Screen
		* Parameter Usage	: strParaName - The parameter you want to get from the query string
		* Location				: /hk/personal/invest/finplan/js/calculator.js
		* Author					: Andy Yeung (XMHK)
		* Creation Date		: 5 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_getPortfolioQueryStringForInput":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_getPortfolioQueryStringForInput - LPF_getPortfolioQueryStringForInput('LPF_getPortfolioQueryStringForInput;???')");
			}
			else
			{
				LPF_getPortfolioQueryStringForInput(params[1]);
			}
			break;

			
		/***************************************************************************************************************
		* Function			: LPF_getCookie(name)
		* Description		: Return value of a specific cookie
		* Parameter Usage	: name: cookie name
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/		
		case "LPF_getCookie":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_getCookie - LocalPredefinedFunction('LPF_getCookie;name')");
			}
			else
			{
				LPF_getCookie(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_writeFormDD(prefill)
		* Description		: Display the options list of a Day field (01-31) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/		
		case "LPF_EC_writeFormDD":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_EC_writeFormDD - LocalPredefinedFunction('LPF_EC_writeFormDD;prefill')");
			}
			else
			{
				LPF_EC_writeFormDD(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_writeFormMM(prefill)
		* Description		: Display the options list of a Month field (01-12) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_writeFormMM":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_EC_writeFormMM - LocalPredefinedFunction('LPF_EC_writeFormMM;prefill')");
			}
			else
			{
				LPF_EC_writeFormMM(params[1]);
			}
			break;		

		/***************************************************************************************************************
		* Function			: LPF_EC_writeFormYY(prefill)
		* Description		: Display the options list of a Year field (for age 17 - 40) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_writeFormYY":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_EC_writeFormYY - LocalPredefinedFunction('LPF_EC_writeFormYY;prefill')");
			}
			else
			{
				LPF_EC_writeFormYY(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_writeFormSex(lang)
		* Description		: Display the options of a Sex field (Male/Female)
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_writeFormSex":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_EC_writeFormSex - LocalPredefinedFunction('LPF_EC_writeFormSex;lang')");
			}
			else
			{
				LPF_EC_writeFormSex(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
								  lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 10 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_EC_submitQuote - LocalPredefinedFunction('LPF_EC_submitQuote;formname;lang')");
			}
			else
			{
				LPF_EC_submitQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_submitAppl(formname, lang)
		* Description		: Validate the form and submit the form to a popup window
		* Parameter Usage	: formname: name of the form object to be submitted
								  lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 12 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_submitAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_EC_submitAppl - LocalPredefinedFunction('LPF_EC_submitAppl;formname;lang')");
			}
			else
			{
				LPF_EC_submitAppl(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 12 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_EC_getQuote - LocalPredefinedFunction('LPF_EC_getQuote')");
			}
			else
			{
				LPF_EC_getQuote();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EC_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/easycover/js/easycover.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 20 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EC_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_EC_validateSource - LocalPredefinedFunction('LPF_EC_validateSource')");
			}
			else
			{
				LPF_EC_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_EDI_displayValue()
		* Description		: Display the values get from Tools server. Display empty string if no value or invalid value is returned
		* Parameter Usage	: index1, index2, index3 - indices to retrieve corresponding value
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Ryan Lam (DMI)
		* Creation Date	: 21 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EDI_displayValue":
			LPF_EDI_displayValue(params[1],params[2],params[3]);
			break;

		/***************************************************************************************************************
		* Function			: LPF_EDI_getValue()
		* Description		: return the values get from Tools server. Return ##invalid_data## if 
		* Parameter Usage	: index1, index2, index3 - indices to retrieve corresponding value if no value or invalid value is returned
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Ryan Lam (DMI)
		* Creation Date	: 21 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EDI_getValue":
			LPF_EDI_getValue(params[1],params[2],params[3]);
			break;
		/***************************************************************************************************************
		* Function			: LPF_EDI_getDataSource()
		* Description		: Retrieve a javascript function from Tools Server as a pre-requisite for LPF_EDI_getValue() and LPF_EDI_displayValue()
		* Parameter Usage	: URL - the URL to get data source
		*                   para - the parameters to be passed to the URL
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Ryan Lam (DMI)
		* Creation Date	: 21 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_EDI_getDataSource":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_EDI_getDataSource - LocalPredefinedFunction('LPF_EDI_getDataSource;URL;para')");
			}
			else
			{
				LPF_EDI_getDataSource(params[1], params[2]);
			}
			break;				

		 

		/***************************************************************************************************************
		* Function				: LPF_setHighlightsLayer(layerName, width, height, top)
		* Description			: Set the Highlights layers under the Overseas Account page
		* Parameter Usage	: layerName - layer's name;
		*                     width - width of the layer;
		*                     height - height of the layer;
		*                     top - the top coordinate of the layer;
		* Location				: /hk/personal/bank/js/vscroll.js
		* Author					: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_setHighlightsLayer":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_setHighlightsLayer - LocalPredefinedFunction('LPF_setHighlightsLayer;????')");
			}
			else
			{
				LPF_setHighlightsLayer(params[1], params[2], params[3], params[4]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_initialiseAutoScrollArea(container, content, speed)
		* Description			: Set the Highlights VScroll under the Overseas Account page
		* Parameter Usage	: container - container's name;
		*                     content - content's name;
		*                     speed - scrolling speed;
		* Location				: /hk/personal/bank/js/vscroll.js
		* Author					: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_initialiseAutoScrollArea":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_initialiseAutoScrollArea - LocalPredefinedFunction('LPF_initialiseAutoScrollArea;???')");
			}
			else
			{
				LPF_initialiseAutoScrollArea(params[1], params[2], params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function				: LPF_setActionOnResize()
		* Description			: To reload the page on window resize
		* Parameter Usage	: N/A
		* Location				: /hk/personal/bank/js/vscroll.js
		* Author					: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_setActionOnResize":
			LPF_setActionOnResize();
			break;

		/***************************************************************************************************************
		* Function			: LPF_constructObject(obj, nest)
		* Description		: To create objects which are used in the scrollable area
		* Parameter Usage	: obj - the object to be created;
							  nest - the container of the created object;
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_constructObject":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_constructObject - LocalPredefinedFunction('LPF_constructObject;??')");
			}
			else
			{
				LPF_constructObject(params[1], params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_verifyCompatibleBrowser()
		* Description		: Verify the browser version
		* Parameter Usage	: N/A
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_verifyCompatibleBrowser":
			LPF_verifyCompatibleBrowser();
			break;

		/***************************************************************************************************************
		* Function			: LPF_b_moveIt(x, y)
		* Description		: N/A
		* Parameter Usage	: x - x coordinate;
		*                         y - y coordinate;
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_b_moveIt":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_b_moveIt - LocalPredefinedFunction('LPF_b_moveIt;??')");
			}
			else
			{
				LPF_b_moveIt(params[1], params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_newsScroll(speed)
		* Description		: Makes the object scroll up 
		* Parameter Usage	: speed - set the scrolling speed
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_newsScroll":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_newsScroll - LocalPredefinedFunction('LPF_newsScroll;?')");
			}
			else
			{
				LPF_newsScroll(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_moveAreaDown(move, speed)
		* Description		: N/A
		* Parameter Usage	: move - move value;
		*                         speed - scrolling speed;
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_moveAreaDown":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_moveAreaDown - LocalPredefinedFunction('LPF_moveAreaDown;??')");
			}
			else
			{
				LPF_moveAreaDown(params[1], params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_moveAreaUp(move)
		* Description		: N/A
		* Parameter Usage	: move - move value;
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_moveAreaUp":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_moveAreaUp - LocalPredefinedFunction('LPF_moveAreaUp;?')");
			}
			else
			{
				LPF_moveAreaUp(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_performScroll(speed)
		* Description		: N/A
		* Parameter Usage	: speed - set the scrolling speed;
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_performScroll":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_performScroll - LocalPredefinedFunction('LPF_performScroll;?')");
			}
			else
			{
				LPF_performScroll(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LFP_ceaseScroll()
		* Description		: To stop scrolling
		* Parameter Usage	:  N/A
		* Location			: /hk/personal/bank/js/vscroll.js
		* Author			: Kelvin Ngai(XMHK)
		* Creation Date		: 17 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By				Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LFP_ceaseScroll":
			LFP_ceaseScroll();
			break;


		/***************************************************************************************************************
		* Function		: LPF_getParamVal(name, defaultValue)
		* Description		: Get parameters from querystring of URL
		* Parameter Usage	: name - variable name
		*			  defualtValue - defualt value when variable name is not set
		* Supported browsers	: IE6
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold (Grey Interactive)
		* Creation Date		: 27 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		         Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************
		* Remarks: require hsbc.js
		***************************************************************************************************************/
		case "LPF_getParamVal":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_getParamVal - LocalPredefinedFunction('LPF_getParamVal;???;???')");
			}
			else
			{
				LPF_getParamVal(params[1],params[2]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_pr_timeStop(name, imgsrc, imgsrc2, timelen, flag, frm, field)
		* Description		: This is used in the premier public site homepage to rotate the images
		* Pre-requisites	: 1) A form and a hidden form field should be defined in the page, and the initial value of the hidden field should be set to 0
		* Parameter Usage	: name	:name of the image
		* 					imgsrc	:the first image
		* 					imgsrc2	:the second image
		* 					timelen	:the time inteval for the rotation
		* 					flag	:the flag indicated which image should be used
		* 					frm		:the name of the form containing the mouse event information
		* 					field		:the name of the hidden form field containing the mouse event information
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Vivian Au (Ion Global)
		* Creation Date		: 19 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_pr_timeStop":
			if(params.length!=8)
			{
				alert("Invalid parameters for LPF_pr_timeStop - LocalPredefinedFunction('LPF_pr_timeStop;name;imgsrc;imgsrc2;timelen;flag;frm;field')");
			}
			else
			{
				LPF_pr_timeStop(params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: LPF_pr_chgFrmVal(frm, field, value)
		* Description		: This is used in the premier public site homepage to change the value of a hidden form field
		* Pre-requisites	: 1) A form should be predefined in the page
		* Parameter Usage	: frm	:name of the form
		* 					field	:name of the hidden field
		* 					value	:the value assign to the hidden form field
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Vivian Au (Ion Global)
		* Creation Date		: 19 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_pr_chgFrmVal":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_pr_chgFrmVal - LocalPredefinedFunction('LPF_pr_chgFrmVal;frm;field;value')");
			}
			else
			{
				LPF_pr_chgFrmVal(params[1],params[2],params[3]);
			}
			break;
			
		/***************************************************************************************************************
		* Function		: LPF_pr_init()
		* Description		: This is used in the premier public site homepage to call the image rotation functions
		* Pre-requisites	: 1) A form with name "imgRotationData" should be defined
		* 					2) 3 hidden form fields with names "relation", "recognition", "reward" should be defined
		* 					3) 3 images with the names, "relation", "recognition", "reward", should be defined
		* Parameter Usage	: Nil
		* Location		: /hk/personal/bank/premier/common/js/pr01g.js
		* Author		: Vivian Au (Ion Global)
		* Creation Date		: 19 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_pr_init":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_pr_init - LocalPredefinedFunction('LPF_pr_init')");
			}
			else
			{
				LPF_pr_init();
			}
			break;
		
		/***************************************************************************************************************
		* Function		: LPF_pr_onload()
		* Description		: This is used in the premier public site homepage to call the init function when the page is loaded
		* Pre-requisites	: Nil
		* Parameter Usage	: Nil
		* Location		: /hk/personal/bank/premier/common/js/pr01g.js
		* Author		: Vivian Au (Ion Global)
		* Creation Date		: 21 May 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_pr_onload":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_pr_onload - LocalPredefinedFunction('LPF_pr_onload')");
			}
			else
			{
				LPF_pr_onload();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_isCookieEnabled()
		* Description		: Check if the browser supports cookies
		* Parameter Usage	: N/A
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 28 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/	
		case "LPF_isCookieEnabled":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_isCookieEnabled - LocalPredefinedFunction('LPF_isCookieEnabled')");
			}
			else
			{
				LPF_isCookieEnabled();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_deleteCookie(name, path, domain)
		* Description		: To delete a specific cookie
		* Parameter Usage	: name: name of the cookie
		*						: path: path of the cookie (must be same as path used to create cookie)
		*						: domain: domain of the cookie (must be same as domain used to create cookie)
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 5 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_deleteCookie":
			if(params.length!==4)
			{
				alert("Invalid parameters for LPF_deleteCookie - LocalPredefinedFunction('LPF_deleteCookie;name;path;domain')");
			}
			else
			{
				LPF_deleteCookie(params[1],params[2],params[3]);
			}
			break;

		// START: Developed for FirstCare
		/***************************************************************************************************************
		* Function			: LPF_FC_getName_ChosenPlan(plan, lang)
		* Description		: Display the plan name
		* Parameter Usage	: plan - form value of the plan name
		*						  lang - languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 11 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_getName_ChosenPlan":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_getName_ChosenPlan - LocalPredefinedFunction('LPF_FC_getName_ChosenPlan;plan;lang')");
			}
			else
			{
				LPF_FC_getName_ChosenPlan(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_Protect(lang)
		* Description		: Display the options list of the field 'protect_who' and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_Protect":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_Protect - LocalPredefinedFunction('LPF_FC_writeForm_Protect;lang')");
			}
			else
			{
				LPF_FC_writeForm_Protect(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_InsuredDetailsLv1(lang)
		* Description		: Display fields of 'age' and 'plan' of the insured persons
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_InsuredDetailsLv1":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_InsuredDetailsLv1 - LocalPredefinedFunction('LPF_FC_writeForm_InsuredDetailsLv1;lang')");
			}
			else
			{
				LPF_FC_writeForm_InsuredDetailsLv1(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_InsuredDetailsLv2(lang)
		* Description		: Display fields of 'age' and 'plan' of the insured persons
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_InsuredDetailsLv2":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_InsuredDetailsLv2 - LocalPredefinedFunction('LPF_FC_writeForm_InsuredDetailsLv2;lang')");
			}
			else
			{
				LPF_FC_writeForm_InsuredDetailsLv2(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeNotes(lang)
		* Description		: Display notes at the bottom of the quote box
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeNotes":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeNotes - LocalPredefinedFunction('LPF_FC_writeNotes;lang')");
			}
			else
			{
				LPF_FC_writeNotes(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_parseDetails(lang)
		* Description		: Retrieve 'age' or 'plan' value from combined value (*_details)
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_parseDetails":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_parseDetails - LocalPredefinedFunction('LPF_FC_parseDetails;lang')");
			}
			else
			{
				LPF_FC_parseDetails(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_SelfAge(lang)
		* Description		: Display the field 'self_age' and pre-fill the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_SelfAge":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_SelfAge - LocalPredefinedFunction('LPF_FC_writeForm_SelfAge;lang')");
			}
			else
			{
				LPF_FC_writeForm_SelfAge(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_SpouseAge(lang)
		* Description		: Display the field 'spouse_age' and pre-fill the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_SpouseAge":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_SpouseAge - LocalPredefinedFunction('LPF_FC_writeForm_SpouseAge;lang')");
			}
			else
			{
				LPF_FC_writeForm_SpouseAge(params[1]);
			}
			break;
		
		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_Plan(str, lang)
		* Description		: Display the list of plan options and pre-select the value if its cookie is found
		* Parameter Usage	: str - field value
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_Plan":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_writeForm_Plan - LocalPredefinedFunction('LPF_FC_writeForm_Plan;str;lang')");
			}
			else
			{
				LPF_FC_writeForm_Plan(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_SelfPlan(lang)
		* Description		: Display the options list of the field 'self_plan' and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_SelfPlan":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_SelfPlan - LocalPredefinedFunction('LPF_FC_writeForm_SelfPlan;lang')");
			}
			else
			{
				LPF_FC_writeForm_SelfPlan(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_SpousePlan(lang)
		* Description		: Display the options list of the field 'spouse_plan' and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_SpousePlan":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_SpousePlan - LocalPredefinedFunction('LPF_FC_writeForm_SpousePlan;lang')");
			}
			else
			{
				LPF_FC_writeForm_SpousePlan(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ChildNo(lang)
		* Description		: Display the field 'how many children do you have' and pre-fill the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ChildNo":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ChildNo - LocalPredefinedFunction('LPF_FC_writeForm_ChildNo;lang')");
			}
			else
			{
				LPF_FC_writeForm_ChildNo(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ChildAge(lang)
		* Description		: Display the field of child(ren) age and pre-fill the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ChildAge":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ChildAge - LocalPredefinedFunction('LPF_FC_writeForm_ChildAge;lang')");
			}
			else
			{
				LPF_FC_writeForm_ChildAge(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ChildPlan(lang)
		* Description		: Display the field of child(ren) plan and pre-fill the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ChildPlan":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ChildPlan - LocalPredefinedFunction('LPF_FC_writeForm_ChildPlan;lang')");
			}
			else
			{
				LPF_FC_writeForm_ChildPlan(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_returnChildAge(option, lang)
		* Description		: Return the option string in the select box of the field of child(ren) age
		* Parameter Usage	: option - option value
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_returnChildAge":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_returnChildAge - LocalPredefinedFunction('LPF_FC_returnChildAge;option;lang')");
			}
			else
			{
				LPF_FC_returnChildAge(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_validatePreQuote(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname - name of the form object to be validated
		*						: lang - language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_validatePreQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_validatePreQuote - LocalPredefinedFunction('LPF_FC_validatePreQuote;formname;lang')");
			}
			else
			{
				LPF_FC_validatePreQuote(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_submitPreQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname - name of the form object to be submitted
		*						: lang - language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_submitPreQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_submitPreQuote - LocalPredefinedFunction('LPF_FC_submitPreQuote;formname;lang')");
			}
			else
			{
				LPF_FC_submitPreQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_refreshQuote(formname, lang, show_result)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname - name of the form object to be submitted
		*						: lang - language to be used to display error message (en/zh)
		*						: show_result - flag to determine whether the result will be shown
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_refreshQuote":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_FC_refreshQuote - LocalPredefinedFunction('LPF_FC_refreshQuote;formname;lang;show_result')");
			}
			else
			{
				LPF_FC_refreshQuote(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_getPersonalDetails(lang)
		* Description		: Print table of Personal Details with stored cookie values
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_getPersonalDetails":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_getPersonalDetails - LocalPredefinedFunction('LPF_FC_getPersonalDetails;lang')");
			}
			else
			{
				LPF_FC_getPersonalDetails(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptName(plan, type, lang)
		* Description		: Display the options list of optional benefits and pre-select the value if its cookie is found
		* Parameter Usage	: plan - plan value
		*						: type - type of optional benefits
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptName":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptName - LocalPredefinedFunction('LPF_FC_writeForm_OptName;plan;type;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptName(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ListSupp(plan, str, lang)
		* Description		: Display the options list of the field of SMMB and pre-select the value if its cookie is found
		* Parameter Usage	: plan - plan value
		*						: str - stored value
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ListSupp":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ListSupp - LocalPredefinedFunction('LPF_FC_writeForm_ListSupp;plan;str;lang')");
			}
			else
			{
				LPF_FC_writeForm_ListSupp(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ListClinical(str, lang)
		* Description		: Display the options list of the field of Clnical Benefit and pre-select the value if its cookie is found
		* Parameter Usage	: str - stored value
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ListClinical":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ListClinical - LocalPredefinedFunction('LPF_FC_writeForm_ListClinical;str;lang')");
			}
			else
			{
				LPF_FC_writeForm_ListClinical(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_checkListClinical(obj)
		* Description		: Control the single option in two rows
		* Parameter Usage	: obj - name of the form object
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/			
		case "LPF_FC_checkListClinical":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_checkListClinical - LocalPredefinedFunction('LPF_FC_checkListClinical;obj')");
			}
			else
			{
				LPF_FC_checkListClinical(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ListMaternity(str, lang)
		* Description		: Display the options list of the field of Maternity Benefit and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ListMaternity":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ListMaternity - LocalPredefinedFunction('LPF_FC_writeForm_ListMaternity;str;lang')");
			}
			else
			{
				LPF_FC_writeForm_ListMaternity(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_ListDental(str, lang)
		* Description		: Display the options list of the field of Dental Benefit and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_ListDental":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_writeForm_ListDental - LocalPredefinedFunction('LPF_FC_writeForm_ListDental;str;lang')");
			}
			else
			{
				LPF_FC_writeForm_ListDental(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverMaternity(lang)
		* Description		: Display the options of the field of Maternity Benefit and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverMaternity":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverMaternity - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverMaternity;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverMaternity(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverSelf(lang)
		* Description		: Display field values for optional benefits (self) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverSelf":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverSelf - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverSelf;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverSelf(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverSpouse(lang)
		* Description		: Display field values for optional benefits (spouse) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverSpouse":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverSpouse - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverSpouse;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverSpouse(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild1(lang)
		* Description		: Display field values for optional benefits (child 1) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild1":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild1 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild1;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild1(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild2(lang)
		* Description		: Display field values for optional benefits (child 2) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild2":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild2 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild2;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild2(params[1]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild3(lang)
		* Description		: Display field values for optional benefits (child 3) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild3":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild3 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild3;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild3(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild4(lang)
		* Description		: Display field values for optional benefits (child 4) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild4":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild4 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild4;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild4(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild5(lang)
		* Description		: Display field values for optional benefits (child 5) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild5":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild5 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild5;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild5(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverChild6(lang)
		* Description		: Display field values for optional benefits (child 6) and pre-fill values if their cookies are found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverChild6":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverChild6 - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverChild6;lang')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverChild6(params[1]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_FC_writeForm_OptCoverHidden()
		* Description		: Write hidden fields required for different insured persons
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeForm_OptCoverHidden":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_writeForm_OptCoverHidden - LocalPredefinedFunction('LPF_FC_writeForm_OptCoverHidden')");
			}
			else
			{
				LPF_FC_writeForm_OptCoverHidden();
			}
			break;						

		/***************************************************************************************************************
		* Function			: LPF_FC_parseOptionalCover(input_str, lang)
		* Description		: Print table of Quote Result with stored cookie values
		* Parameter Usage	: input_str - combined value of optional benefits 
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_parseOptionalCover":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_parseOptionalCover - LocalPredefinedFunction('LPF_FC_parseOptionalCover;input_str;lang')");
			}
			else
			{
				LPF_FC_parseOptionalCover(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_FC_getQuoteResult(lang)
		* Description		: Print table of Quote Result with stored cookie values
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_getQuoteResult":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_getQuoteResult - LocalPredefinedFunction('LPF_FC_getQuoteResult;lang')");
			}
			else
			{
				LPF_FC_getQuoteResult(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_FC_validateQuote(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname - name of the form object to be validated
		*						: lang - language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_validateQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_validateQuote - LocalPredefinedFunction('LPF_FC_validateQuote;formname;lang')");
			}
			else
			{
				LPF_FC_validateQuote(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_passCookie(action)
		* Description		: Retrieve hidden values from the hidden form and store as cookies
		* Parameter Usage	: action - action to be taken after the cookies are stored (change/print)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_passCookie":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_passCookie - LocalPredefinedFunction('LPF_FC_passCookie;action')");
			}
			else
			{
				LPF_FC_passCookie(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname - name of the form object to be submitted
		*						: lang - language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FC_submitQuote - LocalPredefinedFunction('LPF_FC_submitQuote;formname;lang')");
			}
			else
			{
				LPF_FC_submitQuote(params[1],params[2]);
			}
			break;
		
		/***************************************************************************************************************
		* Function			: LPF_FC_validatePage()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Solutions Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_validatePage":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_validatePage - LocalPredefinedFunction('LPF_FC_validatePage')");
			}
			else
			{
				LPF_FC_validatePage();
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_getQuote - LocalPredefinedFunction('LPF_FC_getQuote')");
			}
			else
			{
				LPF_FC_getQuote();
			}
			break;
		
		/***************************************************************************************************************
		* Function			: LPF_FC_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Solutions Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_validateSource - LocalPredefinedFunction('LPF_FC_validateSource')");
			}
			else
			{
				LPF_FC_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_displayPremium()
		* Description		: Display the premium value with comma as delimiter
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Solutions Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_displayPremium":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_displayPremium - LocalPredefinedFunction('LPF_FC_displayPremium')");
			}
			else
			{
				LPF_FC_displayPremium();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_returnCoverOption(optionname, option, lang)
		* Description		: Return the option value of the specific optional benefit
		* Parameter Usage	: optionname - the name of the field
		*						: option - option value
		*						: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_returnCoverOption":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_FC_returnCoverOption - LocalPredefinedFunction('LPF_FC_returnCoverOption;optionname;option;lang')");
			}
			else
			{
				LPF_FC_returnCoverOption(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_popPrint(linkstr)
		* Description		: Target a hyperlink to a popup window
		* Parameter Usage	: linkstr - hyperlink
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Solutions Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_popPrint":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_popPrint - LocalPredefinedFunction('LPF_FC_popPrint;linkstr')");
			}
			else
			{
				LPF_FC_popPrint(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_writeTodayDate(lang)
		* Description		: Print today's date in a html page
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 16 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeTodayDate":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FC_writeTodayDate - LocalPredefinedFunction('LPF_FC_writeTodayDate;lang')");
			}
			else
			{
				LPF_FC_writeTodayDate(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_FC_writePrintCss()
		* Description		: Print style for printing purpose
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writePrintCss":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_writePrintCss - LocalPredefinedFunction('LPF_FC_writePrintCss')");
			}
			else
			{
				LPF_FC_writePrintCss();
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_writeHiddenForm()
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_writeHiddenForm":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_writeHiddenForm - LocalPredefinedFunction('LPF_FC_writeHiddenForm')");
			}
			else
			{
				LPF_FC_writeHiddenForm();
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_FC_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/firstcare/js/firstcare.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_FC_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FC_clearCookie - LocalPredefinedFunction('LPF_FC_clearCookie')");
			}
			else
			{
				LPF_FC_clearCookie();
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_displayCookieError(lang)
		* Description		: Display error message if the browser does not support cookies
		* Parameter Usage	: lang: language to be displayed error messages (en/zh)
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 28 Jun 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_displayCookieError":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_displayCookieError - LocalPredefinedFunction('LPF_displayCookieError;lang')");
			}
			else
			{
				LPF_displayCookieError(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_addComma(str)
		* Description		: Retrieve the premium value and add comma as separator
		* Parameter Usage	: str: premium value
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: Fai Leung (elight Software Limited)
		* Creation Date	: 9 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_addComma":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_addComma - LocalPredefinedFunction('LPF_addComma;str')");
			}
			else
			{
				LPF_addComma(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_commandSaveAs()
		* Description		: Display 'Save As' dialogue
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: 20 Jul 2005 (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_commandSaveAs":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_commandSaveAs - LocalPredefinedFunction('LPF_commandSaveAs')");
			}
			else
			{
				LPF_commandSaveAs();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_commandPrint()
		* Description		: Display 'Print' dialogue
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: Cherry Wong (elight Solutions Limited)
		* Creation Date	: 20 Jul 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_commandPrint":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_commandPrint - LocalPredefinedFunction('LPF_commandPrint')");
			}
			else
			{
				LPF_commandPrint();
			}
			break;			
		// END: Developed for FirstCare		

			
		/***************************************************************************************************************
		* Function		: LPF_YahooBeacon(secure, beacon)
		* Description		: Yahoo beacon for page tracking
		* Parameter Usage	: secure	: A 'y' or 'n' to indicate whether it is a secure site
		*			: Beacon value  : provided by Yahoo e.g. 96665605
		* Location		: /hk/personal/common/pfscommon.js
		* Author		: Herman
		* Creation Date		: 9 Jul 2004
		* Side effect		: No
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"LPF_YahooBeacon":
			if(params.length!=3)
			{
				alert("Invalid parameters for YahooBeacon - LocalPredefinedFunction('YahooBeacon;secure;beacon_value')");
			}
			else
			{
				LPF_YahooBeacon(params[1],params[2]);
			}
			break;			

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormDD(prefill,cookieName,lang)
		* Description		: Display the options list of a Day field (01-31) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false), cookieName: the value of the cookie, lang: language of the page
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormDD":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_writeFormDD - LocalPredefinedFunction('LPF_TS_writeFormDD;prefill;cookieName;lang')");
			}
			else
			{
				LPF_TS_writeFormDD(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormMM(prefill,cookieName,lang)
		* Description		: Display the options list of a Month field (01-12) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false), cookieName: the value of the cookie, lang: language of the page
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormMM":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_writeFormMM - LocalPredefinedFunction('LPF_TS_writeFormMM;prefill;cookieName;lang')");
			}
			else
			{
				LPF_TS_writeFormMM(params[1],params[2],params[3]);
			}
			break;	


		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormYY(prefill,cookieName,lang)
		* Description		: Display the options list of a Year field (for age 18 - 40) and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false), cookieName: the value of the cookie, lang: Language of the page
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormYY":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_writeFormYY - LocalPredefinedFunction('LPF_TS_writeFormYY;prefill;cookieName;lang')");
			}
			else
			{
				LPF_TS_writeFormYY(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormPeopleTravelling(prefill;en)
		* Description		: Display the options list of people travelling and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormPeopleTravelling":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_TS_writeFormPeopleTravelling - LocalPredefinedFunction('LPF_TS_writeFormPeopleTravelling;prefill;en')");
			}
			else
			{
				LPF_TS_writeFormPeopleTravelling(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormNumChildren(prefill;lang)
		* Description		: Display the options list of a number of children and pre-select the value if its cookie is found
		* Parameter Usage	: prefill: need to pre-select or not (true/false) lang : language
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormNumChildren":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_TS_writeFormNumChildren - LocalPredefinedFunction('LPF_TS_writeFormNumChildren;prefill;lang')");
			}
			else
			{
				LPF_TS_writeFormNumChildren(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormDestination(area)
		* Description		: Display the options of a Destination field (Area1/Area2)
		* Parameter Usage	: Area: area of the selection
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormDestination":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_writeFormDestination - LocalPredefinedFunction('LPF_TS_writeFormDestination;area')");
			}
			else
			{
				LPF_TS_writeFormDestination(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormCMC(cmc)
		* Description		: Display the options of a China Medical Card field (Yes/No)
		* Parameter Usage	: Area: area of the selection
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormCMC":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_writeFormCMC - LocalPredefinedFunction('LPF_TS_writeFormCMC;cmc')");
			}
			else
			{
				LPF_TS_writeFormCMC(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeFormtriptype(triptype)
		* Description		: Display the options of a trip type field (Yes/No)
		* Parameter Usage	: triptype: Trip type of the selection
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeFormtriptype":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_writeFormtriptype - LocalPredefinedFunction('LPF_TS_writeFormtriptype;triptype')");
			}
			else
			{
				LPF_TS_writeFormtriptype(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_refreshQuote(formname, lang, show_result, tripType)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted lang: language to be used to display error message (en/zh)
		* Location		: /hk/personal/insur/firstcare/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_refreshQuote":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_TS_refreshQuote - LocalPredefinedFunction('LPF_TS_refreshQuote;formname;lang;show_result;tripType')");
			}
			else
			{
				LPF_TS_refreshQuote(params[1],params[2],params[3],params[4]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_validateTripQuote(formname, lang, tripType)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_validateTripQuote":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_validateTripQuote - LocalPredefinedFunction('LPF_TS_validateTripQuote;formname;lang')");
			}
			else
			{
				LPF_TS_validateTripQuote(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_passCookie(action)
		* Description		: Retrieve hidden values from the hidden form and store as cookies
		* Parameter Usage	: action: action to be taken after the cookies are stored (change/print)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 28 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_passCookie":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_passCookie - LocalPredefinedFunction('LPF_TS_passCookie;action')");
			}
			else
			{
				LPF_TS_passCookie(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_submitQuote(formname, lang, tripType)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
		*			  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_submitQuote":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_submitQuote - LocalPredefinedFunction('LPF_TS_submitQuote;formname;lang;tripType')");
			}
			else
			{
				LPF_TS_submitQuote(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_validateAppl(formname, lang, tripType, ver)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			  lang: language to displayed error messages (en/zh)
                *                         ver: version of the trip
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_validateAppl":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_TS_validateAppl - LocalPredefinedFunction('LPF_TS_validateAppl;formname;lang;tripType;ver')");
			}
			else
			{
				LPF_TS_validateAppl(params[1],params[2],params[3],params[4]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_submitAppl(formname, lang, tripType, ver, inType)
		* Description		: Validate the form and submit the form to a popup window
		* Parameter Usage	: formname: name of the form object to be submitted
		*			  lang: language to be used to display error message (en/zh)
		*			  tripType: Type of trip
                *                         ver: version of the trip
                *                         inType: Type of submittion
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_submitAppl":
			if(params.length!=6)
			{
				alert("Invalid parameters for LPF_TS_submitAppl - LocalPredefinedFunction('LPF_TS_submitAppl;formname;lang;tripType;ver;inType')");
			}
			else
			{
				LPF_TS_submitAppl(params[1],params[2],params[3],params[4],params[5]);
			}
			break;	


		/***************************************************************************************************************
		* Function		: LPF_TS_getQuote(tripType)
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: tripType: type of trip
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_getQuote":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_getQuote - LocalPredefinedFunction('LPF_TS_getQuote;triptype')");
			}
			else
			{
				LPF_TS_getQuote(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_validateSource(tripType)
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: tripType: type of trip
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_validateSource":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_validateSource - LocalPredefinedFunction('LPF_TS_validateSource;triptype')");
			}
			else
			{
				LPF_TS_validateSource(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_displayQuote(tripType,cmc)
		* Description		: Display the quotation result
		* Parameter Usage	: tripType : Trip type CMC : China Medical Card
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_displayQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_TS_displayQuote - LocalPredefinedFunction('LPF_TS_displayQuote;tripType;cmc')");
			}
			else
			{
				LPF_TS_displayQuote(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_displayDiscountMessage(lang)
		* Description		: Display the Discount Message
		* Parameter Usage	: lang: language to be used to display discount message (en/zh)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_displayDiscountMessage":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_displayDiscountMessage - LocalPredefinedFunction('LPF_TS_displayDiscountMessage;lang')");
			}
			else
			{
				LPF_TS_displayDiscountMessage(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_displayCMC()
		* Description		: Display the CMC fee
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_displayCMC":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_TS_displayCMC - LocalPredefinedFunction('LPF_TS_displayCMC')");
			}
			else
			{
				LPF_TS_displayCMC();
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_displayAreaDescription(area,lang)
		* Description		: Display the Area Description
		* Parameter Usage	: lang: language to be used to display error message (en/zh)
           	*	               	  area: The area code of the application
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_displayAreaDescription":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_TS_displayAreaDescription - LocalPredefinedFunction('LPF_TS_displayAreaDescription;area;lang')");
			}
			else
			{
				LPF_TS_displayAreaDescription(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_writeHiddenForm(formName)
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: formName : name of the form 
		* Location		: /hk/personal/insur/firstcare/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_writeHiddenForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_writeHiddenForm - LocalPredefinedFunction('LPF_TS_writeHiddenForm;formname')");
			}
			else
			{
				LPF_TS_writeHiddenForm(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/firstcare/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 26 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_TS_clearCookie - LocalPredefinedFunction('LPF_TS_clearCookie')");
			}
			else
			{
				LPF_TS_clearCookie();
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_displayCookieError(lang)
		* Description		: Display error message if the browser does not support cookies
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond (Gray Interactive)
		* Creation Date		: 26 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_TS_displayCookieError":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_displayCookieError - LocalPredefinedFunction('LPF_TS_displayCookieError;lang')");
			}
			else
			{
				LPF_TS_displayCookieError(params[1]);
			}
			break;	
		
		/***************************************************************************************************************
		* Function		: LPF_championChallenger(unit, url1, url2, url3, url4...)
		* Description		: Depends on the current time to display different URLs.
		* Parameter Usage	: unit - "s" for second, "m" for minute, "h" for hour. This variable specify which component
		*                                of current time is used to determine which URL will be directed.
		*                         url1 - first URL 
		*                         url2 - second URL
		*                         url3 - third URL
		*                         urln - nth URL
		* Sample use            : LocalPredefinedFunction('LPF_championChallenger;m;http://www.hsbc.com.hk;http://www.hsbc.com.hk/hk/personal;http://www.hsbc.com.hk/hk/chinese/personal')
		*                         This will direct the current page to www.hsbc.com.hk if the current minute modulus 3 is equal to 0.
		*                         or direct the current page to www.hsbc.com.hk/hk/personal if current minute modulus 3 is equal to 1.
		*                         or direct the current page to www.hsbc.com.hk/hk/chinese/personal if current minute modulus 3 is equal to 2.
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Ryan Lam (DMI)
		* Creation Date	: 21 Jul 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_championChallenger":
			if(params.length < 3)
			{
				alert("Invalid parameters for LPF_championChallenger - LocalPredefinedFunction('LPF_championChallenger;unit;url1;url2,......')");
			}
			else
			{
				params.shift();
				LPF_championChallenger(params);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_championChallengerGetURL(unit, url1, url2, url3, url4...)
		* Description		: Depends on the current time to display different URLs.
		* Parameter Usage	: unit - "s" for second, "m" for minute, "h" for hour. This variable specify which component
		*                                of current time is used to determine which URL will be directed.
		*                         url1 - first URL 
		*                         url2 - second URL
		*                         url3 - third URL
		*                         urln - nth URL
		* Sample use            : LocalPredefinedFunction('LPF_championChallengerGetURL;m;http://www.hsbc.com.hk;http://www.hsbc.com.hk/hk/personal;http://www.hsbc.com.hk/hk/chinese/personal')
		*                         This will return the URL http://www.hsbc.com.hk as a string if the current minute modulus 3 is equal to 0.
		*                         or return the URL www.hsbc.com.hk/hk/personal if current minute modulus 3 is equal to 1.
		*                         or return the URL www.hsbc.com.hk/hk/chinese/personal if current minute modulus 3 is equal to 2.
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Ryan Lam (DMI)
		* Creation Date	: 21 Jul 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_championChallengerGetURL":
			if(params.length < 3)
			{
				alert("Invalid parameters for LPF_championChallengerGetURL - LocalPredefinedFunction('LPF_championChallengerGetURL;unit;url1;url2,......')");
			}
			else
			{
				params.shift();
				LPF_championChallengerGetURL(params);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_TS_changeQuotePage(currentURL,formname)
		* Description		: Change quote page with number of children
		* Parameter Usage	: formname: name of the form
			  		currentURL: URL of the current page
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_changeQuotePage":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_TS_changeQuotePage - LocalPredefinedFunction('LPF_TS_changeQuotePage;currentURL;formname')");
			}
			else
			{
				LPF_TS_changeQuotePage(params[1],params[2]);
			}
			break;	


		/***************************************************************************************************************
		* Function		: LPF_TS_displayTravelDesc(lang)
		* Description		: Display the peopleTravelDescription
		* Parameter Usage	: lang: language of the web page
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_displayTravelDesc":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_TS_displayTravelDesc - LocalPredefinedFunction('LPF_TS_displayTravelDesc;lang')");
			}
			else
			{
				LPF_TS_displayTravelDesc(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_deleteAllCookie()
		* Description		: Delete all cookie values
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 28 Jul 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_deleteAllCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_TS_deleteAllCookie - LocalPredefinedFunction('LPF_TS_deleteAllCookie')");
			}
			else
			{
				LPF_TS_deleteAllCookie();
			}
			break;	


		/***************************************************************************************************************
		* Function		: LPF_TS_changeTripType(tripType,destURL,formname)
		* Description		: Change quote page with number of children
		* Parameter Usage	: tripType: Type of the trip
					  destURL: URL of the destination page
					  formname: name of the form
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_changeTripType":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_TS_changeTripType - LocalPredefinedFunction('LPF_TS_changeTripType;tripType;destURL;formname')");
			}
			else
			{
				LPF_TS_changeTripType(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_TS_selectQuotePage()
		* Description		: Select quote page 
		* Location		: /hk/personal/insur/travel/js/travelsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TS_selectQuotePage":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_TS_selectQuotePage - LocalPredefinedFunction('LPF_TS_selectQuotePage')");
			}
			else
			{
				LPF_TS_selectQuotePage();
			}
			break;	
			
		/***************************************************************************************************************
		* Function		: LPF_bannerGo(), 
		*			  LPF_bannerGo_link()
		* Description		: To add a rotational linked banner
		*			  LPF_bannerGo() - To change the image soure, link and the alt-tag according to the speed in the banner
		*			  LPF_bannerGo_link() - To point the link of the corresponding banner to the current window
		* Pre-requisite		: Must add the following code in the htm after the <body> tag:
		*			  <form name="LPF_bannerGo_params" action="" style="margin:0pt">
		*			  <input type="hidden" name="src" value="imgsrc1,imgsrc2,imgsrc3,...">
		*			  <input type="hidden" name="link" value="link1,link2,link3,...">
		*			  <input type="hidden" name="alt" value="alt1,alt2,alt3,...">
		*			  <input type="hidden" name="speed" value="speed">
		*			  <input type="hidden" name="whichimage" value="0">
		*			  <input type="hidden" name="whichlink" value="0">
		*			  </form>
		* Parameter Usage	: src (mandatory) - image sources
		*      			  link (mandatory) - the corresponding links of the specific images
		*			  alt (mandatory) - corresponding alt tags of the images
		*			  speed (mandatory) - the rotational speed of the banners (in millisecond, default = 2000)
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Anthony, Chan Yin Leung
		* Creation Date		: 10 Aug 2004
		* Side effect		: N/A
		* Sample Function Call	: <a href="javascript:LocalPredefinedFunction('LPF_bannerGo_link')">
		*			  <img src="http://www.hsbc.com.hk/regional/images/transpixel.gif" name="slide" border=0 height=100 width=400>
		*			  </a>
		*			  <script><!--LocalPredefinedFunction('LPF_bannerGo');//--></script>
		* Remarks		: Must set the height and width of the banner in the img tag to ensure proper display in different browsers
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_bannerGo_link":
			if (document.LPF_bannerGo_params.link.value == "")
			{
				alert("Invalid parameter for LPF_bannerGo_link.");
			}
			else
			{
				LPF_bannerGo_link();
			}
			break;
			
		case "LPF_bannerGo":
			if (document.LPF_bannerGo_params.whichimage.value!= 0 || document.LPF_bannerGo_params.whichlink.value!=0)
			{
				document.LPF_bannerGo_params.whichimage.value = 0;
				document.LPF_bannerGo_params.whichlink.value = 0;
				LPF_bannerGo();
			}
			else
			{
				LPF_bannerGo();
			}
			break;	
			
		/***************************************************************************************************************
		* Function		: LPF_bannerRandom
		* Description		: To generate a different banner each time when visiting a page. 
		* Pre-requisite		: The number of arguments must be even. The order should be <src1> <src2> <src3> <alt1> <alt2> <alt3>
		*			  The first SRC is referring to the (length/2+1) th ALT. The second one is referring to the (length/2+2) th ALT,
		*			  so on and so forth.
		* Parameter Usage	: params (mandatory) - holding all the arguments (described in Pre-requisite)
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold, Chow Kwok Cheong
		* Creation Date		: 13 Oct 2004
		* Side effect		: N/A
		* Sample Function Call	: <a href="/hk/personal/pushtotalk/redirect_ptt.htm?wtfrom=afford_c" target="_blank">
		*		  	  <img src="/regional/images/transpixel.gif" name="target_slide" border="0" height="90" width="150">
		*		          </a>		   
		*		          <script language="JavaScript" type="text/javascript">LocalPredefinedFunction
		*			  ('LPF_bannerRandom;/hk/personal/pushtotalk/ptt_image1_chi.gif;/hk/personal/pushtotalk/ptt_image2_chi.gif;
		*			  /hk/personal/pushtotalk/ptt_image3_chi.gif;PTTimage1;PTTimage2;PTTimage3')</script>		                  
		* Remarks		: Must set the height and width of the banner in the img tag to ensure proper display in different browsers
		*			  There are some limitations that this function does not support multiple hyperlinks on multple images. Also, 
		*			  this function can only be used once in a page.
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_bannerRandom":
			if((params.length%2) == 0)
			{
				alert("Invalid parameters for LPF_bannerRandom - LocalPredefinedFunction('LPF_bannerRandom;src1;src2;...;alt1;alt2...')");
			}
			else
			{
				params.shift();
				LPF_bannerRandom(params);
			}
			
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_setKeyword()
		* Description		: Appends the keyword onto the Search url
		* Parameter Usage	: 
		* destURL			: URL of the Search url
		* Location			: /hk/personal/common/js/pfscommon.js
		* Author				: Keith Mak (DMI)
		* Creation Date	: 19 Nov 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"LPF_setKeyword":
			if(params.length!=1 )
			{
				alert("Invalid LPF function : LPF_setKeyword");
			}
			else
			{
				LPF_setKeyword();
			}
			break;
			
		/***************************************************************************************************************
		* Function		: LPF_FS_writeFormPlanDescription(lang)
		* Description		: Display the options list of the plan description and pre-select the value if its cookie is found
		* Parameter Usage	: lang: language
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 14 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_writeFormPlanDescription":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_writeFormPlanDescription - LocalPredefinedFunction('LPF_FS_writeFormPlanDescription;lang')");
			}
			else
			{
				LPF_FS_writeFormPlanDescription(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_writeFormSumInsured()
		* Description		: Display the sum insured value if its cookie is found
		* Parameter Usage	: Null
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 14 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_writeFormSumInsured":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FS_writeFormSumInsured - LocalPredefinedFunction('LPF_FS_writeFormSumInsured')");
			}
			else
			{
				LPF_FS_writeFormSumInsured();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FS_getQuote - LocalPredefinedFunction('LPF_FS_getQuote')");
			}
			else
			{
				LPF_FS_getQuote();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FS_validateSource - LocalPredefinedFunction('LPF_FS_validateSource')");
			}
			else
			{
				LPF_FS_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
			  		  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FS_submitQuote - LocalPredefinedFunction('LPF_FS_submitQuote;formname;lang')");
			}
			else
			{
				LPF_FS_submitQuote(params[1],params[2]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_FS_validateQuote(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
					  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_validateQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FS_validateQuote - LocalPredefinedFunction('LPF_FS_validateQuote;formname;lang')");
			}
			else
			{
				LPF_FS_validateQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_refreshQuote(formname, lang, show_result)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted 
			  		  show_result: Whether go to next URL or not
			  		  lang: Language of the form
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_refreshQuote":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_FS_refreshQuote - LocalPredefinedFunction('LPF_FS_refreshQuote;formname;lang;show_result')");
			}
			else
			{
				LPF_FS_refreshQuote(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FS_clearCookie - LocalPredefinedFunction('LPF_FS_clearCookie;')");
			}
			else
			{
				LPF_FS_clearCookie();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_writeHiddenForm(formName)
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_writeHiddenForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_writeHiddenForm - LocalPredefinedFunction('LPF_FS_writeHiddenForm;formName')");
			}
			else
			{
				LPF_FS_writeHiddenForm(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_deleteAllCookie()
		* Description		: Delete all cookie values
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_deleteAllCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_FS_deleteAllCookie - LocalPredefinedFunction('LPF_FS_deleteAllCookie')");
			}
			else
			{
				LPF_FS_deleteAllCookie();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_displayCookieError(lang)
		* Description		: Display error message if the browser does not support cookies
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_displayCookieError":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_displayCookieError - LocalPredefinedFunction('LPF_FS_displayCookieError;lang')");
			}
			else
			{
				LPF_FS_displayCookieError(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_displayQuote(lang)
		* Description		: Display the quotation result
		* Parameter Usage	: lang: Language of the quote
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_displayQuote":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_displayQuote - LocalPredefinedFunction('LPF_FS_displayQuote;lang')");
			}
			else
			{
				LPF_FS_displayQuote(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_displayPlanDesc(lang)
		* Description		: Display Plan Description
		* Parameter Usage	: lang - language
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_displayPlanDesc":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_displayPlanDesc - LocalPredefinedFunction('LPF_FS_displayPlanDesc;lang')");
			}
			else
			{
				LPF_FS_displayPlanDesc(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_submitAppl(formname, lang)
		* Description		: Validate the form and submit the form to a popup window
		* Parameter Usage	: formname: name of the form object to be submitted
					  lang: language to be used to display error message (en/zh)
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_submitAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FS_submitAppl - LocalPredefinedFunction('LPF_FS_submitAppl;formname;lang')");
			}
			else
			{
				LPF_FS_submitAppl(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_validateAppl(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
					  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_validateAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FS_validateAppl - LocalPredefinedFunction('LPF_FS_validateAppl;formname;lang')");
			}
			else
			{
				LPF_FS_validateAppl(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_displaySumInsured(lang)
		* Description		: Display Sum insured
		* Parameter Usage	: lang - language
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_displaySumInsured":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_FS_displaySumInsured - LocalPredefinedFunction('LPF_FS_displaySumInsured;lang')");
			}
			else
			{
				LPF_FS_displaySumInsured(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_FS_changeQuoteOption(formname,destURL)
		* Description		: Change to quote with bring value
		* Parameter Usage	: formname: name of the form
					  destURL: URL of the quote page
		* Location		: /hk/personal/insur/fire/js/fireinsurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_FS_changeQuoteOption":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_FS_changeQuoteOption - LocalPredefinedFunction('LPF_FS_changeQuoteOption;formname;destURL')");
			}
			else
			{
				LPF_FS_changeQuoteOption(params[1],params[2]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormDD(cookieName,lang,variableName)
		* Description		: Display the options list of a Day field (01-31) and pre-select the value if its cookie is found
		* Parameter Usage	: cookieName: the value of the cookie,
		*			  lang: language of the page				
		*			  variableName: name of the select		
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_writeFormDD":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormDD - LocalPredefinedFunction('LPF_IS_writeFormDD;cookieName;lang;variableName')");
			}
			else
			{
				LPF_IS_writeFormDD(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormMM(cookieName,lang,variableName)
		* Description		: Display the options list of a Month field (01-12) and pre-select the value if its cookie is found
		* Parameter Usage	: cookieName: the value of the cookie
 		                          lang: language of the page
  		                          variableName: Name of the selection
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_writeFormMM":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormMM - LocalPredefinedFunction('LPF_IS_writeFormMM;cookieName;lang;variableName')");
			}
			else
			{
				LPF_IS_writeFormMM(params[1],params[2],params[3]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormYY(cookieName,lang,variableName)
		* Description		: Display the options list of a Year field (for age 18 - 40) and pre-select the value if its cookie is found
		* Parameter Usage	: cookieName: the value of the cookie
		                          lang: language of the page
		                          variableName: Name of the selection
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_writeFormYY":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormYY - LocalPredefinedFunction('LPF_IS_writeFormYY;cookieName;lang;variableName')");
			}
			else
			{
				LPF_IS_writeFormYY(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormPlan(cookieName,lang,variableName)
		* Description		: Display the options list of the plan and pre-select the value if its cookie is found
		* Parameter Usage	: cookieName: the value of the cookie
		                          lang: language of the page
 		                          variableName: Name of the selection
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 14 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_writeFormPlan":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormPlan - LocalPredefinedFunction('LPF_IS_writeFormPlan;cookieName;lang;variableName')");
			}
			else
			{
				LPF_IS_writeFormPlan(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormInsuredPersons(cookieName,lang,variableName)
		* Description		: Display the options list of the plan and pre-select the value if its cookie is found
		* Parameter Usage	: cookieName: the value of the cookie
		                          lang: language of the page
                      			  variableName: Name of the selection
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 14 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_writeFormInsuredPersons":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormInsuredPersons - LocalPredefinedFunction('LPF_IS_writeFormInsuredPersons;cookieName;lang;variableName')");
			}
			else
			{
				LPF_IS_writeFormInsuredPersons(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_writeFormA4(cookieName,variableName,valueName)
		* Description		: Display the radio button and pre-select the value if cookie is found
		* Parameter Usage	: cookieName: the value of the cookie
   		                          variableName: Name of the radio button
    		                          valueName: Name of the value
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_writeFormA4":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_IS_writeFormA4 - LocalPredefinedFunction('LPF_IS_writeFormInsuredPersons;cookieName;variableName;valueName')");
			}
			else
			{
				LPF_IS_writeFormA4(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_deleteAllCookie()
		* Description		: Delete all cookie values
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_deleteAllCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_IS_deleteAllCookie - LocalPredefinedFunction('LPF_IS_deleteAllCookie')");
			}
			else
			{
				LPF_IS_deleteAllCookie();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_writeHiddenForm(formName)
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: formName : name of the form
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_writeHiddenForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_IS_writeHiddenForm - LocalPredefinedFunction('LPF_IS_writeHiddenForm;formname')");
			}
			else
			{
				LPF_IS_writeHiddenForm(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_IS_clearCookie - LocalPredefinedFunction('LPF_IS_clearCookie')");
			}
			else
			{
				LPF_IS_clearCookie();
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
		*			  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_IS_submitQuote - LocalPredefinedFunction('LPF_IS_submitQuote;formname;lang')");
			}
			else
			{
				LPF_IS_submitQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_displayCookie(name)
		* Description		: Display value of a specific cookie
		* Parameter Usage	: name: cookie name
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_IS_displayCookie":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_IS_displayCookie - LocalPredefinedFunction('LPF_IS_displayCookie;name')");
			}
			else
			{
				LPF_IS_displayCookie(params[1]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_displayPlanDesc(lang)
		* Description		: Display Plan Description
		* Parameter Usage	: lang - language
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_displayPlanDesc":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_IS_displayPlanDesc - LocalPredefinedFunction('LPF_IS_displayPlanDesc;lang')");
			}
			else
			{
				LPF_IS_displayPlanDesc(params[1]);
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_displayQuote()
		* Description		: Display Premium Quotation
		* Parameter Usage	: N/A
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_IS_displayQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_IS_displayQuote - LocalPredefinedFunction('LPF_IS_displayQuote')");
			}
			else
			{
				LPF_IS_displayQuote();
			}
			break;


		/***************************************************************************************************************
		* Function		: LPF_IS_displayCookieError(lang)
		* Description		: Display error message if the browser does not support cookies
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_displayCookieError":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_IS_displayCookieError - LocalPredefinedFunction('LPF_IS_displayCookieError;lang')");
			}
			else
			{
				LPF_IS_displayCookieError(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_IS_getQuote - LocalPredefinedFunction('LPF_IS_getQuote')");
			}
			else
			{
				LPF_IS_getQuote();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: Nil
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 12 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_IS_validateSource - LocalPredefinedFunction('LPF_IS_validateSource')");
			}
			else
			{
				LPF_IS_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_submitAppl(formname, lang)
		* Description		: Validate the form and submit the form to a popup window
		* Parameter Usage	: formname: name of the form object to be submitted
					  lang: language to be used to display error message (en/zh)
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_submitAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_IS_submitAppl - LocalPredefinedFunction('LPF_IS_submitAppl;formname;lang')");
			}
			else
			{
				LPF_IS_submitAppl(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_validateAppl(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
					  lang: language to displayed error messages (en/zh)
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 July 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_validateAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_IS_validateAppl - LocalPredefinedFunction('LPF_IS_validateAppl;formname;lang')");
			}
			else
			{
				LPF_IS_validateAppl(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_changeQuoteOption(formname,destURL)
		* Description		: Change to quote with bring value
		* Parameter Usage	: formname: name of the form
					  destURL: URL of the quote page
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 20 Oct 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_IS_changeQuoteOption":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_IS_changeQuoteOption - LocalPredefinedFunction('LPF_IS_changeQuoteOption;formname;destURL')");
			}
			else
			{
				LPF_IS_changeQuoteOption(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function		: LPF_IS_displayInsuredPerson(lang)
		* Description		: Display Insured Person
		* Parameter Usage	: lang - language
		* Location		: /hk/personal/insur/income/js/incomesurance.js
		* Author		: Edmond Lau (Gray Interactive)
		* Creation Date		: 6 October 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		
		case "LPF_IS_displayInsuredPerson":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_IS_displayInsuredPerson - LocalPredefinedFunction('LPF_IS_displayInsuredPerson;lang')");
			}
			else
			{
				LPF_IS_displayInsuredPerson(params[1]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: Goto_mthspc()
		* Description		: Go to the Special of the Month page
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author			: Angela Mak
		* Creation Date		: 9 Nov 2004
		* Side effect		: N/A
		*
		***************************************************************************************************************/
		case"LPF_Goto_mthspc":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_Goto_mthspc - LocalPredefinedFunction('LPF_Goto_mthspc')");
			}
			else
			{
				LPF_Goto_mthspc(params[1]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: Goto_luckydraw()
		* Description		: Go to the Super Rewards Lucky Draw page
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author			: Angela Mak
		* Creation Date		: 9 Nov 2004
		* Side effect		: N/A
		*
		***************************************************************************************************************/		
		case"LPF_Goto_luckydraw":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_Goto_luckydraw - LocalPredefinedFunction('LPF_Goto_luckydraw')");
			}
			else
			{
				LPF_Goto_luckydraw(params[1]);
			}
			break;
		
		/***************************************************************************************************************
		* Function		: LPF_Reset_Form(formname)
		* Description		: Reset a form
		* Parameter Usage	: formname - name of the form
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Arnold Chan (Gray Interactive)
		* Creation Date		: 29 Nov 2004
		* Side effect		: N/A
		* Projects			: Mortgage
		* Amendment History:
		* Date		By	 				Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_Reset_Form":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_Reset_Form - LocalPredefinedFunction('LPF_Reset_Form;formname')");
			}
			else
			{
				LPF_Reset_Form(params[1]);
			}
			break;



		/***************************************************************************************************************
		* Function		: LPF_TextBoxAutoTab(formName, box1, box1MaxLength, box2)
		* Description		: Auto tab to next text box when the parent text box reach its maxlength, this function
		*                     doesn't support Netscape
		* Parameter Usage	: formName - the name of the involved form
		*                     box1 - the first box
		*                     box1MaxLength - the maxlength of box1
		*                     box2 - the second box
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: XM HK
		* Creation Date		: 30 November 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_TextBoxAutoTab":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_TextBoxAutoTab - LocalPredefinedFunction('LPF_TextBoxAutoTab;box1;maxlength;box2;maxlength')");
			}
			else
			{
				LPF_TextBoxAutoTab(params[1],params[2],params[3],params[4]);
			}
			break;	


		/***************************************************************************************************************
		* Function		: LPF_ContainsElement()
		* Description		: check element 
		* Parameter Usage	: arr - the filter array, self define delimiter
		*                     ele - the client character
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: XM HK
		* Creation Date		: 30 November 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/

		case "LPF_ContainsElement":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_ContainsElement - LocalPredefinedFunction('LPF_ContainsElement;arr;ele')");
			}
			else
			{
				LPF_ContainsElement(params[1],params[2]);
			}
			break;	

		// START: For Helper Insurance
		/***************************************************************************************************************
		* Function			: LPF_DH_writeForm_Helper()
		* Description		: Display the options list of the field 'no_of_helpers' and pre-select the value if its cookie is found
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_writeForm_Helper":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_writeForm_Helper - LocalPredefinedFunction('LPF_DH_writeForm_Helper')");
			}
			else
			{
				LPF_DH_writeForm_Helper();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_writeForm_Plan(lang)
		* Description		: Display the options list of insurance plans and pre-select the value if its cookie is found
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_writeForm_Plan":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_DH_writeForm_Plan - LocalPredefinedFunction('LPF_DH_writeForm_Plan;lang')");
			}
			else
			{
				LPF_DH_writeForm_Plan(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_refreshQuote(formname, show_result)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
		*					: show_result: flag to determine whether the result will be shown (true/false)
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_refreshQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_DH_refreshQuote - LocalPredefinedFunction('LPF_DH_refreshQuote;formname;show_result')");
			}
			else
			{
				LPF_DH_refreshQuote(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_DH_passCookie()
		* Description		: Retrieve hidden values from the hidden form and store as cookies
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_passCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_passCookie - LocalPredefinedFunction('LPF_DH_passCookie')");
			}
			else
			{
				LPF_DH_passCookie();
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_DH_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
		*					: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_DH_submitQuote - LocalPredefinedFunction('LPF_DH_submitQuote;formname;lang')");
			}
			else
			{
				LPF_DH_submitQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_clearCookie - LocalPredefinedFunction('LPF_DH_clearCookie')");
			}
			else
			{
				LPF_DH_clearCookie();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_getQuote - LocalPredefinedFunction('LPF_DH_getQuote')");
			}
			else
			{
				LPF_DH_getQuote();
			}
			break;		
			
		/***************************************************************************************************************
		* Function			: LPF_DH_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_validateSource - LocalPredefinedFunction('LPF_DH_validateSource')");
			}
			else
			{
				LPF_DH_validateSource();
			}
			break;		
			
		/***************************************************************************************************************
		* Function			: LPF_DH_displayPremium()
		* Description		: Display the premium value with comma as delimiter
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_displayPremium":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_DH_displayPremium - LocalPredefinedFunction('LPF_DH_displayPremium')");
			}
			else
			{
				LPF_DH_displayPremium();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_prtQuoteResult(lang)
		* Description		: Retrieve values from hidden form and display in the Quote Result page
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_prtQuoteResult":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_DH_prtQuoteResult - LocalPredefinedFunction('LPF_DH_prtQuoteResult;lang')");
			}
			else
			{
				LPF_DH_prtQuoteResult(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_submitAppl(formname)
		* Description		: Submit all relevant values to the webform
		* Parameter Usage	: formname: name of the form object to be submitted
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_submitAppl":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_DH_submitAppl - LocalPredefinedFunction('LPF_DH_submitAppl;formname')");
			}
			else
			{
				LPF_DH_submitAppl(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_DH_submitApplOnline(formname)
		* Description		: Submit all relevant values to PIB
		* Parameter Usage	: formname: name of the form object to be submitted
		* Location			: /hk/personal/insur/helper/js/helper.js
		* Author			: elight Solutions Limited
		* Creation Date		: 10 Dec 2004
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_DH_submitApplOnline":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_DH_submitApplOnline - LocalPredefinedFunction('LPF_DH_submitApplOnline;formname')");
			}
			else
			{
				LPF_DH_submitApplOnline(params[1]);
			}
			break;
		// END: For Helper Insurance

		/***************************************************************************************************************
		* Function			: LPF_CR_Banner(lang)
		* Description		: Define the Rotational Banner for Card Rewards Homepage
		* Parameter Usage	: lang - 'E' or 'C'. E - English, C - Chinese
		* Location			: /hk/personal/card/bonus/js/cr.js
		* Author			: Ryan Lam (DMI)
		* Creation Date		: 16 Dec 2003
		* Side effect		: N/A
		* Pre-requisite		: LocalPredefinedFunction - LPF_bannerGo() in /docs/hk/personal/common/js/pfscommon.js
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_CR_Banner":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_CR_Banner - LocalPredefinedFunction('LPF_CR_Banner;lang')");
			}
			else
			{
				LPF_CR_Banner(params[1]);
			}
			break;

		// START: For Outpatient Care
		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_Protect(lang)
		* Description		: Display the options list of the field 'protect_who' and pre-select the value if its cookie is found
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_Protect":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_Protect - LocalPredefinedFunction('LPF_OP_writeForm_Protect;lang')");
			}
			else
			{
				LPF_OP_writeForm_Protect(params[1]);
			}
			break;


		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_Plan(lang)
		* Description		: Display the options list of insurance plans and pre-select the value if its cookie is found
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_Plan":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_Plan - LocalPredefinedFunction('LPF_OP_writeForm_Plan;lang')");
			}
			else
			{
				LPF_OP_writeForm_Plan(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_getName_ChosenPlan(plan, lang)
		* Description		: Display the plan name
		* Parameter Usage	: plan: form value of the plan name
		*						: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_getName_ChosenPlan":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_getName_ChosenPlan - LocalPredefinedFunction('LPF_OP_getName_ChosenPlan;plan;lang')");
			}
			else
			{
				LPF_OP_getName_ChosenPlan(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_PolicyDD(lang)
		* Description		: Display the options list of Policy Commencement Date (day) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_PolicyDD":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_PolicyDD - LocalPredefinedFunction('LPF_OP_writeForm_PolicyDD;lang')");
			}
			else
			{
				LPF_OP_writeForm_PolicyDD(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_PolicyMM(lang)
		* Description		: Display the options list of Policy Commencement Date (month) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_PolicyMM":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_PolicyMM - LocalPredefinedFunction('LPF_OP_writeForm_PolicyMM;lang')");
			}
			else
			{
				LPF_OP_writeForm_PolicyMM(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_PolicyYY(lang)
		* Description		: Display the options list of Policy Commencement Date (year) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_PolicyYY":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_PolicyYY - LocalPredefinedFunction('LPF_OP_writeForm_PolicyYY;lang')");
			}
			else
			{
				LPF_OP_writeForm_PolicyYY(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_SelfDOB(lang)
		* Description		: Display the options list of self's DOB and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_SelfDOB":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_SelfDOB - LocalPredefinedFunction('LPF_OP_writeForm_SelfDOB;lang')");
			}
			else
			{
				LPF_OP_writeForm_SelfDOB(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_SpouseDOB(lang)
		* Description		: Display the options list of spouse's DOB and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_SpouseDOB":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_SpouseDOB - LocalPredefinedFunction('LPF_OP_writeForm_SpouseDOB;lang')");
			}
			else
			{
				LPF_OP_writeForm_SpouseDOB(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_ChildNo(lang)
		* Description		: Display the options list of children number and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_ChildNo":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_ChildNo - LocalPredefinedFunction('LPF_OP_writeForm_ChildNo;lang')");
			}
			else
			{
				LPF_OP_writeForm_ChildNo(params[1]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_ChildNote(lang)
		* Description		: Display the note for children if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 28 Apr 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_ChildNote":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_ChildNote - LocalPredefinedFunction('LPF_OP_writeForm_ChildNote;lang')");
			}
			else
			{
				LPF_OP_writeForm_ChildNote(params[1]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_OP_writeForm_ChildDOB(lang)
		* Description		: Display the options list of child(ren)'s DOB and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeForm_ChildDOB":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_writeForm_ChildDOB - LocalPredefinedFunction('LPF_OP_writeForm_ChildDOB;lang')");
			}
			else
			{
				LPF_OP_writeForm_ChildDOB(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_refreshQuote(formname, show_result)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
								: show_result: flag to determine whether the quote result will be shown
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_refreshQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_refreshQuote - LocalPredefinedFunction('LPF_OP_refreshQuote;formname;show_result')");
			}
			else
			{
				LPF_OP_refreshQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_chkValidDate(dd, mm, yy)
		* Description		: Check if it is a valid date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_chkValidDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_OP_chkValidDate - LocalPredefinedFunction('LPF_OP_chkValidDate;dd;mm;yy')");
			}
			else
			{
				LPF_OP_chkValidDate(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_OP_chkFutureDate(dd, mm, yy)
		* Description		: Check if it is a future date or today, if not, return false
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_chkFutureDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_OP_chkFutureDate - LocalPredefinedFunction('LPF_OP_chkFutureDate;dd;mm;yy')");
			}
			else
			{
				LPF_OP_chkFutureDate(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_chkPolicyStartDate(dd, mm, yy)
		* Description		: Check if it is within the rage of three months from today
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_chkPolicyStartDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_OP_chkPolicyStartDate - LocalPredefinedFunction('LPF_OP_chkPolicyStartDate;dd;mm;yy')");
			}
			else
			{
				LPF_OP_chkPolicyStartDate(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_chkValidAge_Adult(dd, mm, yy, p_dd, p_mm, p_yy)
		* Description		: Check if it is a valid age for application (should be between 18 and 60),
								  based on the 1st day of next month of policy commencement date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		*			 			: p_dd: day value of a date
		*			 			: p_mm: month value of a date
		*			 			: p_yy: year value of a date
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_chkValidAge_Adult":
			if(params.length!=7)
			{
				alert("Invalid parameters for LPF_OP_chkValidAge_Adult - LocalPredefinedFunction('LPF_OP_chkValidAge_Adult;dd;mm;yy;p_dd;p_mm;p_yy')");
			}
			else
			{
				LPF_OP_chkValidAge_Adult(params[1],params[2],params[3],params[4],params[5],params[6]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_chkValidAge_Child(dd, mm, yy, p_dd, p_mm, p_yy)
		* Description		: Check if it is a valid age for application (should be between 15 days and 22),
								  based on the 1st day of next month of policy commencement date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		*			 			: p_dd: day value of a date
		*			 			: p_mm: month value of a date
		*			 			: p_yy: year value of a date
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_chkValidAge_Child":
			if(params.length!=7)
			{
				alert("Invalid parameters for LPF_OP_chkValidAge_Child - LocalPredefinedFunction('LPF_OP_chkValidAge_Child;dd;mm;yy;p_dd;p_mm;p_yy')");
			}
			else
			{
				LPF_OP_chkValidAge_Child(params[1],params[2],params[3],params[4],params[5],params[6]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_validateQuote(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			 			: lang: language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_validateQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_validateQuote - LocalPredefinedFunction('LPF_OP_validateQuote;formname;lang')");
			}
			else
			{
				LPF_OP_validateQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_passCookie()
		* Description		: Retrieve hidden values from the hidden form and store as cookies
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_passCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_OP_passCookie - LocalPredefinedFunction('LPF_OP_passCookie')");
			}
			else
			{
				LPF_OP_passCookie();
			}
			break;	
			
		/***************************************************************************************************************
		* Function			: LPF_OP_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
								: lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_submitQuote - LocalPredefinedFunction('LPF_OP_submitQuote;formname;lang')");
			}
			else
			{
				LPF_OP_submitQuote(params[1],params[2]);
			}
			break;			
			
		/***************************************************************************************************************
		* Function			: LPF_OP_writeHiddenForm()
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_writeHiddenForm":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_OP_writeHiddenForm - LocalPredefinedFunction('LPF_OP_writeHiddenForm')");
			}
			else
			{
				LPF_OP_writeHiddenForm();
			}
			break;

			
		/***************************************************************************************************************
		* Function			: LPF_OP_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_OP_clearCookie - LocalPredefinedFunction('LPF_OP_clearCookie')");
			}
			else
			{
				LPF_OP_clearCookie();
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_OP_removePrecedingZero(str)
		* Description		: Remove the preceding zero of a day and month field
		* Parameter Usage	: str: string containing preceding zero
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_removePrecedingZero":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_removePrecedingZero - LocalPredefinedFunction('LPF_OP_removePrecedingZero;str')");
			}
			else
			{
				LPF_OP_removePrecedingZero(params[1]);
			}
			break;		
			
		/***************************************************************************************************************
		* Function			: LPF_OP_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_OP_getQuote - LocalPredefinedFunction('LPF_OP_getQuote')");
			}
			else
			{
				LPF_OP_getQuote();
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_OP_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_OP_validateSource - LocalPredefinedFunction('LPF_OP_validateSource')");
			}
			else
			{
				LPF_OP_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_OP_displayPremium(payment_freq)
		* Description		: Display the premium value with comma as delimiter
		* Parameter Usage	: payment_freq: payment frequency (monthly/annual)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_displayPremium":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_displayPremium - LocalPredefinedFunction('LPF_OP_displayPremium;payment_freq')");
			}
			else
			{
				LPF_OP_displayPremium(params[1]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_OP_prtQuoteResult(lang)
		* Description		: Retrieve values from hidden form and display in the Quote Result page
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_prtQuoteResult":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_OP_prtQuoteResult - LocalPredefinedFunction('LPF_OP_prtQuoteResult;lang')");
			}
			else
			{
				LPF_OP_prtQuoteResult(params[1]);
			}
			break;	
		
		/***************************************************************************************************************
		* Function			: LPF_OP_validateAppl(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			 			: lang: language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_validateAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_validateAppl - LocalPredefinedFunction('LPF_OP_validateAppl;formname;lang')");
			}
			else
			{
				LPF_OP_validateAppl(params[1],params[2]);
			}
			break;	
			
		/***************************************************************************************************************
		* Function			: LPF_OP_submitAppl(formname, lang)
		* Description		: Submit all relevant values to the webform
		* Parameter Usage	: formname: name of the form object to be submitted
								: lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/outpatient/js/outpatient.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 Mar 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_OP_submitAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_OP_submitAppl - LocalPredefinedFunction('LPF_OP_submitAppl;formname;lang')");
			}
			else
			{
				LPF_OP_submitAppl(params[1],params[2]);
			}
			break;				
		// END: For Outpatient Care	
		
	
		/***************************************************************************************************************
		* Function		: LPF_amhRtPromo(titlecontent, bodycontent, imagepath, landingurl)
		* Description		: Generate HTML code for AMH right promotion chunks
		* Parameter Usage	: titlecontent: Promotion title in HTML
					: bodycontent: Promotion body in HTML
					: imagepath: Path to the promotion picture
					: landingurl: URL of the Promotion detail page
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Joseph Chan (XM)
		* Creation Date		: 19 July 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_amhRtPromo":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_amhRtPromo - LocalPredefinedFunction('LPF_amhRtPromo;titlecontent;bodycontent;imagepath;landingurl')");
			}
			else
			{
				return LPF_amhRtPromo(params[1],params[2],params[3],params[4]);
			}
			break;	

		/***************************************************************************************************************
		* Function		: LPF_htmlRandomizer(str)
		* Description		: Randomly display 1 chunk of HTML from a number of chunks (delimited by semicolon). 
		* Parameter Usage	: str: a number of HTML chunks delimited by semicolon, in the format of "html1;html2;..."
					  (note: it is assumed that an HTML chunk must not contain any semicolon characters,
					   but it may contain the string "%59" which will be converted to a semicolon later)
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Joseph Chan (XM)
		* Creation Date		: 19 July 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_htmlRandomizer":
			if(params.length<2)
			{
				alert("Invalid parameters for LPF_htmlRandomizer - LocalPredefinedFunction('LPF_htmlRandomizer;str')");
			}
			else
			{
				params.shift();
				LPF_htmlRandomizer(params.join(";"));
			}
			break;				

		/***************************************************************************************************************
		* Function		: LPF_semicolonUnescape(str)
		* Description		: Change the %59 to semicolon
		* Parameter Usage	: str: an input string
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Joseph Chan (XM)
		* Creation Date		: 20 July 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_semicolonUnescape":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_semicolonUnescape - LocalPredefinedFunction('LPF_semicolonUnescape;str')");
			}
			else
			{
				return LPF_semicolonUnescape(params[1]);
			}
			break;



		/***************************************************************************************************************
		* Function		: LPF_amhPromo(title1, body1, image1, url1, title2, body2, image2, url2, ...)
		* Description		: Randomly display 1 chunk of HTML from multiple chunks of promotions.
		* Parameter Usage	: titlex: Promotion title in HTML
					: bodyx: Promotion body in HTML
					: imagex: Path to the promotion picture
					: urlx: URL of the Promotion detail page
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Joseph Chan (XM)
		* Creation Date		: 26 July 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_amhPromo":
			if(params.length<5)
			{
				alert("Invalid parameters for LPF_amhPromo - LocalPredefinedFunction('LPF_amhPromo;title1;body1;image1;url1;title2;body2;image2;url2;...')");
			}
			else
			{
				params.shift();
				return LPF_amhPromo(params);
			}
			break;
			
			
			
		/***************************************************************************************************************
		* Function		: SiteCensusAdTag(datanode, media_acct_id, result_id, revenue)
		* Description		: Display SiteCensus Ad-Intelligence Tag
		* Parameter Usage	: datanode	: an id to locate the company for the tracking
					  media_acct_id	: an id to identify the account
					  result_id	: text appear when the image is being loaded or mouseover
					  revenue	: a revenue id
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Rongen Cheng
		* Creation Date		: 07 September 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case"SiteCensusAdTag":
			if(params.length!=5)
			{
				alert("Invalid parameters for SiteCensusAdTag - LocalPredefinedFunction('SiteCensusAdTag;datanode;media_acct_id;result_id;revenue')");
			}
			else
			{
				SiteCensusAdTag(params[1], params[2], params[3], params[4]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_octopusCalPoints(formname)
		* Description		: Validate and calculate octopus rewards point to be transferred
		* Parameter Usage	: formname: name of the redemption form
		* Location			: /hk/personal/card/bonus/js/cr.js
		* Author				: Leo Leung (e-light Solutions Limited)
		* Creation Date	: 08 Jul 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_octopusCalPoints":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_octopusCalPoints - LPF_octopusCalPoints(formname)");
			}
			else
			{
				LPF_octopusCalPoints(params[1]);
			}
			break;		

		/***************************************************************************************************************
		* Function			: LPF_octopus_submitForm(formname)
		* Description		: Submit form values to webform
		* Parameter Usage	: octo_redemp_form: name of redemption form
		* Location			: /hk/personal/card/bonus/js/cr.js
		* Author				: Leo Leung (e-light Solutions Limited)
		* Creation Date		: 08 Jul 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_octopus_submitForm":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_octopus_submitForm - LPF_octopus_submitForm(formname)");
			}
			else
			{
				LPF_octopus_submitForm(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function		: createHorizontalNav(curSection,availableItems)
		* Description		:  create horizontal navigation menu and highlight the current category and/or sub-category
		* Parameter Usage	: curSection is a string in format of "x" or "x.y"
		*                   where x = the number of current category
		*                         y = the number of current sub-category
		*						availableItems is two dimensional array of available navaigation items
		*						lang is the language of the page, should be English (en) or Trad. Chinese (zh)
		* Location		: /cardha/hkyro/js/menu.js
		* Author		: Bun Ng(e-crusade)
		* Creation Date		: 13 Sept 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "createHorizontalNav":
			if(params.length!=4)
			{
				alert("Invalid parameters for createHorizontalNav - LocalPredefinedFunction('createHorizontalNav;str;availableItems;lang')");
			}
			else
			{
				return createHorizontalNav(params[1],eval(params[2]),params[3]);
			}
			break;		



		/***************************************************************************************************************
		* Function		: LPF_Close()
		* Description		: Close Current Windows
		* Parameter Usage	: 
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Johnny Mak (TribalDDB HK)
		* Creation Date		: 24 Dec 2005
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_Close":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_Close - LocalPredefinedFunction('LPF_Close')");
			}
			else
			{
				LPF_Close();
      	}
			break;	



		/***************************************************************************************************************
		* Function		: 	LPF_CheckParam(name, value, poppage)
		* Description	: 	Get the parameter from querystring of URL, popup a new 
								window if parameter equals certain value
		* Parameter Usage	: 	name - name of the parameter
									value - checking value 
									poppage - the url of the pop up page
		* Location		: /hk/personal/common/js/pfscommon.js
		* Author		: Wendy Iu
		* Creation Date		: 22 Feb 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By		Description
		* ---------	------------	--------------------------------------------------------------------------------
		*
		***************************************************************************************************************/
		case "LPF_CheckParam":
					if(params.length!=4)
					{
						alert("Invalid parameters for LPF_CheckParam - LocalPredefinedFunction('LPF_CheckParam;name;value;poppage')");
					}
					else
					{
						LPF_CheckParam(params[1],params[2],params[3]);
					}
		break;
		
		//START: Developed for Refundable HospitalSurance
		/***************************************************************************************************************
		* Function			: LPF_RH_splitDate(datestr, datetype)
		* Description		: Get a date value from a date string
		* Parameter Usage	: datestr - date format in dd/mm/yyyy
		*						: datetype - dd or mm or yyyy
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_splitDate":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_splitDate - LocalPredefinedFunction('LPF_RH_splitDate;lang')");
			}
			else
			{
				LPF_RH_splitDate(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_Protect(lang)
		* Description		: Display the options list of the field 'protect_who' and pre-select the value if its cookie is found
		* Parameter Usage	: lang - language to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: Leo Leung (elight Solutions Limited)
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_Protect":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_Protect - LocalPredefinedFunction('LPF_RH_writeForm_Protect;lang')");
			}
			else
			{
				LPF_RH_writeForm_Protect(params[1]);
			}
			break;

			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_PolicyDD(lang)
		* Description		: Display the options list of Policy Commencement Date (day) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_PolicyDD":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_PolicyDD - LocalPredefinedFunction('LPF_RH_writeForm_PolicyDD;lang')");
			}
			else
			{
				LPF_RH_writeForm_PolicyDD(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_PolicyMM(lang)
		* Description		: Display the options list of Policy Commencement Date (month) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_PolicyMM":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_PolicyMM - LocalPredefinedFunction('LPF_RH_writeForm_PolicyMM;lang')");
			}
			else
			{
				LPF_RH_writeForm_PolicyMM(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_PolicyYY(lang)
		* Description		: Display the options list of Policy Commencement Date (year) and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_PolicyYY":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_PolicyYY - LocalPredefinedFunction('LPF_RH_writeForm_PolicyYY;lang')");
			}
			else
			{
				LPF_RH_writeForm_PolicyYY(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_Self(lang)
		* Description		: Display the options lists of self's DOB and chosen plan and pre-select their values if cookies are found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_Self":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_Self - LocalPredefinedFunction('LPF_RH_writeForm_Self;lang')");
			}
			else
			{
				LPF_RH_writeForm_Self(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_Spouse(lang)
		* Description		: Display the options lists of spouse's DOB and chosen plan and pre-select their values if cookies are found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_Spouse":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_Spouse - LocalPredefinedFunction('LPF_RH_writeForm_Spouse;lang')");
			}
			else
			{
				LPF_RH_writeForm_Spouse(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_ChildNo(lang)
		* Description		: Display the options list of children number and pre-select the value if its cookie is found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_ChildNo":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_ChildNo - LocalPredefinedFunction('LPF_RH_writeForm_ChildNo;lang')");
			}
			else
			{
				LPF_RH_writeForm_ChildNo(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeForm_ChildDOB(lang)
		* Description		: Display the options lists of children's DOB and chosen plans and pre-select their values if cookies are found
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeForm_ChildDOB":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeForm_ChildDOB - LocalPredefinedFunction('LPF_RH_writeForm_ChildDOB;lang')");
			}
			else
			{
				LPF_RH_writeForm_ChildDOB(params[1]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeNotes(lang)
		* Description		: Display notes at the bottom of the quote box
		* Parameter Usage	: lang: languaged to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeNotes":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_writeNotes - LocalPredefinedFunction('LPF_RH_writeNotes;lang')");
			}
			else
			{
				LPF_RH_writeNotes(params[1]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_refreshQuote(formname, show_result)
		* Description		: Refresh the page and store new form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
								: show_result: flag to determine whether the quote result will be shown
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_refreshQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_refreshQuote - LocalPredefinedFunction('LPF_RH_refreshQuote;formname;show_result')");
			}
			else
			{
				LPF_RH_refreshQuote(params[1],params[2]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_chkValidDate(dd, mm, yy)
		* Description		: Check if it is a valid date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_chkValidDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_RH_chkValidDate - LocalPredefinedFunction('LPF_RH_chkValidDate;dd;mm;yy')");
			}
			else
			{
				LPF_RH_chkValidDate(params[1],params[2],params[3]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_RH_chkFutureDate(dd, mm, yy)
		* Description		: Check if it is a future date or today, if not, return false
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_chkFutureDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_RH_chkFutureDate - LocalPredefinedFunction('LPF_RH_chkFutureDate;dd;mm;yy')");
			}
			else
			{
				LPF_RH_chkFutureDate(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_chkPolicyStartDate(dd, mm, yy)
		* Description		: Check if it is within the rage of three months from today
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_chkPolicyStartDate":
			if(params.length!=4)
			{
				alert("Invalid parameters for LPF_RH_chkPolicyStartDate - LocalPredefinedFunction('LPF_RH_chkPolicyStartDate;dd;mm;yy')");
			}
			else
			{
				LPF_RH_chkPolicyStartDate(params[1],params[2],params[3]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_chkValidAge_Adult(dd, mm, yy, p_dd, p_mm, p_yy)
		* Description		: Check if it is a valid age for application (should be between 18 and 60),
								  based on the 1st day of next month of policy commencement date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		*			 			: p_dd: day value of a date
		*			 			: p_mm: month value of a date
		*			 			: p_yy: year value of a date
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_chkValidAge_Adult":
			if(params.length!=7)
			{
				alert("Invalid parameters for LPF_RH_chkValidAge_Adult - LocalPredefinedFunction('LPF_RH_chkValidAge_Adult;dd;mm;yy;p_dd;p_mm;p_yy')");
			}
			else
			{
				LPF_RH_chkValidAge_Adult(params[1],params[2],params[3],params[4],params[5],params[6]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_chkValidAge_Child(dd, mm, yy, p_dd, p_mm, p_yy)
		* Description		: Check if it is a valid age for application (should be between 6 months and 22),
								  based on the 1st day of next month of policy commencement date
		* Parameter Usage	: dd: day value of a date
		*			 			: mm: month value of a date
		*			 			: yy: year value of a date
		*			 			: p_dd: day value of a date
		*			 			: p_mm: month value of a date
		*			 			: p_yy: year value of a date
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_chkValidAge_Child":
			if(params.length!=7)
			{
				alert("Invalid parameters for LPF_RH_chkValidAge_Child - LocalPredefinedFunction('LPF_RH_chkValidAge_Child;dd;mm;yy;p_dd;p_mm;p_yy')");
			}
			else
			{
				LPF_RH_chkValidAge_Child(params[1],params[2],params[3],params[4],params[5],params[6]);
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_validateQuote(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			 			: lang: language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_validateQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_validateQuote - LocalPredefinedFunction('LPF_RH_validateQuote;formname;lang')");
			}
			else
			{
				LPF_RH_validateQuote(params[1],params[2]);
			}
			break;	
			
		/***************************************************************************************************************
		* Function			: LPF_RH_submitQuote(formname, lang)
		* Description		: Validate the form and store form values as cookies
		* Parameter Usage	: formname: name of the form object to be submitted
								: lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_submitQuote":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_submitQuote - LocalPredefinedFunction('LPF_RH_submitQuote;formname;lang')");
			}
			else
			{
				LPF_RH_submitQuote(params[1],params[2]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_RH_passCookie()
		* Description		: To pass stored values from Quote Result page to Quote page
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_passCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_RH_passCookie - LocalPredefinedFunction('LPF_RH_passCookie')");
			}
			else
			{
				LPF_RH_passCookie();
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_writeHiddenForm()
		* Description		: Prepare a hidden form to collect cookies values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_writeHiddenForm":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_RH_writeHiddenForm - LocalPredefinedFunction('LPF_RH_writeHiddenForm')");
			}
			else
			{
				LPF_RH_writeHiddenForm();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_clearCookie()
		* Description		: Put all cookies values into hidden values and delete the cookie
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_clearCookie":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_RH_clearCookie - LocalPredefinedFunction('LPF_RH_clearCookie')");
			}
			else
			{
				LPF_RH_clearCookie();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_getQuote()
		* Description		: Retrieve cookies values and pass into LPF_EDI_getDataSource to get premium values
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_getQuote":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_RH_getQuote - LocalPredefinedFunction('LPF_RH_getQuote')");
			}
			else
			{
				LPF_RH_getQuote();
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_RH_validateSource()
		* Description		: Check if it is a valid quotation
		* Parameter Usage	: N/A
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_validateSource":
			if(params.length!=1)
			{
				alert("Invalid parameters for LPF_RH_validateSource - LocalPredefinedFunction('LPF_RH_validateSource')");
			}
			else
			{
				LPF_RH_validateSource();
			}
			break;

		/***************************************************************************************************************
		* Function			: LPF_RH_displayPremium(str, payment_freq)
		* Description		: Display the premium value with comma as delimiter
		* Parameter Usage	: str: value types
		* 						: payment_freq: payment frequency (monthly/annual)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_displayPremium":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_displayPremium - LocalPredefinedFunction('LPF_RH_displayPremium;str;payment_freq')");
			}
			else
			{
				LPF_RH_displayPremium(params[1],params[2]);
			}
			break;	

		/***************************************************************************************************************
		* Function			: LPF_RH_prtPlanStr(plan, lang)
		* Description		: Return the plan description
		* Parameter Usage	: plan: plan value
		* 						: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_prtPlanStr":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_prtPlanStr - LocalPredefinedFunction('LPF_RH_prtPlanStr;plan;lang')");
			}
			else
			{
				LPF_RH_prtPlanStr(params[1],params[2]);
			}
			break;
			
		/***************************************************************************************************************
		* Function			: LPF_RH_prtQuoteResult(lang)
		* Description		: Retrieve values from hidden form and display in the Quote Result page
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_prtQuoteResult":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_RH_prtQuoteResult - LocalPredefinedFunction('LPF_RH_prtQuoteResult;lang')");
			}
			else
			{
				LPF_RH_prtQuoteResult(params[1]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_RH_validateAppl(formname, lang)
		* Description		: Validate the form object
		* Parameter Usage	: formname: name of the form object to be validated
		*			 			: lang: language to displayed error messages (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_validateAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_validateAppl - LocalPredefinedFunction('LPF_RH_validateAppl;formname;lang')");
			}
			else
			{
				LPF_RH_validateAppl(params[1],params[2]);
			}
			break;	
			
		/***************************************************************************************************************
		* Function			: LPF_RH_submitAppl(formname, lang)
		* Description		: Submit all relevant values to the webform
		* Parameter Usage	: formname: name of the form object to be submitted
								: lang: language to be used to display error message (en/zh)
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_submitAppl":
			if(params.length!=3)
			{
				alert("Invalid parameters for LPF_RH_submitAppl - LocalPredefinedFunction('LPF_RH_submitAppl;formname;lang')");
			}
			else
			{
				LPF_RH_submitAppl(params[1],params[2]);
			}
			break;			

		/***************************************************************************************************************
		* Function			: LPF_RH_displayvalue()
		* Description		: replace &apos; with "'"
		* Parameter Usage	: index1, index2, index3 - indices to retrieve corresponding value
		*	 					
		* Location			: /hk/personal/insur/refhospital/js/refhospital.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_RH_displayValue":
			LPF_RH_displayValue(params[1],params[2],params[3]);
			break;		
		// END: For Refundable HospitalSurance	
		
		/***************************************************************************************************************
		* Function			: LPF_removePrecedingZero(str)
		* Description		: Remove the preceding zero of a day and month field
		* Parameter Usage	: str: string containing preceding zero
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_removePrecedingZero":
			if(params.length!=2)
			{
				alert("Invalid parameters for LPF_removePrecedingZero - LocalPredefinedFunction('LPF_removePrecedingZero;str')");
			}
			else
			{
				LPF_removePrecedingZero(params[1]);
			}
			break;

			
		/***************************************************************************************************************
		* Function			: LPF_prtDateFormat(dd, mm, yy, lang)
		* Description		: Print out date format - dd/mm/yyyy
		* Parameter Usage	: lang: language to be displayed (en/zh)
		* Location			: /hk/personal/insur/common/js/inscommon.js
		* Author				: elight Solutions Limited
		* Creation Date	: 1 May 2006
		* Side effect		: N/A
		* Amendment History	:
		* Date		By					Description
		* ---------	------------	--------------------------------------------------------------------------------
		***************************************************************************************************************/
		case "LPF_prtDateFormat":
			if(params.length!=5)
			{
				alert("Invalid parameters for LPF_prtDateFormat - LocalPredefinedFunction('LPF_prtDateFormat;dd;mm;yy;lang')");
			}
			else
			{
				LPF_prtDateFormat(params[1],params[2],params[3],params[4]);
			}
			break;

		//Missing function name or Javascript function not found
		default:
			if (params.length < 1)
			{
				alert("Missing function name.");
			}
			else
			{
				alert("Function name: " + params[0] + " not found.");
			}
			break;	
			/***************************************************************************************************************
* Function			: LPF_randomAMHImage(imgArrayStr)
* Description		: HK Homepage random banner
* Parameter Usage	:	imgArrayStr - in the format of "imgSrc1,altText1,link1,imgSrc2,altText2,link2..."
*										where	imgSrc1, imgSrc2 ... 		= image path
*													altText1, altText2 ... 	= image's alt text
*													link1, link2 ...				= destination of the image. If link1="", no hyperlink
*																										will be assigned to that image
* Location			: /hk/personal/common/js/pfscommon.js
* Author				: Lau Ching Yee, Katie
* Creation Date	: 1 June 2006
* Side effect		: N/A
* Amendment History:
* Date		By					Description
* ---------	------------	--------------------------------------------------------------------------------
***************************************************************************************************************/
case "LPF_randomAMHImage":

	if(params.length != 2) {
		alert("Invalid parameters for LPF_randomAMHImage!\nIt must be in format of imgSrc1,altText1,link1,imgSrc2,altText2,link2...");
	}
	else
	{
		LPF_randomAMHImage(params[1]);
	}
	break;	

	}
}

-->