diff --git a/site/.vscode/settings.json b/site/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/site/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/site/articles/include_form.js b/site/articles/include_form.js new file mode 100644 index 0000000..9aa47b9 --- /dev/null +++ b/site/articles/include_form.js @@ -0,0 +1,112 @@ + diff --git a/site/coaches/javascript.js b/site/coaches/javascript.js new file mode 100644 index 0000000..9ca0ce3 --- /dev/null +++ b/site/coaches/javascript.js @@ -0,0 +1,123 @@ +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()} + } + + + +