<html>
<head>
<script>
var variable;
function test ()
{
alert ("test");
}
</script>
<script>
test2 = function(){ alert('wert');test();};
document.onload = test2;
</script>
</head>
</html>