<!--
//--------------------------------------  дата  ----------------------------------
 var now=new Date();
     timerRunning=true;
     mydate=new Date();
     myday=mydate.getDate();
     mymonth=mydate.getMonth();
     myweekday=mydate.getDay();
     year=mydate.getYear();
	 s=""
	 if(myday<10) {s="0"}
 	 s=s+myday+"."
	 if (mymonth<9) {s=s+"0"}
     s=s+(mymonth+1)+"."+year

//----------------------------  время Digital  ------------------------------------

function funClk() {
if (!document.layers && !document.all)
return;
var runTime = new Date()
var hours = runTime.getHours()
var minutes = runTime.getMinutes()
var seconds = runTime.getSeconds()
if (hours < 10){
hours = "0" + hours}
if (minutes < 10){
minutes = "0" + minutes}
if (seconds < 10){
seconds = "0" + seconds}
movingtime = hours + ":" + minutes + ":" + seconds
if (document.layers){
document.layers.clck.document.write(movingtime)}
else if (document.all){
clck.innerHTML = movingtime}
setTimeout("funClk()", 1000)
}
window.onload = funClk;
document.write('<a style=font:11px,verdana>'+s+'<div id=clck style=font-family:arial></div>')


//-----------------------------  календарь  ------------------------------

setCal()
function leapYear(year) {
        if (year % 4 == 0) // basic rule
                return true // is leap year
                return false // is not leap year
}
function getDays(month, year) {
        // create array to hold number of days in each month
        var ar = new Array(12)
        ar[0] = 31 // January
        ar[1] = (leapYear(year)) ? 29 : 28 // February
        ar[2] = 31 // March
        ar[3] = 30 // April
        ar[4] = 31 // May
        ar[5] = 30 // June
        ar[6] = 31 // July
        ar[7] = 31 // August
        ar[8] = 30 // September
        ar[9] = 31 // October
        ar[10] = 30 // November
        ar[11] = 31 // December
        // return number of days in the specified month (parameter)
        return ar[month]
}
function getMonthName(month) {
        // create array to hold name of each month
        var ar = new Array(12)
        ar[0] = "январь"
        ar[1] = "февраль"
        ar[2] = "март"
        ar[3] = "апрель"
        ar[4] = "май"
        ar[5] = "июнь"
        ar[6] = "июль"
        ar[7] = "август"
        ar[8] = "сентябрь"
        ar[9] = "октябрь"
        ar[10] = "ноябрь"
        ar[11] = "декабрь"
        // return name of specified month (parameter)
        return ar[month]
}
function setCal() {
        // standard time attributes
        var now = new Date()
        var year = now.getYear()
        var month = now.getMonth()
        var monthName = getMonthName(month)
        var date = now.getDate()
        now = null
        // create instance of first day of month, and extract the day on which it occurs
        var firstDayInstance = new Date(year, month, 1)
        var firstDay = firstDayInstance.getDay()
        firstDayInstance = null
        // number of days in current month
        var days = getDays(month, year)
        // call function to draw calendar
        drawCal(firstDay + 7, days, date, monthName, 0 + year)
}
function drawCal(firstDay, lastDate, date, monthName, year) {
        // constant table settings
        var headerHeight = 10 // height of the table's header cell
        var border = 0 // 3D height of table's border
        var cellspacing = 0 // width of table's border
       // var headerColor = "#000080" // color of table's header
       // var headerSize = 2 // size of tables header font
        var colWidth = 10 // width of columns in table
        var dayCellHeight = 10 // height of cells containing days of the week
        var dayColor = "#000080" // color of font representing week days
        var cellHeight = 10 // height of cells representing dates in the calendar
        var todayColor = "font:9px,arial;color:#ff0000"//"#FF0000" // color specifying today's date in the calendar
        var timeColor = "#000080" // color of font representing current time
        // create basic table structure
        var text = "" // initialize accumulative variable to empty string
        text += '<table style=position:relative;top:80;left:-2 cellpadding=1 rules=cols border=' + border + ' cellspacing=' + cellspacing + '>' // table settings
        text +=         '<tr><td colspan=7 align=center height=' + headerHeight + '>' // create table header cell
        text +=                 '<font style=font:13px>'
		text +=		monthName + ' ' + year
		text += '</font>' // close table header's font settings
        text +=         '</td></tr>' // close header cell
        // variables to hold constant settings
        var openCol = '<td width=' + colWidth + ' height=' + dayCellHeight + '>'
        var closeCol = '</font></td>'
        // create array of abbreviated day names
        var weekDay = new Array(7)
        weekDay[0] = "пн"
        weekDay[1] = "вт"
        weekDay[2] = "ср"
        weekDay[3] = "чт"
        weekDay[4] = "пт"
        weekDay[5] = "сб"
        weekDay[6] = "вс"        
        // create first row of table to set column width and specify week day
        text += '<tr align="right" valign="center" style="font: 10px arial">'
        for (var dayNum = 0; dayNum < 7; ++dayNum) {
                text += openCol + weekDay[dayNum] + closeCol 
        }
        text += '</tr>'     
        // declaration and initialization of two variables to help with tables
        var digit = 1
        var curCell = 1
        for (var row = 1; row <= Math.ceil((lastDate + firstDay - 1) / 7); ++row) {
                text += '<tr align="right" valign="top">'
                for (var col = 1; col <= 7; ++col) {
                        if (digit > lastDate)
                                break
                        if (curCell < firstDay) {
                                text += '<td></td>'
                                curCell++
                        } else {
                                if (digit == date) { // current cell represent today's date
                                        text += '<td bgcolor=#FFD5D5 height=' + cellHeight + '>'
                                        text += '<div style="' + todayColor + '">'
										//size="-3" face="MS Sans Serif">'
                                        text += digit
                                        text += '</div>'
                                        text += '</td>'
                                } else
                                        text += '<td height=' + cellHeight + '><font style=font:9px,arial>' + digit + '</font></td>'
                                digit++
                        }
                }
                text += '</tr>'
        }
        // close all basic table tags
        text += '</table>'
        // print accumulative HTML string
        document.write(text) 
	}
//-->
