This is my 1st post!

I pasted a JavaScritp (see below) in the HTML code of a web page made in Dreamweaver. I needed a window to pop-up and ask for a Password to access certain HTML web page. It worked but after a while it didn't anymore in IE (in Firefox it still does). It may have to do with security reasons within IE. The point is that it doesn't even give the chance to unblock in the toolbar the blocking of windows but it moves on to the "access_denied.html" page.

<script languaje="javascript">
nombre=window.prompt('Please enter the 2010 Value:','****************')
switch (nombre){
case 'Excellency':
case 'Excelency':
window.location= "access_denied.html";

Could you help me?? Is there any other way to do this? The simplest the better! Don't need a super high-security code. I'm just a begginer in programming languages (I'm rather a designer).