<?
require('../include/startup.php');
session_start();
ob_start(); 
//session_start();

$frontEndURL = $config->frontEndURL;

if(!isset($_SESSION['engineer_id'])){
    $code = $_GET['code'] ?? '';
    $loginPage = "$siteURLmachine/index.php?l=2&code=" . urlencode($code);

    header("Location: $loginPage");
    exit;
}
/*if(!isset($_SESSION['customer_user_id']) || trim($_SESSION['customer_user_id'])==""){
	$loginPage = $config->siteURL."/index.php?l=2";
	$_SESSION['redirect_to'] = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	header("Location: $loginPage");
	exit;
}
if(trim($_SESSION['archive_date'])!="" && trim($_SESSION['archive_date'])!="0000-00-00"){
	if(trim($_SESSION['archive_date'])<=date("Y-m-d")){
		echo "Client Disabled";
		die();
	}
}*/

?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Thermotec</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    
	<script type="text/javascript">
    var site_url = "<?php echo $siteURL; ?>";
	var frontend_url = "<?php echo $config->frontEndURL; ?>";
    </script>
	<link rel="shortcut icon" href="<?php echo $config->frontEndURL;?>/favicon.png"/>
    <!-- jQuery -->
	<script src="<?php echo $siteURL ?>/plugins/jquery/jquery.min.js"></script>
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/jquery-ui/jquery-ui.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/fontawesome-free/css/all.min.css">
	<!-- DataTables -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
	<!-- daterange picker -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/daterangepicker/daterangepicker.css">
	<!-- iCheck for checkboxes and radio inputs -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
	<!-- Bootstrap Color Picker -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
	<!-- Tempusdominus Bootstrap 4 -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
	<!-- Select2 -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/select2/css/select2.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
	<!-- Bootstrap4 Duallistbox -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
	<!-- BS Stepper -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bs-stepper/css/bs-stepper.min.css">
	<!-- dropzonejs -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/dropzone/min/dropzone.min.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/dist/css/adminlte.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/timepicker/bootstrap-timepicker.min.css">
	<!--<link rel="stylesheet" href="<?php echo $siteURL ?>/bootstrap/css/bootstrap.min.css">-->
<!-- Date Picker -->
<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datepicker/datepicker3.css">  
	
    <!-- bootstrap wysihtml5 - text editor -->
    <!--<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">-->
	<!---------------------------------- Start ckeditor files -------------------------------------------->
	<script type="text/javascript">CKEDITOR_BASEPATH = '<?=$siteURL?>/includes/ckeditor/';</script>
	<script type="text/javascript" src="<?=$siteURL?>/includes/ckeditor/ckeditor.js"></script>
	<!---------------------------------- End ckeditor files ---------------------------------------------->
</head>
<body class="hold-transition <? echo (isset($_REQUEST['hide_top']) &&  $_REQUEST['hide_top'] == 1) ? "" : "";?>  skin-red sidebar-mini">
 <div class="ajax-loading"><div></div></div>
<style>
.card-success:not(.card-outline)>.card-header {
    background-color: #9c5593;
	color:white;
}
.hide {
    display: none !important;
}

[class*=sidebar-dark-] {
    background-color:  #9c4893;
}
[class*=sidebar-dark-] .sidebar a {
    color: #fff;
}
[class*=sidebar-dark-] .nav-sidebar>.nav-item.menu-open>.nav-link, [class*=sidebar-dark-] .nav-sidebar>.nav-item:hover>.nav-link, [class*=sidebar-dark-] .nav-sidebar>.nav-item>.nav-link:focus {
    background-color: rgba(255,255,255,.1);
    color: #000;
}
[class*=sidebar-dark] .brand-link {
    border-bottom: 1px solid #d0d0d0;
}
[class*=sidebar-dark] .user-panel {
    border-bottom: 1px solid #d0d0d0;
}

a{
	color: #000;
}
a:hover, a:focus {
    color: #000;
	text-decoration: none;
	color:#dc4d01;
}
.callout.callout-info {
    border-left-color: #dc4d01;
}
.btn-primary {
    background-color: #9c4893;
    border-color: #9c4893;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #9c4893;
    border-color: #9c4893;
}
.btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show>.btn-primary.dropdown-toggle {
    color: #fff;
     background-color: #9c4893;
    border-color: #9c4893;
}

.scrollbar {
margin-left: 0;
float: left;
height: 571px !important;
width: 100% !important;
/* background: #fff; */
overflow-y: scroll;
margin-bottom: 25px;
}
.force-overflow {
min-height: 450px;
}

