var currency_data=new Array(
'ADP|0.00557477|Andorran Peseta|||1||6|source_imf',
'AED|0.170483|United Arab Emirates Dirham|||0.25||6|source_imf',
'AFA|1.269e-05|Old Afghan Afghani|||1|2009-11-19|4|source_bloomberg',
'AFN|0.01269|Afghan Afghani|||1|2009-11-19|4|source_bloomberg',
'ALL|0.00677|Albanian Lek||Albanian Leke|0.1||4|source_yahoo',
'AMD|0.001607|Armenian Dram|||0.2|2009-11-19|4|source_bloomberg',
'ANG|0.34933|Netherlands Antillean Guilder|||0.01||5|source_yahoo',
'AOA|0.007206|Angolan Kwanza||Angolan Kwanza|0.1|2009-11-19|4|source_bloomberg',
'ARS|0.16465|Argentine Peso|||0.01||5|source_yahoo',
'ATS|0.0674086|Austrian Schilling|||1||6|source_imf',
'AUD|0.576385|Australian Dollar|||0.05||6|source_imf',
'AWG|0.348|Aruban Florin|||0.01||3|source_yahoo',
'AZM|0.0001552|Old Azerbaijani Manat|||10|2009-11-19|4|source_bloomberg',
'AZN|0.7761|Azerbaijani Manat|||0.01|2009-11-19|4|source_bloomberg',
'BAM|0.4755|Bosnia-Herzegovina Convertible Mark|Bosnia-Herzegovina Convertible Marks|Bosnia-Herzegovina Convertible Marka|0.5|2009-11-19|4|source_bloomberg',
'BBD|0.3128|Barbados Dollar|||0.01|2009-11-16|4|source_bloomberg',
'BDT|0.0090903|Bangladeshi Taka||Bangladeshi Taka|0.01||5|source_yahoo',
'BEF|0.0229937|Belgian Franc|||0.5||6|source_imf',
'BGL|0.00047543|Bulgarian Old Lev||Bulgarian Old Leva|10||5|source_yahoo',
'BGN|0.47543|Bulgarian Lev||Bulgarian Leva|0.01||5|source_yahoo',
'BHD|1.66515|Bahraini Dinar|||0.05||6|source_imf',
'BIF|0.00051741|Burundian Franc|||1||5|source_yahoo',
'BMD|0.626097|Bermuda Dollar|||0.01||6|source_imf',
'BND|0.450624|Brunei Dollar|||0.01||6|source_imf',
'BOB|0.0892|Bolivian Boliviano|||0.1||3|source_yahoo',
'BRC|0.000131762|Brazilian Cruzeiro|||0.01||6|source_imf',
'BRL|0.362346|Brazilian Real||Brazilian Reais|0.01||6|source_imf',
'BSD|0.6257|Bahamian Dollar|||0.01|2009-11-16|4|source_bloomberg',
'BTN|0.013434|Bhutanese Ngultrum||Bhutanese Ngultrum|0.20||5|source_yahoo',
'BWP|0.0935389|Botswana Pula|||0.01||6|source_imf',
'BYR|0.00022909|Belarusian Ruble|||1||5|source_yahoo',
'BZD|0.3168|Belize Dollar|||0.01|2009-11-16|4|source_bloomberg',
'CAD|0.588181|Canadian Dollar|||0.01|2009-11-19|6|source_imf',
'CDF|0.0006877|Franc Congolais||Congolese Francs|0.01|2009-11-19|4|source_bloomberg',
'CHF|0.614966|Swiss Franc|||0.05||6|source_imf',
'CLF|26.6|Chilean Unidad de Fomento|||1|2009-11-19|4|source_bloomberg',
'CLP|0.00125672|Chilean Peso|||1||6|source_imf',
'CNY|0.0916982|Chinese Yuan||Chinese Yuan Renminbi|0.5||6|source_imf',
'COP|0.000320309|Colombian Peso|||100|2009-11-19|6|source_imf',
'CRC|0.0011232|Costa Rican Colon||Costa Rican Colones|0.01||5|source_yahoo',
'CSD|0.009826|Serbian Dinar|||0.5|2009-11-19|4|source_bloomberg',
'CUC|0.676185|Cuban Convertible Peso|||0.01||6|source_imf',
'CUP|0.626|Cuban Peso|||0.01||3|source_yahoo',
'CVE|0.008452|Cape Verde Escudo|||0.01||4|source_yahoo',
'CYP|1.594|Cypriot Pound|||0.01||4|source_bloomberg',
'CZK|0.0358282|Czech Koruna||Czech Koruny|0.5||6|source_imf',
'DEM|0.474255|German Mark|||0.01||6|source_imf',
'DJF|0.003671|Djiboutian Franc|||10||5|source_yahoo',
'DKK|0.124646|Danish Krone||Danish Kroner|0.25||6|source_imf',
'DOP|0.01732|Dominican Peso|||1||4|source_yahoo',
'DZD|0.0087109|Algerian Dinar|||0.05||5|source_yahoo',
'ECS|2.503e-05|Ecuadorian Sucre|||100|2009-11-15|4|source_bloomberg',
'EEK|0.059532|Estonian Kroon||Estonian Krooni|0.05||5|source_yahoo',
'EGP|0.11472|Egyptian Pound|||0.25||5|source_yahoo',
'ERN|0.04157|Eritrean Nakfa||Eritrean Nakfa|0.01|2009-11-19|4|source_bloomberg',
'ESP|0.00557477|Spanish Peseta|||1||6|source_imf',
'ETB|0.04949|Ethiopian Birr||Ethiopian Birr|0.01||5|source_yahoo',
'EUR|0.927563|Euro|||0.01||6|source_imf',
'FIM|0.156005|Finnish Mark|||1||6|source_imf',
'FJD|0.33151|Fiji Dollar|||0.01||5|source_yahoo',
'FKP|1.036||||0.01||4|source_yahoo',
'FRF|0.141406|French Franc|||0.01||6|source_imf',
'GBP|1.03312|Pound Sterling|Pound Sterling|Pounds Sterling|0.01||6|source_imf',
'GBX|0.0103312|Pence Sterling|Pence Sterling|Pence Sterling|1||6|source_imf',
'GEL|0.3711|Georgian Lari||Georgian Lari|0.01|2009-11-19|4|source_bloomberg',
'GHC|4.341e-05|Old Ghanaian Cedi|||0.1|2009-11-19|4|source_bloomberg',
'GHS|0.4341|Ghanaian Cedi|||0.01|2009-11-19|4|source_bloomberg',
'GIP|1.0358|Gibraltar Pound|||0.01||5|source_yahoo',
'GMD|0.02315|Gambian Dalasi||Gambian Dalasi|0.01||4|source_yahoo',
'GNF|0.00012484|Guinean Franc|||1||5|source_yahoo',
'GRD|0.00272212|Greek Drachma|||0.5||6|source_imf',
'GTQ|0.075602|Guatemalan Quetzal||Guatemalan Quetzales|0.01||5|source_yahoo',
'GYD|0.0030437|Guyanese Dollar|||1||5|source_yahoo',
'HKD|0.0808|Hong Kong Dollar|||0.1||3|source_yahoo',
'HNL|0.033083|Honduran Lempira|||0.01||5|source_yahoo',
'HRK|0.12731|Croatian Kuna||Croatian Kuna|0.01||5|source_yahoo',
'HTG|0.01556|Haitian Gourde|||0.05||4|source_yahoo',
'HUF|0.00346254|Hungarian Forint|||1||6|source_imf',
'IDR|6.53478e-05|Indonesian Rupiah|||25||6|source_imf',
'IEP|1.17776|Irish Pound|||0.01||6|source_imf',
'ILS|0.164287|Israeli New Shekel|||0.01||6|source_imf',
'INR|0.0134413|Indian Rupee|||0.1||6|source_imf',
'IQD|0.00054278|Iraqi Dinar|||500||5|source_yahoo',
'IRR|6.30499e-05|Iranian Rial|||5|2009-11-19|6|source_imf',
'ISK|0.00505896|Icelandic Krona||Icelandic Kronur|1||6|source_imf',
'ITL|0.000479046|Italian Lira||Italian Lire|1||6|source_imf',
'JMD|0.007044|Jamaican Dollar|||0.01|2009-11-19|4|source_yahoo',
'JOD|0.88399|Jordanian Dinar|||0.05||5|source_yahoo',
'JPY|0.00704271|Japanese Yen||Japanese Yen|1||6|source_imf',
'KES|0.008376|Kenyan Shilling|||0.01||4|source_yahoo',
'KGS|0.01422|Kyrgyzstani Som|||1|2009-11-19|4|source_bloomberg',
'KHR|0.00014971|Cambodian Riel|||100||5|source_yahoo',
'KMF|0.0018915|Comorian Franc||Comorians Francs|0.05||5|source_yahoo',
'KPW|0.00069562|North Korean Won||North Korean Won|0.01||5|source_yahoo',
'KRW|0.000541513|Korean Won||Korean Won|1||6|source_imf',
'KWD|2.19414|Kuwaiti Dinar|||0.001||6|source_imf',
'KYD|0.77298|Cayman Islands Dollar|||0.01||5|source_yahoo',
'KZT|0.0042051|Kazakhstani Tenge||Kazakhstani Tenge|1||6|source_imf',
'LAK|7.3728e-05|Lao Kip|||500||5|source_yahoo',
'LBP|0.0004167|Lebanese Pound|||50||5|source_yahoo',
'LKR|0.00547953|Sri Lankan Rupee|||1||6|source_imf',
'LRD|0.009133|Liberian Dollar|||0.05||4|source_yahoo',
'LSL|0.08254|Lesotho Loti||Lesotho Maloti|0.01||4|source_yahoo',
'LTL|0.26854|Lithuanian Litas||Lithuanian Litai|0.01||5|source_yahoo',
'LUF|0.0229937|Luxembourgian Franc|||0.5||6|source_imf',
'LVL|1.3112|Latvian Lats||Latvian Lati|0.01||5|source_yahoo',
'LYD|0.5175|Libyan Dinar|||0.001||6|source_imf',
'MAD|0.082071|Moroccan Dirham|||0.2|2009-11-19|5|source_yahoo',
'MDL|0.05638|Moldovan Leu||Moldovan Lei|0.01||5|source_yahoo',
'MGA|0.0003187|Malagasy Ariary||Malagasy Ariary|1|2009-11-19|4|source_bloomberg',
'MGF|6.374e-05|Malagasy Franc|||50|2009-11-19|4|source_bloomberg',
'MKD|0.01511|Macedonia Denar|||0.5||5|source_yahoo',
'MMK|0.0962|Myanmar Kyat|||50||3|source_yahoo',
'MNT|0.00043707|Mongolian Tugrik|||1||5|source_yahoo',
'MOP|0.078433|Macau Pataca|||0.1||5|source_yahoo',
'MRO|0.0024058|Mauritania Ouguiya|||0.2||5|source_yahoo',
'MTL|2.16064|Maltese Lira||Maltese Liri|0.01||6|source_imf',
'MUR|0.0209922|Mauritian Rupee|||0.01||6|source_imf',
'MVR|0.04891|Maldives Rufiyaa||Maldives Rufiyaa|0.01||4|source_yahoo',
'MWK|0.004363|Malawian Kwacha|||5||5|source_yahoo',
'MXN|0.0479462|Mexican Peso|||0.05|2009-11-19|6|source_imf',
'MXP|4.79462e-05|Old Mexican Peso|||0.01|2009-11-19|6|source_imf',
'MXV|0.1446|Mexican Unidad De Inversion|||1|2009-11-19|4|source_bloomberg',
'MYR|0.18439|Malaysian Ringgit||Malaysian Ringgit|0.01||6|source_imf',
'MZM|2.129e-05|Old Mozambican Metical||Old Mozambican Meticais|1|2009-11-19|4|source_bloomberg',
'MZN|0.02129|New Mozambican Metical||New Mozambican Meticais|1|2009-11-19|4|source_bloomberg',
'NAD|0.082669|Namibian Dollar|||0.05||5|source_yahoo',
'NGN|0.0041532|Nigerian Naira|||1||5|source_yahoo',
'NIO|0.03021|Nicaraguan Cordoba Oro|||0.05||5|source_yahoo',
'NLG|0.42091|Dutch Guilder|||0.5||6|source_imf',
'NOK|0.110097|Norwegian Krone||Norwegian Kroner|0.5||6|source_imf',
'NPR|0.00839722|Nepalese Rupee|||0.05||6|source_imf',
'NZD|0.45774|New Zealand Dollar|||0.10||6|source_imf',
'OMR|1.62834|Omani Rial|||1||6|source_imf',
'PAB|0.623|Panamanian Balboa||Panamanian Balboa|0.01||4|source_yahoo',
'PEN|0.21796|Peruvian Nuevo Sol||Peruvian Nuevos Soles|0.01||5|source_yahoo',
'PGK|0.23986|Papua New Guinea Kina||Papua New Guinea Kina|0.01||5|source_yahoo',
'PHP|0.0133|Philippine Peso|||0.01||5|source_yahoo',
'PKR|0.00749674|Pakistan Rupee||Pakistani Rupees|0.01||6|source_imf',
'PLN|0.224609|Polish Zloty||Polish Zlotych|0.01||6|source_imf',
'PTE|0.00462666|Portuguese Escudo|||0.05||6|source_imf',
'PYG|0.0001299|Paraguay Guarani||Paraguay Guarani|1||5|source_yahoo',
'QAR|0.172005|Qatari Riyal|||1||6|source_imf',
'ROL|2.1751e-05|Old Romanian Leu||Old Romanian Lei|0.01||5|source_yahoo',
'RON|0.21751|Romanian Leu|The Romainian Leu|Romanian Lei|0.01||5|source_yahoo',
'RSD|0.009826|Serbian Dinar|||0.5|2009-11-19|4|source_bloomberg',
'RUB|0.0216977|Russian Ruble|||0.01||6|source_imf',
'RUR|2.16977e-05|Old Russian Ruble|||10||6|source_imf',
'RWF|0.0010975|Rwandan Franc|||1||5|source_yahoo',
'SAR|0.166959|Saudi Arabian Riyal|||1||6|source_imf',
'SBD|0.078359|Solomon Islands Dollar|||0.05||5|source_yahoo',
'SCR|0.05666|Seychelles Rupee|||0.05||4|source_yahoo',
'SDD|0.00262|Sudanese Dinar|||0.01|2009-11-19|4|source_bloomberg',
'SDG|0.262|Sudanese Pound|||0.01|2009-11-19|4|source_bloomberg',
'SDP|0.000262|Sudanese Pound|||0.01|2009-11-19|4|source_bloomberg',
'SDR|1|Special Drawing Right|||0.01||6|source_imf',
'SEK|0.0907058|Swedish Krona||Swedish Kronor|0.01||6|source_imf',
'SGD|0.450624|Singapore Dollar|||0.01||6|source_imf',
'SHP|1.0358|Saint Helena Pound|||0.01||5|source_yahoo',
'SIT|0.00387065|Slovenian Tolar|||0.1||6|source_imf',
'SKK|0.029022|Slovak Koruna||Slovak Koruny|0.5|2009-11-16|5|source_yahoo',
'SLL|0.00015972|Sierra Leonean Leone|||10|2009-11-19|5|source_yahoo',
'SOS|0.00043179|Somali Shilling|||1||5|source_yahoo',
'SRD|0.2272|Suriname Dollar|||0.01|2009-11-19|4|source_bloomberg',
'SRG|0.0002272|Suriname Guilder|||5|2009-11-19|4|source_bloomberg',
'STD|4.0238e-05|Sao Tome Dobra|||0.5||5|source_yahoo',
'SVC|0.0715539|El Salvador Colon||El Salvador Colones|0.05||6|source_imf',
'SYP|0.0136|Syrian Pound|||0.25||4|source_yahoo',
'SZL|0.08264|Swazi Lilangeni||Swazi Emalangeni|0.01||4|source_yahoo',
'THB|0.0188618|Thai Baht||Thai Baht|0.25||6|source_imf',
'THO|0.01879|Thai Offshore Baht||Thai Offshore Baht|0.25|2009-11-19|4|source_bloomberg',
'TJS|0.1434|Tajikistan Somoni||Tajikistan Somoni|0.05|2009-11-19|4|source_bloomberg',
'TMM|4.376e-05|Turkmenistan Manat|||1|2009-11-19|4|source_bloomberg',
'TND|0.4846|Tunisian Dinar|||0.005||4|source_yahoo',
'TOP|0.32838|Tongan Pa\'Anga||Tongan Pa\'Anga|0.01||5|source_yahoo',
'TRL|4.1787e-07|Turkish Lira||Turkish Lire|5000||5|source_yahoo',
'TRY|0.41787|New Turkish Lira||New Turkish Lira|0.01||5|source_yahoo',
'TTD|0.098886|Trinidad and Tobago Dollar|||0.01||6|source_imf',
'TWD|0.019333|New Taiwan Dollar|||1||5|source_yahoo',
'TZS|0.00046776|Tanzanian Shilling|||0.05||5|source_yahoo',
'UAH|0.07725|Ukrainian Hryvnia||Ukrainian Hryvnia|0.01||4|source_yahoo',
'UGX|0.00033392|Uganda Shilling|||50||5|source_yahoo',
'USD|0.626097|United States Dollar|||0.01||6|source_imf',
'UYU|0.03069|Uruguayan peso|||0.1||4|source_yahoo',
'UZS|0.0004139|Uzbekistani Som|||0.01|2009-11-19|4|source_bloomberg',
'VEB|0.000291941|Venezuelan Bolivar||Venezuelan Bolivares|1||6|source_imf',
'VEF|0.291941|Venezuelan Bolivar Fuerte||Venezuelan Bolivares Fuertes|1||6|source_imf',
'VND|3.4977e-05|Viet Nam Dong||Viet Nam Dong|200||5|source_yahoo',
'VUV|0.00657|Vanuatu Vatu||Vanuatu Vatu|1||4|source_yahoo',
'WST|0.2513|Samoa Tala||Samoan Tala|0.05||4|source_yahoo',
'XAF|0.00141406|Central African CFA||Central African CFA|1||6|source_imf',
'XAG|11.56|Ounces of Silver|Ounces of Silver|Ounces of Silver|0.001|2009-11-19|4|source_bloomberg',
'XAL|0.03555|Ounces of Aluminum|Ounces of Aluminum|Ounces of Aluminum|0.01|2009-11-19|4|source_lme',
'XAU|719.54|Ounces of Gold|Ounces of Gold|Ounces of Gold|0.001||5|source_yahoo',
'XCD|0.2394|East Caribbean Dollar|||0.01||4|source_yahoo',
'XCP|0.12|Ounces of Copper|Ounces of Copper|Ounces of Copper|0.01|2009-11-19|4|source_lme',
'XEU|0.927563|European Currency Unit|||0.01||6|source_imf',
'XOF|0.00141406|West African CFA|||1||6|source_imf',
'XPD|231.7|Ounces of Palladium|Ounces of Palladium|Ounces of Palladium|0.001|2009-11-19|4|source_bloomberg',
'XPF|0.00777298|French Pacific Franc|||1||6|source_imf',
'XPT|904.1|Ounces of Platinum|Ounces of Platinum|Ounces of Platinum|0.001|2009-11-19|4|source_bloomberg',
'YER|0.0030467|Yemeni Rial|||0.005||5|source_yahoo',
'YUM|0.4755|Yugoslavian Dinar|||0.5|2009-11-19|4|source_bloomberg',
'ZAR|0.0823812|South African Rand||South African Rand|0.05||6|source_imf',
'ZMK|0.00013407|Zambian Kwacha||Zambian Kwacha|0.01||5|source_yahoo',
'ZRN|6.877e-07|New Zaire|||10|2009-11-19|4|source_bloomberg',
'ZWD|0.0017935|Zimbabwe Dollar|||0.01||5|source_yahoo',
'ZWN|0.0017935|New Zimbabwe Dollar|||0.01||5|source_yahoo',
'');
var lastUpdate='2009-11-20';
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);
