﻿// JavaScript File


function showHelpBlurb(hb)
{

    var helpText = "";
    var helpTitle = "";
    switch(hb)
    {
        case 'Closing Price':
        helpTitle = "Closing Price";
        helpText = " The previous day's closing price for the stock.";
        break;
        
        case '20-Day Moving Average':
        helpTitle = "20-Day Moving Average";
        helpText = "The current level of the 20-day moving average, based on the most recent closing price.  This can be viewed as a short-term area of support or resistance.";
        break;
        
        case '50-Day Moving Average':
        helpTitle = "50-Day Moving Average";
        helpText = "The current level of the 50-day moving average, based on the most recent closing price.  This can be viewed as a intermediate-term area of support or resistance.";
        break;
        
        case '200-Day Moving Average':
        helpTitle = "200-Day Moving Average";
        helpText = "The current level of the 200-day moving average, based on the most recent closing price.  This can be viewed as a longer-term area of support or resistance.";
        break;
        
        case '10-Day Hist Vol':
        helpTitle = "10-Day Hist Vol";
        helpText = "A statistical measurement of a stock's past price movement over the last 10 days.  This is typically used as a comparison point for implied volatility of an option.";
        break;
        
        case '1 Month Hist Vol':
        helpTitle = "1 Month Hist Vol";
        helpText = "A statistical measurement of a stock's past price movement over the last month.   This is typically used as a comparison point for implied volatility of an option.";
        break;
        
        case '2 Month Hist Vol':
        helpTitle = "2 Month Hist Vol";
        helpText = "A statistical measurement of a stock's past price movement over the last 2 months.  This is typically used as a comparison point for implied volatility of an option.";
        break;
        
        case '3 Month Hist Vol':
        helpTitle = "3 month Hist Vol";
        helpText = "A statistical measurement of a stock's past price movement over the last 3 months.  This is typically used as a comparison point for implied volatility of an option.";
        break;
        
        case 'Average Daily Volume':
        helpTitle = "Average Daily Volume";
        helpText = "- The average number of shares traded recently.  This offers a quick way to see how liquid a stock may be.  Many traders look for average daily volume to be at least 250,000 or more.";
        break;
        
        case 'Relative Strength':
        helpTitle = "Relative Strength";
        helpText = "A comparison of the stock's performance to that of the broad market.  At Schaeffer's we view high relative strength as a bullish indication.";
        break;
        
        case 'RSI':
        helpTitle = "RSI";
        helpText = "The Relative Strength Index (RSI) offers a quick way to gauge whether a stock is overbought or oversold.  Readings below 30 are typically viewed as oversold, while readings over 70 are viewed as overbought.";
        break;
        
        case 'SOIR':
        helpTitle = "SOIR";
        helpText = "The Schaeffer's Put/Call Open Interest Ratio (SOIR) is a put/call open interest ratio calculated using the first 3 calendar months of data. A rising SOIR indicates that put open interest is building relative to call open interest.";
        break;
        
        case '% Rank':
        helpTitle = "SOIR Percentile Rank";
        helpText = "A comparison of the current Schaeffer's put/call open interest ratio reading to the past year's worth of readings. Values range from zero to 100. The higher the number, the higher today's reading relative to the past year. Higher percentiles indicate relatively more pessimism, while lower percentiles suggest optimism.";
        break;
        
        case 'Call Open Interest':
        helpTitle = "Call Open Interest";
        helpText = "The total number of call contracts that are currently open in the first 3 calendar months of options.  This can be used as a way to gauge liquidity.  Some traders look for open interest to be at least 1000 contracts.";
        break;
        
        case 'Put Open Interest':
        helpTitle = "Put Open Interest";
        helpText = "The total number of put contracts that are currently open in the first 3 calendar months of options. This can be used as a way to gauge liquidity.  Some traders look for open interest to be at least 1000 contracts.";
        break;
        
        case 'Current SI':
        helpTitle = "Current SI";
        helpText = "The total number of shares sold short, as of the most recent monthly report from the exchange.  Contrarians view high levels of short interest as a potentially bullish indication.  Short interest to float and the short-interest ratio are typically used to gauge short interest extremes.";
        break;
        
        case 'SI Change':
        helpTitle = "SI Change";
        helpText = "The net change in short interest from the previous month.  An increase would suggest skepticism toward the stock may be building.";
        break;
        
        case '% Change':
        helpTitle = "% Change";
        helpText = "The percentage change in short interest from the previous month.  An increase would suggest skepticism toward the stock may be building.";
        break;
        
        case 'SIR':
        helpTitle = "Short-Interest Ratio (SIR)";
        helpText = "The short-interest ratio (SIR), which compares short interest to the average daily volume. This ratio gives a theoretical gauge of how many days it would take the short sellers to cover all of their positions.  Ratios of less than 3 are generally considered low while readings of 5 or more might be considered high.";
        break;
        
        case 'SI/Float':
        helpTitle = "SI/Float";
        helpText = "The total number of shares sold short compared to the number of shares publicly owned and available for trading, otherwise known as the stock's float.  Short interest to float greater than 5% is generally considered high.";
        break;
        
        case 'Buy %':
        helpTitle = "Buy %";
        helpText = "Percent of analysts tracked by Zacks who rate the stock as a \"buy.\"  Contrarians use this as a way to help gauge sentiment and potential buying demand. If the Street has already bought into a stock, that means a steady stream of new money will need to enter the stock to fuel a rally.";
        break;
        
        case 'Hold %':
        helpTitle = "Hold %";
        helpText = "Percent of analysts tracked by Zacks who rate the stock as a \"hold.\" Contrarians use this as a way to help gauge sentiment and potential buying demand. If the Street has already bought into a stock, that means a steady stream of new money will need to enter the stock to fuel a rally.";
        break;
        
        case 'Sell %':
        helpTitle = "Sell %";
        helpText = "Percent of analysts tracked by Zacks who rate the stock as a \"sell.\" Contrarians use this as a way to help gauge sentiment and potential buying demand. If the Street has already bought into a stock, that means a steady stream of new money will need to enter the stock to fuel a rally.";
        break;
        
        case 'P/E Ratio':
        helpTitle = "P/E Ratio";
        helpText = "The price per share of the stock divided by the earnings per share.  The P/E ratio offers investors a way to compare stocks based on their valuations.";
        break;
        
        case 'Beta':
        helpTitle = "Beta";
        helpText = "A comparison of a stock’s volatility to the rest of the market.  A beta above 1.0 indicates the stock moves more than the market.";
        break;
        
        case 'Market Cap':
        helpTitle = "Market Cap";
        helpText = "The market value of a company's outstanding shares, found by multiplying the stock price and the total number of outstanding shares.";
        break;
        
        case 'Dividend Yield':
        helpTitle = "Dividend Yield";
        helpText = "The annual dividend divided by the stock's current price.  Longer-term investors may find higher dividend yields especially attractive.";
        break;
        
            
    }
    
    /*$('helptext').innerHTML = helpText;
    $('helpBlurbTitle').innerHTML = helpTitle;
    var helpBlurbStatus = $('divHelpBlurb').style.display;
    if(helpBlurbStatus == 'none')  
    {   
        new Effect.BlindDown('divHelpBlurb',{duration:1.0});
    }*/
    
    return "<b>" + helpTitle + "</b><p>" + helpText + "</p>";
}

function hideHelpBlurb()
{
    /*$('divHelpBlurb').hide();*/
    new Effect.BlindUp('divHelpBlurb', {duration:1.0});  
}
