function post_new_category(values) {
	var the_url = document_root+"categories/?"+Math.random();
	var is_ok = false;
	$.ajax({type:"POST", url:the_url, contentType:"application/json", dataType:"json", async: false,
		data: values,
		success: function(data) {
				is_ok = true;
		}
	});
	return is_ok;
}

function post_update_category(id,values) {
	var the_url = document_root+"categories/?category="+id+"&"+Math.random();
	var is_ok = false;
	$.ajax({type:"POST", url:the_url, contentType:"application/json", dataType:"json", async: false,
		data: values,
		success: function(data) {
				is_ok = true;
		}
	});
	return is_ok;
}

function post_new_product(values) {
	var the_url = document_root+"products/?"+Math.random();
	var is_ok = false;
	$.ajax({type:"POST", url:the_url, contentType:"application/json", dataType:"json", async: false,
		data: values,
		success: function(data) {
				is_ok = true;
		}
	});
	return is_ok;
}

function post_update_product(id,values) {
	var the_url = document_root+"products/?product="+id+"&"+Math.random();
	var is_ok = false;
	$.ajax({type:"POST", url:the_url, contentType:"application/json", dataType:"json", async: false,
		data: values,
		success: function(data) {
				is_ok = true;
		}
	});
	return is_ok;
}

function post_new_measure(id,values) {
	var the_url = document_root+"products/?product="+id+"&measures&"+Math.random();
	var is_ok = false;
	$.ajax({type:"POST", url:the_url, contentType:"application/json", dataType:"json", async: false,
		data: values,
		success: function(data) {
				is_ok = true;
		}
	});
	return is_ok;
}
