/* KTVU.com scripts */ // Begin national js scripts /** * @author lvo * * @projectDescription Cox Google Adsense * */ if ((typeof google) == 'undefined') { google= { adsense: { generateCode:function(params){ }, cox: {} } } } google.adsense.cox = { /* */ ad_client: 'pub-6068200365010040', atl: { Home: { ad_channel: '6396928480', ad_format: '160x600_as' }, Other: { ad_channel: '6396928480', ad_format: '300x250_as' } }, burg: { Home: { ad_channel: '7111925488', ad_format: '160x600_as' }, Other: { ad_channel: '7111925488', ad_format: '300x250_as' } }, 'char': { Home: { ad_channel: '5496469304', ad_format: '160x600_as' }, Other: { ad_channel: '5496469304', ad_format: '300x250_as' } }, day: { Home: { ad_channel: '3217812616', ad_format: '160x600_as' }, Other: { ad_channel: '3217812616', ad_format: '300x250_as' } }, elp: { Home: { ad_channel: '1577030681', ad_format: '160x600_as' }, Other: { ad_channel: '1577030681', ad_format: '300x250_as' } }, fran: { Home: { ad_channel: '1216453310', ad_format: '160x600_as' }, Other: { ad_channel: '1216453310', ad_format: '300x250_as' } }, john: { Home: { ad_channel: '9720724123', ad_format: '160x600_as' }, Other: { ad_channel: '9720724123', ad_format: '300x250_as' } }, orlc: { Home: { ad_channel: '1264407605', ad_format: '160x600_as' }, Other: { ad_channel: '1264407605', ad_format: '300x250_as' } }, reno: { Home: { ad_channel: '0518405339', ad_format: '160x600_as' }, Other: { ad_channel: '0518405339', ad_format: '300x250_as' } }, sea: { Home: { ad_channel: '4418227920', ad_format: '160x600_as' }, Other: { ad_channel: '4418227920', ad_format: '300x250_as' } }, steu: { Home: { ad_channel: '8139564900', ad_format: '160x600_as' }, Other: { ad_channel: '8139564900', ad_format: '300x250_as' } } } google.adsense.getAdObject = function(el) { adObj = { ad_client:'', ad_width: 300, ad_height: 250, ad_format:'300x250_as', ad_type:'text', ad_channel:'', color_border: '', color_bg: '', color_link:'', color_text :'', color_url :'' }; /* pageProps fix in case it doesn't transform */ /* if ((typeof pageProps) == 'undefined') { var pageProps = { sectionname: 'Other' }; } */ if (!google.adsense[siteinfo.owner][siteinfo.sitekey.lc][pageProps.sectionname]) { section = google.adsense[siteinfo.owner][siteinfo.sitekey.lc].Other; gDebug = "Section: Other \n"; } else { section = google.adsense[siteinfo.owner][siteinfo.sitekey.lc][pageProps.sectionname]; gDebug = "Section: " + pageProps.sectionname + "\n"; } adObj.ad_client = google.adsense[siteinfo.owner].ad_client; adObj.ad_channel = section.ad_channel; adObj.ad_format = section.ad_format; switch (adObj.ad_format) { case '160x600_as' : adObj.ad_width = 160; adObj.ad_height = 600; break; case '300x250_as' : adObj.ad_width = 300; adObj.ad_height = 250; break; } gDebug = gDebug + 'SITE ' + siteinfo.sitekey.lc + "\n ad format" + adObj.ad_format + ' size ' + adObj.ad_width + 'x' + adObj.ad_height + "\n" + "ad_client: " + adObj.ad_client + "\n" + "ad_channel: " + adObj.ad_channel; //color_text = getStyle(document.getElementById(el),'color'); //adObj.color_text = getStyle(document.getElementById(el),'color'); //adObj.color_bg = getStyle(el.parentNode,'backgroundColor'); return adObj; } /* * generateCode looks up the ad_channel and sizes for certain container * or optional parameters to generate google adsense js * * * * adObj { * ad_client * ad_width * ad_height * ad_format * ad_type * ad_channel * color_border * color_bg * color_link * color_text * color_url * } * * * */ google.adsense.generateCode = function(el) { var adObj =new Object(); adObj = google.adsense.getAdObject(el); out = '' + 'google_ad_client = "' + adObj.ad_client + '";' + 'google_ad_width = ' + adObj.ad_width + ';' + 'google_ad_height = ' + adObj.ad_height + ';' + 'google_ad_format = "' + adObj.ad_format + '";' + 'google_ad_type = "' + adObj.ad_type + '";' + 'google_ad_channel = "' + adObj.ad_channel + '";' + 'google_color_border = "' + adObj.color_border + '";' + 'google_color_bg = "' + adObj.color_bg + '";' + 'google_color_link = "' + adObj.color_link + '";' + 'google_color_text = "' + adObj.color_text + '";' + 'google_color_url = "' + adObj.color_url + '";' + '' + '' + ''; document.write(out); } // End national_js scripts