// Отключение и включение радиокнопок в броне
function zapret(checking, val1, val2)
{
if(document.getElementById('checkbox' + checking).checked)
	{
		document.getElementById('radio' + val1).disabled = 0;
		document.getElementById('radio' + val2).disabled = 0;
	}
else
	{
		document.getElementById('radio' + val1).disabled = 1;
		document.getElementById('radio' + val2).disabled = 1;	
	}
}

//выхват значений из value option и подстановка в тайтл, отображение других дивов.
function func(value, maxcount)
{



//Выдираем id из value для хайда.
var str = value.substr(0,2);
var transInfo = document.getElementById('transInfo');
//обрезаем пробелы и прочий мусор справа, для обрезания слева ltrim
if ('undefined' == typeof String.prototype.rtrim) {
  String.prototype.rtrim = function() {
    return this.replace(/\s+$/, '');
  }
}
var string = str.rtrim();

//перетираем дивы отличные от id текущей таблицы.
for(i=1; i <= maxcount; i++)
{
	if(i!=string)
		{
			document.getElementById('table_prc_' + i).style.display = "none";
		}
}
if(string!=45)
{
	document.getElementById('table_prc_' + string).style.display = "";
	transInfo.style.display = "";
}
else transInfo.style.display = "none";

//Меняем тайтл по onChange
var substr = value.substr(2);
document.title = "Забронировать " + substr + " - Магазин Отдыха";

clearRadio(maxcount);
}

//полное вырубление чекбоксов и радио при выборе другого отеля на onChange()
function clearRadio(maxcount)
{
	for(i=0; i<=maxcount*6; i++ )
		{
			if(document.getElementById('radio' + i))
			{
				document.getElementById('radio' + i).disabled = 1;
			}
			if(document.getElementById('checkbox' + i))
			{
				document.getElementById('checkbox' + i).checked = 0;
			}
		}
}

