

var sVideoPlayerPath='/_modules/framePlayer.html';
var sAdmDiagSettings='';

var aClip = new Array();

aClip[0] = new Clip( '2943','DailyNewsItem:NEWS','','http://www.sbtv.com/content/dailynews/DN032010_Wrap_v120.flv',
'',
'',
'',
'',
'120',
"SBTV Daily News for March 21, 2010",
"SBTV Daily News for March 21, 2010",
0,
'5662_02@0,5662_02@45,5662_02@90'
);

aClip[1] = new Clip( '2640','Advertisments','f','http://www.sbtv.com/content/bumps/SBTVCommercialmxdn_v31.flv',
'',
'',
'',
'',
'31',
"SBTV.com",
"David Commercial",
0,
'5662_02@15'
);

aClip[2] = new Clip( '1112','SBTVContent','','http://www.sbtv.com/content/segments/CFBeachBum_v537.flv',
'http://bbeplayer.com/Tracking/V2/Instream/Clickthrough/?113C2DC0-C41C-40A3-B94C-632E29C5C850',
'',
'',
'',
'537',
"Cube Fabulous: Beach Bum",
"Cube Fabulous: Beach Bum",
0,
'5662_02@29,5662_02@74,5662_02@119,5662_02@164,5662_02@209,5662_02@254,5662_02@299,5662_02@344,5662_02@389,5662_02@434,5662_02@479,5662_02@524'
);

aClip[3] = new Clip( '2920','Advertisments','aflac','http://www.sbtv.com/content/ads/aflac/AFLAC_NO_COST_1280_url_v.flv',
'http://altfarm.mediaplex.com/ad/ck/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0'
);

aClip[4] = new Clip( '1372','SBTVContent','','http://www.sbtv.com/content/segments/Samspackage2007_v240.flv',
'',
'',
'',
'',
'240',
"Big Box Businesses Offer Perks Especially for Small Business",
"Big Box Businesses Offer Perks Especially for Small Business",
0,
'5662_02@2,5662_02@47,5662_02@92,5662_02@137,5662_02@182,5662_02@227'
);

aClip[5] = new Clip( '2640','Advertisments','f','http://www.sbtv.com/content/bumps/SBTVCommercialmxdn_v31.flv',
'',
'',
'',
'',
'31',
"SBTV.com",
"David Commercial",
0,
''
);

aClip[6] = new Clip( '1339','SBTVContent','','http://www.sbtv.com/content/segments/DT_7steps7_v610.flv',
'',
'',
'',
'',
'610',
"Creating a Small Business Marketing Calendar & Budget",
"Creating a Small Business Marketing Calendar & Budget",
0,
'5662_02@1,5662_02@46,5662_02@91,5662_02@136,5662_02@181,5662_02@226,5662_02@271,5662_02@316,5662_02@361,5662_02@406,5662_02@451,5662_02@496,5662_02@541,5662_02@586'
);

aClip[7] = new Clip( '2920','Advertisments','aflac','http://www.sbtv.com/content/ads/aflac/AFLAC_NO_COST_1280_url_v.flv',
'http://altfarm.mediaplex.com/ad/ck/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0,5662_02@21'
);

aClip[8] = new Clip( '329','SBTVContent','','http://www.sbtv.com/content/segments/ENTAsktheexpert_v223.flv',
'',
'',
'',
'',
'223',
"Small Business Market Research Tips",
"Small Business Market Research Tips",
0,
'5662_02@36,5662_02@81,5662_02@126,5662_02@171,5662_02@216'
);

aClip[9] = new Clip( '2640','Advertisments','f','http://www.sbtv.com/content/bumps/SBTVCommercialmxdn_v31.flv',
'',
'',
'',
'',
'31',
"SBTV.com",
"David Commercial",
0,
''
);

aClip[10] = new Clip( '3044','SBTVContent','','http://www.sbtv.com/content/segments/MostPopularWay_v799.flv',
'',
'',
'',
'',
'799',
"Boomer Entrepreneurs - The Most Popular Ways To Start A Business Over 50",
"Boomer Entrepreneurs - The Most Popular Ways To Start A Business Over 50",
0,
'5662_02@7,5662_02@52,5662_02@97,5662_02@142,5662_02@187,5662_02@232,5662_02@277,5662_02@322,5662_02@367,5662_02@412,5662_02@457,5662_02@502,5662_02@547,5662_02@592,5662_02@637,5662_02@682,5662_02@727,5662_02@772'
);

aClip[11] = new Clip( '2920','Advertisments','aflac','http://www.sbtv.com/content/ads/aflac/AFLAC_NO_COST_1280_url_v.flv',
'http://altfarm.mediaplex.com/ad/ck/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0,5662_02@18'
);

aClip[12] = new Clip( '364','SBTVContent','','http://www.sbtv.com/content/segments/ontic_v224.flv',
'',
'',
'',
'',
'224',
"OnticEngineering Ted Allred",
"OnticEngineering Ted Allred",
0,
'5662_02@33,5662_02@78,5662_02@123,5662_02@168,5662_02@213'
);

aClip[13] = new Clip( '2640','Advertisments','f','http://www.sbtv.com/content/bumps/SBTVCommercialmxdn_v31.flv',
'',
'',
'',
'',
'31',
"SBTV.com",
"David Commercial",
0,
''
);

aClip[14] = new Clip( '360','SBTVContent','','http://www.sbtv.com/content/segments/davinWedel_v222.flv',
'',
'',
'',
'',
'222',
"DAVIN WEDEL GLOBAL PROTECTION CORP.",
"DAVIN WEDEL GLOBAL PROTECTION CORP.",
0,
'5662_02@3,5662_02@48,5662_02@93,5662_02@138,5662_02@183'
);

aClip[15] = new Clip( '2920','Advertisments','aflac','http://www.sbtv.com/content/ads/aflac/AFLAC_NO_COST_1280_url_v.flv',
'http://altfarm.mediaplex.com/ad/ck/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0,5662_02@6'
);

aClip[16] = new Clip( '440','SBTVContent','','http://www.sbtv.com/content/segments/campStartup_v225.flv',
'',
'',
'',
'',
'225',
"Camp Startup",
"Camp Startup",
0,
'5662_02@21,5662_02@66,5662_02@111,5662_02@156,5662_02@201'
);

aRawContent = new Array();
aRawContent[2943] = new RawContent( 
2943,
'DailyNewsItem:NEWS',
'',
"SBTV Daily News for March 21, 2010",
'',
'http://www.sbtv.com/content/dailynews/DN032010_Wrap_v120.flv',
'0'
);

