var currency_data=new Array(
'ADP|0.00552474|Andorran Peseta|||1|2008-09-19|6|source_imf',
'AED|0.175824|United Arab Emirates Dirham|||0.25|2008-09-19|6|source_imf',
'AFA|1.279e-05|Old Afghan Afghani|||1|2008-09-20|4|source_bloomberg',
'AFN|0.01279|Afghan Afghani|||1|2008-09-20|4|source_bloomberg',
'ALL|0.007488|Albanian Lek||Albanian Leke|0.1|2008-09-19|4|source_yahoo',
'AMD|0.002123|Armenian Dram|||0.2|2008-09-20|4|source_bloomberg',
'ANG|0.3638|Netherlands Antillean Guilder|||0.01|2008-09-19|4|source_yahoo',
'AOA|0.008618|Angolan Kwanza||Angolan Kwanza|0.1|2008-09-20|4|source_bloomberg',
'ARS|0.20739|Argentine Peso|||0.01|2008-09-19|5|source_yahoo',
'ATS|0.0668038|Austrian Schilling|||1|2008-09-19|6|source_imf',
'AUD|0.524773|Australian Dollar|||0.05|2008-09-19|6|source_imf',
'AWG|0.3607|Aruban Florin|||0.01|2008-09-20|4|source_bloomberg',
'AZM|0.0001583|Old Azerbaijani Manat|||10|2008-09-20|4|source_bloomberg',
'AZN|0.7913|Azerbaijani Manat|||0.01|2008-09-20|4|source_bloomberg',
'BAM|0.4706|Bosnia-Herzegovina Convertible Mark|Bosnia-Herzegovina Convertible Marks|Bosnia-Herzegovina Convertible Marka|0.5|2008-09-20|4|source_bloomberg',
'BBD|0.3237|Barbados Dollar|||0.01|2008-09-19|4|source_yahoo',
'BDT|0.0094162|Bangladeshi Taka||Bangladeshi Taka|0.01|2008-09-19|5|source_yahoo',
'BEF|0.0227874|Belgian Franc|||0.5|2008-09-19|6|source_imf',
'BGL|0.00047581|Bulgarian Old Lev||Bulgarian Old Leva|10|2008-09-19|5|source_yahoo',
'BGN|0.47581|Bulgarian Lev||Bulgarian Leva|0.01|2008-09-19|5|source_yahoo',
'BHD|1.71733|Bahraini Dinar|||0.05|2008-09-19|6|source_imf',
'BIF|0.0005415|Burundian Franc|||1||4|source_bloomberg',
'BMD|0.645715|Bermuda Dollar|||0.01|2008-09-19|6|source_imf',
'BND|0.450038|Brunei Dollar|||0.01|2008-09-19|6|source_imf',
'BOB|0.0917|Bolivian Boliviano|||0.1|2008-09-19|3|source_yahoo',
'BRC|0.000122607|Brazilian Cruzeiro|||0.01|2008-09-19|6|source_imf',
'BRL|0.33717|Brazilian Real||Brazilian Reais|0.01|2008-09-19|6|source_imf',
'BSD|0.64733|Bahamian Dollar|||0.01|2008-09-19|5|source_yahoo',
'BTN|0.01413|Bhutanese Ngultrum||Bhutanese Ngultrum|0.20|2008-09-20|4|source_bloomberg',
'BWP|0.0958241|Botswana Pula|||0.01|2008-09-19|6|source_imf',
'BYR|0.00030574|Belarusian Ruble|||1|2008-09-19|5|source_yahoo',
'BZD|0.32781|Belize Dollar|||0.01|2008-09-19|5|source_yahoo',
'CAD|0.616729|Canadian Dollar|||0.01|2008-09-19|6|source_imf',
'CDF|0.00117|Franc Congolais||Congolese Francs|0.01|2008-09-20|4|source_bloomberg',
'CHF|0.575094|Swiss Franc|||0.05|2008-09-19|6|source_imf',
'CLF|3.087e-05|Chilean Unidad de Fomento|||1|2008-09-20|4|source_bloomberg',
'CLP|0.00119379|Chilean Peso|||1|2008-09-17|6|source_imf',
'CNY|0.0945742|Chinese Yuan||Chinese Yuan Renminbi|0.5|2008-09-19|6|source_imf',
'COP|0.00029525|Colombian Peso|||100|2008-09-19|6|source_imf',
'CRC|0.001166|Costa Rican Colon||Costa Rican Colones|0.01|2008-09-20|4|source_bloomberg',
'CSD|0.01224|Serbian Dinar|||0.5|2008-09-20|4|source_bloomberg',
'CUC|0.697372|Cuban Convertible Peso|||0.01|2008-09-19|6|source_imf',
'CUP|0.6457|Cuban Peso|||0.01|2008-09-20|4|source_bloomberg',
'CVE|0.008412|Cape Verde Escudo|||0.01|2008-09-20|4|source_bloomberg',
'CYP|1.596|Cypriot Pound|||0.01||4|source_bloomberg',
'CZK|0.0379052|Czech Koruna||Czech Koruny|0.5|2008-09-19|6|source_imf',
'DEM|0.47|German Mark|||0.01|2008-09-19|6|source_imf',
'DJF|0.003633|Djiboutian Franc|||10|2008-09-20|4|source_bloomberg',
'DKK|0.123223|Danish Krone||Danish Kroner|0.25|2008-09-19|6|source_imf',
'DOP|0.01845|Dominican Peso|||1|2008-09-19|4|source_yahoo',
'DZD|0.01052|Algerian Dinar|||0.05|2008-09-19|4|source_yahoo',
'ECS|2.588e-05|Ecuadorian Sucre|||100|2008-09-19|5|source_yahoo',
'EEK|0.059717|Estonian Kroon||Estonian Krooni|0.05|2008-09-19|5|source_yahoo',
'EGP|0.11788|Egyptian Pound|||0.25|2008-09-19|5|source_yahoo',
'ERN|0.04305|Eritrean Nakfa||Eritrean Nakfa|0.01|2008-09-20|4|source_bloomberg',
'ESP|0.00552474|Spanish Peseta|||1|2008-09-19|6|source_imf',
'ETB|0.06633|Ethiopian Birr||Ethiopian Birr|0.01||4|source_bloomberg',
'EUR|0.91924|Euro|||0.01|2008-09-19|6|source_imf',
'FIM|0.154605|Finnish Mark|||1|2008-09-19|6|source_imf',
'FJD|0.3922|Fiji Dollar|||0.01|2008-09-19|5|source_yahoo',
'FRF|0.140137|French Franc|||0.01|2008-09-19|6|source_imf',
'GBP|1.16138|Pound Sterling|Pound Sterling|Pounds Sterling|0.01|2008-09-19|6|source_imf',
'GBX|0.0116138|Pence Sterling|Pence Sterling|Pence Sterling|1|2008-09-19|6|source_imf',
'GEL|0.4611|Georgian Lari||Georgian Lari|0.01|2008-09-20|4|source_bloomberg',
'GHC|5.583e-05|Old Ghanaian Cedi|||0.1|2008-09-20|4|source_bloomberg',
'GHS|0.5583|Ghanaian Cedi|||0.01|2008-09-20|4|source_bloomberg',
'GIP|1.183|Gibraltar Pound|||0.01|2008-09-20|4|source_bloomberg',
'GMD|0.0282|Gambian Dalasi||Gambian Dalasi|0.01||4|source_bloomberg',
'GNF|0.00013623|Guinean Franc|||1|2008-09-19|5|source_yahoo',
'GRD|0.0026977|Greek Drachma|||0.5|2008-09-19|6|source_imf',
'GTQ|0.087065|Guatemalan Quetzal||Guatemalan Quetzales|0.01|2008-09-19|5|source_yahoo',
'GYD|0.003162|Guyanese Dollar|||1|2008-09-20|4|source_bloomberg',
'HKD|0.083001|Hong Kong Dollar|||0.1|2008-09-19|5|source_yahoo',
'HNL|0.03417|Honduran Lempira|||0.01||4|source_bloomberg',
'HRK|0.13071|Croatian Kuna||Croatian Kuna|0.01|2008-09-19|5|source_yahoo',
'HTG|0.01606|Haitian Gourde|||0.05||4|source_bloomberg',
'HUF|0.0038138|Hungarian Forint|||1|2008-09-19|6|source_imf',
'IDR|6.88396e-05|Indonesian Rupiah|||25|2008-09-19|6|source_imf',
'IEP|1.16719|Irish Pound|||0.01|2008-09-19|6|source_imf',
'ILS|0.182819|Israeli New Shekel|||0.01|2008-09-19|6|source_imf',
'INR|0.0139403|Indian Rupee|||0.1|2008-09-19|6|source_imf',
'IQD|0.00054694|Iraqi Dinar|||500|2008-09-19|5|source_yahoo',
'IRR|6.58791e-05|Iranian Rial|||5|2008-09-18|6|source_imf',
'ISK|0.00696865|Icelandic Krona||Icelandic Kronur|1|2008-09-19|6|source_imf',
'ITL|0.000474748|Italian Lira||Italian Lire|1|2008-09-19|6|source_imf',
'JMD|0.008925|Jamaican Dollar|||0.01|2008-09-19|4|source_yahoo',
'JOD|0.91233|Jordanian Dinar|||0.05|2008-09-19|5|source_yahoo',
'JPY|0.00603472|Japanese Yen||Japanese Yen|1|2008-09-19|6|source_imf',
'KES|0.008961|Kenyan Shilling|||0.01|2008-09-19|4|source_yahoo',
'KGS|0.01784|Kyrgyzstani Som|||1|2008-09-20|4|source_bloomberg',
'KHR|0.0001565|Cambodian Riel|||100|2008-09-20|4|source_bloomberg',
'KMF|0.0018908|Comorian Franc||Comorians Francs|0.05|2008-09-19|5|source_yahoo',
'KRW|0.000563107|Korean Won||Korean Won|1|2008-09-19|6|source_imf',
'KWD|2.38975|Kuwaiti Dinar|||0.001|2008-09-18|6|source_imf',
'KYD|0.7875|Cayman Islands Dollar|||0.01||4|source_bloomberg',
'KZT|0.00538769|Kazakhstani Tenge||Kazakhstani Tenge|1|2008-09-19|6|source_imf',
'LAK|7.508e-05|Lao Kip|||500|2008-09-20|4|source_bloomberg',
'LBP|0.0004299|Lebanese Pound|||50|2008-09-19|5|source_yahoo',
'LKR|0.00598437|Sri Lankan Rupee|||1|2008-09-19|6|source_imf',
'LRD|0.01017|Liberian Dollar|||0.05|2008-09-20|4|source_bloomberg',
'LSL|0.07889|Lesotho Loti||Lesotho Maloti|0.01|2008-09-19|4|source_yahoo',
'LTL|0.26582|Lithuanian Litas||Lithuanian Litai|0.01|2008-09-19|5|source_yahoo',
'LUF|0.0227874|Luxembourgian Franc|||0.5|2008-09-19|6|source_imf',
'LVL|1.2974|Latvian Lats||Latvian Lati|0.01|2008-09-19|5|source_yahoo',
'LYD|0.5175|Libyan Dinar|||0.001|2008-09-19|6|source_imf',
'MAD|0.082483|Moroccan Dirham|||0.2|2008-09-19|5|source_yahoo',
'MDL|0.06239|Moldovan Leu||Moldovan Lei|0.01||4|source_bloomberg',
'MGA|0.0003878|Malagasy Ariary||Malagasy Ariary|1|2008-09-20|4|source_bloomberg',
'MGF|7.756e-05|Malagasy Franc|||50|2008-09-20|4|source_bloomberg',
'MKD|0.01495|Macedonia Denar|||0.5|2008-09-19|4|source_yahoo',
'MMK|0.1006|Myanmar Kyat|||50|2008-09-20|4|source_bloomberg',
'MNT|0.00056171|Mongolian Tugrik|||1|2008-09-19|5|source_yahoo',
'MOP|0.0806|Macau Pataca|||0.1||4|source_bloomberg',
'MRO|0.002866|Mauritania Ouguiya|||0.2|2008-09-19|5|source_yahoo',
'MTL|2.14125|Maltese Lira||Maltese Liri|0.01|2008-09-19|6|source_imf',
'MUR|0.0220462|Mauritian Rupee|||0.01|2008-09-19|6|source_imf',
'MVR|0.05053|Maldives Rufiyaa||Maldives Rufiyaa|0.01|2008-09-19|4|source_yahoo',
'MWK|0.0045297|Malawian Kwacha|||5|2008-09-19|5|source_yahoo',
'MXN|0.0608402|Mexican Peso|||0.05|2008-09-19|6|source_imf',
'MXP|6.08402e-05|Old Mexican Peso|||0.01|2008-09-19|6|source_imf',
'MXV|0.1586|Mexican Unidad De Inversion|||1|2008-09-20|4|source_bloomberg',
'MYR|0.186515|Malaysian Ringgit||Malaysian Ringgit|0.01|2008-09-19|6|source_imf',
'MZM|2.686e-05|Old Mozambican Metical||Old Mozambican Meticais|1|2008-09-20|4|source_bloomberg',
'MZN|0.02686|New Mozambican Metical||New Mozambican Meticais|1|2008-09-20|4|source_bloomberg',
'NAD|0.081309|Namibian Dollar|||0.05|2008-09-19|5|source_yahoo',
'NGN|0.0054768|Nigerian Naira|||1|2008-09-19|5|source_yahoo',
'NIO|0.03298|Nicaraguan Cordoba Oro|||0.05|2008-09-20|4|source_bloomberg',
'NLG|0.417133|Dutch Guilder|||0.5|2008-09-19|6|source_imf',
'NOK|0.111315|Norwegian Krone||Norwegian Kroner|0.5|2008-09-19|6|source_imf',
'NPR|0.00864411|Nepalese Rupee|||0.05|2008-09-19|6|source_imf',
'NZD|0.435341|New Zealand Dollar|||0.10|2008-09-19|6|source_imf',
'OMR|1.67936|Omani Rial|||1|2008-09-19|6|source_imf',
'PAB|0.6456|Panamanian Balboa||Panamanian Balboa|0.01|2008-09-18|4|source_bloomberg',
'PEN|0.217|Peruvian Nuevo Sol||Peruvian Nuevos Soles|0.01|2008-09-19|4|source_yahoo',
'PGK|0.255|Papua New Guinea Kina||Papua New Guinea Kina|0.01|2008-09-19|3|source_yahoo',
'PHP|0.0139|Philippine Peso|||0.01|2008-09-19|4|source_yahoo',
'PKR|0.00830706|Pakistan Rupee||Pakistani Rupees|0.01|2008-09-19|6|source_imf',
'PLN|0.276171|Polish Zloty||Polish Zlotych|0.01|2008-09-19|6|source_imf',
'PTE|0.00458515|Portuguese Escudo|||0.05|2008-09-19|6|source_imf',
'PYG|0.00016183|Paraguay Guarani||Paraguay Guarani|1|2008-09-19|5|source_yahoo',
'QAR|0.177394|Qatari Riyal|||1|2008-09-19|6|source_imf',
'ROL|2.545e-05|Old Romanian Leu||Old Romanian Lei|0.01|2008-09-19|5|source_yahoo',
'RON|0.2545|Romanian Leu|The Romainian Leu|Romanian Lei|0.01|2008-09-19|5|source_yahoo',
'RSD|0.01224|Serbian Dinar|||0.5|2008-09-20|4|source_bloomberg',
'RUB|0.0253358|Russian Ruble|||0.01|2008-09-19|6|source_imf',
'RUR|2.53358e-05|Old Russian Ruble|||10|2008-09-19|6|source_imf',
'RWF|0.001164|Rwandan Franc|||1|2008-09-19|5|source_yahoo',
'SAR|0.172191|Saudi Arabian Riyal|||1|2008-09-19|6|source_imf',
'SBD|0.083883|Solomon Islands Dollar|||0.05|2008-09-19|5|source_yahoo',
'SCR|0.07921|Seychelles Rupee|||0.05|2008-09-19|4|source_yahoo',
'SDD|0.002986|Sudanese Dinar|||0.01|2008-09-19|4|source_bloomberg',
'SDG|0.2986|Sudanese Pound|||0.01|2008-09-19|4|source_bloomberg',
'SDP|0.0002986|Sudanese Pound|||0.01|2008-09-19|4|source_bloomberg',
'SDR|1|Special Drawing Right|||0.01|2008-09-19|6|source_imf',
'SEK|0.0960528|Swedish Krona||Swedish Kronor|0.01|2008-09-19|6|source_imf',
'SGD|0.450038|Singapore Dollar|||0.01|2008-09-19|6|source_imf',
'SHP|1.183|Saint Helena Pound|||0.01|2008-09-20|4|source_bloomberg',
'SIT|0.00383592|Slovenian Tolar|||0.1|2008-09-19|6|source_imf',
'SKK|0.0309191|Slovak Koruna||Slovak Koruny|0.5|2008-09-19|6|source_imf',
'SLL|0.00021778|Sierra Leonean Leone|||10|2008-09-19|5|source_yahoo',
'SOS|0.00046|Somali Shilling|||1|2008-09-20|4|source_bloomberg',
'SRD|0.2352|Suriname Dollar|||0.01|2008-09-20|4|source_bloomberg',
'SRG|0.0002352|Suriname Guilder|||5|2008-09-20|4|source_bloomberg',
'STD|4.4888e-05|Sao Tome Dobra|||0.5|2008-09-19|5|source_yahoo',
'SVC|0.073796|El Salvador Colon||El Salvador Colones|0.05|2008-09-19|6|source_imf',
'SYP|0.01266|Syrian Pound|||0.25|2008-09-20|4|source_bloomberg',
'SZL|0.07889|Swazi Lilangeni||Swazi Emalangeni|0.01|2008-09-19|4|source_yahoo',
'THB|0.0188899|Thai Baht||Thai Baht|0.25|2008-09-19|6|source_imf',
'THO|0.01891|Thai Offshore Baht||Thai Offshore Baht|0.25|2008-09-20|4|source_bloomberg',
'TJS|0.189|Tajikistan Somoni||Tajikistan Somoni|0.05|2008-09-20|4|source_bloomberg',
'TMM|4.531e-05|Turkmenistan Manat|||1|2008-09-20|4|source_bloomberg',
'TND|0.51885|Tunisian Dinar|||0.005|2008-09-19|5|source_yahoo',
'TOP|0.31798|Tongan Pa\'Anga||Tongan Pa\'Anga|0.01|2008-09-19|5|source_yahoo',
'TRL|5.1761e-07|Turkish Lira||Turkish Lire|5000|2008-09-19|5|source_yahoo',
'TRY|0.51761|New Turkish Lira||New Turkish Lira|0.01|2008-09-19|5|source_yahoo',
'TTD|0.103626|Trinidad and Tobago Dollar|||0.01|2008-09-19|6|source_imf',
'TWD|0.02005|New Taiwan Dollar|||1|2008-09-19|4|source_yahoo',
'TZS|0.00055398|Tanzanian Shilling|||0.05|2008-09-19|5|source_yahoo',
'UAH|0.1295|Ukrainian Hryvnia||Ukrainian Hryvnia|0.01|2008-09-19|4|source_yahoo',
'UGX|0.00039481|Uganda Shilling|||50|2008-09-19|5|source_yahoo',
'USD|0.645715|United States Dollar|||0.01|2008-09-19|6|source_imf',
'UYU|0.03363|Uruguayan peso|||0.1|2008-09-19|4|source_yahoo',
'UZS|0.0004868|Uzbekistani Som|||0.01|2008-09-20|4|source_bloomberg',
'VEB|0.000301508|Venezuelan Bolivar||Venezuelan Bolivares|1|2008-09-05|6|source_imf',
'VEF|0.301508|Venezuelan Bolivar Fuerte||Venezuelan Bolivares Fuertes|1|2008-09-05|6|source_imf',
'VND|3.8631e-05|Viet Nam Dong||Viet Nam Dong|200|2008-09-19|5|source_yahoo',
'VUV|0.006793|Vanuatu Vatu||Vanuatu Vatu|1|2008-09-19|4|source_yahoo',
'WST|0.24323|Samoa Tala||Samoan Tala|0.05|2008-09-19|5|source_yahoo',
'XAF|0.00140137|Central African CFA||Central African CFA|1|2008-09-19|6|source_imf',
'XAG|8.023|Ounces of Silver|Ounces of Silver|Ounces of Silver|0.001|2008-09-19|5|source_yahoo',
'XAL|0.04532|Ounces of Aluminum|Ounces of Aluminum|Ounces of Aluminum|0.01|2008-09-18|4|source_lme',
'XAU|563.81|Ounces of Gold|Ounces of Gold|Ounces of Gold|0.001|2008-09-19|5|source_yahoo',
'XCD|0.2418|East Caribbean Dollar|||0.01|2008-09-19|5|source_yahoo',
'XCP|0.1269|Ounces of Copper|Ounces of Copper|Ounces of Copper|0.01|2008-09-18|4|source_lme',
'XEU|0.91924|European Currency Unit|||0.01|2008-09-19|6|source_imf',
'XOF|0.00140137|West African CFA|||1|2008-09-19|6|source_imf',
'XPD|153|Ounces of Palladium|Ounces of Palladium|Ounces of Palladium|0.001|2008-09-19|5|source_yahoo',
'XPF|0.00770323|French Pacific Franc|||1|2008-09-19|6|source_imf',
'XPT|740.64|Ounces of Platinum|Ounces of Platinum|Ounces of Platinum|0.001|2008-09-19|5|source_yahoo',
'YER|0.0032359|Yemeni Rial|||0.005|2008-09-19|5|source_yahoo',
'YUM|0.4706|Yugoslavian Dinar|||0.5|2008-09-20|4|source_bloomberg',
'ZAR|0.0802629|South African Rand||South African Rand|0.05|2008-09-19|6|source_imf',
'ZMK|0.00018446|Zambian Kwacha||Zambian Kwacha|0.01|2008-09-19|5|source_yahoo',
'ZRN|1.17e-06|New Zaire|||10|2008-09-20|4|source_bloomberg',
'ZWD|0.0065141|Zimbabwe Dollar|||0.01|2008-09-19|5|source_yahoo',
'ZWN|0.0065141|New Zimbabwe Dollar|||0.01|2008-09-19|5|source_yahoo',
'');
var lastUpdate='2008-09-21';
var currency_sdrPer=new Array();
var currency_Name=new Array();
var currency_TheName=new Array();
var currency_PluralName=new Array();
var currency_Unit=new Array();
var currency_Update=new Array();
var currency_SF=new Array();
var currency_Src=new Array();
currency_make_arrays();
function currency_make_arrays(){
for (var d in currency_data){
if (currency_data[d] != ''){
var a=currency_data[d].split('\|');
var c=a[0];
currency_sdrPer[c]=a[1];
currency_Name[c]=a[2];
currency_TheName[c]=((a[3]=='')?'The '+currency_Name[c]:a[3]);
currency_PluralName[c]=((a[4]=='')?currency_Name[c]+'s':a[4]);
currency_Unit[c]=a[5];
currency_Update[c]=((a[6]=='')?lastUpdate:a[6]);
currency_SF[c]=a[7];
currency_Src[c]=a[8];
}
}
}
function currency_convert(n,a,b){
if (currency_sdrPer[a] && currency_sdrPer[b]){
var rate=''+(n*(currency_sdrPer[a]/currency_sdrPer[b]));
var digits=0;
var rateDisp='';
if (typeof currency_round=='boolean'&&currency_round==true){
rateDisp=currency_makeDecimals(Math.round(rate/currency_Unit[a])*currency_Unit[a],currency_getDecimals(currency_Unit[a]));
} else {
for (var i=0; i<rate.length && digits < 6; i++){
var c=rate.charAt(i);
rateDisp += c;
if (c!='.'&&(c!='0'||digits>0)){
digits++;
}
}
}
return rateDisp;
}
return '';
}
function currency_show_conversion(n,a,b){
document.write(currency_convert(n,a,b));
}
function currency_getRateHTML(a,b){
if (currency_sdrPer[a] && currency_sdrPer[b]){
var rate=''+(currency_sdrPer[a]/currency_sdrPer[b]);
var rateDisp=currency_convert(1,a,b);
var link=a+'_'+b+'.html';
if (b<a){
link=b+'_'+a+'.html'
}
link='http://coinmill.com/'+link;
var t='<a href="../../peterchristopher/2485_files/$link">$from_the_name ($from_abbrev) is worth<strong>$rate</b> $to_plural_name ($to_abbrev)</a><br>';
if (typeof currency_template!='undefined'){
t=currency_template;
}
t=t.replace('$link',link);
t=t.replace('$rate',rateDisp);
t=t.replace('$from_abbrev',a);
t=t.replace('$from_name',currency_Name[a]);
t=t.replace('$from_plural_name',currency_PluralName[a]);
t=t.replace('$from_the_name',currency_TheName[a]);
t=t.replace('$to_abbrev',b);
t=t.replace('$to_name',currency_Name[b]);
t=t.replace('$to_plural_name',currency_PluralName[b]);
t=t.replace('$to_the_name',currency_TheName[b]);
return t;
}
return '';
}
function currency_showRate(a,b){
document.write(currency_getRateHTML(a,b));
}
function currency_showRates(){
for (var i=0;i<currency_rate_list.length;i++){
var a=currency_rate_list[i];
i++;
if (i<currency_rate_list.length){
var b=currency_rate_list[i];
currency_showRate(a,b);
}
}
}
if (typeof currency_rate_list!='undefined'){
currency_showRates();
}

