Alberto,
First of all, that HTML is malformed. It is missing body tags. With malformed HTML, all bets are off as to what will happen.
If you were to add the body tags, you would run into a second problem. docwrite is called before it is defined. As a result, JavaScript doesn't know anything about a docwrite function. The JavaScript is ignored but doesn't run.