aRawContent[1112] = new RawContent( 
1112,
'SBTVContent',
'',
"Cube Fabulous: Beach Bum",
'',
'http://www.sbtv.com/content/segments/CFBeachBum_v537.flv',
'1112'
);

aRawContent[1372] = new RawContent( 
1372,
'SBTVContent',
'',
"Big Box Businesses Offer Perks Especially for Small Business",
'',
'http://www.sbtv.com/content/segments/Samspackage2007_v240.flv',
'1372'
);

aRawContent[1339] = new RawContent( 
1339,
'SBTVContent',
'',
"Creating a Small Business Marketing Calendar & Budget",
'',
'http://www.sbtv.com/content/segments/DT_7steps7_v610.flv',
'1339'
);

aRawContent[329] = new RawContent( 
329,
'SBTVContent',
'',
"Small Business Market Research Tips",
'',
'http://www.sbtv.com/content/segments/ENTAsktheexpert_v223.flv',
'329'
);

aRawContent[3044] = new RawContent( 
3044,
'SBTVContent',
'',
"Boomer Entrepreneurs - The Most Popular Ways To Start A Business Over 50",
'',
'http://www.sbtv.com/content/segments/MostPopularWay_v799.flv',
'3044'
);

aRawContent[364] = new RawContent( 
364,
'SBTVContent',
'',
"OnticEngineering Ted Allred",
'',
'http://www.sbtv.com/content/segments/ontic_v224.flv',
'364'
);

aRawContent[360] = new RawContent( 
360,
'SBTVContent',
'',
"DAVIN WEDEL GLOBAL PROTECTION CORP.",
'',
'http://www.sbtv.com/content/segments/davinWedel_v222.flv',
'360'
);

aRawContent[440] = new RawContent( 
440,
'SBTVContent',
'',
"Camp Startup",
'',
'http://www.sbtv.com/content/segments/campStartup_v225.flv',
'440'
);



aVideoAd = new Array();

aVideoAd[2912] = new VideoAd( 
2912,
'ac',
'',
'http://www.sbtv.com/content/ads/a/ALBC0729SpotInfomercial_web_v.flv',
'http://clk.atdmt.com/MSI/go/167307327/direct/01/',
'http://view.atdmt.com/MSI/view/167307327/direct/01/',
'',
'',
16.00,
'Alibaba',
'Alibaba Preroll Content',
'08-12-09',
'12-01-09',
0,
2165,
3000,
19000000,
0,
'past EndDate'
);


aVideoAd[2911] = new VideoAd( 
2911,
'att',
'',
'http://www.sbtv.com/content/ads/a/ALBC0729SpotInfomercial_web_v.flv',
'http://clk.atdmt.com/MSI/go/167307240/direct/01/',
'http://view.atdmt.com/MSI/view/167307240/direct/01/',
'',
'',
16.00,
'Alibaba',
'Alibaba ROS',
'08-12-09',
'12-01-09',
0,
2167,
3000,
19000000,
0,
'past EndDate'
);


aVideoAd[2641] = new VideoAd( 
2641,
'f',
'',
'http://www.sbtv.com/content/segments/SEMA2007ThildePetersonPromo_v58.flv',
'',
'',
'',
'',
58.00,
'SBTV.com Audience Speaks Out',
'Thilde Peterson',
'01-09-08',
'12-06-09',
0,
2538777,
1,
10000000,
0,
'past EndDate'
);


aVideoAd[2766] = new VideoAd( 
2766,
'',
'',
'http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
13.00,
'Alyssa Milano on SBTV.com',
'Alyssa Milano',
'09-29-08',
'12-19-09',
0,
1521801,
3000,
50000000,
0,
'past EndDate'
);


aVideoAd[2917] = new VideoAd( 
2917,
'ltsd',
'',
'http://www.sbtv.com/content/ads/ltsd/LightSpeed_Pricing_2m06s_v126.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|30397|21567|4353|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21567|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21567|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21567|4353|92||BBEEND|%15:32:12%',
126.00,
'Lightspeed Pricing',
'Lightspeed Pricing',
'01-05-10',
'01-18-10',
0,
8,
10000,
100000,
0,
'past EndDate'
);


aVideoAd[2918] = new VideoAd( 
2918,
'ltsd',
'',
'http://www.sbtv.com/content/ads/ltsd/NULightSpeed_Step_Up_Your_Game_1m53s_v113LL.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|30397|21568|4353|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21568|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21568|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21568|4353|92||BBEEND|%15:32:12%',
113.00,
'Lightspeed Step',
'Lightspeed Step',
'01-05-10',
'01-18-10',
0,
8,
10000,
100000,
0,
'past EndDate'
);


aVideoAd[2916] = new VideoAd( 
2916,
'ltsd',
'',
'http://www.sbtv.com/content/ads/ltsd/LightSpeed_Forget_Being_Lucky_1m47s_v167.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|30397|21566|4353|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21566|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21566|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21566|4353|92||BBEEND|%15:32:12%',
167.00,
'Lightspeed Forget',
'Lightspeed Forget',
'01-05-10',
'01-18-10',
0,
11,
10000,
100000,
0,
'past EndDate'
);


aVideoAd[2915] = new VideoAd( 
2915,
'ltsd',
'',
'http://www.sbtv.com/content/ads/ltsd/NULightSpeed_All_The_Bells_And_Whistles_2m41s_v161LL.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|30397|21565|4353|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21565|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21565|4353|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21565|4353|92||BBEEND|%15:32:12%',
161.00,
'Lightspeed Bells',
'Lightspeed Bells',
'01-05-10',
'01-18-10',
0,
9,
10000,
100000,
0,
'past EndDate'
);


aVideoAd[2914] = new VideoAd( 
2914,
'cay',
'',
'http://www.sbtv.com/content/ads/cayman/StingrayCityOfferAudio-QuickTime H.264400K_Stream_400x300.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|31781|22397|4543|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|31781|22397|4543|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|31781|22397|4543|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|31781|22397|4543|92||BBEEND|%15:32:12%',
15.00,
'Cayman Islands',
'Cayman Islands Commercial',
'01-05-10',
'01-20-10',
0,
12,
2083,
50000,
0,
'past EndDate'
);


aVideoAd[2919] = new VideoAd( 
2919,
'staple',
'',
'http://www.sbtv.com/content/ads/staples/QSTA9054000_SBTV_src_fps.flv',
'http://ad.doubleclick.net/clk;221348998;44629022;o',
'http://ad.doubleclick.net/ad/N3158.SBTV/B4174931;sz=1x1;ord=[15:32:12.755]?',
'',
'',
16.00,
'Staples',
'Staple ROS',
'01-28-10',
'01-31-10',
0,
6,
2000,
8000,
0,
'past EndDate'
);


