function isNumeric(elem){
	var numericExpression = /^[0-9]+$/;
	if(elem.value.match(numericExpression)){
		return true;
	}else{
		return false;
	}
}

function emailValidator(elem){
	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(elem.value.match(emailExp)){
		return true;
	}else{
		return false;
	}
}

function check_form(obj){
  if (emailValidator(obj.em)) return true;
  if (isNumeric(obj.te)) return true;
  alert("E-mail vagy telefonszám megadása kötelező"); 
  return false;
}



function popup(obj) {
	var ns = (navigator.appName=="Netscape")?true:false;
	src=obj.src.replace("kicsi","nagy");
	OpenWindow=window.open("", "_blank", "toolbar=no,width=640,height=480,scrollbars=0,resizable=no,menubar=no");
	OpenWindow.document.write("<html>\n<head>\n<TITLE>Popup</TITLE>\n");
	OpenWindow.document.write("<script type='text/javascript'>\n");
	OpenWindow.document.write("function resize(){\n");
	OpenWindow.document.write("window.resizeTo(document.getElementById('pic').width , document.getElementById('pic').height + 50 );\n");
	OpenWindow.document.write("window.resizeBy( 30,  30);\n");
	OpenWindow.document.write("window.resizeBy(-30, -30);\n");
	OpenWindow.document.write("}\n ");
	OpenWindow.document.write("</script>\n</head>\n");
	OpenWindow.document.write("<BODY  style='margin: 0 0 0 0;cursor: hand;'>\n");
	OpenWindow.document.write("<img onload='resize();' style='margin: 0 0 0 0;cursor: hand;' onclick='window.close();' border='0' id='pic' name='pic' src='"+src+"'>\n");
	OpenWindow.document.write("<script type='text/javascript'>\n resize();\n</script>");
	OpenWindow.document.write("</BODY>\n");
	OpenWindow.document.write("</HTML>\n");
	OpenWindow.document.close();
}

function im(a){
	var b = ".hu";
	document.write(' <a href="mailto:' + a + '@' + b + '">' + a + '@' + b + '</a>');
}


