<!--
function checkreq() {
path = document.RegForm;
tmp = (path.name.value == "");
if (!tmp && (path.name.value.length < 3)) tmp = true;
path.Submit.disabled = tmp;
if (tmp) return;
tmp = (path.email.value == "");
if (!tmp && (path.email.value.length < 4)) tmp = true;
path.Submit.disabled = tmp;
}
function check() {
p_name = document.RegForm.name.value.toString();
if(p_name != "") {
if(p_name.length<3 || p_name.length>50) {
alert ("Укажите ваше имя!");
document.RegForm.name.focus();
}
} else {
alert("Необходимо ввести имя!");
document.RegForm.name.focus();
}
p_body2 = document.RegForm.secretcode.value.toString();
if(p_body2.length<4 || p_body2.length>4) {
alert ("Введите 4-х значный код!");
document.RegForm.secretcode.focus();
return false;
}
if(!mailAddressIsValid(document.RegForm.email.value))
{
alert("Ошибка в адресе E-Mail!");
document.RegForm.email.focus();
return false;
}
}
function mailAddressIsValid(mailAddress)
{
var atPresent=false;
var dotPresent=false;
for(var i=0; i < mailAddress.length; i++)
{
var c=mailAddress.substring(i,i+1);
if(c == "@")
atPresent=true;
if(c == ".")
dotPresent=true;
}
if(atPresent == true && dotPresent == true)
return true;
else
return false;
}

//-->
