﻿
<!--
function Form1_Validator(theForm)
{

var alertsay = ""; // define for long lines


// check to see if the field is blank
if (theForm.name.value == "")
{
alert("لطفا نام خود را وارد نماييد");
theForm.name.focus();
return (false);
}

// require at least 3 characters be entered
//if (theForm.name.value.length < 3)
//{
//alert(".áØÝÇ äÇã ÎæÏ ÑÇ Èå ØæÑ ÕÍíÍ æÇÑÏ ßäíÏ");
//theForm.name.focus();
//return (false);
//}


if (theForm.namekh.value == "")
{
alert("لطفا نام خانوادگی خود را وارد نماييد");
theForm.namekh.focus();
return (false);
}


//if (theForm.email.value == "" || theForm.email.value == "@." || theForm.email.value<7)
//{
//alert(".áØÝÇ Çíãíá ÎæÏ ÑÇ æÇÑÏ ßäíÏ");
//theForm.email.focus();
//return (false);
//}

if (theForm.namepedar.value == "")
{
alert("	لطفا نام پدر را وارد نماييد ");
theForm.namepedar.focus();
return (false);
}

if (theForm.shenasnameh.value == "")
{
alert("لطفا شماره شناسنامه را وارد نماييد");
theForm.shenasnameh.focus();
return (false);
}


if (theForm.age.value == "")
{
alert("لطفا سن خود را وارد نماييد");
theForm.age.focus();
return (false);
}

if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value))
{}
else
 {
 alert("لطفا ايميل را بطور صحيح وارد نماييد")
 theForm.email.focus()
 return (false);
 }

 
//if (theForm.city.selectedIndex < 0)
//{
//alert(".áØÝÇ ÇÓÊÇä ÎæÏ ÑÇ ãÔÎÕ ßäíÏ");
//theForm.city.focus();
//return (false);
//}


//if (theForm.city.selectedIndex == 0)
//{
//alert(".áØÝÇ ÇÓÊÇä ÎæÏ ÑÇ ãÔÎÕ ßäíÏ");
//theForm.city.focus();
//return (false);
//}

//if (theForm.tahsilat.selectedIndex < 0)
//{
//alert(".áØÝÇ ãíÒÇä ÊÍÕíáÇÊ ÑÇ ãÔÎÕ äãÇííÏ");
//theForm.tahsilat.focus();
//return (false);
//}

// check if the first drop down is selected, if so, invalid selection
//if (theForm.tahsilat.selectedIndex == 0)
//{
//alert(".áØÝÇ ãíÒÇä ÊÍÕíáÇÊ ÑÇ ãÔÎÕ äãÇííÏ");
//theForm.tahsilat.focus();
//return (false);
//}

if (theForm.birthday.selectedIndex == 0)
{
alert("لطفا ميزان تحصيلات را مشخص نماييد");
theForm.birthday.focus();
return (false);
}

if (theForm.tahsilat.selectedIndex == 0)
{
alert("لطفا ميزان تحصيلات را مشخص نماييد");
theForm.tahsilat.focus();
return (false);
}

if (theForm.address.value == "")
{
alert("لطفاآدرس خود را وارد نماييد");
theForm.address.focus();
return (false);
}


//if (theForm.comments.value.length > 3500)
//{
//alert(".ãØÇáÈ ÔãÇ ÈÇíÏ ßãÊÑ ÇÒ 3500 ÍÑÝ ÈÇÔÏ");
//theForm.comments.focus();
//return (false);
//}


}
//-->