function ContainsNumeric(sText) { var ValidChars = "0123456789."; var HasNumber=false; var Char; for (i = 0; i < sText.length && HasNumber == false; i++) { Char = sText.charAt(i); if ( ! ( ValidChars.indexOf(Char) == -1)) { HasNumber = true; } } return HasNumber; } function do_u_work_nowchange() { if (comp.form_do_u_work_now[1].checked) { comp.form_current_income.disabled =true comp.form_current_income.focus() } else { comp.form_current_income.value="" comp.form_current_income.disabled =false } } function isValidform_email(form_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_email)); } function ContainsNumeric(sText) { var ValidChars = "0123456789."; var HasNumber=false; var Char; for (i = 0; i < sText.length && HasNumber == false; i++) { Char = sText.charAt(i); if ( ! ( ValidChars.indexOf(Char) == -1)) { HasNumber = true; } } return HasNumber; } /*************************************************** function IsNumeric(sText) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } /******************************************************/ function Check_Form1(theForm) { if (theForm.form_firstname.value == "") { alert("فضلاً أدخل الاسم الأول"); theForm.form_firstname.focus(); return (false); } if (ContainsNumeric(theForm.form_firstname.value)) { alert("حقل الاسم الأول لايقبل أرقام"); theForm.form_firstname.focus(); return (false); } if (theForm.form_fathersname.value.length < 3) { alert("فضلاً أدخل اسم الأب"); theForm.form_fathersname.focus(); return (false); } if (theForm.form_familyname.value == "") { alert("فضلاً أدخل اسم العائلة"); theForm.form_familyname.focus(); return (false); } if (theForm.form_birthday_m.value.length < 3) { alert("فضلاً أدخل تاريخ الميلاد"); theForm.form_birthday_m.focus(); return (false); } if (theForm.form_age.value == "") { alert("فضلاً أدخل العمر"); theForm.form_age.focus(); return (false); } if ( !(ContainsNumeric(theForm.form_age.value))) { alert("حقل العمر لايقبل حروف"); theForm.form_age.focus(); return (false); } bb=0;for(i=0;i<2;i++) {if (theForm.form_gender[i].checked) {bb=1;}}if (bb==0){alert('فضلاً أختر نوع الجنس'); return (false);} bb=0;for(i=0;i<4;i++) {if (theForm.form_martuallstatus[i].checked) {bb=1;}}if (bb==0){alert('فضلاً أختر الحالة الإجتماعية'); return (false);} if (theForm.form_id_no.value == "") { alert("فضلاً أدخل رقم البطاقة"); theForm.form_id_no.focus(); return (false); } if ( !(ContainsNumeric(theForm.form_id_no.value))) { alert("حقل رقم البطاقة لا يقبل حروف "); theForm.form_id_no.focus(); return (false); } if (theForm.form_birthcity.value == "") { alert("فضلاً أدخل مدينة الميلاد"); theForm.form_birthcity.focus(); return (false); } if (theForm.form_birthcountry.value == "") { alert("فضلاً أدخل دولة الميلاد"); theForm.form_birthcountry.focus(); return (false); } if (theForm.form_currentcity.value == "") { alert("فضلاً أدخل المدينة الحالية"); theForm.form_currentcity.focus(); return (false); } if (theForm.form_currentregon.value == "0") { alert("فضلاً اختر المنطقة الحالية"); theForm.form_currentregon.focus(); return (false); } if (theForm.form_telephone.value == "") {alert("فضلاً أدخل الهاتف");theForm.form_telephone.focus();return (false); } if (theForm.form_telephone.value.length < 9){alert("يجب أن لا يقل الهاتف عن تسعة حروف");theForm.form_telephone.focus();return (false);} if (theForm.form_mobile.value == ""){alert("فضلاً أدخل رقم الجوال");theForm.form_mobile.focus();return (false);} if (theForm.form_mobile.value.length < 10){alert("يجب أن لا يقل رقم الجوال عشرة حروف");theForm.form_mobile.focus();return (false);} if (theForm.form_email.value == "") { alert("فضلاً أدخل البريد الإلكتروني"); theForm.form_email.focus(); return (false); } if(! isValidform_email(theForm.form_email.value)) { alert("فضلاَ تأكد من بريدك الإلكتروني"); theForm.form_email.focus(); return(false); } if (theForm.form_email.value.length < 8) { alert("يجب أن لا يقل عنوان البريد الإلكتروني عن ثمان حروف"); theForm.form_email.focus(); return (false); } if (theForm.form_education1.value == "0") { alert("فضلاً اختر المؤهل التعليمي "); theForm.form_education1.focus(); return (false); } if (theForm.form_major1.value == "") { alert("فضلاً أدخل التخصص "); theForm.form_major1.focus(); return (false); } if (theForm.form_instute1.value == "") { alert("فضلاً أدخل الجهة التعليمية "); theForm.form_instute1.focus(); return (false); } if (theForm.form_grad1.value == "") { alert("فضلاً أدخل سنة التخرج"); theForm.form_grad1.focus(); return (false); } bb=0;for(i=0;i<3;i++) {if (theForm.form_driver_licence[i].checked) {bb=1;}}if (bb==0){alert('فضلاً أختر نوع رخصة القيادة'); return (false);} var noq=qa.length; chkd= new Array(false,false,false,false,false,false,false,false); for (i=0;i