<html>
<%@ page import="jet.web.dhtml.WebActLogic"%>

<head>

<script language="JavaScript" >
<!--
var reportWin = null;
//expand the node
function expand(objId) {	
    if(typeof objId == "string") {
        obj=document.getElementById(objId);
    }
    
    if(obj.style.display == 'none') {
        obj.style.display = '';
        obj.style.visibility = "visible";
    } else {
        obj.style.display = 'none'; 
        obj.style.visibility = "hidden";
    }
}

//get frame object by its id
function getFrameObj(frameID) {
	return window.parent.frames[frameID];
}

//open the report
function openReport(targetID, catlog, path, report, catlogVersion, rptVersion, hasParams ) {
	var url = 'http://localhost:8888/jinfonet/' + 
	(hasParams ? 'tryView' : 'runReport') + '.jsp?' + 
	'jrs.path=/' + path + '/' + report + 
	'&jrs.cat_version=' + catlogVersion + 
	'&jrs.rpt_version=' + rptVersion + 
	'&clientHeight=768' +
	'&jrs.report=/' + path + '/' + report + 
	'&jrs.result_type=8' +
	'&jrs.cmd=jrs.try_vw' +
	'&clientWidth=1024' + 
	'&jrs.catalog=' + catlog + 
	// Comment out the next two lines if you want to require user to login with browser login prompt
	'&jrs.auth_uid=admin' +
	'&jrs.auth_pwd=admin' +
	'&key=folder2&' + 'currTime=' + Date.parse(new Date());
	reportWin = window.open(url, targetID)
}

var rptType = 2;

//get report type to download
function getRptType(selectObj) {
	rptType = selectObj.value;
}

//download report
function downloadRpt() {
	if (reportWin!=null)
		reportWin.user_downloadReport(document.getElementById("selectdownload").value);
}

// show search dialog
function showSearchDialog()
{
	if(reportWin!=null) 
		reportWin.user_showSearchDialog();
}
//-->
</script>  
</head>
<body onload="reportWin = getFrameObj('detail');">
  
   <H3><a HREF="javascript:void(0)" onclick="getFrameObj('detail').location='http://www.jinfonet.com';">Jinfonet</a></H3>

   <H3><a HREF="javascript:void(0)" onclick="expand('reports');">Reports</a></H3>
   <H5>
    <UL id='reports' style="display:none">
      <LI>  <a HREF="javascript:void(0)"onClick="openReport('detail', '/SampleReports/SampleReports.cat', 'SampleReports', 'Combo Report and Drilling.cls', -1, -1, false);">Combo Report and Drilling</a><br>
      <LI>  <a HREF="javascript:void(0)"onClick="openReport('detail', '/SampleReports/SampleReports.cat', 'SampleReports', 'InvoiceReport.cls', -1, -1, true);">InvoiceReport</a><br>
      <LI>  <a HREF="javascript:void(0)"onClick="openReport('detail', '/SampleReports/SampleReports.cat', 'SampleReports', 'CustomerContactCard.cls', -1, -1, false);">CustomerContactCard</a><br>
    </UL>
   </H5>
   
   <H3><a HREF="javascript:void(0)" onclick="expand('api');">API</a></H3>
   <div id='api' style="display:none">
	   <hr>
	   <h4><input type="checkbox" onclick="expand('download')">Download Report</h4>
	   <div id='download' style="display:none">   
		   <select size="1" id="selectdownload">
				 <OPTION value=0>HTML</OPTION> 
				 <OPTION value=2 selected>PDF</OPTION>
				 <OPTION value=6>Excel</OPTION>
				 <OPTION value=5>Text</OPTION>
				 <OPTION value=4>RTF</OPTION>
				 <OPTION value=7>XML</OPTION>
				 <OPTION value=3>PostScript</OPTION>
		   </select>
		   <br/>
		   <input type='button' value='download' onclick="downloadRpt();" />
	   </div>
	   
	   <hr>
	   <h4><input type="checkbox" onclick="expand('model')">Search</h4>
	   <div id='model' style="display:none">
	   		<input type='button' value='Search' onclick="showSearchDialog();" />
	   </div>
	</div>

</body>
</html>
