Current File : /home/obabain/public_html/abc/unit_conversion.jsp
<%@include file="master.jsp"%>
  <%@include file="Connection.jsp" %>
   

<%

ResultSet resultSet = null;
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>


<style type="text/css">
.highlight-error {
	border-color: red;
}
/* table, th, td {
    border: 1px solid black;
    width:0px;
} */

.inlineTable {
            display: inline-block;
        }

.panel-default>.panel-heading-custom {
	background: #ff0000;
	color: #fff;
}
#uctable{
	width: 620px;
	background-color:;
	border-radius: 4px;
}
#undctable{
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #eee;
	padding: 5px;
	margin-top: 8px;
}
.uccell{
	padding:1.2ex 1.5ex;
	width:225px;
}
.ucinput{
	width:240px;
	padding:8px;
	border: 1px solid #000;
	border-radius: 4px;
	box-shadow: 2px 2px 3px #666;
	font-size: 20px;
}
.ucdcinput{
	width:200px;
	padding:8px;
	border: 1px solid #000;
	border-radius: 4px;
	box-shadow: 2px 2px 3px #666;
	font-size: 20px;
}


</style>
<!-- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">-->
<script
	src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script
	src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<body>
	<div class="row">
		<form action="Account_tag.jsp" method="post" id="contact" name="form1">
			<section id="main">
				<div class="container">
					<div class="row" style="width: 110%">
						<div class="col-md-9">
							<div class="panel panel-default">
								<div class="panel-heading main-color-bg">
									<h3 class="panel-title">Unit Converter:</h3>
								</div>
								

<!-- <div align="right" >
<input type="button" value="View" style="background:#204b58;margin-right: 50px" class="btn btn-info"  />
 </div>
 -->

								
								

								<div class="panel-body">

<!-- <div class="headerbar-item pull-right" style="margin-top:10px;"><a class="btn btn-info "href="AddProductunit.jsp" style="background:#204b58"  onclick="goBack()">HOME</a></div>	
<div class="headerbar-item pull-right" style="margin-top:10px;"><a class="btn btn-info" style="background:#204b58" "href="ViewProductUnit.jsp"  onclick="goBack()">Back</a></div>								
	 -->								
									<div class="headerbar-item pull-right" style="margin-top:10px;"><a class="btn btn-info" style="background:#204b58"  onclick="goBack()">Back</a>
<a class="btn btn-info" style="background:#204b58" href="AddProductunit.jsp">HOME</a>
</div>
									<b></b> 

	
         



<!-- <div id="headerout">
	<div id="header">
		<div id="logo"><a href="/"><img src="/images/logo.svg" width="288" height="28"></a></div>
	</div>
</div> -->

		<div class="topnav"><a href="/"></a>  <a href=''></a> </div>
		<h1></h1>
<div id="ucresult" class="ucresulttext"></div>