aVideoAd[2921] = new VideoAd( 
2921,
'tabs',
'',
'http://www.sbtv.com/content/ads/3M/tabs/Post-it-Tabs_A-Million-Uses-Offer-Tag_FINAL.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|32106|22647|4639|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32106|22647|4639|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32106|22647|4639|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32106|22647|4639|92||BBEEND|%15:32:12%',
31.00,
'3M Post it Tabs',
'3M Post it Tabs',
'01-28-10',
'02-11-10',
0,
17,
16667,
250000,
0,
'past EndDate'
);


aVideoAd[2923] = new VideoAd( 
2923,
'vw',
'',
'http://www.sbtv.com/content/ads/volkswagen/PunchDub30Final400K_Stream_400x300.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|32484|23091|4685|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32484|23091|4685|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32484|23091|4685|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32484|23091|4685|92||BBEEND|%15:32:12%',
32.00,
'Volkswagen',
'Volkswagen',
'02-08-10',
'02-19-10',
0,
17,
25000,
300000,
0,
'past EndDate'
);


aVideoAd[2922] = new VideoAd( 
2922,
'labels',
'',
'http://www.sbtv.com/content/ads/3M/labels/PostItLabels_Someday_30th_Year_Logo_Edit_12.16.09400K_Stream_400x300.flv',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|32176|22908|4645|92|BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32176|22908|4645|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32176|22908|4645|92||BBEEND|%15:32:12%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32176|22908|4645|92||BBEEND|%15:32:12%',
31.00,
'3M Post it Labels',
'3M Post it Labels',
'01-28-10',
'02-23-10',
0,
35,
1471,
50000,
0,
'past EndDate'
);


aVideoAd[2704] = new VideoAd( 
2704,
'',
'',
'http://www.sbtv.com/content/ads/3M/Cisco.flv',
'',
'http://www.sbtv.com/content/ads/3M/Cisco_preroll.asp',
'',
'',
15.00,
'Cisco',
'Cisco Preroll',
'09-01-09',
'10-01-09',
0,
48705,
1,
1,
1,
'PI_Total > GoalPI, Archive=1, past EndDate'
);


aVideoAd[2640] = new VideoAd( 
2640,
'f',
'',
'http://www.sbtv.com/content/bumps/SBTVCommercialmxdn_v31.flv',
'',
'',
'',
'',
31.00,
'SBTV.com',
'David Commercial',
'09-15-08',
'11-02-10',
0,
1774934,
5000,
10000000,
0,
''
);


aVideoAd[2924] = new VideoAd( 
2924,
'toyota',
'',
'http://www.sbtv.com/content/ads/toyota/ronny_toyota.flv',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Clickthrough/?12|33074|23589|4708|92|BBEEND|%15:32:12%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|33074|23589|4708|92||HEADER|BBEEND|%15:32:12%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|33074|23589|4708|92||HEADER|BBEEND|%15:32:12%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|33074|23589|4708|92||HEADER|BBEEND|%15:32:12%',
30.00,
'Toyota',
'Toyota',
'03-05-10',
'03-20-10',
0,
22,
8500,
100000,
0,
'past EndDate'
);


aVideoAd[2920] = new VideoAd( 
2920,
'aflac',
'',
'http://www.sbtv.com/content/ads/aflac/AFLAC_NO_COST_1280_url_v.flv',
'http://altfarm.mediaplex.com/ad/ck/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[03:32:55932.769323]',
'',
'',
30.00,
'Aflac',
'Aflac Ros',
'01-28-10',
'06-30-10',
0,
76,
3240,
500000,
0,
''
);



aBannerAd = new Array();

aBannerAd[5341] = new BannerAd( 
5341,
'2',
'160X600',
'',
45.00,
'FedEx webcast 160x600',
'05-02-08',
'12-01-09',
0,
2565205,
1,
1000000,
0,
'PI_Total > GoalPI, past EndDate',
0,
0,
''
);


aBannerAd[5387] = new BannerAd( 
5387,
'1',
'728X90',
'',
45.00,
'FedEx Webcast 728x90',
'05-08-08',
'08-28-09',
0,
781286,
1,
1000000,
0,
'past EndDate',
1,
0,
''
);


aBannerAd[5804] = new BannerAd( 
5804,
'3',
'300X250',
'',
45.00,
'Verizon 300x250',
'07-22-09',
'10-01-09',
0,
28922,
1,
400000,
0,
'past EndDate',
2,
0,
''
);


aBannerAd[5805] = new BannerAd( 
5805,
'1',
'728X90',
'',
45.00,
'Verizon 728x90',
'07-23-09',
'10-01-09',
0,
161634,
7000,
400000,
0,
'past EndDate',
3,
0,
''
);


aBannerAd[5876] = new BannerAd( 
5876,
'2',
'160X600',
'',
45.00,
'Alibaba 160x600',
'08-12-09',
'10-01-09',
0,
82734,
600,
1000000,
0,
'past EndDate',
4,
0,
''
);


aBannerAd[5878] = new BannerAd( 
5878,
'1',
'728x90',
'',
45.00,
'SalesForce',
'10-14-09',
'11-01-09',
0,
37417,
5000,
3000000,
0,
'past EndDate',
5,
0,
''
);


aBannerAd[5879] = new BannerAd( 
5879,
'3',
'300x250',
'',
45.00,
'SalesForce',
'10-14-09',
'11-01-09',
0,
22360,
5000,
3000000,
0,
'past EndDate',
6,
0,
''
);


aBannerAd[5856] = new BannerAd( 
5856,
'3',
'300X250',
'',
45.00,
'SurePayroll Community 300x250',
'08-03-09',
'10-15-09',
0,
124183,
100000,
300000,
0,
'past EndDate',
7,
0,
''
);


aBannerAd[5381] = new BannerAd( 
5381,
'1',
'728X90',
'',
45.00,
'TechTactics 728x90',
'12-28-07',
'12-01-09',
0,
2092338,
1,
10300000,
0,
'past EndDate',
8,
0,
''
);


aBannerAd[5880] = new BannerAd( 
5880,
'3',
'300x250',
'',
45.00,
'Xcel',
'10-15-09',
'12-31-09',
0,
47081,
3500,
55000,
0,
'not on Channel, not in DMA, past EndDate',
9,
0,
''
);


