I'm trying to get the alternant modal from http://javascript.about.com/library/blmodald2.htm
running. I have those two files (viewable on the link) copied in full, and the example link on the page prior works for me. However, when I run my small piece of driver code to test it out and get it working, I get "'null' is null or not an object." How do I fix this and get it running? My code is this:

<script type="text/javascript" src="modaldbox.js">
<div id="box" class="dialog">
<div style="text-align:center"><span id="txt">Press OK to continue.</span><br>
<button onclick="hm('box');okSelected()">OK</button>
<link rel="stylesheet" href="modaldbox.css" type="text/css" />
var x = 'something to check';
$('txt').innerHTML = x;
function okSelected() {
var y = x;