<table id="uctable" style="margin-left:90px;">
	<tr>
		<td class="uccell">From:<br><input type="text" name="ucfrom" class="ucinput" id="ucfrom" onKeyUp="ucUpdateResult();" autofocus></td>
		<td class="uccell">To:<br><input type="text" name="ucto" class="ucinput" id="ucto" style="background-color:#eeeeee;" readonly></td>
	</tr>
	<tr>
		<td class="uccell" ">
			<select name="ucfromunit" id="ucfromunit" size="15" onChange="ucUpdateResult();" class="ucselect"><option value="kilogram [kg] [1.0E+15]" selected>kilogram [kg]</option><option value="gram [g] [1.0E+18]">gram [g]</option><option value="milligram [mg] [1.0E+21]">milligram [mg]</option><option value="ton (metric) [t] [1000000000000]">ton (metric) [t]</option><option value="pound [lbs] [2.2046226218488E+15]">pound [lbs]</option><option value="ounce [oz] [3.527396194958E+16]">ounce [oz]</option><option value="carat [car, ct] [5.0E+18]">carat [car, ct]</option><option value="ton (short) [ton (US)] [1102311310924.4]">ton (short) [ton (US)]</option><option value="ton (long) [ton (UK)] [984206527611.06]">ton (long) [ton (UK)]</option><option value="Atomic mass unit [u] [6.0221366516752E+41]">Atomic mass unit [u]</option><option value="exagram [Eg] [1]">exagram [Eg]</option><option value="petagram [Pg] [1000]">petagram [Pg]</option><option value="teragram [Tg] [1000000]">teragram [Tg]</option><option value="gigagram [Gg] [1000000000]">gigagram [Gg]</option><option value="megagram [Mg] [1000000000000]">megagram [Mg]</option><option value="hectogram [hg] [1.0E+16]">hectogram [hg]</option><option value="dekagram [dag] [1.0E+17]">dekagram [dag]</option><option value="decigram [dg] [1.0E+19]">decigram [dg]</option><option value="centigram [cg] [1.0E+20]">centigram [cg]</option><option value="microgram [&#181;g] [1.0E+24]">microgram [&#181;g]</option><option value="nanogram [ng] [1.0E+27]">nanogram [ng]</option><option value="picogram [pg] [1.0E+30]">picogram [pg]</option><option value="femtogram [fg] [1.0E+33]">femtogram [fg]</option><option value="attogram [ag] [1.0E+36]">attogram [ag]</option><option value="dalton [6.02217364335E+41]">dalton</option><option value="kilogram-force square second/meter [1.0197162129779E+14]">kilogram-force square second/meter</option><option value="kilopound [kip] [2204622621848.8]">kilopound [kip]</option><option value="kip [2204622621848.8]">kip</option><option value="slug [68521765856800]">slug</option><option value="pound-force square second/foot [68521765856792]">pound-force square second/foot</option><option value="pound (troy or apothecary) [2.679228880719E+15]">pound (troy or apothecary)</option><option value="poundal [pdl] [7.09888484236E+16]">poundal [pdl]</option><option value="ton (assay) (US) [AT (US)] [3.4285710367347E+16]">ton (assay) (US) [AT (US)]</option><option value="ton (assay) (UK) [AT (UK)] [3.061224489796E+16]">ton (assay) (UK) [AT (UK)]</option><option value="kiloton (metric) [kt] [1000000000]">kiloton (metric) [kt]</option><option value="quintal (metric) [cwt] [10000000000000]">quintal (metric) [cwt]</option><option value="hundredweight (US) [22046226218488]">hundredweight (US)</option><option value="hundredweight (UK) [19684130552221]">hundredweight (UK)</option><option value="quarter (US) [qr (US)] [88184904873951]">quarter (US) [qr (US)]</option><option value="quarter (UK) [qr (UK)] [78736522208885]">quarter (UK) [qr (UK)]</option><option value="stone (US) [1.763698097479E+14]">stone (US)</option><option value="stone (UK) [1.5747304441777E+14]">stone (UK)</option><option value="tonne [t] [1000000000000]">tonne [t]</option><option value="pennyweight [pwt] [6.4301493137083E+17]">pennyweight [pwt]</option><option value="scruple (apothecary) [s.ap] [7.71617917645E+17]">scruple (apothecary) [s.ap]</option><option value="grain [gr] [1.54323583529E+19]">grain [gr]</option><option value="gamma [1.0E+24]">gamma</option><option value="talent (Biblical Hebrew) [29239766081871]">talent (Biblical Hebrew)</option><option value="mina (Biblical Hebrew) [1.7543859649123E+15]">mina (Biblical Hebrew)</option><option value="shekel (Biblical Hebrew) [8.7719298245614E+16]">shekel (Biblical Hebrew)</option><option value="bekan (Biblical Hebrew) [1.7543859649123E+17]">bekan (Biblical Hebrew)</option><option value="gerah (Biblical Hebrew) [1.7543859649123E+18]">gerah (Biblical Hebrew)</option><option value="talent (Biblical Greek) [49019607843137]">talent (Biblical Greek)</option><option value="mina (Biblical Greek) [2.9411764705882E+15]">mina (Biblical Greek)</option><option value="tetradrachma (Biblical Greek) [7.3529411764706E+16]">tetradrachma (Biblical Greek)</option><option value="didrachma (Biblical Greek) [1.4705882352941E+17]">didrachma (Biblical Greek)</option><option value="drachma (Biblical Greek) [2.9411764705882E+17]">drachma (Biblical Greek)</option><option value="denarius (Biblical Roman) [2.5974025974026E+17]">denarius (Biblical Roman)</option><option value="assarion (Biblical Roman) [4.1558441558442E+18]">assarion (Biblical Roman)</option><option value="quadrans (Biblical Roman) [1.6623376623377E+19]">quadrans (Biblical Roman)</option><option value="lepton (Biblical Roman) [3.3246753246753E+19]">lepton (Biblical Roman)</option><option value="Planck mass [4.5940892447777E+22]">Planck mass</option><option value="Electron mass (rest) [1.0977683828808E+45]">Electron mass (rest)</option><option value="Muon mass [5.3091724927313E+42]">Muon mass</option><option value="Proton mass [5.9786332019449E+41]">Proton mass</option><option value="Neutron mass [5.9704037533301E+41]">Neutron mass</option><option value="Deuteron mass [2.9908008946084E+41]">Deuteron mass</option><option value="Earth's mass [1.673360107095E-10]">Earth's mass</option><option value="Sun's mass [5.0E-16]">Sun's mass</option></select>
		</td>
		<td class="uccell" >
			<select name="uctounit" id="uctounit" size="15" onChange="ucUpdateResult();" class="ucselect"><option value="kilogram [kg] [1.0E+15]">kilogram [kg]</option><option value="gram [g] [1.0E+18]" selected>gram [g]</option><option value="milligram [mg] [1.0E+21]">milligram [mg]</option><option value="ton (metric) [t] [1000000000000]">ton (metric) [t]</option><option value="pound [lbs] [2.2046226218488E+15]">pound [lbs]</option><option value="ounce [oz] [3.527396194958E+16]">ounce [oz]</option><option value="carat [car, ct] [5.0E+18]">carat [car, ct]</option><option value="ton (short) [ton (US)] [1102311310924.4]">ton (short) [ton (US)]</option><option value="ton (long) [ton (UK)] [984206527611.06]">ton (long) [ton (UK)]</option><option value="Atomic mass unit [u] [6.0221366516752E+41]">Atomic mass unit [u]</option><option value="exagram [Eg] [1]">exagram [Eg]</option><option value="petagram [Pg] [1000]">petagram [Pg]</option><option value="teragram [Tg] [1000000]">teragram [Tg]</option><option value="gigagram [Gg] [1000000000]">gigagram [Gg]</option><option value="megagram [Mg] [1000000000000]">megagram [Mg]</option><option value="hectogram [hg] [1.0E+16]">hectogram [hg]</option><option value="dekagram [dag] [1.0E+17]">dekagram [dag]</option><option value="decigram [dg] [1.0E+19]">decigram [dg]</option><option value="centigram [cg] [1.0E+20]">centigram [cg]</option><option value="microgram [&#181;g] [1.0E+24]">microgram [&#181;g]</option><option value="nanogram [ng] [1.0E+27]">nanogram [ng]</option><option value="picogram [pg] [1.0E+30]">picogram [pg]</option><option value="femtogram [fg] [1.0E+33]">femtogram [fg]</option><option value="attogram [ag] [1.0E+36]">attogram [ag]</option><option value="dalton [6.02217364335E+41]">dalton</option><option value="kilogram-force square second/meter [1.0197162129779E+14]">kilogram-force square second/meter</option><option value="kilopound [kip] [2204622621848.8]">kilopound [kip]</option><option value="kip [2204622621848.8]">kip</option><option value="slug [68521765856800]">slug</option><option value="pound-force square second/foot [68521765856792]">pound-force square second/foot</option><option value="pound (troy or apothecary) [2.679228880719E+15]">pound (troy or apothecary)</option><option value="poundal [pdl] [7.09888484236E+16]">poundal [pdl]</option><option value="ton (assay) (US) [AT (US)] [3.4285710367347E+16]">ton (assay) (US) [AT (US)]</option><option value="ton (assay) (UK) [AT (UK)] [3.061224489796E+16]">ton (assay) (UK) [AT (UK)]</option><option value="kiloton (metric) [kt] [1000000000]">kiloton (metric) [kt]</option><option value="quintal (metric) [cwt] [10000000000000]">quintal (metric) [cwt]</option><option value="hundredweight (US) [22046226218488]">hundredweight (US)</option><option value="hundredweight (UK) [19684130552221]">hundredweight (UK)</option><option value="quarter (US) [qr (US)] [88184904873951]">quarter (US) [qr (US)]</option><option value="quarter (UK) [qr (UK)] [78736522208885]">quarter (UK) [qr (UK)]</option><option value="stone (US) [1.763698097479E+14]">stone (US)</option><option value="stone (UK) [1.5747304441777E+14]">stone (UK)</option><option value="tonne [t] [1000000000000]">tonne [t]</option><option value="pennyweight [pwt] [6.4301493137083E+17]">pennyweight [pwt]</option><option value="scruple (apothecary) [s.ap] [7.71617917645E+17]">scruple (apothecary) [s.ap]</option><option value="grain [gr] [1.54323583529E+19]">grain [gr]</option><option value="gamma [1.0E+24]">gamma</option><option value="talent (Biblical Hebrew) [29239766081871]">talent (Biblical Hebrew)</option><option value="mina (Biblical Hebrew) [1.7543859649123E+15]">mina (Biblical Hebrew)</option><option value="shekel (Biblical Hebrew) [8.7719298245614E+16]">shekel (Biblical Hebrew)</option><option value="bekan (Biblical Hebrew) [1.7543859649123E+17]">bekan (Biblical Hebrew)</option><option value="gerah (Biblical Hebrew) [1.7543859649123E+18]">gerah (Biblical Hebrew)</option><option value="talent (Biblical Greek) [49019607843137]">talent (Biblical Greek)</option><option value="mina (Biblical Greek) [2.9411764705882E+15]">mina (Biblical Greek)</option><option value="tetradrachma (Biblical Greek) [7.3529411764706E+16]">tetradrachma (Biblical Greek)</option><option value="didrachma (Biblical Greek) [1.4705882352941E+17]">didrachma (Biblical Greek)</option><option value="drachma (Biblical Greek) [2.9411764705882E+17]">drachma (Biblical Greek)</option><option value="denarius (Biblical Roman) [2.5974025974026E+17]">denarius (Biblical Roman)</option><option value="assarion (Biblical Roman) [4.1558441558442E+18]">assarion (Biblical Roman)</option><option value="quadrans (Biblical Roman) [1.6623376623377E+19]">quadrans (Biblical Roman)</option><option value="lepton (Biblical Roman) [3.3246753246753E+19]">lepton (Biblical Roman)</option><option value="Planck mass [4.5940892447777E+22]">Planck mass</option><option value="Electron mass (rest) [1.0977683828808E+45]">Electron mass (rest)</option><option value="Muon mass [5.3091724927313E+42]">Muon mass</option><option value="Proton mass [5.9786332019449E+41]">Proton mass</option><option value="Neutron mass [5.9704037533301E+41]">Neutron mass</option><option value="Deuteron mass [2.9908008946084E+41]">Deuteron mass</option><option value="Earth's mass [1.673360107095E-10]">Earth's mass</option><option value="Sun's mass [5.0E-16]">Sun's mass</option></select>
		</td>
	</tr>
</table>
       <br> <br>
							</div></div>
						</div></div></div>
</div>

<script>noValidation=0;</script> &nbsp;<!--  <a href="/weight-and-mass/kilogram-to-hundredweight-uk.htm">
kilogram to hundredweight (UK)</a></div></li><li>1 quarter (US) [qr (US)] = 11.33980925 kilogram [kg]<div>
<a href="/weight-and-mass/quarter-us-to-kilogram.htm">quarter (US) to kilogram</a>, &nbsp; <a href="/weight-
and-mass/kilogram-to-quarter-us.htm">kilogram to quarter (US)</a></div></li><li>1 quarter (UK) [qr (UK)] = 12
.70058636 kilogram [kg]<div><a href="/weight-and-mass/quarter-uk-to-kilogram.htm">quarter (UK) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-quarter-uk.htm">kilogram to quarter (UK)</a></div></li><li>1 stone (US) = 5.669904625 kilogram [kg]<div><a href="/weight-and-mass/stone-us-to-kilogram.htm">stone (US) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-stone-us.htm">kilogram to stone (US)</a></div></li><li>1 stone (UK) = 6.35029318 kilogram [kg]<div><a href="/weight-and-mass/stone-uk-to-kilogram.htm">stone (UK) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-stone-uk.htm">kilogram to stone (UK)</a></div></li><li>1 tonne [t] = 1000 kilogram [kg]<div><a href="/weight-and-mass/tonne-to-kilogram.htm">tonne to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-tonne.htm">kilogram to tonne</a></div></li><li>1 pennyweight [pwt] = 0.0015551738 kilogram [kg]<div><a href="/weight-and-mass/pennyweight-to-kilogram.htm">pennyweight to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-pennyweight.htm">kilogram to pennyweight</a></div></li><li>1 scruple (apothecary) [s.ap] = 0.0012959782 kilogram [kg]<div><a href="/weight-and-mass/scruple-apothecary-to-kilogram.htm">scruple (apothecary) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-scruple-apothecary.htm">kilogram to scruple (apothecary)</a></div></li><li>1 grain [gr] = 6.47989E-5 kilogram [kg]<div><a href="/weight-and-mass/grain-to-kilogram.htm">grain to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-grain.htm">kilogram to grain</a></div></li><li>1 gamma = 1.0E-9 kilogram [kg]<div><a href="/weight-and-mass/gamma-to-kilogram.htm">gamma to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-gamma.htm">kilogram to gamma</a></div></li><li>1 talent (Biblical Hebrew) = 34.2 kilogram [kg]<div><a href="/weight-and-mass/talent-biblical-hebrew-to-kilogram.htm">talent (Biblical Hebrew) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-talent-biblical-hebrew.htm">kilogram to talent (Biblical Hebrew)</a></div></li><li>1 mina (Biblical Hebrew) = 0.57 kilogram [kg]<div><a href="/weight-and-mass/mina-biblical-hebrew-to-kilogram.htm">mina (Biblical Hebrew) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-mina-biblical-hebrew.htm">kilogram to mina (Biblical Hebrew)</a></div></li><li>1 shekel (Biblical Hebrew) = 0.0114 kilogram [kg]<div><a href="/weight-and-mass/shekel-biblical-hebrew-to-kilogram.htm">shekel (Biblical Hebrew) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-shekel-biblical-hebrew.htm">kilogram to shekel (Biblical Hebrew)</a></div></li><li>1 bekan (Biblical Hebrew) = 0.0057 kilogram [kg]<div><a href="/weight-and-mass/bekan-biblical-hebrew-to-kilogram.htm">bekan (Biblical Hebrew) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-bekan-biblical-hebrew.htm">kilogram to bekan (Biblical Hebrew)</a></div></li><li>1 gerah (Biblical Hebrew) = 0.00057 kilogram [kg]<div><a href="/weight-and-mass/gerah-biblical-hebrew-to-kilogram.htm">gerah (Biblical Hebrew) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-gerah-biblical-hebrew.htm">kilogram to gerah (Biblical Hebrew)</a></div></li><li>1 talent (Biblical Greek) = 20.4 kilogram [kg]<div><a href="/weight-and-mass/talent-biblical-greek-to-kilogram.htm">talent (Biblical Greek) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-talent-biblical-greek.htm">kilogram to talent (Biblical Greek)</a></div></li><li>1 mina (Biblical Greek) = 0.34 kilogram [kg]<div><a href="/weight-and-mass/mina-biblical-greek-to-kilogram.htm">mina (Biblical Greek) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-mina-biblical-greek.htm">kilogram to mina (Biblical Greek)</a></div></li><li>1 tetradrachma (Biblical Greek) = 0.0136 kilogram [kg]<div><a href="/weight-and-mass/tetradrachma-biblical-greek-to-kilogram.htm">tetradrachma (Biblical Greek) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-tetradrachma-biblical-greek.htm">kilogram to tetradrachma (Biblical Greek)</a></div></li><li>1 didrachma (Biblical Greek) = 0.0068 kilogram [kg]<div><a href="/weight-and-mass/didrachma-biblical-greek-to-kilogram.htm">didrachma (Biblical Greek) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-didrachma-biblical-greek.htm">kilogram to didrachma (Biblical Greek)</a></div></li><li>1 drachma (Biblical Greek) = 0.0034 kilogram [kg]<div><a href="/weight-and-mass/drachma-biblical-greek-to-kilogram.htm">drachma (Biblical Greek) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-drachma-biblical-greek.htm">kilogram to drachma (Biblical Greek)</a></div></li><li>1 denarius (Biblical Roman) = 0.00385 kilogram [kg]<div><a href="/weight-and-mass/denarius-biblical-roman-to-kilogram.htm">denarius (Biblical Roman) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-denarius-biblical-roman.htm">kilogram to denarius (Biblical Roman)</a></div></li><li>1 assarion (Biblical Roman) = 0.000240625 kilogram [kg]<div><a href="/weight-and-mass/assarion-biblical-roman-to-kilogram.htm">assarion (Biblical Roman) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-assarion-biblical-roman.htm">kilogram to assarion (Biblical Roman)</a></div></li><li>1 quadrans (Biblical Roman) = 6.01563E-5 kilogram [kg]<div><a href="/weight-and-mass/quadrans-biblical-roman-to-kilogram.htm">quadrans (Biblical Roman) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-quadrans-biblical-roman.htm">kilogram to quadrans (Biblical Roman)</a></div></li><li>1 lepton (Biblical Roman) = 3.00781E-5 kilogram [kg]<div><a href="/weight-and-mass/lepton-biblical-roman-to-kilogram.htm">lepton (Biblical Roman) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-lepton-biblical-roman.htm">kilogram to lepton (Biblical Roman)</a></div></li><li>1 Planck mass = 2.17671E-8 kilogram [kg]<div><a href="/weight-and-mass/planck-mass-to-kilogram.htm">Planck mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-planck-mass.htm">kilogram to Planck mass</a></div></li><li>1 Electron mass (rest) = 9.1093897E-31 kilogram [kg]<div><a href="/weight-and-mass/electron-mass-rest-to-kilogram.htm">Electron mass (rest) to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-electron-mass-rest.htm">kilogram to Electron mass (rest)</a></div></li><li>1 Muon mass = 1.8835327E-28 kilogram [kg]<div><a href="/weight-and-mass/muon-mass-to-kilogram.htm">Muon mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-muon-mass.htm">kilogram to Muon mass</a></div></li><li>1 Proton mass = 1.6726231E-27 kilogram [kg]<div><a href="/weight-and-mass/proton-mass-to-kilogram.htm">Proton mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-proton-mass.htm">kilogram to Proton mass</a></div></li><li>1 Neutron mass = 1.6749286E-27 kilogram [kg]<div><a href="/weight-and-mass/neutron-mass-to-kilogram.htm">Neutron mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-neutron-mass.htm">kilogram to Neutron mass</a></div></li><li>1 Deuteron mass = 3.343586E-27 kilogram [kg]<div><a href="/weight-and-mass/deuteron-mass-to-kilogram.htm">Deuteron mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-deuteron-mass.htm">kilogram to Deuteron mass</a></div></li><li>1 Earth's mass = 5.9760000000002E+24 kilogram [kg]<div><a href="/weight-and-mass/earth-s-mass-to-kilogram.htm">Earth's mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-earth-s-mass.htm">kilogram to Earth's mass</a></div></li><li>1 Sun's mass = 2.0E+30 kilogram [kg]<div><a href="/weight-and-mass/sun-s-mass-to-kilogram.htm">Sun's mass to kilogram</a>, &nbsp; <a href="/weight-and-mass/kilogram-to-sun-s-mass.htm">kilogram to Sun's mass</a></div></li></ul>	</div>
 -->	<div id="right">
	
		<div><script async src=""></script>
<!-- UnitConverter336-280 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:336px;height:280px"
     data-ad-client="ca-pub-2927677119936553"
     data-ad-slot="6614233797"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br></div>
		<div id="socialshare" style="padding-top: 10px;"></div>
		<br>
		<div id="othercalc"></div><script async>showNav("Common Converters");</script>	</div>
</div>

<script>
function isNumber(val) {
    val = val + "";
    if (val.length < 1) return false;
    if (isNaN(val)) {
        return false;
    } else {
        return true;
    }
}
function trimAll(sString){while (sString.substring(0,1) == ' '){sString = sString.substring(1, sString.length);}while (sString.substring(sString.length-1, sString.length) == ' '){sString = sString.substring(0,sString.length-1);} return sString;}
function cleanNumberInput(inVal){
	var tempVal	= inVal+"";
	while ((tempVal.indexOf(" ")>-1)||(tempVal.indexOf("	")>-1)||(tempVal.indexOf(",")>-1)){
		tempVal = tempVal.replace(" ", "").replace("	", "").replace(",", "");
	}
	return tempVal;
}
function gnumberFormat(valToBeFormated){
	var gniTotalDigits = 12;
	var gniPareSize = 12;
	var valStr = "" + valToBeFormated;
	if (valStr.indexOf("N")>=0 || (valToBeFormated == 2*valToBeFormated && valToBeFormated == 1+valToBeFormated)) return "Error ";
	var i = valStr.indexOf("e")
	if (i>=0){
		var expStr = valStr.substring(i+1,valStr.length);
		if (i>11) i=11;  // max 11 digits
		valStr = valStr.substring(0,i);
		if (valStr.indexOf(".")<0){
			valStr += ".";
		}else{
			// remove trailing zeros
			j = valStr.length-1;
			while (j>=0 && valStr.charAt(j)=="0") --j;
			valStr = valStr.substring(0,j+1);
		}
		valStr += "E" + expStr;
	}else{
		var valNeg = false;
		if (valToBeFormated < 0){
			valToBeFormated = -valToBeFormated;
			valNeg = true;
		}
		var valInt = Math.floor(valToBeFormated);
		var valFrac = valToBeFormated - valInt;
		var prec = gniTotalDigits - (""+valInt).length - 1;	// how many digits available after period

		var mult = " 1000000000000000000".substring(1,prec+2);
		if ((mult=="")||(mult==" ")){
			mult = 1;
		}else{
			mult = parseInt(mult);
		}
		var frac = Math.floor(valFrac * mult + 0.5);
		valInt = Math.floor(Math.floor(valToBeFormated * mult + .5) / mult);
		if (valNeg)
			valStr = "-" + valInt;
		else
			valStr = "" + valInt;
		var fracStr = "00000000000000"+frac;
		fracStr = fracStr.substring(fracStr.length-prec, fracStr.length);
		i = fracStr.length-1;

		// remove trailing zeros unless fixed during entry.
		while (i>=0 && fracStr.charAt(i)=="0") --i;
		fracStr = fracStr.substring(0,i+1);
		if (i>=0) valStr += "." + fracStr;
	}
	return valStr;
}
function ucParseSelectValue(inStr){
	var tempArray = inStr.split("[");
	var ucOutArray = [];
	ucOutArray.push(trimAll(tempArray[0]));
	ucOutArray.push(trimAll(tempArray[1].replace("]","")));
	if (tempArray.length>2){
		ucOutArray.push(trimAll(tempArray[2].replace("]","")));
	}
	return ucOutArray;
}
function ucCalculateResultNumOnly(inVal, inFrom, inTo){
	var tempResult = 0;
	var tempInVal = inVal;
	var tempInFrom = inFrom+"";
	var tempInTo = inTo+"";
	if ((tempInFrom.indexOf(":")>0)||(tempInTo.indexOf(":")>0)){
		tempArrayFrom = tempInFrom.split(":");
		tempArrayTo = tempInTo.split(":");
		if ((tempArrayFrom.length==3)||(tempArrayTo.length==3)){
			// Temperature
			eval("tempResult = (("+inVal+"-("+tempArrayFrom[2]+"))/(("+tempArrayFrom[1]+")-("+tempArrayFrom[2]+")))*(("+tempArrayTo[1]+")-("+tempArrayTo[2]+"))+(" + tempArrayTo[2] + ");");
		}else{
			if (("3"==tempArrayFrom[0])||("3"==tempArrayTo[0])){
				//Binary
				//alert("tempResult = (parseInt("+inVal+", "+tempArrayFrom[1]+")).toString("+tempArrayTo[1]+");");
				eval("tempResult = (parseInt(\""+inVal+"\", "+tempArrayFrom[1]+")).toString("+tempArrayTo[1]+");");
				return (tempResult+"").toUpperCase();
			}else{
				if (tempInFrom.indexOf(":")>0){
					if (tempInTo.indexOf(":")>0){
						eval("tempResult = " + tempInVal + "*" + tempArrayTo[1] + "/" + tempArrayFrom[1]);
					}else{
						eval("tempResult = 1/" + tempInVal + "*" + tempArrayFrom[1] + "*" + tempInTo);
					}
				}else{
					eval("tempResult = 1/" + tempInVal + "*" + tempInFrom + "*" + tempArrayTo[1]);
				}
			}
		}
	}else{
		eval("tempResult = " + tempInVal + "*" + tempInTo + "/" + tempInFrom);
	}
	return tempResult;
}
function ucCalculateResult(inVal, inFrom, inTo){
	if (inTo.indexOf(":")>0){
		var tempUntArray = inTo.split(":");
		if (tempUntArray[0]!='3'){
			return gnumberFormat(ucCalculateResultNumOnly(inVal, inFrom, inTo));
		}else{
			return ucCalculateResultNumOnly(inVal, inFrom, inTo);
		}
	}else{
		return gnumberFormat(ucCalculateResultNumOnly(inVal, inFrom, inTo));
	}
}
function ucUpdateResult(){
	var ucfromvalue = cleanNumberInput(document.getElementById("ucfrom").value);
	var ucfromunit = document.getElementById("ucfromunit");
	var uctounit = document.getElementById("uctounit");
	var ucfromunitvalue = ucfromunit.value;
	var uctounitvalue = uctounit.value;
	var uctounitID = 0;
	for (var i = 0; i < uctounit.options.length; i++) {
		if(uctounit.options[i].selected) uctounitID = i;
	}
	if (noValidation==1){
		ucfromvalue = trimAll((ucfromvalue+"").toUpperCase());

		var ucfromunitvalueArray = ucParseSelectValue(ucfromunitvalue);
		var uctounitvalueArray = ucParseSelectValue(uctounitvalue);
		tempBaseNum = parseInt((ucfromunitvalueArray[1]).substr(2).replace("]", ""));
		var tempTestStr = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";

		tempRegStr = "";
		if (tempBaseNum>10){
			tempRegStr = "^[0-9A-"+tempTestStr.substr(tempBaseNum,1)+"]+$";
		}else{
			tempRegStr = "^[0-"+tempTestStr.substr(tempBaseNum,1)+"]+$";
		}
		var reg = new RegExp(tempRegStr);
		if (reg.test(ucfromvalue)){
			var tempResult = 1;
			tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[1]);

			document.getElementById("ucto").value = tempResult;
			document.getElementById("ucresult").innerHTML = "<font color='red'><b>Result:</b></font> " + ucfromvalue + " " + ucfromunitvalueArray[0] + " = " + tempResult + " " + uctounitvalueArray[0] + "";
			document.getElementById("ucresult").style.color = "black";
			//document.getElementById("ucresult").style.border = "2px solid #406b04";

			for (var i = 0; i < uctounit.options.length; i++) {
				var tempArray = ucParseSelectValue(uctounit.options[i].value);
				var tempVal = "";
				var tempResult = 0;
				tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], tempArray[1]);
				tempVal = tempArray[0] + " (" + tempResult + ")";
				uctounit.options[i] = new Option(tempVal,uctounit.options[i].value);
				if (uctounitID==i){
					uctounit.options[i].selected = true;
				}
			}
		}else{
			if (ucfromvalue.length>0){
				document.getElementById("ucresult").innerHTML = "Please provide a valid number!";
				document.getElementById("ucresult").style.color = "red";
				//document.getElementById("ucresult").style.border = "2px solid #406b04";
			}else{
				document.getElementById("ucresult").innerHTML = "";
				//document.getElementById("ucresult").style.border = "2px solid #ffffff";
			}
			document.getElementById("ucto").value = "";
			for (var i = 0; i < uctounit.options.length; i++) {
				var tempArray = ucParseSelectValue(uctounit.options[i].value);
				var tempVal = "";
				if (tempArray.length>2){
					tempVal = tempArray[0] + " [" + tempArray[1] + "]";
				}else{
					tempVal = tempArray[0];
				}
				uctounit.options[i] = new Option(tempVal,uctounit.options[i].value);
				if (uctounitID==i){
					uctounit.options[i].selected = true;
				}
			}
		}
	}else{
		if (!isNumber(ucfromvalue)){
			if (ucfromvalue.length>0){
				document.getElementById("ucresult").innerHTML = "Please provide a valid number!";
				document.getElementById("ucresult").style.color = "red";
				//document.getElementById("ucresult").style.border = "2px solid #406b04";
			}else{
				document.getElementById("ucresult").innerHTML = "";
				//document.getElementById("ucresult").style.border = "2px solid #ffffff";
			}
			document.getElementById("ucto").value = "";
			for (var i = 0; i < uctounit.options.length; i++) {
				var tempArray = ucParseSelectValue(uctounit.options[i].value);
				var tempVal = "";
				if (tempArray.length>2){
					tempVal = tempArray[0] + " [" + tempArray[1] + "]";
				}else{
					tempVal = tempArray[0];
				}
				uctounit.options[i] = new Option(tempVal,uctounit.options[i].value);
				if (uctounitID==i){
					uctounit.options[i].selected = true;
				}
			}
		}else{
			var ucfromunitvalueArray = ucParseSelectValue(ucfromunitvalue);
			var uctounitvalueArray = ucParseSelectValue(uctounitvalue);
			var tempResult = 1;
			if (ucfromunitvalueArray.length>2){
				if (uctounitvalueArray.length>2){
					tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[2], uctounitvalueArray[2]);
				}else{
					tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[2], uctounitvalueArray[1]);
				}
			}else{
				if (uctounitvalueArray.length>2){
					tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[2]);
				}else{
					tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[1]);
				}
			}
			document.getElementById("ucto").value = tempResult;
			document.getElementById("ucresult").innerHTML = "<font color='red'><b>Result:</b></font> " + ucfromvalue + " " + ucfromunitvalueArray[0] + " = " + tempResult + " " + uctounitvalueArray[0] + "";
			document.getElementById("ucresult").style.color = "black";
			//document.getElementById("ucresult").style.border = "2px solid #406b04";

			for (var i = 0; i < uctounit.options.length; i++) {
				var tempArray = ucParseSelectValue(uctounit.options[i].value);
				var tempVal = "";
				var tempResult = 0;
				if (tempArray.length>2){
					if (ucfromunitvalueArray.length>2){
						tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[2], tempArray[2]);
					}else{
						tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], tempArray[2]);
					}
					tempVal = tempArray[0] + " [" + tempArray[1] + "] (" + tempResult + ")";
				}else{
					if (ucfromunitvalueArray.length>2){
						tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[2], tempArray[1]);
					}else{
						tempResult = ucCalculateResult(ucfromvalue, ucfromunitvalueArray[1], tempArray[1]);
					}
					tempVal = tempArray[0] + " (" + tempResult + ")";
				}
				uctounit.options[i] = new Option(tempVal,uctounit.options[i].value);
				if (uctounitID==i){
					uctounit.options[i].selected = true;
				}
			}
		}
	}
}

