function set_clock() {
	 var dNow = new Date();
	 return setLeadingZero(dNow.getHours()) + ":" + setLeadingZero(dNow.getMinutes());
	 //return setLeadingZero(dNow.getHours()) + ":" + setLeadingZero(dNow.getMinutes()) + ":" + setLeadingZero(dNow.getSeconds());
}

function setLeadingZero(i) {
 return (i<10) ? "0"+i : i;
}

function show_clock(id_element) {
	document.getElementById(id_element).innerHTML = set_clock();
	setTimeout("show_clock('" + id_element + "')", 1000);
}


function get_date(nr) {
	var dNow = new Date();
	var milisec = dNow.getTime();
	milisec += nr*24*60*60*1000;
	dNow.setTime(milisec);
	this.day = setLeadingZero(dNow.getDate());
	this.month = setLeadingZero(dNow.getMonth() + 1);
	
	
	
	
	
	var ua, s, i;

  this.isIE    = false;
  this.isNS    = false;
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
   // return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    //return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    //return;
  }
  
  if(this.isIE) {
		this.year = dNow.getYear();
	}
	else {
		this.year = 1900 + dNow.getYear();
	}
}

