﻿function fireSpotlight(action) {
    // Random number to prevent caching
    var axel = Math.random() + "";
    var a = axel * 10000000000000;
    var src;
    // Switch on page action
    //NOTE: This function could use variables instead, but I figure it's easier to just paste the entire string in from the source.
    //Also, some pages require tags to use SSL.  This would complicate the variable usage.
    switch (action) {
        case "Thankyou_Box":
            // Activity Name for this tag is: Thankyou_Box 
            src = 'https://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=thank017;ord=1;num=' + a + '?';
            break;
        case "ExistingMember_BxTops":
            // Activity Name for this tag is: ExistingMember_BxTops
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=exist763;ord=' + a + '?';
            break;
        case "ExistingMember_BxTops_Secure":
            // Activity Name for this tag is: ExistingMember_BxTops
            src = 'https://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=exist763;ord=' + a + '?';
            break;
        case "Login_Box":
            // Activity Name for this tag is: Login_Box
            src = 'https://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=login111;ord=1;num=' + a + '?';
            break;
        case "HP_Box":
            // Activity Name for this tag is: HP_Box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=hpbox069;ord=1;num=' + a + '?';
            break;
        case "view_coupon_box":
            // Activity Name for this tag is: view_coupon_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=viewc593;ord=1;num=' + a + '?';
            break;
        case "print_coupon_box":
            // Activity Name for this tag is: print_coupon_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=print233;ord=1;num=' + a + '?';
            break;
        case "search_box":
            // Activity Name for this tag is: search_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=searc831;ord=1;num=' + a + '?';
            break;
        case "Join_Box":
            // Activity Name for this tag is: Join_Box
            src = 'https://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=joinb090;ord=1;num=' + a + '?';
            break;
        case "LP_Box_Passion":
            // Activity Name for this tag is: LP_Box_Passion
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=lpbox720;ord=1;num=' + a + '?';
            break;
        case "view_board_box":
            // Activity Name for this tag is: view_board_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=thank876;ord=1;num=' + a + '?';
            break;
        case "comment_board_box":
            // Activity Name for this tag is: comment_board_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=comme075;ord=1;num=' + a + '?';
            break;
        case "post_board_box":
            // Activity Name for this tag is: post_board_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=postb028;ord=1;num=' + a + '?';
            break;
        case "add_rss_box":
            // Activity Name for this tag is: add_rss_box
            src = 'http://fls.doubleclick.net/activityi;src=1869704;type=betty078;cat=addrs070;ord=1;num=' + a + '?';
            break;
        default:
            // JS Console error output (trackable in Firebug)
            console.log(action + ": Activity Not Found");
    }
    document.getElementById("spotlightFrame").src = src;
}