<%@ page session="false" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<title>IHTA Registration</title>
	<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"></META>
	<link rel="stylesheet" type="text/css" href="css/reset-fonts-grids.css">
	<link rel="stylesheet" type="text/css" href="css/ccht-global-style.css">
	<link rel="shortcut icon" href="/ccht/images/ihta_logo.png" type="image/x-icon">
	<script type="text/javascript">
		function setFocus(id)
		{
			document.getElementById(id).focus();		
		}
		function hide(id_show,id_hide,list_element) 
		{
			if( document.getElementById( list_element ).value == '4' ||
					document.getElementById( list_element ).value == '6' ||
					document.getElementById( list_element ).value == '7' ||
					document.getElementById( list_element ).value == '8' ) {
				document.getElementById(id_show).style.display = 'inline-block';
				document.getElementById(id_hide).style.display = 'none';
			}
			else {
				document.getElementById(id_show).style.display = 'none';
				document.getElementById(id_hide).style.display = 'inline-block';
			}
		}	

		function performOnLoad(){
			if (document.getElementsByClassName) {
				var errorParent = document.getElementsByClassName('errorLink')[0];
				var errors = document.getElementsByClassName('errorMessage')
				if (errors && errors.length>1) {
					errorParent.focus();
				} else {	
					setFocus('username');
				}
			} else {	
				setFocus('username');
			}
		} 
		
	</script>
</head>
	<body onload="setTimeout('performOnLoad()', 200)">
	<div id="doc4">
		<div id="hd">
			<jsp:include page="ccht_header.jsp"/>
		</div>
		<div id="bd">
			<form:form method="POST" modelAttribute="command" action="register_1.html">
			<table width="100%" border="0">
			    <tr>
			    	<td align="center" valign="top">
					  <table align="left" width="100%" border="0" cellpadding="0" cellspacing="3">
						<tr><td><img src="/ccht/images/spacer.gif" height="3" alt=""></td></tr>
					    <tr>
							<td align="left" valign="top"><span class="bodyTextBold">Please enter your VA network User Name and select your Job Description to register.</span></td>
					    </tr>
					    <tr>
							<td align="left" valign="top">
								<table align="left" border="0" cellpadding="0" cellspacing="0">
								  <tr>
								      <td class="error">
					      		      	<a href=# class="errorLink">
					      		      		<form:errors path="*" id="error" htmlEscape="false" class="errorMessage"/>
							      		</a>
								      </td>
								  </tr>
								</table>
							</td>
					    </tr>
						<tr><td><img src="/ccht/images/spacer.gif" height="3" alt=""></td></tr>
					    <tr>
							<td align="left" valign="top">
								
								    <table width="100%" border="2" cellpadding="0" cellspacing="0">
									<tr>
										<td>
									    <table width="100%" border="0" cellpadding="0" cellspacing="5">
										<tr>
											<td align="right" width="50%" height="25" valign="middle" ><span class="bodyTextBold">User Name :&nbsp;</span><span class="requiredField">*&nbsp;</span></td>
											<td align="left" width="50%" height="25" valign="middle">
											<span alt="User Name is required field."></span>
											<form:input path="username" name="username" cssClass="bodyText" size="20"/>		
											<form:hidden path="registerSubmit" value="true"/>
											</td>
										</tr>
										<tr>
											<td align="right" width="50%" valign="middle" ><span class="bodyTextBold">Job Description :&nbsp;</span><span class="requiredField">*&nbsp;</span></td>										
											<td align="left" width="50%" valign="middle">
											<span alt="Job Description is required field."></span>					        					        
											    <form:select path="description" id="reason" name="reason" onchange="hide('register_field','next_field','reason')">
											    	<form:option value="" label="Select"/>
											    	<form:options items="${registrationReasons}" itemValue="code" itemLabel="name"/>
											    </form:select>			    
											</td>
										</tr>										
										<tr>	
											<td align="right" width="50%" valign="middle" style="padding-top: 5px;" nowrap>
												<c:if test="${REGISTRATIONBUTTON}">
													<span id="next_field" style="display:inline-block">
														<input id="Next" type="image" src="/ccht/images/btn_next.jpg" alt="Next"/>
													</span>
													<span id="register_field" style="display:none">
														<input id="register" type="image" src="/ccht/images/btn_register.jpg" alt="Register"/>
													</span>
												</c:if>
												<c:if test="${not REGISTRATIONBUTTON}">
													<span id="next_field" style="display:none">
														<input id="Next" type="image" src="/ccht/images/btn_next.jpg" alt="Next"/>
													</span>
													<span id="register_field" style="display:inline-block">
														<input id="register" type="image" src="/ccht/images/btn_register.jpg" alt="Register"/>
													</span>
												</c:if>												
											</td>
											<td align="left" width="50%" valign="middle" style="padding-top: 5px;" nowrap>
												<a href="${logoutManualUrl}"><img src="/ccht/images/btn_cancel.jpg" alt="Cancel"/></a>
											</td>					
										</tr>
									    </table>
										</td>
									</tr>
									</table>
							</td>
					     </tr>
					  </table>
			      	</td>
			      </tr>
 				  <tr><td><img src="/ccht/images/spacer.gif" alt="" height="3"></td></tr>
			      <tr>
					<td align="center" valign="middle">
						<a href="/help/register/index.html" target="_blank">Registration Help</a>
					</td>
			      </tr>
			  </table> 
			  </form:form>
		</div>
		<div id="ft">
			<jsp:include page="ccht_footer.jsp"/>
		</div>	 
	</div>   
	</body>
</html>