<?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>";
				 }
				 
				 //$job = mysqli_real_escape_string($conn, $_GET["job"]);
				 //$mhb_id = mysqli_real_escape_string($conn, $_GET["mhb_id"]);
				 //$mhb_id_single = mysqli_real_escape_string($conn, $_GET["mhb_id_single"]);
				 //$combo1 = mysqli_real_escape_string($conn, $_GET["combo1"]);
				 //echo "job = ".$job."<br>";
				 //echo "mhb id = ".$mhb_id."<br>";
				 //echo "mhb_id_single = ".$mhb_id_single."<br>";
				 //echo "combo1 = ".$combo1."<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="simpanFormMhbFrQc00102.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 Outer Diameter (MHB-FR-QC-001-02) </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-02</td>
 </tr>
 </tbody>
 </table>
 </div>


<br><br><br><br>
        <table border=0 width="80%" align="center" >
		    <tr>
                <td bgcolor="#2F4F4F" colspan="8" align="center"><font color="white">Assy or Parsial</td>
            </tr>
           <tr>
                <td bgcolor="#2F4F4F" colspan="8" align="center"><font color="white">Surface ID (H8/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 bgcolor="#DCDCDC" align="center">6.</td>
                <td width="200px" align="center">
					<input width="50px" name="x6SurviceID" type="text" id="x6SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x6SurviceIDstatus" type="text" id="x6SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y6SurviceID" type="text" id="y6SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y6SurviceIDstatus" type="text" id="y6SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z6SurviceID" type="text" id="z6SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z6SurviceIDstatus" type="text" id="z6SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">7.</td>
                <td width="200px" align="center">
					<input width="50px" name="x7SurviceID" type="text" id="x7SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x7SurviceIDstatus" type="text" id="x7SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y7SurviceID" type="text" id="y7SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y7SurviceIDstatus" type="text" id="y7SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z7SurviceID" type="text" id="z7SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z7SurviceIDstatus" type="text" id="z7SurviceIDstatus">
			    </td>
            </tr>
			<tr>
                <td bgcolor="#DCDCDC" align="center">8.</td>
                <td width="200px" align="center">
					<input width="50px" name="x8SurviceID" type="text" id="x8SurviceID" onkeyup="sum();">
			    </td>
				<td width="200px" align="center">
					<input readonly width="50px" name="x8SurviceIDstatus" type="text" id="x8SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="y8SurviceID" type="text" id="y8SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="y8SurviceIDstatus" type="text" id="y8SurviceIDstatus">
			    </td>
				<td width="200px" align="center">
					<input width="50px" name="z8SurviceID" type="text" id="z8SurviceID" onkeyup="sum();">
				</td>
				<td width="200px" align="center">
					<input readonly width="50px" name="z8SurviceIDstatus" type="text" id="z8SurviceIDstatus">
			    </td>
            </tr>
        </table>
<br><br><br><br>
        <table border=0 width="85%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="4" align="center"><font color="white">Surface OD (f7/OEM) Condition</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">
									   
						<input type="radio" name="conditionSurviceID" value="1" checked> Dent
						<input type="radio" name="conditionSurviceID" value="2" checked> Crack
						<input type="radio" name="conditionSurviceID" value="3" checked> Score
						<input type="radio" name="conditionSurviceID" value="4" checked> Pitted
						<input type="radio" name="conditionSurviceID" value="5" checked> Wave
						<input type="radio" name="conditionSurviceID" value="6" checked> Undersize
						<input type="radio" name="conditionSurviceID" value="7" checked> Oval
						<input type="radio" name="conditionSurviceID" value="8" checked> Wear Step
						<input type="radio" name="conditionSurviceID" value="9" checked> Corrosion
						<input type="radio" name="conditionSurviceID" value="10" checked> Scrathes
						<input type="radio" name="conditionSurviceID" value="11" checked> Deep Scratches
						<input type="radio" name="conditionSurviceID" value="12" checked> Bending
						<input type="radio" name="conditionSurviceID" value="13" checked> Melintir
						<input type="radio" name="conditionSurviceID" value="0" checked> Kosong	
	               </div>
				</td>
				
			</tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="5" align="center"><font color="white">Surface OD (f7/OEM) Thicknes Min 50 nm Max 250 nm</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td bgcolor="" align="center">A</td>
                <td width="200px" align="center">B</td>
				<td width="200px" align="center">C</td>
				<td width="200px" align="center">D</td>
				<td width="200px" align="center">E</td>
            </tr>
			<tr>
                <td width="200px" align="center">
					<input width="50px" name="aThicknessMinSurviceID" type="text">
				</td>
                <td width="200px" align="center">
					<input width="50px" name="bThicknessMinSurviceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="cThicknessMinSurviceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="dThicknessMinSurviceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="eThicknessMinSurviceID" type="text">
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="3" align="center"><font color="white">Surface OD (f7/OEM) Roughness (Ra) in nm (0.08-0.13/OEM)</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td bgcolor="" align="center">1</td>
                <td width="200px" align="center">2</td>
				<td width="200px" align="center">3</td>
            </tr>
			<tr>
                <td width="200px" align="center">
					<input width="50px" name="roughnessSurfaceID1" type="text">
				</td>
                <td width="200px" align="center">
					<input width="50px" name="roughnessSurfaceID2" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="roughnessSurfaceID3" type="text">
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="60%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="5" align="center"><font color="white">Surface OD (f7/OEM) Spec Bending Max 0.4mm / 1 meter</td>
		   </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td bgcolor="" align="center">A</td>
                <td width="200px" align="center">B</td>
				<td width="200px" align="center">C</td>
				<td width="200px" align="center">D</td>
				<td width="200px" align="center">E</td>
            </tr>
			<tr>
                <td width="200px" align="center">
					<input width="50px" name="aSpecBendingSurfaceID" type="text">
				</td>
                <td width="200px" align="center">
					<input width="50px" name="bSpecBendingSurfaceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="cSpecBendingSurfaceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="dSpecBendingSurfaceID" type="text">
				</td>
				<td width="200px" align="center">
					<input width="50px" name="eSpecBendingSurfaceID" type="text">
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br>
        <table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="4" align="center"><font color="white">Surface OD (f7/OEM) Welding Joint</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">			  
						<input type="radio" name="weldingJointSurficeID" value="1" checked> Crack
						<input type="radio" name="weldingJointSurficeID" value="2" checked> No Crack
	               </div>
				</td>
				
			</tr>
        </table>
		<br><br><br><br><br><br><br>
        <table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="4" align="center"><font color="white">Surface )D (f7/OEM) Kelurusan Antara Rod eye dan rod</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">			  
						<input type="radio" name="kelurusanSurficeID" value="1" checked> Lurus
						<input type="radio" name="kelurusanSurficeID" value="2" checked> Bengkok
	               </div>
				</td>
				
			</tr>
        </table>
