
<script language="javascript"type="text/javascript">
<%
__header("Content-Type","text/html; charset=gb2312");
var lang = "zh_cn";
db_Open("/NandFlash/dbCfg.db3");
var retval = db_Login(Usercode, Password);
db_Close();
%>
var retval = <% write(retval); %>;
var lang = "zh_cn";

if (retval > 0)
{
	if (retval == 2)
		setCookie("user", user+"|OK1");
	else
		setCookie("user", user+"|OK0");
	window.location.href="main.asp";
}
else
{
	window.location.href="index.html";
}

function setCookie(c_name, value, expiredays) {
  var exdate = new Date()
  exdate.setDate(exdate.getDate() + expiredays)
  document.cookie = c_name + "=" + escape(value) +
	((expiredays == null) ? "" : ";expires=" + exdate.toGMTString())
}
</script> 
