<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<form id="pncPayForm" name="pncPayForm" action="" method="post">
	<input name="dataSource" id="dataSource" type="hidden" value=""/>
	<input name="businessNo" id="businessNo" type="hidden" value=""/>
	<input name="signMsg" id="signMsg" type="hidden" value=""/>
	<input name="amount" id="amount" type="hidden" value=""/>
	<input name="currencyNo" id="currencyNo" type="hidden" value=""/>
	<input name="customerName" id="customerName" type="hidden" value=""/>
	<input name="insuredName" id="insuredName" type="hidden" value=""/>
	<input name="documentNo" id="documentNo" type="hidden" value=""/>
	<input name="callBackURL" id="callBackURL" type="hidden" value=""/>
</form>
<jsp:include page="../../../index/multi_init_param.jsp"/>
<script type="text/javascript" src="<c:url value='/resources/versions-2.0/js/jquery.min.js' />"></script>
<script type="text/javascript" src="<c:url value='/resources/js/layer/layer.js'/>"></script>
<script>
    var baseUrl = '${pageContext.request.contextPath }';

    function changeFrameHeight(){
        var topWindow;
        for(topWindow=window;topWindow.parent!=null && topWindow.parent!=topWindow;topWindow=topWindow.parent){
            for(var i=0;i<topWindow.parent.frames.length;i++){
                var isIframe = true;
                try {
                    topWindow.parent.frames[i].window.document;
                }catch (e) {
                    isIframe = false;
                }
                if(isIframe){
                    var tObj = topWindow.parent.frames[i];
                    if(tObj.window.document==topWindow.document){
                        var tName = tObj.name;
                        if(tName != ''){
                            if(tName.indexOf('frame3d')!=-1){
                                console.log(parent.document.getElementById("frame3d").height);
                                parent.document.getElementById("frame3d").height=820;
                            }
                        }
                    }
                }
            }
        }
    }
	$(function(){
		if('${payurl}' != ''){
			window.location.href='${payurl}';
			<%--window.open('${payurl}');--%>
		}else{
			window.location.href=baseUrl+'/insurance/gmr/transaction/failMessage?ACCESS_TOKEN=${ACCESS_TOKEN}';
		}
	});

</script>