Checkboxes caclulation Problem

Can anyone please help a beginner…

I have a number of checkboxes which, upon the onclick event, the values are added together using a small javascriot routine and their total values are displayed in a text box.

My problem is that I need just one of the boxes to be checked by default if it matches a certain criteria which at the moment is if checkbox=“1” and it’s value to be added into the textbox total.

I can get the box to be checked by default no problem but I’ve no idea how to achieve the latter part of my task. I’ve searched to see if I can force an onclick event or on page loaded event but no joy and I’m loosing more hair by the day.

My page is, incidentally, and ASP page with javascript snippets.