aBannerAd[5790] = new BannerAd( 
5790,
'3',
'300X250',
'',
45.00,
'SunTrust Community 300x250',
'07-24-09',
'01-01-10',
0,
18379,
6000,
1000000,
0,
'past EndDate',
10,
0,
''
);


aBannerAd[5797] = new BannerAd( 
5797,
'2',
'160X600',
'',
45.00,
'SunTrust ROS 160x600',
'07-26-09',
'01-01-10',
0,
25700,
200,
300000,
0,
'past EndDate',
11,
0,
''
);


aBannerAd[5799] = new BannerAd( 
5799,
'1',
'728X90',
'',
45.00,
'SunTrust ROS 728x90',
'09-14-09',
'01-01-10',
0,
29992,
6000,
300000,
0,
'past EndDate',
12,
0,
''
);


aBannerAd[5756] = new BannerAd( 
5756,
'3',
'300X250',
'',
45.00,
'IM 300x250',
'06-11-09',
'12-31-09',
0,
52801,
1,
100000,
0,
'past EndDate',
13,
0,
''
);


aBannerAd[5758] = new BannerAd( 
5758,
'2',
'160X600',
'',
45.00,
'IM 160x600',
'06-11-09',
'12-31-09',
0,
489431,
30000,
1000000,
0,
'past EndDate',
14,
0,
''
);


aBannerAd[5757] = new BannerAd( 
5757,
'1',
'728X90',
'',
45.00,
'IM 728x90',
'01-01-09',
'01-01-10',
0,
62251,
500,
100000000,
0,
'past EndDate',
15,
0,
''
);


aBannerAd[5884] = new BannerAd( 
5884,
'3',
'300x250',
'ltsd',
45.00,
'Lightspeed',
'01-05-10',
'01-18-10',
0,
7539,
40000,
400000,
0,
'past EndDate',
16,
0,
''
);


aBannerAd[5889] = new BannerAd( 
5889,
'3',
'300x250',
'staple',
45.00,
'Staples ROS',
'01-28-10',
'01-31-10',
0,
243,
2000,
8000,
0,
'past EndDate',
17,
0,
''
);


aBannerAd[5883] = new BannerAd( 
5883,
'3',
'300x250',
'cay',
45.00,
'Cayman Islands',
'01-05-10',
'01-20-10',
0,
2846,
2083,
50000,
0,
'past EndDate',
18,
0,
''
);


aBannerAd[5882] = new BannerAd( 
5882,
'1',
'728x90',
'',
45.00,
'IBM Smart',
'12-09-09',
'02-28-10',
0,
20061,
1500,
20000,
0,
'PI_Total > GoalPI, past EndDate',
19,
0,
''
);


aBannerAd[5881] = new BannerAd( 
5881,
'3',
'300x250',
'',
45.00,
'IBM Smart',
'12-09-09',
'02-28-10',
0,
20129,
1500,
20000,
0,
'PI_Total > GoalPI, past EndDate',
20,
0,
''
);


aBannerAd[5891] = new BannerAd( 
5891,
'3',
'300x250',
'tabs',
45.00,
'3M Post it Tabs',
'01-28-10',
'02-11-10',
0,
2425,
16667,
250000,
0,
'past EndDate',
21,
0,
''
);


aBannerAd[5893] = new BannerAd( 
5893,
'3',
'300x250',
'vw',
45.00,
'Volkswagen',
'02-08-10',
'02-19-10',
0,
3579,
25000,
300000,
0,
'past EndDate',
22,
0,
''
);


aBannerAd[5885] = new BannerAd( 
5885,
'3',
'300x250',
'',
45.00,
'1and1 Value Ad Ros',
'01-28-10',
'02-28-10',
0,
5762,
159,
10000,
1,
'Archive=1, past EndDate',
23,
0,
''
);


aBannerAd[5892] = new BannerAd( 
5892,
'3',
'300x250',
'labels',
45.00,
'3M Post it Labels',
'01-28-10',
'02-23-10',
0,
7436,
1471,
50000,
0,
'past EndDate',
24,
0,
''
);


aBannerAd[5887] = new BannerAd( 
5887,
'1',
'728x90',
'',
45.00,
'1and1 ROS 728x90',
'01-28-10',
'02-28-10',
0,
14590,
450,
28936,
1,
'Archive=1, past EndDate',
25,
0,
''
);


aBannerAd[5886] = new BannerAd( 
5886,
'3',
'300x250',
'',
45.00,
'1and1 ROS 300x250',
'01-28-10',
'02-28-10',
0,
13451,
480,
30605,
1,
'Archive=1, past EndDate',
26,
0,
''
);


aBannerAd[5888] = new BannerAd( 
5888,
'3',
'300x250',
'',
45.00,
'PNC ROS 300x250',
'02-01-10',
'03-01-10',
0,
27719,
4368,
524167,
1,
'Archive=1, past EndDate',
27,
0,
''
);


aBannerAd[5644] = new BannerAd( 
5644,
'1',
'728X90',
'',
45.00,
'YHB 728x90',
'01-15-09',
'06-01-10',
2,
690922,
1,
800000,
0,
'PI > GoalDaily',
28,
0,
''
);


aBannerAd[5895] = new BannerAd( 
5895,
'3',
'300x250',
'',
45.00,
'Small Business Summit',
'03-04-10',
'03-16-10',
28,
29650,
2500,
25000,
0,
'PI_Total > GoalPI, past EndDate',
29,
0,
''
);


aBannerAd[5894] = new BannerAd( 
5894,
'1',
'728x90',
'',
45.00,
'Small Business Summit',
'03-01-10',
'03-16-10',
16,
31248,
5000,
50000,
0,
'past EndDate',
30,
0,
''
);


aBannerAd[5896] = new BannerAd( 
5896,
'3',
'300x250',
'toyota',
45.00,
'Toyota',
'03-05-10',
'03-20-10',
198,
11174,
8500,
100000,
0,
'past EndDate',
31,
0,
''
);


aBannerAd[5890] = new BannerAd( 
5890,
'3',
'300x250',
'aflac',
45.00,
'Aflac Ros',
'01-28-10',
'06-30-10',
384,
26688,
3240,
500000,
0,
'',
32,
0,
''
);


aBannerAd[5662] = new BannerAd( 
5662,
'2',
'160X600',
'',
45.00,
'Community Join 160x600',
'02-05-09',
'01-01-15',
1227,
1104953,
6000,
5000000,
0,
'',
33,
0,
''
);



// this.Location.IP2LocationMessage ><

