function filldays(){
	month = commform.month.value;
	year = commform.year.value;
	coldays = new Date(year,month,0).getDate();
	for(i=31;i>=1;i--){
		if (i<=coldays)
			if(commform.day.options[i-1] == null) commform.day.options[i-1] = new Option(i); else
			commform.day.options[i-1].text = i;
		else
			commform.day.options[i-1] = null;
	}
}
function isEmpty(str) {
  for (var i = 0; i < str.length; i++)
      if (" " != str.charAt(i))
          return false;
      return true;
}

function checkfields(oForm){
	i=0;
	while(typeof(oForm.elements[i])=='object'){
		if(isEmpty(oForm.elements[i].value)){
			alert('Не заполнено поле "' + oForm.elements[i].title + '"    ');
			return false;
		}
		i++;
	}
	return true;
}

