function login() {
	var user = $("#username").val();
	var pass = $("#password").val();
	
	$.post(BaseURL+"Login", {
		isSubmission: true,
		mode: "JSON",
		username: user,
		password: pass
		}, function(result) {
			if(result.status=="success") {
				if(document.location.href.match(/.*Logout/)) document.location.href=BaseURL;
				else window.location.reload(true);
			} else {
				$("#notification").text(result.message.toString());
				$("#notification").jsiteDialogue().show();

			}
			
		}, "json"
	);

}

function generalError(request, textStatus, errorThrown) {
	$("#notification").html(textStatus+"<br/>"+errorThrown);
	$("#notification").jsiteDialogue().show();
}

