function Page0() {
	this.id = "page0";
	this.firstName = $("page0-first-name");
	this.lastName = $("page0-last-name");
	this.phoneNumber = $("page0-phone-number");
	
	Page0.prototype.validate = function() {
		this.firstName.className = this.lastName.className = this.phoneNumber.className = null;
		if (this.firstName.value == null || this.firstName.value == "") {
			this.firstName.className = "invalid";
			Error.show("Jméno nesmí být prázdné.");
			return false;
		}
		if (this.lastName.value == null || this.lastName.value == "") {
			this.lastName.className = "invalid";
			Error.show("Přijmení nesmí být prázdné.");
			return false;
		}
		if (this.phoneNumber.value == null || this.phoneNumber.value == "") {
			this.phoneNumber.className = "invalid";
			Error.show("Telefonní číslo nesmí být prázdné.");
			return false;
		}
		return true;
	};
	
	Page0.prototype.enter = function() {
		$(this.id).style.visibility = "visible";
		// hint handling
		var anchors = document.getElementsByTagName("A");
		for (var i = 0; i < anchors.length; i++) {
			var a = anchors[i];
			if (a.getAttribute("hint") != null) {
				a.onmouseover = delegate(this, Hint2.show, a.getAttribute("hint"));
				a.onmouseout = delegate(this,  Hint2.hide, null);
				a.onmousemove = delegate(this,  Hint2.update, null);
			}
		}
	};

	Page0.prototype.leave = function() {
		$(this.id).style.visibility = "hidden";
	};

}

