how do i code for the below attached Image description...

they r mountains and the gap between mountans is numbered 1 to 5. so i need to start from 1->2->3->4->5 and the same from 5->4>3->2-1 and viceversa. for every touch 1 point is increased. if i touch mountains then it should finish or end. for a given 10 sec of time one should touch 10 tmes from 1 through 5 and viceversa. one should start from 1 and go through 2 and so on to 5 and viceversa. is it possible with javascript...just download file if link is not working...

http://i60.tinypic.com/2cickjt.png