/// this.Querystring ><

var sbtv_client_context = new SbtvClientContext(
'',
'J',
'True',
'0',
'0',
'0',
'',
'8',
'',
'0',
'0',
'0',
'38.107.191.116',
'OK',
'20007',
'OK',
'WASHINGTON',
'DC',
'511',
'71e72d89-be88-46bb-a648-6ee52412a612',
'SBTVWWW001',
'http://www.sbtv.com',
'http://cs.sbtv.com',
'tcp:www.sbtv.com',
'www.sbtv.com',
'http://www.sbtv.com'
);
var DailyNewsId=1521;
var bDailyNewsSummary=true;

var classic_path='http://www.sbtv.com';

var cs_path='http://cs.sbtv.com';

var MasterImageFolder='/images/';

var bPlayerStartMute=true;
/////////////////////////////////////////
//  adm player support

var bPlayer = 0;
var sAdmServer = '';
var diagIframe = null;
var UpdateBannerCount = 0;

function SbtvClientContext(
       sQueryString,
       sJsideBside,
       bDefaultChannel,
       sCid,
       sChannel,
       sSegid,
       sPage,
       nSBTVContentSegments,
       sFlv,
       sAdId,
       sUid,
       sDailyId,
       sIpAddress,
       sIpStatus,
       sZipCode,
       sDmaStatus,
       sCity,
       sState,
       sDMA,
       sSbtvSid,
       sMachineName,
       sWWW_Server,
       sCS_Server,
       sAdmSqlServer,
       sAdmDatabase,
       sContentServer
) {
    this.sQueryString = sQueryString;
    this.sJsideBside = sJsideBside;
    this.bDefaultChannel = bDefaultChannel;
    this.sCid = sCid;
    this.sChannel = sChannel;
    this.sSegid = sSegid;
    this.sPage = sPage;
    this.nSBTVContentSegments = nSBTVContentSegments;
    this.sFlv = sFlv;
    this.sAdId = sAdId;
    this.sUid = sUid;
    this.sDailyId = sDailyId
    this.sIpAddress = sIpAddress;
    this.sIpStatus = sIpStatus;
    this.sZipCode = sZipCode;
    this.sDmaStatus = sDmaStatus;
    this.sCity = sCity;
    this.sState = sState;
    this.sDMA = sDMA;
    this.sid = sSbtvSid;
    this.sMachineName = sMachineName;
    this.sWWW_Server = sWWW_Server;
    this.sCS_Server = sCS_Server;
    this.sAdmSqlServer = sAdmSqlServer;
    this.sAdmDatabase = sAdmDatabase;
    this.sContentServer = sContentServer;
}

function RawContent(
    clip_id,
    clip_type,
    bIsAd,
    sTitle,
    clusterkey,
    contentPath,
    default_id
) {
    this.clip_id = clip_id;
    this.clip_type = clip_type;
    this.bAd = bIsAd;
    this.sTitle = sTitle;
    this.clusterkey = clusterkey;
    this.contentPath = contentPath;
    this.default_id = default_id;
}

function VideoAd(
    clip_id,
    clusterkey,
    admOverrideContext,
    contentPath,
    videoClickTag,
    videoStartTag,
    videoMiddleTag,
    videoFinishTag,
    duration,
    title,
    description,
    StartDate,
    EndDate,
    PI,
    PI_Total,
    GoalDaily,
    GoalPI,
    Archive,
    sAdmRemark
) {
    this.clip_id = clip_id;
    this.clusterkey = clusterkey;
    this.admOverrideContext = admOverrideContext;
    this.contentPath = contentPath;
    this.videoClickTag = videoClickTag;
    this.videoStartTag = videoStartTag;
    this.videoMiddleTag = videoMiddleTag;
    this.videoFinishTag = videoFinishTag;
    this.duration = duration;
    this.title = title;
    this.description = description;
    this.StartDate = StartDate;
    this.EndDate = EndDate;
    this.PI = PI;
    this.PI_Total = PI_Total;
    this.GoalDaily = GoalDaily;
    this.GoalPI = GoalPI;
    this.Archive = Archive;
    this.sAdmRemark = sAdmRemark;
}

function BannerAd(
    uid,
    zone,
    AdUnitSize,
    clusterkey,
    duration,
    title,
    StartDate,
    EndDate,
    PI,
    PI_Total,
    GoalDaily,
    GoalPI,
    Archive,
    sAdmRemark,
    list_order,
    cap,
    cap_hours
) {
    this.uid = uid;
    this.zone = zone;
    this.AdUnitSize = AdUnitSize;
    this.clusterkey = clusterkey;
    this.duration = duration;
    this.title = title;
    this.StartDate = StartDate;
    this.EndDate = EndDate;
    this.PI = PI;
    this.PI_Total = PI_Total;
    this.GoalDaily = GoalDaily;
    this.GoalPI = GoalPI;
    this.Archive = Archive;
    this.sAdmRemark = sAdmRemark;
    this.list_order = list_order;
    this.cap = cap;
    this.cap_hours = cap_hours;
}

function Clip(
    clip_id,
    clip_type,
    clusterkey,
    contentPath,
    videoClickTag,
    videoStartTag,
    videoMiddleTag,
    videoFinishTag,
    duration,
    title,
    description,
    suppress_skip_controls,
    sCueList
) {
    this.clip_id = clip_id;
    this.clip_type = clip_type;
    this.clusterkey = clusterkey;
    this.contentPath = contentPath;
    this.videoClickTag = videoClickTag;
    this.videoStartTag = videoStartTag;
    this.videoMiddleTag = videoMiddleTag;
    this.videoFinishTag = videoFinishTag;
    this.duration = duration;
    this.title = title;
    this.description = description;
    this.sCueList = sCueList;
    this.suppress_skip_controls = suppress_skip_controls;
}

function AdCap(
    ad_id_uid,
    delivered_count,
    cookie_expires
) {
    this.AdIdUid = ad_id_uid;
    this.DeliveredCount = delivered_count;
    this.CookieExpires = cookie_expires;
}


function setPlayerClip(ixSetClip) {
    theVideo("SBTVPlayer").setClip(ixSetClip);
}

function getCurrentClipIndex() {
    return ixCurrentClip;
}

function theVideo(movieName) {
    var vid;

    vid = document.getElementsByName("SBTVPlayer")[0];
    /*
    if (navigator.appName.indexOf("Microsoft") != -1) {
    vid = window[movieName];
    }
    else {
    vid= document[movieName];
    }
    */
    return vid;
}

