	// ===============================================================
	// Global Var
	// ===============================================================
	
	// Edit Handler
	// _______________________________________________________________________
	var EDIT_HANDLER = function(){};	
	EDIT_HANDLER.REF_IS_MODIFIED = false;
	EDIT_HANDLER.HAS_NEWLY_SAVED_DATA = false;
	var PROPERTY_PARENT_ID = 0;
	var PROPERTY_PARENT_DESCRIPTION = "";
	
	
	// Cache
	// _______________________________________________________________________
	var PROPERTY_ACC_BFIP_ID = -1;
	var PROPERTY_EDIT_MODE = false;
	var PROPERTY_EDIT_ROW_INDEX = -1;
	var INPUT_INSTANCE = null;
	
	
	// Buttons [Optional]
	// _______________________________________________________________________
	var ADD_BBI = null;
	var SAVE_BBI = null;
	var DELETE_BBI = null;
	var CANCEL_BBI = null;
	var NAVIGATION_BACK_BBI = null;
	
	
	// Dialog Controls [Optional]
	// _______________________________________________________________________
	var ACC_BFIP_IP_TXT = null;
	var ACC_BFIP_DESCRIPTION_TXT = null;
	var ACC_BFIP_FAIL_COUNT_TXT = null;
	var ACC_BFIP_LOCK_COUNT_TXT = null;
	var ACC_BFIP_SUCCESS_COUNT_TXT = null;
	var ACC_BFIP_STATUS_CMB = null;
	var PARAM_ACC_BFIP_ID_FILE_FP = null;
	
	
	// DGV Controls
	// _______________________________________________________________________
	var BFIP_DGV = null;


	// ===============================================================
	// Initialize Controls
	// ===============================================================     
	function FORM_INITIALIZE()
	{
		// Load Cache Parent Data [Add Redirects if this is a required data.]
		// ...........................................
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_ID_BFIP"))
		{
			PROPERTY_PARENT_ID = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_ID_BFIP");
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS];
			//window.close();
		}
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_DESCRIPTION_BFIP"))
		{
			PROPERTY_PARENT_DESCRIPTION = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_DESCRIPTION_BFIP");
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_PARENT_DESCRIPTION_TXT") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_PARENT_DESCRIPTION_TXT", PROPERTY_PARENT_DESCRIPTION);			
			}
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_PARENT_DESCRIPTION_LBL") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_PARENT_DESCRIPTION_LBL", PROPERTY_PARENT_DESCRIPTION);			
			}
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_TITLE_LBL") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_TITLE_LBL", JSOC_ELEMENT.VAR_VALUE("PAGE_TITLE_LBL") + " : " + PROPERTY_PARENT_DESCRIPTION);	
			}
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS];	
		}
	
		// Restore Cache on reload
		// ...........................................	
		if
		(
			JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_ID_BFIP") || 
			JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_DESCRIPTION_BFIP")
		)
		{
			  window.onbeforeunload = function(event)
			  {
					// Get Current Root path
					var CURRENT_ROOT_PATH = JSCUS_CACHE.ROOT_PATH + JSVC_STR.VAR_MID(JSVC_STR.VAR_DLEFT(JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS], JSCUS_CACHE.SERVER_URL.length), 1, 1);
				
					// Cache Primary Key
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_ID_BFIP', 
						PROPERTY_PARENT_ID, 
						5, 
						CURRENT_ROOT_PATH
					);
					
					// Cache Description
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_DESCRIPTION_BFIP', 
						PROPERTY_PARENT_DESCRIPTION, 
						5, 
						CURRENT_ROOT_PATH
					);
			  };
		}
		
 		// Cache Class Properties
		// ...........................................
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_ACC_BFIP_ID"))
		{
			PROPERTY_ACC_BFIP_ID = JSVC_COOKIE.VAR_READ("PROPERTY_ACC_BFIP_ID");
		}	
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_EDIT_MODE"))
		{
			PROPERTY_EDIT_MODE = JSVC_COOKIE.VAR_READ("PROPERTY_ACC_BFIP_ID");
		}
	
		// Initialize: Modals
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("BFIP_MODAL") == true)
		{
			// Display Modal
			JSOC_DIALOG.VAR_MODAL("BFIP_MODAL", false);
		}
				
		// Initialize: Ribbon Buttons
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ADD_BBI"))
		{
    		ADD_BBI = JSOC_ELEMENT.VAR_GET("ADD_BBI");     	
			
			// Add OnClick event [Show Modal]
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("BFIP_MODAL"))
			{
				ADD_BBI.onclick = 
					function()
					{		
						// Display Modal
						PROPERTY_ACC_BFIP_ID = FLAG_BIGINT_NULL;
						PROPERTY_EDIT_ROW_INDEX = -1;
						
						if(JSVC_VAR.VAR_ISSET(INPUT_INSTANCE))
						{
							JSOC_WINDOW.VAR_INPUT_INSTANCE_RESTORE(INPUT_INSTANCE);
						}
						JSOC_DIALOG.VAR_MODAL("BFIP_MODAL", true);
					}		
			}
			// Add OnClick event [Show Add/Edit Page]
			else
			{
				
			}
		}	
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SAVE_BBI"))
		{
    		SAVE_BBI = JSOC_ELEMENT.VAR_GET("SAVE_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_SAVE))
			{
				// Prepare Save callback
				var CALLBACK_HANDLER = 
					function(IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							return;
						}
					
						// Show record saved messageBox
						JSVC_INFO.VAR_RECORD_SAVED('');
					}
				
				// Add OnClick event
				SAVE_BBI.onclick = 
					function()
					{
						HTTP_SAVE(CALLBACK_HANDLER);
					}
			}
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CANCEL_BBI"))
		{
    		CANCEL_BBI = JSOC_ELEMENT.VAR_GET("CANCEL_BBI");      		
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("NAVIGATION_BACK_BBI"))
		{
    		NAVIGATION_BACK_BBI = JSOC_ELEMENT.VAR_GET("NAVIGATION_BACK_BBI");  
			
			// Add OnClick event
			NAVIGATION_BACK_BBI.onclick = 
				function()
				{
				}		
		}
		
		
		// Prepare onChange event
		// ...........................................
		var ON_CHANGE_EVENT = '';
		
		
		// Initialize: Input Controls
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_IP_TXT"))
		{
			ACC_BFIP_IP_TXT = JSOC_ELEMENT.VAR_GET("ACC_BFIP_IP_TXT");      
			ACC_BFIP_IP_TXT.onchange = 
				function()
				{
					if(ACC_BFIP_IP_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_IP_TXT.onkeypress = function(){ACC_BFIP_IP_TXT.onchange();};
			ACC_BFIP_IP_TXT.onpaste = function(){ACC_BFIP_IP_TXT.onchange();};
			ACC_BFIP_IP_TXT.oninput = function(){ACC_BFIP_IP_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_DESCRIPTION_TXT"))
		{
			ACC_BFIP_DESCRIPTION_TXT = JSOC_ELEMENT.VAR_GET("ACC_BFIP_DESCRIPTION_TXT");      
			ACC_BFIP_DESCRIPTION_TXT.onchange = 
				function()
				{
					if(ACC_BFIP_DESCRIPTION_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_DESCRIPTION_TXT.onkeypress = function(){ACC_BFIP_DESCRIPTION_TXT.onchange();};
			ACC_BFIP_DESCRIPTION_TXT.onpaste = function(){ACC_BFIP_DESCRIPTION_TXT.onchange();};
			ACC_BFIP_DESCRIPTION_TXT.oninput = function(){ACC_BFIP_DESCRIPTION_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_FAIL_COUNT_TXT"))
		{
			ACC_BFIP_FAIL_COUNT_TXT = JSOC_ELEMENT.VAR_GET("ACC_BFIP_FAIL_COUNT_TXT");      
			ACC_BFIP_FAIL_COUNT_TXT.onchange = 
				function()
				{
					if(ACC_BFIP_FAIL_COUNT_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_FAIL_COUNT_TXT.onkeypress = function(){ACC_BFIP_FAIL_COUNT_TXT.onchange();};
			ACC_BFIP_FAIL_COUNT_TXT.onpaste = function(){ACC_BFIP_FAIL_COUNT_TXT.onchange();};
			ACC_BFIP_FAIL_COUNT_TXT.oninput = function(){ACC_BFIP_FAIL_COUNT_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_LOCK_COUNT_TXT"))
		{
			ACC_BFIP_LOCK_COUNT_TXT = JSOC_ELEMENT.VAR_GET("ACC_BFIP_LOCK_COUNT_TXT");      
			ACC_BFIP_LOCK_COUNT_TXT.onchange = 
				function()
				{
					if(ACC_BFIP_LOCK_COUNT_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_LOCK_COUNT_TXT.onkeypress = function(){ACC_BFIP_LOCK_COUNT_TXT.onchange();};
			ACC_BFIP_LOCK_COUNT_TXT.onpaste = function(){ACC_BFIP_LOCK_COUNT_TXT.onchange();};
			ACC_BFIP_LOCK_COUNT_TXT.oninput = function(){ACC_BFIP_LOCK_COUNT_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_SUCCESS_COUNT_TXT"))
		{
			ACC_BFIP_SUCCESS_COUNT_TXT = JSOC_ELEMENT.VAR_GET("ACC_BFIP_SUCCESS_COUNT_TXT");      
			ACC_BFIP_SUCCESS_COUNT_TXT.onchange = 
				function()
				{
					if(ACC_BFIP_SUCCESS_COUNT_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_SUCCESS_COUNT_TXT.onkeypress = function(){ACC_BFIP_SUCCESS_COUNT_TXT.onchange();};
			ACC_BFIP_SUCCESS_COUNT_TXT.onpaste = function(){ACC_BFIP_SUCCESS_COUNT_TXT.onchange();};
			ACC_BFIP_SUCCESS_COUNT_TXT.oninput = function(){ACC_BFIP_SUCCESS_COUNT_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_BFIP_STATUS_CMB"))
		{
			ACC_BFIP_STATUS_CMB = JSOC_ELEMENT.VAR_GET("ACC_BFIP_STATUS_CMB");      	
			ACC_BFIP_STATUS_CMB.onchange = 
				function()
				{
					if(ACC_BFIP_STATUS_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_BFIP_STATUS_CMB.onkeypress = function(){ACC_BFIP_STATUS_CMB.onchange();};
			ACC_BFIP_STATUS_CMB.onpaste = function(){ACC_BFIP_STATUS_CMB.onchange();};
			ACC_BFIP_STATUS_CMB.oninput = function(){ACC_BFIP_STATUS_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PARAM_ACC_BFIP_ID_FILE_FP"))
		{
			PARAM_ACC_BFIP_ID_FILE_FP = JSOC_ELEMENT.VAR_GET("PARAM_ACC_BFIP_ID_FILE_FP");
		}
				
		
		// Initialize: Default Settings
		// ...........................................
		// FORM_PREPARE_DEFAULT_SETTINGS();   	
	}