<?php 
include "koneksi.php";
if (!isset($_SESSION["UserID"]))
{
	header("location:login.php?p=3");
}
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
  <head>
  <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
  <link rel="icon" type="image/png" href="images/mhb.jpeg">
	<title> PT MULTI HYDRACHROM BALIKPAPAN </title>
						<?php
						include "part/menu2.php";
					?>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta charset="UTF-8">


<style>

</style>
	<?php
		include "part/jss.php";
	?>
	
  </head>
  <body>
	
	<div  style="width:1280px; height:100px" class="container">
	
			<div class="" href="#">
            <div style="display: block; margin-left: auto; margin-right: auto; width: 1000px;  height:100px;"><img style="width: 1000px;  height:180px;" src="images/hd.jpg"></div>
            <div>
                <center>
                    <h1>PT. MULTI HIDRACHROM BALIKPAPAN</h1>
                </center>
            </div>
            <div>
                <center>
                    <h4>PROFESIONAL INFORMATION SYSTEM</h4>
                </center>
            </div>
        </div>		
		<div center>
			
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  Testing YES!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Testing NO!
							</div>
						<?php
					}
					else if ($p=="3")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Gambar gagal untuk diupload!
							</div>
						<?php
					}
					else if ($p=="4")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Ukuran gambar yang diupload tidak boleh lebih dari 1MB!
							</div>
						<?php
					}
					else if ($p=="5")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Maaf, Tipe gambar yang diupload harus JPG / JPEG / PNG!
							</div>
						<?php
					}
				}

				if (isset($_GET['pesan'])) {
					if ($_GET['pesan'] == "berhasilInput") {
						echo "<div class='alert alert-success' role='alert'> Berhasil Input DB. </div>";
					}
					// if ($_GET['pesan'] == "berhasilInput") {
					// 	echo "<div class='alert alert-danger' role='alert'> Berhasil Input DB. </div>";
					// }
				}
				?>
				<?php
					if(isset($_POST['submit']))  
				 {  
				   $toleransi = $_POST['toleransi'];
				   echo "toleransi ".$toleransi."<br>";
				 }
				?>
<?php
	if(isset($_POST['enter']))  
				 {  
				   $job = $_POST['job'];
				   $mhb_id = $_POST['mhb_id_assy_parsial'];
				   $mhb_id_single = $_POST['mhb_id_single'];
				   $combo1 = $_POST['combo1'];

				   
				   
				   //echo "ini job ".$job."<br>";  
				   //echo "id assy ".$mhb_id."<br>";
				   //echo "id single ".$mhb_id_single."<br>";
				   //echo "id testing ".$combo1."<br>";
				 }
?>
<?php
			    $mhb_id=mysqli_real_escape_string($conn,$_GET["mhb_id"]);
				$q="SELECT * FROM barang_job WHERE no_mhb_id='$mhb_id'";
						$res=mysqli_query($conn,$q);
						$dataUser=mysqli_fetch_assoc($res);
						$status = $dataUser["status"];
						$testing = $dataUser["testing"]; // 1= yes 2=no
						$no_mhb_id = $dataUser["no_mhb_id"];   
                        $nama_customer = $dataUser["nama_customer"];
                        $no_surat_jalan_customer = $dataUser["no_surat_jalan_customer"];
						$nama_komponen = $dataUser["nama_komponen"];
                        $model_komponen = $dataUser["model_komponen"];
                        $part_number = $dataUser["part_number"];	
                        $tanggal_receiving = $dataUser["tanggal_receiving"];
                        $nama_gambar = $dataUser["nama_gambar"];						
						
?>
<form method="POST" action="simpanFormMhbFrQc00103.php?id=<?php echo $no_mhb_id ?>" enctype="multipart/form-data">
<h3 align="left">Quality Control</h3>
				  <label align="left" for="exampleInputPassword1">Form Report Inspection Eye Diameter (MHB-FR-QC-001-03) </label>
<br><br><br><br>
<div >
<table class="table table-dark table-striped">
 <thead>
 <tr>
 <th>Customer</th>
 <td><?php echo $nama_customer ?></td>
 <th>MHB ID</th>
 <td><?php echo $no_mhb_id ?></td>
 </tr>
 </thead>
 <tbody>
 <tr>
 <th>Cust. Ref.</th>
 <td><?php echo $no_surat_jalan_customer ?></td>
 <th>Income Date</th>
 <td><?php echo $tanggal_receiving ?></td>
 </tr>
 <tr>
 <th>Part Name</th>
 <td><?php echo $nama_komponen ?></td>
 <th>Inspection Date</th>
 <td><?php echo date('d-m-Y');?></td>
 </tr>
 <tr>
 <th>Model</th>
 <td><?php echo $model_komponen ?></td>
 <th>Form</th>
 <td>
     <div class="form-check form-check-inline">			  
		<input type="radio" name="form" value="1" checked> WAR
		<input type="radio" name="form" value="2" checked> Pre
		<input type="radio" name="form" value="3" checked> MFG
	 </div>
 </tr>
 <tr>
 <th>Part No</th>
 <td><?php echo $part_number ?></td>
 <th>No. Doc</th>
 <td> MHB-FR-QC-001-03</td>
 </tr>
 </tbody>
 </table>
 </div>
 <table border=0 width="80%" align="center" >
		    <tr>
                <td bgcolor="#00BFFF" colspan="8" align="center"><font color="white">Assy or Parsial</td>
            </tr>
           <tr>
                <td bgcolor="#00BFFF" colspan="8" align="center"><font color="white">ROD EYE (Bearing R7, Bushing H7 or OEM)</td>
            </tr>
			<tr>
			    <td colspan="8" align="center" ><?php echo "<img src='Receiving/$nama_gambar' width='300' height='2000' />";?></td>
        
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   
				</td>
                <td bgcolor="#DCDCDC" align="center">Toleransi</td>
				<td colspan="2" align="center">
					<?php
										$toleransi;
										if ($toleransi == 0)
										{
											?>
												<input readonly type="text" id="toleransi"  value= "0"/>
											<?php
										}
										else if ($toleransi == 1)
										{
											?>
												<input readonly type="text" id="toleransi"  value= "f6" name="ass"/>
											<?php
										}
										else if ($toleransi == 2)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "f7" name="ass"/>
											<?php
										}
										else if ($toleransi == 3)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g5" name="ass"/>
											<?php
										}
										else if ($toleransi == 4)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g6" name="ass"/>
											<?php
										}
										else if ($toleransi == 5)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g7" name="ass"/>
											<?php
										}
										else if ($toleransi == 6)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h4" name="ass"/>
											<?php
										}
										else if ($toleransi == 7)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h5" name="ass"/>
											<?php
										}
										else if ($toleransi == 8)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h6" name="ass"/>
											<?php
										}
										else if ($toleransi == 9)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h7" name="ass"/>
											<?php
										}
										else if ($toleransi == 10)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h8" name="ass"/>
											<?php
										}
										else if ($toleransi == 11)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "F8" name="ass"/>
											<?php
										}
										else if ($toleransi == 12)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G6" name="ass"/>
											<?php
										}
										else if ($toleransi == 13)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G7" name="ass"/>
											<?php
										}
										else if ($toleransi == 14)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G8" name="ass"/>
											<?php
										}
										else if ($toleransi == 15)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H6" name="ass"/>
											<?php
										}
										else if ($toleransi == 16)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H7" name="ass"/>
											<?php
										}
										else if ($toleransi == 17)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H8" name="ass"/>
											<?php
										}
										else if ($toleransi == 18)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H9" name="ass"/>
											<?php
										}
										else if ($toleransi == 19)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H10" name="ass"/>
											<?php
										}
										else if ($toleransi == 20)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H11" name="ass"/>
											<?php
										}
							?>
				</td>
				
				
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div  class="form-check form-check-inline">			  
						<input type="radio" name="ukuranSurfaceID" value="1" checked> mm
						<input type="radio" name="ukuranSurfaceID" value="2" checked> Inch
	               </div>
				</td>
                <td bgcolor="#DCDCDC" align="center">Size</td>
				<td colspan="2" align="center">
					<input type="text" id="txt1" name="sizeSurviceID" onkeyup="sum();" />
				</td>
				
				
            </tr>
			<tr>
                <td rowspan="2" align="center"></td>
                <td bgcolor="#DCDCDC"  align="center">Upper</td>  
                <td colspan="2" align="center">
					<input readonly type="text" id="uper" name="upperSurviceID"/>
				</td>
              				
			</tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">Lower</td>
				<td colspan="2" align="center">
					<input readonly type="text" id="lower"  name="lowerSurviceID"/>
				</td>
				
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">No.</td>
                <td width="200px" align="center">X</td>
				<td width="200px" align="center"></td>
				<td width="200px" align="center">Y</td>
				<td width="200px" align="center"></td>
				<td width="200px" align="center">Z</td>
				<td width="200px" align="center"></td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">1.</td>
                <td width="200px" align="center">
					<input width="50px" name="x1SurviceID" type="text" id="x1SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x1SurviceIDstatus" type="text" id="x1SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y1SurviceID" type="text" id="y1SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y1SurviceIDstatus" type="text" id="y1SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z1SurviceID" type="text" id="z1SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z1SurviceIDstatus" type="text" id="z1SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">2.</td>
                <td width="200px" align="center">
					<input width="50px" name="x2SurviceID" type="text" id="x2SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x2SurviceIDstatus" type="text" id="x2SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y2SurviceID" type="text" id="y2SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y2SurviceIDstatus" type="text" id="y2SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z2SurviceID" type="text" id="z2SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z2SurviceIDstatus" type="text" id="z2SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">3.</td>
                <td width="200px" align="center">
					<input width="50px" name="x3SurviceID" type="text" id="x3SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x3SurviceIDstatus" type="text" id="x3SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y3SurviceID" type="text" id="y3SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y3SurviceIDstatus" type="text" id="y3SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z3SurviceID" type="text" id="z3SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z3SurviceIDstatus" type="text" id="z3SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">4.</td>
                <td width="200px" align="center">
					<input width="50px" name="x4SurviceID" type="text" id="x4SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x4SurviceIDstatus" type="text" id="x4SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y4SurviceID" type="text" id="y4SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y4SurviceIDstatus" type="text" id="y4SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z4SurviceID" type="text" id="z4SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z4SurviceIDstatus" type="text" id="z4SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">5.</td>
                <td width="200px" align="center">
					<input width="50px" name="x5SurviceID" type="text" id="x5SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x5SurviceIDstatus" type="text" id="x5SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y5SurviceID" type="text" id="y5SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y5SurviceIDstatus" type="text" id="y5SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z5SurviceID" type="text" id="z5SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z5SurviceIDstatus" type="text" id="z5SurviceIDstatus">
			    </td>
            </tr>
			<tr>
				<td>
					Widdth Clevis :
				</td>
				<td>
					<input width="50px" name="widthClevisRodEye" type="text">
				</td>
			</tr>
        </table>
