function ert_ell(_val, _type, _length1, _length2) {
	switch (_type.toLowerCase()) {
		case "emailcim":
				var kukac = _val.indexOf('@');
				if (kukac < 1) return false;
				if (_val.length < kukac+3) return false;
				var vege = _val.substr(kukac+1);
				var vanbenne = false;
				if (kukac+1 == _val.length) return false;
				for (i=kukac+1;i<_val.length;i++)
					if (_val.charAt(i) == '.')
						vanbenne = i;
				if (!vanbenne) return false;
				if (_val.length-vanbenne < 3) return false;
				return true;
			break;
	}
}

function ell(miben,szoveg) {
	if (miben.value == '') {
		miben.focus();
		alert(szoveg);
		return false;
	}
	return true;
}

function ell2(bool,miben,szoveg) {
  if (bool == false) {
    miben.focus();
    alert(szoveg);
    return false;
  }
  return true;
}

function openwin(u,w,h){
 scrll="no";
 if (screen.width<w) {w=screen.width-25; h+=20; scrll="yes";}
 if (screen.height<h) {h=screen.height-75; w+=20; scrll="yes";}
 wprop="toolbar=no,location=no,directories=no,status=no,scrollbars="+scrll+",resizable=no,width="+w+",height="+h;
 wdef=window.open("","_blank",wprop);
 wdef.document.write("<html>");
 wdef.document.write("<head>");
 wdef.document.write("<title>Töréshatár!</title>");
 wdef.document.write("</head>");
 wdef.document.write("<body bgcolor=#ffffff marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>");
 wdef.document.write('<A HREF="javascript:window.close();"><img src="'+u+'" border=0 ALT="Kattints a képre a bezáráshoz!"></A>');
 wdef.document.write("</body>");
 wdef.document.write("</html>");
}


