String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g, "");
}

function toggleLogin() {
    var login = document.getElementById("loginBox");
    if(login.style.display == "block") {
        $("#loginBox").fadeOut("fast");
    }
    else {
        $("#loginBox").fadeIn("fast");
	document.getElementById("loginBoxPassword").focus();
    }
}

function checkLoginPrompt() {
    var login = document.getElementById("loginBoxPassword");
    if(login.value.trim() == "") {
        alert("Nope...");
	$("#loginBox").fadeOut("fast");
        return false;
    }
    return true;
}
