//Copyright 2002-2011, My Great Software, Inc. All rights reserved.
//**Start Encode**
/*jsl:import GlobalSR.js*/
/*jsl:import ppc.js*/
var m_aLogon = new Logon();
function Logon()
{
this.bSubmitted = false;
this.bChanges = false;
this.bDebug = false;
}
Logon.prototype.Submit = A_Submit;
Logon.prototype.Clear = A_Clear;
Logon.prototype.Changes = A_Changes;
Logon.prototype.Load = A_Load;
Logon.prototype.Debug = A_Debug;
Logon.prototype.wmSubmit = A_wmSubmit;
Logon.prototype.wmReset = A_wmReset;
Logon.prototype.Click = A_Click;
function A_Click(oAnchor)
{
return m_aPPC.Click(oAnchor);
}
function A_wmSubmit()
{
this.Submit(true);
}
function A_wmReset()
{
frmLogon.reset();
this.bChanges = false;
this.bSubmitted = false;
}
function A_Debug()
{
this.bDebug = true;
}
function A_Load(bTest)
{
if (bTest)
{
this.Debug();
}
m_aPPC.CookiesEnabled();
if (! m_aPPC.IsMobile())
{
try
{
if (window.parent.frames.length > 0)
{
var oFrameset = m_aPPC.FGEBI("oFrameSetGK");
if (oFrameset != null)
{
this.Click(ancNoFrame);
}
}
}
catch (exception)
{
/*jsl:pass*/
}
}
with (frmLogon)
{
if (this.bDebug)
{
txtUserID.value = "guest";
txtPassword.value = "12345";
}
}
return true;
}
function A_Clear()
{
if (this.bSubmitted) return false;
with (frmLogon)
{
txtUserID.value = fEmptyString;
txtPassword.value = fEmptyString;
}
this.bChanges = true;
this.bSubmitted = false;
return true;
}
function A_Changes()
{
this.bChanges = true;
return true;
}
function A_Submit(bMobile)
{
if (this.bSubmitted)
{
g_Message(fServerMessage);
return false;
}
var bOk = true;
var sMsg = fEmptyString;
with (frmLogon)
{
if (m_aPPC.ValidateTagsA(txtUserID)) return false;
if (m_aPPC.ValidateTagsA(txtPassword)) return false;
if (txtUserID.value.length == IS_EMPTY)
{
sMsg += "Specify a User ID." + fNewLine;
txtUserID.focus();
bOk = false;
}
if (txtPassword.value.length == IS_EMPTY)
{
sMsg += "Specify a password." + fNewLine;
if (bOk)
txtPassword.focus();
bOk = false;
}
}
if (! bOk)
{
g_Message(sMsg);
}
if (bOk)
{
this.bSubmitted = true;
if (bMobile) frmLogon.submit();
}
return bOk;
}

