Search 31,992 hours of television updated today at 8:29 AM central
|
|
|
|
We're sorry, but we do not support Opera at this point in time. Please use a different browser.
Your term(s) - - did not return any results.
Suggestions:
- Make sure all words are spelled correctly.
- Try different terms.
- Try more general terms.
- Try fewer terms.
- Try viewing data for all years, all genres, and all channels.
Examples:
";
var addContents = "";
var searches = 0;
// add init and end request handlers
prm.add_endRequest(endRequestHandler);
prm.add_beginRequest(beginRequestHandler);
function beginRequestHandler(sender, args) {
var help = document.getElementById('help');
var bottomContents = document.getElementById('bottomContents');
var chart = document.getElementById('chart');
var add = document.getElementById('ad');
addContents = add.innerHTML;
chart.innerHTML = "

";
bottomContents.style.display = "";
help.style.display = "none";
ready = false;
}
function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
return rv;
}
// handle the end of all postback requests
function endRequestHandler( sender, args ) {
document.getElementById('ad').innerHTML = addContents;
// swallow errors at this point
if( args.get_error() != undefined ) {
args.set_errorHandled( true );
}
document.getElementById("_zoomStart").value = "";
document.getElementById("_zoomEnd").value = "";
//if we always change the hash here pasting in zoom dates doesn't work AEM 7/15/09
var qs = setTitleAndHashAndResize( false );
var pageTracker = _gat._getTracker("UA-30069-1");
searches = searches + 1;
pageTracker._initData();
pageTracker._trackEvent("TV Trends", "Search",
document.getElementById("_terms").value, searches);
loadXMLHTTPRequest("Categories.ashx?" + qs + "&rank=" +
document.getElementById("_rank").value);
setEmbed();
}
function loadXMLHTTPRequest( url ) {
if(window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = processStatusChange;
xmlhttp.open("GET", url, true);
xmlhttp.send(null);
}
else if(window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
if(xmlhttp) {
xmlhttp.onreadystatechange = processStatusChange;
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
}
}
function processStatusChange() {
if(xmlhttp.readyState == 4) {
if(xmlhttp.status == 200) {
var div = document.getElementById("categories");
if(div && "" != xmlhttp.responseText) {
div.innerHTML = xmlhttp.responseText;
}
}
}
}
var currentWidth = 0;
function setTitleAndHashAndResize( alwaysSetHash ) {
currentWidth = document.documentElement.clientWidth;
var qs = setTitleAndHash(alwaysSetHash);
var query = new google.visualization.Query("Data.ashx?" + qs);
query.send(drawChart);
resizeControls();
return qs;
}
function setTitleAndHash(alwaysSetHash) {
var startString = document.getElementById("_zoomStart").value
var endString = document.getElementById("_zoomEnd").value
var terms = document.getElementById("_terms").value;
var end = document.getElementById("_end").value;
var start = document.getElementById("_start").value;
var channel = document.getElementById("_channel").value;
var genre = document.getElementById("_genre").value;
var qs = "terms=" + escape(terms) + "&start=" + start + "&end=" + end +
"&channel=" + channel + "&genre=" + genre +
"&zoomStart=" + startString + "&zoomEnd=" + endString;
var fromTo = "";
var on = "";
var from = "";
if(start != "1/1/0001" && end != "12/31/9999") {
fromTo = " from " + start + " to " + end;
}
if(channel != "") {
on = " on " + channel
}
if(genre != "") {
from = " from " + genre;
}
if(alwaysSetHash == true || hashAndValuesMatch(false) == false) {
window.location.hash = qs;
}
document.title = "SnapStream TV Trends: Comparing \"" + terms + "\"" + fromTo + on + from;
return qs;
}
function resizeControls() {
var searchBar = document.getElementById("searchBar");
var searchBarContainer = document.getElementById("searchBarContainer");
var searchTerms = document.getElementById("_searchTerms");
var ad = document.getElementById("ad");
var logo = document.getElementById("logo");
var search = document.getElementById("_search");
var tip = document.getElementById("tip");
var version = getInternetExplorerVersion();
var width = document.documentElement.clientWidth;
//-30 for padding, -4 for the endcaps
var remainingWidth = width - logo.offsetWidth - logo.offsetLeft - ad.offsetWidth - 30 - 4;
if(remainingWidth > 520) {
remainingWidth = 520;
}
else if(remainingWidth < 340) {
remainingWidth = 340;
}
if (version > 0 && version < 8) {
tip.style.top = "65px";
search.style.top = "27px";
searchTerms.style.top = "28px"
}
searchBarContainer.style.width = searchBar.style.width = remainingWidth + "px";
searchTerms.style.width = (remainingWidth - 160) + "px";
search.style.left = (remainingWidth - 160 + 18) + "px";
searchBar.style.display = "";
}
function onLoad() {
resizeControls();
refreshHash();
}
function onResize() {
if( ready == true && currentWidth != document.documentElement.clientWidth) {
setTitleAndHashAndResize( false );
}
}
function drawChart(response) {
var help = document.getElementById('help');
var bottomContents = document.getElementById('bottomContents');
if(navigator.userAgent.toLowerCase().indexOf("opera") >= 0) {
document.getElementById('opera').style.display = "";
document.getElementById("_search").disabled = true;
bottomContents.style.display = "none";
return;
}
if(response.isError()) {
var currentSearch = document.getElementById('currentSearch');
document.getElementById("_channels").selectedIndex = 0;
document.getElementById("_genres").selectedIndex = 0;
document.getElementById("_timespans").selectedIndex = 0;
currentSearch.innerHTML = document.getElementById('_searchTerms').value;
bottomContents.style.display = "none";
help.style.display = "";
return;
}
bottomContents.style.display = "";
help.style.display = "none";
var data = response.getDataTable();
var objects = document.getElementsByTagName("object");
ready = false;
chart = new google.visualization.AnnotatedTimeLine(document.getElementById('chart'));
google.visualization.events.addListener(chart, 'ready', readied);
google.visualization.events.addListener(chart, 'rangechange', rangeChanged);
chart.draw(data, { legendPosition: 'newRow', displayRangeSelector: false, displayAnnotations: true, allowHtml: true, annotationsWidth: 45, scaleColumns: [] });
//this is a hack for a flash bug that causes annotations not show up in IE AEM 2/9/09
//http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400730
if (objects.length > 0) {
var hack = "window." + objects[0].id + " = document.forms[0]." + objects[0].id;
eval(hack);
}
}
function getDateString(date) {
return (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear();
}
function readied() {
ready = true;
//this is so IE has the correct title AEM 7/15/09
setTitleAndHash( false );
}
function setEmbed() {
var temp = window.location.href.split('#');
var noHashOrQS = "";
var hash = "";
var root = "";
var embedLink = document.getElementById("_embedLink");
var csvLink = document.getElementById("_csvLink");
var embedText = document.getElementById("_embedText");
var url = "";
if(temp.length == 2) {
noHashOrQS = temp[0];
hash = temp[1];
}
else {
noHashOrQS = window.location.href;
}
temp = noHashOrQS.split('?');
var noHash = "";
if(temp.length == 2) {
noHashOrQS = temp[0];
}
root = noHashOrQS.substring(0, noHashOrQS.length - 11);
url = escape(root + "gadget.ashx?" + unescape(hash));
//for some totally unknown reason, this does not work when we have %20 for spaces AEM 3/9/08
url = url.replace( /%20/g, "%2b" );
embedLink.href = embed + url;
embedText.value = scriptStart + url + scriptEnd;
csvLink.href = "data.ashx?tqx=out:csv&" + hash;
}
function rangeChanged(startAndEnd) {
ready = false;
document.getElementById("_zoomStart").value =
getDateString(startAndEnd.start);
document.getElementById("_zoomEnd").value =
getDateString(startAndEnd.end);
setTitleAndHash( true );
setEmbed();
ready = true;
}
function hashAndValuesMatch(assign) {
var temp = window.location.href.split('#');
var newHash = [];
var same = true;
var terms = document.getElementById("_terms");
var end = document.getElementById("_end");
var start = document.getElementById("_start");
var channel = document.getElementById("_channel");
var genre = document.getElementById("_genre");
var hashTerms = "";
var hashEnd = "";
var hashStart = "";
var hashChannel = "";
var hashGenre = "";
//this is bc of how js compares strings AEM 2/17/08
var controlTerms = terms.value;
var controlEnd = end.value;
var controlStart = start.value;
var controlChannel = channel.value;
var controlGenre = genre.value;
if(temp.length == 2) {
newHash = temp[1].split('&');
}
for( var i = 0; i < newHash.length; i++ ) {
var temp = newHash[i].split( "=" );
var key = temp[0].toLowerCase();
var value = unescape(temp[1]);
if(key == "terms") {
hashTerms = value;
}
else if(key == "start") {
hashStart = value;
}
else if(key == "end") {
hashEnd = value;
}
else if(key == "genre") {
hashGenre = value;
}
else if(key == "channel") {
hashChannel = value;
}
}
if(controlTerms != hashTerms) {
same = false;
if(assign) {
terms.value = hashTerms;
}
}
if(controlStart != hashStart) {
same = false;
if(assign) {
start.value = hashStart;
}
}
if(controlEnd != hashEnd) {
same = false;
if(assign) {
end.value = hashEnd;
}
}
if(controlGenre != hashGenre) {
same = false;
if(assign) {
genre.value = hashGenre;
}
}
if(controlChannel != hashChannel) {
same = false;
if(assign) {
channel.value = hashChannel;
}
}
if( hashTerms == "" ) {
window.location.href = "default.aspx";
}
return same;
}
function CheckZoomChanged() {
var temp = window.location.href.split('#');
var newHash = [];
var zoomEnd = document.getElementById("_zoomEnd");
var zoomStart = document.getElementById("_zoomStart");
var hashZoomEnd = "";
var hashZoomStart = "";
var controlZoomEnd = zoomEnd.value;
var controlZoomStart = zoomStart.value;
if(temp.length == 2) {
newHash = temp[1].split('&');
}
for(var i = 0; i < newHash.length; i++) {
var temp = newHash[i].split("=");
var key = temp[0].toLowerCase();
var value = unescape(temp[1]);
if(key == "zoomstart") {
hashZoomStart = value;
}
else if(key == "zoomend") {
hashZoomEnd = value;
}
}
if((controlZoomEnd != hashZoomEnd || controlZoomStart != hashZoomStart) &&
ready == true && chart != null ) {
zoomStart.value = hashZoomStart;
zoomEnd.value = hashZoomEnd;
ready = false;
try {
var start = new Date(hashZoomStart);
var end = new Date(hashZoomEnd);
if( start < end ) {
chart.setVisibleChartRange( start, end );
}
}
catch(e) { }
}
}
function refreshHash() {
if(hashAndValuesMatch(true) == false) {
__doPostBack("_terms", "_terms");
}
else {
CheckZoomChanged();
}
setTimeout("refreshHash()", 250);
}
window.onload = onLoad;
window.onresize = onResize;