

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

var aClip = new Array();

aClip[0] = new Clip( '2941','DailyNewsItem:NEWS','','http://www.sbtv.com/content/dailynews/DN031810_v120.flv',
'',
'',
'',
'',
'120',
"SBTV Daily News for March 18, 2010",
"SBTV Daily News for March 18, 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( '1199','SBTVContent','','http://www.sbtv.com/content/segments/DancingQueen_v480.flv',
'',
'',
'',
'',
'480',
"Cube Fabulous: Dancing Queen",
"Cube Fabulous: Dancing Queen",
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'
);

aClip[3] = new Clip( '2924','Advertisments','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|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'30',
"Toyota",
"Toyota",
0,
'5896_03@0'
);

aClip[4] = new Clip( '3123','SBTVContent','','http://www.sbtv.com/content/segments/NAWBO08HistoryofNawboMxDn_v2017.flv',
'',
'',
'',
'',
'2017',
"Changing the Business Climate for Women: The History of NAWBO",
"Changing the Business Climate for Women: The History of NAWBO",
0,
'5662_02@14,5662_02@59,5662_02@104,5662_02@149,5662_02@194,5662_02@239,5662_02@284,5662_02@329,5662_02@374,5662_02@419,5662_02@464,5662_02@509,5662_02@554,5662_02@599,5662_02@644,5662_02@689,5662_02@734,5662_02@779,5662_02@824,5662_02@869,5662_02@914,5662_02@959,5662_02@1004,5662_02@1049,5662_02@1094,5662_02@1139,5662_02@1184,5662_02@1229,5662_02@1274,5662_02@1319,5662_02@1364,5662_02@1409,5662_02@1454,5662_02@1499,5662_02@1544,5662_02@1589,5662_02@1634,5662_02@1679,5662_02@1724,5662_02@1769,5662_02@1814,5662_02@1859,5662_02@1904,5662_02@1949,5662_02@1994'
);

aClip[5] = 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=[08:55:75354.73524]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[08:55:75354.73524]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0,5662_02@22'
);

aClip[6] = new Clip( '989','SBTVContent','','http://www.sbtv.com/content/segments/WBENC06NewsPack_v499.flv',
'',
'',
'',
'',
'499',
"WBENC News Package",
"WBENC News Package",
0,
'5662_02@37,5662_02@82,5662_02@127,5662_02@172,5662_02@217,5662_02@262,5662_02@307,5662_02@352,5662_02@397,5662_02@442,5662_02@487'
);

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

aClip[8] = new Clip( '1328','SBTVContent','','http://www.sbtv.com/content/segments/WPO2007package_v409.flv',
'',
'',
'',
'',
'423',
"Women Presidents Organization 2007 10th Anniversary Conference Segment",
"Women Presidents Organization 2007 10th Anniversary Conference Segment",
0,
'5662_02@2,5662_02@47,5662_02@92,5662_02@137,5662_02@182,5662_02@227,5662_02@272,5662_02@317,5662_02@362,5662_02@407'
);

aClip[9] = new Clip( '2924','Advertisments','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|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'30',
"Toyota",
"Toyota",
0,
'5896_03@0,5662_02@29'
);

aClip[10] = new Clip( '1279','SBTVContent','','http://www.sbtv.com/content/segments/CliffEnnicoImmigration_v717.flv',
'',
'',
'',
'',
'717',
"Should Your Small Business Hire Illegal Aliens? ",
"Should Your Small Business Hire Illegal Aliens? ",
0,
'5662_02@44,5662_02@89,5662_02@134,5662_02@179,5662_02@224,5662_02@269,5662_02@314,5662_02@359,5662_02@404,5662_02@449,5662_02@494,5662_02@539,5662_02@584,5662_02@629,5662_02@674'
);

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=[08:55:75354.73524]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[08:55:75354.73524]',
'',
'',
'30',
"Aflac",
"Aflac Ros",
0,
'5890_03@0,5662_02@2'
);

aClip[12] = new Clip( '1151','SBTVContent','','http://www.sbtv.com/content/segments/Smallbusinessclientsarespecial_v222.flv',
'',
'',
'',
'',
'222',
"Customer Appreciation - Building Client Loyalty",
"Customer Appreciation - Building Client Loyalty",
0,
'5662_02@17,5662_02@62,5662_02@107,5662_02@152,5662_02@197'
);

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

aClip[14] = new Clip( '999','SBTVContent','','http://www.sbtv.com/content/segments/CWBR06HighGrowth_v3027.flv',
'',
'',
'',
'',
'3027',
"High Growth and High Gain: Strategies for Success",
"High Growth and High Gain: Strategies for Success",
0,
'5662_02@34,5662_02@79,5662_02@124,5662_02@169,5662_02@214,5662_02@259,5662_02@304,5662_02@349,5662_02@394,5662_02@439,5662_02@484,5662_02@529,5662_02@574,5662_02@619,5662_02@664,5662_02@709,5662_02@754,5662_02@799,5662_02@844,5662_02@889,5662_02@934,5662_02@979,5662_02@1024,5662_02@1069,5662_02@1114,5662_02@1159,5662_02@1204,5662_02@1249,5662_02@1294,5662_02@1339,5662_02@1384,5662_02@1429,5662_02@1474,5662_02@1519,5662_02@1564,5662_02@1609,5662_02@1654,5662_02@1699,5662_02@1744,5662_02@1789,5662_02@1834,5662_02@1879,5662_02@1924,5662_02@1969,5662_02@2014,5662_02@2059,5662_02@2104,5662_02@2149,5662_02@2194,5662_02@2239,5662_02@2284,5662_02@2329,5662_02@2374,5662_02@2419,5662_02@2464,5662_02@2509,5662_02@2554,5662_02@2599,5662_02@2644,5662_02@2689,5662_02@2734,5662_02@2779,5662_02@2824,5662_02@2869,5662_02@2914,5662_02@2959,5662_02@3004'
);

