        function getSummary(){
		if ( document.calendar.day.value == "" ||
		     document.calendar.day.value == " " ||
		     document.calendar.day.value == "  " )
		{
	                document.calendar.fileName.value = 
                        document.calendar.FileNameTemplate.value + 
                        document.calendar.object.value + 
                        document.calendar.year.value + "/" +
                        document.calendar.month.value + '.shtml';

        	        document.calendar.date.value = document.calendar.month.value + '.' +
                                                document.calendar.year.value
		}
		else
		{
	                document.calendar.fileName.value = 
                        document.calendar.FileNameTemplate.value + 
                        document.calendar.object.value +
                        document.calendar.year.value + "/" +
                        document.calendar.month.value + "/" +
                        (new Number(document.calendar.day.value)<10?"0":"") + 
                        (new Number(document.calendar.day.value)).toString() + '.shtml';

        	        document.calendar.date.value = document.calendar.day.value + '.' +
                                                document.calendar.month.value + '.' +
                                                document.calendar.year.value
		}
        }


        function getNewRange(){
                getSummary();
                return ScheduleValidate();
        }
        
        function ScheduleValidate()
        {       
                if( Valid_Date(document.calendar.date.value ) == false )
                {
                        alert( "Недопустимая дата: " + document.calendar.date.value );
                        return false;
                }

                return true;
        }


        function Valid_Date(datein){
        
                var indate=datein;
                var rc = true;

                var sdate = indate.split(".")

                if(  document.calendar.dayRequired.value == "yes"  || document.calendar.day.value != ""  &&    document.calendar.day.value != " " &&
		     document.calendar.day.value != "  ")
                {
		                var chkDate=new Date(Date.parse(sdate[1]+"/"+sdate[0]+"/"+sdate[2]));
		                var cmpDate=(chkDate.getMonth()+1)+"/"+(chkDate.getDate())+"/"+(chkDate.getFullYear())
		                var indate2=(Math.abs(sdate[1]))+"/"+(Math.abs(sdate[0]))+"/"+(Math.abs(sdate[2]))
        
		                if ( indate2 != cmpDate )
		                {
        		                rc = false;
		                }
                }
                return (rc);
        }
