
	function date(){
		var d = new Date();
		var monthname = new Array("1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", "9.", "10.", "11.", "12.");
		return " " + d.getFullYear() + ". " + monthname[d.getMonth()] + " " + d.getDate() + ".";
	}

	function docWrite(id, txt){
		var obj = $(id);
		if(obj){
			obj.innerHTML = txt;
		}
	}

	function onFocus(){
		var i, j, e, a = document.forms;
		if(a.length > 0){
			i = 0;
			while(i < a.length){
				j = 0;
				e = a[i].elements;
				while(j < e.length){
					if(e[j].type == "text" || e[j].type == "password"){
						if(e[j].value == ""){
							e[j].focus();
							return;
						}
					}
					j++;
				}
				i++;
			}
		}
	}

	Event.observe(window, 'load', function(){ 
		docWrite("datum", date());
		onFocus();
	});
