var oldYear = 0;
var oldMonth = 0;
var oldDay = 0;

function setOldDate(year, month, day)
{
  oldYear = year;
  oldMonth = month-1;
  oldDay = day;
}

function writeOldDate()
{
  var months=new Array(13);
  months[1]="stycznia";
  months[2]="lutego";
  months[3]="marca";
  months[4]="kwietnia";
  months[5]="maja";
  months[6]="czerwca";
  months[7]="lipca";
  months[8]="sierpnia";
  months[9]="wrzesnia";
  months[10]="pazdziernika";
  months[11]="listopada";
  months[12]="grudnia";
  var time = new Date(oldYear, oldMonth, oldDay);
  var lmonth=months[time.getMonth() + 1];
  document.write(oldDay + " " + lmonth + " " + oldYear);
}


function daysSince()
{
  var today = new Date();
  var then = new Date(oldYear, oldMonth, oldDay);
   var diff = today.getTime() - then.getTime();
   var mpd = 1000*3600*24;
   var days = Math.round(diff/mpd)
   document.write(days);
}

function yearsSince()
{
  var today = new Date();
  var then = new Date(oldYear, oldMonth, oldDay);
   var diff = today.getTime() - then.getTime();
   var mpy = 1000*3600*24*364;
   var years = Math.round(10*diff/mpy)/10;
   document.write(years);
}



// inline clock distributed by http://www.hypergurl.com
// Permission given to use the script provided that this notice remains as is.
var clockid=new Array()
var clockidoutside=new Array()
var i_clock=-1
var thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
var thistime = hours+":"+minutes+":"+seconds
	
function writeclock() {
	i_clock++
	if (document.all || document.getElementById || document.layers) {
		clockid[i_clock]="clock"+i_clock
		document.write("<span id='"+clockid[i_clock]+"' style='position:relative'>"+thistime+"</span>")
	}
}

function clockon() {
	thistime= new Date()
	hours=thistime.getHours()
	minutes=thistime.getMinutes()
	seconds=thistime.getSeconds()
	if (eval(hours) <10) {hours="0"+hours}
	if (eval(minutes) < 10) {minutes="0"+minutes}
	if (seconds < 10) {seconds="0"+seconds}
	thistime = hours+":"+minutes+":"+seconds
		
	if (document.all) {
		for (i=0;i<=clockid.length-1;i++) {
			var thisclock=eval(clockid[i])
			thisclock.innerHTML=thistime
		}
	}
	
	if (document.getElementById) {
		for (i=0;i<=clockid.length-1;i++) {
			document.getElementById(clockid[i]).innerHTML=thistime
		}
	}
	var timer=setTimeout("clockon()",1000)
}
window.onload=clockon


// public domain from http://www.geocities.com/onodisep
// Get original calender script at http://www.hypergurl.com/easyhtml.html 
// code customized by Jarek 

function dzisiaj()
{
  var months=new Array(13);
  months[1]="stycznia";
  months[2]="lutego";
  months[3]="marca";
  months[4]="kwietnia";
  months[5]="maja";
  months[6]="czerwca";
  months[7]="lipca";
  months[8]="sierpnia";
  months[9]="wrzesnia";
  months[10]="pazdziernika";
  months[11]="listopada";
  months[12]="grudnia";
  var time=new Date();
  var lmonth=months[time.getMonth() + 1];
  var date=time.getDate();
  var year=time.getYear();
  if (year < 2000)
  year = year + 1900;
  document.write(date + " ");
  document.write(lmonth + " " + year);
}


