


	var PROPERTY_REC_JORDER_ID = 0;
	var PROPERTY_REC_JORDER_CODE = '';


	var JOB_ORDER_DGV = null;
	var JOB_ORDER_TASK_DELIVER_DGV = null;
	var JOB_ORDER_TASK_RETURN_DGV = null;

	var SAVE_BBI = null;
	var COMPLETION_BBI = null;
	var CANCEL_BBI = null;
	var SEARCH_BBI = null;

	function FORM_INITIALIZE()
	{
		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('');

						HTTP_SEARCH();
					}
				
				// Add OnClick event
				SAVE_BBI.onclick = 
					function()
					{
						HTTP_SAVE(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("COMPLETION_BBI"))
		{
    		COMPLETION_BBI = JSOC_ELEMENT.VAR_GET("COMPLETION_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_COMPLETE))
			{
				// 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('');

						HTTP_SEARCH();
					}
				
				// Add OnClick event
				COMPLETION_BBI.onclick = 
					function()
					{
						HTTP_COMPLETE(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CANCEL_BBI"))
		{
    		CANCEL_BBI = JSOC_ELEMENT.VAR_GET("CANCEL_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_CANCEL))
			{
				// 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('');

						HTTP_SEARCH();
					}
				
				// Add OnClick event
				CANCEL_BBI.onclick = 
					function()
					{
						HTTP_CANCEL(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_BBI"))
		{
			SEARCH_BBI = JSOC_ELEMENT.VAR_GET("SEARCH_BBI");
			SEARCH_BBI.onclick = function(){HTTP_SEARCH()};
		}
	}