function showMinutes(cardid) {
	prices = document.getElementById('prices-' + cardid);
	local = document.getElementById('minutes-' + cardid + '-3');
	toll = document.getElementById('minutes-' + cardid + '-2');
	pay = document.getElementById('minutes-' + cardid + '-5');
	pc = document.getElementById('minutes-' + cardid + '-10');
	if (null != local && prices.value != ''){
		local.innerHTML = minutesMap[cardid][prices.value][3];
	}
	if (null != toll && prices.value != ''){
		toll.innerHTML = minutesMap[cardid][prices.value][2];
	}
	if (null != pay && prices.value != ''){
		pay.innerHTML = minutesMap[cardid][prices.value][5];
	}
	if (null != pc && prices.value != ''){
		pc.innerHTML = minutesMap[cardid][prices.value][10];
	}
}

function showPrice(cardid) {
	prices = document.getElementById('prices-' + cardid);
	price = document.getElementById('price-' + cardid);
	if (null != price && prices.value != ''){
		price.innerHTML = priceMap[cardid][prices.value];
	}
}

function insertMobile(idTo, countryID, nameRegion){
	select = document.getElementById('direction_to');
	country_option = null;
	country_index = 0;
	for (i=0; i<select.options.length; i++) {
		if (select.options[i].value == countryID) {
			country_option = select.options[i];
			country_index = i;
			// do not break, just in case we are in top-rates;
		}
	}
	selected_option = document.createElement('option');
	selected_option.value = idTo;
	selected_option.text = nameRegion;
	selected_option.selected = true;
	try {
		document.getElementById('direction_to').add(selected_option, country_option);
	} catch(e) {
		if (country_index != null) {
			document.getElementById('direction_to').add(selected_option, country_index);
			select.selectedIndex = country_index;
		} else {
			document.getElementById('direction_to').add(selected_option);
		}
	}
}

function showHide(id){
	if(document.getElementById(id).className == "hide"){
		document.getElementById(id).className = "show";
	} else {
		document.getElementById(id).className = "hide";
	}
}