﻿// JScript File
var GlobalFormIdCR
function CRTabSelected(TabId){
    if(TabId == 1){
        FAS = "on"
        BOL = "off"
        //Bottom styles
        document.getElementById(GlobalFormIdCR + "_cr_bottom_left_CR0").className = "cr_on_txtleft"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_fill_CR0").className = "cr_on_txt"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_space_CR0").className = "cr_bottom_leftspace"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_fill_CR1").className = "cr_on_bottomtxt"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_right_CR1").className = "cr_on_bottomright"
        //Show Find A Store Content
        document.getElementById(GlobalFormIdCR + "_rpv_cr_0").style.display = "block"
        document.getElementById(GlobalFormIdCR + "_rpv_cr_1").style.display = "none"
    } else {
        FAS = "off"
        BOL = "on"
        //Bottom styles
        document.getElementById(GlobalFormIdCR + "_cr_bottom_left_CR0").className = "cr_on_bottomleft"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_fill_CR0").className = "cr_on_bottomtxt"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_space_CR0").className = "cr_bottom_rightspace"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_fill_CR1").className = "cr_on_txt"
        document.getElementById(GlobalFormIdCR + "_cr_bottom_right_CR1").className = "cr_on_txtright"
        //Show Buy Online Content
        document.getElementById(GlobalFormIdCR + "_rpv_cr_0").style.display = "none"
        document.getElementById(GlobalFormIdCR + "_rpv_cr_1").style.display = "block"
    }
    document.getElementById(GlobalFormIdCR + "_cr_top_left_CR0").className = "cr_" + FAS + "_topleft"
    document.getElementById(GlobalFormIdCR + "_cr_top_fill_CR0").className = "cr_" + FAS + "_topfill"
    document.getElementById(GlobalFormIdCR + "_cr_top_right_CR0").className = "cr_" + FAS + "_topright"
    document.getElementById(GlobalFormIdCR + "_cr_top_left_CR1").className = "cr_" + BOL + "_topleft"
    document.getElementById(GlobalFormIdCR + "_cr_top_fill_CR1").className = "cr_" + BOL + "_topfill"
    document.getElementById(GlobalFormIdCR + "_cr_top_right_CR1").className = "cr_" + BOL + "_topright"
    document.getElementById(GlobalFormIdCR + "_cr_txt_left_CR0").className = "cr_" + FAS + "_txtleft"
    document.getElementById(GlobalFormIdCR + "_cr_txt_fill_CR0").className = "cr_" + FAS + "_txt"
    document.getElementById(GlobalFormIdCR + "_cr_txt_right_CR0").className = "cr_" + FAS + "_txtright"
    document.getElementById(GlobalFormIdCR + "_cr_txt_left_CR1").className = "cr_" + BOL + "_txtleft"
    document.getElementById(GlobalFormIdCR + "_cr_txt_fill_CR1").className = "cr_" + BOL + "_txt"
    document.getElementById(GlobalFormIdCR + "_cr_txt_right_CR1").className = "cr_" + BOL + "_txtright"
        
}

function RelatedCardio(Identifier, Type){
    switch(Type){
        case 1:
            window.location.href="/articles.aspx?ArticleTitle=" + Identifier;
            break;
        case 2:
            try {
                var oWnd = radopen("/cardiocontent.aspx?Control=" + Identifier , "");
                oWnd.set_title("Centrum &reg;:: Cardio Content");
                oWnd.setSize(699,500);
                document.getElementById("CentrumTop").focus()
                oWnd.moveTo(100,50);
                oWnd.center();
            } catch(err) {
                window.location.href = window.location.href
            }
            break;
        case 3:
            try {
                var oWnd = radopen("/cardiocontent.aspx?Control=" + Identifier , "");
                oWnd.set_title("Centrum &reg;:: Cardio Content");
                oWnd.setSize(697,460);
                document.getElementById("CentrumTop").focus()
                oWnd.moveTo(100,50);
                oWnd.center();
            } catch(err) {
                window.location.href = window.location.href
            }
            break;    
        case 4:
            window.open("/pdfs/heart-smart-tips.pdf", "HeartSmart", "")
            break;
        case 5:
            try {
                var oWnd = radopen("/cardiocontent.aspx?Control=" + Identifier , "");
                oWnd.set_title("Centrum &reg;:: Cardio Content");
                oWnd.setSize(702,490);
                document.getElementById("CentrumTop").focus()
                oWnd.moveTo(100,50);
                oWnd.center();
            } catch(err) {
                window.location.href = window.location.href
            }
            break;
        case 6:
            try {
                var oWnd = radopen("/cardiocontent.aspx?Control=" + Identifier , "");
                oWnd.set_title("Centrum &reg;:: Cardio Content");
                oWnd.setSize(715,690);
                document.getElementById("CentrumTop").focus()
                oWnd.moveTo(100,50);
                oWnd.center();
            } catch(err) {
                window.location.href = window.location.href
            }
            break;    
    }
}