<br><br><br><br>
<table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#00BFFF" colspan="4" align="center"><font color="white">Condition Rod Eye</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
				<td align ="center">
					<input type="checkbox" name="conditionRodEye[]" value="Oval"> Oval
					<input type="checkbox" name="conditionRodEye[]" value="Oversize"> Oversize
					<input type="checkbox" name="conditionRodEye[]" value="Demage"> Demage
					<input type="checkbox" name="conditionRodEye[]" value="Corrosion"> Corrosion
					<input type="checkbox" name="conditionRodEye[]" value="Clevis Worn Out"> Clevis Worn Out
					<input type="checkbox" name="conditionRodEye[]" value="Crack"> Crack 
					<input type="checkbox" name="conditionRodEye[]" value="Scratch"> Scratch			
				</td>
			</tr>

        </table>
<br>
<table border=0 width="80%" align="center" >
			<tr>
				<td align="center">
					Seal Dust 
				</td>
                <td >
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="conditionRodEyeSealDust" value="1" checked> Missing
						<input type="radio" name="conditionRodEyeSealDust" value="2" checked> Demage
						<input type="radio" name="conditionRodEyeSealDust" value="3" checked> Good Condition
						<input type="radio" name="conditionRodEyeSealDust" value="4" checked> Do not use
						<input type="radio" name="conditionRodEyeSealDust" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
			<tr>
				<td align="center">
					Snap Ring 
				</td>
                <td >
				   <div class="form-check form-check-inline" >
									   
						<input type="radio" name="conditionRodEyeSnapRing" value="1" checked> Missing
						<input type="radio" name="conditionRodEyeSnapRing" value="2" checked> Demage
						<input type="radio" name="conditionRodEyeSnapRing" value="3" checked> Good Condition
						<input type="radio" name="conditionRodEyeSnapRing" value="4" checked> Do not use
						<input type="radio" name="conditionRodEyeSnapRing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
			<tr>
				<td align="center">
					Fitting Grease 
				</td>
                <td >
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="conditionRodEyeFittingGrease" value="1" checked> Missing
						<input type="radio" name="conditionRodEyeFittingGrease" value="2" checked> Demage
						<input type="radio" name="conditionRodEyeFittingGrease" value="3" checked> Good Condition
						<input type="radio" name="conditionRodEyeFittingGrease" value="4" checked> Do not use
						<input type="radio" name="conditionRodEyeFittingGrease" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>

        </table>
<br><br><br><br><br><br><br><br>
<table border=0 width="75%" align="center" >
			<tr>
                <td bgcolor="#00BFFF" colspan="1" align="center"><font color="white">Recommendation Rod Eye</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
				   <td align ="center">
					<input type="checkbox" name="recommendationRodEye[]" value="Repair ID Eye"> Repair ID Eye
					<input type="checkbox" name="recommendationRodEye[]" value="Repair Face / Clevis"> Repair Face / Clevis
					<input type="checkbox" name="recommendationRodEye[]" value="Clean UP"> Clean UP
					<input type="checkbox" name="recommendationRodEye[]" value="MFG"> MFG
					<input type="checkbox" name="recommendationRodEye[]" value="Replace Seal Dust"> Replace Seal Dust
					<input type="checkbox" name="recommendationRodEye[]" value="Replace Nipple Grease"> Replace Nipple Grease 
					<input type="checkbox" name="recommendationRodEye[]" value="Replace Snap Ring"> Replace Snap Ring			
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#00BFFF" colspan="4" align="center"><font color="white">ID BUSHING / BEARING / BUSHING TRUNION (c6 or OEM)</td>
            </tr>
			<tr>
			    <td>-</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">Size</td>
				<td colspan="2">
					<input name="sizeIdBushingRodEye" type="text">
				</td>
				
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">No.</td>
                <td width="200px" align="center">X</td>
				<td width="200px" align="center">Y</td>
				<td width="200px" align="center">Z</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">1.</td>
                <td width="200px" align="center">
					<input width="50px" name="x1IdBushingRodEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y1IdBushingRodEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z1IdBushingRodEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">2.</td>
                <td width="200px" align="center">
					<input width="50px" name="x2IdBushingRodEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y2IdBushingRodEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z2IdBushingRodEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">3.</td>
                <td width="200px" align="center">
					<input width="50px" name="x3IdBushingRodEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y3IdBushingRodEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z3IdBushingRodEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">4.</td>
                <td width="200px" align="center">
					<input width="50px" name="x4IdBushingRodEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y4IdBushingRodEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z4IdBushingRodEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">5.</td>
                <td width="200px" align="center">
					<input width="50px" name="x5IdBushingRodEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y5IdBushingRodEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z5IdBushingRodEye" type="text">
				</td>
            </tr>
			<tr>
				<td colspan="2">
					Widdth Bushing :
				</td>
				<td>
					<input width="50px" name="widthClevisIdBushingRodEye" type="text">
				</td>
			</tr>
					<tr>
				<td colspan="2">
					Clearance between spherical and ball bearing :
				</td>
				<td>
					<input width="50px" name="ClearanceIdBushingRodEye" type="text">
				</td>
			</tr>
        </table>
