/* */

window.dates_selectsjso = {

 daychanger: function(so) {
  var mso = so.form[so.name.replace(/_day$/,'')+'_mon'];
  var yso = so.form[so.name.replace(/_day$/,'')+'_year'];

  var month = null;
  var year = null;

  if ( mso ) month = mso.value;
  if ( yso ) year  = yso.value;

  if ( month && year ) {
   var date = new Date();
   var mydate = new Date();
   mydate.setDate(1);
   mydate.setMonth(parseInt(month-1));
   mydate.setFullYear(year);
   if (window.datejso) {
		if ( so.value > window.datejso.getDaysInMonth(mydate) ) {
			so.selectedIndex = parseInt(window.datejso.getDaysInMonth(mydate)-1);
		}
	}
  }

 },

 monthchanger: function(so) {
  var dso = so.form[so.name.replace(/_mon$/,'')+'_day'];
  this.daychanger(dso);
 },

 yearchanger: function(so) {
  var dso = so.form[so.name.replace(/_year$/,'')+'_day'];
  this.daychanger(dso);
 }

}
