topical media & game development
lib-js-math-calculator-chemical.htm / htm
<head>
<style>
/* --------------------------------------------------------- */
/* Calc4Chem */
/* --------------------------------------------------------- */
#calc4chem {
position: relative;
top: 15px;
width: 529px;
height: 377px;
margin: auto;
border: 3px outset;
background: #e4e4e4;
text-align: center;
color: #eee;
}
#kalkulator {
position: absolute;
top: 3px;
left: 3px;
width: 257px;
height: 365px;
border: 0px ridge #f00;
background: #e4e4e4;
color: #fff;
}
#biljeska {
position: absolute;
top: 3px;
left: 267px;
width: 256px;
height: 365px;
border: 0px ridge #999;
background: #e4e4e4;
color: #fff;
}
#konstante {
position: absolute;
top: 13px;
left: 275px;
width: 245px;
height: 350px;
border: 1px ridge #999;
background: #fff;
color: #fff;
display: none;
/*visibility: hidden; visible hidden */
text-align: center;
overflow: auto;
}
#numformat {
position: absolute;
top: 138px;
left: 3px;
width: 245px;
height: 225px;
border: 1px ridge #999;
display: none;
background: #e4e4e4;
color: #fff;
}
.constnaslov {
width: 200px;
color: #00f;
text-align: center;
font: normal 12px/125% sans-serif;
margin: 5px;
padding-bottom: 5px;
border-bottom: 1px #cacaba solid;
}
.const {
width: 200px;
text-align: center;
font: 11px/125% sans-serif;
margin: 5px;
padding-bottom: 5px;
border-bottom: 1px #cacaba solid;
}
.const a:link {
display: block;
color: #900;
text-decoration: none;
}
.const a:visited {
display: block;
color: #036;
text-decoration: none;
}
.const a:active {
display: block;
color: #900;
text-decoration: none;
}
.const a:hover {
display: block;
background: #eaeafa;
color: #900;
text-decoration: none;
}
.crta {
position: absolute;
top: 0px;
left: 262px;
width: 2px;
height: 372px;
border: 2px inset;
background: #fff; /* groove ridge */
color: #fff;
}
.tipkovnica {
position: absolute;
top: 138px;
left: 5px;
width: 245px;
height: 228px;
background: #e4e4e4;
}
.displej {
position: absolute;
top: 10px;
left: 6px;
width: 240px;
height: 82px;
border: 2px ridge #eee;
background: #eee;
}
#numauto, #numsci, #numfix, #nummem, #numrad, #numdeg, #numgrad {
position: absolute;
margin-top: 2px;
width: 26px;
height: 10px;
font: normal 9px sans-serif;
color: #ccc;
display: inline;
border: 0px solid #e00;
background: #eee;
}
#numauto {
left: 5px;
color: #000;
}
#numsci {
left: 37px;
}
#numfix {
left: 62px;
}
#nummem {
left: 107px;
}
#numrad {
left: 154px;
color: #000;
}
#numdeg {
left: 180px;
}
#numgrad {
left: 205px;
}
.upit {
position: absolute;
top: 27px;
left: 6px;
width: 225px;
height: 25px;
border: 0px;
background: #eee;
text-align: left;
font: normal 9pt sans-serif;
letter-spacing: 1px;
color: #0a0;
}
.rezultat {
position: absolute;
top: 52px;
left: 6px;
width: 225px;
height: 25px;
border: 0px;
background: #eee;
text-align: right;
font: bold 12pt sans-serif;
letter-spacing: 1px;
color: #00a;
}
.formatbr {
position: absolute;
top: 35px;
left: 12px;
width: 220px;
height: 95px;
border: 1px solid #cdcdcd;
background: #e8e8e8;
}
.formatnaslov {
position: relative;
margin-top: 5px;
font: normal 12pt cursive;
text-align: center;
}
.automatik, .scienc, .fiksed {
position: absolute;
left: 6px;
font: normal 10pt sans-serif;
}
.automatik {top: 10px;}
.scienc {top: 38px;}
.fiksed {top: 66px;}
.decnaslov {
position: absolute;
top: 10px;
left: 110px;
width: 110px;
text-align: center;
font: normal 10pt sans-serif;
color: #000;
border: 0px solid #cdcdcd;
}
.decimal {
position: absolute;
top: 32px;
left: 136px;
width: 60px;
height: 22px;
}
.separator {
position: absolute;
top: 70px;
left: 65px;
width: 150px;
text-align: right;
font: normal 10pt sans-serif;
color: #000;
border: 0px solid #cdcdcd;
}
.rad {
position: absolute;
top: 140px;
left: 12px;
width: 220px;
height: 21px;
border: 1px solid #cdcdcd;
background: #e8e8e8;
}
.deg {
position: relative;
margin: 4px;
top: -1px;
font: normal 10pt sans-serif;
}
.cls {
position: absolute;
top: 103px;
left: 217px;
width: 30px;
height: 22px;
color: #f00;
display: none;
}
.zadatak {
position: absolute;
top: 98px;
left: 6px;
width: 240px;
height: 28px;
border: 2px groove #eee;
background: #fff;
}
.unos {
position: absolute;
top: 1px;
left: 4px;
width: 228px;
height: 23px;
border: 0px;
font: bold 10pt cursive;
color: #060;
}
.tekstarea {
position: absolute;
top: 10px;
left: 8px;
width: 238px;
height: 317px;
padding: 0px 0px 0px 5px;
border: 2px groove #ccc;
background: #fff; /*plavo*/
font: normal 9pt/150% monospace;
color: #345678;
overflow: auto;
}
.n1, .n2, .n3, .n4 {
position: absolute;
top: 340px;
height: 24px;
width: 80px;
font: normal 9pt sans-serif;
color: #000;
}
.n1 {
left: 8px;
}
.n2 {
left: 91px;
}
.n3 {
left: 174px;
}
.n4 {
top: 174px;
left: 85px;
}
.n2copy {
position: absolute;
left: 0px;
top: 206px;
width: 242px;
color: #aaa;
font: normal 9pt sans-serif;
text-align: center;
}
.b11, .b12, .b13, .b14, .b15, .b16, .b21, .b22, .b23, .b24, .b25, .b26, .b31, .b32, .b33, .b34, .b35, .b36 {
position: absolute;
height: 25px;
width: 40px;
padding: 0px;
color: #000;
font: normal 10pt monospace;
}
.b41, .b42, .b43, .b44, .b45, .b46, .b51, .b52, .b53, .b54, .b55, .b56, .b61, .b62, .b63, .b64, .b65, .b66, .b71, .b72, .b73, .b74, .b75, .b76 {
position: absolute;
height: 35px;
width: 40px;
padding: 0px;
color: #000;
}
.b55, .b75 {
position: absolute;
height: 35px;
width: 81px;
font: normal 10pt sans-serif;
color: #000;
}
.b75 {
position: absolute;
height: 35px;
width: 81px;
font: normal 15pt sans-serif;
color: #050;
}
.b45, .b46 {
font: normal 10pt sans-serif;
color: #a00;
}
.b34 {
font: normal 10pt sans-serif;
}
.b44, .b54, .b74 {
font: bold 13pt sans-serif;
color: #00f;
}
.b64 {
font: normal 15pt serif;
color: #00f;
}
.b41, .b42, .b43, .b51, .b52, .b53, .b61, .b62, .b63, .b71, .b72 {
font: normal 12pt cursive;
color: #575;
}
.b11, .b12, .b13, .b14, .b15, .b16 {
top: 0px;
}
.b21, .b22, .b23, .b24, .b25, .b26 {
top: 26px;
}
.b31, .b32, .b33, .b34, .b35, .b36 {
top: 52px;
}
.b41, .b42, .b43, .b44, .b45, .b46 {
top: 85px;
}
.b51, .b52, .b53, .b54, .b55, .b56 {
top: 121px;
}
.b61, .b62, .b63, .b64, .b65, .b66 {
top: 156px;
}
.b71, .b72, .b73, .b74, .b75, .b76 {
top: 192px;
}
.b11, .b21, .b31, .b41, .b51, .b61, .b71 {
left: 0px
}
.b12, .b22, .b32, .b42, .b52, .b62, .b72 {
left: 41px
}
.b13, .b23, .b33, .b43, .b53, .b63, .b73 {
left: 82px
}
.b14, .b24, .b34, .b44, .b54, .b64, .b74 {
left: 123px
}
.b15, .b25, .b35, .b45, .b55, .b65, .b75 {
left: 164px
}
.b16, .b26, .b36, .b46, .b56, .b66, .b76 {
left: 205px
}
/* END of Calc4Chem */
/* --------------------------------------------------------- */
/*Eni Generalic, Split, Create: 1999/10/14; Update: 2008/02/27 */
/* Copyright c 2008 by EniG. */
</style>
<script type="text/javascript" src="lib-js-math-calculator-chemical.js"></script>
<script>
// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(start);
</script>
</head>
<body>
<div id="calc4chem">
<!-- BEGIN calc4chem -->
<form action="http://www.periodni.com" name="racunalo">
<input type="hidden" name="oldrezultat" value="">
<input type="hidden" name="memorija" value="Memory recall">
<div id="kalkulator">
<div class="displej">
<input type="text" name="numauto" value="AUTO" id="numauto" onfocus="ascifix[0].click()">
<input type="text" name="numsci" value="SCI" id="numsci" onfocus="ascifix[1].click()">
<input type="text" name="numfix" value="FIX" id="numfix" onfocus="ascifix[2].click()">
<input type="text" name="nummem" value="MEM" id="nummem" onfocus="MS.click()">
<input type="text" name="numrad" value="RAD" id="numrad" onfocus="stupnjevi[0].click()">
<input type="text" name="numdeg" value="DEG" id="numdeg" onfocus="stupnjevi[1].click()">
<input type="text" name="numgrad" value="GRAD" id="numgrad" onfocus="stupnjevi[2].click()">
<input type="text" name="upit" value="Problem" onClick="this.select()" class="upit">
<input type="text" name="rezultat" value="Solution" onClick="this.select()" class="rezultat">
</div>
<div class="zadatak">
<input type="text" name="zadatak" value="" onKeyDown="if (event.keyCode==13) {enter.click()}" class="unos">
</div>
<input type="button" name="cls" value="Cls" title="Clear" onClick="memory(3)" class="cls">
<div class="tipkovnica">
<input type="button" name="sqrt" value="" title="Square root" onClick="izracunaj(3)" class="b11">
<input type="button" name="root" value="yx" title="Root" onClick="izracunaj(22)" class="b12">
<input type="button" name="ln" value="ln" title="Natural logarithm" onClick="izracunaj(5)" class="b13">
<input type="button" name="log" value="log" title="Common logarithm" onClick="izracunaj(8)" class="b14">
<input type="button" name="tan" value="tan" title="Tangent" onClick="izracunaj(14)" class="b15">
<input type="button" name="atan" value="atan" title="Arc tangent" onClick="izracunaj(10)" class="b16">
<input type="button" name="kvadrat" value="x²" title="Square" onClick="izracunaj(2)" class="b21">
<input type="button" name="potencija" value="x^y" title="Power" onClick="izracunaj(21)" class="b22">
<input type="button" name="aln" value="e^x" title="Natural antilogarithm" onClick="izracunaj(6)" class="b23">
<input type="button" name="alog" value="10^x" title="Common antilogarithm" onClick="izracunaj(9)" class="b24">
<input type="button" name="cos" value="cos" title="Cosine" onClick="izracunaj(15)" class="b25">
<input type="button" name="acos" value="acos" title="Arc cosine" onClick="izracunaj(11)" class="b26">
<input type="button" name="sign" value="+/-" title="Sign change" onClick="izracunaj(4)" class="b31">
<input type="button" name="1/x" value="1/x" title="Reciprocal" onClick="izracunaj(7)" class="b32">
<input type="button" name="fact" value="x!" title="Factorial" onClick="izracunaj(20)" class="b33">
<input type="button" name="postotak" value="%" title="Percent" onClick="izracunaj(17)" class="b34">
<input type="button" name="sin" value="sin" title="Sine" onClick="izracunaj(16)" class="b35">
<input type="button" name="asin" value="asin" title="Arc sine" onClick="izracunaj(12)" class="b36">
<input type="button" name="7" value="7" title="Seven" onClick="dodajBroj(7)" class="b41">
<input type="button" name="8" value="8" title="Eight" onClick="dodajBroj(8)" class="b42">
<input type="button" name="9" value="9" title="Nine" onClick="dodajBroj(9)" class="b43">
<input type="button" name="djeljeno" value="÷" title="Division" onClick="dodajBroj('/')" class="b44">
<input type="button" name="MS" value="MS" title="Memory store" onClick="memory(1)" class="b45">
<input type="button" name="MR" value="MR" title="Memory recall" onClick="memory(2)" class="b46">
<input type="button" name="4" value="4" title="Four" onClick="dodajBroj(4)" class="b51">
<input type="button" name="5" value="5" title="Five" onClick="dodajBroj(5)" class="b52">
<input type="button" name="6" value="6" title="Six" onClick="dodajBroj(6)" class="b53">
<input type="button" name="puta" value="x" title="Multiplication" onClick="dodajBroj('*')" class="b54">
<input type="button" name="con" value="Constants" title="Physical Constants" onClick="vidi('konstante'); return false;" class="b55">
<input type="button" name="1" value="1" title="One" onClick="dodajBroj(1)" class="b61">
<input type="button" name="2" value="2" title="Two" onClick="dodajBroj(2)" class="b62">
<input type="button" name="3" value="3" title="Three" onClick="dodajBroj(3)" class="b63">
<input type="button" name="minus" value="-" title="Subtraction" onClick="dodajBroj('-')" class="b64">
<input type="button" name="lijevo" value="(" title="Parentheses" onClick="dodajBroj('(')" class="b65">
<input type="button" name="desno" value=")" title="Parentheses" onClick="dodajBroj(')')" class="b66">
<input type="button" name="0" value="0" title="Zero" onClick="dodajBroj(0)" class="b71">
<input type="button" name="." value="." title="Decimal point" onClick="dodajBroj('.')" class="b72">
<input type="button" name="exp" value="exp" title="Exponent" onClick="dodajBroj('e')" class="b73">
<input type="button" name="plus" value="+" title="Addition" onClick="dodajBroj('+')" class="b74">
<input type="button" name="enter" value="=" title="Calculate" onClick="izracunaj(1)" class="b75">
</div> <!-- END tipkovnica -->
<div id="numformat">
<p class="formatnaslov">Number formats</p>
<div class="formatbr">
<div class="automatik">
<input type="radio" name="ascifix" checked title="Automatic" onClick="scifix(0)">
<a href="javascript:document.racunalo.ascifix[0].click()" onMouseOver="self.status='Automatic'; return true">Auto</a>
</div>
<div class="scienc">
<input type="radio" name="ascifix" title="Scientific notation" onClick="scifix(1)">
<a href="javascript:document.racunalo.ascifix[1].click()" onMouseOver="self.status='Scientific notation'; return true">Sci</a>
</div>
<div class="fiksed">
<input type="radio" name="ascifix" title="Fixed number of decimal places" onClick="scifix(2)">
<a href="javascript:document.racunalo.ascifix[2].click()" onMouseOver="self.status='Fixed number of decimal places'; return true">Fix</a>
</div>
<div class="decnaslov">Decimals</div>
<select name="izaZareza" SIZE="1" onChange="numformat(this.selectedIndex)" class="decimal">
<option value="0"> 0 </option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
<option value="6"> 6 </option>
<option value="7"> 7 </option>
<option value="8"> 8 </option>
<option value="9"> 9 </option>
<option value="10"> 10 </option>
<option value="11"> 11 </option>
<option value="12"> 12 </option>
<option value="13"> ---- </option>
<option value="14" selected> auto </option>
</select>
<div class="separator">
<a href="javascript:seplk()" onMouseOver="self.status='Separator tisu?ica'; return true">1000 separator </a>
<input type="checkbox" id="seplk" onClick="seplk()">
</div>
</div> <!-- END formatbr -->
<div class="rad">
<input type="radio" name="stupnjevi" checked title="Radians" onClick="raddeg(0)">
<span class="deg">
<a href="javascript:document.racunalo.stupnjevi[0].click()" onMouseOver="self.status='Radians'; return true">Rad </a>
</span>
<input type="radio" name="stupnjevi" title="Degrees" onClick="raddeg(1)">
<span class="deg">
<a href="javascript:document.racunalo.stupnjevi[1].click()" onMouseOver="self.status='Degrees'; return true">Deg </a>
</span>
<input type="radio" name="stupnjevi" title="Grads" onClick="raddeg(2)">
<span class="deg">
<a href="javascript:document.racunalo.stupnjevi[2].click()" onMouseOver="self.status='Grads'; return true">Grad</a>
</span>
</div>
<input type="button" name="close" value="Close" title="Close Form" onClick="memory(4)" class="n4">
<div class="n2copy">Copyright c 2008 by Eni Generalic</div>
</div> <!-- END numformat -->
</div> <!-- END racunalo -->
<div id="biljeska">
<textarea name="notes" class="tekstarea">
Calc4Chem - www.periodni.com
</textarea>
<input type="button" name="mode" value="Mode" title="Number formats" onClick="memory(4)" class="n1">
<input type="button" name="select" value="Select All" title="Select All" onClick="document.racunalo.notes.select()" class="n2">
<input type="reset" name="clear" value="Clear" title="Clear All" onClick="memory(5)" class="n3">
</div> <!-- END biljeska -->
<div id="konstante">
<div class="constnaslov"><b>PHYSICAL CONSTANTS</b></div>
<div class="const" onClick="dodajConst(-273.15)"><a href="#">Absolute zero<br>-273.15 °C</a></div>
<div class="const" onClick="dodajConst(9.80665)"><a href="#">Acceleration of free fall, standard<br>9.80665 m/s<sup>2</sup></a></div>
<div class="const" onClick="dodajConst(1.6605402e-27)"><a href="#">Atomic mass unit<br>1.6605402x10<sup>-27</sup> kg</a></div>
<div class="const" onClick="dodajConst(6.0221367e23)"><a href="#">Avogadro constant<br>6.0221367x10<sup>23</sup> 1/mol</a></div>
<div class="const" onClick="dodajConst(2.718281828)"><a href="#">Base of natural logarithms <br>2.718281828</a></div>
<div class="const" onClick="dodajConst(1.380658e-23)"><a href="#">Boltzmann constant<br>1.380658x10<sup>-23</sup> J/K</a></div>
<div class="const" onClick="dodajConst(2.81794092e-15)"><a href="#">Classical electron radius<br>2.81794092x10<sup>-15</sup> m</a></div>
<div class="const" onClick="dodajConst(9.1093897e-31)"><a href="#">Electron mass<br>9.1093897x10<sup>-31</sup> kg</a></div>
<div class="const" onClick="dodajConst(5.44617013e-4)"><a href="#">Electron-proton mass ratio<br>5.44617013x10<sup>-4</sup></a></div>
<div class="const" onClick="dodajConst(1.6021892e-19)"><a href="#">Electronvolt<br>1.6021892x10<sup>-19</sup> J</a></div>
<div class="const" onClick="dodajConst(1.60217733e-19)"><a href="#">Elementary charge<br>1.60217733x10<sup>-19</sup> C</a></div>
<div class="const" onClick="dodajConst(96485.309)"><a href="#">Faraday constant<br>96485.309 C/mol</a></div>
<div class="const" onClick="dodajConst(3.7417749e-16)"><a href="#">First radiation constant<br>3.7417749x10<sup>-16</sup> W m<sup>2</sup></a></div>
<div class="const" onClick="dodajConst(8.314510)"><a href="#">Molar gas constant<br>8.314510 J/mol K</a></div>
<div class="const" onClick="dodajConst(0.02241410)"><a href="#">Molar volume<br>(Ideal gas, <i>T</i> = 273.15 K, <i>p</i> = 101.325 kPa)<br>0.02241410 m<sup>3</sup>/mol</a></div>
<div class="const" onClick="dodajConst(6.67259e-11)"><a href="#">Newtonian constant of gravitation<br>6.67259x10<sup>-11</sup> N m<sup>2</sup>/kg<sup>2</sup></a></div>
<div class="const" onClick="dodajConst(12.566370614e-7)"><a href="#">Permeability of vacuum<br>12.566370614x10<sup>-7</sup> N/A<sup>2</sup></a></div>
<div class="const" onClick="dodajConst(8.854187817e-12)"><a href="#">Permittivity of vacuum<br>8.854187817x10<sup>-12</sup> F/m</a></div>
<div class="const" onClick="dodajConst(3.1415926535897932)"><a href="#">PI<br>3.1415926535897932</a></div>
<div class="const" onClick="dodajConst(6.6260755e-34)"><a href="#">Planck constants<br>6.6260755x10<sup>-34</sup> J s</a></div>
<div class="const" onClick="dodajConst(0.01438769)"><a href="#">Second radiation constant<br>0.01438769 m K</a></div>
<div class="const" onClick="dodajConst(1400)"><a href="#">Solar constant<br>1400 W/m<sup>2</sup></a></div>
<div class="const" onClick="dodajConst(299792458)"><a href="#">Speed of light in vacuum<br>299792458 m/s</a></div>
<div class="const" onClick="dodajConst(340)"><a href="#">Speed of sound in air at STP<br>340 m/s</a></div>
<div class="const" onClick="dodajConst(101325)"><a href="#">Standard pressure<br>101325 Pa</a></div>
</div> <!-- END konstante -->
</form>
<div class="crta"></div>
</div>
<!-- END calc4chem -->
</body>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.