If you want to 'protect' a site and don't have CGI access, you can try this JavaScript. Visitors get three tries to enter the correct password then they are refused entry.
Set up a members only area on your site with this simple login script. With cookie based access checking! Now members can have their own personal pages in the members area
Set up this quick and easy password protection script in minutes. Choose a login Username and Password, and require that your visitor's enter the information before accessing any HTML page.
JavaScript code to add a password to your page. You should note that this is not totally secure. You should not keep information such as credit card numbers or other sensitive information on the pages.