function clearText(thefield)
{
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 



function rupeecalcs(form) {

if (rupeeconv.rangeselect[0].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
btob=rupeeinput;
btobrounded=Math.round(btob*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestobillion.value=btobrounded;
btom=rupeeinput*1000;
btomrounded=Math.round(btom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=btomrounded;
btod=rupeeinput*1000000000;
btodrounded=Math.round(btod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=btodrounded;
btoc=rupeeinput*100;
btocrounded=Math.round(btoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=btocrounded;
btoll=rupeeinput*1000;
btollrounded=Math.round(btoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=btollrounded;
btol=rupeeinput*10000;
btolrounded=Math.round(btol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=btolrounded;
}
}
if (rupeeconv.rangeselect[1].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
mtob=rupeeinput/1000;
mtobrounded=(mtob.toFixed(3));
rupeeconv.rupeestobillion.value=mtobrounded;
mtom=rupeeinput;
mtomrounded=Math.round(mtom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=mtomrounded;
mtod=rupeeinput*1000000;
mtodrounded=Math.round(mtod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=mtodrounded;
mtoc=rupeeinput/10;
mtocrounded=Math.round(mtoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=mtocrounded;
mtoll=rupeeinput;
mtollrounded=Math.round(mtoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=mtollrounded;
mtol=rupeeinput*10;
mtolrounded=Math.round(mtol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=mtolrounded;
}
}
if (rupeeconv.rangeselect[2].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
mtob=rupeeinput/1000000000;
mtobrounded=(mtob.toFixed(3));
rupeeconv.rupeestobillion.value=mtobrounded;
mtom=rupeeinput/1000000;
mtomrounded=Math.round(mtom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=mtomrounded;
mtod=rupeeinput;
mtodrounded=Math.round(mtod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=mtodrounded;
mtoc=rupeeinput/10000000;
mtocrounded=Math.round(mtoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=mtocrounded;
mtoll=rupeeinput/1000000;
mtollrounded=Math.round(mtoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=mtollrounded;
mtol=rupeeinput/100000;
mtolrounded=Math.round(mtol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=mtolrounded;
}
}
if (rupeeconv.rangeselect[3].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
ctob=rupeeinput/100;
ctobrounded=Math.round(ctob*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestobillion.value=ctobrounded;
ctom=rupeeinput*10;
ctomrounded=Math.round(ctom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=ctomrounded;
mtod=rupeeinput*10000000;
mtodrounded=Math.round(mtod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=mtodrounded;
ctoc=rupeeinput;
ctocrounded=Math.round(ctoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=ctocrounded;
ctoll=rupeeinput*10;
ctollrounded=Math.round(ctoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=ctollrounded;
ctol=rupeeinput*100;
ctolrounded=Math.round(ctol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=ctolrounded;
}
}
if (rupeeconv.rangeselect[3].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
ctob=rupeeinput/100;
ctobrounded=Math.round(ctob*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestobillion.value=ctobrounded;
ctom=rupeeinput*10;
ctomrounded=Math.round(ctom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=ctomrounded;
mtod=rupeeinput*10000000;
mtodrounded=Math.round(mtod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=mtodrounded;
ctoc=rupeeinput;
ctocrounded=Math.round(ctoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=ctocrounded;
ctoll=rupeeinput*10;
ctollrounded=Math.round(ctoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=ctollrounded;
ctol=rupeeinput*100;
ctolrounded=Math.round(ctol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=ctolrounded;
}
}
if (rupeeconv.rangeselect[4].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
ltob=rupeeinput/1000;
ltobrounded=Math.round(ltob*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestobillion.value=ltobrounded;
ltom=rupeeinput;
ltomrounded=Math.round(ltom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=ltomrounded;
ltod=rupeeinput*1000000;
ltodrounded=Math.round(ltod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=ltodrounded;
ltoc=rupeeinput/10;
ltocrounded=Math.round(ltoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=ltocrounded;
ltoll=rupeeinput;
ltollrounded=Math.round(ltoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=ltollrounded;
ltol=rupeeinput*10;
ltolrounded=Math.round(ltol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=ltolrounded;
}
}
if (rupeeconv.rangeselect[5].checked == true)
{
rupeeinput=eval(rupeeconv.rupeesin.value);
if (rupeeinput=='')
{
rupeeconv.rupeesin.value='0';
}
else
{
ltob=rupeeinput/10000;
ltobrounded=Math.round(ltob*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestobillion.value=ltobrounded;
ltom=rupeeinput/10;
ltomrounded=Math.round(ltom*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestomillion.value=ltomrounded;
ltod=rupeeinput*100000;
ltodrounded=Math.round(ltod*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestodecimal.value=ltodrounded;
ltoc=rupeeinput/100;
ltocrounded=Math.round(ltoc*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestocrore.value=ltocrounded;
ltoll=rupeeinput/10;
ltollrounded=Math.round(ltoll*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolacs.value=ltollrounded;
ltol=rupeeinput;
ltolrounded=Math.round(ltol*Math.pow(10,3))/Math.pow(10,3);
rupeeconv.rupeestolakh.value=ltolrounded;
}
}

}

