<!--
function ad_other_detail_button(x_button)
{
	if (x_button == 'save_step_1')
	{
		// Ensure that all required fields have been completed...
		if(!ad_other_detail_validate_step_1())
			return false;
	
		var qry = 'modules/ad/ad_other_detail.php';
		qry += '?mode='						+ 'update_step_1';
		qry += '&step_no='					+ '2';

		qry += '&stock_id='					+ document.getElementById('stock_id').value;
		qry += '&stock_sale_type_id='		+ document.getElementById('stock_sale_type_id').value;
		qry += '&stock_quantity='			+ document.getElementById('stock_quantity').value;
		qry += '&stock_price='				+ document.getElementById('stock_price').value;
		qry += '&stock_price_type_id='		+ index_getRadioButtonValue(document.forms[0].stock_price_type_id);
		qry += '&stock_location_id='		+ document.getElementById('stock_location_id').value;
		qry += '&stock_description='		+ document.getElementById('stock_description').value;
		qry += '&stock_user_name='			+ document.getElementById('stock_user_name').value;
		qry += '&stock_user_suburb='		+ document.getElementById('stock_user_suburb').value;
		qry += '&stock_user_location='		+ document.getElementById('stock_user_location').value;
		qry += '&stock_user_phone='			+ document.getElementById('stock_user_phone').value;
		qry += '&stock_user_email='			+ document.getElementById('stock_user_email').value;
		qry += '&stock_property='			+ document.getElementById('stock_property').value;
		qry += '&stock_other='				+ document.getElementById('stock_other').value;
		qry += '&stock_delivery_point='		+ document.getElementById('stock_delivery_point').value;
		qry += '&stock_delivery_day='		+ document.getElementById('stock_delivery_day').value;
		qry += '&stock_delivery_month='		+ document.getElementById('stock_delivery_month').value;
		qry += '&stock_delivery_year='		+ document.getElementById('stock_delivery_year').value;

		qry += '&other_breed='				+ document.getElementById('other_breed').value;
		qry += '&other_sex_id='				+ document.getElementById('other_sex_id').value;

		ajaxFunction(qry,'ajax_body');
	
		return false;
	}
	if (x_button == 'save_step_2')
	{
		// Ensure that all required fields have been completed...
		if(!ad_other_detail_validate_step_2())
			return false;
	
		var qry = 'modules/ad/ad_other_detail.php';
		qry += '?mode='						+ 'update_step_2';
		qry += '&step_no='					+ '3';
		qry += '&stock_id='					+ document.getElementById('stock_id').value;

		ajaxFunction(qry,'ajax_body');
		return false;
	}
	if (x_button == 'save_step_3')
	{
		// Ensure that all required fields have been completed...
		if(!ad_other_detail_validate_step_3())
			return false;
	
		var qry = 'modules/ad/ad_other_detail.php';
		qry += '?mode='						+ 'update_step_3';
		qry += '&step_no='					+ '4';
		qry += '&stock_id='					+ document.getElementById('stock_id').value;

		// Step 3 - Payment
		qry += '&stock_status_id='			+ document.getElementById('stock_status_id').value;
		ajaxFunction(qry,'ajax_body');
		return false;
	}
}

function ad_other_detail_validate_step_1()
{
	// General	
	if (!isSelected('stock_sale_type_id', 'Please select a Sale Type'))
		return false;

	if (!isEmpty('other_breed', 'Please Enter a Breed'))
		return false;

	if (!isSelected('other_sex_id', 'Please select a Sex'))
		return false;

	if (!isNumeric('stock_quantity', 'Please enter a valid Quantity\n(Numbers only)'))
		return false;

	if (!isNumeric('stock_price', 'Please enter a Price\n(Numbers only)'))
		return false;

	if (!isSelected('stock_location_id', 'Please select a Location'))
		return false;

	// All Good
	return true;
}
function ad_other_detail_validate_step_2()
{
	// All Good
	return true;
}
function ad_other_detail_validate_step_3()
{
	// All Good
	return true;
}
-->