var currency_data=new Array(
'ADP|0.00538153|Andorran Peseta|||1|2010-03-12|6|source_imf',
'AED|0.177127|United Arab Emirates Dirham|||0.25|2010-03-12|6|source_imf',
'AFA|1.361e-05|Old Afghan Afghani|||1|2010-03-13|4|source_bloomberg',
'AFN|0.01361|Afghan Afghani|||1|2010-03-13|4|source_bloomberg',
'ALL|0.006412|Albanian Lek||Albanian Leke|0.1|2010-03-12|5|source_yahoo',
'AMD|0.001666|Armenian Dram|||0.2|2010-03-13|4|source_bloomberg',
'ANG|0.363|Netherlands Antillean Guilder|||0.01|2010-03-12|4|source_yahoo',
'AOA|0.007184|Angolan Kwanza||Angolan Kwanza|0.1|2010-03-13|4|source_bloomberg',
'ARS|0.16885|Argentine Peso|||0.01|2010-03-12|5|source_yahoo',
'ATS|0.0650721|Austrian Schilling|||1|2010-03-12|6|source_imf',
'AUD|0.595792|Australian Dollar|||0.05|2010-03-12|6|source_imf',
'AWG|0.36242|Aruban Florin|||0.01|2010-03-12|5|source_yahoo',
'AZM|0.0001616|Old Azerbaijani Manat|||10|2010-03-13|4|source_bloomberg',
'AZN|0.808|Azerbaijani Manat|||0.01|2010-03-13|4|source_bloomberg',
'BAM|0.4549|Bosnia-Herzegovina Convertible Mark|Bosnia-Herzegovina Convertible Marks|Bosnia-Herzegovina Convertible Marka|0.5|2010-03-13|4|source_bloomberg',
'BBD|0.3244|Barbados Dollar|||0.01|2010-03-12|4|source_yahoo',
'BDT|0.0094105|Bangladeshi Taka||Bangladeshi Taka|0.01|2010-03-12|5|source_yahoo',
'BEF|0.0221967|Belgian Franc|||0.5|2010-03-12|6|source_imf',
'BGL|0.00045765|Bulgarian Old Lev||Bulgarian Old Leva|10|2010-03-12|5|source_yahoo',
'BGN|0.45765|Bulgarian Lev||Bulgarian Leva|0.01|2010-03-12|5|source_yahoo',
'BHD|1.73005|Bahraini Dinar|||0.05|2010-03-12|6|source_imf',
'BIF|0.00053178|Burundian Franc|||1|2010-03-12|5|source_yahoo',
'BMD|0.650499|Bermuda Dollar|||0.01|2010-03-12|6|source_imf',
'BND|0.46554|Brunei Dollar|||0.01|2010-03-12|6|source_imf',
'BOB|0.0927|Bolivian Boliviano|||0.1|2010-03-12|3|source_yahoo',
'BRC|0.000133755|Brazilian Cruzeiro|||0.01|2010-03-12|6|source_imf',
'BRL|0.367825|Brazilian Real||Brazilian Reais|0.01|2010-03-12|6|source_imf',
'BSD|0.65|Bahamian Dollar|||0.01|2010-03-12|3|source_yahoo',
'BTN|0.014317|Bhutanese Ngultrum||Bhutanese Ngultrum|0.20|2010-03-12|5|source_yahoo',
'BWP|0.0963389|Botswana Pula|||0.01|2010-03-12|6|source_imf',
'BYR|0.00021969|Belarusian Ruble|||1|2010-03-12|5|source_yahoo',
'BZD|0.334|Belize Dollar|||0.01|2010-03-12|3|source_yahoo',
'CAD|0.638558|Canadian Dollar|||0.01|2010-03-12|6|source_imf',
'CDF|0.0007121|Franc Congolais||Congolese Francs|0.01|2010-03-13|4|source_bloomberg',
'CHF|0.613736|Swiss Franc|||0.05|2010-03-12|6|source_imf',
'CLF|26.32|Chilean Unidad de Fomento|||1|2010-03-13|4|source_bloomberg',
'CLP|0.00124901|Chilean Peso|||1|2010-03-12|6|source_imf',
'CNY|0.0952945|Chinese Yuan||Chinese Yuan Renminbi|0.5|2010-03-12|6|source_imf',
'COP|0.000343309|Colombian Peso|||100|2010-03-12|6|source_imf',
'CRC|0.0012042|Costa Rican Colon||Costa Rican Colones|0.01|2010-03-12|5|source_yahoo',
'CSD|0.008892|Serbian Dinar|||0.5|2010-03-13|4|source_bloomberg',
'CUC|0.702539|Cuban Convertible Peso|||0.01|2010-03-12|6|source_imf',
'CUP|0.65|Cuban Peso|||0.01|2010-03-12|3|source_yahoo',
'CVE|0.008041|Cape Verde Escudo|||0.01|2010-03-12|4|source_yahoo',
'CYP|1.53|Cypriot Pound|||0.01||4|source_bloomberg',
'CZK|0.0350957|Czech Koruna||Czech Koruny|0.5|2010-03-12|6|source_imf',
'DEM|0.457817|German Mark|||0.01|2010-03-12|6|source_imf',
'DJF|0.0036392|Djiboutian Franc|||10|2010-03-12|5|source_yahoo',
'DKK|0.120331|Danish Krone||Danish Kroner|0.25|2010-03-12|6|source_imf',
'DOP|0.01782|Dominican Peso|||1|2010-03-12|4|source_yahoo',
'DZD|0.009001|Algerian Dinar|||0.05|2010-03-12|4|source_yahoo',
'ECS|2.612e-05|Ecuadorian Sucre|||100|2010-03-09|4|source_bloomberg',
'EEK|0.057197|Estonian Kroon||Estonian Krooni|0.05|2010-03-12|5|source_yahoo',
'EGP|0.1189|Egyptian Pound|||0.25|2010-03-12|4|source_yahoo',
'ERN|0.04337|Eritrean Nakfa||Eritrean Nakfa|0.01|2010-03-13|4|source_bloomberg',
'ESP|0.00538153|Spanish Peseta|||1|2010-03-12|6|source_imf',
'ETB|0.048414|Ethiopian Birr||Ethiopian Birr|0.01|2010-03-12|5|source_yahoo',
'EUR|0.895412|Euro|||0.01|2010-03-12|6|source_imf',
'FIM|0.150597|Finnish Mark|||1|2010-03-12|6|source_imf',
'FJD|0.33794|Fiji Dollar|||0.01|2010-03-12|5|source_yahoo',
'FKP|0.9877||||0.01|2010-03-12|4|source_yahoo',
'FRF|0.136505|French Franc|||0.01|2010-03-12|6|source_imf',
'GBP|0.986222|Pound Sterling|Pound Sterling|Pounds Sterling|0.01|2010-03-12|6|source_imf',
'GBX|0.00986222|Pence Sterling|Pence Sterling|Pence Sterling|1|2010-03-12|6|source_imf',
'GEL|0.3783|Georgian Lari||Georgian Lari|0.01|2010-03-13|4|source_bloomberg',
'GHC|4.601e-05|Old Ghanaian Cedi|||0.1|2010-03-13|4|source_bloomberg',
'GHS|0.4601|Ghanaian Cedi|||0.01|2010-03-13|4|source_bloomberg',
'GIP|0.98778|Gibraltar Pound|||0.01|2010-03-12|5|source_yahoo',
'GMD|0.02427|Gambian Dalasi||Gambian Dalasi|0.01|2010-03-12|4|source_yahoo',
'GNF|0.00012945|Guinean Franc|||1|2010-03-12|5|source_yahoo',
'GRD|0.00262777|Greek Drachma|||0.5|2010-03-12|6|source_imf',
'GTQ|0.08077|Guatemalan Quetzal||Guatemalan Quetzales|0.01|2010-03-12|5|source_yahoo',
'GYD|0.0031739|Guyanese Dollar|||1|2010-03-12|5|source_yahoo',
'HKD|0.083857|Hong Kong Dollar|||0.1|2010-03-12|5|source_yahoo',
'HNL|0.03438|Honduran Lempira|||0.01|2010-03-12|4|source_yahoo',
'HRK|0.12314|Croatian Kuna||Croatian Kuna|0.01|2010-03-12|5|source_yahoo',
'HTG|0.01616|Haitian Gourde|||0.05|2010-03-12|4|source_yahoo',
'HUF|0.00336506|Hungarian Forint|||1|2010-03-12|6|source_imf',
'IDR|7.08373e-05|Indonesian Rupiah|||25|2010-03-12|6|source_imf',
'IEP|1.13694|Irish Pound|||0.01|2010-03-12|6|source_imf',
'ILS|0.174959|Israeli New Shekel|||0.01|2010-03-12|6|source_imf',
'INR|0.0143124|Indian Rupee|||0.1|2010-03-12|6|source_imf',
'IQD|0.00055716|Iraqi Dinar|||500|2010-03-12|5|source_yahoo',
'IRR|6.55771e-05|Iranian Rial|||5|2010-03-11|6|source_imf',
'ISK|0.00518243|Icelandic Krona||Icelandic Kronur|1|2010-03-12|6|source_imf',
'ITL|0.000462442|Italian Lira||Italian Lire|1|2010-03-12|6|source_imf',
'JMD|0.007282|Jamaican Dollar|||0.01|2010-03-12|4|source_bloomberg',
'JOD|0.91844|Jordanian Dinar|||0.05|2010-03-12|5|source_yahoo',
'JPY|0.00717752|Japanese Yen||Japanese Yen|1|2010-03-12|6|source_imf',
'KES|0.008481|Kenyan Shilling|||0.01|2010-03-12|4|source_yahoo',
'KGS|0.01454|Kyrgyzstani Som|||1|2010-03-13|4|source_bloomberg',
'KHR|0.00015586|Cambodian Riel|||100|2010-03-12|5|source_yahoo',
'KMF|0.0018058|Comorian Franc||Comorians Francs|0.05|2010-03-12|5|source_yahoo',
'KPW|0.00072274|North Korean Won||North Korean Won|0.01|2010-03-12|5|source_yahoo',
'KRW|0.00057653|Korean Won||Korean Won|1|2010-03-12|6|source_imf',
'KWD|2.25476|Kuwaiti Dinar|||0.001|2010-03-12|6|source_imf',
'KYD|0.80226|Cayman Islands Dollar|||0.01|2010-03-12|5|source_yahoo',
'KZT|0.00442035|Kazakhstani Tenge||Kazakhstani Tenge|1|2010-03-12|6|source_imf',
'LAK|7.6633e-05|Lao Kip|||500|2010-03-12|5|source_yahoo',
'LBP|0.00043352|Lebanese Pound|||50|2010-03-12|5|source_yahoo',
'LKR|0.00570481|Sri Lankan Rupee|||1|2010-03-12|6|source_imf',
'LRD|0.009156|Liberian Dollar|||0.05|2010-03-12|4|source_yahoo',
'LSL|0.08761|Lesotho Loti||Lesotho Maloti|0.01|2010-03-12|4|source_yahoo',
'LTL|0.25706|Lithuanian Litas||Lithuanian Litai|0.01|2010-03-12|5|source_yahoo',
'LUF|0.0221967|Luxembourgian Franc|||0.5|2010-03-12|6|source_imf',
'LVL|1.2655|Latvian Lats||Latvian Lati|0.01|2010-03-12|5|source_yahoo',
'LYD|0.5175|Libyan Dinar|||0.001|2010-03-12|6|source_imf',
'MAD|0.07917|Moroccan Dirham|||0.2|2010-03-11|5|source_yahoo',
'MDL|0.05173|Moldovan Leu||Moldovan Lei|0.01|2010-03-12|5|source_yahoo',
'MGA|0.0003019|Malagasy Ariary||Malagasy Ariary|1|2010-03-13|4|source_bloomberg',
'MGF|6.038e-05|Malagasy Franc|||50|2010-03-13|4|source_bloomberg',
'MKD|0.014525|Macedonia Denar|||0.5|2010-03-12|5|source_yahoo',
'MMK|0.0999|Myanmar Kyat|||50|2010-03-12|3|source_yahoo',
'MNT|0.00045891|Mongolian Tugrik|||1|2010-03-12|5|source_yahoo',
'MOP|0.0814|Macau Pataca|||0.1|2010-03-12|3|source_yahoo',
'MRO|0.0024805|Mauritania Ouguiya|||0.2|2010-03-12|5|source_yahoo',
'MTL|2.08575|Maltese Lira||Maltese Liri|0.01|2010-03-12|6|source_imf',
'MUR|0.0213626|Mauritian Rupee|||0.01|2010-03-11|6|source_imf',
'MVR|0.0508|Maldives Rufiyaa||Maldives Rufiyaa|0.01|2010-03-12|5|source_yahoo',
'MWK|0.004314|Malawian Kwacha|||5|2010-03-13|4|source_bloomberg',
'MXN|0.0518214|Mexican Peso|||0.05|2010-03-12|6|source_imf',
'MXP|5.18214e-05|Old Mexican Peso|||0.01|2010-03-12|6|source_imf',
'MXV|0.1474|Mexican Unidad De Inversion|||1|2010-03-13|4|source_bloomberg',
'MYR|0.196603|Malaysian Ringgit||Malaysian Ringgit|0.01|2010-03-12|6|source_imf',
'MZM|2.045e-05|Old Mozambican Metical||Old Mozambican Meticais|1|2010-03-13|4|source_bloomberg',
'MZN|0.02045|New Mozambican Metical||New Mozambican Meticais|1|2010-03-13|4|source_bloomberg',
'NAD|0.087662|Namibian Dollar|||0.05|2010-03-12|5|source_yahoo',
'NGN|0.0043223|Nigerian Naira|||1|2010-03-12|5|source_yahoo',
'NIO|0.03091|Nicaraguan Cordoba Oro|||0.05|2010-03-12|5|source_yahoo',
'NLG|0.406320|Dutch Guilder|||0.5|2010-03-12|6|source_imf',
'NOK|0.111467|Norwegian Krone||Norwegian Kroner|0.5|2010-03-12|6|source_imf',
'NPR|0.00892929|Nepalese Rupee|||0.05|2010-03-12|6|source_imf',
'NZD|0.455544|New Zealand Dollar|||0.10|2010-03-12|6|source_imf',
'OMR|1.6918|Omani Rial|||1|2010-03-12|6|source_imf',
'PAB|0.6409|Panamanian Balboa||Panamanian Balboa|0.01|2010-03-12|4|source_yahoo',
'PEN|0.22909|Peruvian Nuevo Sol||Peruvian Nuevos Soles|0.01|2010-03-12|5|source_yahoo',
'PGK|0.24498|Papua New Guinea Kina||Papua New Guinea Kina|0.01|2010-03-12|5|source_yahoo',
'PHP|0.014248|Philippine Peso|||0.01|2010-03-12|5|source_yahoo',
'PKR|0.00773059|Pakistan Rupee||Pakistani Rupees|0.01|2010-03-12|6|source_imf',
'PLN|0.229761|Polish Zloty||Polish Zlotych|0.01|2010-03-12|6|source_imf',
'PTE|0.0044663|Portuguese Escudo|||0.05|2010-03-12|6|source_imf',
'PYG|0.00013782|Paraguay Guarani||Paraguay Guarani|1|2010-03-12|5|source_yahoo',
'QAR|0.178709|Qatari Riyal|||1|2010-03-12|6|source_imf',
'ROL|2.1875e-05|Old Romanian Leu||Old Romanian Lei|0.01|2010-03-12|5|source_yahoo',
'RON|0.21875|Romanian Leu|The Romainian Leu|Romanian Lei|0.01|2010-03-12|5|source_yahoo',
'RSD|0.008892|Serbian Dinar|||0.5|2010-03-13|4|source_bloomberg',
'RUB|0.0221336|Russian Ruble|||0.01|2010-03-12|6|source_imf',
'RUR|2.21336e-05|Old Russian Ruble|||10|2010-03-12|6|source_imf',
'RWF|0.0011357|Rwandan Franc|||1|2010-03-12|5|source_yahoo',
'SAR|0.173466|Saudi Arabian Riyal|||1|2010-03-12|6|source_imf',
'SBD|0.081964|Solomon Islands Dollar|||0.05|2010-03-12|5|source_yahoo',
'SCR|0.05657|Seychelles Rupee|||0.05|2010-03-12|4|source_yahoo',
'SDD|0.00281|Sudanese Dinar|||0.01|2010-03-13|4|source_bloomberg',
'SDG|0.281|Sudanese Pound|||0.01|2010-03-13|4|source_bloomberg',
'SDP|0.000281|Sudanese Pound|||0.01|2010-03-13|4|source_bloomberg',
'SDR|1|Special Drawing Right|||0.01|2010-03-12|6|source_imf',
'SEK|0.0918784|Swedish Krona||Swedish Kronor|0.01|2010-03-12|6|source_imf',
'SGD|0.46554|Singapore Dollar|||0.01|2010-03-12|6|source_imf',
'SHP|0.98778|Saint Helena Pound|||0.01|2010-03-12|5|source_yahoo',
'SIT|0.00373649|Slovenian Tolar|||0.1|2010-03-12|6|source_imf',
'SKK|0.02948|Slovak Koruna||Slovak Koruny|0.5|2010-03-10|4|source_bloomberg',
'SLL|0.00016896|Sierra Leonean Leone|||10|2010-03-12|5|source_yahoo',
'SOS|0.00042937|Somali Shilling|||1|2010-03-12|5|source_yahoo',
'SRD|0.237|Suriname Dollar|||0.01|2010-03-13|4|source_bloomberg',
'SRG|0.000237|Suriname Guilder|||5|2010-03-13|4|source_bloomberg',
'STD|3.6059e-05|Sao Tome Dobra|||0.5|2010-03-12|5|source_yahoo',
'SVC|0.0743427|El Salvador Colon||El Salvador Colones|0.05|2010-03-12|6|source_imf',
'SYP|0.01416|Syrian Pound|||0.25|2010-03-12|4|source_yahoo',
'SZL|0.08754|Swazi Lilangeni||Swazi Emalangeni|0.01|2010-03-12|4|source_yahoo',
'THB|0.019921|Thai Baht||Thai Baht|0.25|2010-03-12|6|source_imf',
'THO|0.01991|Thai Offshore Baht||Thai Offshore Baht|0.25|2010-03-13|4|source_bloomberg',
'TJS|0.149|Tajikistan Somoni||Tajikistan Somoni|0.05|2010-03-13|4|source_bloomberg',
'TMM|4.565e-05|Turkmenistan Manat|||1|2010-03-13|4|source_bloomberg',
'TND|0.46984|Tunisian Dinar|||0.005|2010-03-12|5|source_yahoo',
'TOP|0.3376|Tongan Pa\'Anga||Tongan Pa\'Anga|0.01|2010-03-12|4|source_yahoo',
'TRL|4.2605e-07|Turkish Lira||Turkish Lire|5000|2010-03-12|5|source_yahoo',
'TRY|0.42605|New Turkish Lira||New Turkish Lira|0.01|2010-03-12|5|source_yahoo',
'TTD|0.102383|Trinidad and Tobago Dollar|||0.01|2010-03-12|6|source_imf',
'TWD|0.020498|New Taiwan Dollar|||1|2010-03-12|5|source_yahoo',
'TZS|0.00047954|Tanzanian Shilling|||0.05|2010-03-12|5|source_yahoo',
'UAH|0.0815|Ukrainian Hryvnia||Ukrainian Hryvnia|0.01|2010-03-12|3|source_yahoo',
'UGX|0.00031274|Uganda Shilling|||50|2010-03-12|5|source_yahoo',
'USD|0.650499|United States Dollar|||0.01|2010-03-12|6|source_imf',
'UYU|0.03327|Uruguayan peso|||0.1|2010-03-12|4|source_yahoo',
'UZS|0.0004215|Uzbekistani Som|||0.01|2010-03-13|4|source_bloomberg',
'VEB|0.000250819|Venezuelan Bolivar||Venezuelan Bolivares|1|2010-03-12|6|source_imf',
'VEF|0.250819|Venezuelan Bolivar Fuerte||Venezuelan Bolivares Fuertes|1|2010-03-12|6|source_imf',
'VND|3.3969e-05|Viet Nam Dong||Viet Nam Dong|200|2010-03-12|5|source_yahoo',
'VUV|0.006787|Vanuatu Vatu||Vanuatu Vatu|1|2010-03-12|4|source_yahoo',
'WST|0.2547|Samoa Tala||Samoan Tala|0.05|2010-03-12|4|source_yahoo',
'XAF|0.00136505|Central African CFA||Central African CFA|1|2010-03-12|6|source_imf',
'XAG|11.18|Ounces of Silver|Ounces of Silver|Ounces of Silver|0.001|2010-03-13|4|source_bloomberg',
'XAL|0.04048|Ounces of Aluminum|Ounces of Aluminum|Ounces of Aluminum|0.01|2010-03-11|4|source_lme',
'XAU|716.52|Ounces of Gold|Ounces of Gold|Ounces of Gold|0.001|2010-03-12|5|source_yahoo',
'XCD|0.2488|East Caribbean Dollar|||0.01|2010-03-12|4|source_yahoo',
'XCP|0.1362|Ounces of Copper|Ounces of Copper|Ounces of Copper|0.01|2010-03-11|4|source_lme',
'XEU|0.895412|European Currency Unit|||0.01|2010-03-12|6|source_imf',
'XOF|0.00136505|West African CFA|||1|2010-03-12|6|source_imf',
'XPD|299.6|Ounces of Palladium|Ounces of Palladium|Ounces of Palladium|0.001|2010-03-13|4|source_bloomberg',
'XPF|0.00750356|French Pacific Franc|||1|2010-03-12|6|source_imf',
'XPT|1049|Ounces of Platinum|Ounces of Platinum|Ounces of Platinum|0.001|2010-03-13|4|source_bloomberg',
'YER|0.0031654|Yemeni Rial|||0.005|2010-03-12|5|source_yahoo',
'YUM|0.4549|Yugoslavian Dinar|||0.5|2010-03-13|4|source_bloomberg',
'ZAR|0.0879421|South African Rand||South African Rand|0.05|2010-03-11|6|source_imf',
'ZMK|0.000139|Zambian Kwacha||Zambian Kwacha|0.01|2010-03-12|5|source_yahoo',
'ZRN|7.121e-07|New Zaire|||10|2010-03-13|4|source_bloomberg',
'ZWD|5.152e-11|Zimbabwe Dollar|||0.01|2010-03-13|4|source_bloomberg',
'ZWN|5.152e-11|New Zimbabwe Dollar|||0.01|2010-03-13|4|source_bloomberg',
'');
var lastUpdate='2010-03-14';
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="$link">$from_the_name ($from_abbrev) is worth <b>$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){
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);
