/* validator.js */

function palotaiond_validation(formid, tov, color) {
	var elements = tov.split('|');
	var valid = 1;
	for (i=0;i<elements.length;i++) {
		exam = document.getElementById(elements[i]).value;
		if (!exam) {
			valid = 0;
			document.getElementById(elements[i]).style.backgroundColor=color;
			document.getElementById(elements[i]).setAttribute('onkeydown', "this.style.backgroundColor='white'; this.setAttribute('onkeydown', '');");
		} else document.getElementById(elements[i]).style.backgroundColor='white';
	}
	if (!valid) return false;
	//document.getElementById(formid).submit();
}