http://code.tutsplus.com/tutorials/the-basics-of-object-oriented-javascript--net-7670
the above tutorial tells that :
$(document).ready(function(){
    //all our code that runs after the page is ready goes here
});
And
 addEvent(window, 'load', function(){
        //all our code that runs after the page is ready goes here
    });
are same . So i am trying to use addEvent like this :
<html>
<head>
<script type="text/javascript">
addEvent(window, 'load', function(){
    alert("test");
});
</script>
</head>
<body>
<form id="ourForm">
    <label>First Name</label><input type="text" /><br />
    <label>Last Name</label><input type="text" /><br />
    <label>Email</label><input type="text" /><br />
    <input type="submit" value="submit" />
</form>
</body>
</html> 
But i am getting error :
Uncaught ReferenceError: addEvent is not defined 
Please help. I am new to javascript
 
     
    