<br><br><br><br>
<table border=0 width="44%" align="center" >
			<tr>
                <td bgcolor="#00BFFF" colspan="1" align="center"><font color="white">Condition</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="conditionRodEyeIdBushing" value="1" checked> Oval
						<input type="radio" name="conditionRodEyeIdBushing" value="2" checked> Oversize
						<input type="radio" name="conditionRodEyeIdBushing" value="3" checked> Damage
						<input type="radio" name="conditionRodEyeIdBushing" value="4" checked> Corrosion
						<input type="radio" name="conditionRodEyeIdBushing" value="5" checked> Crack
						<input type="radio" name="conditionRodEyeIdBushing" value="6" checked> Scratch
						<input type="radio" name="conditionRodEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="18%" align="center" >
			<tr>
                <td bgcolor="#00BFFF" colspan="1" align="center"><font color="white">Recommendation</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="recomendationRodEyeIdBushimg" value="1" checked> Replace
						<input type="radio" name="recomendationRodEyeIdBushimg" value="2" checked> Clean UP
						<input type="radio" name="recomendationRodEyeIdBushimg" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="30%" align="center" >
			<tr>
                <td bgcolor="#00BFFF" colspan="1" align="center"><font color="white">BRACKET CONDITION</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="bracketConditionRodEyeIdBushing" value="1" checked> Damage
						<input type="radio" name="bracketConditionRodEyeIdBushing" value="2" checked> Worn Out
						<input type="radio" name="bracketConditionRodEyeIdBushing" value="3" checked> Normal Condition
						<input type="radio" name="bracketConditionRodEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="26%" align="center" >
			<tr>
                <td bgcolor="#00BFFF" colspan="1" align="center"><font color="white">Recomendation Repair</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="recomendationRepairRodEyeIdBushing" value="1" checked> M-W-M
						<input type="radio" name="recomendationRepairRodEyeIdBushing" value="2" checked> MFG
						<input type="radio" name="recomendationRepairRodEyeIdBushing" value="3" checked> H/D
						<input type="radio" name="recomendationRepairRodEyeIdBushing" value="4" checked> Clean UP
						<input type="radio" name="recomendationRepairRodEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#FF6347" colspan="8" align="center"><font color="white">BARREL EYE (Bearing R7, Bushing H7 or OEM)</td>
            </tr>
			<tr>
			    <td colspan="8" align="center" ><?php echo "<img src='Receiving/$nama_gambar' width='300' height='2000' />";?></td>
        
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   
				</td>
                <td bgcolor="#DCDCDC" align="center">Toleransi</td>
				<td colspan="2" align="center">
					<?php
										$toleransi;
										if ($toleransi == 0)
										{
											?>
												<input readonly type="text" id="toleransi"  value= "0"/>
											<?php
										}
										else if ($toleransi == 1)
										{
											?>
												<input readonly type="text" id="toleransi"  value= "f6" name="ass"/>
											<?php
										}
										else if ($toleransi == 2)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "f7" name="ass"/>
											<?php
										}
										else if ($toleransi == 3)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g5" name="ass"/>
											<?php
										}
										else if ($toleransi == 4)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g6" name="ass"/>
											<?php
										}
										else if ($toleransi == 5)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "g7" name="ass"/>
											<?php
										}
										else if ($toleransi == 6)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h4" name="ass"/>
											<?php
										}
										else if ($toleransi == 7)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h5" name="ass"/>
											<?php
										}
										else if ($toleransi == 8)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h6" name="ass"/>
											<?php
										}
										else if ($toleransi == 9)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h7" name="ass"/>
											<?php
										}
										else if ($toleransi == 10)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "h8" name="ass"/>
											<?php
										}
										else if ($toleransi == 11)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "F8" name="ass"/>
											<?php
										}
										else if ($toleransi == 12)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G6" name="ass"/>
											<?php
										}
										else if ($toleransi == 13)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G7" name="ass"/>
											<?php
										}
										else if ($toleransi == 14)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "G8" name="ass"/>
											<?php
										}
										else if ($toleransi == 15)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H6" name="ass"/>
											<?php
										}
										else if ($toleransi == 16)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H7" name="ass"/>
											<?php
										}
										else if ($toleransi == 17)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H8" name="ass"/>
											<?php
										}
										else if ($toleransi == 18)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H9" name="ass"/>
											<?php
										}
										else if ($toleransi == 19)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H10" name="ass"/>
											<?php
										}
										else if ($toleransi == 20)
										{
											?>
											    <input readonly type="text" id="toleransi" value= "H11" name="ass"/>
											<?php
										}
							?>
				</td>
				
				
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div  class="form-check form-check-inline">			  
						<input type="radio" name="ukuranSurfaceID" value="1" checked> mm
						<input type="radio" name="ukuranSurfaceID" value="2" checked> Inch
	               </div>
				</td>
                <td bgcolor="#DCDCDC" align="center">Size</td>
				<td colspan="2" align="center">
					<input type="text" id="txt1" name="sizeSurviceID" onkeyup="sum();" />
				</td>
				
				
            </tr>
			<tr>
                <td rowspan="2" align="center"></td>
                <td bgcolor="#DCDCDC"  align="center">Upper</td>  
                <td colspan="2" align="center">
					<input readonly type="text" id="uper" name="upperSurviceID"/>
				</td>
              				
			</tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">Lower</td>
				<td colspan="2" align="center">
					<input readonly type="text" id="lower"  name="lowerSurviceID"/>
				</td>
				
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">No.</td>
                <td width="200px" align="center">X</td>
				<td width="200px" align="center"></td>
				<td width="200px" align="center">Y</td>
				<td width="200px" align="center"></td>
				<td width="200px" align="center">Z</td>
				<td width="200px" align="center"></td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">1.</td>
                <td width="200px" align="center">
					<input width="50px" name="x1SurviceID" type="text" id="x1SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x1SurviceIDstatus" type="text" id="x1SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y1SurviceID" type="text" id="y1SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y1SurviceIDstatus" type="text" id="y1SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z1SurviceID" type="text" id="z1SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z1SurviceIDstatus" type="text" id="z1SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">2.</td>
                <td width="200px" align="center">
					<input width="50px" name="x2SurviceID" type="text" id="x2SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x2SurviceIDstatus" type="text" id="x2SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y2SurviceID" type="text" id="y2SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y2SurviceIDstatus" type="text" id="y2SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z2SurviceID" type="text" id="z2SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z2SurviceIDstatus" type="text" id="z2SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">3.</td>
                <td width="200px" align="center">
					<input width="50px" name="x3SurviceID" type="text" id="x3SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x3SurviceIDstatus" type="text" id="x3SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y3SurviceID" type="text" id="y3SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y3SurviceIDstatus" type="text" id="y3SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z3SurviceID" type="text" id="z3SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z3SurviceIDstatus" type="text" id="z3SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">4.</td>
                <td width="200px" align="center">
					<input width="50px" name="x4SurviceID" type="text" id="x4SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x4SurviceIDstatus" type="text" id="x4SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y4SurviceID" type="text" id="y4SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y4SurviceIDstatus" type="text" id="y4SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z4SurviceID" type="text" id="z4SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z4SurviceIDstatus" type="text" id="z4SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">5.</td>
                <td width="200px" align="center">
					<input width="50px" name="x5SurviceID" type="text" id="x5SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x5SurviceIDstatus" type="text" id="x5SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y5SurviceID" type="text" id="y5SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y5SurviceIDstatus" type="text" id="y5SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z5SurviceID" type="text" id="z5SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z5SurviceIDstatus" type="text" id="z5SurviceIDstatus">
			    </td>
            </tr>
			<tr>
				<td>
					Widdth Clevis :
				</td>
				<td>
					<input width="50px" name="widthClevisRodEye" type="text">
				</td>
			</tr>
        </table>
