function typesToCurrenciesChange(sel,selToChange){if(typeof(sel)=='string'){sel=document.getElementById(sel);}
if(sel==null){return;}
var changeSel=document.getElementById(selToChange);if(sel.selectedIndex!=null){var selectedOptionCurrency=sel.options[sel.selectedIndex].className;var isFree=(sel.options[sel.selectedIndex].text.match('FREE')!=null);if(document.getElementById('paymentMethodRow')){if(isFree){document.getElementById('paymentMethodRow').style.display='none';document.getElementById('discountCodeRow').style.display='none';}else{document.getElementById('paymentMethodRow').style.display='';document.getElementById('discountCodeRow').style.display='';}}
while(changeSel.length>0){changeSel.remove(changeSel.length-1);}
for(var i in _typesToCurrencies){for(var j in _typesToCurrencies[i]){if(_typesToCurrencies[i][j]==selectedOptionCurrency){var opt=new Option();opt.value=i;opt.text=_typesToCurrencies[i].name;changeSel.options[changeSel.length]=opt;}}}}}
