﻿function btnMaLoginCancel_Click(s, e) {
	dvxMstLogin.Hide();
	e.processOnServer = false;
}
function tbxMaLoginEmail_KeyUp(s, e) {
	SetSignInButtonMa();
}
function tbxMaLoginPass_KeyUp(s, e) {
	SetSignInButtonMa();
}

function GoToPopup(page, height) {
    if (typeof (height) == 'undefined') height = '';
	if (window.opener == null) {
		window.open(page, "mywindow", "location=0,status=0,scrollbars=1,width=850,height=" + height + ", resizable=0");
	}
	else if (!window.opener.closed) {
		window.location = page;
	}
	return false;
}

function GoToPopupSized(page, width, height) {
	if (window.opener == null) {
		window.open(page, "mywindow", "location=0,status=0,scrollbars=1,width=" + width + ",height=" + height + ", resizable=0");
	}
	else if (!window.opener.closed) {
		window.location = page;
	}
	return false;
}

function ShowLoginForm() {
	dvxMstLogin.Show();
	if (tbxMaLoginEmail.GetText() == "")
		tbxMaLoginEmail.SetFocus();
	else
		tbxMaLoginPass.SetFocus();
}

function SetSignInButtonMa() {
	if (tbxMaLoginEmail.GetText() != "" && tbxMaLoginPass.GetText() != "")
		btnMaLoginSignIn.SetEnabled(true);
	else
		btnMaLoginSignIn.SetEnabled(false);
}
function GoHome() {
    if (window.opener == null) {
        window.location = baseUrl;        
	}
    else if (!window.opener.closed) {
        window.opener.location = baseUrl;
		window.close();
	}
	return false;
}
