function printpage(siteURL, pageTitle, theWidth, theHeight) {
  theWidth  = theWidth  == 0 ? 100 : theWidth;
  theHeight = theHeight == 0 ? 100 : theHeight;
  myPopup = window.open(siteURL + '/print/' + pageTitle,'InterviewNotes','width=' + theWidth + ',height=' + theHeight + ',resizable=no,scrollbars=yes,status=no');
}


$(document).ready(function() {
  $('#submitsearch').click(function() {
    
    // HTML, Gotta hide them all ;-) !!!
    $('.age-room-1').hide();
    $('.age-room-1 select').hide();
    $('.age-room-2').hide();
    $('.age-room-2 select').hide();
    $('.age-room-3').hide();
    $('.age-room-3 select').hide();
    
    // Find the room count ... !
    var rooms = $('#rooms').val();
    var room_child_pax = new Array();
    hasChildren = false;
    
    while (rooms > 0)
    {
      room_child_pax[rooms] = $('#room-child-' + rooms).val();
      if (room_child_pax[rooms] > 0) {
        $('.age-room-' + rooms).show();
        while (room_child_pax[rooms] > 0) {
          $('#room-' + rooms + '-child-' + room_child_pax[rooms]).show();
          room_child_pax[rooms]--;
        }
        hasChildren = true;
      }
      rooms--;
    }
    
    if (hasChildren) {
      $('#child-age-selection').fadeIn('slow');
      return false;
    }
  });
  
  $('#getmeback').click(
    function() {
      $('#child-age-selection').fadeOut('slow');
      return false;
    }  
  );
});

$(document).ready(function() {
  $('#1submitsearch').click(function() {
    
    // HTML, Gotta hide them all ;-) !!!
    $('.1age-room-1').hide();
    $('.1age-room-1 select').hide();
    $('.1age-room-2').hide();
    $('.1age-room-2 select').hide();
    $('.1age-room-3').hide();
    $('.1age-room-3 select').hide();
    
    // Find the room count ... !
    var rooms = $('#1rooms').val();
    var room_child_pax = new Array();
    hasChildren = false;
    
    while (rooms > 0)
    {
      room_child_pax[rooms] = $('#1room-child-' + rooms).val();
      if (room_child_pax[rooms] > 0) {
        $('.1age-room-' + rooms).show();
        while (room_child_pax[rooms] > 0) {
          $('#1room-' + rooms + '-child-' + room_child_pax[rooms]).show();
          room_child_pax[rooms]--;
        }
        hasChildren = true;
      }
      rooms--;
    }
    
    if (hasChildren) {
      $('#1child-age-selection').fadeIn('slow');
      return false;
    }
  });
  
  $('#1getmeback').click(
    function() {
      $('#1child-age-selection').fadeOut('slow');
      return false;
    }  
  );
});
