+<%def .foot>
+<SCRIPT type="text/javascript">
+var timer;
+function checkDownloadStatus(batchnum) {
+ var re = new RegExp('bill_batch_download=' + batchnum);
+ if ( re.test(document.cookie) ) {
+ window.clearInterval(timer);
+ window.location.reload();
+ }
+}
+function startBatch(batchnum) {
+ timer = window.setInterval(function() {
+ checkDownloadStatus(batchnum);
+ }, 2000);
+ eval('batch'+batchnum+'process()');
+}
+</SCRIPT>
+</%def>