<div class="centering" style="width:1100px;margin-top: 1%;">
	<div id='pihak_pilih' style="border: 1px solid #ffffff;">
		<div class="detil" style="padding: 2px;background-color: white;">
			<?php
			if($error==TRUE){
				if($error_message=='404'){
					show_404();
					exit();
				}else{
					echo "<h1>".$error_message."</h1>";
				}
				echo '<input type="button" id="close_form_putusan" value="Kembali" class="btn">';
			}
			?>
			<form id="frm_putusan" style="background:white;margin:0;" method="post" action="<?php echo base_url().'managePutusanAkhir/validateInputPemberitahuan';?>">
				<table id='infoPerkara' style="font-size:14px;width:100%;">
					<col width="20%">
					<col width="80%">
					<tbody>
					<?php
					if($idalurperkara==2){
						$status = 'Penetapan';
					}elseif($status_diversi==1){
						$status = 'Penetapan';
					}else{
						$status = 'Putusan';
					}
					if ($this->authorization->HasRuleEditPendaftaran($idalurperkara, $idperkara) || $this->authorization->HasRuleEditPemberitahuanPutusan($idalurperkara, $idperkara) || ($idalurperkara==9 AND $this->authorization->HasRuleFormHakimPanitera($idperkara))){
					?>	
						<tr>
							<td colspan="2" style="background-color: white;font-size:18px;text-align:center">DATA PEMBERITAHUAN <?php echo strtoupper($status);?></td>
						</tr>
						<tr>
							<td id="first-child" style="vertical-align:top;">Tanggal Putusan</td>
							<td><font color="#259FD3"><strong><?php echo (!empty($tanggal_putusan)? $tanggal_putusan:'');?></strong></font></td>
						</tr>
						<tr>
							<td id="first-child" style="vertical-align:top;">Pemberitahuan <?php echo $status;?></td>
							<td>
								<?php
								if($verstek!='Y'){
									if($pihak_pertama!=''){
										if($pihak_pertama->num_rows>0){								
								?>
									<div class="cssTable">
										<table id="tableinfo" style="margin:0px;padding:0px;">
											<col width="20%">
											<col width="45%">
											<col width="35%">
											<tbody>
												<tr>
													<td>Status</td>
													<td>Nama</td>
													<td>Tanggal Pemberitahuan  <?php echo $status;?></td>
												</tr>
													<?php
													$i=1;
													foreach ($pihak_pertama->result() as $row) {
														$id = 'pem_pihak_1_'.$row->id;
														echo '<tr>';
															echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,1).' '; echo ($pihak_pertama->num_rows>1)?$row->urutan:'';echo '</td>';
															echo '<td>'.$row->nama.'</td>';
															$tgl = (!empty($row->tanggal_pemberitahuan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_pemberitahuan_putusan):'';
															echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
															echo '<script type="text/javascript">';
															echo '$("#'.$id.'").datepicker({
																	inline: true,
																	showOtherMonths: true,
																	dateFormat: "dd/mm/yy",
																	dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
																	beforeShowDay: $.datepicker.noWeekends,
																	beforeShowDay:$.datepicker.noWeekends,
																	onSelect: function(dateText, inst) {
																		var tmp = $(this).val().split("/");
																		var tmp2 = $("#curr_date").val().split("/");
																		if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																			message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																			message_error_show(message);
																			$(this).val("");
																			$(this).css("background-color", "red");
																		}else{
																			$(this).css("background-color", "#dedbdb");
																		}
																	}
																});';
															echo'</script>';
														echo '</tr>';
													}?>
													</tbody>
												</table>
											</div>
										<?php
										}
									}
								}
									?>	
								<br>
									<?php
									if($pihak_kedua!=''){
										if($pihak_kedua->num_rows>0){
									?>
										<div class="cssTable">
											<table id="tableinfo" style="margin:0px;padding:0px;">
												<col width="20%">
												<col width="45%">
												<col width="35%">
												<tbody>
													<tr>
														<td>Status</td>
														<td>Nama</td>
														<td>Tanggal Pemberitahuan  <?php echo $status;?></td>
													</tr>
													<?php
													$i=1;
													foreach ($pihak_kedua->result() as $row) {
														$id = 'pem_pihak_2_'.$row->id;
														echo'<tr>';
															echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,2).' '; echo ($pihak_kedua->num_rows>1)?$row->urutan:'';echo '</td>';
															echo '<td>'.$row->nama.'</td>';
															$tgl = (!empty($row->tanggal_pemberitahuan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_pemberitahuan_putusan):'';
															echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
															echo'<script type="text/javascript">';
															echo '$("#'.$id.'").datepicker({
																	inline: true,
																	showOtherMonths: true,
																	dateFormat: "dd/mm/yy",
																	dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
																	beforeShowDay:$.datepicker.noWeekends,
																	onSelect: function(dateText, inst) {
																		var tmp = $(this).val().split("/");
																		var tmp2 = $("#curr_date").val().split("/");
																		if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																			message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																			message_error_show(message);
																			$(this).css("background-color", "red");
																			$(this).val("");
																		}else{
																			$(this).css("background-color", "#dedbdb");
																		}
														        	}
														      	});';
															echo'</script>';
														echo'</tr>';
													}?>
													</tbody>
											</table>
										</div>
									<?php
										}
									}
									?>
									<?php
									if($idalurperkara==120 OR $idalurperkara==121){
									?>
										<div class="cssTable">
											<table id="tableinfo" style="margin:0px;padding:0px;">
												<col width="65%">
												<col width="35%">
												<tbody>
													<tr>
														<td>Status</td>
														<td>Tanggal Pemberitahuan Putusan</td>
													</tr>
													<tr>
														<td>Atasan Yang Berhak Menghukum</td>
														<td><input id="tglANKUM" name="tglANKUM" value="<?php echo $tglANKUM; ?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>
													</tr>
													<tr>
														<td>Perwira Penyerah Perkara</td>
														<td><input id="tglPEPERA" name="tglPEPERA" value="<?php echo $tglPEPERA; ?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>
													</tr>
												</tbody>
											</table>
										</div>
									<?php 
									} ?>
								</br>
									<?php
									if($pihak_ketiga!=''){
										if($pihak_ketiga->num_rows>0){
									?>
										<div class="cssTable">
											<table id="tableinfo" style="margin:0px;padding:0px;">
												<col width="20%">
												<col width="45%">
												<col width="35%">
												<tbody>
													<tr>
														<td>Status</td>
														<td>Nama</td>
														<td>Tanggal Pemberitahuan  <?php echo $status;?></td>
													</tr>
													<?php
													$i=1;
													foreach ($pihak_ketiga->result() as $row) {
														$status_intervensi = '';
														if($this->session->userdata('jenis_pengadilan')==3){
															if($row->tergabung_ke_pihak==1)
																$status_intervensi = 'Penggugat II ';
															if($row->tergabung_ke_pihak==2)
																$status_intervensi = 'Tergugat II ';
														}
														$id = 'pem_pihak_3_'.$row->id;
														echo '<tr>';
															echo '<td>'.$status_intervensi.$this->nativesession->getStatusPihak(10,$idalurperkara,3).' '; echo ($pihak_ketiga->num_rows>1)?$row->urutan:'';echo '</td>';
															echo '<td>'.$row->nama.'</td>';
															$tgl = (!empty($row->tanggal_pemberitahuan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_pemberitahuan_putusan):'';
															echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
														echo '<script type="text/javascript">';
															echo '$("#'.$id.'").datepicker({
														            inline: true,
														            showOtherMonths: true,
														            dateFormat: "dd/mm/yy",
														            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
														            beforeShowDay:$.datepicker.noWeekends,
														            onSelect: function(dateText, inst) {
														            	var tmp = $(this).val().split("/");
																		var tmp2 = $("#curr_date").val().split("/");
																		if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																			message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																			message_error_show(message);
																			$(this).css("background-color", "red");
																		}else{
																			$(this).css("background-color", "#dedbdb");
																		}
														        	}
														      	});';
															echo '</script>';
														echo '</tr>';
													}?>
													</tbody>
											</table>
										</div>
									<?php
										}
									}
									?>
								</br>
									<?php
									if($pihak_keempat!=''){
										if($pihak_keempat->num_rows>0){
									?>
										<div class="cssTable">
											<table id="tableinfo" style="margin:0px;padding:0px;">
												<col width="20%">
												<col width="45%">
												<col width="35%">
												<tbody>
													<tr>
														<td>Status</td>
														<td>Nama</td>
														<td>Tanggal Pemberitahuan  <?php echo $status;?></td>
													</tr>
													<?php
													$i=1;
													foreach ($pihak_keempat->result() as $row) {
														$id = 'pem_pihak_4_'.$row->id;
														echo '<tr>';
															echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,4).' '; echo ($pihak_keempat->num_rows>1)?$row->urutan:'';echo '</td>';
															echo '<td>'.$row->nama.'</td>';
															$tgl = (!empty($row->tanggal_pemberitahuan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_pemberitahuan_putusan):'';
															echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
														echo '<script type="text/javascript">';
															echo '$("#'.$id.'").datepicker({
														            inline: true,
														            showOtherMonths: true,
														            dateFormat: "dd/mm/yy",
														            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
														            beforeShowDay:$.datepicker.noWeekends,
														            onSelect: function(dateText, inst) {
														            	var tmp = $(this).val().split("/");
																		var tmp2 = $("#curr_date").val().split("/");
																		if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																			message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																			message_error_show(message);
																			$(this).css("background-color", "red");
																		}else{
																			$(this).css("background-color", "#dedbdb");
																		}
														        	}
														      	});';
															echo '</script>';
														echo '</tr>';
													}?>
													</tbody>
											</table>
										</div>
									<?php
										}
									}
									?>
							</td>
						</tr>
						<?php
						if($idalurperkara>100 AND $idalurperkara!=119 AND $idalurperkara!=123){
							if($status_diversi!=1){
						?>
							<tr>
								<td id="first-child" style="vertical-align:top;">Menerima Putusan</td>
								<td>
										<?php
										if($pihak_pertama!=''){
											if($pihak_pertama->num_rows>0){
										?>
											<div class="cssTable">
												<table id="tableinfo" style="margin:0px;padding:0px;">
													<col width="20%">
													<col width="45%">
													<col width="35%">
													<tbody>
														<tr>
															<td>Status</td>
															<td>Nama</td>
															<td>Tanggal Menerima Putusan</td>
														</tr>
														<?php
														$i=1;
														foreach ($pihak_pertama->result() as $row) {
															$id = 'terima_pihak_1_'.$row->id;
															echo '<tr>';
																echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,1).' '; echo ($pihak_pertama->num_rows>1)?$row->urutan:'';echo '</td>';
																echo '<td>'.$row->nama.'</td>';
																$tgl = (!empty($row->tanggal_menerima_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_menerima_putusan):'';
																echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
																echo '<script type="text/javascript">';
																echo '$("#'.$id.'").datepicker({
															            inline: true,
															            showOtherMonths: true,
															            dateFormat: "dd/mm/yy",
															            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
															            beforeShowDay:$.datepicker.noWeekends,
															            onSelect: function(dateText, inst) {
															            	var tmp = $(this).val().split("/");
																			var tmp2 = $("#curr_date").val().split("/");
																			if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																				message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																				message_error_show(message);
																				$(this).css("background-color", "red");
																			}else{
																				$(this).css("background-color", "#dedbdb");
																			}
															        	}
															      	});';
																echo '</script>';
															echo '</tr>';
														}?>
														</tbody>
													</table>
												</div>
										<?php
											}
										}
										?>
									<br>
									
										<?php
										if($pihak_kedua!=''){
											if($pihak_kedua->num_rows>0){
										?>
											<div class="cssTable">
												<table id="tableinfo" style="margin:0px;padding:0px;">
													<col width="20%">
													<col width="45%">
													<col width="35%">
													<tbody>
														<tr>
															<td>Status</td>
															<td>Nama</td>
															<td>Tanggal Menerima Putusan</td>
														</tr>
														<?php
														$i=1;
														foreach ($pihak_kedua->result() as $row) {
															$id = 'terima_pihak_2_'.$row->id;
															echo '<tr>';
																echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,2).' '; echo ($pihak_kedua->num_rows>1)?$row->urutan:'';echo '</td>';
																echo '<td>'.$row->nama.'</td>';
																$tgl = (!empty($row->tanggal_menerima_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_menerima_putusan):'';
																echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
															echo '<script type="text/javascript">';
																echo '$("#'.$id.'").datepicker({
															            inline: true,
															            showOtherMonths: true,
															            dateFormat: "dd/mm/yy",
															            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
															            beforeShowDay:$.datepicker.noWeekends,
															            onSelect: function(dateText, inst) {
															            	var tmp = $(this).val().split("/");
																			var tmp2 = $("#curr_date").val().split("/");
																			if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																				message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																				message_error_show(message);
																				$(this).css("background-color", "red");
																			}else{
																				$(this).css("background-color", "#dedbdb");
																			}
															        	}
															      	});';
																echo '</script>';
															echo '</tr>';
														}?>
														</tbody>
													</table>
												</div>
												<?php
											}
										}?>
								</td>
							</tr>
							<?php
							}
							?>
							<tr>
								<td id="first-child" style="vertical-align:top;">Kirim Salinan  <?php echo $status;?></td>
								<td>
									<?php
										if($pihak_pertama!=''){
											if($pihak_pertama->num_rows>0){
										?>
											<div class="cssTable">
												<table id="tableinfo" style="margin:0px;padding:0px;">
													<col width="20%">
													<col width="45%">
													<col width="35%">
													<tbody>
														<tr>
															<td>Status</td>
															<td>Nama</td>
															<td>Tanggal Kirim Salinan</td>
														</tr>
														<?php
														$i=1;
														foreach ($pihak_pertama->result() as $row) {
																												
															$id = 'salin_pihak_1_'.$row->id;
															echo '<tr>';
																echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,1).' '; echo ($pihak_pertama->num_rows>1)?$row->urutan:'';echo '</td>';
																echo '<td>'.$row->nama.'</td>';
																$tgl = (!empty($row->tanggal_kirim_salinan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_kirim_salinan_putusan):'';
																echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
																echo '<script type="text/javascript">';
																echo '$("#'.$id.'").datepicker({
															            inline: true,
															            showOtherMonths: true,
															            dateFormat: "dd/mm/yy",
															            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
															            beforeShowDay:$.datepicker.noWeekends,
															            onSelect: function(dateText, inst) {
															            	var tmp = $(this).val().split("/");
																			var tmp2 = $("#curr_date").val().split("/");
																			if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																				message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																				message_error_show(message);
																				$(this).css("background-color", "red");
																			}else{
																				$(this).css("background-color", "#dedbdb");
																			}
															        	}
															      	});';
																echo '</script>';
															echo '</tr>';
														}?>
														</tbody>
													</table>
												</div>
											<?php
											}
										}?>	
									<br>
										<?php
										if($pihak_kedua!=''){
											if($pihak_kedua->num_rows>0){
										?>
											<div class="cssTable">
												<table id="tableinfo" style="margin:0px;padding:0px;">
													<col width="20%">
													<col width="45%">
													<col width="35%">
													<tbody>
														<tr>
															<td>Status</td>
															<td>Nama</td>
															<td>Tanggal Kirim Salinan</td>
														</tr>
														<?php
														$i=1;
														foreach ($pihak_kedua->result() as $row) {
															$id = 'salin_pihak_2_'.$row->id;
															echo '<tr>';
																echo '<td>'.$this->nativesession->getStatusPihak(10,$idalurperkara,2).' '; echo ($pihak_kedua->num_rows>1)?$row->urutan:'';echo '</td>';
																echo '<td>'.$row->nama.'</td>';
																$tgl = (!empty($row->tanggal_kirim_salinan_putusan))? $this->tanggalhelper->convertToInputDate($row->tanggal_kirim_salinan_putusan):'';
																echo '<td><input id="'.$id.'" name="'.$id.'" value="'.$tgl.'" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun"></td>';
															echo '<script type="text/javascript">';
																echo '$("#'.$id.'").datepicker({
															            inline: true,
															            showOtherMonths: true,
															            dateFormat: "dd/mm/yy",
															            dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
															            beforeShowDay:$.datepicker.noWeekends,
															            onSelect: function(dateText, inst) {
															            	var tmp = $(this).val().split("/");
																			var tmp2 = $("#curr_date").val().split("/");
																			if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
																				message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
																				message_error_show(message);
																				$(this).css("background-color", "red");
																			}else{
																				$(this).css("background-color", "#dedbdb");
																			}
															        	}
															      	});';
																echo '</script>';
															echo '</tr>';
														}?>
														</tbody>
													</table>
												</div>
										<?php
											}
										}?>
								</td>
							</tr>
							<tr>
								<td id="first-child" style="vertical-align:top;">Kirim Salinan <?php echo $status;?> Kepada Penyidik</td>
								<td>
									<input id="tgl_kirim_salinan_penyidik" name="tgl_kirim_salinan_penyidik" value="<?php echo (!empty($tgl_kirim_salinan_penyidik)? $tgl_kirim_salinan_penyidik:'');?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun">
								</td>
							</tr>
						<?php
							}
						}
						if(($this->authorization->HasRuleEditDataBanding($idalurperkara, $idperkara) AND $idalurperkara==9) OR $this->authorization->HasRuleEditPendaftaran($idalurperkara, $idperkara) || $this->authorization->HasRuleEditPemberitahuanPutusan($idalurperkara, $idperkara)
							AND $this->session->userdata('idgroup')!=600) {
						?>
						<tr>
							<td id="first-child">Tanggal Minutasi</td>
							<td>
								<input id="tgl_minutasi" name="tgl_minutasi" value="<?php echo (!empty($tgl_minutasi)? $tgl_minutasi:'');?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun">
							</td>
						</tr>
						<?php }?>
						<tr>
							<td id="first-child">Keterangan</td>
							<td>
								<textarea class="standard-input" id="keterangan" name ="keterangan" style="width: 100%; height: 70px;resize: none;"><?php echo (!empty($keterangan) ? $keterangan : '');?></textarea>
							</td>
							<input type="hidden" id="curr_date" value="<?php echo $current_date;?>">
							<input type="hidden" id="enc" name="enc" value="<?php echo $enc;?>">
							<input type="hidden" id="enc_alur" name="enc_alur" value="<?php echo $enc_alur;?>">
							<input type="hidden" id="act" name="act" value="<?php echo $act;?>">
						</tr>
						<tr>
							<td colspan="2" style="background:white;border:0px;" align="center">
								<input type="button" id='close_form_putusan' value="Kembali" class="btn">
								<input type="submit" id="simpan" value="Simpan" class="btn">
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
// $('#close_form_putusan').closingFormWin();
<?php 
if($this->session->userdata('jenis_pengadilan')==1){
?>
    $('#close_form_putusan').click(function(){
        window.open("<?php echo base_url('perkara_detil/'.$enc.'/10');?>","_self");    
    });
<?php
}else if($this->session->userdata('jenis_pengadilan')==2){
?>
    $('#close_form_putusan').click(function(){
        window.open("<?php echo base_url('perkara_detil_mil/'.$enc.'/10');?>","_self");    
    });    
<?php
}else if($this->session->userdata('jenis_pengadilan')==3){
?>
    $('#close_form_putusan').click(function(){
        window.open("<?php echo base_url('perkara_detil_tun/'.$enc.'/10');?>","_self");    
    });
<?php
}else if($this->session->userdata('jenis_pengadilan')==4){
?>
    $('#close_form_putusan').click(function(){
        window.open("<?php echo base_url('perkara_detil_agama/'.$enc.'/10');?>","_self");    
    });        
<?php
}else{
?>
    $('#close_form_putusan').closingFormWin();
<?php
}
?> 
$('#frm_putusan').SubmitHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'#close_form_putusan',
	whenStatus:1,
	next_step:1
});


