Установка: Создаем в корне сайта папку calc. Создаем глобальный блок (у меня имя этого блока $GLOBAL_CALC$) и копируем данный код к себе в блок, после чего размещаем где заблагорассудиться . Code <!-- <style visible="" hidden;="">CalcConvert v 1.0 Script by (www.mcinc.ru) Author:MCRAFA,djmers,bmxer icq 635055390 .Do not edit these code</style> --> <style type="text/css" media="all">@import url(calc/calc.css);</style> <script language="javascript" type="text/javascript"> <!-- //
usd = 1; // USD
eur = 0.87; // EUR
rub = 40; // RUB
uah = 9.50; // UAH
function calcDo() {
e1 = eval( usd ); e2 = eval( eur ); e = e1*e2; r1 = eval( usd ); r2 = eval( rub ); r = r1*r2; h1 = eval( usd ); h2 = eval( uah ); h = h1*h2;
document.calc.cur2_e.value = Math.round(1000000*e)/1000000; document.calc.cur2_r.value = Math.round(1000000*r)/1000000; document.calc.cur2_h.value = Math.round(1000000*h)/1000000;
sum_e = document.calc.cur1_e.value * document.calc.cur2_e.value; sum_r = document.calc.cur1_r.value * document.calc.cur2_r.value; sum_h = document.calc.cur1_h.value * document.calc.cur2_h.value;
document.calc.cur3_e.value = Math.round( sum_e*1000 )/1000; document.calc.cur3_r.value = Math.round( sum_r*1000 )/1000; document.calc.cur3_h.value = Math.round( sum_h*1000 )/1000;
}
//* * * * * * * * * * * * * * * * * *// function curChange() { if( !(numberCheck(str)) ){} else { } } //* * * * * * * * * * * * * * * * * *//
var noadd;
function igo_NoAdd(vadd) { noadd = vadd; return true; }
function igo_Add(elem, vadd) { var curCh; for (var j=0; j < vadd.length; j++) { curCh = vadd.charAt(j); if ( (curCh == ".")||(curCh == "0")||(curCh == "1")||(curCh == "2")||(curCh == "3")||(curCh == "4")||(curCh == "5")||(curCh == "6")||(curCh == "7")||(curCh == "8")||(curCh == "9") ) { continue; } else { alert ('Некорректное внесение данных, вводить можно только числовые значения'); elem.value = noadd; return false; } } calcDo(); return true; } //* * * * * * * * * * * * * * * * * *//
// --> </script> <table width="520" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="254" align="left" valign="top"><img src="calc/dletemplates_com_txt_calcul.gif" alt="Валютный калькулятор ресурса MCINC.RU" width="254" height="33" /></td> <td width="12"></td> <td width="254" align="left" valign="top"><img src="calc/dletemplates_com_txt_keepers.gif" alt="Наши Платёжные реквизиты" width="254" height="33" /></td> </tr> <tr> <td width="254"><img src="calc/spacer.gif" width="1" height="12" alt="" /></td>
<td width="12"><img src="calc/spacer.gif" width="12" height="1" alt="" /></td> <td width="254"><img src="calc/spacer.gif" width="1" height="12" alt="" /></td> </tr> <tr> <td width="254" align="right" valign="top" class="calcul"><form name="calc" id="calc" action=""> <table width="158" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4"><img src="calc/spacer.gif" width="1" height="5" alt="" /></td> </tr>
<tr> <td width="45" align="left"><input name="cur1_e" type="text" class="a_field" style="width:34px" value="1" onkeyup="igo_Add(this, this.value)" onfocus="igo_NoAdd(this.value)" /></td> <td width="39" align="left">USD</td> <td width="45" align="left"><input type="hidden" name="cur2_e" value="" /> <input name="cur3_e" type="text" class="a_field" style="width:34px" readonly="readonly" value="" /></td> <td width="29" align="left">EUR</td> </tr> <tr>
<td colspan="4"><img src="calc/spacer.gif" width="1" height="2" alt="" /></td> </tr> <tr> <td width="45" align="left"><input name="cur1_r" type="text" class="a_field" style="width:34px" value="1" onkeyup="igo_Add(this, this.value)" onfocus="igo_NoAdd(this.value)" /></td> <td width="39" align="left">USD</td> <td width="45" align="left"><input type="hidden" name="cur2_r" value="" /> <input name="cur3_r" type="text" class="a_field" style="width:34px" readonly="readonly" value="" /></td> <td width="29" align="left">RUB</td>
</tr> <tr> <td colspan="4"><img src="calc/spacer.gif" width="1" height="2" alt="" /></td> </tr> <tr> <td width="45" align="left"><input name="cur1_h" type="text" class="a_field" style="width:34px" value="1" onkeyup="igo_Add(this, this.value)" onfocus="igo_NoAdd(this.value)" /></td> <td width="39" align="left">USD</td> <td width="45" align="left"><input type="hidden" name="cur2_h" value="" />
<input name="cur3_h" type="text" class="a_field" style="width:34px" readonly="readonly" value="" /></td> <td width="29" align="left">UAH</td> </tr> </table> </form></td> <td width="12"> </td> <td width="254" align="right" valign="top" class="keepers"><table width="154" border="0" cellspacing="0" cellpadding="0"> <tr>
<td height="80" align="left" style="line-height: 18px">USD - <font color="#f00404">Z394871289432</font>
RUB - R160128548859
EUR - E************
UAH - U************</td> </tr> </table></td>
</tr> </table> <script language="javascript" type="text/javascript"> <!-- // calcDo(); // --> </script> Как видите, в скрипте прописан курс оригинал, Вы можете его изменить под себя. Code usd = 1; // USD
eur = 0.87; // EUR
rub = 40; // RUB
uah = 9.50; // UAH Также можете отредактировать реквизиты. Code WMZ - Z394871289432 RUB - R160128548859 EUR - E************ UAH - U************
|