Hi Guys
for starters im glad that this site exists, ive just had a bit of a browse through and i found theres alot of resources on here for beginner web designers like me. i however have stumbled upon a very difficult set of questions and i would like to pose them here to see if i may get some help with....

1. Write a JavaScript code that calculates the factorial of the numbers 1-12.
Note: Factorial equation/formula is: N! = N (N-1)(N-2)(N-3)…..(3)(2)(1)

2. An online bank wishes you to write a piece of web-based solution that allows
customers to pay their utility bills online. To create this application, use the following
advices:
a. Create an XHTML web interface/form called payment.html that is laid out correctly,
with a sensible title and that contains components for the following data
(1) First Name,
(2) Last Name,
(3) Telephone Number
(4) Email address,
(5) Account number
(6) Utility company:
i Gas
ii Electricity
iii Water
(7) Amount to pay
(8) Payment method
i Visa Card (10% charge)
ii Debit Card (7% discount)
iii Master Card (9.5% charge)
(9) A Pay & Finish button
(10)A Reset Form button
(11)A Label or Textbox to show the result

b. Following on from (point a) write a JavaScript code that is called by the Pay & Finish
button in payment.html to process the data collected and returning a sensible and
meaningful message in the label or Textbox (point 11) (e.g. We are processing your
request and the total of your payment will be …………. Please allow two days for your
payment to be fully done).

c. You also need to write a JavaScript code that is called by the Reset Form button in
payment.html to reset/clear the form.

i can sort of manage with the first part and write the basic HTML/XHTML needed to produce the page but upon reaching the javascript section im completely lost, also in the first question about factorials im a little stung as well.
can someone please help me out with this and from their solution i can then understand how this works and be able to add to it or remember it for future purposes. i am studying webdesing and internet applications alone at home so its a little confusing at this stage
thank you for your answers in advance!