

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

var aClip = new Array();

aClip[0] = new Clip( '2536','segment','','/files/streamingmarv/Display/mobif5_by_attainresponse.flv',
'',
'',
'',
'',
'20',
"The Future of Marketing Mobile / Email Marketing System",
"",
0,
'5799_01/5797_02/5790_03@0'
);

aClip[1] = new Clip( '2911','Advertisments','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',
"Alibaba",
"Alibaba ROS",
0,
''
);

aClip[2] = new Clip( '2517','segment','','/files/Stampscom/Display/Ecommerce_FINAL.flv',
'',
'',
'',
'',
'20',
"Stamps.com USPS Shipping Software",
"",
0,
'5799_01/5662_02/5790_03@9'
);

aClip[3] = new Clip( '2912','Advertisments','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',
"Alibaba",
"Alibaba Preroll Content",
0,
''
);

aClip[4] = new Clip( '2502','segment','','/files/gimenapm/Display/Pier2Marketing.flv',
'',
'',
'',
'',
'20',
"Redefining Marketing",
"",
0,
'5799_01/5758_02/5790_03@18'
);

aClip[5] = new Clip( '2766','Advertisments','','http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
'13',
"Alyssa Milano on SBTV.com",
"Alyssa Milano",
0,
''
);

aClip[6] = new Clip( '2450','segment','','/files/homeremedies/Display/video.flv',
'',
'',
'',
'',
'20',
"HRN Business as seen on CBS",
"",
0,
''
);

aClip[7] = new Clip( '2911','Advertisments','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',
"Alibaba",
"Alibaba ROS",
0,
'5799_01/5797_02/5790_03@10'
);

aClip[8] = new Clip( '1499','segment','','/files/MDSallee/Display/Residential_Property_Investors_Movie.flv',
'',
'',
'',
'',
'20',
"Exceptional Network Group Opportunity for Real Estate Entrepreneurs. ",
"",
0,
''
);

aClip[9] = new Clip( '2912','Advertisments','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',
"Alibaba",
"Alibaba Preroll Content",
0,
''
);

aClip[10] = new Clip( '2422','segment','','/files/BusinessCardtoBusiness/Display/BC2B_40sec.flv',
'',
'',
'',
'',
'20',
"Turn Your Business Card Into Business",
"",
0,
'5799_01/5662_02/5790_03@3'
);

aClip[11] = new Clip( '2766','Advertisments','','http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
'13',
"Alyssa Milano on SBTV.com",
"Alyssa Milano",
0,
''
);

aClip[12] = new Clip( '2393','segment','','/files/Smallbizzpro/Display/Wowzzy-Fullres.flv',
'',
'',
'',
'',
'20',
"Business Promotion Made easy",
"",
0,
'5799_01/5758_02/5790_03@15'
);

aClip[13] = new Clip( '2911','Advertisments','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',
"Alibaba",
"Alibaba ROS",
0,
''
);

aClip[14] = new Clip( '2334','segment','','/files/adam123da/Display/ADAM_Hollywood_with_music_med.flv',
'',
'',
'',
'',
'20',
"",
"",
0,
''
);

aClip[15] = new Clip( '2912','Advertisments','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',
"Alibaba",
"Alibaba Preroll Content",
0,
'5799_01/5797_02/5790_03@4'
);

aClip[16] = new Clip( '1440','SBTVContent','','http://www.sbtv.com/content/segments/TimBerryraisingmoney_v251.flv',
'',
'',
'',
'',
'251',
"Raising Capital For Your Small Business",
"Raising Capital For Your Small Business",
0,
'5799_01/5662_02/5790_03@33,5799_01/5758_02/5790_03@78,5799_01/5797_02/5790_03@123,5799_01/5662_02/5790_03@168,5799_01/5758_02/5790_03@213'
);

aClip[17] = new Clip( '2766','Advertisments','','http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
'13',
"Alyssa Milano on SBTV.com",
"Alyssa Milano",
0,
'5799_01/5797_02/5790_03@7'
);