$("#tglANKUM").datepicker({
	inline: true,
	showOtherMonths: true,
	dateFormat: "dd/mm/yy",
	dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
	beforeShowDay:$.datepicker.noWeekends
});

$("#tglPEPERA").datepicker({
	inline: true,
	showOtherMonths: true,
	dateFormat: "dd/mm/yy",
	dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
	beforeShowDay:$.datepicker.noWeekends
});


$("#tgl_kirim_salinan_penyidik").datepicker({
	inline: true,
	showOtherMonths: true,
	dateFormat: "dd/mm/yy",
	dayNamesMin: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"],
	beforeShowDay:$.datepicker.noWeekends,
	onSelect: function(dateText, inst) {
		var tmp = $(this).val().split("/");
		var tmp2 = $("#curr_date").val().split("/");
		if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
			message = "Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal "+$("#curr_date").val();
			message_error_show(message);
			$("#tgl_kirim_salinan_penyidik").val('');
			$(this).css("background-color", "red");
		}else{
			$(this).css("background-color", "#dedbdb");
		}
	}
});
$('#tgl_minutasi').datepicker({
            inline: true,
            showOtherMonths: true,
            dateFormat: 'dd/mm/yy',
            dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
            beforeShowDay:$.datepicker.noWeekends,
            onSelect: function(dateText, inst) {
            	var error = 0;
				var tmp = $(this).val().split("/");
				var tmp2 = $('#curr_date').val().split("/");
				if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
					message = 'Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal '+$('#curr_date').val();
					message_error_show(message);
					$('#tgl_minutasi').val('');
					$(this).css("background-color", "red");
				}else{
					$(this).css("background-color", "#dedbdb");
				}
        	}
      	});
$('.datepicker').ValidateDateInput();
function refreshDataPutusan(){
	openLoadingDialog();
	$("#popup_form").remove();
	popup_form('<?php echo base_url("add_putusan_akhir/".$enc."/update");?>')
	$("#popup_form").hide();
	closeLoading()
}
</script>