<br><br><br><br>

<table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#FF6347" colspan="4" align="center"><font color="white">BARREL EYE (Bearing R7, Bushing H7 or OEM)</td>
            </tr>
			<tr>
			    <td>-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">			  
						<input type="radio" name="ukuranBarrelEye" value="1" checked> mm
						<input type="radio" name="ukuranBarrelEye" value="2" checked> Inch
	               </div>
				</td>
                <td bgcolor="#DCDCDC" align="center">Size</td>
				<td colspan="2">
					<input name="sizeBarrelEye" type="text">
				</td>
				
            </tr>
			<tr>
                <td rowspan="2"></td>
                <td bgcolor="#DCDCDC" align="center">Upper</td>  
                <td colspan="2">
					<input name="upperBarrelEye" type="text">
				</td>
              				
			</tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">Lower</td>
				<td colspan="2">
					<input name="lowerBarrelEye" type="text">
				</td>
				
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">No.</td>
                <td width="200px" align="center">X</td>
				<td width="200px" align="center">Y</td>
				<td width="200px" align="center">Z</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">1.</td>
                <td width="200px" align="center">
					<input width="50px" name="x1BarrelEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y1BarrelEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z1BarrelEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">2.</td>
                <td width="200px" align="center">
					<input width="50px" name="x2BarrelEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y2BarrelEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z2BarrelEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">3.</td>
                <td width="200px" align="center">
					<input width="50px" name="x3BarrelEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y3BarrelEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z3BarrelEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">4.</td>
                <td width="200px" align="center">
					<input width="50px" name="x4BarrelEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y4BarrelEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z4BarrelEye" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">5.</td>
                <td width="200px" align="center">
					<input width="50px" name="x5BarrelEye" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y5BarrelEye" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z5BarrelEye" type="text">
				</td>
            </tr>
			<tr>
				<td>
					Widdth Clevis :
				</td>
				<td>
					<input width="50px" name="widthClevisBarrelEye" type="text">
				</td>
			</tr>
        </table>
<br><br><br><br>
<table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#FF6347" colspan="4" align="center"><font color="white">Condition Barrel Eye</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="conditionBarrelEye" value="1" checked> Oval
						<input type="radio" name="conditionBarrelEye" value="2" checked> Oversize
						<input type="radio" name="conditionBarrelEye" value="3" checked> Demage
						<input type="radio" name="conditionBarrelEye" value="4" checked> Corrosion
						<input type="radio" name="conditionBarrelEye" value="5" checked> Clevis Worn Out
						<input type="radio" name="conditionBarrelEye" value="6" checked> Crack
						<input type="radio" name="conditionBarrelEye" value="7" checked> Scratch
						<input type="radio" name="conditionBarrelEye" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>

        </table>
<br>
<table border=0 width="80%" align="center" >
			<tr>
				<td align="center">
					Seal Dust 
				</td>
                <td >
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="sealDustBarrrelEye" value="1" checked> Missing
						<input type="radio" name="sealDustBarrrelEye" value="2" checked> Demage
						<input type="radio" name="sealDustBarrrelEye" value="3" checked> Good Condition
						<input type="radio" name="sealDustBarrrelEye" value="4" checked> Do not use
						<input type="radio" name="sealDustBarrrelEye" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
			<tr>
				<td align="center">
					Snap Ring 
				</td>
                <td >
				   <div class="form-check form-check-inline" >
									   
						<input type="radio" name="snapRingBarrelEye" value="1" checked> Missing
						<input type="radio" name="snapRingBarrelEye" value="2" checked> Demage
						<input type="radio" name="snapRingBarrelEye" value="3" checked> Good Condition
						<input type="radio" name="snapRingBarrelEye" value="4" checked> Do not use
						<input type="radio" name="snapRingBarrelEye" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
			<tr>
				<td align="center">
					Fitting Grease 
				</td>
                <td >
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="fittingGreaseBarrelEye" value="1" checked> Missing
						<input type="radio" name="fittingGreaseBarrelEye" value="2" checked> Demage
						<input type="radio" name="fittingGreaseBarrelEye" value="3" checked> Good Condition
						<input type="radio" name="fittingGreaseBarrelEye" value="4" checked> Do not use
						<input type="radio" name="fittingGreaseBarrelEye" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>

        </table>
<br><br><br><br><br><br><br><br>
<table border=0 width="75%" align="center" >
			<tr>
                <td bgcolor="#FF6347" colspan="1" align="center"><font color="white">Recommendation Barrel Eye</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="recomendationBarrelEye" value="1" checked> Repair ID Eye
						<input type="radio" name="recomendationBarrelEye" value="2" checked> Repair Face / Clevis
						<input type="radio" name="recomendationBarrelEye" value="3" checked> Clean UP
						<input type="radio" name="recomendationBarrelEye" value="4" checked> MFG
						<input type="radio" name="recomendationBarrelEye" value="5" checked> Replace Seal Dust
						<input type="radio" name="recomendationBarrelEye" value="6" checked> Replace Nipple Grease
						<input type="radio" name="recomendationBarrelEye" value="7" checked> Replace Snap Ring
						<input type="radio" name="recomendationBarrelEye" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br><br>
<table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#FF6347" colspan="4" align="center"><font color="white">ID BUSHING / BEARING / BUSHING TRUNION (c6 or OEM)</td>
            </tr>
			<tr>
			    <td>-</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">Size</td>
				<td colspan="2">
					<input name="sizeBarrelEyeIdBushing" type="text">
				</td>
				
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">No.</td>
                <td width="200px" align="center">X</td>
				<td width="200px" align="center">Y</td>
				<td width="200px" align="center">Z</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">1.</td>
                <td width="200px" align="center">
					<input width="50px" name="x1BarrelEyeIdBushing" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y1BarrelEyeIdBushing" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z1BarrelEyeIdBushing" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">2.</td>
                <td width="200px" align="center">
					<input width="50px" name="x2BarrelEyeIdBushing" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y2BarrelEyeIdBushing" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z2BarrelEyeIdBushing" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">3.</td>
                <td width="200px" align="center">
					<input width="50px" name="x3BarrelEyeIdBushing" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y3BarrelEyeIdBushing" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z3BarrelEyeIdBushing" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">4.</td>
                <td width="200px" align="center">
					<input width="50px" name="x4BarrelEyeIdBushing" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y4BarrelEyeIdBushing" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z4BarrelEyeIdBushing" type="text">
				</td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">5.</td>
                <td width="200px" align="center">
					<input width="50px" name="x5BarrelEyeIdBushing" type="text">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y5BarrelEyeIdBushing" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="z5BarrelEyeIdBushing" type="text">
				</td>
            </tr>
			<tr>
				<td colspan="2">
					Widdth Bushing :
				</td>
				<td>
					<input width="50px" name="widthClevisBarrelEyeIdBushing" type="text">
				</td>
			</tr>
					<tr>
				<td colspan="2">
					Clearance between spherical and ball bearing :
				</td>
				<td>
					<input width="50px" name="clearanceBarrelEyeIdBushing" type="text">
				</td>
			</tr>
        </table>