.scrollbar-primary::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5; }

.scrollbar-primary::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #4285F4; }

.scrollbar-danger::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-danger::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-danger::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #ff3547; }

.scrollbar-warning::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-warning::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-warning::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #FF8800; }

.scrollbar-success::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-success::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-success::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #00C851; }

.scrollbar-info::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-info::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5; }

.scrollbar-info::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #33b5e5; }

.scrollbar-default::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: transparent;
border-radius: 10px; }

.scrollbar-default::-webkit-scrollbar {
width: 6px;
background-color: transparent; }

.scrollbar-default::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #C1C1C1; }

.scrollbar-secondary::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-secondary::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-secondary::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #aa66cc; }


.bgcolorwhite{
	background:#fff;
}


.copyright-admin {
    font-size: 14px;
    margin: 0;
    padding: 0 15px;
    width: 100%;
    color: #869099;
    /* position: absolute; */
    bottom: 5px;
}

.copyright-admin a {
    font-size: 14px;
    color: #869099;
    text-align: center;
    display: block;
}

.red-strip-login {
    border-top: 0 solid #333;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;	
}
.red-strip-login span {
    color: #3f3f3f;
    font-size: 20px;
    font-family: 'SegoeUI-Semilight';
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
    padding-left: 12px;
    margin-right: 22px;
}
.red-strip-login a {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    transition: all ease .3s;
    -webkit-transition: all ease .3s;
    -moz-transition: all ease .3s;
    -ms-transition: all ease .3s;
    -o-transition: all ease .3s;
    margin: 1px 1px 0 0;
	font-size: 1rem;
    width: 20px;
    height: 20px;
    color: #3f3f3f;
}
.red-strip-login a:hover {
    /*background: #ffffff none repeat scroll 0 0;*/
}
.red-strip-login a:hover .fa {
    color: #869099;
	/*text-shadow:0 0 3px #3f3f3f;*/
}
.red-strip-login a .fa {
    height: 34px;
    width: 34px;
    border: 0px solid #869099;
    font-size: 20px;
    color: #869099;
    display: table-cell;
    vertical-align: middle;
    transition: all ease .3s;
    -webkit-transition: all ease .3s;
    -moz-transition: all ease .3s;
    -ms-transition: all ease .3s;
    -o-transition: all ease .3s;
}
input[type="radio"], input[type="checkbox"] {
  height: 20px;
  width: 20px;
}
</style>
 <div class="wrapper">
	<? 
		include('head.php');
		include('left_mnu.php');
	?>
	<!-- Content Wrapper. Contains page content -->
      <div class="" style="<?php echo ($_REQUEST["hide_left"]=="1")?'margin-left:0px;':'';?>">
		<?
		
		if(file_exists($page->topCategory.".inc.php")){
			include($page->topCategory.".inc.php");
		}else if($_REQUEST['page']=='replica_wood_dashboard'){
			include 'replica_wood_dashboard.inc.php';
		}else if($_REQUEST['page']=='ajax_actions_replica_wood'){
			include 'ajax_actions_replica_wood.php';
		}else if($_REQUEST['page']=='dashboard'){
			include 'dashboard.php';
		}else if($_REQUEST['page']=='ajax_actions_vac'){
			include 'ajax_actions_vac.php';
		}else if($_REQUEST['page']=='ajax_actions_assbly'){
			include 'ajax_actions_assbly.php';
		}else if($_REQUEST['page']=='ajax_actions_assypu'){
			include 'ajax_actions_assypu.php';
		}else if($_REQUEST['page']=='ajax_actions_cnc'){
			include 'ajax_actions_cnc.php';
		}else if($_REQUEST['page']=='ajax_actions_pu'){
			include 'ajax_actions_pu.php';
		}else if($_REQUEST['page']=='view_cnc'){
			include 'view_machines_cnc.inc.php';
		}elseif($_REQUEST['page']=='view'){
			include 'view.inc.php';
		}elseif($_REQUEST['page']=='view_pu'){
			include 'view_machines_pu.inc.php';
		}elseif($_REQUEST['page']=='view_machines_assypu'){
			include 'view_machines_assypu.inc.php';
		}elseif($_REQUEST['page']=='view_machines_assambly'){
			include 'view_machines_assambly.inc.php';
		}elseif($_REQUEST['page']=='view_organisation_progress'){
			include 'view_organisation_progress.inc.php';
		}elseif($_REQUEST['page']=='file_download'){
			include 'file_download.inc.php';
		}elseif($_REQUEST['page']=='view_items_details'){
			include 'view_items_details.inc.php';
		}elseif($_REQUEST['page']=='cost_sale_price_bulk_import'){
			include 'cost_sale_price_bulk_import.inc.php';
		}
		/* Order */
		else if($_REQUEST['page']=='add_order'){
			include 'order/add_orders.inc.php';
		}elseif($_REQUEST['page']=='view_order'){
			include 'order/view_orders.inc.php';
		}elseif($_REQUEST['page']=='view_orders_details'){
			include 'order/view_orders_details.inc.php';
		}elseif($_REQUEST['page']=='delevery_notes'){
			include 'order/delevery_notes.inc.php';
		}
		/* Parts Request */
		else if($_REQUEST['page']=='add_part_request'){
			include 'part_request/add_part_request.inc.php';
		}else if($_REQUEST['page']=='add_part_request_new'){
			include 'part_request/add_part_request_new.inc.php';
		}elseif($_REQUEST['page']=='view_part_request'){
			include 'part_request/view_part_request.inc.php';
		}elseif($_REQUEST['page']=='view_part_request_details'){
			include 'part_request/view_part_request_details.inc.php';
		}
		/* Stock Transfer */
		else if($_REQUEST['page']=='add_stock_transfer'){
			include 'stock_transfer/add_stock_transfer.inc.php';
		}elseif($_REQUEST['page']=='view_transfer'){
			include 'stock_transfer/view_stock_transfer.inc.php';
		}
		/* stock */
		
		if($_REQUEST['page']=='view_warehouse'){
			include 'stock/view_warehouse.inc.php';
		}elseif($_REQUEST['page']=='add_warehouse'){
			include 'stock/add_warehouse.inc.php';
		}elseif($_REQUEST['page']=='view_bay'){
			include 'stock/view_bay.inc.php';
		}elseif($_REQUEST['page']=='add_bay'){
			include 'stock/add_bay.inc.php';
		}elseif($_REQUEST['page']=='view_shelf'){
			include 'stock/view_shelf.inc.php';
		}elseif($_REQUEST['page']=='add_shelf'){
			include 'stock/add_shelf.inc.php';
		}elseif($_REQUEST['page']=='view_location'){
			include 'stock/view_location.inc.php';
		}elseif($_REQUEST['page']=='add_location'){
			include 'stock/add_location.inc.php';
		}elseif($_REQUEST['page']=='view_location_details'){
			include 'stock/view_location_details.inc.php';
		}
            
		if($_REQUEST['page']=='view_stock_used'){
			include 'report_structure/view_stock_used.inc.php';
		}elseif($_REQUEST['page']=='view_top_50_parts_used'){
			include 'report_structure/view_top_50_parts_used.inc.php';
		}elseif($_REQUEST['page']=='view_stock_no_activity_report'){
			include 'report_structure/view_stock_no_activity_report.inc.php';
		}elseif($_REQUEST['page']=='view_total_monetary_reports'){
			include 'report_structure/view_total_monetary_reports.inc.php';
		}elseif($_REQUEST['page']=='view_stock_movement_reports'){
			include 'report_structure/view_stock_movement_reports.inc.php';
		}elseif($_REQUEST['page']=='view_pie_chart_wheel'){
			include 'report_structure/view_pie_chart_wheel.inc.php';
		}elseif($_REQUEST['page']=='view_part_required'){
			include 'report_structure/view_total_part_required_reports.inc.php';
		}elseif($_REQUEST['page']=='send_weekly_inventory'){
			include 'report_structure/send_weekly_inventory_reports.inc.php';
		}
            
		?>
	  </div><!-- /.content-wrapper -->
 
	 