function convertFIToFra(inRSNum, inRSUnit){
	var totalInch = inRSNum;
	if (inRSUnit=='foot') totalInch = inRSNum * 12;
	var totalFeet = Math.floor(totalInch/12);
	var subInch = Math.floor(totalInch - (totalFeet*12));
	var inchDigit = totalInch - Math.floor(totalInch);
	totalInch = Math.floor(totalInch);
	var inchFracTop = Math.round(inchDigit*64);
	var inchFracBottom = 64;
	if (inchFracTop==64){
		totalInch = totalInch + 1;
		subInch = subInch + 1;
		if (subInch==12){
			subInch = 0;
			totalFeet = totalFeet + 1;
		}
		inchFracTop = 0;
	}else{
		if ((inchFracTop%32)==0){
			inchFracTop = inchFracTop/32;
			inchFracBottom = 2;
		}else if ((inchFracTop%16)==0){
			inchFracTop = inchFracTop/16;
			inchFracBottom = 4;
		}else if ((inchFracTop%8)==0){
			inchFracTop = inchFracTop/8;
			inchFracBottom = 8;
		}else if ((inchFracTop%4)==0){
			inchFracTop = inchFracTop/4;
			inchFracBottom = 16;
		}else if ((inchFracTop%2)==0){
			inchFracTop = inchFracTop/2;
			inchFracBottom = 32;
		}
	}
	if ((totalInch+inchFracTop)<1) return "";
	var finalResult = "<br>OR<br>";
	if (totalFeet>0){
		if (totalFeet>1){
			finalResult += totalFeet + " feet ";
		}else{
			finalResult += totalFeet + " foot ";
		}
		if (subInch>0){
			if (inchFracTop>0){
				finalResult += subInch + " <sup>" + inchFracTop + "</sup>/<sub>" + inchFracBottom + "</sub> inches ";
			}else{
				if (subInch>1){
					finalResult += subInch + " inches ";
				}else{
					finalResult += subInch + " inch ";
				}
			}
		}else{
			if (inchFracTop>0){
				finalResult += " <sup>" + inchFracTop + "</sup>/<sub>" + inchFracBottom + "</sub> inch ";
			}
		}
		finalResult += "<br>OR<br>";
	}
	if (totalInch>0){
		if (inchFracTop>0){
			finalResult += totalInch + " <sup>" + inchFracTop + "</sup>/<sub>" + inchFracBottom + "</sub> inches ";
		}else{
			if (totalInch>1){
				finalResult += totalInch + " inches ";
			}else{
				finalResult += totalInch + " inch ";
			}
		}
	}else{
		if (inchFracTop>0){
			finalResult += " <sup>" + inchFracTop + "</sup>/<sub>" + inchFracBottom + "</sub> inch ";
		}
	}
	return finalResult;
}

