﻿/*
    RegisterLogin.js
    JMO 1 Feb 2010
*/
//PageSetup:
$(document).ready(function()
{
    //alert("hello");
});

function fnRegister()
{
    fnResetPage();
}
function fnLogin()
{
    var email = $('#txtLoginEmail').val();
    var password = $('#txtLoginPwd').val();
    
    $.post("default.asmx/LogIn", "Val1="+email+"&Val2="+password, 
        function(data){ if(isnumeric(html(data))) {
                            fnResetPage();
                            $("#rightFrame").html(data);
                        }
                        else $("#divFeedback").html("Login Error"); } );
    return;
}
function fnResetPage()
{
    $("#visitor").css("display", "none");
    $("#leftFrame").css("display", "block");
    $("#rightFrame").css("display", "block");
}
function getXMLHttpRequest() 
{
    if (window.XMLHttpRequest) {
        return new window.XMLHttpRequest;
    }
    else {
        try {
            return new ActiveXObject("MSXML2.XMLHTTP.3.0");
        }
        catch(ex) {
            return null;
        }
    }
}