function getClips() {

    if (typeof (override_playlist) != 'undefined') {
        override_playlist();
    }
    var sClips = '';
    var iCounter;
    for (iCounter = 0; iCounter < aClip.length; iCounter++) {
        if (iCounter != 0) {
            sClips += '}';
        }
        else {
            setTimeout(InitialBanners, 100);
        }
        sClips += aClip[iCounter].title + '|' +
        aClip[iCounter].contentPath + '|' +
        aClip[iCounter].duration + '|' +
        aClip[iCounter].suppress_skip_controls + '|' +
        aClip[iCounter].sCueList;
    }
    return sClips;
}

function getClipArray() {
    return aClip;
}

function InitialBanners() {
    var sClipCue = aClip[0].sCueList;
    if (sClipCue.indexOf(',') != -1) {
        sClipCue = aClip[0].sCueList.split(',')[0];
    }
    ixCurrentClip = 0;
    sCueTime = 0;
    sUpdateBannersString = sClipCue.split('@')[0];
    UpdateBanners();
}


function getClickTag(ixClip) {
    return aClip[ixClip].videoClickTag;
}

function getStartTag(ixClip) {
    return aClip[ixClip].videoStartTag;
}

function getMiddleTag(ixClip) {
    return aClip[ixClip].videoMiddleTag;
}

function getFinishTag(ixClip) {
    return aClip[ixClip].videoFinishTag;
}

var ixCurrentClip;

var sVideoEvent = '';
var sCueTime = '';
var sUpdateBannersString = '';

function VideoEvent(ixClip, event_type) {

    var sEventUrl = '';
    var zone_id = "4";

    var zone_sequence = "";
    var zone_total = "";
    var event_position = "";
    var ad_duration = "0";

    var sTable = "";

    var clip = aClip[ixClip];

    var bHitTag = true;

    ixCurrentClip = ixClip;
    var sDiagMsg = "VideoEvent( ixClip=" + ixClip + ",  event_type='" + event_type + "' )";
    switch (event_type) {
        case "click":
            sEventUrl = clip.videoClickTag;
            if (sEventUrl != "") {
                window.open(sEventUrl, "_blank");
            }
            bHitTag = false;
            break;
        case "VideoStart":
            //   aClip[" + ixClip + "].videoStartTag= ==>" + aClip[ixClip].videoStartTag + "<==";
            sEventUrl = clip.videoStartTag;
            break;
        case "VideoMiddle":
            //            admLog("VideoEvent( ixClip=" + ixClip + ",  event_type=" + event_type + " )" );
            sEventUrl = clip.videoMiddleTag;
            break;
        case "VideoFinish":
            //            admLog("VideoEvent( ixClip=" + ixClip + ",  event_type=" + event_type + " )" );
            sEventUrl = clip.videoFinishTag;
            break;
        default:
            sDiagMsg += "\n" + 'unrecognized event_type >' + event_type + '<';
            break;
    }
    if ((sEventUrl != '') && (bHitTag == true)) {
        hitTag(sEventUrl, ixClip, event_type);
    }
    UpdatePI(clip.clip_type, event_type, clip.clip_id);

    sVideoEvent = event_type;
    //    alert( sDiagMsg );
    //    updateDiag();
}

function LogVideoSegEvent(segid, event_type) {
    sUpdatePI_params = 'tbl=SBTVContent' +
        '&evt=' + event_type +
        '&data=' + segid +
        '&sip=' + sbtv_client_context.sIpAddress +
        '&sid=' + sbtv_client_context.sSbtvSid;

    sbtvAjax.Post('/UpdatePI/Default.aspx',
        sUpdatePI_params,
        UpdatePIResponseHandler
        );
}

function hitTag(sUrl, ixClip, event_type) {
    document.getElementById('hit-frame').innerHTML = '<iframe src="' + sUrl + '"></iframe>';
}

function VideoCueEvent(clip_index, cue_position, cue_name) {
    switch (cue_name) {
        case 'VideoStart':
            VideoEvent(clip_index, cue_name);
            break;
        case 'VideoMiddle':
            VideoEvent(clip_index, cue_name);
            break;
        case 'VideoFinish':
            VideoEvent(clip_index, cue_name);
            break;
        default:
            break;
    }
}

function cueUpdateBanners(ixClip, cue_time, cue_name, caller) {
    admLog('diag','ix=' + ixClip + ' cue_time=' + cue_time  + ' name=' + cue_name + ' ubc=' + UpdateBannerCount );
    if (UpdateBannerCount == 1) {
        UpdateBannerCount++;
    }
    else {
        ixCurrentClip = ixClip;
        sCueTime = cue_time;
        sUpdateBannersString = cue_name;
        setTimeout("UpdateBanners()", 100);
    }
}

function displayBanner(banner) {
    var aIdZone = banner.split('_');
    var BannerId = aIdZone[0];
    if (CheckAdCap(BannerId) == false) {
        return false;
    }

    var sSrc = sAdmServer + '/Banner.sbtv?uid=' + BannerId + '&cb=' + new Date().valueOf();
    var sZoneId = 'ad-zone-' + aIdZone[1];
    var bBannerDisplayed = false;
    try {
        document.getElementById(sZoneId).src = sSrc;
        bBannerDisplayed = true;
    }
    catch (err) {
    }
    return bBannerDisplayed;
}

function UpdateBanners() {
    var aBanner = new Array();
    var aIdZone = new Array();
    var ixBanner;

    var sSrc;

    aBanner = sUpdateBannersString.split("/");
    var sBannersDisplayed = '';
    for (ixBanner = 0; ixBanner < aBanner.length; ixBanner++) {
        if (displayBanner(aBanner[ixBanner]) == true) {
            if (sBannersDisplayed != '') {
                sBannersDisplayed += '/';
            }
            sBannersDisplayed += aBanner[ixBanner];
        }
    }
    updateDiag();
    if (sBannersDisplayed == '') {
        UpdatePI('AdContent', 'Banner', '(empty sBannersDisplayed)');
    }
    else {
        UpdatePI('AdContent', 'Banner', sBannersDisplayed);
    }
    UpdateBannerCount++;
}



var sUpdatePI_params = '';
function UpdatePI(sTableName, sEventType, sData) {
    sUpdatePI_params = 'tbl=' + sTableName +
        '&evt=' + sEventType +
        '&data=' + sData +
        '&sip=' + sbtv_client_context.sIpAddress +
        '&sid=' + sbtv_client_context.sid;

    sbtvAjax.Post('/UpdatePI/Default.aspx',
        sUpdatePI_params,
        UpdatePIResponseHandler
        );

    admLog('UpdatePI', sUpdatePI_params);
}