function ucDCUpdateResult(usdcType){
	processingType = usdcType;
	var ucfromvalue = cleanNumberInput(document.getElementById("ucfrom").value);
	var ucfromunit = document.getElementById("ucfromunit");
	var uctounit = document.getElementById("uctounit");
	var uctoid = document.getElementById("ucto");
	if (usdcType==1){
		ucfromvalue = cleanNumberInput(document.getElementById("ucto").value);
		ucfromunit = document.getElementById("uctounit");
		uctounit = document.getElementById("ucfromunit");
		uctoid = document.getElementById("ucfrom");
	}
	var ucfromunitvalue = ucfromunit.value;
	var uctounitvalue = uctounit.value;

	if (noValidation==1){
		ucfromvalue = trimAll((ucfromvalue+"").toUpperCase());

		var ucfromunitvalueArray = ucParseSelectValue(ucfromunitvalue);
		var uctounitvalueArray = ucParseSelectValue(uctounitvalue);
		tempBaseNum = parseInt((ucfromunitvalueArray[1]).substr(2).replace("]", ""));
		var tempTestStr = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";

		tempRegStr = "";
		if (tempBaseNum>10){
			tempRegStr = "^[0-9A-"+tempTestStr.substr(tempBaseNum,1)+"]+$";
		}else{
			tempRegStr = "^[0-"+tempTestStr.substr(tempBaseNum,1)+"]+$";
		}
		var reg = new RegExp(tempRegStr);
		if (reg.test(ucfromvalue)){
			var tempResult = 1;
			tempResult = ucCalculateResultNumOnly(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[1]);
			if (uctounitvalueArray[1].indexOf(":")>0){
				var tempUntArray = uctounitvalueArray[1].split(":");
				if (tempUntArray[0]!='3'){
					tempResult = gnumberFormat(tempResult);
				}
			}else{
				tempResult = gnumberFormat(tempResult);
			}
			uctoid.value = tempResult;
			document.getElementById("ucresult").innerHTML = "<font color='red'><b>Result:</b></font> " + ucfromvalue + " " + ucfromunitvalueArray[0] + " = " + tempResult + " " + uctounitvalueArray[0] + "";
			document.getElementById("ucresult").style.color = "black";
			//document.getElementById("ucresult").style.border = "2px solid #406b04";
		}else{
			if (ucfromvalue.length>0){
				document.getElementById("ucresult").innerHTML = "Please provide a valid number!";
				document.getElementById("ucresult").style.color = "red";
				//document.getElementById("ucresult").style.border = "2px solid #406b04";
			}else{
				document.getElementById("ucresult").innerHTML = "";
				//document.getElementById("ucresult").style.border = "2px solid #ffffff";
			}
			uctoid.value = "";
		}
	}else{
		if (!isNumber(ucfromvalue)){
			if (ucfromvalue.length>0){
				document.getElementById("ucresult").innerHTML = "Please provide a valid number!";
				document.getElementById("ucresult").style.color = "red";
				//document.getElementById("ucresult").style.border = "2px solid #406b04";
			}else{
				document.getElementById("ucresult").innerHTML = "";
				//document.getElementById("ucresult").style.border = "2px solid #ffffff";
			}
			uctoid.value = "";
		}else{
			var ucfromunitvalueArray = ucParseSelectValue(ucfromunitvalue);
			var uctounitvalueArray = ucParseSelectValue(uctounitvalue);
			var tempResult = 1;
			var tempResultMore = "";
			if (ucfromunitvalueArray.length>2){
				if (uctounitvalueArray.length>2){
					tempResult = ucCalculateResultNumOnly(ucfromvalue, ucfromunitvalueArray[2], uctounitvalueArray[2]);
					if ((uctounitvalueArray[0]=='foot')||(uctounitvalueArray[0]=='inch')){
						tempResultMore = convertFIToFra(tempResult, uctounitvalueArray[0]);
					}
				}else{
					tempResult = ucCalculateResultNumOnly(ucfromvalue, ucfromunitvalueArray[2], uctounitvalueArray[1]);
				}
			}else{
				if (uctounitvalueArray.length>2){
					tempResult = ucCalculateResultNumOnly(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[2]);
					if ((uctounitvalueArray[0]=='foot')||(uctounitvalueArray[0]=='inch')){
						tempResultMore = convertFIToFra(tempResult, uctounitvalueArray[0]);
					}
				}else{
					tempResult = ucCalculateResultNumOnly(ucfromvalue, ucfromunitvalueArray[1], uctounitvalueArray[1]);
				}
			}
			tempResult = gnumberFormat(tempResult);
			uctoid.value = tempResult;
			document.getElementById("ucresult").innerHTML = "<font color='red'><b>Result:</b></font> " + ucfromvalue + " " + ucfromunitvalueArray[0] + " = " + tempResult + " " + uctounitvalueArray[0] + tempResultMore;
			document.getElementById("ucresult").style.color = "black";
			//document.getElementById("ucresult").style.border = "2px solid #406b04";
		}
	}
}

