
function registrationSuccess(userID)
{
    var vp = swfobject.getObjectById("hsShell");
    if (vp)
        vp.onRegistrationSuccess(userID);
    tb_remove();	
}

function loginSuccess(userID)
{
    var vp = swfobject.getObjectById("hsShell");
    if (vp)
        vp.onLoginSuccess(userID);
    tb_remove();
}

function logoutSuccess()
{
  var vp = swfobject.getObjectById("hsShell");
  if (vp)
    vp.onLogoutSuccess();
  tb_remove();
}

function returnFromExternal(checkForChanges)
{
    var vp = swfobject.getObjectById("hsShell");
    if (vp)
        vp.returnFromExternal(checkForChanges);
    tb_remove();
}

function externalWindowLoaded(checkForChanges)
{
    var vp = swfobject.getObjectById("hsShell");
    if (vp)
        vp.externalWindowLoaded();
}

function launchExternal(pageName)
{
  var tbUrl = pageName + ((pageName.indexOf("?",0)>0)?"&":"?") + "TB_iframe=true&modal=true";
//  if (pageName.indexOf("Login", 0) > -1)
//  {
//    tbUrl += "&height=225&width=400";
//  }
  tb_show("", tbUrl, "");
}

function submitShellRequest(param)
{
    var vp = swfobject.getObjectById("hsShell");
    if (vp)
        vp.submitShellRequest(param);
}
