// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function calculateSubtotal(id) {
	var prod_elem = "p_qty_" + id;
	var empty_elem = "e_qty_" + id;
	var prod_qty = document.getElementById(prod_elem).value;
	var empty_qty = document.getElementById(empty_elem).value;
	new Ajax.Request('/orders/calculate_prices', {method: 'post', parameters:'id=' + id + "&prod_qty=" + prod_qty + "&empty_qty=" + empty_qty});
}

function getuser(index) {
	new Ajax.Request("/admin/orders/" + index + "/get_user", {method: 'post'});
}