// The following is for homepage
function gObj(obj) {var theObj;if(document.all){if(typeof obj=="string"){return document.all(obj);}else{return obj.style;}}if(document.getElementById){if(typeof obj=="string"){return document.getElementById(obj);}else{return obj.style;}}return null;}
function popMenu(inval){
	htmlVal = "";
	for (i = 0; i < allA.length; i++) {
		if (inval == allA[i][0][0]){
			htmlVal = htmlVal + "<li id='menuon'><a href='javascript:popMenu(\"" + allA[i][0][0] + "\");showSel(" + allA[i][0][1] + ");'>" + allA[i][0][0] + "</a></li> ";
		}else{
			htmlVal = htmlVal + "<li><a href='javascript:popMenu(\"" + allA[i][0][0] + "\");showSel(" + allA[i][0][1] + ");'>" + allA[i][0][0] + "</a></li> ";
		}
	}
	htmlVal = "<ul>" + htmlVal + "</ul>";
	gObj("menu").innerHTML = htmlVal;
}

function popMenuSmall(inval){
	tA[0] = new Array("Temp","tA");
	htmlVal = "";
	for (i = 0; i < allA.length; i++) {

		if (inval == allA[i][0][0]){
			htmlVal = htmlVal + "<li id='menuon'><a href='javascript:popMenuSmall(\"" + allA[i][0][0] + "\");showSel(" + allA[i][0][1] + ");'>" + allA[i][0][0] + "</a></li> ";
		}else{
			htmlVal = htmlVal + "<li><a href='javascript:popMenuSmall(\"" + allA[i][0][0] + "\");showSel(" + allA[i][0][1] + ");'>" + allA[i][0][0] + "</a></li> ";
		}
	}
	htmlVal = "<ul>" + htmlVal + "</ul>";
	gObj("menu").innerHTML = htmlVal;
}