aClip[18] = new Clip( '3231','SBTVContent','','http://www.sbtv.com/content/segments/CliffEnnicoCreatingaworkplacesafetypolicy1_v324.flv',
'',
'',
'',
'',
'324',
"Creating a Workplace Safety Policy",
"Creating a Workplace Safety Policy",
0,
'5799_01/5662_02/5790_03@39,5799_01/5758_02/5790_03@84,5799_01/5797_02/5790_03@129,5799_01/5662_02/5790_03@174,5799_01/5758_02/5790_03@219,5799_01/5797_02/5790_03@264,5799_01/5662_02/5790_03@309'
);

aClip[19] = new Clip( '2911','Advertisments','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',
"Alibaba",
"Alibaba ROS",
0,
''
);

aClip[20] = new Clip( '789','SBTVContent','','http://www.sbtv.com/content/segments/DEE_Job_v245.flv',
'',
'',
'',
'',
'245',
"Creating Job Descriptions In Small Businesses",
"Creating Job Descriptions In Small Businesses",
0,
'5799_01/5758_02/5790_03@14,5799_01/5797_02/5790_03@59,5799_01/5662_02/5790_03@104,5799_01/5758_02/5790_03@149,5799_01/5797_02/5790_03@194,5799_01/5662_02/5790_03@239'
);

aClip[21] = new Clip( '2912','Advertisments','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',
"Alibaba",
"Alibaba Preroll Content",
0,
''
);

aClip[22] = new Clip( '1359','SBTVContent','','http://www.sbtv.com/content/segments/winningatsalesArticle_v188.flv',
'',
'',
'',
'',
'188',
"Improving Sales Skills and Closing The Deal",
"Improving Sales Skills and Closing The Deal",
0,
'5799_01/5758_02/5790_03@23,5799_01/5797_02/5790_03@68,5799_01/5662_02/5790_03@113,5799_01/5758_02/5790_03@158'
);

aClip[23] = new Clip( '2766','Advertisments','','http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
'13',
"Alyssa Milano on SBTV.com",
"Alyssa Milano",
0,
''
);

aClip[24] = new Clip( '3393','SBTVContent','','http://www.sbtv.com/content/segments/GiftandHomeChannel_PainPointsMxDn_v368.flv',
'',
'',
'',
'',
'368',
"Easing Your Small Business Pain Points",
"Easing Your Small Business Pain Points",
0,
'5799_01/5797_02/5790_03@2,5799_01/5662_02/5790_03@47,5799_01/5758_02/5790_03@92,5799_01/5797_02/5790_03@137,5799_01/5662_02/5790_03@182,5799_01/5758_02/5790_03@227,5799_01/5797_02/5790_03@272,5799_01/5662_02/5790_03@317,5799_01/5758_02/5790_03@362'
);

aClip[25] = new Clip( '2911','Advertisments','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',
"Alibaba",
"Alibaba ROS",
0,
''
);

aClip[26] = new Clip( '1295','SBTVContent','','http://www.sbtv.com/content/segments/CliffEnnicoSpyEmployees_v238.flv',
'',
'',
'',
'',
'238',
"Internet Use Policies for Small Businesses",
"Internet Use Policies for Small Businesses",
0,
'5799_01/5797_02/5790_03@23,5799_01/5662_02/5790_03@68,5799_01/5758_02/5790_03@113,5799_01/5797_02/5790_03@158,5799_01/5662_02/5790_03@203'
);

aClip[27] = new Clip( '2912','Advertisments','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',
"Alibaba",
"Alibaba Preroll Content",
0,
'5799_01/5758_02/5790_03@10'
);

