Funcion Assignment

Here are some programs that work with payroll and functions:
Fall2013asgn1.html
Fall2013asgn2.html
Fall2013asgn2a.html

Problem #1: I want you to take the payroll function problems above and modify one of them to do the code in the same way that I did the code in this example - I am looking for the way I assigned the answer in the click and then the function returned the msg to fill the answer. passfuncF13return.html

Problem #2: Modify one of the payroll function examples so it handles the onclick event the way I did in this example.
passfuncF11bx.html

Problem #3: I want you to write an inventory problem where you take in on hand, on order and reorder point and number to order using text boxes on a form. I want you to have a button to click and its corresponding toclock event should perform a function that adds on hand and on order and does an if to see if it is less than or equal to the reorder point. If it is then should display the difference between the sum of on hand and on order and the reorder point. If it is not it should display 0 indicating that nothing needs to be ordered.
For example lets say onhand is 5 and on order is 25 and the reorder point is 50. 5 and 25 equal 30 which is less than the reorder point. We calculate the number to order by saying 50 - 30 is 20 so 20 should be put in the number to order text box.
For example lets say onhand is 20 and on order is 40 and the reorder point is 50. 20 and 40 equal 60 which is greater than the reorder point so nothing needs to be order and 0 is displayed in the number to order text box.