Why does this work in ie8?

```
function testFunction(ctrl)
{
                alert(ctrl.value);
}

```

I have a javascript function on my page like so. I then have a input tag with an id of "text1" and a button with the following onclick event 

```
<input id="text1" value="value" />

<input type="submit" onclick="testFunction(text1)" value="Click" />

```

the javascript function does indeed alert the value of the textbox, but i am just passing in the id of the textbox, unquoted. I dont have to call getelementbyid, it just works. What is ie doing here, it doesnt work in firefox. How does the id turn into the actual textbox object, and i can call cntrl.value on it?

P.S. - I know I shouldn't user the onclick handler in this way, just an easy way to illustrate the issue.

Thanks