For more background on how HTML component (HTC) files work and about scripting in general, search for these online references.
- Microsoft's HTC Reference
- W3C Spec for HTML Components
- Web Reference JavaScript Resources
- JavaScript Central
- JavaScript and ECMAScript Resources