<br><br><br><br><br><br><br>
        <table border=0 width="80%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="4" align="center"><font color="white">Surface ID (f7/OEM) Kondisi Kebocoran (Type Pipe rod)</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
                <td   width="200px" align ="center">
				   <div class="form-check form-check-inline">			  
						<input type="radio" name="kebocoranSurficeID" value="1" checked> Bocor
						<input type="radio" name="kebocoranSurficeID" value="2" checked> Tidak
	               </div>
				</td>
				
			</tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="75%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="2" align="center"><font color="white">Surface ID (f7/OEM) Spec Bending Max 0.4 mm / 1 Meters</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
			    <td bgcolor="" align="center">Total Length</td>
                <td width="200px" align="center">
					<input width="50px" name="totalLength" type="text">
				</td>
            </tr>
			<tr>
			    <td bgcolor="" align="center">Chrome Length</td>
                <td width="200px" align="center">
					<input width="50px" name="chromeLength" type="text">
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="75%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="2" align="center"><font color="white">Surface ID (f7/OEM) Hardness in HRC (50-70)</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
			    <td bgcolor="" align="center">Min</td>
                <td width="200px" align="center">
					<input width="50px" name="minSurfaceID" type="text">
				</td>
            </tr>
			<tr>
			    <td bgcolor="" align="center">Max</td>
                <td width="200px" align="center">
					<input width="50px" name="maxLengthSurfaceID" type="text">
				</td>
            </tr>
			<tr>
			    <td bgcolor="" align="center">Ave</td>
                <td width="200px" align="center">
					<input width="50px" name="aveLengthSurfaceID" type="text">
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="58%" align="center" >
           <tr>
                <td bgcolor="#2F4F4F" colspan="5" align="center"><font color="white">Recommendation Repair</td>
				
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
			    <td>
                <div class="form-check form-check-inline">			  
						<input type="radio" name="recommendationRepairSurfaceOD" value="1" checked> MFG
						<input type="radio" name="recommendationRepairSurfaceOD" value="2" checked> Chrome OD
						<input type="radio" name="recommendationRepairSurfaceOD" value="3" checked> Polesh Only
						<input type="radio" name="recommendationRepairSurfaceOD" value="4" checked> Straightening
						<input type="radio" name="recommendationRepairSurfaceOD" value="5" checked> Re-Weld Joint
						<input type="radio" name="recommendationRepairSurfaceOD" value="6" checked> Re-Rod
						<input type="radio" name="recommendationRepairSurfaceOD" value="7" checked> Re-build/MF
						<input type="radio" name="recommendationRepairSurfaceOD" value="0" checked> Kosong
	               </div>
				   </td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=1 width="1000%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="7" align="center"><font color="white">End Rod(f7/OEM)</td>
            </tr>
			<tr>
                <td width="0px"  align ="center">
				   <div class="form-check form-check-inline">			  
                     Step.
	               </div>
				</td >
				<td width="20px" colspan="2"  align ="center">
				   <div class="form-check form-check-inline">			  
                     I
	               </div>
				</td >
				<td width="20px" colspan="2" align ="center">
				   <div class="form-check form-check-inline">			  
                     II
	               </div>
				</td >
				<td width="20px" colspan="2" align ="center">
				   <div class="form-check form-check-inline">			  
                     III
	               </div>
				</td >
            </tr>
			<tr>
                <td width="0px"  align ="center">
				   <div class="form-check form-check-inline">			  
                     No.
	               </div>
				</td >
				<td width="1000px" align ="center">
				   <div class="form-check form-check-inline">			  
                     X
	               </div>
				</td>
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     Y
	               </div>
				</td >
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     X
	               </div>
				</td>
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     Y
	               </div>
				</td >
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     X
	               </div>
				</td>
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     Y
	               </div>
				</td >
            </tr>
			<tr>
			    <td>
			      <div align="center" class="form-check form-check-inline">			  
                     1
	              </div>
				</td>
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input   name="i1xEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input  name="i1yEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="ii1xEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="ii1yEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="iii1xEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="iii1yEndRod" type="text">
	              </div>
				</td>
				
			</tr>
			<tr>
			     <td width="20px"  align ="center">
				   <div class="form-check form-check-inline">			  
                     2
	               </div>
				</td >
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input   name="i2xEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input  name="i2yEndRod" type="text">
	              </div>
				</td>
				<td  width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="ii2xEndRod" type="text">
	              </div>
				</td>
				<td  width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="ii2yEndRod" type="text">
	              </div>
				</td>
				<td  width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="iii2xEndRod" type="text">
	              </div>
				</td>
				<td  width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="iii2yEndRod" type="text">
	              </div>
				</td>
			</tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="70%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Thread Condition (if any)</td>
				<td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Recommendation Repair</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>

			<tr>
				<td>
					<div>
						<input type="radio" name="threadConditionEndRod" value="1" checked> Demage
						<input type="radio" name="threadConditionEndRod" value="2" checked> Crack
						<input type="radio" name="threadConditionEndRod" value="3" checked> Worn Out
						<input type="radio" name="threadConditionEndRod" value="4" checked> Normal Condition
						<input type="radio" name="threadConditionEndRod" value="0" checked> Kosong
					</div>
				</td>
				<td>
					<div>
						<input type="radio" name="recommendationRepairSurfaceOD2" value="1" checked> Repair Thread
						<input type="radio" name="recommendationRepairSurfaceOD2" value="2" checked> H/D
						<input type="radio" name="recommendationRepairSurfaceOD2" value="3" checked> Clean Up
						<input type="radio" name="recommendationRepairSurfaceOD2" value="0" checked> Kosong
					</div>
				</td>
			</tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="70%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="" align="center"><font color="white">Condition</td>
            </tr>
			<tr>
                <td colspan="4">-</td>
            </tr>

			<tr>
				<td colspan="1" rowspan="1">
					<div>
						<input type="radio" name="conditionEndRod" value="1" checked> Dent
						<input type="radio" name="conditionEndRod" value="2" checked> Crack
						<input type="radio" name="conditionEndRod" value="3" checked> Pitted
						<input type="radio" name="conditionEndRod" value="4" checked> Damage
						<input type="radio" name="conditionEndRod" value="5" checked> Wear Step
						<input type="radio" name="conditionEndRod" value="6" checked> Corrosion
						<input type="radio" name="conditionEndRod" value="7" checked> Undersize    
						<input type="radio" name="conditionEndRod" value="8" checked> Scratches
						<input type="radio" name="conditionEndRod" value="9" checked> Bend
						<input type="radio" name="conditionEndRod" value="10" checked> Include re-rod
						<input type="radio" name="conditionEndRod" value="0" checked> Kosong
					</div>
				</td>
			</tr>
        </table>
		<br><br><br><br><br><br><br><br>
        <table border=0 width="70%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="7" align="center"><font color="white">Spec Bend End Rod Max 0.4 mm</td>
            </tr>
			<tr>
                <td colspan="4">-</td>
            </tr>

			<tr>
				<td width="1000px" align ="center">
				   <div class="form-check form-check-inline">			  
                     A
	               </div>
				</td>
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     B
	               </div>
				</td >
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     C
	               </div>
				</td>
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     D
	               </div>
				</td >
				<td width="20px" align ="center">
				   <div class="form-check form-check-inline">			  
                     E
	               </div>
				</td>
            </tr>
			<tr>
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input   name="aSpecBendEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div  align="center" class="form-check form-check-inline">			  
                     <input  name="bSpecBendEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="cSpecBendEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="dSpecBendEndRod" type="text">
	              </div>
				</td>
				<td width="20px">
			      <div align="center" class="form-check form-check-inline">			  
                     <input  name="eSpecBendEndRod" type="text">
	              </div>
				</td>
				
			</tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="80%" align="center" >
           <tr>
				<td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Recommendation Repair 3</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
				<td>
				   <div  align ="center" class="form-check form-check-inline">			  
                     <input type="radio" name="recommendationRepairSurfaceOD3" value="1" checked> Chrome Piston Seat
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="2" checked> Chrome Wearing Seat
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="3" checked> Repair Seat Plunger
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="4" checked> Re-build/M-W-M
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="5" checked> H/D
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="6" checked> Clean Up
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="7" checked> Include Re-Rod
					 <input type="radio" name="recommendationRepairSurfaceOD3" value="0" checked> Kosong
	               </div>
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="70%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Bracket Condition</td>
				<td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Hole Thread</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
				<td>
				   <div  align ="center" class="form-check form-check-inline">			  
                     <input type="radio" name="brackketConditionEndRod" value="1" checked> Demage
					 <input type="radio" name="brackketConditionEndRod" value="2" checked> Worn Out
					 <input type="radio" name="brackketConditionEndRod" value="3" checked> Normal Condition
					 <input type="radio" name="brackketConditionEndRod" value="0" checked> Kosong
	               </div>
				</td>
				<td>
				   <div  align ="center" class="form-check form-check-inline">			  
                     <input type="radio" name="holeThreadEndRod" value="1" checked> Demage
					 <input type="radio" name="holeThreadEndRod" value="2" checked> Worn Out
					 <input type="radio" name="holeThreadEndRod" value="3" checked> Normal Condition
					 <input type="radio" name="holeThreadEndRod" value="0" checked> Kosong
	               </div>
				</td>
            </tr>
        </table>
