<%--
    Document   : question_bank
    Created on : Feb 17, 2010, 4:05:36 PM
    Author     : Sreekanth
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<jsp:include page="menu.jsp"></jsp:include>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <SCRIPT LANGUAGE="JavaScript">
          function fun()
          {

                var uname=document.getElementById("uname").value;

		var password=document.getElementById("pword").value;

		if(uname==null || uname=="")
                    window.alert("please enter username");
		else
		if(password==null || password=="")
                    {
		window.alert("please enter password");

                    }
		else
                 {

                   if(uname=="sree" && password=="sree")
		   {
			//document.getElementById("fid").action="sview.jsp";
			//document.getElementById("fid").submit();
                        document.forms["f1"].submit();
		   }
                   else
                   {
                      window.alert("please enter correct username and password");
                   }
	         }
          }

       </SCRIPT>

       <style>
div
{
color:red;
width:180;
font-family:Comic Sans MS;
text-align:center;
}
a
{
text-decoration:none;
font-family:Comic Sans MS;
color:black;
cursor:hand;
}
input {border:5px;color:red;padding:2px;}

</style>
   </head>
       <body background="images\bg.jpg">
     <% if(request.getAttribute("x")!=null)
                    out.println(request.getAttribute("x")); %>
    <div><center>LOGIN</center></div><br><br>
   <form name="f1" background="images\bg.jpg" action="emp.jsp" method="post" target="f3">
   <center><table border="0">
<tr>
<td style="text-align:center; font-family:Comic Sans MS; font-size:20px; color:white;" ><b>User Name</b></td>
<td>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
<td><input type="text" name="username" id="uname" size="12" /></td>

</tr>
<tr>
<td style="text-align:center; font-family:Comic Sans MS; font-size:25px; color:white;"><b>Password</b></td>
<td>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
<td><input type="password" name="password" id="pword" size="12" /></td>
</tr>
</table></center>
<tr>
<br><br>
<center><input type="button" onclick="fun()" name="cmd" value="Login "/>

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="reset" value="Cancel" name="reset" /></center>

</form>
</body>
</html>




