// JavaScript Document// JavaScript Document
function trim(str)
{
	return str.replace(/^\s+|\s+$/g,'');
}
function isEmpty(formElement, message) {
	formElement.value = trim(formElement.value);
	
	_isEmpty = false;
	if (formElement.value == '') {
		_isEmpty = true;
		alert(message);
		formElement.focus();
	}
	
	return _isEmpty;
}
function Login()
{
	with (window.document.frmLogin) {
		if (isEmpty(txtUser, 'Vui lòng nhập tên đăng nhập!')) {
			return;
		}else if (isEmpty(txtPwd, 'Vui lòng nhập mật khẩu')) {
			return;
		}else {
			submit();
		}
	}
}
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
