function onDateChange(id)
{
  var date = document.getElementById(id)
  var dayMenu = document.getElementById(id + "_day")
  var monthMenu = document.getElementById(id + "_month")
  var yearMenu = document.getElementById(id + "_year")
  var hourMenu = document.getElementById(id + "_hour")
  var minuteMenu = document.getElementById(id + "_minutes")
  var secondMenu = document.getElementById(id + "_seconds")
  var ampmMenu = document.getElementById(id + "_ampm")
  var dateInfo = cal_prs_date2 (date.value);
  var timeInfo = cal_prs_time2 (date.value);
  var day = (dateInfo.getDate() < 10 ? '0' : '') + dateInfo.getDate();
  var month = (dateInfo.getMonth() < 9 ? '0' : '') + (dateInfo.getMonth() + 1);
  var year = dateInfo.getFullYear();
  var hour = timeInfo.getHours();
  var minute = timeInfo.getMinutes();
  var second = timeInfo.getSeconds();
//  var ampm = ;
  swapSelected(dayMenu, day);
  swapSelected(monthMenu, month);
  swapSelected(yearMenu, year);
  swapSelected(hourMenu, hour);
  swapSelected(minuteMenu, minute);
  swapSelected(secondMenu, second);
//  swapSelected(ampmMenu, ampm);
}
// todo: need to only set the selections that are rendered
need to only set the selections that are rendered
need to only set the selections that are rendered
function onDateChange(id)
{
  var date = document.getElementById(id)
  var dayMenu = document.getElementById(id + "_day")
  var monthMenu = document.getElementById(id + "_month")
  var yearMenu = document.getElementById(id + "_year")
  var hourMenu = document.getElementById(id + "_hour")
  var minuteMenu = document.getElementById(id + "_minutes")
  var secondMenu = document.getElementById(id + "_seconds")
  var ampmMenu = document.getElementById(id + "_ampm")
  var dateInfo = cal_prs_date2 (date.value);
  var timeInfo = cal_prs_time2 (date.value);
  var day = (dateInfo.getDate() < 10 ? '0' : '') + dateInfo.getDate();
  var month = (dateInfo.getMonth() < 9 ? '0' : '') + (dateInfo.getMonth() + 1);
  var year = dateInfo.getFullYear();
  var hour = timeInfo.getHours();
  var minute = timeInfo.getMinutes();
  var second = timeInfo.getSeconds();
  swapSelected(dayMenu, day);
  swapSelected(monthMenu, month);
  swapSelected(yearMenu, year);
  swapSelected(hourMenu, hour);
  swapSelected(minuteMenu, minute);
  swapSelected(secondMenu, second);
}
function onDateChange ( id ) { var date = document . getElementById ( id ) var dayMenu = document . getElementById ( id + "_day" ) var monthMenu = document . getElementById ( id + "_month" ) var yearMenu = document . getElementById ( id + "_year" ) var hourMenu = document . getElementById ( id + "_hour" ) var minuteMenu = document . getElementById ( id + "_minutes" ) var secondMenu = document . getElementById ( id + "_seconds" ) var ampmMenu = document . getElementById ( id + "_ampm" ) var dateInfo = cal_prs_date2 ( date . value ) ; var timeInfo = cal_prs_time2 ( date . value ) ; var day = ( dateInfo . getDate ( ) < 10 ? '0' : '' ) + dateInfo . getDate ( ) ; var month = ( dateInfo . getMonth ( ) < 9 ? '0' : '' ) + ( dateInfo . getMonth ( ) + 1 ) ; var year = dateInfo . getFullYear ( ) ; var hour = timeInfo . getHours ( ) ; var minute = timeInfo . getMinutes ( ) ; var second = timeInfo . getSeconds ( ) ; swapSelected ( dayMenu , day ) ; swapSelected ( monthMenu , month ) ; swapSelected ( yearMenu , year ) ; swapSelected ( hourMenu , hour ) ; swapSelected ( minuteMenu , minute ) ; swapSelected ( secondMenu , second ) ; }
todo: need to only set the selections that are rendered
todo : need to only set the selections that are rendered
//  var ampm = ; //  swapSelected(ampmMenu, ampm);