// Trans page messaging related functions

var tppmXshow, tppmXhide, tppmYshow, tppmYhide, tppmHideTimerId, tppmContainer;
var confirmMessage = false;
var tppmIsShow = false;
var errorMessage;

function TransPagePassingMessageInit(message, delay_ms, posX, posY)
{
  if (!document.getElementById)
    return;
    
  if (!posX)
    posX = 0;
    
  if (!posY)
    posY = 0;
 
  if(message)
  {
    confirmMessage = new BonaWaitMsg(message, 0, delay_ms, "", "confMsgBox", posX, posY, 315, 35, 30999, 13, 1, 13, 1, true);
    confirmMessage.viewWaitMsg();
  }
}


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);');
}