</div> 
	
<!-- Bootstrap 4 -->
<script src="../admin/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables  & Plugins -->
<script src="../admin/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../admin/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../admin/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../admin/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../admin/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../admin/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../admin/plugins/jszip/jszip.min.js"></script>
<script src="../admin/plugins/pdfmake/pdfmake.min.js"></script>
<script src="../admin/plugins/pdfmake/vfs_fonts.js"></script>
<script src="../admin/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../admin/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../admin/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- Select2 -->
<script src="../admin/plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="../admin/plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="../admin/plugins/moment/moment.min.js"></script>
<script src="../admin/plugins/inputmask/jquery.inputmask.min.js"></script>
<!-- date-range-picker -->
<script src="../admin/plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="../admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../admin/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Bootstrap Switch -->
<script src="../admin/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<!-- BS-Stepper -->
<script src="../admin/plugins/bs-stepper/js/bs-stepper.min.js"></script>
<!-- dropzonejs -->
<script src="../admin/plugins/dropzone/min/dropzone.min.js"></script>
<!-- AdminLTE App -->
<script src="../admin/dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../admin/dist/js/demo.js"></script>
<!-- Page specific script -->



<!-- datepicker -->
<script src="../admin/plugins/datepicker/bootstrap-datepicker.js"></script>


