    <script type="text/javascript"> 
    jQuery().ready(function() {
		// Validate register form
		jQuery("#loginform").validate({
			rules: {
				email: {
					required: true,
					email: true
				},
				password: {
					required: true
				}
			},
			messages: {
				email: "<lable to='email'><img src='img/error.png' title='Please enter a valid email address' /></lable>",
				password: "<lable to='email'><img src='img/error.png' title='Please enter a password' /></lable>"
			}
		});
	});
	</script> 

    <div id="main">    
        <div id="container">
            <div id="content">
                <DIV id="comments">   
                    <DIV id="respond" style="float: left; width: 400px;"> 
                        <H3>Login </H3>
                        
                        <DIV class="formcontainer">
                            <FORM id="loginform" method="post" action="<%=( request.getParameter("redirect") != null ? request.getParameter("redirect") : "gallery" ) %>">
                            	<INPUT type="hidden" name="action" value="login">                                  
                                <P id="comment-notes">Please login with your email address and password.</P>
                                 
                                <DIV class="form-section"> 
                                    <DIV class="form-label"><LABEL for="email">Email</LABEL> <SPAN class="required">*</SPAN></DIV> 
                                    <DIV class="form-input"><INPUT id="email" name="email" type="text" value="" size="30" tabindex="1"></DIV> 
                                </DIV>
                                
                                <DIV class="form-section"> 
                                    <DIV class="form-label"><LABEL for="email">Password</LABEL> <SPAN class="required">*</SPAN></DIV> 
                                    <DIV class="form-input"><INPUT id="password" name="password" type="password" value="" size="30" tabindex="2"></DIV> 
                                </DIV>
                                                               
                                <INPUT id="submit" name="login" type="submit" value="Login" tabindex="7">
                                <INPUT type="button" value="Register" tabindex="8" onClick="document.location='register'">

                            </FORM><!-- #commentform --> 
                        </DIV><!-- .formcontainer --> 
                    </DIV><!-- .formcontainer -->                       
                    
                </div><!-- .post -->            
            </div><!-- #content -->
        </div><!-- #container -->
    </div>