<%@ 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" %>
 <style>
    * {
        margin: 0;
        padding: 0;
        text-decoration: none;
        list-style: none;
    }

    /*tap menu*/
    #tapMenu {
        width : 980px;
        margin: 20px auto 0;
        /*마진 20px을 0으로!*/
        border-top: 2px solid #29559f;
        /* background-color: orange; */
    }

    #tapMenu ul {
        overflow: hidden;
    }

    #tapMenu ul li{
        display: inline;
    }

    #tapMenu ul li a {
        display: block;
        float: left;
        width: 240px;
        height: 40px;
        margin-left: 2px;
        text-align: center;
        font-weight: 600;
        line-height: 40px;
        border: 1px solid #ddd;
        border-top: none;

        color: #444;
    }
    #tapMenu ul li a.on {
        background-color: #29559f;
        color: #fff;

    }
    
   </style>
<div id="tapMenu">
        <ul>
            <li><a href="/moniter/list.do?idx=1" <c:if test="${idx eq '1'}">class="on"</c:if>>일본</a></li>
            <li><a href="/moniter/list.do?idx=2" <c:if test="${idx eq '2'}">class="on"</c:if>>중국</a></li>
            <li><a href="/moniter/list.do?idx=3" <c:if test="${idx eq '3'}">class="on"</c:if>>러시아</a></li>
            <li><a href="/moniter/list.do?idx=4" <c:if test="${idx eq '4'}">class="on"</c:if>>영어권</a></li>
        </ul>
    </div><!--end of tapMenu-->
<div class="list_box">
	<div style='line-height: 30px; margin-left: 0px; display: none;'>일본</div>
	<c:forEach items="${data}" var="item">
	<c:if test="${item.jmDepth eq '1'}">
	</c:if>
	<c:if test="${item.jmDepth eq '2'}">
		<div style='line-height: 30px; margin-left: 10px; font-size: 16px; font-weight: 600; color: #3f6bac; padding-top: 20px; padding-bottom: 10px; border-bottom: 2px solid #3f6bac;'>
			<c:out value="${item.jmName}"></c:out>
			<c:if test="${!empty item.jmHref}">
			(<a href="javascript:copyToClipboard('<c:out value="${item.jmHref}"/>')"><font color='#3f6bac'><c:out value="${item.jmHref}"/></font></a>)
			</c:if>
		</div>
	</c:if>
	<c:if test="${item.jmDepth eq '3'}">
	<div style='line-height: 30px; margin-left: 20px; font-weight: bold;'>
		<img src='/images/new/dot_g.png' alt='dot' /> <c:out value="${item.jmName}"></c:out>
		<c:if test="${!empty item.jmHref}">
		 (<a href="javascript:copyToClipboard('<c:out value="${item.jmHref}"/>')"><font color='#3f6bac'><c:out value="${item.jmHref}"/></font></a>)
		</c:if>
	</div>	
	</c:if>
	<c:if test="${item.jmDepth eq '4'}">
	<div style='line-height: 30px; margin-left: 30px;'>
		<img src='/images/new/dot_s_g.png' alt='dot' />  <c:out value="${item.jmName}"></c:out>
		<c:if test="${!empty item.jmHref}">
		 (<a href="javascript:copyToClipboard('<c:out value="${item.jmHref}"/>')"><font color='#3f6bac'><c:out value="${item.jmHref}"/></font></a>)
		</c:if>
	</div>
	</c:if>
	<c:if test="${item.jmDepth eq '5'}">
	<div style='line-height: 30px; margin-left: 40px;'>
		- <c:out value="${item.jmName}"></c:out> 
		<c:if test="${!empty item.jmHref}">
		 (<a href="javascript:copyToClipboard('<c:out value="${item.jmHref}"/>')"><font color='#3f6bac'><c:out value="${item.jmHref}"/></font></a>)
		</c:if>
	</div>
	</c:if>
	<c:if test="${item.jmDepth eq '6'}">
	<div style='line-height: 30px; margin-left: 40px;'>
		&nbsp;&nbsp;- <c:out value="${item.jmName}"></c:out> 
		<c:if test="${!empty item.jmHref}">
		 (<a href="javascript:copyToClipboard('<c:out value="${item.jmHref}"/>')"><font color='#3f6bac'><c:out value="${item.jmHref}"/></font></a>)
		</c:if>
	</div>
	</c:if>
	</c:forEach>
</div>
<script type="text/javaScript" defer="defer">
function copyToClipboard(url){
  	window.clipboardData.setData('Text',url);
  	window.alert("해당 주소가 복사되었습니다.\n[Ctrl]+[V]키로 붙여넣기 하십시오.");
  }
  
$(document).ready(function(){
	
});
</script>