Please help me..

Here's my code.. what should I do to make it work?..

<script type = "text/javascript">

<%
Dim Conn, sql, rs

If IsObject( Session( "Conn" ) ) Then
Set Conn = Session( "Conn" )
Else
set Conn = server.createobject("adodb.connection")
constr = "Provider=sqloledb;Data Source=datasource;" & _
"Initial Catalog=catalog;User Id=id;Password=password;"

Conn.open constr
Set Session( "Conn" ) = Conn
End If
%>
var count = 2;
function validate() {
var un = document.myform.username.value;
var pw = document.myform.pword.value;
var valid = false;
var unArray = <%=rs("EmpID")%>;
var pwArray = <%=rs("Password")%>;
<%
sql = "SELECT password FROM "CarInfo" WHERE EmpID = '"&EmpID&"'
Set rs = Server.CreateObject( "ADODB.Recordset" )
rs.Open sql, Conn
rs.MoveFirst()
While Not rs.EOF
%>

for (var i=0; i <unArray.length; i++) {
if ((un == unArray) && (pw == pwArray)) {
valid = true;
break;
}
}
if (valid) {
alert ("Login was successful");
window.location = "car.html";
return false;
}
var t = " tries";
if (count == 1) {t = " try"}
if (count >= 1) {
alert ("Invalid username and/or password. You have " + count + t + " left.");
document.myform.username.value = "";
document.myform.pword.value = "";
setTimeout("document.myform.username.focus()", 25);
setTimeout("document.myform.username.select()", 25);
count --;
}
else {
alert ("Still incorrect! You have no more tries left!");
document.myform.username.value = "No more tries allowed!";
document.myform.pword.value = "";
document.myform.username.disabled = true;
document.myform.pword.disabled = true;
return false;
}
}


</script>
<body background="back.jpg">
<form name = "myform">
<h1><center> Monde Nissin Corporation </center></h1>
<h2><center> Car Benefit Monitoring System </center></h2>
<br/><br/><br/><p> <Center> Enter Username and Password </center> </p> <br/>
<p><center> USER NAME <input type="text" name="username"> <br/><br/> PASSWORD <input type="password" name="pword"><br/><br/>
<input type="button" value="Login" name="Submit" onclick= "validate()">
</center> </p>
</form>

</body>



please.. somebody help me..