function updateOrder(strIDs, strType) 
{
	$.post('./js/php/updateOrder.php', {ids:strIDs,type:strType});
}

$(document).ready(function() {
	$('select[ref="assign-writer"]').change(function() {
		$.post('/assign_writers.php', {writer:$(this).val()});
		alert('Writer Updated!');
	});
	
	$('select[ref="assign-coach"]').change(function() {
		$.post('/assign_writers.php', {coach:$(this).val()});
		alert('Coach Updated!');
	});
	
	$('select[ref="status"]').change(function() {
		var intOrderID = $(this).parent().parent().find('[name="id"]').val();

		$.post('/scripts/update_status.php', {status:$(this).val(), id:intOrderID});
		alert('Order Status Updated!');
	});
	
	$('input[ref="accept"]').click(function() {
		$.post('/assign_writers.php', {accept_time: $('input[name="accept"]').val()});
		alert('Allowed Acceptance Time Updated');
	});
});