aClip[28] = new Clip( '1556','SBTVContent','','http://www.sbtv.com/content/segments/TimBerryReviseyourplan_v318.flv',
'',
'',
'',
'',
'318',
"How to Effectively Revise Your Business Plan",
"How to Effectively Revise Your Business Plan",
0,
'5799_01/5797_02/5790_03@39,5799_01/5662_02/5790_03@84,5799_01/5758_02/5790_03@129,5799_01/5797_02/5790_03@174,5799_01/5662_02/5790_03@219,5799_01/5758_02/5790_03@264,5799_01/5797_02/5790_03@309'
);

aClip[29] = new Clip( '2766','Advertisments','','http://www.sbtv.com/content/segments/AlyssaMilanoBUMP_v13.flv',
'http://www.alyssa.com/',
'',
'',
'',
'13',
"Alyssa Milano on SBTV.com",
"Alyssa Milano",
0,
''
);

aClip[30] = new Clip( '1586','SBTVContent','','http://www.sbtv.com/content/segments/CliffFreelanceContractsPT2_v280.flv',
'',
'',
'',
'',
'280',
"Drafting Freelance Employee Writing Contracts ",
"Drafting Freelance Employee Writing Contracts ",
0,
'5799_01/5662_02/5790_03@23,5799_01/5758_02/5790_03@68,5799_01/5797_02/5790_03@113,5799_01/5662_02/5790_03@158,5799_01/5758_02/5790_03@203,5799_01/5797_02/5790_03@248'
);

aRawContent = new Array();
aRawContent[2536] = new RawContent( 
2536,
'segment',
'',
"The Future of Marketing Mobile / Email Marketing System",
'',
'/files/streamingmarv/Display/mobif5_by_attainresponse.flv',
'0'
);

aRawContent[2517] = new RawContent( 
2517,
'segment',
'',
"Stamps.com USPS Shipping Software",
'',
'/files/Stampscom/Display/Ecommerce_FINAL.flv',
'0'
);

aRawContent[2502] = new RawContent( 
2502,
'segment',
'',
"Redefining Marketing",
'',
'/files/gimenapm/Display/Pier2Marketing.flv',
'0'
);

aRawContent[2450] = new RawContent( 
2450,
'segment',
'',
"HRN Business as seen on CBS",
'',
'/files/homeremedies/Display/video.flv',
'0'
);

aRawContent[1499] = new RawContent( 
1499,
'segment',
'',
"Exceptional Network Group Opportunity for Real Estate Entrepreneurs. ",
'',
'/files/MDSallee/Display/Residential_Property_Investors_Movie.flv',
'0'
);

aRawContent[2422] = new RawContent( 
2422,
'segment',
'',
"Turn Your Business Card Into Business",
'',
'/files/BusinessCardtoBusiness/Display/BC2B_40sec.flv',
'0'
);

aRawContent[2393] = new RawContent( 
2393,
'segment',
'',
"Business Promotion Made easy",
'',
'/files/Smallbizzpro/Display/Wowzzy-Fullres.flv',
'0'
);

aRawContent[2334] = new RawContent( 
2334,
'segment',
'',
"",
'',
'/files/adam123da/Display/ADAM_Hollywood_with_music_med.flv',
'0'
);

aRawContent[1440] = new RawContent( 
1440,
'SBTVContent',
'',
"Raising Capital For Your Small Business",
'',
'http://www.sbtv.com/content/segments/TimBerryraisingmoney_v251.flv',
'1440'
);

aRawContent[3231] = new RawContent( 
3231,
'SBTVContent',
'',
"Creating a Workplace Safety Policy",
'',
'http://www.sbtv.com/content/segments/CliffEnnicoCreatingaworkplacesafetypolicy1_v324.flv',
'3231'
);

aRawContent[789] = new RawContent( 
789,
'SBTVContent',
'',
"Creating Job Descriptions In Small Businesses",
'',
'http://www.sbtv.com/content/segments/DEE_Job_v245.flv',
'789'
);

aRawContent[1359] = new RawContent( 
1359,
'SBTVContent',
'',
"Improving Sales Skills and Closing The Deal",
'',
'http://www.sbtv.com/content/segments/winningatsalesArticle_v188.flv',
'1359'
);

