﻿if (document.all && !document.getElementById) {
    document.getElementById = function(id) {
        return document.all[id];
    }
}


function ClearDefault(tb) {
    if (tb.value.indexOf("Email Address") > -1)
        tb.value = "";
}
function SetDefault(tb) {
    if (tb.value == "")
        tb.value = "Enter Your Email Address";
}

function PlaySample() {
    hide('PlayerImage');
    show('Player');
    RenderPlayer('http://mfile.akamai.com/27589/wmv/globaltec.download.akamai.com/27589/misc/WTVwebclipsv8_768.asx', '447', '334', 'Player');

    //Omniture video tracking
    var s = s_gi('globaltec-wizetradetv-dev');
    mediaOpen('wtvSampleVideo', 240, 'SamplePlayer');
    mediaPlay('wtvSampleVideo', 0);
}

function PlayTestimonial() {
    hide('TestimonialPlayerImage');
    show('TestimonialPlayer');
    RenderPlayer('http://mfile.akamai.com/27589/wmv/globaltec.download.akamai.com/27589/misc/MarketingIntro.asx', '237', '168', 'TestimonialPlayer');

    //Omniture video tracking
    var s = s_gi('globaltec-wizetradetv-dev');
    mediaOpen('wtvTestimonialVideo', 193, 'TestomonialPlayer');
    mediaPlay('wtvTestimonialVideo', 0);
}

function RenderPlayer(url, width, height, control) {
    var html = ""
    + "<OBJECT ID='" + control + "Player' WIDTH='" + width + "' HEIGHT='" + height + "' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'"
    + "    STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'>"
    + "    <PARAM NAME='FileName' VALUE='" + url + "'>"
    + "    <PARAM name='autostart' VALUE='true'>"
    + "    <PARAM name='ShowControls' VALUE='false'>"
    + "    <PARAM name='ShowStatusBar' value='false'>"
    + "    <PARAM name='ShowDisplay' VALUE='false'>"
    + "    <EMBED TYPE='application/x-mplayer2' SRC='" + url + "' id='Media' NAME='" + control + "Player'"
    + "        WIDTH='" + width + "' HEIGHT='" + height + "' ShowControls='0' ShowStatusBar='0' ShowDisplay='0' autostart='1'> </EMBED>"
    + "</OBJECT>";
    document.getElementById(control).innerHTML = html; 
    
    if (isIE()) {
        document.getElementById(control + 'Player').Url = url;
    }
}


//*  Variable Settings *//
var curBio = 'gt'; //default bio without p set in querystring = Tony Marino

