function check_eml(ob) {
	num = 11;
	arr = new Array(" yndex jandex yandeks yadex ayndex ",
		" rumbler rembler ramler ramble ramdler ranbler rambier rabler rambbler rambel ",
		" mai meil mal male maul mil maill maile mali nail ",
		" hotmai hotmal homail hotmeil hatmail hotmil hotmale hotmaile hotmaol hotamil hoymail hotmial notmail kotmail ", 
		" yhoo yohoo yaho jahoo yahho yahooo yaxoo ayhoo yachoo ",
		" indox ",
		" sityline citiline ",
		" pochtamp pochtampt poctamt pochamt ",
		" notbox netbox ",
		" fremail ",
		" mty-net ");
	tr = new Array("yandex", "rambler", "mail", "hotmail", "yahoo", "inbox", "cityline", "pochtamt", "hotbox", "freemail", "mtu-net");

	str = ob.value;
	b = str.indexOf("@", 0);
	if (b == -1) {
		alert ("Wrong email.");
		return false;
	}
	b++;
	e = str.indexOf (".", b);
	if ((e == -1)||(e < b+1)) {
		alert ("Wrong email.");
		return false;
	}

	serv = str.substring(b, e);
	ex_serv = " "+serv+" ";
	for (i=0; i<num; i++) {
		s = arr[i];
		if (s.indexOf (ex_serv, 0) != -1) {
			cor = str.substring(0, b)+tr[i]+str.substring(e, str.length);
			if (confirm ("Email "+str+" is incorect! Change to "+cor+" ?"))
				ob.value=cor;
				return 1;
		}
	}
}

function check_form()
{
 aa=true;
 if(check_eml(document.forms[0].to_email)==0)
 { aa=false; }
 if(check_eml(document.forms[0].from_email)==0)
 { aa=false; }
 return aa;
}