<script>
	
  $(function () {
    //Initialize Select2 Elements

    $('.select2').select2();
	
	$('#product').select2({		
		placeholder: 'search...',		
		minimumInputLength: 3,
		ajax: {
		  url: site_url+"/modules/product_management/index.php?page=ajax_actions&action=search_model_name",	
		  delay: 0,
		  minLength:3,
		  dataType: 'json',	
		  processResults: function (data) {
			return {
			  results: data.model
			};
		  },
		  cache: true
		},
		templateResult:  function (model) {
			var $span = $("<span>"+model.text+"</span>");			
			return $span;			
		} 
	});
	

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })

    //Datemask dd/mm/yyyy
    $('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
    //Datemask2 mm/dd/yyyy
    $('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
    //Money Euro
    $('[data-mask]').inputmask()

    //Date picker
    $('#reservationdate').datetimepicker({
        format: 'DD-MM-YYYY'
    });

    //Date and time picker
    $('#reservationdatetime').datetimepicker({ icons: { time: 'far fa-clock' } });

    //Date range picker
    $('#reservation').daterangepicker()
    //Date range picker with time picker
    $('#reservationtime').daterangepicker({
      timePicker: true,
      timePickerIncrement: 30,
      locale: {
        format: 'MM/DD/YYYY hh:mm A'
      }
    })
    //Date range as a button
    $('#daterange-btn').daterangepicker(
      {
        ranges   : {
          'Today'       : [moment(), moment()],
          'Yesterday'   : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
          'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
          'Last 30 Days': [moment().subtract(29, 'days'), moment()],
          'This Month'  : [moment().startOf('month'), moment().endOf('month')],
          'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        },
        startDate: moment().subtract(29, 'days'),
        endDate  : moment()
      },
      function (start, end) {
        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
      }
    )

    //Timepicker
    $('#timepicker').datetimepicker({
      format: 'LT'
    })

    //Bootstrap Duallistbox
    $('.duallistbox').bootstrapDualListbox()

    //Colorpicker
    $('.my-colorpicker1').colorpicker()
    //color picker with addon
    $('.my-colorpicker2').colorpicker()

    $('.my-colorpicker2').on('colorpickerChange', function(event) {
      $('.my-colorpicker2 .fa-square').css('color', event.color.toString());
    })

    $("input[data-bootstrap-switch]").each(function(){
      $(this).bootstrapSwitch('state', $(this).prop('checked'));
    })
	
	// common date & time picker 
	$('.datepicker').datepicker({
		changeMonth: true,
		changeYear: true,
		format: "dd-mm-yyyy",
		todayHighlight: true,
		autoclose: true
	});
	$(".timepicker").timepicker({
		minuteStep: 1,
		showInputs: false,
		showSeconds: false,
		showMeridian: false,
		defaultTime: "01:00"
	});
	
	$('#myModal').on('hidden.bs.modal', function () {
		 $('.modal_iframe').attr('src', '')	})
  })
  
</script>
</body>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"  aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog modal-lg" style="max-width:85%;">
    <div class="modal-content">
      <div class="modal-header">
        <div class="col-lg-12">
		<div class="row">
			<div class="col-lg-8">
				<h4 class="modal-title" id="myModalLabel">Modal title</h4>
			</div>
			<div class="col-lg-4">
				<button type="button" class="close close_button2 close_button" data-dismiss="modal" aria-hidden="true">&times;</button>
			</div>
		</div>
		</div>
      </div>
      <div class="modal-body">
          <iframe class="modal_iframe" src="" width="100%" height="400px" frameborder="2" style="border:0px" allowtransparency="true"></iframe>  
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default close_button" data-dismiss="modal">Close</button>
        <!--<button type="button" class="btn btn-primary">Save changes</button>-->
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
  <!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<script type="text/javascript">
var outtime;
	
document.addEventListener("visibilitychange", function (event) {
	if(document.visibilityState=="hidden"){
	  outtime = new Date();
	}else{
		if(document.visibilityState=="visible"){
			intime = new Date();
			var minsDiff = Math.floor((intime.getTime()/(1000*60) - outtime.getTime()/(1000*60)));
			if(minsDiff>=10){
				 location.reload();
			}
		}
	}
});
</script>
</html>