aRawContent[3393] = new RawContent( 
3393,
'SBTVContent',
'',
"Easing Your Small Business Pain Points",
'',
'http://www.sbtv.com/content/segments/GiftandHomeChannel_PainPointsMxDn_v368.flv',
'3393'
);

aRawContent[1295] = new RawContent( 
1295,
'SBTVContent',
'',
"Internet Use Policies for Small Businesses",
'',
'http://www.sbtv.com/content/segments/CliffEnnicoSpyEmployees_v238.flv',
'1295'
);

aRawContent[1556] = new RawContent( 
1556,
'SBTVContent',
'',
"How to Effectively Revise Your Business Plan",
'',
'http://www.sbtv.com/content/segments/TimBerryReviseyourplan_v318.flv',
'1556'
);

aRawContent[1586] = new RawContent( 
1586,
'SBTVContent',
'',
"Drafting Freelance Employee Writing Contracts ",
'',
'http://www.sbtv.com/content/segments/CliffFreelanceContractsPT2_v280.flv',
'1586'
);



aVideoAd = new Array();

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-09',
0,
1774820,
1,
10000000,
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,
48699,
1,
1,
1,
'PI_Total > GoalPI, Archive=1, 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',
2,
2538756,
1,
10000000,
0,
'PI > GoalDaily'
);


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',
2,
2156,
3000,
19000000,
0,
''
);


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',
2,
2155,
3000,
19000000,
0,
''
);


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',
2,
1521675,
3000,
50000000,
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',
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[5880] = new BannerAd( 
5880,
'3',
'300x250',
'',
45.00,
'Xcel',
'10-15-09',
'11-12-09',
0,
45359,
6000,
30000000,
0,
'past EndDate',
7,
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',
8,
0,
''
);


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


aBannerAd[5756] = new BannerAd( 
5756,
'3',
'300X250',
'',
45.00,
'IM 300x250',
'06-11-09',
'12-31-09',
2,
52647,
1,
100000,
0,
'PI > GoalDaily',
10,
0,
''
);


aBannerAd[5381] = new BannerAd( 
5381,
'1',
'728X90',
'',
45.00,
'TechTactics 728x90',
'12-28-07',
'12-01-09',
2,
2091984,
1,
10300000,
0,
'PI > GoalDaily',
11,
0,
''
);


aBannerAd[5757] = new BannerAd( 
5757,
'1',
'728X90',
'',
45.00,
'IM 728x90',
'01-01-09',
'01-01-10',
502,
45034,
500,
100000000,
0,
'PI > GoalDaily',
12,
0,
''
);


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


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


aBannerAd[5799] = new BannerAd( 
5799,
'1',
'728X90',
'',
45.00,
'SunTrust ROS 728x90',
'09-14-09',
'01-01-10',
41,
25928,
6000,
300000,
0,
'',
15,
0,
''
);


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


aBannerAd[5758] = new BannerAd( 
5758,
'2',
'160X600',
'',
45.00,
'IM 160x600',
'06-11-09',
'12-31-09',
1324,
465029,
30000,
1000000,
0,
'',
17,
0,
''
);



// this.Location.IP2LocationMessage ><

/// this.Querystring >side=B&<

var sbtv_client_context = new SbtvClientContext(
'side=B&',
'B',
'True',
'0',
'0',
'0',
'',
'8',
'',
'0',
'0',
'0',
'38.107.191.110',
'OK',
'20007',
'OK',
'WASHINGTON',
'DC',
'511',
'223af249-797e-47c4-85b4-a5754bd5aec0',
'SBTVWWW001',
'http://www.sbtv.com',
'',
'tcp:www.sbtv.com',
'www.sbtv.com',
'http://www.sbtv.com'
);
var DailyNewsId=0;
var bDailyNewsSummary=false;

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

var cs_path='';

var MasterImageFolder='';

var bPlayerStartMute=false;
/////////////////////////////////////////
//  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;
}