	// ===============================================================
	// 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_TRAIL_ID = null;
	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;
	
	// Dialog Controls [Optional]
	// _______________________________________________________________________
	var ACC_TRAIL_REQUEST_IP_ADDRESS_TXT = null;
	var ACC_TRAIL_SYS_METHOD_ID_CMB = null;
	var ACC_TRAIL_ACC_DEVICE_ID_CMB = null;
	var ACC_TRAIL_ACC_ACCOUNT_ID_CMB = null;
	var ACC_TRAIL_PROXY_USER_CMB = null;
	var ACC_TRAIL_ACC_SERVER_ID_CMB = null;
	var ACC_TRAIL_SYS_MODULE_ID_CMB = null;
	var ACC_TRAIL_TARGET_ID_TXT = null;
	var ACC_TRAIL_TARGET_SERVER_ID_TXT = null;
	var ACC_TRAIL_DESCRIPTION_TXT = null;
	var ACC_TRAIL_PARAMETERS_TXT = null;
	var ACC_TRAIL_TIMESTAMP_DTP = null;
	var ACC_TRAIL_UNIQUE_SESSION_ID_TXT = null;
	
	
	// DGV Controls
	// _______________________________________________________________________
	var AUDIT_TRAIL_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"))
		{
			PROPERTY_PARENT_ID = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_ID");
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL;
			//window.close();
		}
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_DESCRIPTION"))
		{
			PROPERTY_PARENT_DESCRIPTION = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_DESCRIPTION");
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_PROJECT_DESCRIPTION_TXT") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("REC_PROJECT_DESCRIPTION_TXT", PROPERTY_PARENT_DESCRIPTION);			
			}
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_PROJECT_DESCRIPTION_LBL") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("REC_PROJECT_DESCRIPTION_LBL", PROPERTY_PARENT_DESCRIPTION);			
			}
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL;	
		}
		
 		// Cache Class Properties
		// ...........................................
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_ACC_TRAIL_ID"))
		{
			PROPERTY_ACC_TRAIL_ID = JSVC_COOKIE.VAR_READ("PROPERTY_ACC_TRAIL_ID");
		}	
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_EDIT_MODE"))
		{
			PROPERTY_EDIT_MODE = JSVC_COOKIE.VAR_READ("PROPERTY_ACC_TRAIL_ID");
		}
	
		// Initialize: Modals
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("AUDIT_TRAIL_MODAL") == true)
		{
			// Display Modal
			JSOC_DIALOG.VAR_MODAL("AUDIT_TRAIL_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("AUDIT_TRAIL_MODAL"))
			{
				ADD_BBI.onclick = 
					function()
					{		
						// Display Modal
						PROPERTY_ACC_TRAIL_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("AUDIT_TRAIL_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");      		
		}
		
		
		// Prepare onChange event
		// ...........................................
		var ON_CHANGE_EVENT = '';
		
		
		// Initialize: Input Controls
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_REQUEST_IP_ADDRESS_TXT"))
		{
			ACC_TRAIL_REQUEST_IP_ADDRESS_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_REQUEST_IP_ADDRESS_TXT");      
			ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onkeypress = function(){ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onchange();};
			ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onpaste = function(){ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onchange();};
			ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.oninput = function(){ACC_TRAIL_REQUEST_IP_ADDRESS_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_SYS_METHOD_ID_CMB"))
		{
			ACC_TRAIL_SYS_METHOD_ID_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_SYS_METHOD_ID_CMB");      	
			ACC_TRAIL_SYS_METHOD_ID_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_SYS_METHOD_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_SYS_METHOD_ID_CMB.onkeypress = function(){ACC_TRAIL_SYS_METHOD_ID_CMB.onchange();};
			ACC_TRAIL_SYS_METHOD_ID_CMB.onpaste = function(){ACC_TRAIL_SYS_METHOD_ID_CMB.onchange();};
			ACC_TRAIL_SYS_METHOD_ID_CMB.oninput = function(){ACC_TRAIL_SYS_METHOD_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_ACC_DEVICE_ID_CMB"))
		{
			ACC_TRAIL_ACC_DEVICE_ID_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_ACC_DEVICE_ID_CMB");      	
			ACC_TRAIL_ACC_DEVICE_ID_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_ACC_DEVICE_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_ACC_DEVICE_ID_CMB.onkeypress = function(){ACC_TRAIL_ACC_DEVICE_ID_CMB.onchange();};
			ACC_TRAIL_ACC_DEVICE_ID_CMB.onpaste = function(){ACC_TRAIL_ACC_DEVICE_ID_CMB.onchange();};
			ACC_TRAIL_ACC_DEVICE_ID_CMB.oninput = function(){ACC_TRAIL_ACC_DEVICE_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_ACC_ACCOUNT_ID_CMB"))
		{
			ACC_TRAIL_ACC_ACCOUNT_ID_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_ACC_ACCOUNT_ID_CMB");      	
			ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_ACC_ACCOUNT_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onkeypress = function(){ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onchange();};
			ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onpaste = function(){ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onchange();};
			ACC_TRAIL_ACC_ACCOUNT_ID_CMB.oninput = function(){ACC_TRAIL_ACC_ACCOUNT_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_PROXY_USER_CMB"))
		{
			ACC_TRAIL_PROXY_USER_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_PROXY_USER_CMB");      	
			ACC_TRAIL_PROXY_USER_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_PROXY_USER_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_PROXY_USER_CMB.onkeypress = function(){ACC_TRAIL_PROXY_USER_CMB.onchange();};
			ACC_TRAIL_PROXY_USER_CMB.onpaste = function(){ACC_TRAIL_PROXY_USER_CMB.onchange();};
			ACC_TRAIL_PROXY_USER_CMB.oninput = function(){ACC_TRAIL_PROXY_USER_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_ACC_SERVER_ID_CMB"))
		{
			ACC_TRAIL_ACC_SERVER_ID_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_ACC_SERVER_ID_CMB");      	
			ACC_TRAIL_ACC_SERVER_ID_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_ACC_SERVER_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_ACC_SERVER_ID_CMB.onkeypress = function(){ACC_TRAIL_ACC_SERVER_ID_CMB.onchange();};
			ACC_TRAIL_ACC_SERVER_ID_CMB.onpaste = function(){ACC_TRAIL_ACC_SERVER_ID_CMB.onchange();};
			ACC_TRAIL_ACC_SERVER_ID_CMB.oninput = function(){ACC_TRAIL_ACC_SERVER_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_SYS_MODULE_ID_CMB"))
		{
			ACC_TRAIL_SYS_MODULE_ID_CMB = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_SYS_MODULE_ID_CMB");      	
			ACC_TRAIL_SYS_MODULE_ID_CMB.onchange = 
				function()
				{
					if(ACC_TRAIL_SYS_MODULE_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_SYS_MODULE_ID_CMB.onkeypress = function(){ACC_TRAIL_SYS_MODULE_ID_CMB.onchange();};
			ACC_TRAIL_SYS_MODULE_ID_CMB.onpaste = function(){ACC_TRAIL_SYS_MODULE_ID_CMB.onchange();};
			ACC_TRAIL_SYS_MODULE_ID_CMB.oninput = function(){ACC_TRAIL_SYS_MODULE_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_TARGET_ID_TXT"))
		{
			ACC_TRAIL_TARGET_ID_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_TARGET_ID_TXT");      
			ACC_TRAIL_TARGET_ID_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_TARGET_ID_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_TARGET_ID_TXT.onkeypress = function(){ACC_TRAIL_TARGET_ID_TXT.onchange();};
			ACC_TRAIL_TARGET_ID_TXT.onpaste = function(){ACC_TRAIL_TARGET_ID_TXT.onchange();};
			ACC_TRAIL_TARGET_ID_TXT.oninput = function(){ACC_TRAIL_TARGET_ID_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_TARGET_SERVER_ID_TXT"))
		{
			ACC_TRAIL_TARGET_SERVER_ID_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_TARGET_SERVER_ID_TXT");      
			ACC_TRAIL_TARGET_SERVER_ID_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_TARGET_SERVER_ID_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_TARGET_SERVER_ID_TXT.onkeypress = function(){ACC_TRAIL_TARGET_SERVER_ID_TXT.onchange();};
			ACC_TRAIL_TARGET_SERVER_ID_TXT.onpaste = function(){ACC_TRAIL_TARGET_SERVER_ID_TXT.onchange();};
			ACC_TRAIL_TARGET_SERVER_ID_TXT.oninput = function(){ACC_TRAIL_TARGET_SERVER_ID_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_DESCRIPTION_TXT"))
		{
			ACC_TRAIL_DESCRIPTION_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_DESCRIPTION_TXT");      
			ACC_TRAIL_DESCRIPTION_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_DESCRIPTION_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_DESCRIPTION_TXT.onkeypress = function(){ACC_TRAIL_DESCRIPTION_TXT.onchange();};
			ACC_TRAIL_DESCRIPTION_TXT.onpaste = function(){ACC_TRAIL_DESCRIPTION_TXT.onchange();};
			ACC_TRAIL_DESCRIPTION_TXT.oninput = function(){ACC_TRAIL_DESCRIPTION_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_PARAMETERS_TXT"))
		{
			ACC_TRAIL_PARAMETERS_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_PARAMETERS_TXT");      
			ACC_TRAIL_PARAMETERS_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_PARAMETERS_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_PARAMETERS_TXT.onkeypress = function(){ACC_TRAIL_PARAMETERS_TXT.onchange();};
			ACC_TRAIL_PARAMETERS_TXT.onpaste = function(){ACC_TRAIL_PARAMETERS_TXT.onchange();};
			ACC_TRAIL_PARAMETERS_TXT.oninput = function(){ACC_TRAIL_PARAMETERS_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_TIMESTAMP_DTP"))
		{
			ACC_TRAIL_TIMESTAMP_DTP = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_TIMESTAMP_DTP");   
			JSOC_ELEMENT.VAR_VALUE(ACC_TRAIL_TIMESTAMP_DTP, JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD"));
			ACC_TRAIL_TIMESTAMP_DTP.onchange = 
				function()
				{
					if(ACC_TRAIL_TIMESTAMP_DTP.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_TIMESTAMP_DTP.onkeypress = function(){ACC_TRAIL_TIMESTAMP_DTP.onchange();};
			ACC_TRAIL_TIMESTAMP_DTP.onpaste = function(){ACC_TRAIL_TIMESTAMP_DTP.onchange();};
			ACC_TRAIL_TIMESTAMP_DTP.oninput = function(){ACC_TRAIL_TIMESTAMP_DTP.onchange();};					
		}
		
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_ACC_TRAIL_TIMESTAMP_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_ACC_TRAIL_TIMESTAMP_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD"));
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_ACC_TRAIL_TIMESTAMP_FROM_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_ACC_TRAIL_TIMESTAMP_FROM_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD"));
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_ACC_TRAIL_TIMESTAMP_TO_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_ACC_TRAIL_TIMESTAMP_TO_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD"));
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ACC_TRAIL_UNIQUE_SESSION_ID_TXT"))
		{
			ACC_TRAIL_UNIQUE_SESSION_ID_TXT = JSOC_ELEMENT.VAR_GET("ACC_TRAIL_UNIQUE_SESSION_ID_TXT");      
			ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onchange = 
				function()
				{
					if(ACC_TRAIL_UNIQUE_SESSION_ID_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onkeypress = function(){ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onchange();};
			ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onpaste = function(){ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onchange();};
			ACC_TRAIL_UNIQUE_SESSION_ID_TXT.oninput = function(){ACC_TRAIL_UNIQUE_SESSION_ID_TXT.onchange();};
		}
		
		
		// Initialize: Default Settings
		// ...........................................
		// FORM_PREPARE_DEFAULT_SETTINGS();   	
	}