orders and some javascript