function openpopup()
{window.open("/img/kepeslap.jpg", "open", "width=400,height=670,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");}

function chktel(buf)
{
  	var re = new RegExp('^[0-9 ()-\\/]+$');
  	if ((buf.match(re)) && (buf.length>=7)) return true; else return false;
}

function trim(e) {return e.replace(/(^\s*)|(\s*$)/g, "");}

function isemptystr(e)
{
  if (trim(e)=='') return true; else return false;
}

function minmaxstr(e,smin,smax)
{
  var l = trim(e);
  if ((l.length<smin) || (l.length>smax)) return false; else return true;
}

function isnumeric(e)
{
  if ((trim(e)!='') && (isNaN(trim(e))==false)) return true; else return false;
}

function isnumbers(buf)
{
	buf = trim(buf);
	if (buf=='') return false;
  	var re = new RegExp('^[0-9]+$');
  	if (buf.match(re)) return true; else return false;
}

function isdate(buf)
{
	buf = trim(buf);
	if (buf=='') return true;
  	var re = new RegExp('^[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');
  	if (!buf.match(re)) return false;
	var ayear  = buf.substr(0,4);
	var amonth = buf.substr(5,2)-1;
	var aday   = buf.substr(8,2);
	var d = new Date(ayear,amonth,aday);
	if ( d.getYear()!=ayear) return false;
	if ( d.getMonth()!=amonth) return false;
	if ( d.getDate()!=aday) return false;
	return true;
}

function ncheckEmail(a) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(a)){
		return (true)
	}		
	return (false)
}

function submithirlev()
{
	theform  = eval('window.document.hirlev');

	if (isemptystr(theform.nev.value)) {alert(err_empty);theform.nev.focus();return;}
	if (!ncheckEmail(theform.email.value)) {alert(err_email);theform.email.focus();return;}	
				
	theform.submit();
}
