  function ShowText(strText){
    //PURPOSE: Does the mouseover for the members page
    if (document.all !=null)
     document.all.item("lblMessage").innerText=strText;
  }
  
  function ShowDefaultText(){
    //PURPOSE: Shows the default text
    ShowText("Welcome to VectorVest Member Services");
  }
  
  function ShowTextByID(p_iID){
    //PURPOSE: Does the mouseover for the members page by ID
        switch(p_iID)
          {
            case 1:
              ShowText("VectorVest U.S. is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 8,400 stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 2:
              ShowText("VectorVest Canada is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 2,900  Canadian stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 3:
              ShowText("VectorVest Express provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest Subscription.");
              break;
            case 5:
              ShowText("The Intraday Timing System applies the power of VectorVest to market movement throughout the day. Based on a variety of data, we call the market direction at the start and end of each trading day. Additionally, this data is analyzed in real time during normal trading hours. When certain conditions are met, the appropriate call is published on this web site, and if you have it set up, sent to an email address of your choice.");
              break;
            case 6:
              ShowText("Portfolio Tracker allows you to paper trade stocks during the day using delayed quotes. It allows you to buy long, sell short and use margin as though you were using an online broker. It keeps track of all your trades and of course, your gains and losses. Paper trading in real-time is a logical, if not necessary, step in becoming a successful investor. This is a FREE service to all VectorVest subcribers.");
              break;
            default:
              ShowDefaultText();
              break;
            case 7:
              ShowText("VectorVest Express Canada provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest Canada Subscription.");
              break;
            case 8:
              ShowText("Join a top VectorVest instructor for a series of educational and informative training sessions.  VectorVest University will help you get the most out of your VectorVest subscription.");
              break;
            case 9:
              ShowText("VectorVest Europe is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 1,900 stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 10:
              ShowText("VectorVest Europe Express provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest Europe Subscription.");
              break;   
            case 12:
              ShowText("VectorVest U.K. is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 1,600 stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 13:
              ShowText("VectorVest U.K. Express provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest U.K. Subscription.");
              break;   
            case 16:
              ShowText("VectorVest Australia is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 1,300 stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 17:
              ShowText("VectorVest Australia Express provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest Australia Subscription.");
              break;  
            case 28:
              ShowText("VectorVest South Africa is the ONLY web-based stock analysis tool that performs both fundamental and technical stock analysis on over 300 stocks.  Through the power of the Internet, VectorVest\'s assortment of innovative tools is only a mouse click away.  This service can be accessed from any computer anywhere, anytime.");
              break;
            case 29:
              ShowText("VectorVest South Africa Express provides online access to daily Market Timing analysis, Weekly VectorVest Views, unlimited Stock Analysis Reports, and more. This service is included free with any VectorVest South Africa Subscription.");
              break;              
          }
  }

  function opentour(p_sURL,p_link){
    //PURPOSE: opens the tour window
    var sFeatures;
    sFeatures="toolbars=no,width=991,height=618"
    window.open(p_sURL,"",sFeatures);
    return false;
  }
          
  function disableLoginButton(p_fForm){
    //PURPOSE: takes the form that is passed in
    //and disables the login button on that
    //form
    var btn;
    var hd;
    btn = p_fForm.elements['myctlLogin:btnLogin'];
    if(btn!=null)
      btn.disabled = true;  
    hd = p_fForm.elements['hdScriptOK'];
    if(hd!=null)
      {
      hd.value = "1"; 
      }
  }
  
  function replaceFrame(){
    //purpose: replaces this page
    //if(parent.frames!=null)
      //{
        //if(parent.frames.length>0)
          //{
            //parent.window.navigate(self.href);
          //}
      //}
  }
  
      function addAppWinToArray(p_oWin){
        //PURPOSE: Adds an app window to the array
        var oArr;
        
        oArr = WinArray();
        oArr[m_arrAppWindows.length] = p_oWin;
      }
      
      function getAppWin(p_sAppWindowName){
        //PURPOSE: gets an app window by name
        var oWin;
        var i;
        var oWinOpener;
        var oArr;
        
        oArr = WinArray();
        //loop through the array
        for(i=0;i<oArr.length;i++)
          {
            oWin=oArr[i];
            if(oWin!=null)
              {
                if(oWin.closed==false)
                {
                  if(oWin.name==p_sAppWindowName)
                    {
                      //finally, if it's a window
                      return oWin;
                    }
                }
              }
          }       
      }

        function closeChildWindows(){
          //PURPOSE: Closes all child windows this app has opened
          var oWin;
          var i;
          //loop through the array
          for(i=0;i<m_arrAppWindows.length;i++)
            {
              oWin=m_arrAppWindows[i];
              if(oWin!=null)
                {
                  if(oWin.closed==false)
                  {
                    oWin.close();
                  }
                }
            }
          
        }
        
        function getOpenersArray(){
          //PURPOSE: Called from the child windows to get the parent's
          //opener array
          if(parent.opener!=null)
            {
              if(parent.opener.closed==false)
                {
                  if(parent.opener.WinArray()!=null)
                  {
                  m_arrAppWindows = parent.opener.WinArray();
                  }
                }
            }
        }
        
        
        
      function openapp(p_sURL,p_sAppWindowName){
        //PURPOSE: used for opening the app windows
        var oWin;
        var oWin2;
        var oTB;
        oWin = getAppWin(p_sAppWindowName)
        
        if(oWin==null)
          {
            oWin2=window.open(p_sURL,p_sAppWindowName,"");
            //add it to the array
            addAppWinToArray(oWin2);
            oWin2.focus();
          }
        else
          {
            oWin.focus(); 
          }
        return false;
      }
function ShowHideLinks(p_iGroup, p_sImageurl){
//PURPOSE: Does the mouseover for the links by Group
    var sDivName;
    
    sDivName='CtlApplicationToolbar1_div' + p_iGroup;
    
    hideDivs();
    
    document.getElementById(sDivName).style.display="inline";
    document.getElementById(sDivName).style.visibility = "visible";
    
    ClearBackground();
    
    document.getElementById('CtlApplicationToolbar1_Group_' + p_iGroup).src=p_sImageurl;
    
    return false;
  }   

function hideDivs() {
     if(document.getElementsByTagName) {
       var c = document.getElementsByTagName('div');
       for(var i = 0, n = c.length; i < n; ++i) {
         var e = c[i];
         e.style.visibility="hidden";
         e.style.display="none";
       }
     }
   } 
function ClearBackground() {
  if(document.getElementsByTagName) {
       var c = document.getElementsByTagName("input");
       for(var i = 0, n = c.length; i < n; ++i) {
    var e = c[i];
    e.src = e.alt;
       }
     }
   } 