var lA = new Array();
lA[0] = new Array("Length","lA");
lA[1] = new Array("Meter","iv","iv");
lA[2] = new Array("Kilometer","iv*1000","iv/1000");
lA[3] = new Array("Centimeter","iv*0.01","iv/0.01");
lA[4] = new Array("Millimeter","iv*0.001","iv/0.001");
lA[5] = new Array("Micrometer","iv*0.000001","iv/0.000001");
lA[6] = new Array("Nanometer","iv*0.000000001","iv/0.000000001");
lA[7] = new Array("Mile","iv*1609.35","iv/1609.35");
lA[8] = new Array("Yard","iv*0.9144","iv/0.9144");
lA[9] = new Array("Foot","iv*0.3048","iv/0.3048");
lA[10] = new Array("Inch","iv*0.0254","iv/0.0254");
lA[11] = new Array("Light Year","iv*9.46066e+15","iv/9.46066e+15");

var tA = new Array();
tA[0] = new Array("Temperature","tA");
tA[1] = new Array("Celsius","iv","iv");
tA[2] = new Array("Kelvin", "iv - 273.15", "iv + 273.15");
tA[3] = new Array("Fahrenheit", "5/9*(iv-32)", "9/5*iv + 32");

var aA = new Array();
aA[0] = new Array("Area","aA");
aA[1] = new Array("Square Meter","iv","iv");
aA[2] = new Array("Square Kilometer", "iv*1000000", "iv/1000000");
aA[3] = new Array("Square Centimeter", "iv*0.0001", "iv/0.0001");
aA[4] = new Array("Square Millimeter", "iv*0.000001", "iv/0.000001");
aA[5] = new Array("Square Micrometer", "iv*0.000000000001", "iv/0.000000000001");
aA[6] = new Array("Hectare", "iv*10000", "iv/10000");
aA[7] = new Array("Square Mile", "iv*2589990", "iv/2589990");
aA[8] = new Array("Square Yard", "iv*0.83612736", "iv/0.83612736");
aA[9] = new Array("Square Foot", "iv*0.09290304", "iv/0.09290304");
aA[10] = new Array("Square Inch", "iv*0.000645160", "iv/0.000645160");
aA[11] = new Array("Acre", "iv*4046.8564224", "iv/4046.8564224");

