// Date monitor
var 
month = new Array();
month[0]="Января";	
month[1]="Февраля";
month[2]="Марта";
month[3]="Апреля";
month[4]="Мая";
month[5]="Июня";
month[6]="Июля";
month[7]="Августа";
month[8]="Сентября";
month[9]="Октября";
month[10]="Ноября";
month[11]="Декабря";

var 
day = new Array();
day[0]="Вс";
day[1]="Пн";
day[2]="Вт";
day[3]="Ср";
day[4]="Чт";
day[5]="Пт";
day[6]="Сб";

today = new Date();
date = today.getDate();
day = (day[today.getDay()]);
month = (month[today.getMonth()]);
year = (today.getFullYear());

 suffix = "ое"

function print_date()
{
  document.write(day + "," + "&nbsp;" + date  + "<sup>" + suffix + "</sup>" + "&nbsp;" + 
  month);
}

// Picture refresh
var refresh = 7; // Refresh timeout in seconds.
var increment = 1;
var period = refresh;
function rpic() {
     period = period - 1;
      if (period < 0) {
        if (document.images) {
	        if (document.wwimage) {document.wwimage.src = "http://cast.belcom.net.ua/cam_1.jpg?"+increment;}
          	if (document.wwimage2) {document.wwimage2.src = "http://cast.belcom.net.ua/cam_2.jpg?"+increment;}
		  period = refresh;
		  increment++;
		  }
        else {
          window.location.reload();
		  }
       }
       setTimeout("rpic()", 1000);
}
// -->

function sivamtime() {
  now=new Date();
  hour=now.getHours();
  min=now.getMinutes();
  sec=now.getSeconds();

if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }
//if (hour>12) { hour=hour-12; add="pm"; }
//else { hour=hour; add="am"; }
//if (hour==12) { add="pm"; }

document.timeForm.field.value = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec;

setTimeout("sivamtime()", 1000);
}
