	function section(href)
	{
		var section = document.getElementById('sectionOpen');
		var sectionLeft = document.getElementById('sectionLeft');
		var sectionRight = document.getElementById('sectionRight');
		var sectionCenter = document.getElementById('sectionCenter');
		var sectionTable = document.getElementById('sectionTable');

		href = parseInt(href);
		if(href == 1)
		{
			sectionLeft.innerHTML = '';
			sectionRight.innerHTML = '';
			section.style.display = 'block';	
			sectionTable.style.display = 'inline';	
		}
		else
		{
			section.style.display = 'none';	
			sectionLeft.innerHTML = '<img src="images/new/sectionLeft.png" width="7" height="20"/>';
			sectionRight.innerHTML = '<img src="images/new/sectionRight.png" width="7" height="20"/>';
			sectionTable.style.display = 'none';
		}	
	}
	
	function enterSite(action)
	{
		var act = parseInt(action);
		if(act == 1)
		{
			document.getElementById('para').style.display = 'block';
			document.getElementById('enterOff').style.display = 'none';
			document.getElementById('loginn').focus();
		}
		else
		{
			document.getElementById('para').style.display = 'none';
			document.getElementById('enterOff').style.display = 'block'	
		}
	}
	
//--------------------------------------------------------------------------------------------	
function dynamicSelect(id1, id2) {

// Сперва необходимо проверить поддержку W3C DOM в браузере

 if (document.getElementById && document.getElementsByTagName) {

// Определение переменных, ссылающихся на списки

  var sel1 = document.getElementById(id1);
  var sel2 = document.getElementById(id2);

// Клонирование динамического списка

  var clone = sel2.cloneNode(true);

// Определение переменных для клонированных элементов списка

  var clonedOptions = clone.getElementsByTagName("option");

// Вызов функции собирающей вызываемый список

  refreshDynamicSelectOptions(sel1, sel2, clonedOptions);

// При изменении выбранного элемента в первом списке: // вызов функции пересобирающей вызываемый список

  sel1.onchange = function() {
  refreshDynamicSelectOptions(sel1, sel2, clonedOptions);
  }
 }
}

function refreshDynamicSelectOptions(sel1, sel2, clonedOptions) {
var value1 = "no";
if(sel1 && sel1.selectedIndex>=0)
	value1 = sel1.options[sel1.selectedIndex].value;
refreshDynamicSelectOptionsEx(value1, sel2, clonedOptions);
}

// Функция для сборки динамического списка

function refreshDynamicSelectOptionsEx(value1, sel2, clonedOptions) {

// Удаление всех элементов динамического списка

 while (sel2.options.length) {
  sel2.remove(0);
 }
 var pattern1 = /( |^)(select)( |$)/;
 var pattern2 = new RegExp("( |^)(" + value1 + ")( |$)");

// Перебор клонированных элементов списка

 for (var i = 0; i < clonedOptions.length; i++) {

// Если название класса клонированного option эквивалентно "select" 
// либо эквивалентно значению option первого списка

  if (clonedOptions[i].className.match(pattern1) ||
  clonedOptions[i].className.match(pattern2)) {

// его нужно клонировать в динамически создаваемый список

   sel2.appendChild(clonedOptions[i].cloneNode(true));
  }
 }
}






//--------------------------------------------------------------------------------------------	
var aHouseValues = new Array(
"12/15,18,123",
"2,4",
"2/8,10/12",
"3",
"2,4,12,5/6,8"
);

function getHouseValuesByStreet(index){
    var sHouseValues = aHouseValues[index];
    return sHouseValues.split(",");
}

function MkHouseValues(index){
    var aCurrHouseValues = getHouseValuesByStreet(index);
    var nCurrHouseValuesCnt = aCurrHouseValues.length;
    
    var oHouseList = document.forms["address"].elements["house"];
    var oHouseListOptionsCnt = oHouseList.options.length;

    oHouseList.length = 0; 
    for (i = 0; i < nCurrHouseValuesCnt; i++){

        if (document.createElement){
            var newHouseListOption = document.createElement("OPTION");
            newHouseListOption.text = aCurrHouseValues[i];
            newHouseListOption.value = aCurrHouseValues[i];
            (oHouseList.options.add) ? oHouseList.options.add(newHouseListOption) : oHouseList.add(newHouseListOption, null);
        }else{
            oHouseList.options[i] = new Option(aCurrHouseValues[i], aCurrHouseValues[i], false, false);
        }
    }
}

//MkHouseValues(document.forms["address"].elements["street"].selectedIndex);
	