
function check_login_form()
{





//------------------------------------------- Username Validation ---------
	
	if (document.login_form.user_name.value == "")
		{
			alert ("please type user name");
			document.login_form.user_name.focus();
			return (false);
		}




	if (document.login_form.user_name.value.length < 5)
		{
			alert ("user name is not less than 5 character");
			document.login_form.user_name.focus();
			return (false);
		}	






	var checkOK = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
    	var checkStr = document.login_form.user_name.value ;
  		var allValid = true;
  		var decPoints = 0;
  		var allNum = "";
  		for (i = 0;  i < checkStr.length;  i++)
  			{
   				 ch = checkStr.charAt(i);
    			 for (j = 0;  j < checkOK.length;  j++)
      				if (ch == checkOK.charAt(j))
        			break;
    				if (j == checkOK.length)
    					{
      						allValid = false;
      						break;
    					}
    				allNum += ch;
  			}

 	if (!allValid)
  		{
    			alert("Only Numbers And English Letters ");
    			document.login_form.user_name.focus();
    			document.login_form.user_name.select();
    			return (false);
		}




//------------------------------------------- End Username Validation ---------


//------------------------------------------- UserPassword Validation ---------


	if (document.login_form.user_password.value == "")
		{
			alert ("please type password");
			document.login_form.user_password.focus();
			return (false);
		}


	if (document.login_form.user_password.value.length < 5)
		{
			alert ("password is not less than 5 character");
			document.login_form.user_password.focus();
			return (false);
		}	



	var checkOK = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
    	var checkStr = document.login_form.user_password.value ;
  		var allValid = true;
  		var decPoints = 0;
  		var allNum = "";
  		for (i = 0;  i < checkStr.length;  i++)
  			{
   				 ch = checkStr.charAt(i);
    			 for (j = 0;  j < checkOK.length;  j++)
      				if (ch == checkOK.charAt(j))
        			break;
    				if (j == checkOK.length)
    					{
      						allValid = false;
      						break;
    					}
    				allNum += ch;
  			}

 	if (!allValid)
  		{
    			alert("Only Numbers And English Letters ");
    			document.login_form.user_password.focus();
    			document.login_form.user_password.select();
    			return (false);
		}

//------------------------------------------- End UserPassword Validation ---------








}




function subWin01(fn) 
	{
	newWin = window.open(fn, "subWin01", "width=450,height=300,scrollbars=yes,resizable=yes");
	}


	function subWin02(fn)
	{
	newWin = window.open(fn, "subWin02", "width=500,height=200,scrollbars=yes,resizable=yes");
	}

	function subWin03(fn) 
	{
	newWin = window.open(fn, "subWin03", "width=700,height=700,scrollbars=yes,resizable=yes");
	}