function showPlaces(thisID, showID, iTypeNum){
  ChBox = document.getElementById(thisID);
  if (!ChBox.checked){
    document.getElementById('tr'+showID).style.display = "none";
    }
  else {		
    document.getElementById('tr'+showID).style.display = "block";		
    }
 }

function showChildBlock(iRootId, iTypeNum, iNumId){
	//alert('checked');
  ChBoxChild = document.getElementById('chIsChild_'+iRootId+'_'+iTypeNum+'_'+iNumId);
  if (!ChBoxChild.checked){
    document.getElementById('divChild_'+iRootId+'_'+iTypeNum+'_'+iNumId).style.display = "none";
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'to3').value=0;
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from4to7').value=0;
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from8to12').value=0;
		
		Calc(iRootId, iTypeNum, 0, iNumId, 0, 'child'+iRootId+'_'+iTypeNum+'_'+iNumId+'to3', 1);
		Calc(iRootId, iTypeNum, 0, iNumId, 0, 'child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from4to7', 1);
		Calc(iRootId, iTypeNum, 0, iNumId, 0, 'child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from8to12', 1);
  }
  else {
    document.getElementById('divChild_'+iRootId+'_'+iTypeNum+'_'+iNumId).style.display = "block";
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'to3').value=0;
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from4to7').value=0;
		document.getElementById('child'+iRootId+'_'+iTypeNum+'_'+iNumId+'from8to12').value=0;		
    }
}	

function changeTime(iSel, id){
	indSel = document.getElementById(id).selectedIndex;
	if (iSel == 1){
		document.getElementById('sEndTime').selectedIndex = indSel;
		}
	else {
		document.getElementById('sStartTime').selectedIndex = indSel;
		}
}

function ShowDetail(iRoomId, stat){
  if (stat){
    document.getElementById('divDetail_'+iRoomId).style.display="block";
    if (getV('cntNum_'+iRoomId) == 0)
      setHtml('divDetail_'+iRoomId,'');
    }
  else {
    document.getElementById('divDetail_'+iRoomId).style.display="none";
  }
}

function GetNumberByDate(){
  sUrl = '';
  sDate = getV('sStartDate');
  eDate = getV('sEndDate');
  sTime = getV('sStartTime');
  eTime = getV('sEndTime');
        
  eTime = eTime.substr(3,5);
  
  nomer = getV('nomer');
  if (nomer.length != 0)
    sUrl += '/bron2/?from='+sDate+'&to='+eDate+'&sTime='+sTime+'&eTime='+eTime+'&nomer='+nomer;
  else
    sUrl += '/bron2/?from='+sDate+'&to='+eDate+'&sTime='+sTime+'&eTime='+eTime;
  location.href = sUrl;
}
function GetNumberByDate2(){
  sUrl = '';
  sDate = getV('sStartDate');
  eDate = getV('sEndDate');
  sUrl += '/plan2/?from='+sDate+'&to='+eDate;
  location.href = sUrl;
}

function GetCntDay(from, to){
  return 0;
}
