<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="br.com.centralit.citcorpore.util.WebUtil"%>
<%@page import="br.com.centralit.citcorpore.bean.UsuarioDTO"%>
<%@page import="br.com.citframework.dto.Usuario"%>
<%@ page import="br.com.citframework.util.UtilI18N" %>

<%@include file="/novoLayout/common/include/iframe.jsp" %>

<html <%=(iframe != null) ? "data-iframe=\"" + iframe + "\"" : "" %>>
	<head>
		<%@include file="/novoLayout/common/include/libCabecalho.jsp" %>

		<link type="text/css" rel="stylesheet" href="../../novoLayout/common/include/css/template.css"/>
		<script type="text/javascript">
		var objTab = null;
		addEvent(window, "load", load, false);

		function load() {
			document.formOrigemOcorrencia.afterRestore = function() {
				$('.tabsbar li:eq(0) a').tab('show')
			}
		}

		function excluir() {
			if (document.getElementById("idOrigemOcorrencia").value != "") {
				if (confirm(i18n_message("citcorpore.comum.deleta") ) ) {
					document.formOrigemOcorrencia.fireEvent("delete");
				}
			}
		}
		function LOOKUP_ORIGEM_OCORRENCIA_select(id, desc) {
			document.formOrigemOcorrencia.restore({
				idOrigemOcorrencia: id
			});
		}

		</script>
	</head>
	<body>
		<div class="container-fluid fixed">
			<div class="navbar main hidden-print">
				<%@include file="/novoLayout/common/include/cabecalho.jsp" %>
				<%@include file="/novoLayout/common/include/menuPadrao.jsp" %>
			</div>

			<div id="wrapper">
				<!-- Inicio conteudo -->
				<div>
					<%if (iframe == null) {%>
					<h3><fmt:message key="citcorpore.comum.origemOcorrencia" /></h3>
					<%}%>
					<div class="box-generic">
						<div class="tabsbar">
							<ul>
								<li class="active"><a href="#tab1" data-toggle="tab"><fmt:message key="citcorpore.comum.cadastro" /></a></li>
								<li  class=""><a href="#tab2" data-toggle="tab"><fmt:message key="citcorpore.comum.pesquisa" /></a></li>
							</ul>
						</div>
						<div class="tab-content">
							<div class="tab-pane active" id="tab1">
								<form name="formOrigemOcorrencia" action="${ctx}/pages/origemOcorrencia/origemOcorrencia">
									<input type="hidden" id="idOrigemOcorrencia" name="idOrigemOcorrencia" />
									<input type="hidden" id="dataInicio" name="dataInicio" />
									<input type="hidden" id="dataFim" name="dataFim" />
									<div class="row-fluid">
										<div class="span5">
											<label  class="strong campoObrigatorio"><fmt:message key="citcorpore.comum.nome"/></label>
											  	<input placeholder="" class="span10 Valid[Required] Description[citcorpore.comum.nome]" id="nome" type="text" name="nome" maxlength="255">
										</div>
									</div>
									<div class="row-fluid">
										<button type='button' name='btnGravar' class="lFloat btn btn-icon btn-primary btnGravar" onclick='document.formOrigemOcorrencia.save();'><i></i><fmt:message key="citcorpore.comum.gravar" /></button>
										<button type="button" name='btnLimpar' class="lFloat btn btn-icon btn-primary" onclick='document.formOrigemOcorrencia.clear();'><i></i><fmt:message key="citcorpore.comum.limpar" /></button>
										<button type='button' name='btnUpDate' class="lFloat btn btn-icon btn-primary btnUpDate" onclick='excluir();'><i></i><fmt:message	key="citcorpore.comum.excluir" /></button>
									</div>
								</form>
							</div>
							<div class="tab-pane" id="tab2">
								<form name="pesquisaOrigemOcorrencia">
									<cit:findField id="LOOKUP_ORIGEM_OCORRENCIA" formName="pesquisaOrigemOcorrencia" lockupName="LOOKUP_ORIGEM_OCORRENCIA" top="0" left="0"	len="550" heigth="400" javascriptCode="true" htmlCode="true" />
								</form>
							</div>
						</div>
					</div>
				</div>
				<!--  Fim conteudo-->

				<%@include file="/novoLayout/common/include/rodape.jsp" %>

			</div>
		</div>
	</body>
</html>