// JavaScript Document
function BlurOnLogin(
    txtNameClientID,
    txtPasswordClientID)
{
	if ((!(false)) && 
	    (!(false)))
	{
	    var txtName = document.getElementById(txtNameClientID);
        var txtPassword = document.getElementById(txtPasswordClientID);
        
        if ((txtName != null) &&
            (txtPassword != null))
        {
		    if (txtName.value != '')
		    {
		        txtName.style.backgroundImage = 'none'
		    }
    		
		    if (txtPassword.value != '')
		    {
		        txtPassword.style.backgroundImage = 'none'
		    }	
		}
	}
}

function validateLogin(
    formActionUrl)
{
    if (BWLoginValidate('ID','PW'))
	{
		document.aspnetForm.action = formActionUrl;
			
		document.aspnetForm.submit();
	}
	else
	{
		return false;
	}
}
	
function BWLoginValidate(
    txtNameClientID,
    txtPasswordClientID)
{
    var txtName = document.getElementById(txtNameClientID);
    var txtPassword = document.getElementById(txtPasswordClientID);
    
    if ((txtName != null) &&
        (txtPassword != null))
    {
	    if (txtName.value == '')
	    { 
	        alert("Please enter your Member ID"); 
	        
	        return false; 
	    }
    	
	    if (txtPassword.value == '')
	    { 
	        alert("Please enter your Password"); 
	        
	        return false; 
	    }
	}
	
	return true;
}

function handleEnterSubmission(
    formActionUrl,
    evt)
{
    if (evt.keyCode == 13)
    {
        return validateLogin(formActionUrl);
    }
    
    return true;
}