var update='2008-12-1 14:05:28'; ac.length++; ac[ac.length-1]=100; function showAc(){ document.write(''); document.write('
更新 '+update+' 北京時間

 '); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write('
通貨種類 人民元 
CNY
 米ドル 
USD
 日本円 
JPY
欧州通貨
XEU
人民元1'+getfloor(ac[0]/100)+''+getfloor(ac[1]/100)+''+getfloor(ac[2]/100)+'
米ドル'+getfloor(100/ac[0])+'1'+getfloor(ac[1]/ac[0])+''+getfloor(ac[2]/ac[0])+'
日本円'+getfloor(100/ac[1])+''+getfloor(ac[0]/ac[1])+'1'+getfloor(ac[2]/ac[1])+'
欧州通貨'+getfloor(100/ac[2])+''+getfloor(ac[0]/ac[2])+''+getfloor(ac[1]/ac[2])+'1
'); } function getfloor(vnum){ return Math.round(vnum*10000)/10000; } function sumAc(){ document.write(''); document.write('
'); document.write('
 為替計算機(レート更新/北京時間:'+update+' ):'); document.write('') document.write(''); document.write(''); document.write('') document.write('
お手持の通貨:現在のレート:
換金額:(換算する通貨を入力して下さい)
両替後の通貨:
計算結果:
'); initCalc(); } function initCalc(){ document.getElementById('inp').value=''; document.getElementById('ans').value=''; initAc(); } function initAc(){ document.getElementById('c1').options[0].value=ac[1]; document.getElementById('c1').options[2].value=ac[0]; document.getElementById('c1').options[3].value=ac[2]; document.getElementById('c2').options[0].value=ac[1]; document.getElementById('c2').options[2].value=ac[0]; document.getElementById('c2').options[3].value=ac[2]; document.getElementById('c1').options[1].value=ac[ac.length - 1]; document.getElementById('c2').options[1].value=ac[ac.length - 1]; outAc(); } function outAc(){ document.getElementById('se').value=getfloor(document.getElementById('c2').options[document.getElementById('c2').selectedIndex].value/document.getElementById('c1').options[document.getElementById('c1').selectedIndex].value); if (isnum(document.getElementById('inp').value)){ calc(); } } function calc(){ if (isnum(document.getElementById('inp').value)){ document.getElementById('ans').value=getfloor(document.getElementById('inp').value*document.getElementById('c1').options[document.getElementById('c1').selectedIndex].value/document.getElementById('c2').options[document.getElementById('c2').selectedIndex].value); }else{ alert('Please input a Number'); document.getElementById('inp').focus; } } function isnum(vnum){ if(vnum*1!=vnum){ return false; }else{ return true; } }