<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>报告详情管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
        $(document).ready(function() {
            previewShow();
        });
        function previewShow(){
            var url = '${urlInfo}';
            //var u = 'http://ow365.cn/?i=14411&furl='+url;
            if(url.indexOf("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")>-1) {
                var u = 'http://ow365.cn/?i=14411&furl='+encodeContent(url);
            }else{
                var u = 'http://ow365.cn/?i=15234&furl='+encodeContent(url);
            }

            function encodeContent(data){
                return encodeURI(data).replace(/&/g,'%26').
                replace(/\+/g,'%2B').replace(/\s/g,'%20').
                replace(/#/g,'%23').replace(/ /g,'%20');
                replace(/\//g,'%3F').replace(/=/g,'%3D');
            }

            if('${fn:containsIgnoreCase(urlInfo,'pdf')}'){
                u = url;
            }
            $("#view").load(u);
        }
	</script>
</head>
<body class="hideScroll">
	<div class="tabs-container">
		<div id="view">

		</div>
		<%--<c:choose>
			<c:when test="${fn:containsIgnoreCase(urlInfo,'jpg')
                                                           or fn:containsIgnoreCase(urlInfo,'png')
                                                           or fn:containsIgnoreCase(urlInfo,'gif')
                                                           or fn:containsIgnoreCase(urlInfo,'bmp')
                                                           or fn:containsIgnoreCase(urlInfo,'jpeg')}">
				<td><img src="${urlInfo}" width="50" height="50" alt="${urlName}"/></td>
			</c:when>
			<c:otherwise>
				<c:choose>
					<c:when test="${fn:containsIgnoreCase(urlInfo,'pdf')}">
						<td><a href="javascript:void(0)" onclick="preview('${urlInfo}','80%','80%','1')">${urlName}</a></td>
					</c:when>
					<c:otherwise>
						<td><a href="javascript:void(0)" onclick="preview('${urlInfo}','80%','80%')">${urlName}</a></td>
					</c:otherwise>
				</c:choose>
			</c:otherwise>
		</c:choose>--%>
	</div>
</body>
</html>