<!--
function remit_history_action(mode,id)
{
	if (mode == 'select_all')
	{
		index_select_all();	
		// Add selected amounts
		remit_calculate();
		return;
	}
	if (mode == 'calculate')
	{
		// Add selected amounts
		remit_calculate();
		return;
	}
	if (mode == 'close')
	{
		ajax_showdiv('div_load_remit_history');
		index_location('t_account', 'remit', 'summary', id);
		return;
	}
}

function remit_calculate()
{
	var item_count = 0;
	var item_string_id = '';
	var item_string_val = '';
	var item_total = 0;
	for (var i=1; i<document.forms[0].elements.length; i++) 
	{
		// Look for all matches
		if (document.forms[0].elements[i].type == "checkbox")
		{
			if (document.forms[0].elements[i].name == "checkbox_id[]")
			{
				if (document.forms[0].elements[i].checked == true)
				{
					var temp_id = document.forms[0].elements[i].value;
					var temp_val = document.getElementById('payment_amount_' + temp_id).value;
					item_total = parseFloat(item_total) + parseFloat(temp_val);
					item_count++;
				}
			}
		}
	}
	document.getElementById('remit_history_total').innerHTML = parseFloat(item_total).toFixed(2);
}

function remit_history_validate()
{
//	if (!isEmpty('remit_reference', 'Please enter a \'Payment Reference\''))
//		return false;

	// All Good.
	return true;
}

function remit_history_highlight()
{
/*
	if (document.getElementById('remit_ref').value == '')
		index_bg_color('remit_ref','#99FF99');
	else
		index_bg_color('remit_ref','#FFFFFF');	
*/
}

function remit_history_format(x_id)
{
//	index_conv_dec('remit_amount','2');
}

function remit_history_onload(id)
{
	if ((id == 'insert')  || (id == 'edit') || (id == 'view'))
	{
		ajax_showpopup('div_popup_1','div_result');
	}
	remit_history_highlight();
	remit_history_format();
}

-->