<br><br><br><br><br><br><br><br>
        <table border=0 width="70%" align="center" >
           <tr>
                <td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Recommendation Repair</td>
				<td bgcolor="#DAA520" colspan="1" align="center"><font color="white">Recommendation Repair</td>
            </tr>
			<tr>
                <td >-</td>
            </tr>
			<tr>
				<td>
				   <div  align ="center" class="form-check form-check-inline">			  
                     <input type="radio" name="recommendationRepairBracketConditionEndRod" value="1" checked> M-W-M
					 <input type="radio" name="recommendationRepairBracketConditionEndRod" value="2" checked> MFG
					 <input type="radio" name="recommendationRepairBracketConditionEndRod" value="3" checked> H/D
					 <input type="radio" name="recommendationRepairBracketConditionEndRod" value="4" checked> Clean Up
					 <input type="radio" name="recommendationRepairBracketConditionEndRod" value="0" checked> Kosong
	               </div>
				</td>
				<td >
				   <div  align ="center" class="form-check form-check-inline">			  
                     <input type="radio" name="recommendationRepairHoleThreadEndRod" value="1" checked> Re-Tap
					 <input type="radio" name="recommendationRepairHoleThreadEndRod" value="2" checked> M-W-M
					 <input type="radio" name="recommendationRepairHoleThreadEndRod" value="3" checked> H/D
					 <input type="radio" name="recommendationRepairHoleThreadEndRod" value="4" checked> Clean Up
					 <input type="radio" name="recommendationRepairHoleThreadEndRod" value="0" checked> Kosong
	               </div>
				</td>
            </tr>
        </table>
				  <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;
	  
	  var x6SurviceID = document.getElementById('x6SurviceID').value;
	  var y6SurviceID = document.getElementById('y6SurviceID').value;
	  var z6SurviceID = document.getElementById('z6SurviceID').value;
	  
	  var x7SurviceID = document.getElementById('x7SurviceID').value;
	  var y7SurviceID = document.getElementById('y7SurviceID').value;
	  var z7SurviceID = document.getElementById('z7SurviceID').value;
	  
	  var x8SurviceID = document.getElementById('x8SurviceID').value;
	  var y8SurviceID = document.getElementById('y8SurviceID').value;
	  var z8SurviceID = document.getElementById('z8SurviceID').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 = '';

	  }
	  //////6
	  if (x6SurviceID >= $lower &&  x6SurviceID <= $uper)
	  {
		 document.getElementById('x6SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x6SurviceIDstatus').value = 'Reject';
	  }
	  if (x6SurviceID <= $lower)
	  {
		  document.getElementById('x6SurviceIDstatus').value = 'Reject';

	  }
	  if (x6SurviceID =="")
	  {
		  document.getElementById('x6SurviceIDstatus').value = '';

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

	  }
	  if (y6SurviceID =="")
	  {
		  document.getElementById('y6SurviceIDstatus').value = '';

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

	  }
	  if (z6SurviceID =="")
	  {
		  document.getElementById('z6SurviceIDstatus').value = '';

	  }
	  //////7
	  if (x7SurviceID >= $lower &&  x7SurviceID <= $uper)
	  {
		 document.getElementById('x7SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x7SurviceIDstatus').value = 'Reject';
	  }
	  if (x7SurviceID <= $lower)
	  {
		  document.getElementById('x7SurviceIDstatus').value = 'Reject';

	  }
	  if (x7SurviceID =="")
	  {
		  document.getElementById('x7SurviceIDstatus').value = '';

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

	  }
	  if (y7SurviceID =="")
	  {
		  document.getElementById('y7SurviceIDstatus').value = '';

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

	  }
	  if (z7SurviceID =="")
	  {
		  document.getElementById('z7SurviceIDstatus').value = '';

	  }
	  //////8
	  if (x8SurviceID >= $lower &&  x8SurviceID <= $uper)
	  {
		 document.getElementById('x8SurviceIDstatus').value = 'Accept';
	  }
	  else
	  {
		  document.getElementById('x8SurviceIDstatus').value = 'Reject';
	  }
	  if (x8SurviceID <= $lower)
	  {
		  document.getElementById('x8SurviceIDstatus').value = 'Reject';

	  }
	  if (x8SurviceID =="")
	  {
		  document.getElementById('x8SurviceIDstatus').value = '';

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

	  }
	  if (y8SurviceID =="")
	  {
		  document.getElementById('y8SurviceIDstatus').value = '';

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

	  }
	  if (z8SurviceID =="")
	  {
		  document.getElementById('z8SurviceIDstatus').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>