function UpdatePIResponseHandler(sResponse) {
    var sMarker = '<!-' + '-CONTENTMARKER-' + '->';
    var aSeg = sResponse.split(sMarker);
    var sMessage = '<div style="margin-left: 5px;background-color: white;font: normal 10px verdana;">' +
    sUpdatePI_params +
    '<br>' +
    "\n" +
    aSeg[1] +
    '</div>';
}

var bDiagDisplayed = false;
var bDiagMonitor = false;

function SetDiagIframe(frame) {
    diagIframe = frame;
    document.getElementById('diag-loading').style.backgroundImage = "";
}

function admLog(item_type, message) {
    if (bDiagDisplayed == false) {
        if ((sAdmDiagSettings != '') || (bAutoOpenAdmConsole == true)) {
            diag_show();
        }
    }

    if (diagIframe != null) {
        try {
            diagIframe.admLog(item_type, message);
        }
        catch (e) {
        }
    }
}

function toggle_diag() {
    if (bDiagDisplayed == true) {
        diag_hide();
    }
    else {
        diag_show();
        document.getElementById('diag-loading').style.backgroundImage = "url(" + MasterImageFolder + "/adm_diag/loading-adm.gif)";
    }
}

var diag_counter = 0;
var diag_container_timeout;

function diag_show() {

    var objDiagContainer = document.getElementById('diag-container');
    if (objDiagContainer == null) {
        diag_counter++
        diag_container_timeout = setTimeout('diag_show()', 1000);
    }
    else {
        objDiagContainer.innerHTML = '<iframe id="diag_iframe" name="diag_iframe" frameborder="0" scrolling="0" src="/admDiagPanel.sbtv"' +
            ' style="' +
                'width: 620px;' +
                'height: 900px;' +
            '"' +
            '></iframe>';
        objDiagContainer.style.display = 'block';
        bDiagDisplayed = true;
        diagIframe = document.getElementById('diag_iframe');
    }
}

function diag_hide(objDiagContainer) {
    var objDiagContainer = document.getElementById('diag-container');

    objDiagContainer.innerHTML = '';
    objDiagContainer.style.display = 'none';
    bDiagDisplayed = false;
    diagIframe = null;
}

var jadmClipTimeout = null;
var jadmCueTimeout = null;
var aJadmCue = new Array();
var ixNextJadmCue;

function JadmCue(
    sCueTarget,
    msClipCueTime,
    msTimeout) {
    this.sCueTarget = sCueTarget;
    this.msClipCueTime = msClipCueTime
    this.msTimeout = msTimeout;
}

function jadmNextCue() {
    //    document.title = 'jadmNextCue()';
    clearTimeout(jadmCueTimeout);
    var cue = aJadmCue[ixNextJadmCue];
    cueUpdateBanners(ixCurrentClip, cue.msClipCueTime / 1000, cue.sCueTarget, 'jadmNextCue()');
    ixNextJadmCue++;
    if (ixNextJadmCue < aJadmCue.length) {
        jadmCueTimeout = setTimeout(
            'jadmNextCue',
            aJadmCue[ixNextJadmCue].msTimeout
            );
    }
}

var bAutoOpenAdmConsole = false;

function jadm() {

    if (window.sbtv_pre_page) {
        sbtv_pre_page();
    }

    create_banner_frame('az1', '01', 728, 90);
    create_banner_frame('az2', '02', 160, 600);
    create_banner_frame('az3', '03', 300, 250);

    if (document.cookie.indexOf('adm_console=') != -1) {
        bAutoOpenAdmConsole = true;
    }

    if (bPlayer == 1) {
        document.getElementById('sbtv-flash-player').src = sVideoPlayerPath;
    }
    else {
        ixCurrentClip = aClip.length - 1;
        UpdateBannerCount = 2; // skip over "Suppress Clip 0, Cue 0" state
        jadmNextClip();
    }

}

function create_banner_frame(parent_div_id, zone_number, width, height) {

    var divParent;
    divParent = document.getElementById(parent_div_id);
    if (divParent == null) {
        return;
    }
    var divZone = document.createElement('IFRAME');
    divZone.id = 'ad-zone-' + zone_number;
    divZone.width = width;
    divZone.height = height;
    divZone.frameBorder = 0;
    divZone.scrolling = 'no';
    divParent.appendChild(divZone);

}

function jadmNextClip() {
    ixCurrentClip++;
    if (ixCurrentClip == aClip.length) {
        ixCurrentClip = 0;
    }
    jadmSetClip(ixCurrentClip);
}

function jadmSetClip(ixNewClip) {
    clearTimeout(jadmCueTimeout);
    clearTimeout(jadmClipTimeout);
    var clip = aClip[ixNewClip];
    var aCue = clip.sCueList.split(',');
    var ixCue;
    var ixNextCue;
    var aCueTargetAndDuration;
    var offset;
    var this_cue_time;
    var next_cue_time;
    var sTarget;

    aJadmCue.length = 0;
    ixNextJadmCue = 0;
    for (ixCue in aCue) {
        aCueTargetAndDuration = aCue[ixCue].split('@');
        sTarget = aCueTargetAndDuration[0];
        if (sTarget != '') {
            this_cue_time = parseFloat(aCueTargetAndDuration[1]) * 1000;
            if (ixCue < (aCue.length - 1)) {
                ixNextCue = parseInt(ixCue) + 1;
                next_cue_time = parseFloat(aCue[ixNextCue].split('@')[1]) * 1000;
                aJadmCue.push(new JadmCue(sTarget, this_cue_time, next_cue_time - this_cue_time));
            }
            else {
                aJadmCue.push(new JadmCue(sTarget, 0, 0));
            }
        }
    }
    jadmClipTimeout = setTimeout('jadmNextClip()', parseFloat(clip.duration) * 1000);
    if (aJadmCue.length != 0) {
        jadmNextCue();
    }
}

var bAudioStreamPlayerDisplayed = false;

function toggle_AudioStreamPlayer(audio_player_url, audio_player_width) {
    var divButton = document.getElementById('toggle-radio-button');

    if (bPlayer) {
        if (bAudioStreamPlayerDisplayed == true) {
            document.getElementById('sbtv-flash-player').src = sVideoPlayerPath;
            divButton.className = "sbctrl-radio-listen-now";
            bAudioStreamPlayerDisplayed = false;
        }
        else {
            document.getElementById('sbtv-flash-player').src = audio_player_url;
            divButton.className = "sbctrl-radio-now-playing";
            bAudioStreamPlayerDisplayed = true;
        }
    }

}

