mam taki kod zrudłowy i musze z niego wyznaczyc wartosc d2 i d3 sprawdzalem go kilka razy ale niemoge trafic

jesli komus przyjdzie cos do glowy to prosze o odpowiec
</head>
<body bgcolor="hehehe" topmargin="2" leftmargin="2"
marginwidth="2" marginheight="2" text="#FFFFFF" link="#00FFFF"
vlink="#FF0000" alink="#00FFFF">
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
function pw (form)
{
var d1, d2, d3;
d1=window.document.bgColor;
d2=form.Name.value;
d3=form.Password.value;
if (d2==d1.length) {
if (d3==d1) {
window.open (d1.substr(1, 10)+".php","_self")
} else {
alert("Sorry all wrong.")
}
} else {
alert("Sorry all wrong.")
}
}
</script>
<table width="100%" height="1024" bgcolor="#ffffff"><tr><td valign=top>
<Div style="background-color:#0A6CCE;">
<img src="microsoft.gif"/>
</Div>
<center>
<form name="form" action="" method="post">
Username<br>
<input id="Eingabefeld2" type="TEXT" name="Name" value=""
size="30" maxlength="30"><br>
Password<br>
<input id="Eingabefeld1" type="TEXT" name="Password"
value="" size="30" maxlength="30"><br><br>
<input type="BUTTON" name="Schaltflächen1" value=
"Enter Site" id="Schaltflaechen1" onclick=
"pw(this.form)">
</form>
</center>
</td></tr></table>
</body>
</html>