var vA = new Array();
vA[0] = new Array("Volume","vA");
vA[1] = new Array("Cubic Meter","iv","iv");
vA[2] = new Array("Cubic Kilometer", "iv*1000000000", "iv/1000000000");
vA[3] = new Array("Cubic Centimeter", "iv*0.000001", "iv/0.000001");
vA[4] = new Array("Cubic Millimeter", "iv*1.0e-9", "iv/1.0e-9");
vA[5] = new Array("Liter", "iv*0.001", "iv/0.001");
vA[6] = new Array("Milliliter", "iv*0.000001", "iv/0.000001");
vA[7] = new Array("US Gallon", "iv*0.00378541", "iv/0.00378541");
vA[8] = new Array("US Quart", "iv*0.0009463525", "iv/0.0009463525");
vA[9] = new Array("US Pint", "iv*0.00047317625", "iv/0.00047317625");
vA[10] = new Array("US Cup", "iv*0.000236588125", "iv/0.000236588125");
vA[11] = new Array("US Fluid Ounce", "iv*0.000029573515625", "iv/0.000029573515625");
vA[12] = new Array("US Table Spoon", "iv*0.0000147867578125", "iv/0.0000147867578125");
vA[13] = new Array("US Tea Spoon", "iv*4.9289192708333333333333333333333e-6", "iv/4.9289192708333333333333333333333e-6");
vA[14] = new Array("Imperial Gallon", "iv*0.00454609", "iv/0.00454609");
vA[15] = new Array("Imperial Quart", "iv*0.0011365225", "iv/0.0011365225");
vA[16] = new Array("Imperial Pint", "iv*0.00056826125", "iv/0.00056826125");
vA[17] = new Array("Imperial Fluid Ounce", "iv*0.0000284130625", "iv/0.0000284130625");
vA[18] = new Array("Imperial Table Spoon", "iv*0.0000177581640625", "iv/0.0000177581640625");
vA[19] = new Array("Imperial Tea Spoon", "iv*5.9193880208333333333333333333333e-6", "iv/5.9193880208333333333333333333333e-6");
vA[20] = new Array("Cubic Mile", "iv*4.16818e+9", "iv/4.16818e+9");
vA[21] = new Array("Cubic Yard", "iv*0.764554857984", "iv/0.764554857984");
vA[22] = new Array("Cubic Foot", "iv*0.028316846592", "iv/0.028316846592");
vA[23] = new Array("Cubic Inch", "iv*0.000016387064", "iv/0.000016387064");

var wA = new Array();
wA[0] = new Array("Weight","wA");
wA[1] = new Array("Kilogram","iv","iv");
wA[2] = new Array("Gram", "iv*0.001", "iv/0.001");
wA[3] = new Array("Milligram", "iv*0.000001", "iv/0.000001");
wA[4] = new Array("Metric Ton", "iv*1000", "iv/1000");
wA[5] = new Array("Long Ton", "iv*1016.04608", "iv/1016.04608");
wA[6] = new Array("Short Ton", "iv*907.184", "iv/907.184");
wA[7] = new Array("Pound", "iv*0.453592", "iv/0.453592");
wA[8] = new Array("Ounce", "iv*0.0283495", "iv/0.0283495");
wA[9] = new Array("Carrat", "iv*0.0002", "iv/0.0002");
wA[10] = new Array("Atomic Mass Unit", "iv*1.6605401999104288e-27", "iv/1.6605401999104288e-27");

var mA = new Array();
mA[0] = new Array("Time","mA");
mA[1] = new Array("Second","iv","iv");
mA[2] = new Array("Millisecond", "iv*0.001", "iv/0.001");
mA[3] = new Array("Microsecond", "iv*0.000001", "iv/0.000001");
mA[4] = new Array("Nanosecond", "iv*0.000000001", "iv/0.000000001");
mA[5] = new Array("Picosecond", "iv*0.000000000001", "iv/0.000000000001");
mA[6] = new Array("Minute", "iv*60", "iv/60");
mA[7] = new Array("Hour", "iv*3600", "iv/3600");
mA[8] = new Array("Day", "iv*86400", "iv/86400");
mA[9] = new Array("Week", "iv*604800", "iv/604800");
mA[10] = new Array("Month", "iv*2629800", "iv/2629800");
mA[11] = new Array("Year", "iv*31557600", "iv/31557600");

allA = new Array(lA,tA,aA,vA,wA,mA);

function isNum(sText){
	var ValidChars = "0123456789.-";
	var Char;
	if (sText.length < 1) return false;
	for (i = 0; i < sText.length; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) return false;
	}
	return true;
}

function showSel(aName){
	document.calForm.calFrom.length = 0;
	document.calForm.calTo.length = 0;
	for(i=1; i<aName.length; i++){
		document.calForm.calFrom.options[(i-1)] = new Option(aName[i][0],i);
		document.calForm.calTo.options[(i-1)] = new Option(aName[i][0],i);
	}
	document.calForm.calFrom.options[0].selected = true;
	document.calForm.calTo.options[1].selected = true;
	document.calForm.toVal.value = "";
	currentAName = aName;
	calcul();
}

function calVal(id, iv){
	eval("rv = (" + currentAName[id][2] + ");");
	return gnumberFormat(rv);
}
function calcul(){
	selectFrom = document.calForm.calFrom;
	selectTo = document.calForm.calTo;
	fromVal = cleanNumberInput(document.calForm.fromVal.value);
	selectFromID = 0;
	selectToID = 0;
	selectFromVal = "";
	selectToVal = "";
	stdval = 0;
	for (var i = 0; i < selectFrom.options.length; i++) {
		if(selectFrom.options[i].selected) {
			selectFromID = selectFrom.options[i].value;
			selectFromVal = selectFrom.options[i].text;
		}
	}
	for (var i = 0; i < selectTo.options.length; i++) {
		if(selectTo.options[i].selected) {
			selectToID = selectTo.options[i].value;
			selectToVal = selectTo.options[i].text;
		}
	}
	if ((selectFromID>0) && (isNumber(fromVal))){
		iv = parseFloat(fromVal);
		stdval = 0;
		eval("stdval = " + currentAName[selectFromID][1]+ ";");

		document.calForm.calTo.length = 0;
		for(i=1; i<currentAName.length; i++){
			tempVal = calVal(i, stdval);
			selectTo.options[(i-1)] = new Option(currentAName[i][0] + " (" + tempVal + ")",i);
			if (selectToID == i) {
				selectTo.options[(i-1)].selected = true;
				document.calForm.toVal.value = tempVal;
				//gObj("calResults").style.border = "2px solid #406b04";
				gObj("calResults").innerHTML = "<font color='red'><b>Result:</b></font> " + fromVal + " " + selectFromVal + " = " + tempVal + " " + currentAName[i][0];
			}
		}
	}
	if ((!(isNumber(fromVal)))||(selectFromID<1)){
		for(i=1; i<currentAName.length; i++){
			tempVal = calVal(i, stdval);
			selectTo.options[(i-1)] = new Option(currentAName[i][0],i);
			if (selectToID == i) {
				selectTo.options[(i-1)].selected = true;
				document.calForm.toVal.value = "";
				//gObj("calResults").style.border = "2px solid #fff";
				gObj("calResults").innerHTML = "";
			}
		}
		if ((fromVal+"").length>0){
			//gObj("calResults").style.border = "2px solid #406b04";
			gObj("calResults").innerHTML = "<font color='red'>Please provide a valid number!</font>";
		}
	}
}

