





  function portalWarning(divisionName){
    if(divisionName != 'Oceanrock'){
       divisionName = 'Qtrade '+divisionName;
    }

    var message= 'You are navigating out of the '+divisionName+' web site. <br/> Do you wish to be logged out?';
    var warningSpan = document.getElementById('WarningMessage');
    var portalChoice = document.getElementById('PortalChoice');
    warningSpan.innerHTML = message;
    var windWidth = document.documentElement.clientWidth;
    var windHeight = document.documentElement.clientHeight;
    if(!windWidth || isNaN(windWidth) || windWidth == 0){
      windWidth = 800;
    }
    if(!windHeight || isNaN(windHeight) || windHeight == 0){
      windHeight = 600;
    }

    var dialogX = Math.round(windWidth / 2) - 110;
    var dialogY = Math.round(windHeight / 2) - 100;
    portalChoice.style.left = dialogX + 'px';
    portalChoice.style.top = dialogY + 'px';
    portalChoice.style.zIndex = '100';
    MM_showHideLayers('PortalChoice','','show');

  }

  function portalChoice(isLogOut){
    MM_showHideLayers('PortalChoice','','hide');
    if(isLogOut){
      location = 'http://www.qtrade.ca/security_client/logout.jsp?target=portal';
    }else{
      location = 'http://www.qtrade.ca/portal.do?division=portal';
    }
  }




