﻿var thisinterval_id = 0;
var fadecapa;
var lightvdeo;
function PreLoadFlash(strURLVdo) 
{
    var FlashVdo = new Object();
    FlashVdo.src = strURLVdo;
}
function OpenTVFVideo(strURLVdo) 
{
    lightvdeo = document.getElementById("light_tvf_vdo");

    lightvdeo.innerHTML = "<div class='close_vdo_lnk'><a id='close_video' href='javascript:void(0)' onclick='CloseTVFVideo();'><img src='videos_tvf/cerrar-video.gif' /></a></div>" +
            "<div class='loading_vdo'><img src='videos_tvf/video-loading.gif' /></div>" +
            "<div class='vdo_content'>" +
	        "<center>" +
	        "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='800' height='600' align='middle'>" +
	        "<param name='allowScriptAccess' value='never' />" +
            "<param name='allowNetworking' value='internal' />" +
            "<param name='movie' value='" + strURLVdo + "' />" +
            "<param name='wmode' value='transparent' />" +
            "<param name='quality' value='high' />" +
            "<param name='bgcolor' value='ffffff' />" +
            "<embed type='application/x-shockwave-flash' allowScriptAccess='never' allowNetworking='internal' " +
            "src='" + strURLVdo + "' width='800' height='600' align='middle' " +
            "wmode='transparent' quality='high' bgcolor='ffffff' />" +
            "</center>" +
            "</div>";
            
    fadecapa = document.getElementById('fade_tvf_vdo');
    fadecapa.style.height = document.body.style.height;

    thisinterval_id = setInterval(ShowFideVideo, 250);
}
function ShowFideVideo() {
    clearInterval(thisinterval_id);
    fadecapa.style.display = "block";
    thisinterval_id = setInterval(ShowRealVideo, 500);
}
function ShowRealVideo() {
    clearInterval(thisinterval_id);
    lightvdeo.style.display = "block";
    window.scroll(0, 0);
}
function CloseTVFVideo() {
    var lightvdeo2 = document.getElementById("light_tvf_vdo");
    lightvdeo2.innerHTML = "";
    lightvdeo2.style.display = "none";
    document.getElementById('fade_tvf_vdo').style.display = "none";
}
function valinume(texto) 
{
    if (isNaN(texto)) return "";
    return texto;
}
function js_redirect(URL) {
    try
    {
        navigate(URL);
    }
    catch(err)
    {
        location=URL;
    }
}
function OpenLiveChat() 
{
    lpButtonCTTUrl = 'http://server.iad.liveperson.net/hc/20692277/?cmd=file&file=visitorWantsToChat&site=20692277&imageUrl=http://www.tradeviewfx.com/images/chat/boton&referrer=' + escape(document.location);
    lpButtonCTTUrl = (typeof (lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl);
    window.open(lpButtonCTTUrl, 'chat20692277', 'width=475,height=400,resizable=yes');
}
function showclientlogin() {
    document.getElementById("clientloginmenu").style.display = "inline";
}
function hideclientlogin() {
    document.getElementById("clientloginmenu").style.display = "none";
}