function isValidform_email(form_com_email) { var regEx = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/g; return(regEx.test(form_com_email)); } function Check_Form1(theForm) { if (theForm.form_com_name.value == "") { alert("فضلاً أدخل اسم الشركة"); theForm.form_com_name.focus(); return (false); } if (theForm.form_com_name.value.length < 3) { alert("يجب أن لا يقل اسم الشركة عن ثلاث حروف"); theForm.form_com_name.focus(); return (false); } if (theForm.form_activity.value == "") { alert("فضلاً أدخل نشاط الشركة"); theForm.form_activity.focus(); return (false); } /****************************** if (theForm.form_activity.value.length > 50) { alert("الرجاء التأكد من النشاط المدخل"); theForm.form_activity.focus(); return (false); } /*******************************/ if (theForm.form_activity.value.length < 3) { alert("يجب أن لا يقل نشاط الشركة عن ثلاث حروف"); theForm.form_activity.focus(); return (false); } /****###################********#######################*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@******* if (theForm.form_activity.value == " 30) { alert("الرجاء التأكد من اسم الشخص المسؤول المدخل"); theForm.form_perncable.focus(); return (false); } /*******************************/ if (theForm.form_perncable.value.length < 3) { alert("يجب أن لا يقل اسم الشخص المسؤول عن ثلاث حروف"); theForm.form_perncable.focus(); return (false); } if (theForm.form_posation.value == "") { alert("فضلاً أدخل المنصب الوظيفي"); theForm.form_posation.focus(); return (false); } /******************************/ if (theForm.form_posation.value.length > 30) { alert("الرجاء التأكد من المنصب الوظيفي المدخل"); theForm.form_posation.focus(); return (false); } /*******************************/ if (theForm.form_posation.value.length < 3) { alert("يجب أن لا يقل المنصب الوظيفي عن ثلاث حروف"); theForm.form_posation.focus(); return (false); } if (theForm.form_com_tel.value == "") { alert("فضلاً أدخل هاتف الشركة"); theForm.form_com_tel.focus(); return (false); } if (theForm.form_com_tel.value.length < 9) { alert("يجب أن لا يقل هاتف الشركة عن تسعة حروف"); theForm.form_com_tel.focus(); return (false); } if (theForm.form_com_mobile.value == "") { alert("فضلاً أدخل رقم الجوال"); theForm.form_com_mobile.focus(); return (false); } if (theForm.form_com_mobile.value.length < 10) { alert("يجب أن لا يقل رقم الجوال عشرة حروف"); theForm.form_com_mobile.focus(); return (false); } if (theForm.form_com_email.value == "") { alert("فضلاً أدخل البريد الإلكتروني"); theForm.form_com_email.focus(); return (false); } if(! isValidform_email(theForm.form_com_email.value)) { alert("فضلاَ تأكد من بريدك الإلكتروني"); theForm.form_com_email.focus(); return(false); } if (theForm.form_com_email.value.length < 8) { alert("يجب أن لا يقل عنوان البريد الإلكتروني عن ثمان حروف"); theForm.form_com_email.focus(); return (false); } if (theForm.update.value == "0") { if (theForm.form_username.value == ""){alert("فضلاً أدخل اسم المستخدم");theForm.form_username.focus();return (false); } if (theForm.form_username.value.length < 4) {alert("يجب أن لا يقل اسم المستخدم عن أربعة حروف");theForm.form_username.focus();return (false);} if (theForm.form_password.value == ""){alert("فضلاً أدخل كلمة السر");theForm.form_password.focus();return (false);} if (theForm.form_password.value.length < 4){alert("يجب أن لا يقل كلمة السر عن أربعة حروف");theForm.form_password.focus();return (false);} if (theForm.form_password_again.value == ""){alert("فضلاً أدخل تأكيد كلمة السر");theForm.form_password_again.focus();return (false);} if (theForm.form_password_again.value.length < 4){alert("يجب أن لا يقل تأكيد كلمة السر عن أربعة حروف");theForm.form_password_again.focus();return (false);} var chkVal = theForm.form_password.value; var prsVal = theForm.form_password_again.value; if (chkVal != "" && !(prsVal == chkVal)){alert("يجب أن يتطابق كلمة المرور مع تأكيد كلمة المرور");theForm.form_password_again.focus();return (false);} } return (true); }