	function doLogin()
	{
		var frm = _getById('loginFrm');
		frm.submit();
	}


function setLoginBehaviour()
{
	if (_getById("loginid") == null) return;
	
	var logval = _getById("loginid").value;
	var loginText = _getById("loginText").value;
	if(logval!=loginText)
	{
		_getById("loginid").style.color =  "#000000";
	}
	
	_getById("passwdtext").onfocus =	function()
	{
		this.style.display = "none";
		_getById("password").style.display = "inline" ;
		_getById("password").focus();
	}
	
	_getById("password").onblur = function()
	{
		if(this.value == "")
		{
			this.style.display = "none";
			_getById("passwdtext").style.display = "inline";
		}
	}
	
	_getById("loginid").onfocus = function()
	{
		if(this.value == loginText)
		{
			this.value = "";
			this.style.color = "#000000";
		}
	}
	
	_getById("loginid").onblur = function()
	{
		if(this.value == "")
		{
			this.value = loginText;
			this.style.color = "#B7B7B7";
		}
	}

	_getById("password").onkeyup = function()
	{
		if (event.keyCode == 13)
			doLogin();
	}

	_getById("loginid").onkeyup = function()
	{
		if (event.keyCode == 13)
			doLogin();
	}
	
	_getById("loginDlgLoad").style.display = "none";
	_getById("loginDlg").style.display = "block";
}