var shows = new Array(4);
show[0] = new Array('The Morning Edge','Get your coffee and donut ready and watch Blake Morrow and Lindsay Hall as they kick-start the broadcast day, analyzing the dynamic (spot) FOREX market. Blake and Lindsay review all the major FOREX currency pairs, the previous night’s FOREX market activity, and current news factors, and they assess the morning (spot) FOREX market movers and shakers. They report the news events and remind you of the global economic reports calendar. This show is a must-see for (spot) FOREX traders looking for validation and live analysis of the (spot) FOREX market.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/tme_mid.jpg');
shows[2] = new Array('Future Focus','Join Alan Knuckman, the president of Commodities Made Easy, and trading expert Lindsay Hall as you finish your breakfast thinking about lean hogs, the price of crude oil, and where the gold market is headed. In 30 minutes they dish up important trading information bites about the global events that drive the original supply and demand markets—the commodities markets. Alan will remind you “everything comes back to commodities,” and he will help train viewers with special attention to the highly liquid e-mini stock indices and interest rate futures that reflect dynamic conditions in the ever-changing world markets.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/fufo_mid.jpg');
shows[4] = new Array('Opening Bell','The opening bell rings and this dynamic trading duo talks you through amateur hour, evaluating Wizetrade charts you see only on WTV. This is a great time to call in and get your potential trading candidates assessed by the experts. This is one of the most popular trading shows on TV—you won&#39;t want to miss it!','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/ob_mid.jpg');
shows[5] = new Array('FAST Forward','Chris takes viewer calls and emails and evaluates the Wizetrade charts, all while answering a broad range of trading questions about the stock market, stock trade styles, and money management. The last segment of this hour is a fast-paced analysis of Wizetrade charts on your stock picks. Call in and talk to Chris or send in your email and find out if your trading choice meets the Wizetrade criteria!','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/ff_mid.jpg');
shows[6] = new Array('In the Money','Learn to trade options during this hour with Kathy Chaffee and Jared Levy as they recap the stock market and focus on stocks discussed in the previous day. Then the experts take a look at the day&#39;s biggest news headlines to see how they affect the charts. "Kathy&#39;s Options Trading Camp" discusses options trading strategies as she takes calls and emails based on the option strategy of the day. Options Made Easy® chart analysis rounds out the hour based on questions form traders like you.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/itm_mid.jpg');
shows[7] = new Array('Greek Speak','Kathy Chaffee and Jared Levy continue their expert options analysis into this second hour of options trading analysis. They discuss how the market is moving, scan for put and call strategies, and evaluate the Options Made Easy charts. Jared shares his "Sammich Specials," stocks that make a run in the morning, pull back, and then continue their run in the afternoon. They also take a look at the day&#39;s top trading charts and decide whether to keep them or kick them off the Top Ten List. Traders call and email to get expert trading analysis of their options trades. Watch WTV, Eye on Options, and get a grip on your options trading.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/gs_mid.jpg');
shows[8] = new Array('WizeStreet','Co-host Tony Marino joins Wizetrade creator and software president George Thompson for this incredible hour of Wizetrade chart analysis. This hour leans toward the basics, with George focusing on the “Thompson Trade” using the Wizetrade trend recognition software. This hour recaps where the market has been trending and looks at where it&#39;s going, plus tracks the hot stocks of the morning. Learn as you watch the Wizetrade charts along with George&#39;s expert analysis, live in the market. Special guests often show up or call in, and trader’s calls are always welcome.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/wstr_mid.jpg');
shows[9] = new Array('Closing Bell','George and Tony return to count down the close of the U.S. equities market. They look at how the market performed throughout the day and then evaluate the Wizetrade charts live in the market. George puts his "news is noise" theory to the test and takes a look at how stocks moved due to (or, usually, in spite of) specific news events. George and Tony also look at the "Extreme Green" charts of the stocks selected by successful viewers','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/cb_mid.jpg');
shows[10] = new Array('Market Wrap','Alan and Tony team up to go over the day’s activities covering all the markets. They will analyze viewer’s charts, discuss potential set-ups for the following morning, and give an overall diagnosis of what happened in the markets that day. No buy, hold or sell advice, but the chart analysis and market debriefing on Market Wrap is guaranteed to be fun and enlightening.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/mw_mid.jpg');
shows[11] = new Array('Command Central','','');
shows[1] = new Array('On the Spot','On the Spot focuses on questions from currency traders and discusses daily topics of interest to the viewers. This highly rated FOREX training program covers: trading different currency pairs, timing your potential entries and exits, FOREX trading strategies such as Scalping, and trading with the trend using the 4X Made Easy® software. Whether you’re a novice or a pro, WTV’s On the Spot FOREX trading program is designed to boost your currency trading confidence.','http://ads2-27261/wizetradetv/stream/App_Themes/Player/images/logos/ots_mid.jpg');

//**** Make sure getElementById works ****//
function toggle(obj)
{
    if(document.getElementById){
        if(document.getElementById(obj).className == "faqHide")
        {
            document.getElementById(obj).className = "faqShow";
        }else{
            document.getElementById(obj).className = "faqHide";
        }
    }
    else if(document.all){
        if(document.all[obj].className == "faqHide")
        {
            document.all[obj].className = "faqShow";
        }else{
            document.all[obj].className = "faqHide";
        }
    }
    return true;
}

function isIE() {
    var msie = false;
	var agent = navigator.userAgent.toLowerCase();
	if(agent.indexOf('msie')>-1) msie = true;
	return msie;
}

function show(id){
    try
    {
        document.getElementById(id).style.visibility = 'visible';
        document.getElementById(id).style.display = 'block';
    }catch(err){alert('Could not show:' + id);}
}

function hide(id){
    try
    {
        document.getElementById(id).style.visibility = 'hidden';
        document.getElementById(id).style.display = 'none';
    }catch(err){alert('Could not hide:' + id);}
}


function setZindex(id,newZ){
    document.getElementById(id).style['zIndex'] = newZ;
}

function swapBio(id){
    hide(curBio);
    curBio = id;
    show(id);
}

function toggleVisiblity(id)
{
    if(document.getElementById(id).style.visibility == "visible")
    {
        document.getElementById(id).style.visibility = "hidden";
        document.getElementById(id).style.display = "none";
    }
    else
    {
        document.getElementById(id).style.visibility = "visible";
        document.getElementById(id).style.display = "block";
    }
}

//Methods used for default form submit of enter key press
//Must have where multiple forms exist
var __defaultFired = false;
function WebForm_FireDefaultButton(event, target) {
    if (!__defaultFired && event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) {
        var defaultButton = document.getElementById(target);
        if (defaultButton && typeof(defaultButton.click) != "undefined") {
            __defaultFired = true;
            defaultButton.click();
            event.cancelBubble = true;
            if (event.stopPropagation) event.stopPropagation();
            return false;
        }
    }
    return true;
}
