Convert European Currencies to Euro  
Enter Currency Here Currency in Euros

Highlight the following script with your mouse. Then press Ctrl and C to copy it. Ctrl V to paste it before the </head> tag on your page.

Then copy and paste the form into your page where you want the converter to be located.

<script language="JavaScript" type="text/javascript"> <!--
AS = 13.7603;
BF = 40.3399;
DM = 1.95583;
DG = 2.20371;
FM = 5.94573;
FF = 6.55957;
IP = 0.787564;
IL = 1936.21;
PE = 200.482;
SP = 166.386;

var currency_rate;
var euro_rate;

function CurrencyToEuro()
{
ChangeCurrency(1);
inp_cash = document.main.money.value;
number_answer = inp_cash / currency_rate;
number_string = number_answer.toString();
number_string = number_string.substring(0,7);
document.main.answer.value = number_string;
}

function EuroToCurrency()
{
ChangeCurrency(2);
inp_cash = document.second.money.value;
number_answer = inp_cash * euro_rate;
number_string = number_answer.toString();
number_string = number_string.substring(0,7);
document.second.answer.value = number_string;
} function ChangeCurrency(which){
if (which == 1)
index_no = document.main.which.selectedIndex;
else
index_no = document.second.which.selectedIndex;
switch(index_no){
case 0:
temp_rate = AS;
cn = "Austrian Schilling";
break;
case 1:
temp_rate = BF;
cn = "Belgian Franc";
break;
case 2:
temp_rate = DM;
cn = "Deutschmark";
break;
case 3:
temp_rate = DG;
cn = "Dutch Guilder";
break;
case 4:
temp_rate = FM;
cn = "Finnish Markka";
break;
case 5:
temp_rate = FF;
cn = "French Franc";
break;
case 6:
temp_rate = IP;
cn = "Irish Punt";
break;
case 7:
temp_rate = IL;
cn = "Italian Lira";
break;
case 8:
temp_rate = PE;
cn = "Portuguese Escudo";
break;
case 9:
temp_rate = SP;
cn = "Spanish Peseta";
break;
}
if(which == 1){
document.main.message.value = "There are " + temp_rate + " " + cn + "s to the Euro";
currency_rate = temp_rate;
document.main.which.options[index_no].selected = true;
}
else{
e_rate = (1/temp_rate);
euro_string = e_rate.toString();
euro_string = euro_string.substring(0,7);
document.second.message.value = "There are " + euro_string + " Euros to the " + cn;
document.second.which.options[index_no].selected = true;
euro_rate = temp_rate;
}
}
//-->
</script>

<form name="main">
<table><tr><th colspan="3" align="left">Enter Currency Here</th>
<th>Currency in Euros</th></tr>
<tr><td><input type="text" name="money" size="12"></td>
<td><select name="which" onChange="CurrencyToEuro();">
<option>Austrian Schillings
<option>Belgian Franc
<option>Deutschmark
<option>Dutch Guilder
<option>Finnish Markka
<option>French Franc
<option>Irish Punt
<option>Italian Lira
<option>Portuguese Escudo
<option>Spanish Peseta
</select></td>
<td><input type="button" value="Convert to Euro" onClick='CurrencyToEuro();'></td>
<td><input type="text" name="answer" size="12"></td></tr>
<tr><td colspan="4" align="center"><input type="text" name="message" size="45"></td></tr></table></form>


Back to free tools page


© 1997-2005 Digital-Presence All Rights Reserved