function getBrowserObject(who) {
	var obj;

	if (document.all) {
		obj = document.all[who];
	} else if (document.getElementById) {
		obj = document.getElementById(who);
	}

	//if (! obj) {
	//	alert("Object not found.");
	//	return;
	//}

	return(obj);
};


function date() {
	seconds++;

	if (seconds == 60) {
		seconds = 0;
		minute++;
	} else {
		seconds = Math.round(seconds);
	}
	if (minute == 60) {
		minute = 0;
		hour++;
	} else {
		minute = Math.round(minute);
	}
	if (hour == 24) {
		hour = 0;
		day++;
	} else {
		hour = Math.round(hour);
	}
	if (day > mouth_array[mouth-1]) {
		day = 1;
		mouth++;
	} else {
		day = Math.round(day);
	}
	if (mouth == 13) {
		mouth = 1;
		year++
	} else {
		mouth = Math.round(mouth);
	}

	if (seconds/10 < 1) seconds = "0" + seconds;
	if (minute/10 < 1) minute = "0" + minute;
	if (hour/10 < 1) hour = "0" + hour;
	if (day/10 < 1) day = "0" + day;
	if (mouth/10 < 1) mouth = "0" + mouth;

	document.d.dtext.value = day + "." + mouth + "." + year + " - " + hour + ":" + minute + ":" + seconds;

	setTimeout("date();",1000);
};


function getFormElement(f, v) {
	if (! f || ! v) {
		return;
	}

	for (var i=0; i<f.elements.length; i++) {
		if (f.elements[i].name == v) {
			return(f.elements[i]);
		}
	}
}


function selectByValue(f, v) {
	if (! f || ! v) {
		return;
	}

	for (var i=0; i<f.options.length; i++) {
		if (f.options[i].value == v) {
			f.options[i].selected = 1;
		}
	}
}


function selectByText(f, v) {
	if (! f || ! v) {
		return;
	}

	for (var i=0; i<f.options.length; i++) {
		if (f.options[i].text == v) {
			f.options[i].selected = 1;
		}
	}
}


function getSelectedValue(f) {
	if (! f) {
		return;
	}

	for (var i=0; i<f.options.length; i++) {
		if (f.options[i].selected == 1) {
			return f.options[i].value;
		}
	}
}


function getSelectedText(f) {
	if (! f) {
		return;
	}

	for (var i=0; i<f.options.length; i++) {
		if (f.options[i].selected == 1) {
			return f.options[i].text;
		}
	}
}
