function checkForm()
{
	var uname, upassword;
	with(document.forms.loginSnForm)
	{
		uname = input_login_user;
		upassword = input_login_pass;
	}
	if(trim(uname.value) == '' && trim(upassword.value) == '')
	{ 
		alert('Please Enter the User Name & Password');
		uname.focus();
		return false;
	}
	if(trim(uname.value) == '')
	{ 
		alert('Please enter the User Name');
		uname.focus();
		return false;
	}
	if(trim(upassword.value) == '')
	{
		alert('Please enter the Password');
		upassword.focus();
		return false;
	}
}

function checkForm123(form)
{
	var uname, upassword;
	with(document.forms.loginSnForm)
	{
		uname = input_login_user;
		upassword = input_login_pass;
	}
	if(trim(uname.value) == '' && trim(upassword.value) == '')
	{ 
		alert('Please Enter the User Name & Password');
		uname.focus();
		return false;
	}
	if(trim(uname.value) == '')
	{ 
		alert('Please enter the User Name');
		uname.focus();
		return false;
	}
	if(trim(upassword.value) == '')
	{
		alert('Please enter the Password');
		upassword.focus();
		return false;
	}
	document.form.submit();
}

/*
Strip whitespace from the beginning and end of a string
Input : a string
*/
function trim(str)
{
    return str.replace(/^\s+|\s+$/g,'');
}

