function Login()
{
    var username = document.getElementById('txtUserName').value;
    var password = document.getElementById('txtRealPassword').value;
    
    if (username != '' && username != 'Username' && username != 'username' && password != '')
    {
        window.open('http://tourismgrading.co.za/backoffice3.0/pages/CommonPages/Login.aspx?LogInName=' + username + '&Password=' + password);
    }
    else
    {
        alert('Please enter your username and password');
    }
}
function ForgotPassword()
{
    var username = document.getElementById('txtUserName').value;
    
    if (username != '' && username != 'Username' && username != 'username')
    {
        window.open('http://tourismgrading.co.za/backoffice3.0/pages/CommonPages/ForgottenPassword.aspx?LogInName=' + username);
    }
    else
    {
        alert('Please enter your username');
    }
}
function UserRegistration()
{
    window.open('http://tourismgrading.co.za/backoffice3.0/Pages/CommonPages/Registration/Registration.aspx');
}
function ToggleBackOfficePassword()
{
    var password = document.getElementById('txtRealPassword');
    var dummyPassword = document.getElementById('txtPassword');
    if (password.style.display == "none")
    {
        password.style.display = "block";
        password.focus();
        dummyPassword.style.display = "none";
    }
    else
    {
        password.style.display = "none";
        dummyPassword.style.display = "block";
    }
}
function enterSubmit(e, buttonid)
{ 
    var bt = document.getElementById(buttonid); 
    if (typeof bt == 'object')
    {	
        if (is_ie)
        {       
            if (event.keyCode == 13)
            {	
                bt.click(); 
                return false; 
            }   
        }       
        if(is_nav)
        {	    
            if (e.keyCode == 13)
            {   
                bt.click(); 
                return false; 
            }   
        }       
    }           
} 