function updateDiag() {
    if (bDiagMonitor == true) {
        try {
            diagIframe.updateDiagFrame();
        }
        catch (err) {
        }

    }
}

function log(div_id, sMessage) {
    var sContent = document.getElementById('diag_output').innerHTML;
    document.getElementById(div_id).innerHTML = sMessage + '<hr>' + sContent;
}

function log_reset(div_id, sMessage) {
    document.getElementById(div_id).innerHTML = sMessage;
}

function SearchSbtv(search_div_id) {
    var fldSearchSbtv = document.getElementById(search_div_id);
    var sSearchSbtv = fldSearchSbtv.value;
    if (sSearchSbtv != '') {

        var sParams = 'search-text=' + sSearchSbtv;
        window.location.href = ('/SearchSbtv/?' + sParams);
    }
    else {
        alert('Please enter a word or phrase, then click Search SBTV.com');
    }
}

function search_key_down(evt) {
    evt = (evt) ? evt : ((window.event) ? window.event : "");
    var elem = (evt.target) ? evt.target : evt.srcElement;

    var key_code;
    if (window.event) // Internet Explorer
    {
        key_code = evt.keyCode
    }
    else if (evt.which) // Netscape/Opera/FireFox
    {
        key_code = evt.which
    }
    switch (key_code) {
        case 13:
            SearchSbtv(elem.id);
            break;
        default:
            break;
    }
}

function SearchResponseHandler() {
    var sResponse;
    var sContent;
    var sMarker = '<!-' + '-CONTENTMARKER-' + '->';
    var bNoContent;
    var aSeg;
    var divTarget = document.getElementById('main-col');

    if (oXmlHttp.readyState == 4 || oXmlHttp.readyState == 'complete') {
        sResponse = oXmlHttp.responseText;
        aSeg = sResponse.split(sMarker);
        sContent = aSeg[1];
        if (sContent == '(no items)') {
            $(sListId).innerHTML = sContent;
        }
        else {
            divTarget.innerHTML = sContent;
        }
    }
}

var oXmlHttp;
var AjaxResponseStringHandler;

var sLoadingGif = '<img src="' + MasterImageFolder + 'backgrounds/loading.gif">';

function PagePI() {
    UpdatePI('PI', 'Page', window.location);
}

function getPlayerContext() {
    return sContextString = sbtv_client_context.sSbtvSid + '|' + sbtv_client_context.sIpAddress;
}

function handlePollResponse(sResponse) {
    poll_box.innerHTML = sResponse.split('</h3>')[1];
    document.getElementById('poll-header').innerHTML = "SBTV.com Quick Poll Response";
}

function get_poll_results(poll_id, response_value) {
    poll_box = document.getElementById('poll-box');
    var poll_result_source = '/_modules/right_col_poll_result.asp';
    var poll_params = 'poll_id=' + poll_id + '&resp=' + response_value;

    var poll_string = '<iframe id="poll-iframe" name="poll-iframe" frameborder="0" src="' + poll_result_source + '" scrolling=no style="height: 300px;"></iframe>';

    sbtvAjax.Post(poll_result_source, poll_params, handlePollResponse);
}

function sbtv_sc(ContentSourceId, RecordId) {

    var sUrl;
    switch (ContentSourceId) {
        case 1:
            sUrl = classic_path + '/default.asp?segid=' + RecordId;
            break;
        case 2:
            sUrl = classic_path + '/default.asp?segid=' + RecordId;   // needs to be modified to bring up Audio
            break;
        case 3:
            sUrl = classic_path + '/default.asp?cid=27&uid=' + RecordId;
            break;
        case 4:
            sUrl = cs_path + '/blogs/' + RecordId + '.aspx';
            break;
    }
    window.open(sUrl, '_blank');
}


var FlashPlayer;

function SetClip(ixClip) {
    ixCurrentClip = ixClip;
    FlashPlayer.SetClip(ixCurrentClip);
}

function SbtvAdCap(cookie_name, cookie_value_string) {
    var aCookieSeg = cookie_value_string.split('|');
    var sCookieSeg;
    var sDiag = cookie_name + "\n";
    for (var ixSeg in aCookieSeg) {
        sCookieSeg = aCookieSeg[ixSeg];
        sDiag += ixSeg + ': ' + sCookieSeg + "\n";
    }
    this.name = cookie_name;
    this.cap_count = aCookieSeg[0];
    this.cap_limit = aCookieSeg[1];
    this.cap_dt = new Date(aCookieSeg[2]);
    this.sInfo = SbtvCookieInfo;
}

function SbtvCookieInfo() {
    return 'name=' + this.name + "\n" +
            'cap=' + this.cap_count + ' of ' + this.cap_limit + "\n" +
            'cap_dt=' + this.cap_dt;
}

var sAdCapPrefix = 'sbtv_ad_cap_';

function SbtvGetAdCap(banner_id) {
    var Name = sAdCapPrefix + banner_id;
    var search = Name + "="
    var returnvalue = null;
    var offset;
    var end;
    if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search)
        if (offset != -1) { // if cookie exists
            offset += search.length
            end = document.cookie.indexOf(";", offset);
            if (end == -1)
                end = document.cookie.length;
            returnvalue = new SbtvAdCap(Name, unescape(document.cookie.substring(offset, end)))
        }
    }
    return returnvalue;
}


function CheckAdCap(banner_id) {
    var banner = aBannerAd[banner_id];
    if (banner.cap == 0) {
        return true;
    }
    var bDisplay = false;
    var cookie_name = sAdCapPrefix + banner_id;
    var ad_cap = SbtvGetAdCap(banner_id);
    if (ad_cap == null) {
        var cap_ms = parseFloat(banner.cap_hours) * 3600000;
        var dtNow = new Date();

        var cap_dt = new Date(dtNow.getTime() + cap_ms);
        ad_cap = new SbtvAdCap(
            cookie_name,
            '1|' +
            banner.cap + '|' +
            cap_dt.toUTCString()
            );
        bDisplay = true;
    }
    else {
        if (ad_cap.cap_count >= ad_cap.cap_limit) {
            return false;
        }
        ad_cap.cap_count++;
    }

    document.cookie = cookie_name + '=' +
        ad_cap.cap_count + '|' + ad_cap.cap_limit + '|' + ad_cap.cap_dt.toUTCString() +
        ';path=/;expires=' + ad_cap.cap_dt.toUTCString();
    return bDisplay;
}