<br><br><br><br>
<table border=0 width="44%" align="center" >
			<tr>
                <td bgcolor="#FF6347" colspan="1" align="center"><font color="white">Condition</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="conditionBarrelEyeIdBushing" value="1" checked> Oval
						<input type="radio" name="conditionBarrelEyeIdBushing" value="2" checked> Oversize
						<input type="radio" name="conditionBarrelEyeIdBushing" value="3" checked> Damage
						<input type="radio" name="conditionBarrelEyeIdBushing" value="4" checked> Corrosion
						<input type="radio" name="conditionBarrelEyeIdBushing" value="5" checked> Crack
						<input type="radio" name="conditionBarrelEyeIdBushing" value="6" checked> Scratch
						<input type="radio" name="conditionBarrelEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="18%" align="center" >
			<tr>
                <td bgcolor="#FF6347" colspan="1" align="center"><font color="white">Recommendation</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="recomendationBarrelEyeIdBushing" value="1" checked> Replace
						<input type="radio" name="recomendationBarrelEyeIdBushing" value="2" checked> Clean UP
						<input type="radio" name="recomendationBarrelEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="30%" align="center" >
			<tr>
                <td bgcolor="#FF6347" colspan="1" align="center"><font color="white">HOLE THREAD</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="holeTreadBarrelEyeIdBushing" value="1" checked> Damage
						<input type="radio" name="holeTreadBarrelEyeIdBushing" value="2" checked> Worn Out
						<input type="radio" name="holeTreadBarrelEyeIdBushing" value="3" checked> Normal Condition
						<input type="radio" name="holeTreadBarrelEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
<table border=0 width="26%" align="center" >
			<tr>
                <td bgcolor="#FF6347" colspan="1" align="center"><font color="white">Recomendation Repair</td>
            </tr>
			<tr>
                <td width="200px" align ="center">-</td>
            </tr>
			<tr>
                <td>
				   <div class="form-check form-check-inline">			   
						<input type="radio" name="recomendationRepairBarrelEyeIdBushing" value="1" checked> M-W-M
						<input type="radio" name="recomendationRepairBarrelEyeIdBushing" value="2" checked> MFG
						<input type="radio" name="recomendationRepairBarrelEyeIdBushing" value="3" checked> H/D
						<input type="radio" name="recomendationRepairBarrelEyeIdBushing" value="4" checked> Clean UP
						<input type="radio" name="recomendationRepairBarrelEyeIdBushing" value="0" checked> Kosong	
	               </div>
				</td>
			</tr>
</table>
<br><br><br><br><br>
				  <div class="form-group" align="center">		
				  <p></p>
				  <br></br><br></br><br></br>
						<div class="container-fluid mt-3">
							<div class="row">
								<div class="col-md-3">
									<div class="card text-center shadow-lg  mb-5 bg-white rounded">
										<div class="card-header bg-info text-light">
											Upload Gambar <br/><br/><br/>
										</div>
										<div class="card-body">
											<form runat="server">
											  <input type='file' id="file" name="gambar" />
											  <img width="90px" class="img-fluid" id="gambar" src="#" alt="Pilih Gambar" OnError=" $(this).hide();"/>
											</form>
										</div>				
									</div>
								</div>
							</div>	
						</div>
				    <br></br><br></br><br></br>
				<input type="submit" value="Simpan" class="btn btn-primary"></input>
					| <a href="#"><button type="button" class="btn btn-danger">Kembali</button></a>
				</form>
				</br><br></br>


			
		<center><h5 class="form-signin">Copyright &copy; <a href="#" data-toggle="modal" data-target="#contact">SatrioPringgondani</a></h5></center>
<script type="text/javascript">
function readURL(input) {
  if (input.files && input.files[0]) {
    var reader = new FileReader();
    
    reader.onload = function(e) {
      $('#gambar').attr('src', e.target.result);
    }
    
    reader.readAsDataURL(input.files[0]); // convert to base64 string
  }
}

$("#file").change(function() {
	$('#gambar').show();
   readURL(this);
});

