﻿function _check_txt(str) {
	var s = str;
	s = str_replace(s, ".", "");
	s = str_replace(s, ",", "");

	var reg = /^[_a-zA-Z0-9|ē|ū|ī|ā|š|ģ|ķ|ļ|ž|č|ņ|Ē|Ū|Ī|Ā|Š|Ģ|Ķ|Ļ|Ž|Č|Ņ| |"|'|-]+$/;
	if (reg.test(s)) return true;

	return false;
}

function str_replace(haystack, needle, replacement) {
	var temp = haystack.split(needle);
	return temp.join(replacement);
}