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

	<div class="memberAdd readView" id="readView">
		<table class="tbl_add" width="100%" border="0" cellpadding="0" cellspacing="0">
			<colgroup>
				<col width="110">
				<col width="*">
			</colgroup>
			<tr>
				<th>위치</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo1}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>국경</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo2}" escapeXml="false"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>수도</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo3}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>면적</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo4}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>화폐단위</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo5}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>인구</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo6}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>공용어</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naInfo7}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>해안선</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData1}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>영해</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData2}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>문맹률</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData3}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>종족구성</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData4}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>종교</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData5}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>독립</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData6}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>헌법</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData7}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>정체</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData8}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>정부형태</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData9}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>원수</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData10}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>수상</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData11}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>실권자</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData12}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>대의기구</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData13}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>정당</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData14}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>정부성향</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData15}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>UN가입</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData16}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>비동맹가입</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData17}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>GDP</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData18}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>무역</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData19}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>국방비</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData20}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>군사력</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData21}"></c:out></span><br /></td>
			</tr>
			<tr>
				<th>군맹관계</th>
				<td><span class="tbl_addtext"><c:out value="${nation.naData22}"></c:out></span><br /></td>
			</tr>
		</table>
	</div>

<form:form commandName="nation" name="nationForm" method="post" enctype="multipart/form-data" id="addForm">
	<form:hidden path="naSeq"/>
	<div class="memberAdd editView" id="editView" style="display:none;">
		<table class="tbl_add" width="100%" border="0" cellpadding="0" cellspacing="0">
			<colgroup>
				<col width="110">
				<col width="*">
			</colgroup>
			<tr>
				<th>위치</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo1"/></span><br /></td>
			</tr>
			<tr>
				<th>국경</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo2"/></span><br /></td>
			</tr>
			<tr>
				<th>수도</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo3"/></span><br /></td>
			</tr>
			<tr>
				<th>면적</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo4"/></span><br /></td>
			</tr>
			<tr>
				<th>화폐단위</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo5"/></span><br /></td>
			</tr>
			<tr>
				<th>인구</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo6"/></span><br /></td>
			</tr>
			<tr>
				<th>공용어</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naInfo7"/></span><br /></td>
			</tr>
			<tr>
				<th>해안선</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData1"/></span><br /></td>
			</tr>
			<tr>
				<th>영해</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData2"/></span><br /></td>
			</tr>
			<tr>
				<th>문맹률</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData3"/></span><br /></td>
			</tr>
			<tr>
				<th>종족구성</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData4"/></span><br /></td>
			</tr>
			<tr>
				<th>종교</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData5"/></span><br /></td>
			</tr>
			<tr>
				<th>독립</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData6"/></span><br /></td>
			</tr>
			<tr>
				<th>헌법</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData7"/></span><br /></td>
			</tr>
			<tr>
				<th>정체</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData8"/></span><br /></td>
			</tr>
			<tr>
				<th>정부형태</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData9"/></span><br /></td>
			</tr>
			<tr>
				<th>원수</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData10"/></span><br /></td>
			</tr>
			<tr>
				<th>수상</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData11"/></span><br /></td>
			</tr>
			<tr>
				<th>실권자</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData12"/></span><br /></td>
			</tr>
			<tr>
				<th>대의기구</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData13"/></span><br /></td>
			</tr>
			<tr>
				<th>정당</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData14"/></span><br /></td>
			</tr>
			<tr>
				<th>정부성향</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData15"/></span><br /></td>
			</tr>
			<tr>
				<th>UN가입</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData16"/></span><br /></td>
			</tr>
			<tr>
				<th>비동맹가입</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData17"/></span><br /></td>
			</tr>
			<tr>
				<th>GDP</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData18"/></span><br /></td>
			</tr>
			<tr>
				<th>무역</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData19"/></span><br /></td>
			</tr>
			<tr>
				<th>국방비</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData20"/></span><br /></td>
			</tr>
			<tr>
				<th>군사력</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData21"/></span><br /></td>
			</tr>
			<tr>
				<th>군맹관계</th>
				<td><span class="tbl_addtext"><form:input maxlength="100" path="naData22"/></span><br /></td>
			</tr>
		</table>
	</div>
</form:form>
<div class="boardviewinfo">
	<ul class="right btn-style">
		<li class="readView">
			<a href="javascript:Nation.changeView('2');">수정</a>
        </li>
        <li class="editView" style="display: none;">
			<a href="javascript:Nation.save();">저장</a>
        </li>
        <li class="editView" style="display: none;">
			<a href="javascript:Nation.changeView('1');">취소</a>
        </li>
	</ul>	
</div> 
<script type="text/javascript" src="<c:url value='/validator.do'/>"></script>

<script type="text/javaScript" defer="defer">
var Nation = {
		changeView : function(mode){
			if(mode == "1"){
				$(".readView").show();
				$(".editView").hide();
			}else{
				$(".readView").hide();
				$(".editView").show();
			}
		} ,
		save : function(){
			document.nationForm.action = "<c:url value='/nation/update.do'/>";
			document.nationForm.submit();
		}

}
$(document).ready(function(){
	
});
</script>