//function here
function openChat() {
 var win = window.open('http://www.futurespress.com/LiveChat/Chat.aspx', 'FuturesLiveChat', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=603,height=510');
 win.focus();
 win.opener = window;
 return false;
}
function openOurBrochure() {
    var winDef = 'status=no,resizable=no,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(680).concat(',').concat('width=').concat(1000).concat(',');
    winDef = winDef.concat('top=').concat((screen.height - 680) / 2).concat(',');
    winDef = winDef.concat('left=').concat((screen.width - 1000) / 2);
    newwin = open('Futures-Press-Brochure-Online-Format.aspx', 'FuturesPressBrochureOnlineFormat', winDef);
    //return false;
}

function openProspectQualifyingCheckSheet() {
    var winDef = 'status=no,resizable=no,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(680).concat(',').concat('width=').concat(1000).concat(',');
    winDef = winDef.concat('top=').concat((screen.height - 680) / 2).concat(',');
    winDef = winDef.concat('left=').concat((screen.width - 1000) / 2);
    newwin = open('Prospect-Qualifying-Check-Sheet.aspx', 'SampleQualifyingWorksheet', winDef);
    //return false;
}
var id;
function openPlayer(id) {
    var winDef = 'status=no,resizable=no,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(210).concat(',').concat('width=').concat(420).concat(',');
    winDef = winDef.concat('top=').concat((screen.height - 210) / 2).concat(',');
    winDef = winDef.concat('left=').concat((screen.width - 420) / 2);
    newwin = open('tips-listen.aspx?id=' + id, 'TipsListen', winDef);
    //return false;
}


$(document).ready(function() {
    var version = 999; // we assume a sane browser
    if (navigator.appVersion.indexOf("MSIE") != -1)
        version = parseFloat(navigator.appVersion.split("MSIE")[1]);
    if (version <= 6) {
        // fix height        
        if ($('#middle-welcome').height() != null) {
            var height = $('#middle-welcome').height();
            $('#right').height(height);
            $('.fix-content-welcome').height(height);
        }
        else {
            var height = $('#content').height();
            $('.c_left').height(height);
            $('.c_right').height(height);
        }
    }
    // Menu
    $("#treeMenu").treeview({
        collapsed: true,
        animated: "medium",
        persist: "location"
    });
    //Site Map
    $("#treeSiteMap").treeview({
        animated: "medium",
        persist: "location"
    });

    $(".showChild").click(function() {

        var status = $(this).parent().find(">ul").attr("style").toLowerCase();
        if (status == "display: none;" || status == "display: none" || status == "display:none;" || status == "display: none; ") {
            $(this).parent().removeClass("expandable");
            $(this).parent().addClass("collapsable");
            $(this).parent().find(">ul").slideDown("fast");
            $(this).find("span").addClass("open");
        }
        else {
            $(this).parent().removeClass("collapsable");
            $(this).parent().addClass("expandable");
            $(this).parent().find(">ul").slideUp("fast");
            $(this).find("span").removeClass("open");
            //$(this).find("img").attr("src", "App_Resource/Icons/close.gif");            
        }
    });
    $(".fpdf").click(function() {
        $(".selected").removeClass("selected");
        $(this).addClass("selected");

    });
    $('.b_register').hover(
		 function() {
		     $(this).addClass('b_register-hover');
		 },
		 function() {
		     $(this).removeClass('b_register-hover');
		 }
	);
    $('.b_login').hover(
		 function() {
		     $(this).addClass('b_login-hover');
		 },
		 function() {
		     $(this).removeClass('b_login-hover');
		 }
	);
	  

});


function salesHelpPopup() {
    alert("Available to Active Lead Customers Only.\nContact support@futurespress.com for more information.");
    return false;
}


