/* KTVU.com scripts */
// Begin national js scripts
/* QUIGO Text Ads Script */
/*
* Copyright 2006, Internet Broadcasting.
* All Rights Reserved.
*
*
* Author: lvo
* Date: 12/01/06
* Last Updated: 4/12/07
*
* adsonar_placementId is unique for each page
* adsonar_pid is the same for each section
*
* Normal Widget: 10457911
* ----------------
* Home Dimension: 650x300
* News Detail: 300x190
* Section: 650x160
* SlideShow: 240x220
*
* 300x190 Widget: 12307031
*/
var quigo = {
sea:{
Home:{pid:628758,index:1267809},
News:{pid:628758,index:1267808,detail:1278066},
Entertainment:{pid:632764,index:1267802,detail:1267801},
Health:{pid:631760,index:1267811,detail:1267805},
Sports:{pid:632766,index:1267832,detail:1267831},
Travel:{pid:632767,index:1267835,detail:1267834},
Weather:{pid:633758,index:1267842,detail:1267841},
Slideshow:{detail:1270170,pid:632765},
Others:{pid:632765,index:1267828,detail:1267827},
Custom300:{pid:627760, index:1278113, detail:1278113}
},
orlc:{
Home:{index:1267728,pid:627765},
News:{pid:627765,index:1267730,detail:1278092},
Entertainment:{pid:632768,index:1267750,detail:1267749},
Health:{pid:632771,index:1267738,detail:1267736},
Sports:{pid:632770,index:1267742,detail:1267740},
Travel:{pid:631761,index:1267766,detail:1267745},
Slideshow:{detail:1270174,pid:632772},
Others:{pid:632772,index:1267739,detail:1267752},
Weather:{pid:632769,index:1267755,detail:1267769},
Custom300:{pid:632772, index:1278092, detail:1278092}
},
atl:{
Home:{pid:627767,index:1267772},
News:{pid:627767,index:1267758,detail:1278107},
Entertainment:{pid:632759,index:1267762,detail:1267761},
Health:{pid:632762,index:1267778,detail:1267763},
Others:{pid:632763,index:1267782,detail:1267781},
Sports:{pid:632760,index:1267784,detail:1267787},
Travel:{pid:632761,index:1267791,detail:1267790},
Slideshow:{pid:632763,detail:1270182},
Weather:{pid:632758,index:1267794,detail:1267806},
Custom300:{pid:632763, index:1278109, detail:1278109}
},
reno:{
Home:{pid:627759,index:1267823},
News:{pid:627759,index:1267847,detail:1278047},
Slideshow:{detail:1270166,pid:627759},
Others:{pid:627759,index:1267867,detail:1267825},
Custom300:{pid:627759,index:1278049,detail:1278049}
},
fran:{
Home:{pid:627766,index:1267853},
News:{pid:627766,index:1267877,detail:1278087},
Slideshow:{detail:1270172,pid:627766},
Others:{pid:627766,index:1267875,detail:1267851},
Custom300:{pid:627766,index:1278089,detail:1278089}
},
elp:{
Home:{pid:627758,index:1267858},
News:{pid:627758,index:1267883,detail:1278052},
Slideshow:{detail:1270168,pid:627758},
Others:{pid:627758,index:1267881,detail:1267878},
Custom300:{pid:627758,index:1278052,detail:1278052}
},
day:{
Home:{pid:627762,index:1267859},
News:{pid:627762,index:1267891,detail:1278096},
Slideshow:{detail:1270176,pid:627762},
Others:{pid:627762,index:1267861,detail:1267888},
Custom300:{pid:627762,index:1278097,detail:1278097}
},
john:{
Home:{pid:627761,index:1267864},
News:{pid:627761,index:1267899,detail:1278099},
Slideshow:{detail:1270178,pid:627761},
Others:{pid:627761,index:1267895,detail:1267892},
Custom300:{pid:627761,index:1278100,detail:1278100}
},
burg:{
Home:{pid:627764,index:1267902},
News:{pid:627764,index:1267926,detail:1278104},
Slideshow:{detail:1270180,pid:627764},
Others:{pid:627764,index:1267904,detail:1267901},
Custom300:{pid:627764,index:1278105,detail:1278105}
},
'char':{
Home:{pid:627763,index:1267910},
News:{pid:627763,index:1267914,detail:1278112},
Slideshow:{detail:1270184,pid:627763},
Others:{pid:627763,index:1267929,detail:1267909},
Custom300:{pid:627763,index:1278114,detail:1278114}
},
steu:{
Home:{pid:627760,index:1267931},
News:{pid:627760,index:1267924,detail:1278113},
Slideshow:{detail:1270186,pid:627760},
Others:{pid:627760,index:1267919,detail:1267930},
Custom300:{pid:627760,index:1278117,detail:1278117}
}
}
function findWidgetID(el)
{
if ((typeof el) !='object') {
el = document.getElementById(el);
}
if(el == null) return null;
var p = el.parentNode;
while(p)
{
if(p.id && p.id.match(/sw[0-9]+/))
return p.id.replace(/sw/,"");
p = p.parentNode;
}
return null;
}
/*
pageProps fix in case it doesn't transform
*/
if ((typeof pageProps) == 'undefined') {
var pageProps = { sectionname: 'Other' };
}
var qRandomID = 'q' + Math.floor(Math.random()*1000000);
document.write('');
var qWidgetID = findWidgetID(qRandomID);
qSitekey = siteinfo.sitekey.lc;
qSectionname = pageProps.sectionname;
(location.href.indexOf('detail.html')>0)? qPage = 'detail' : qPage = 'index';
// not defined section, assign it to Others
if (qWidgetID == '12307031') {
qSectionname = 'Custom300';
} else if (!quigo[qSitekey][qSectionname]) {
qSectionname = 'Others';
}
adsonar_placementId=quigo[qSitekey][qSectionname][qPage];
adsonar_pid=quigo[qSitekey][qSectionname].pid;
adsonar_ps=-1;
adsonar_jv='ads.adsonar.com';
switch (qSectionname) {
case 'Home':
adsonar_zw=500;
adsonar_zh=300;
break;
case 'News':
adsonar_zw=300;
adsonar_zh=190;
break;
case 'Custom300':
adsonar_zw=300;
adsonar_zh=190;
break;
case 'Slideshow':
adsonar_zw=240;
adsonar_zh=220;
break;
default:
adsonar_zw=500;
adsonar_zh=160;
}
qDebug = "Sitekey: "+qSitekey+"\n Section: '" + qSectionname + "'\n Page: " + qPage + "\n Placement " + adsonar_placementId + "\n pid " +adsonar_pid + "\n height: " + adsonar_zh + " width: " + adsonar_zw;
if (adsonar_placementId>0) {
document.write('');
}
// End national_js scripts