function Validator(theForm)
{


  if (theForm.j_username.value == "")
  {
    alert("الرجاء إدخال إسم المستخدم في الحقل المخصص");
    theForm.j_username.focus();
    return (false);
  }

  if (theForm.j_username.value.length < 3)
  {
    alert("الرجاء إدخال 3 محارف على الأقل في حقل إسم المستخدم");
    theForm.j_username.focus();
    return (false);
  }

  if (theForm.j_username.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"j_username\" field.");
    theForm.j_username.focus();
    return (false);
  }

  if (theForm.j_password.value == "")
  {
    alert("الرجاء إدخال كلمة المرور في الحقل المخصص");
    theForm.j_password.focus();
    return (false);
  }

  if (theForm.j_password.value.length < 4)
  {
    alert("الرجاء إدخال 4 محارف على الأقل في حقل كلمة المرور");
    theForm.j_password.focus();
    return (false);
  }
	document.LoginForm.submit();
	document.getElementById('j_password').value='';
  if (theForm.j_password.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"j_password\" field.");
    theForm.j_password.focus();
    return (false);
  }

  return (true);	

}