function updateDay(change,formName,yearName,monthName,dayName){
 var form=document.forms[formName];
 var yearSelect=form[yearName];
 var monthSelect=form[monthName];
 var daySelect=form[dayName];
 var year=yearSelect[yearSelect.selectedIndex].value;
 var month=monthSelect[monthSelect.selectedIndex].value;
 var day=daySelect[daySelect.selectedIndex].value;
 if (change=='month'||(change=='year'&&month==2)){
	var i=31;
	var flag=true;
	while(flag){
	 var date=new Date(year,month-1,i);
	 if (date.getMonth()==month-1){flag=false;}
	 else{i=i-1;}
	}
	daySelect.length=0;
	daySelect.length=i;
	var j=0;
	while(j<i){
	 daySelect[j]=new Option(j+1,j+1);
	 j=j+1;
	}
	if (day<=i)	{
	 daySelect.selectedIndex=day-1;
	}else{
	 daySelect.selectedIndex=daySelect.length-1;
	}
 }
}
function checkIt(obj){
	if(obj==null) return;
	obj.checked='true';
}
function activate(field,getnum,bgcolor,color) {


if (getnum==1){
	if (bgcolor==null || bgcolor==""){
	  bgcolor= "#ffffbe"
	}
	if (color==null || color==""){
	  color= "darkred"
	}
    field.style.backgroundColor = bgcolor
    field.style.color = color
}
else
{
	if (bgcolor==null || bgcolor==""){
	  bgcolor= "WhiteSmoke"
	}
	if (color==null || color==""){
	  color= "black"
	}    
    field.style.backgroundColor =bgcolor
    field.style.color =color
}
}