function sum() 
{
	var toleransi = document.getElementById('toleransi').value;
      var txtFirstNumberValue = document.getElementById('txt1').value;
	  var txtUper = document.getElementById('uper').value;
	  var txtLower = document.getElementById('lower').value;
	  
	  var x1SurviceID = document.getElementById('x1SurviceID').value;
	  var y1SurviceID = document.getElementById('y1SurviceID').value;
	  var z1SurviceID = document.getElementById('z1SurviceID').value;
	  
	  var x2SurviceID = document.getElementById('x2SurviceID').value;
	  var y2SurviceID = document.getElementById('y2SurviceID').value;
	  var z2SurviceID = document.getElementById('z2SurviceID').value;
	  
	  var x3SurviceID = document.getElementById('x3SurviceID').value;
	  var y3SurviceID = document.getElementById('y3SurviceID').value;
	  var z3SurviceID = document.getElementById('z3SurviceID').value;
	  
	  var x4SurviceID = document.getElementById('x4SurviceID').value;
	  var y4SurviceID = document.getElementById('y4SurviceID').value;
	  var z4SurviceID = document.getElementById('z4SurviceID').value;
	  
	  var x5SurviceID = document.getElementById('x5SurviceID').value;
	  var y5SurviceID = document.getElementById('y5SurviceID').value;
	  var z5SurviceID = document.getElementById('z5SurviceID').value;
	  

	  if (toleransi == 'f6')///f6
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.013';
			document.getElementById('lower').value = '0.022';
			$uper = txtFirstNumberValue - 0.013;
			$lower = txtFirstNumberValue - 0.022;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.016';
			document.getElementById('lower').value = '0.027';
			$uper = txtFirstNumberValue - 0.016;
			$lower = txtFirstNumberValue - 0.027;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.020';
			document.getElementById('lower').value = '0.033';
			$uper = txtFirstNumberValue - 0.020;
			$lower = txtFirstNumberValue - 0.033;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.041';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.041;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.041';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.041;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.049';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.049;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.049';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.049;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.058';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.058;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.058';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.058;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.068';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.068;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.068';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.068;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.068';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.068;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.079';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.079;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.079';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.079;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.079';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.079;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.088';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.088;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.088';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.088;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.098';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.098;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.098';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.098;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'f7')//f7
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.022';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.022;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.013';
			document.getElementById('lower').value = '0.028';
			$uper = txtFirstNumberValue - 0.013;
			$lower = txtFirstNumberValue - 0.028;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.016';
			document.getElementById('lower').value = '0.034';
			$uper = txtFirstNumberValue - 0.016;
			$lower = txtFirstNumberValue - 0.034;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.020';
			document.getElementById('lower').value = '0.041';
			$uper = txtFirstNumberValue - 0.020;
			$lower = txtFirstNumberValue - 0.041;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.050';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.050;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.050';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.050;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.060';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.060;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.060';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.060;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.071';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.071;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.071';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.071;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.083';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.083;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.083';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.083;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.083';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.083;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.095';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.095;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.095';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.095;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.050';
			document.getElementById('lower').value = '0.095';
			$uper = txtFirstNumberValue - 0.050;
			$lower = txtFirstNumberValue - 0.095;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.108';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.108;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.108';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.108;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.119';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.119;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.119';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.119;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'g5')//g5
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.04';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.04;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.05';
			document.getElementById('lower').value = '0.011';
			$uper = txtFirstNumberValue - 0.05;
			$lower = txtFirstNumberValue - 0.011;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.06';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.06;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.07';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.07;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.023';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.023;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.023';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.023;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.027';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.027;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.027';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.027;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.032';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.032;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.032';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.032;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.032';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.032;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.035';
			$uper = txtFirstNumberValue - 0.015;
			$lower = 0.035;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.035';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.035;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.035';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.035;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.043';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.043;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.043';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.043;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'g6')//g6
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.04';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.04;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.05';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.05;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.06';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.06;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.07';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.07;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.029';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.029;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.029';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.029;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.034';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.034;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.034';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.034;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.039';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.039;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.039';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.039;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.039';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.039;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.044';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.044;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.044';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.044;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.044';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.044;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.049';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.049;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.049';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.049;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'g7')//g7
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.04';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.04;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.05';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.05;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.06';
			document.getElementById('lower').value = '0.024';
			$uper = txtFirstNumberValue - 0.06;
			$lower = txtFirstNumberValue - 0.024;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.07';
			document.getElementById('lower').value = '0.028';
			$uper = txtFirstNumberValue - 0.07;
			$lower = txtFirstNumberValue - 0.028;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.034';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.034;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.034';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.034;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.010';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.010;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.047';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.047;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.047';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.047;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.061';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.061;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.061';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.061;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.061';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.061;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.069';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.069;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.069';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.069;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.075';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.075;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.075';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.075;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'h4')//h4
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.04';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.04;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.04';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.04;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.05';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.05;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.06';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.06;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.07';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.07;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.07';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.07;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.08';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.08;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.08';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.08;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'h5')//h5
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.05';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.05;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.06';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.06;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.08';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.08;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.011';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.011;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.011';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.011;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.013';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.013;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.013';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.013;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.023';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.023;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.023';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.023;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'h6')//h6
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.08';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.08;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.011';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.011;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.013';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.013;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.019';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.019;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.019';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.019;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.022';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.022;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.022';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.022;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'h7')//h7
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.021';
			$uper = 0.0;
			$lower = 0.021;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.030';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.030;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.030';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.030;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.035';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.035;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.035';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.035;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.040';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.040;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.046';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.046;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.046';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.046;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.046';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.046;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.052';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.052;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.052';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.052;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.057';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.057;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.057';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.057;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'h8')//h8
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.022';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.022;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.027';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.027;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.033';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.033;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.039';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.039;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.039';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.039;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.046';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.046;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.046';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.046;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.054';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.054;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.063';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.063;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.063';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.063;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.063';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.063;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.072';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.072;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.072';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.072;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.072';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.072;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.081';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.081;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.081';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.081;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.089';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.089;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0';
			document.getElementById('lower').value = '0.089';
			$uper = txtFirstNumberValue - 0.0;
			$lower = txtFirstNumberValue - 0.089;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'F8')//F8
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.028';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.028;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.035';
			document.getElementById('lower').value = '0.013';
			$uper = txtFirstNumberValue - 0.035;
			$lower = txtFirstNumberValue - 0.013;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.016';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.016;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.053';
			document.getElementById('lower').value = '0.020';
			$uper = txtFirstNumberValue - 0.053;
			$lower = txtFirstNumberValue - 0.020;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.064';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.064;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.064';
			document.getElementById('lower').value = '0.025';
			$uper = txtFirstNumberValue - 0.064;
			$lower = txtFirstNumberValue - 0.025;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.076';
			document.getElementById('lower').value = '0.030';
			$uper = txtFirstNumberValue - 0.076;
			$lower = txtFirstNumberValue - 0.030;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.076';
			document.getElementById('lower').value = '0.030';
			$uper = txtFirstNumberValue - 0.076;
			$lower = txtFirstNumberValue - 0.030;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.090';
			document.getElementById('lower').value = '0.036';
			$uper = txtFirstNumberValue - 0.090;
			$lower = txtFirstNumberValue - 0.036;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.090';
			document.getElementById('lower').value = '0.036';
			$uper = txtFirstNumberValue - 0.090;
			$lower = txtFirstNumberValue - 0.036;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.0106';
			document.getElementById('lower').value = '0.043';
			$uper = txtFirstNumberValue - 0.106;
			$lower = txtFirstNumberValue - 0.43;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.106';
			document.getElementById('lower').value = '0.43';
			$uper = txtFirstNumberValue - 0.106;
			$lower = txtFirstNumberValue - 0.43;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.106';
			document.getElementById('lower').value = '0.43';
			$uper = txtFirstNumberValue - 0.106;
			$lower = txtFirstNumberValue - 0.43;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.122';
			document.getElementById('lower').value = '0.50';
			$uper = txtFirstNumberValue - 0.122;
			$lower = txtFirstNumberValue - 0.50;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.122';
			document.getElementById('lower').value = '0.50';
			$uper = txtFirstNumberValue - 0.122;
			$lower = txtFirstNumberValue - 0.50;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.122';
			document.getElementById('lower').value = '0.50';
			$uper = txtFirstNumberValue - 0.122;
			$lower = txtFirstNumberValue - 0.50;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.137';
			document.getElementById('lower').value = '0.56';
			$uper = txtFirstNumberValue - 0.137;
			$lower = txtFirstNumberValue - 0.56;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.137';
			document.getElementById('lower').value = '0.56';
			$uper = txtFirstNumberValue - 0.137;
			$lower = txtFirstNumberValue - 0.56;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.151';
			document.getElementById('lower').value = '0.62';
			$uper = txtFirstNumberValue - 0.151;
			$lower = txtFirstNumberValue - 0.62;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.151';
			document.getElementById('lower').value = '0.62';
			$uper = txtFirstNumberValue - 0.151;
			$lower = txtFirstNumberValue - 0.62;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'G6')//G6
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.04';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.04;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.014';
			document.getElementById('lower').value = '0.05';
			$uper = txtFirstNumberValue - 0.014;
			$lower = txtFirstNumberValue - 0.05;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.017';
			document.getElementById('lower').value = '0.06';
			$uper = txtFirstNumberValue - 0.017;
			$lower = txtFirstNumberValue - 0.06;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.020';
			document.getElementById('lower').value = '0.07';
			$uper = txtFirstNumberValue - 0.020;
			$lower = txtFirstNumberValue - 0.07;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.029';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.029;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.029';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.029;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.034';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.034;
			$lower = txtFirstNumberValue - 0.62;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.034';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.034;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.039';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.039;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.039';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.039;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.039';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.039;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.044';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.044;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.044';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.044;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.044';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.044;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.049';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.049;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.049';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.049;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'G7')//G7
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.016';
			document.getElementById('lower').value = '0.04';
			$uper = txtFirstNumberValue - 0.016;
			$lower = txtFirstNumberValue - 0.04;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.020';
			document.getElementById('lower').value = '0.05';
			$uper = txtFirstNumberValue - 0.020;
			$lower = txtFirstNumberValue - 0.05;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.024';
			document.getElementById('lower').value = '0.06';
			$uper = txtFirstNumberValue - 0.024;
			$lower = txtFirstNumberValue - 0.06;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.028';
			document.getElementById('lower').value = '0.07';
			$uper = txtFirstNumberValue - 0.028;
			$lower = txtFirstNumberValue - 0.07;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.034';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.034;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.034';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.034;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.047';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.047;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.047';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.047;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.061';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.061;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.061';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.061;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.061';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.061;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.069';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.069;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.069';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.069;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.075';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.075;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.075';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.075;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'G8')//G8
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.022';
			document.getElementById('lower').value = '0.04';
			$uper = txtFirstNumberValue - 0.022;
			$lower = txtFirstNumberValue - 0.04;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.027';
			document.getElementById('lower').value = '0.05';
			$uper = txtFirstNumberValue - 0.027;
			$lower = txtFirstNumberValue - 0.05;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.033';
			document.getElementById('lower').value = '0.06';
			$uper = txtFirstNumberValue - 0.033;
			$lower = txtFirstNumberValue - 0.06;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.07';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.07;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.048';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.048;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.048';
			document.getElementById('lower').value = '0.09';
			$uper = txtFirstNumberValue - 0.048;
			$lower = txtFirstNumberValue - 0.09;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.056';
			document.getElementById('lower').value = '0.010';
			$uper = txtFirstNumberValue - 0.056;
			$lower = txtFirstNumberValue - 0.010;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.066';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.066;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.066';
			document.getElementById('lower').value = '0.012';
			$uper = txtFirstNumberValue - 0.066;
			$lower = txtFirstNumberValue - 0.012;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.077';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.077;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.077';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.077;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.077';
			document.getElementById('lower').value = '0.014';
			$uper = txtFirstNumberValue - 0.077;
			$lower = txtFirstNumberValue - 0.014;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.087';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.087;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.087';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.087;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.087';
			document.getElementById('lower').value = '0.015';
			$uper = txtFirstNumberValue - 0.087;
			$lower = txtFirstNumberValue - 0.015;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.098';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.098;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.098';
			document.getElementById('lower').value = '0.017';
			$uper = txtFirstNumberValue - 0.098;
			$lower = txtFirstNumberValue - 0.017;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.0107';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0107;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.0107';
			document.getElementById('lower').value = '0.018';
			$uper = txtFirstNumberValue - 0.0107;
			$lower = txtFirstNumberValue - 0.018;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
			$uper = txtFirstNumberValue -  0.075;
			$lower = txtFirstNumberValue -  0.018;
		  }
	  }
	  if (toleransi == 'H6')//H6
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.08';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.08;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.09';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.09;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.011';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.011;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.013';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.013;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.016';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.016;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.016';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.016;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.019';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.019;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.019';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.019;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.022';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.022;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.022';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.022;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.029';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.029;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.029';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.029;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.029';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.029;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.032';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.032;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.032';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.032;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'H7')//H7
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.012';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.012;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.015';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.015;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.021';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.021;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.025';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.025;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.035';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.035;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.035';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.035;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.040';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.040;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.046';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.046;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.046';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.046;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.046';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.046;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.052';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.052;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.052';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.052;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.057';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.057;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.057';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.057;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'H8')//H8
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.018';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.018;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.022';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.022;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.027';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.027;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.033';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.033;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.039';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.039;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.039';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.039;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.046';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.046;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.046';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.046;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.054';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.054;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.063';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.063;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.063';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.063;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.063';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.063;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.072';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.072;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.072';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.072;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.072';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.072;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.081';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.081;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.081';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.081;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.089';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.089;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.089';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.089;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'H9')//H9
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.030';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.030;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.036';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.036;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.043';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.043;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.052';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.052;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.062';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.062;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.074';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.074;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.074';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.074;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.087';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.087;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.087';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.087;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.100';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.100;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.100';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.100;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.100';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.100;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.115';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.115;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.115';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.115;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.115';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.115;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.130';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.130;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.130';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.130;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.140';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.140;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.140';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.140;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'H10')//H10
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.048';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.048;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.058';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.058;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.070';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.070;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.084';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.084;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.100';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.100;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.100';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.100;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.120';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.120;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.120';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.120;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.140';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.140;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.140';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.140;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.160';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.160;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.160';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.160;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.160';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.160;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.185';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.185;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.185';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.185;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.185';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.185;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.210';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.210;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.210';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.210;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.230';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.230;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.230';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.230;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  if (toleransi == 'H11')//H11
	  {
		  if (txtFirstNumberValue >= 3 &&  txtFirstNumberValue <=6)
		  {
			 document.getElementById('uper').value = '0.075';
			document.getElementById('lower').value = '0.00';
			$uper = txtFirstNumberValue - 0.075;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 7 &&  txtFirstNumberValue <=10)
		  {
			 document.getElementById('uper').value = '0.090';
			document.getElementById('lower').value = '0.00';
			$uper = txtFirstNumberValue - 0.090;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 11 &&  txtFirstNumberValue <=18)
		  {
			 document.getElementById('uper').value = '0.110';
			document.getElementById('lower').value = '0.00';
			$uper = txtFirstNumberValue - 0.110;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 19 &&  txtFirstNumberValue <=30)
		  {
			 document.getElementById('uper').value = '0.130';
			document.getElementById('lower').value = '0.00';
			$uper = txtFirstNumberValue - 0.130;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 31 &&  txtFirstNumberValue <=40)
		  {
			 document.getElementById('uper').value = '0.160';
			document.getElementById('lower').value = '0.00';
			$uper = txtFirstNumberValue - 0.160;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 41 &&  txtFirstNumberValue <=50)
		  {
			 document.getElementById('uper').value = '0.160';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.160;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 51 &&  txtFirstNumberValue <=65)
		  {
			 document.getElementById('uper').value = '0.190';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.190;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 66 &&  txtFirstNumberValue <=80)
		  {
			 document.getElementById('uper').value = '0.190';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.190;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 81 &&  txtFirstNumberValue <=100)
		  {
			 document.getElementById('uper').value = '0.220';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.220;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 101 &&  txtFirstNumberValue <=120)
		  {
			 document.getElementById('uper').value = '0.220';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.220;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 121 &&  txtFirstNumberValue <=140)
		  {
			 document.getElementById('uper').value = '0.250';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.250;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 141 &&  txtFirstNumberValue <=160)
		  {
			 document.getElementById('uper').value = '0.250';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.250;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 161 &&  txtFirstNumberValue <=180)
		  {
			 document.getElementById('uper').value = '0.250';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.250;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 181 &&  txtFirstNumberValue <=200)
		  {
			 document.getElementById('uper').value = '0.290';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.290;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 201 &&  txtFirstNumberValue <=225)
		  {
			 document.getElementById('uper').value = '0.290';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.290;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 226 &&  txtFirstNumberValue <=250)
		  {
			 document.getElementById('uper').value = '0.290';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.290;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 251 &&  txtFirstNumberValue <=280)
		  {
			 document.getElementById('uper').value = '0.320';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.320;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 281 &&  txtFirstNumberValue <=315)
		  {
			 document.getElementById('uper').value = '0.320';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.320;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 316 &&  txtFirstNumberValue <=355)
		  {
			 document.getElementById('uper').value = '0.360';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.360;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue >= 356 &&  txtFirstNumberValue <=400)
		  {
			 document.getElementById('uper').value = '0.360';
			document.getElementById('lower').value = '0.0';
			$uper = txtFirstNumberValue - 0.360;
			$lower = txtFirstNumberValue - 0.0;
		  }
		  if (txtFirstNumberValue <= 2)
		  {
			 document.getElementById('uper').value = '0';
			document.getElementById('lower').value = '0';
		  }
	  }
	  //////1
	  if (x1SurviceID >= $lower &&  x1SurviceID <= $uper)
	  {
		 document.getElementById('x1SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x1SurviceIDstatus').value = 'Reject';
	  }
	  if (x1SurviceID <= ($lower - 0.01))
	  {
		  document.getElementById('x1SurviceIDstatus').value = 'Reject1';

	  }
	  if (x1SurviceID =="")
	  {
		  document.getElementById('x1SurviceIDstatus').value = '';

	  }
	  if (y1SurviceID >= $lower &&  y1SurviceID <= $uper)
	  {
		 document.getElementById('y1SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('y1SurviceIDstatus').value = 'Reject';
	  }
	  if (y1SurviceID <= $lower)
	  {
		  document.getElementById('y1SurviceIDstatus').value = 'Reject';

	  }
	  if (y1SurviceID =="")
	  {
		  document.getElementById('y1SurviceIDstatus').value = '';

	  }
	  if (z1SurviceID >= $lower &&  z1SurviceID <= $uper)
	  {
		 document.getElementById('z1SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('z1SurviceIDstatus').value = 'Reject';
	  }
	  if (z1SurviceID <= $lower)
	  {
		  document.getElementById('z1SurviceIDstatus').value = 'Reject';

	  }
	  if (z1SurviceID =="")
	  {
		  document.getElementById('z1SurviceIDstatus').value = '';

	  }
	  //////2
	  if (x2SurviceID >= $lower &&  x2SurviceID <= $uper)
	  {
		 document.getElementById('x2SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x2SurviceIDstatus').value = 'Reject';
	  }
	  if (x2SurviceID <= $lower)
	  {
		  document.getElementById('x2SurviceIDstatus').value = 'Reject';

	  }
	  if (x2SurviceID =="")
	  {
		  document.getElementById('x2SurviceIDstatus').value = '';

	  }
	  if (y2SurviceID >= $lower &&  y2SurviceID <= $uper)
	  {
		 document.getElementById('y2SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('y2SurviceIDstatus').value = 'Reject';
	  }
	  if (y2SurviceID <= $lower)
	  {
		  document.getElementById('y2SurviceIDstatus').value = 'Reject';

	  }
	  if (y2SurviceID =="")
	  {
		  document.getElementById('y2SurviceIDstatus').value = '';

	  }
	  if (z2SurviceID >= $lower &&  z2SurviceID <= $uper)
	  {
		 document.getElementById('z2SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('z2SurviceIDstatus').value = 'Reject';
	  }
	  if (z2SurviceID <= $lower)
	  {
		  document.getElementById('z2SurviceIDstatus').value = 'Reject';

	  }
	  if (z2SurviceID =="")
	  {
		  document.getElementById('z2SurviceIDstatus').value = '';

	  }
	  //////3s
	  if (x3SurviceID >= $lower &&  x3SurviceID <= $uper)
	  {
		 document.getElementById('x3SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x3SurviceIDstatus').value = 'Reject';
	  }
	  if (x3SurviceID <= $lower)
	  {
		  document.getElementById('x3SurviceIDstatus').value = 'Reject';

	  }
	  if (x3SurviceID =="")
	  {
		  document.getElementById('x3SurviceIDstatus').value = '';

	  }
	  if (y3SurviceID >= $lower &&  y3SurviceID <= $uper)
	  {
		 document.getElementById('y3SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('y3SurviceIDstatus').value = 'Reject';
	  }
	  if (y3SurviceID <= $lower)
	  {
		  document.getElementById('y3SurviceIDstatus').value = 'Reject';

	  }
	  if (y3SurviceID =="")
	  {
		  document.getElementById('y3SurviceIDstatus').value = '';

	  }
	  if (z3SurviceID >= $lower &&  z3SurviceID <= $uper)
	  {
		 document.getElementById('z3SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('z3SurviceIDstatus').value = 'Reject';
	  }
	  if (z3SurviceID <= $lower)
	  {
		  document.getElementById('z3SurviceIDstatus').value = 'Reject';

	  }
	  if (z3SurviceID =="")
	  {
		  document.getElementById('z3SurviceIDstatus').value = '';

	  }
	  //////4
	  if (x4SurviceID >= $lower &&  x4SurviceID <= $uper)
	  {
		 document.getElementById('x4SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x4SurviceIDstatus').value = 'Reject';
	  }
	  if (x4SurviceID <= $lower)
	  {
		  document.getElementById('x4SurviceIDstatus').value = 'Reject';

	  }
	  if (x4SurviceID =="")
	  {
		  document.getElementById('x4SurviceIDstatus').value = '';

	  }
	  if (y4SurviceID >= $lower &&  y4SurviceID <= $uper)
	  {
		 document.getElementById('y4SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('y4SurviceIDstatus').value = 'Reject';
	  }
	  if (y4SurviceID <= $lower)
	  {
		  document.getElementById('y4SurviceIDstatus').value = 'Reject';

	  }
	  if (y4SurviceID =="")
	  {
		  document.getElementById('y4SurviceIDstatus').value = '';

	  }
	  if (z4SurviceID >= $lower &&  z4SurviceID <= $uper)
	  {
		 document.getElementById('z4SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('z4SurviceIDstatus').value = 'Reject';
	  }
	  if (z4SurviceID <= $lower)
	  {
		  document.getElementById('z4SurviceIDstatus').value = 'Reject';

	  }
	  if (z4SurviceID =="")
	  {
		  document.getElementById('z4SurviceIDstatus').value = '';

	  }
	  //////5
	  if (x5SurviceID >= $lower &&  x5SurviceID <= $uper)
	  {
		 document.getElementById('x5SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x5SurviceIDstatus').value = 'Reject';
	  }
	  if (x5SurviceID <= $lower)
	  {
		  document.getElementById('x5SurviceIDstatus').value = 'Reject';

	  }
	  if (x5SurviceID =="")
	  {
		  document.getElementById('x5SurviceIDstatus').value = '';

	  }
	  if (y5SurviceID >= $lower &&  y5SurviceID <= $uper)
	  {
		 document.getElementById('y5SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('y5SurviceIDstatus').value = 'Reject';
	  }
	  if (y5SurviceID <= $lower)
	  {
		  document.getElementById('y5SurviceIDstatus').value = 'Reject';

	  }
	  if (y5SurviceID =="")
	  {
		  document.getElementById('y5SurviceIDstatus').value = '';

	  }
	  if (z5SurviceID >= $lower &&  z5SurviceID <= $uper)
	  {
		 document.getElementById('z5SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('z5SurviceIDstatus').value = 'Reject';
	  }
	  if (z5SurviceID <= $lower)
	  {
		  document.getElementById('z5SurviceIDstatus').value = 'Reject';

	  }
	  if (z5SurviceID =="")
	  {
		  document.getElementById('z5SurviceIDstatus').value = '';

	  }
	  //
}
$("#kendaraan").change(function(){
            // variabel dari nilai combo box kendaraan
            var id_kendaraan = $("#kendaraan").val();

            // Menggunakan ajax untuk mengirim dan dan menerima data dari server
            $.ajax({
                type: "POST",
                dataType: "html",
                url: "simpanTesAjax2Hapus.php",
                data: "kendaraan="+id_kendaraan,
                success: function(data){
                   $("#kendaraan").html(data);
                }
            });
        });
</script>
	</div>	  
  </body>
</html>




