function validateEmail(emailAddress) { var match = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/.test(emailAddress); return match; } function CheckRegisterForm(RegisterForm) { if (RegisterForm.username.value == "" ) { alert( "Please choose a username!" ); RegisterForm.username.focus(); return false; } if (RegisterForm.password.value == "" ) { alert( "Please choose a password!" ); RegisterForm.password.focus(); return false; } if (RegisterForm.email.value == "" ) { alert( "Please enter your email address." ); RegisterForm.email.focus(); return false; } checkEmail = RegisterForm.email.value if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {alert("Your emails address is invalid!."); RegisterForm.email.focus(); return false; } // return true; } function CheckTellForm(tellform) { if (tellform.name.value == "" ) { alert( "الرجاء أدخل الإسم بالكامل" ); tellform.name.focus(); return false; } if (tellform.email.value == "" ) { alert( "أدخل البريد الإلكتروني" ); tellform.email.focus(); return false; } checkEmail = tellform.email.value if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {alert("البريد الإلكتروني خطأ!."); tellform.email.focus(); return false; } if (tellform.fname.value == "" ) { alert( "أدخل إسم صديقك" ); tellform.fname.focus(); return false; } if (tellform.femail.value == "" ) { alert( "أدخل البريد الالكتروني الخاص بصديقك" ); tellform.femail.focus(); return false; } checkEmail = tellform.femail.value if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) {alert("البريد الإلكتروني خطأ!."); tellform.femail.focus(); return false; } // return true; } var newwindow; function pop(url) { newwindow=window.open(url,'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=1, menubars=0, resizable=0, width=500, height=400'); if (window.focus) {newwindow.focus()} } function popimg(url) { newwindow=window.open(url,'name','height=500,width=650,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes'); if (window.focus) {newwindow.focus()} }