function currency_getDecimals(n){
var ns=''+n;
var i=ns.indexOf('.');
if (i==-1)return 0;
return ns.length-i-1;
}
function currency_makeDecimals(n,nd){
var rs='';
var d=-1;
var t=''+n;
for (var i=0;i<t.length;i++){
var c=t.charAt(i);
if (c=='.'){
d=0;
} else if (d>=0){
d++;
if (d>nd){
return rs;
}
}
rs+=c;
}
if (d==-1){
d=0;
if (nd>0){
rs+='.';
}
}
while (d<nd){
rs+='0'
d++;
}
return rs;
}
function currency_cfld(){
}
function currency_check_for_links(){
if (!document.links||!document.links.length||!document.links[0].href) return;
var r = /^http\:\/\/(?:[^\/]+\.)?(currency\.ostermiller\.org|coinmill\.com)\/?$/;
var link_found=!'http://coinmill.com/'.match(r);
for (var i=0;!link_found&&i<document.links.length;i++){
link_found=document.links[i].href.match(r);
}
if (!link_found){
alert('This page should link to coinmill.com to show currency conversion rates');
var i=new Image();
i.onload=currency_cfld;
i.onerror=currency_cfld;
i.src='http://coinmill.com/cfl.gif?f='+escape(document.location.href.replace(new RegExp('^http://'),''))+'&d='+(new Date()).getTime();
}
}
setTimeout('currency_check_for_links();',30000);