var rightNavMain = new Array("Common Converters","Engineering Converters","Heat Converters","Fluids Converters","Light Converters","Electricity Converters","Magnetism Converters","Radiology Converters");
var rightNavSub = new Array();
rightNavSub[0] = new Array("<a href='/length-converter.html'>Length</a>","<a href='/weight-and-mass-converter.html'>Weight and Mass</a>","<a href='/volume-converter.html'>Volume</a>","<a href='/temperature-converter.html'>Temperature</a>","<a href='/area-converter.html'>Area</a>","<a href='/pressure-converter.html'>Pressure</a>","<a href='/energy-converter.html'>Energy</a>","<a href='/power-converter.html'>Power</a>","<a href='/force-converter.html'>Force</a>","<a href='/time-converter.html'>Time</a>","<a href='/speed-converter.html'>Speed</a>","<a href='/angle-converter.html'>Angle</a>","<a href='/fuel-consumption-converter.html'>Fuel Consumption</a>","<a href='/numbers-converter.html'>Numbers</a>","<a href='/data-storage-converter.html'>Data Storage</a>","<a href='/volume-dry-converter.html'>Volume - Dry</a>","<a href='/currency-converter.html'>Currency</a>","<a href='/case-converter.html'>Case</a>");
rightNavSub[1] = new Array("<a href='/volume-converter.html'>Volume</a>","<a href='/temperature-converter.html'>Temperature</a>","<a href='/area-converter.html'>Area</a>","<a href='/pressure-converter.html'>Pressure</a>","<a href='/energy-converter.html'>Energy</a>","<a href='/power-converter.html'>Power</a>","<a href='/force-converter.html'>Force</a>","<a href='/time-converter.html'>Time</a>","<a href='/speed-converter.html'>Speed</a>","<a href='/angle-converter.html'>Angle</a>","<a href='/fuel-consumption-converter.html'>Fuel Consumption</a>","<a href='/numbers-converter.html'>Numbers</a>","<a href='/data-storage-converter.html'>Data Storage</a>","<a href='/volume-dry-converter.html'>Volume - Dry</a>","<a href='/currency-converter.html'>Currency</a>","<a href='/velocity-angular-converter.html'>Velocity - Angular</a>","<a href='/acceleration-converter.html'>Acceleration</a>","<a href='/acceleration-angular-converter.html'>Acceleration - Angular</a>","<a href='/density-converter.html'>Density</a>","<a href='/specific-volume-converter.html'>Specific Volume</a>","<a href='/moment-of-inertia-converter.html'>Moment of Inertia</a>","<a href='/moment-of-force-converter.html'>Moment of Force</a>","<a href='/torque-converter.html'>Torque</a>");
rightNavSub[2] = new Array("<a href='/fuel-efficiency-mass-converter.html'>Fuel Efficiency - Mass</a>","<a href='/fuel-efficiency-volume-converter.html'>Fuel Efficiency - Volume</a>","<a href='/temperature-interval-converter.html'>Temperature Interval</a>","<a href='/thermal-expansion-converter.html'>Thermal Expansion</a>","<a href='/thermal-resistance-converter.html'>Thermal Resistance</a>","<a href='/thermal-conductivity-converter.html'>Thermal Conductivity</a>","<a href='/specific-heat-capacity-converter.html'>Specific Heat Capacity</a>","<a href='/heat-density-converter.html'>Heat Density</a>","<a href='/heat-flux-density-converter.html'>Heat Flux Density</a>","<a href='/heat-transfer-coefficient-converter.html'>Heat Transfer Coefficient</a>");
rightNavSub[3] = new Array("<a href='/flow-converter.html'>Flow</a>","<a href='/flow-mass-converter.html'>Flow - Mass</a>","<a href='/flow-molar-converter.html'>Flow - Molar</a>","<a href='/mass-flux-density-converter.html'>Mass Flux Density</a>","<a href='/concentration-molar-converter.html'>Concentration - Molar</a>","<a href='/concentration-solution-converter.html'>Concentration - Solution</a>","<a href='/viscosity-dynamic-converter.html'>Viscosity - Dynamic</a>","<a href='/viscosity-kinematic-converter.html'>Viscosity - Kinematic</a>","<a href='/surface-tension-converter.html'>Surface Tension</a>","<a href='/permeability-converter.html'>Permeability</a>");
rightNavSub[4] = new Array("<a href='/luminance-converter.html'>Luminance</a>","<a href='/luminous-intensity-converter.html'>Luminous Intensity</a>","<a href='/illumination-converter.html'>Illumination</a>","<a href='/digital-image-resolution-converter.html'>Digital Image Resolution</a>","<a href='/frequency-wavelength-converter.html'>Frequency Wavelength</a>");
rightNavSub[5] = new Array("<a href='/charge-converter.html'>Charge</a>","<a href='/linear-charge-density-converter.html'>Linear Charge Density</a>","<a href='/surface-charge-density-converter.html'>Surface Charge Density</a>","<a href='/volume-charge-density-converter.html'>Volume Charge Density</a>","<a href='/current-converter.html'>Current</a>","<a href='/linear-current-density-converter.html'>Linear Current Density</a>","<a href='/surface-current-density-converter.html'>Surface Current Density</a>","<a href='/electric-field-strength-converter.html'>Electric Field Strength</a>","<a href='/electric-potential-converter.html'>Electric Potential</a>","<a href='/electric-resistance-converter.html'>Electric Resistance</a>","<a href='/electric-resistivity-converter.html'>Electric Resistivity</a>","<a href='/electric-conductance-converter.html'>Electric Conductance</a>","<a href='/electric-conductivity-converter.html'>Electric Conductivity</a>","<a href='/electrostatic-capacitance-converter.html'>Electrostatic Capacitance</a>","<a href='/inductance-converter.html'>Inductance</a>");
rightNavSub[6] = new Array("<a href='/magnetomotive-force-converter.html'>Magnetomotive Force</a>","<a href='/magnetic-field-strength-converter.html'>Magnetic Field Strength</a>","<a href='/magnetic-flux-converter.html'>Magnetic Flux</a>","<a href='/magnetic-flux-density-converter.html'>Magnetic Flux Density</a>");
rightNavSub[7] = new Array("<a href='/radiation-converter.html'>Radiation</a>","<a href='/radiation-activity-converter.html'>Radiation-Activity</a>","<a href='/radiation-exposure-converter.html'>Radiation-Exposure</a>","<a href='/radiation-absorbed-dose-converter.html'>Radiation-Absorbed Dose</a>");

function showNav(inNavItems){
	var snavHTML = '';
	var snavMainStyle = ' style="background-color: #eee;color:#006633;background-image: url(\'/images/down-arrow.svg\');background-repeat: no-repeat;background-position: right 6px center;"';
	for (i = 0; i < rightNavMain.length; i++) {
		snavHTML += '<a href="#" onClick="return showNav(\''+rightNavMain[i]+'\')"';
		if (inNavItems==rightNavMain[i]) snavHTML += snavMainStyle;
		snavHTML += '>'+rightNavMain[i]+'</a>';

		if (inNavItems==rightNavMain[i]){
			snavHTML += '<div id="ocsubnav">';
			for (j = 0; j < rightNavSub[i].length; j++){
				snavHTML += rightNavSub[i][j];
			}
			snavHTML += '</div>';
		}
	}

	snavHTML = '<div id="octitle">All Converters</div><div id="occontent">'+snavHTML+'<a href="/common-unit-systems.php">Common Unit Systems</a></div>';;
	gObj("othercalc").innerHTML = snavHTML;
	return false;
}



</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=""></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-3068863-26');
</script>
                                  
									
									
								
                                
                                
                                
                                
                               
                         
					
				
	
	
	</section>
	<%-- <% }else{ 
     response.sendRedirect("login.jsp");
    } %> --%>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>

	<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
	<script
		src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
	<script type="text/javascript">
		$('[data-type="adhaar-number"]').keyup(
				function() {
					var value = $(this).val();
					value = value.replace(/\D/g, "").split(/(?:([\d]{4}))/g)
							.filter(s = s.length > 0).join("-");
					$(this).val(value);
				});

		$('[data-type="adhaar-number"]').on("change, blur", function() {
			var value = $(this).val();
			var maxLength = $(this).attr("maxLength");
			if (value.length != maxLength) {
				$(this).addClass("highlight-error");
				alert("Aadhar card number not valid");
			} else {
				$(this).removeClass("highlight-error");
			}
		});
	</script>
	</form>
	</div>
</body>
</html>