// Trans page messaging related functions

var tppmXshow, tppmXhide, tppmYshow, tppmYhide, tppmHideTimerId, tppmContainer;
var tppmIsShow = false;
var errorMessage;
var tppMessageInitTM = false;

function TransPagePassingMessageInit(message, delay_ms, posX, posY)
{
  if(tppMessageInitTM)
    clearTimeout(tppMessageInitTM);

  if (!document.getElementById)
    return;
    
  if (!posX)
    posX = 0;
    
  if (!posY)
    posY = 0;
 
  if(message)
  {
    if(confirmMessage)
    {
      confirmMessage.initWaitMsg(message, 0, delay_ms, "", "confMsgBox", posX, posY, 315, 65, 30999, 13, 1, 13, 1, true);
      confirmMessage.viewWaitMsg();
    }
    else
    {
      tppMessageInitTM = setTimeout('TransPagePassingMessageInit("' + message.replace(/"/g, '\\"') + '",' + delay_ms + ',' + posX + ',' + posY + ');', 100);
    }
  }
}

function TransPagePassingMessageHide()
{
  if (tppm)
  {
    if (tppmHideTimerId)
    {
      clearTimeout(tppmHideTimerId);
      tppmHideTimerId = null;
    }
    
    try
    {
	    tppmContainer.filters.revealTrans.duration=1.5;
	    tppmContainer.filters[0].Apply();
	    tppmContainer.style.visibility = "hidden";
	    tppmContainer.filters[0].Play();
	  }
	  catch(e) {}
	  
    tppm.hide();
    tppmIsShow = true;
  }
}

function TransPagePassingErrorMessageInit(message)
{
    errorMessage = message;
    var strRE = ' ';
    strRE.match(/./);
    ((window.onload + '').replace(/\\n/g, '')).match(/.*?\{(.*?)\}.*?/);
    window.onload = new Function(RegExp.$1 + ';if (errorMessage) alert(errorMessage);');
}