aClip[15] = new Clip( '2924','Advertisments','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|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'30',
"Toyota",
"Toyota",
0,
'5896_03@0,5662_02@22'
);

aClip[16] = new Clip( '3948','SBTVContent','','http://www.sbtv.com/content/segments/RobotsBlazeNewTrails_v110.flv',
'',
'',
'',
'',
'110',
"Robots Blaze New Trails",
"Robots Blaze New Trails",
0,
'5662_02@37,5662_02@82'
);

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

aRawContent[1199] = new RawContent( 
1199,
'SBTVContent',
'',
"Cube Fabulous: Dancing Queen",
'',
'http://www.sbtv.com/content/segments/DancingQueen_v480.flv',
'1199'
);

aRawContent[3123] = new RawContent( 
3123,
'SBTVContent',
'',
"Changing the Business Climate for Women: The History of NAWBO",
'',
'http://www.sbtv.com/content/segments/NAWBO08HistoryofNawboMxDn_v2017.flv',
'3123'
);

aRawContent[989] = new RawContent( 
989,
'SBTVContent',
'',
"WBENC News Package",
'',
'http://www.sbtv.com/content/segments/WBENC06NewsPack_v499.flv',
'989'
);

aRawContent[1328] = new RawContent( 
1328,
'SBTVContent',
'',
"Women Presidents Organization 2007 10th Anniversary Conference Segment",
'',
'http://www.sbtv.com/content/segments/WPO2007package_v409.flv',
'1328'
);

aRawContent[1279] = new RawContent( 
1279,
'SBTVContent',
'',
"Should Your Small Business Hire Illegal Aliens? ",
'',
'http://www.sbtv.com/content/segments/CliffEnnicoImmigration_v717.flv',
'1279'
);

aRawContent[1151] = new RawContent( 
1151,
'SBTVContent',
'',
"Customer Appreciation - Building Client Loyalty",
'',
'http://www.sbtv.com/content/segments/Smallbusinessclientsarespecial_v222.flv',
'1151'
);

aRawContent[999] = new RawContent( 
999,
'SBTVContent',
'',
"High Growth and High Gain: Strategies for Success",
'',
'http://www.sbtv.com/content/segments/CWBR06HighGrowth_v3027.flv',
'999'
);

aRawContent[3948] = new RawContent( 
3948,
'SBTVContent',
'',
"Robots Blaze New Trails",
'',
'http://www.sbtv.com/content/segments/RobotsBlazeNewTrails_v110.flv',
'3948'
);



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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21567|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21567|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21567|4353|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21568|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21568|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21568|4353|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21566|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21566|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21566|4353|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|30397|21565|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|30397|21565|4353|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|30397|21565|4353|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|31781|22397|4543|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|31781|22397|4543|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|31781|22397|4543|92||BBEEND|%20:55:54%',
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=[20:55:54.723]?',
'',
'',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32106|22647|4639|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32106|22647|4639|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32106|22647|4639|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32484|23091|4685|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32484|23091|4685|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32484|23091|4685|92||BBEEND|%20:55:54%',
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|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|32176|22908|4645|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|32176|22908|4645|92||BBEEND|%20:55:54%',
'http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|32176|22908|4645|92||BBEEND|%20:55:54%',
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',
2,
1774933,
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|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?0|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?50|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
'http://tracking.vindicosuite.com/Tracking/V3/Instream/Impression/?100|12|33074|23589|4708|92||HEADER|BBEEND|%20:55:54%',
30.00,
'Toyota',
'Toyota',
'03-05-10',
'03-20-10',
2,
21,
8500,
100000,
0,
''
);


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=[08:55:75354.73524]',
'http://altfarm.mediaplex.com/ad/tr/12210-92193-10506-0?mpt=[08:55:75354.73524]',
'',
'',
30.00,
'Aflac',
'Aflac Ros',
'01-28-10',
'06-30-10',
2,
75,
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',
240,
690874,
1,
800000,
0,
'PI > GoalDaily',
28,
0,
''
);


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


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


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


aBannerAd[5896] = new BannerAd( 
5896,
'3',
'300x250',
'toyota',
45.00,
'Toyota',
'03-05-10',
'03-20-10',
421,
9882,
8500,
100000,
0,
'',
32,
0,
''
);


aBannerAd[5890] = new BannerAd( 
5890,
'3',
'300x250',
'aflac',
45.00,
'Aflac Ros',
'01-28-10',
'06-30-10',
459,
25039,
3240,
500000,
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.118',
'OK',
'20007',
'OK',
'WASHINGTON',
'DC',
'511',
'0aa54b4e-9375-4ea9-bd60-c05d821330af',
'SBTVWWW001',
'http://www.sbtv.com',
'http://cs.sbtv.com',
'tcp:www.sbtv.com',
'www.sbtv.com',
'http://www.sbtv.com'
);
var DailyNewsId=1519;
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;
}