Sign in to follow this  
Followers 0
greeniguana00

TV Guide list

8 posts in this topic

I basically need to get a list of the files here:

http://www.tvguide.com/listings/data/

but I obviously can't.

Does anyone have any ideas on how to easily find out what files are in this directory? The files are easily accessible, but I need to know their names to access them.

0

Share this post


Link to post
Share on other sites
* labs.zap2it.com ( get an account )

* http://www.birtles.org.uk/xmltv/ ( download )

zap2it is ending their service! This is why I was hoping to do this.

For several years we have offered a free TV listings service to hobbyists for their own personal, noncommercial use. In October of 2004 we posted here an open letter saying the future of Zap2it Labs was at risk because of certain growing misuses of the Zap2it Labs data. Unfortunately this misuse has continued and grown. These misuses, combined with other business factors have led to the decision to discontinue Zap2it Labs effective September 1, 2007.

We thank those users who have honored the terms of the agreement, and we suggest you consider the many TV listings options offered by the commercial licensees of TMS TV listings data.

If you would like to discuss how to license TV listings for commercial use, please let us know by e-mail (labs@zap2it.com) and include your company name, telephone number and the best time to reach you. We will respond to your inquiry as soon as possible.

We anticipate this decision will generate discussion and invite you to respond via the Zap2it Labs forum. We will do our best to respond to relevant questions posted on this forum in a timely manner.

Edited by greeniguana00
0

Share this post


Link to post
Share on other sites

Bhha just use it till it quits working then check forums to see how people fix it

I would be willing to bet they don't stop the service on that date there are a lot of co's that use zap2it data

Status: Active

Subscription Expires: 2007/09/22

Subscription Plan: Gold

Edited by operat0r
0

Share this post


Link to post
Share on other sites

If enough people pressure them on their forums, there is a chance that they wont discontinue it (PR Stunt?)

0

Share this post


Link to post
Share on other sites

I've already figured this one out because it is directly referenced in one of the scripts on the tvguide website: http://www.tvguide.com/listings/data/ajaxdata.ashx

The other ones are accessed via this script "ajaxgrid.js". It is in one long line, which is kind of annoying. Here it is:

//
// AUTO-GENERATED FILE - DO NOT EDIT!!!
//
var GridAds=true;var iGridAds=0;var iInGridAdFrequency=20;var iFirstGridAdRow=5;var MaxGridAds=7;var iDocumentWidth=0;var iClientWidth=0;;var iClientHeight=0;var iGridSpanMinutes=120;var iTimebarIncrements=30;var iTotalDays=15;var iMinTimeSlice=5;var iChannelWidthPx=100;var iGridWidthPixels=550;var iScrollBarWidth=20;var enableSorting=false;var strTimebarHeaders=null;var UseScriptAds=false;var iCurrentCookieVer=2;boolIgnorePrefs=false;var boolPrintableGrid=false;var iSliceWidthPx=0;var iTotalCellsAcross=0;var iProgramCellsAcross=0;var bShowDateTimeSelect=true;var bShowGenreSelect=true;var bShowProviderSelect=true;var availChannels;var selectChannels;var strGridLoadType="Page Load";var strActiveFilter="";var iAjaxBytes=0;var iAjaxRender=0;var iAjaxLoadTime=0;var dataPathOffset="";var strKeyword="";var bUseKeywordFilter=false;var objSelectedChannelsCombo=document.getElementById("selectedChannels");function useGridCache(){if((iServiceID==0)||(iServiceID==80001)||(iServiceID==80004)){return true;}return false;}function doKeywordTextClick(objEdit){if(objEdit!=null){if(objEdit.value=="(keyword)"){objEdit.value="";}}}function doKeywordBlur(objEdit){if(objEdit!=null){if(objEdit.value==""){objEdit.value="(keyword)";}}}function doKeywordFilter(objSelect){var bReload=false;var objEdit=document.getElementById("listingsKeyword");if(objEdit!=null){var strKey=objEdit.value;if((strKey!="(keyword)")&&(strKey.length>0)){optionFavChannels=false;optionGenreFilter=0;strKeyword=strKey;bUseKeywordFilter=true;bReload=tr
e;iLastGenreValue=7;}else{bUseKeywordFilter=false;objEdit.value="";objEdit.focus();objSelect.value=iLastGenreValue;return;}if(bReload){showLoadingScreen();setTimeout("drawListings()", 1);}}}function toggleHDTV(){var optsDiv=document.getElementById("GridOptsDiv");var theGrid=document.getElementById("gridDiv");var theTBar=document.getElementById("timebarDiv");if((optsDiv!=null)&&(theGrid!=null)){if(optsDiv.style.visibility=="visible"){optsDiv.style.display="none";optsDiv.style.visibility="hidden";if(theTBar!=null){theTBar.style.visibility="visible";theTBar.style.display="block";}theGrid.style.visibility="visible";theGrid.style.display="block";}}var objHdtvImg=document.getElementById("hdtvToggleImg");if(objHdtvImg!=null){if(objHdtvImg.src.indexOf("btnshowallchannels")>=0){objHdtvImg.src="/images/buttons/btnshowhdonly.gif";bHDTVOnlyFilter=false;countGridAction("HDTV", "Off");}else{objHdtvImg.src="/images/buttons/btnshowallchannels.gif";bHDTVOnlyFilter=true;countGridAction("HDTV", "On");}showLoadingScreen();setTimeout("drawListings()", 1);}}var isNationalGrid=false;var iServiceID=0;var strProviderName=null;var dtGridLocalStartTime=new Date();var dtCurrentLocalDate=new Date();var xmlHttp;var xmlDetailData;var xmlPrefsData;var iChannelCount=0;var iProgramCount=0;var iCurrentProgram;var iCurrentSourceID;var strCurrentChannel;var iRowCount=0;var cookieSelectedChannels="favchan";var cookieOptions="ajaxopts";var rawChannelsCookie=null;var arSelectedChannels=null;var strHTML="";var strDays=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var strLongDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var strLongMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];var objRawData=null;var objDisplayData=null;var objGridData=null;var nFlyoverIndex=-1;var nFlyoverHandle=null;var nFlyoverDelay=750;var dtDataLoadStart;var dtDataLoadEnd;var colSortOrder=0;var colChannelNumber=1;var colCallLetters=2;var colNetworkID=3;var colProgramTitle=4;var colBlockCount=5;var colCategory=6;var colSubCategory=7;var colSourceType=8;var colStartBefore=9;var colEndAfter=10;var colAttributes=11;var colProgramID=12;var colSourceID=13;var colStartTime=14;var colDuration=15;var colSort=0;var colSource=1;var colNumber=2;var paramServiceID="";var paramZipCode="";var paramSuppressMusic=1;var paramSuppressPPV=1;var paramGridMins=0;var paramGridYear="";var paramGridMonth="";var paramGridDay="";var paramGridHour="";var paramGridMinute="";var optionHideMusic=true;var optionHidePPV=true;var optionHideIcons=false;var optionTruncateText=true;var optionScrollGrid=true;var optionNoGridSelect=true;var optionGridHeightPx=500;var optionTimebarRepeat=20;var optionGridMinutes=0;var optionGridStart="-1";var optionDisableFlyovers=false;var optionPopNewWindows=false;var optionFavChannels=true;var bHDTVOnlyFilter=false;var optionGenreFilter=0;var bFilterChanged=false;var bOptionsChanged=false;var SelectedChannels=null;var strAvailChanSelect="";var strSelectedChanSelect="";var PastCloseups=null;var iLastFilterMatch=0;var forceOptionsCreate=true;var isIE=document.all?true:false;var isSafari=(navigator.userAgent.toLowerCase().indexOf("safari")>=0);var iLastGenreValue=0;var mouseX,mouseY;var dragOn=0;var dragDiv=null;var dragX=0;var dragY=0;var zMax=0;var dragInit=0;var strDocLocation=document.URL;function setGridStart(nValue){var obj=document.getElementById("selStartTime");if(obj!=null){switch(nValue){case 0:{optionGridStart="-1";if(obj!=null){obj.disabled=true;}obj=document.getElementById("defGridStartFixed");if(obj!=null){obj.checked=false;}break;}case 1:{if(obj!=null){obj.disabled=false;optionGridStart=obj[obj.selectedIndex].value;obj=document.getElementById("defGridStartLocal");if(obj!=null){obj.checked=false;}}break;}}setOptionsChanged();}}function isOptionChecked(strOptionName, boolDefault){var chkBox=document.getElementById(strOptionName);if(chkBox!=null){return chkBox.checked;}return boolDefault;}function getSelectListValue(strListName, boolDefault){var list=document.getElementById(strListName);if(list!=null){return list[list.selectedIndex].value;}return boolDefault;}function getSelectListIndex(strListName){var list=document.getElementById(strListName);if(list!=null){return list.selectedIndex;}return-1;}function setupOptions(){if(boolPrintableGrid){optionScrollGrid=false;return;}optionHideMusic=isOptionChecked("chkHideMusic", optionHideMusic);optionHidePPV=isOptionChecked("chkHidePPV", optionHidePPV);optionHideIcons=isOptionChecked("chkHideIcons", optionHideIcons);optionTruncateText=isOptionChecked("chkTruncateText", optionTruncateText);optionDisableFlyovers=isOptionChecked("chkDisableFlyovers", optionDisableFlyovers);optionPopNewWindows=isOptionChecked("chkPopNewWindows", optionPopNewWindows);if(isOptionChecked("gridExpand", !optionScrollGrid)){optionScrollGrid=false;}else{optionScrollGrid=true;var gridHeightPx=document.getElementById("selGridHeightPx");if(gridHeightPx!=null){optionGridHeightPx=gridHeightPx.value;}}optionTimebarRepeat=getSelectListValue("selTimebarRepeat", optionTimebarRepeat);}function isSelectedChannel(iSrcID){if(forceOptionsCreate){if(arSelectedChannels!=null){for(var n=0;n<arSelectedChannels.length;n++){if(iSrcID==arSelectedChannels[n]){return true;}}}return false;}else{var selList=objSelectedChannelsCombo;if(selList!=null){for(var n=iLastFilterMatch;n<selList.length;n++){var str=selList.options[n].value;var opt=str.split("|");if(iSrcID==opt[colSource]){iLastFilterMatch=n;return true;}if(n >=parseInt(opt[colSort],10)){iLastFilterMatch=n;return false;}}return false;}return false;}}function drawListings(){var dtStartTime=new Date();var theGridDiv=document.getElementById("TvGridDiv");iChannelCount=0;iProgramCount=0;setupOptions();if(boolPrintableGrid){var theTextString=document.getElementById("providerNameText");if(theTextString!=null){var strHeading="<b>"+strProviderName+"<\/b><br><font style='font-size:14px;'>";strHeading+=strLongDays[dtGridLocalStartTime.getDay()]+", "+strLongMonths[dtGridLocalStartTime.getMonth()]+" ";strHeading+=dtGridLocalStartTime.getDate()+", ";strHeading+=formatTime(dtGridLocalStartTime)+" - ";var endTime=new Date();endTime.setTime(dtGridLocalStartTime.getTime()+(iGridSpanMinutes*60*1000));if(endTime.getDate()!=dtGridLocalStartTime.getDate()){strHeading+=strLongDays[endTime.getDay()]+", "+strLongMonths[endTime.getMonth()]+" ";strHeading+=endTime.getDate()+", ";}strHeading+=formatTime(endTime);strHeading+="<\/font>";theTextString.innerHTML=strHeading;}}if(theGridDiv!=null){strHTML="<div class='masterGridDiv' id='masterGridDiv'>";drawNewGridSelectors();if(optionScrollGrid){drawTimeBar();}drawGrid();strHTML+="<\/div>";var iHtmlLength=strHTML.length;theGridDiv.innerHTML=strHTML;var objSelect=document.getElementById("dateSelect");var strSelection="";if(objSelect!=null){strSelection=dtGridLocalStartTime.getFullYear()+","+(dtGridLocalStartTime.getMonth()+1)+","+dtGridLocalStartTime.getDate();objSelect.value=strSelection;}objSelect=document.getElementById("timeSelect");if(objSelect!=null){strSelection=dtGridLocalStartTime.getHours()+":";strSelection+=formatInt(dtGridLocalStartTime.getMinutes(),2);objSelect.value=strSelection;}objSelect=document.getElementById("genreSelect");if(objSelect!=null){if(optionGenreFilter>0){optionFavChannels=false;objSelect.value=optionGenreFilter;iLastGenreValue=optionGenreFilter;}if(optionFavChannels){objSelect.selectedIndex=1;}}objSelect=document.getElementById("providerSelect");if(objSelect!=null){objSelect.value=iServiceID;}}bOptionsChanged=false;var dtEndTime=new Date();iAjaxLoadTime=(dtDataLoadEnd.getTime()-dtDataLoadStart.getTime())/1000;iAjaxRender=(dtEndTime.getTime()-dtStartTime.getTime())/1000;iAjaxBytes=parseInt(xmlHttp.responseText.length/1000,10);if(boolPrintableGrid){window.print();}else{setCookie("LastGrid", getQueryParameters(), 0);setTimeout("drawAdCalls(5)",2000);}}function readChannelsCookie(){rawChannelsCookie=readCookie(cookieSelectedChannels+iServiceID);if(rawChannelsCookie!=null){arSelectedChannels=rawChannelsCookie.split("|");if(arSelectedChannels.length>0){return;}}arSelectedChannels=null;optionFavChannels=false;var objSelect=document.getElementById("genreSelect");if(objSelect!=null){objSelect.selectedIndex=0;}}function getQueryParam(strQuery, strName){var u,i;u=strQuery+"";i=u.indexOf(strName+"=",0);if(i>=0){i+=strName.length+1;var n=u.indexOf('&',i);if(n>i){return unescape(u.substring(i,n));}else if(i<u.length){return unescape(u.substring(i));}}return "";}function initPage(){paramGridMins=iGridSpanMinutes;optionGridMinutes=iGridSpanMinutes;if(strDocLocation.toLowerCase().indexOf("redesign")>=0){dataPathOffset="/redesign";}var obj=document.getElementById("mainBody");if(obj!=null){iDocumentWidth=parseInt(obj.style.width,10);}availChannels=document.getElementById("availableChannels");selectChannels=objSelectedChannelsCombo;if(availChannels!=null){availChannels.options.length=0;}if(selectChannels!=null){selectChannels.options.length=0;}if(isIE){optionNoGridSelect=true;}if(!boolIgnorePrefs){readCookieOptions();}initOptionValues();var theGridDiv=document.getElementById("TvGridDiv");if(theGridDiv!=null){iGridWidthPixels=parseInt(theGridDiv.style.width,10);}if(!isIE){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=mouseMoved;if(getQueryParam(document.location.search,'dest')=='printer'){boolPrintableGrid=true;GridAds=false;optionTruncateText=false;optionFavChannels=(getQueryParam(document.location.search,'favchan')=='true');if(!optionFavChannels){optionGenreFilter=parseInt(getQueryParam(document.location.search,'genre'),10);}}reloadGrid();}function addch(theCheckbox, nChan){if(theCheckbox.checked){var selList=availChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(1)}}}}else{var selList=selectChannels;if(selList!=null){for(var n=0;n<selList.length;n++){if(nChan==selList[n].value){selList.selectedIndex=n;moveOneChannel(0)}}}}setChannelsCookie(selectChannels);}function drawChannelCell(objRowData, checkit){var strChannelNo=objRowData[colChannelNumber];var strCallLetter=objRowData[colCallLetters];var iNetworkID=parseInt(objRowData[colNetworkID],10);var strCellText="<b>"+strChannelNo+"<\/b><br>"+strCallLetter;if(isNationalGrid){strCellText=strCallLetter;}if((iNetworkID>0)&&(optionHideIcons!=true)){strCellText="<table class='util'><td><img src='http://www.tvguide.com/gi/w/"+iNetworkID+".gif' alt='"+strCallLetter+"' class='chi' \/><\/td><td class='cht'>"+strCellText+"<\/td><\/table>";}else if(optionHideIcons!=true){strCellText="<table class='util'><td style='width:34px;'><\/td><td class='cht'>"+strCellText+"<\/td><\/table>";}var strTopBorder="";if(iRowCount==0){strTopBorder=" style='border-top: none 1px #666666;' ";}if(optionNoGridSelect){strHTML+="<td class='ch'"+strTopBorder+"><nobr>"+strCellText+"<\/nobr><\/td>";}else{strHTML+="<td class='ch'"+strTopBorder+">";strHTML+="<table cellpadding='0' cellspacing='0' style='width:100%;height:100%'>";strHTML+="<td class='cht'><nobr>"+strCellText+"<\/nobr><\/td>";strHTML+="<td class='cckc'>";if(!optionFavChannels){var strChanVal=objRowData[colSortOrder]+"|"+objRowData[colSourceID]+"|"+strChannelNo;strHTML+="<input type='checkbox' class='cck' onClick=\"java script:addch(this,'"+strChanVal+"')\" "+checkit+">";}strHTML+="<\/td>";strHTML+="<\/table>";strHTML+="<\/td>";}iChannelCount++;}function hp(theHref, nIndex, nMode){switch(nMode){case 0: nFlyoverIndex=-1;theHref.style.color="#000000";break;case 1: theHref.style.color="#FF0000";if(!optionDisableFlyovers){getFlyoverInfo(0);nFlyoverIndex=nIndex;nFlyoverHandle=setTimeout("getFlyoverInfo(1)", nFlyoverDelay);}break;}}function drawProgramCell(objRowData){iProgramCount++;var iProgramColspan=objRowData[colBlockCount];var strTitle=objRowData[colProgramTitle];var strProgramLink="java script:gf("+iCurrentProgram+")";var strCellText="";var iMaxTitleLen=((iProgramColspan-1)*(iProgramColspan/2));if(iMaxTitleLen<=0){iMaxTitleLen=2;}if(strTitle!=null){if((strTitle.length > iMaxTitleLen)&&(optionTruncateText)){strCellText=strTitle.substring(0,iMaxTitleLen)+"...";}else{strCellText=strTitle;}}var iCategory=parseInt(objRowData[colCategory],10);var strClassName="pc";var bShowProgram=false;switch(optionGenreFilter){case 2: if(iCategory==64){bShowProgram=true;}break;case 3: if(iCategory==1024){bShowProgram=true;}break;case 4: if(iCategory==2){bShowProgram=true;}break;case 5: break;case 6: if(iCategory==256){bShowProgram=true;}break;default: bShowProgram=true;}if(bUseKeywordFilter){if(objRowData[colProgramTitle].toLowerCase().indexOf(strKeyword.toLowerCase())<0){bShowProgram=false;}}if(bShowProgram){switch(iCategory){case 2: strClassName="pcf";break;case 64: strClassName="pcm";break;case 1024: strClassName="pcs";break;case 256: strClassName="pcn";break;}}var strTopBorder="";if(iRowCount==0){strTopBorder=" style='border-top: none 1px #666666;' ";}var attrib=parseInt(objRowData[colAttributes],10);if(iProgramColspan>2){var strFlags="";if((attrib & 2)==2){if(strFlags.length>0){strFlags+=" ";}strFlags+="<font class='par'>Repeat<\/font>";}if((attrib & 4)==4){if(strFlags.length>0){strFlags+=" ";}strFlags+="<font class='par'>New<\/font>";}if((attrib & 8)==8){if(strFlags.length>0){strFlags+=" ";}strFlags+="<font class='cc'>(CC)<\/font>";}if(strFlags.length>0){strCellText+="<br>"+strFlags;}}else{strCellText="...";}switch(objRowData[colStartBefore]){case "1": strCellText="<"+strCellText;break;case "2": strCellText="<<"+strCellText;break;}switch(objRowData[colEndAfter]){case "1": strCellText+=" >";break;case "2": strCellText+=" >>";break;}if(bShowProgram){if((boolPrintableGrid)||(boolDisableMoreInfo)){strHTML+="<td class='"+strClassName+"' "+"colspan='"+iProgramColspan+"'"+strTopBorder+"><font class='cu'>"+strCellText+"<\/font><\/td>";}else{if(optionDisableFlyovers){strHTML+="<td class='"+strClassName+"' "+"colspan='"+iProgramColspan+"'"+strTopBorder+"><a class='cu' href=\""+strProgramLink+"\">"+strCellText+"<\/a><\/td>";}else{strHTML+="<td class='"+strClassName+"' "+"colspan='"+iProgramColspan+"'"+strTopBorder+"><a class='cu' href=\""+strProgramLink+"\" onmouseover=\"hp(this,"+iCurrentProgram+",1)\" onmouseout=\"hp(this,"+iCurrentProgram+",0)\">"+strCellText+"<\/a><\/td>";}}}else{strHTML+="<td class='"+strClassName+"' "+"colspan='"+iProgramColspan+"'"+strTopBorder+"><\/td>";}iCurrentProgram++;}function getCloseupTime(strStamp){return strStamp.substring(4,6)+"/"+strStamp.substring(6,8)+"/"+strStamp.substring(0,4)+" "+strStamp.substring(8,10)+":"+strStamp.substring(10,12);}function checkKeywordFilter(){var iTmpCounter=iCurrentProgram;var objOneRow=objGridData[iTmpCounter].split("\t");var thisChannel=objOneRow[colSourceID]+objOneRow[colChannelNumber];while(iTmpCounter<objGridData.length){var strTitle=objOneRow[colProgramTitle];if(strTitle.toLowerCase().indexOf(strKeyword.toLowerCase())>=0){return true;}iTmpCounter++;objOneRow=objGridData[iTmpCounter].split("\t");if(thisChannel!=(objOneRow[colSourceID]+objOneRow[colChannelNumber])){return false;}}return false;}function checkGenreFilter(){var iTmpCounter=iCurrentProgram;var objOneRow=objGridData[iTmpCounter].split("\t");var thisChannel=objOneRow[colSourceID]+objOneRow[colChannelNumber];while(iTmpCounter<objGridData.length){var iCategory=parseInt(objOneRow[colCategory],10);switch(optionGenreFilter){case 2: if((iCategory&64)==64){return true;}break;case 3: if((iCategory&1024)==1024){return true;}break;case 4: if((iCategory&2)==2){return true;}break;case 5: break;case 6: if((iCategory&256)==256){return true;}break;default:return true;}iTmpCounter++;objOneRow=objGridData[iTmpCounter].split("\t");if(thisChannel!=(objOneRow[colSourceID]+objOneRow[colChannelNumber])){return false;}}return false;}function drawGridRow(){var hideChannel=false;var objOneRow=objGridData[iCurrentProgram].split("\t");var strCurrentLetters=objOneRow[colCallLetters];var checkit="";strCurrentChannel=objOneRow[colChannelNumber];iCurrentSourceID=objOneRow[colSourceID];if((strCurrentLetters==null)||(strCurrentLetters.length<=0)){iCurrentProgram++;return;}var theOption=document.createElement("OPTION");theOption.value=objOneRow[colSortOrder]+"|"+objOneRow[colSourceID]+"|"+strCurrentChannel;if(strCurrentChannel.length>0){theOption.text=strCurrentChannel+" "+strCurrentLetters;}else{theOption.text=strCurrentLetters;}if(!isSelectedChannel(iCurrentSourceID)){if((forceOptionsCreate)&&(availChannels!=null)){availChannels.options[availChannels.options.length]=theOption;}if(optionFavChannels){hideChannel=true;}}else{if((forceOptionsCreate)&&(selectChannels!=null)){selectChannels.options[selectChannels.options.length]=theOption;}checkit="CHECKED";}if(optionGenreFilter>0){hideChannel=! checkGenreFilter();}if(bUseKeywordFilter){hideChannel=! checkKeywordFilter();}var srctype=parseInt(objOneRow[colSourceType],10);if((bHDTVOnlyFilter)&&((srctype&16)!=16)){hideChannel=true;}var iAdFreq=iInGridAdFrequency;if(bHDTVOnlyFilter){iAdFreq=10;}if((GridAds)&&(iGridAds<MaxGridAds)){if(((iRowCount-iFirstGridAdRow)> 0)&&((iRowCount-iFirstGridAdRow)% iAdFreq==0)&&(!hideChannel)||((iRowCount==iFirstGridAdRow)&&(iGridAds==0))){strHTML+="<tr class='gridAdRow'><td colspan='"+iTotalCellsAcross+"' style='padding-top:5px;padding-bottom:5px;background-color: #DCDDCB;border-left: solid 1px #DCDDCB'>";strHTML+="<center><iframe align=center valign=middle id='inGridAdCell"+iGridAds+"' frameborder='no' scrolling='no' style='width:728px;height:90px;border: none;'><\/iframe><\/center>";strHTML+="<\/td><\/tr>";iGridAds++;}}if(!hideChannel){if((!optionScrollGrid)&&((iRowCount%optionTimebarRepeat)==0)){drawTimeBar();}}if(!hideChannel){strHTML+="<tr class='gridRow' id='gr"+iRowCount+"'>";drawChannelCell(objOneRow, checkit);}while((iCurrentSourceID>=0)&&(iCurrentSourceID==objOneRow[colSourceID])&&(strCurrentChannel==objOneRow[colChannelNumber])){if(!hideChannel){drawProgramCell(objOneRow);}else{iCurrentProgram++;}if(objGridData[iCurrentProgram]!=null){objOneRow=objGridData[iCurrentProgram].split("\t");}else{iCurrentSourceID=-1;}}if(!hideChannel){strHTML+="<\/tr>";iRowCount++;}}function drawSpacerRow(bIsTimebar){strHTML+="<tr class='sr'>";strHTML+="<td class='sc' style='width:"+iChannelWidthPx+"px;'><\/td>";for(var n=0;n<iProgramCellsAcross;n++){strHTML+="<td class='sc' style='width:"+iSliceWidthPx+"px;'><\/td>";}strHTML+="<\/tr>";}function getDateStub(dt){return formatInt(dt.getMonth()+1,2)+'/'+formatInt(dt.getDate(),2);}function drawNewGridSelectors(){var tmpDate=new Date();var bSelected=false;var value="";var text="";tmpDate.setTime(dtCurrentLocalDate.getTime()-(24*60*60*1000));var objSelect=document.getElementById("dateSelect");if(objSelect!=null){objSelect.options.length=0;for(var n=0;n<=15;n++){value=tmpDate.getFullYear()+","+(tmpDate.getMonth()+1)+","+tmpDate.getDate();text=getDateStub(tmpDate)+" "+strLongDays[tmpDate.getDay()];objSelect.options[objSelect.length]=new Option(text, value, false, false);tmpDate.setTime(tmpDate.getTime()+(24*60*60*1000));}}tmpDate=new Date(dtCurrentLocalDate.getFullYear(), dtCurrentLocalDate.getMonth(), dtCurrentLocalDate.getDate(), 0, 0, 0);objSelect=document.getElementById("timeSelect");var iMinuteInterval=60;if(objSelect!=null){objSelect.options.length=0;for(var h=0;h<1440/iMinuteInterval;h++){var hr=tmpDate.getHours();var mn=tmpDate.getMinutes();var ap="am";if(hr==0){hr=12;}else if(hr==12){ap="pm";}else if(hr>12){ap="pm";hr-=12;}if(mn==0){mn="00";}if(hr<10){hr=" "+hr;}value=tmpDate.getHours()+":"+mn;text=hr+":"+mn+ap;var option=new Option(text, value, false, false);option.style.textAlign="right";objSelect.options[objSelect.length]=option;tmpDate.setTime(tmpDate.getTime()+(iMinuteInterval*60*1000));}}}function doProviderChange(objSelect){if(objSelect.value=="0"){document.location=dataPathOffset+"setup/localizeus.aspx?referrerid=0&returnurl=&regMode=0";objSelect.blur();return;}var iSID=parseInt(objSelect.value,10);if(iSID>0){paramServiceID=iSID;forceOptionsCreate=true;if((availChannels!=null)&&(selectChannels!=null)){availChannels.options.length=0;selectChannels.options.length=0;}objSelect.blur();reloadGrid();}}function doGenreChange(objSelect){if(objSelect.value!=6){var optsDiv=document.getElementById("GridOptsDiv");if(optsDiv!=null){if(optsDiv.style.visibility=="visible"){doGridOpts();}}}switch(objSelect.value){case "0" : bUseKeywordFilter=false;optionFavChannels=false;optionGenreFilter=0;iLastGenreValue=0;countGridActio
("FilterChange", "All Channels");break;case "1" : bUseKeywordFilter=false;var selList=objSelectedChannelsCombo;if(selList!=null){if(selList.length>0){optionFavChannels=true;optionGenreFilter=0;iLastGenreValue=1;countGridAction("FilterChange", "Favorite Channels");}else{objSelect.value=6;iLastGenreValue=0;doGridOpts();objSelect.blur();return;}}break;case "2" : optionGenreFilter=2;bUseKeywordFilter=false;optionFavChannels=false;iLastGenreValue=2;objSelect.blur();countGridAction("FilterChange", "Movie Filter");break;case "3" : optionGenreFilter=3;bUseKeywordFilter=false;optionFavChannels=false;iLastGenreValue=3;objSelect.blur();countGridAction("FilterChange", "Sports Filter");break;case "4" : optionGenreFilter=4;bUseKeywordFilter=false;optionFavChannels=false;iLastGenreValue=4;objSelect.blur();countGridAction("FilterChange", "Family Filter");break;case "5" : optionGenreFilter=5;bUseKeywordFilter=false;optionFavChannels=false;iLastGenreValue=5;objSelect.blur();countGridAction("FilterChange", "PPV Filter");break;case "6" : optionGenreFilter=6;bUseKeywordFilter=false;optionFavChannels=false;iLastGenreValue=6;objSelect.blur();countGridAction("FilterChange", "News Filter");break;case "7": doKeywordFilter(objSelect);objSelect.blur();countGridAction("FilterChange", "Keyword Filter");return;default: objSelect.value=iLastGenreValue;objSelect.blur();return;}showLoadingScreen();setTimeout("drawListings()", 1);}function drawTimeBar(){if(optionScrollGrid){strHTML+="<div class='timebarDiv' id='timebarDiv'>";strHTML+="<table class='timebarTable' cellpadding='0' cellspacing='0' border='0'>";drawSpacerRow(true);}strHTML+="<tr class='timebarRow'>";strHTML+="<td class='timebarCell' style='width:"+iChannelWidthPx+"px;vertical-align:middle;'>";if(!boolDisableArrows){strHTML+="<table cellpadding=2 cellspacing=0 border=0>";strHTML+="<td style='text-align:left;vertical-align:middle;'><a href=\"java script:doArrowClick(-1,1)\"><img alt='Previous Day' src='/listings/images/leftarrow2.gif' border='0' \/><\/a><\/td>";strHTML+="<td style='text-align:left;vertical-align:middle;'><a href=\"java script:doArrowClick(-1,0)\"><img alt='Previous Timespan' src='/listings/images/leftarrow.gif' border='0' \/><\/a><\/td>";strHTML+="<\/table>";}var selected="";var iHeaderCnt=0;strHTML+="<\/td >";var iTimeCellCount=iGridSpanMinutes/iTimebarIncrements;var iTimeCellColSpan=iTimebarIncrements/iMinTimeSlice;for(var n=0;n<iTimeCellCount;n++){strHTML+="<td class='timebarCell' colspan='"+iTimeCellColSpan+"'>";if((n==iTimeCellCount-1)&&(!boolDisableArrows)){strHTML+="<table cellpadding=0 cellspacing=0 border=0 width=100%>";strHTML+="<tr>";strHTML+="<td class='timebarCell' style='text-align:left;'>"+strTimebarHeaders[iHeaderCnt]+"<\/td>";strHTML+="<td style='text-align:right;vertical-align:middle;'>";iHeaderCnt++;strHTML+="<table align=right cellpadding=2 cellspacing=0 border=0><tr>";strHTML+="<td style='text-align:right;'><a href=\"java script:doArrowClick(1,0)\"><img alt='Next Timespan' src='/listings/images/rightarrow.gif' border='0' \/><\/a><\/td>";strHTML+="<td style='text-align:right;'><a href=\"java script:doArrowClick(1,1)\"><img alt='Next Day' src='/listings/images/rightarrow2.gif' border='0' \/><\/a><\/td>";strHTML+="<\/tr><\/table>";strHTML+="<\/td><\/tr><\/table>";}else{if(n==0){strHTML+="<table cellpadding=0 cellspacing=0 border=0 class='timebarCell'><td class='timebarCell' style='text-align:left;'>"+strTimebarHeaders[iHeaderCnt]+"<\/td>";strHTML+="<td style='vertical-align:middle;padding:0px 0px 0px 4px'>";strHTML+="<\/td><\/table>";iHeaderCnt++;}else{strHTML+=strTimebarHeaders[iHeaderCnt];iHeaderCnt++;}}strHTML+="<\/td >";}strHTML+="<\/tr>";if(optionScrollGrid){strHTML+="<\/table>";strHTML+="<\/div>";}}function doTimeSelectChange(select){if(select!=null){var strTime=select[select.selectedIndex].value;var hrmin=strTime.split(":");if(hrmin.length>=2){paramGridHour=hrmin[0];paramGridMinute=hrmin[1];}countGridAction("TimeSelect", select[select.selectedIndex].text);}var theDiv=document.getElementById("TimeSelectDiv");if(theDiv!=null){theDiv.style.visibility="hidden";theDiv.style.display="none";}select.blur();reloadGrid();}function drawGridLegend(){strHTML+="<center class='gridLegend'><img border='0' hspace='0' vspace='0' src='images/gridlegend.gif' \/><\/center>";}function drawGrid(){if(!optionScrollGrid){strHTML+="<div class='gridDiv' name='gridDiv' id='gridDiv' style='height:auto;overflow:auto;'>";}else{strHTML+="<div class='gridDiv' name='gridDiv' id='gridDiv' style='height:"+optionGridHeightPx+"px;overflow-y:scroll;overflow-x:hidden;border-bottom: solid 1px #DCDDCB;'>";}strHTML+="<table class='gridTable' name='gridTable' id='gridTable'>";iCurrentProgram=1;iRowCount=0;drawSpacerRow(false);iLastFilterMatch=0;iGridAds=0;if(objGridData!=null){while(iCurrentProgram < objGridData.length){drawGridRow();}}strHTML+="<\/table>";strHTML+="<\/div>";forceOptionsCreate=false;PastCloseups=new Array(objGridData.length);}function hideCloseup(){var theDiv=document.getElementById("closeupPanel");theDiv.style.visibility="hidden";}function cu(nIndex, iSeriesID, iMovieID){getFlyoverInfo(0);var objRowData=objGridData[nIndex].split("\t");countGridAction("MoreInfo", objRowData[colProgramTitle]);srCountGridEvent(objRowData[colCategory], objRowData[colSubCategory], objRowData[colProgramTitle], objRowData[colProgramID], iSeriesID, "ClickProgram");var theURL="/detail/generic.aspx";var iCategory=parseInt(objRowData[colCategory],10);if(parseInt(iSeriesID,10)>0){theURL+="?sourcetype=s&id="+iSeriesID+"&episodeid="+objRowData[colProgramID];}else if(parseInt(iMovieID,10)>0){theURL+="?sourcetype=m&id="+iMovieID;}else{theURL+="?sourcetype=s&programid="+objRowData[colProgramID];}var objDetails=xmlDetailData.responseText.split("\t");srCountGridEvent(objDetails[colAjaxCategory], objDetails[colAjaxSubCategory], objRowData[colProgramTitle], objRowData[colProgramID], iSeriesID, "ClickProgram");document.location=theURL;}function doArrowClick(nDirection, nMode){var timeDelta=iGridSpanMinutes*60*1000*nDirection;var strAction="ArrowClick";var strValue="";if(nMode==1){timeDelta=24*60*60*1000*nDirection;strAction="DblArrowClick";if(nDirection>0){strValue='Next Day';}else{strValue='Previous Day';}}else{strValue=(parseInt(timeDelta,10)/60000);}dtGridLocalStartTime.setTime(dtGridLocalStartTime.getTime()+timeDelta);paramGridYear=dtGridLocalStartTime.getFullYear();paramGridMonth=dtGridLocalStartTime.getMonth()+1;paramGridDay=dtGridLocalStartTime.getDate();paramGridHour=dtGridLocalStartTime.getHours();paramGridMinute=dtGridLocalStartTime.getMinutes();countGridAction(strAction, strValue);reloadGrid();}function doDateDropSelect(objDateSelect){var str=objDateSelect.value;var dds=str.split(",");paramGridYear=dds[0];paramGridMonth=dds[1];paramGridDay=dds[2];objDateSelect.blur();var strValue='';var iDays=objDateSelect.selectedIndex;switch(iDays){case 0: strValue="Yesterday";break;case 1: strValue="Today";break;case 2: strValue="Tomorrow";break;default: strValue=(iDays-1)+" days ahead";}countGridAction("DateSelect", strValue);reloadGrid();}function showLoadingScreen(){var theGridDiv=document.getElementById("gridDiv");var loadingString="<table border='0' cellpadding='0' cellspacing='0' style='width:100%;height:100%;background-color:#FFFFFF'><td style='text-align:center;vertical-align:middle;'>";loadingString+="<center><img src='images/new/gridloading.gif' border=0><\/center>";if(theGridDiv!=null){theGridDiv.innerHTML=loadingString;}else{theGridDiv=document.getElementById("TvGridDiv");if(theGridDiv!=null){theGridDiv.innerHTML=loadingString;}}}function reloadGrid(){showLoadingScreen();setTimeout("getGridData()", 1);}function getGridData(){var qparams=null;dtDataLoadStart=new Date();if(paramServiceID==""){if(iServiceID!=0){paramServiceID=iServiceID;}else{if((paramServiceID=readCookie("ServiceID"))==null){if((paramServiceID=readCookie("srvid"))==null){if((paramServiceID=getQueryParam(document.location.search, "ServiceID"))==""){paramServiceID=80001;}}}}qparams=readCookie('LastGrid');if(qparams!=null){if(document.referrer!=null){if(document.referrer.toLowerCase().indexOf('/listings/setup/')>=0){qparams=qparams.replace('srvid','xxxx');qparams+="&srvid="+paramServiceID;}}optionFavChannels=(getQueryParam(qparams,'favchan')=='true');if(optionFavChannels){setSelectByValue("genreSelect",1);optionGenreFilter=0;}else{optionGenreFilter=parseInt(getQueryParam(qparams,'genre'),10);setSelectByValue("genreSelect", optionGenreFilter);}bHDTVOnlyFilter=(getQueryParam(qparams,'HDTVOnly')=='true');if(bHDTVOnlyFilter){toggleHDTV();}}else{qparams=getQueryParameters();}}else{qparams=getQueryParameters();}var dataPage="ajaxdata.ashx";var usePOST=true;if(useGridCache()){if(paramGridHour!=""){dataPage="gridcache.aspx";usePOST=false;}}var urlData=dataPathOffset+"/listings/data/"+dataPage;xmlHttp=GetXmlHttpObject(xmlDataEvent);if(xmlHttp!=null){if(usePOST){xmlHttp.open("POST", urlData , true);xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlHttp.send(qparams);}else{urlData+="?"+qparams;xmlHttp.open("GET", urlData , true);xmlHttp.send(null);}}else{setCookie("AjaxError", "1", 1);document.location=strDocLocation;}}function onDataComplete(){processGridData();drawListings();countListingsView();}function xmlDataEvent(){if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){dtDataLoadEnd=new Date();setTimeout("stopAds(true)", 1);try{collectWebtrendsData();}catch(err){}}}function countListingsView(){switch(optionGenreFilter){case 0 : if(optionFavChannels){strActiveFilter="Favorite Channels";}else{strActiveFilter="All Channels";}break;case 2 : strActiveFilter="Movie Filter";break;case 3 : strActiveFilter="Sports Filter";break;case 4 : strActiveFilter="Family Filter";break;case 5 : strActiveFilter="PPV Filter";break;case 6 : strActiveFilter="News Filter";break;case 7: strActiveFilter="Keyword Filter";break;default: strActiveFilter="All Channels";break;}var strProvType="National Grid";if((iServiceID!=80001)&&(iServiceID!=80004)){var tmpPR=strProviderName.toLowerCase();if(tmpPR.indexOf("dish")>=0){strProvType="Dish Network";}else if(tmpPR.indexOf("directv")>=0){strProvType="DirecTV";}else{strProvType="Cable/Other";}}var nAjaxLoadTime=new Number(iAjaxLoadTime);var nAjaxRender=new Number(iAjaxRender);countGridViewEx(strGridLoadType, strActiveFilter, strProvType, iChannelCount, iGridSpanMinutes, nAjaxLoadTime.toFixed(1), nAjaxRender.toFixed(0), iAjaxBytes);if(strGridLoadType=="Ajax Load"){urchinTracker('/listings/data/ajaxdata.ashx');}strGridLoadType="Ajax Load";}function processGridData(){try{objRawData=xmlHttp.responseText.split("\n");}catch(err){}if(objRawData.length<1){alert("Error retrieving data");return;}var objOneRow=objRawData[0].split("\t");var arLocalTime=objOneRow[0].split("-");var arGridTime=objOneRow[1].split("-");dtGridLocalStartTime=new Date(arGridTime[0], arGridTime[1]-1, arGridTime[2], arGridTime[3], arGridTime[4], 0, 0);dtCurrentLocalDate=new Date(arLocalTime[0], arLocalTime[1]-1, arLocalTime[2], arLocalTime[3], arLocalTime[4], 0, 0);iGridSpanMinutes=objOneRow[2];iServiceID=objOneRow[7];strProviderName=objOneRow[8];if(parseInt(iServiceID,10)==80001){isNationalGrid=true;}else{isNationalGrid=false;}var objSpan=document.getElementById("spanProviderName");if(objSpan!=null){objSpan.innerHTML="<font style='font-size:12px;font-weight:bold;color:#990000;'>"+strProviderName+"</font>";}readChannelsCookie();paramGridYear=dtGridLocalStartTime.getFullYear();paramGridMonth=dtGridLocalStartTime.getMonth()+1;paramGridDay=dtGridLocalStartTime.getDate();paramGridHour=dtGridLocalStartTime.getHours();paramGridMinute=dtGridLocalStartTime.getMinutes();iProgramCellsAcross=iGridSpanMinutes/iMinTimeSlice;iTotalCellsAcross=iProgramCellsAcross+1;iSliceWidthPx=Math.round((iGridWidthPixels-iScrollBarWidth-iChannelWidthPx)/iProgramCellsAcross)-2;var tbh=objOneRow[10];strTimebarHeaders=null;if(tbh!=null){if(tbh.length>0){strTimebarHeaders=tbh.split('|');}}objGridData=objRawData;}function GetXmlHttpObject(handler){var objXmlHttp=null;if(navigator.userAgent.indexOf("MSIE")>=0){var strName="Msxml2.XMLHTTP";if(navigator.appVersion.indexOf("MSIE 5.5")>=0){strName="Microsoft.XMLHTTP";}try{objXmlHttp=new ActiveXObject(strName);objXmlHttp.onreadystatechange=handler;return objXmlHttp;}catch(e){alert("Error. Scripting for ActiveX might be disabled");return null;}}try{objXmlHttp=new XMLHttpRequest();objXmlHttp.onload=handler;objXmlHttp.onerror=handler;return objXmlHttp;}catch(e){return null;}return null;}function getQueryParameters(){if(paramServiceID==80001){if(paramGridYear==""){paramGridYear=dServerET.getFullYear();}if(paramGridMonth==""){paramGridMonth=dServerET.getMonth()+1;}if(paramGridDay==""){paramGridDay=dServerET.getDate();}if(paramGridHour==""){paramGridHour=dServerET.getHours();}if(paramGridMinute==""){paramGridMinute=dServerET.getMinutes();}}var tmpParam="";var dt=new Date();tmpParam+="srvid="+paramServiceID;tmpParam+="&gridmins="+paramGridMins;tmpParam+="&gridyr="+paramGridYear;tmpParam+="&gridmo="+paramGridMonth;tmpParam+="&griddy="+paramGridDay;tmpParam+="&gridhr="+paramGridHour;if(!useGridCache()){tmpParam+="&zip="+paramZipCode;tmpParam+="&music="+paramSuppressMusic;tmpParam+="&ppv="+paramSuppressPPV;tmpParam+="&genre="+optionGenreFilter;tmpParam+="&favchan="+optionFavChannels;tmpParam+="&HDTVOnly="+bHDTVOnlyFilter;tmpParam+="&rnd="+dt.getTime();}return tmpParam;}function doGridOpts(){var optsDiv=document.getElementById("GridOptsDiv");var theGrid=document.getElementById("gridDiv");var theTBar=document.getElementById("timebarDiv");if((optsDiv!=null)&&(theGrid!=null)){if(optsDiv.style.visibility=="visible"){optsDiv.style.display="none";optsDiv.style.visibility="hidden";if(theTBar!=null){theTBar.style.visibility="visible";theTBar.style.display="block";}theGrid.style.visibility="visible";theGrid.style.display="block";countGridAction("Preferences", "Hide");}else{getFlyoverInfo(0);theGrid.style.visibility="hidden";theGrid.style.display="none";if(theTBar!=null){theTBar.style.visibility="hidden";theTBar.style.display="none";}optsDiv.style.visibility="visible";optsDiv.style.display="block";countGridAction("Preferences", "Show");}}}function setChannelsCookie(selChans){var strCookieValue="";for(var n=0;n<selChans.length;n++){if(n>0){strCookieValue+="|";}var str=selChans[n].value;var val=str.split('|');strCookieValue+=val[colSource];}setCookie(cookieSelectedChannels+iServiceID, strCookieValue, 365);}function closeOptions(){var genre=document.getElementById("genreSelect");if(genre!=null){genre.value=iLastGenreValue;}else{alert('no selector');}doGridOpts();if(bOptionsChanged){var oldMusic=optionHideMusic;optionHideMusic=isOptionChecked("chkHideMusic", optionHideMusic);if(optionHideMusic){paramSuppressMusic=1;}else{paramSuppressMusic=0;}var oldPPV=optionHidePPV;optionHidePPV=isOptionChecked("chkHidePPV", optionHidePPV);if(optionHidePPV){paramSuppressPPV=1;}else{paramSuppressPPV=0;}optionNoGridSelect=isOptionChecked("chkNoGridSelect", optionNoGridSelect);optionTruncateText=isOptionChecked("chkTruncateText", optionTruncateText);optionHideIcons=isOptionChecked("chkHideIcons", optionHideIcons);optionTimebarRepeat=getSelectListValue("selTimebarRepeat", optionTimebarRepeat);optionDisableFlyovers=isOptionChecked("chkDisableFlyovers", optionDisableFlyovers);optionPopNewWindows=isOptionChecked("chkPopNewWindows", optionDisableFlyovers);if(isOptionChecked("gridExpand", !optionScrollGrid)){optionScrollGrid=false;}else{optionScrollGrid=true;var gridHeightPx=document.getElementById("selGridHeightPx");if(gridHeightPx!=null){optionGridHeightPx=gridHeightPx.value;}}var selChans=objSelectedChannelsCombo;if(selChans.length>0){if(bFilterChanged){optionFavChannels=true;bFilterChanged=false;optionGenreFilter=0;iLastGenreValue=1;}setChannelsC
okie(selChans);}else{optionFavChannels=false;deleteCookie(cookieSelectedChannels+iServiceID);}showLoadingScreen();optionGridMinutes=getSelectListValue("timespanSelect", iGridSpanMinutes);if((optionGridMinutes!=iGridSpanMinutes)||(oldMusic!=optionHideMusic)||(oldPPV!=optionHidePPV)){paramGridMins=optionGridMinutes;saveCookieOptions();reloadGrid();}else{stopAds(false);saveCookieOptions();setTimeout("drawListings()", 1);}}}function setOptionsChanged(){bOptionsChanged=true;}function doFixedHeightClick(){setOptionsChanged();var subOption=document.getElementById("selGridHeightPx");if(subOption!=null){subOption.disabled=false;}subOption=document.getElementById("selTimebarRepeat");if(subOption!=null){subOption.disabled=true;}subOption=document.getElementById("timeBarRepeatText");if(subOption!=null){subOption.style.color="#999999";}}function doScrollingGridClick(){setOptionsChanged();var subOption=document.getElementById("selTimebarRepeat");if(subOption!=null){subOption.disabled=false;}subOption=document.getElementById("timeBarRepeatText");if(subOption!=null){subOption.style.color="#000000";}subOption=document.getElementById("selGridHeightPx");if(subOption!=null){subOption.disabled=true;}}function moveOneChannel(iDirection){var source=null;var target=null;switch(iDirection){case 0: source=selectChannels;target=availChannels;break;case 1: source=availChannels;target=selectChannels;break;}if(!((source!=null)&&(target!=null))){alert("Error: Source or Target is NULL");}var index=source.selectedIndex;if(index<0){alert('nothing selected!');return false;}var newIndex=index;for(index;index<source.length;index++){if(source.options[index].selected==true){var added=false;var iLastIndex=target.length;var newElem=document.createElement("OPTION");newElem.text=source.options[index].text;newElem.value=source.options[index].value;var n=0;for(n=0;n<target.length;n++){if(parseInt(newElem.value,10)< parseInt(target[n].value,10)){if(isIE){target.options.add(newElem, n);}else{target.add(newElem, target.options[n]);}n=target.length+1;added=true;}}if(!added){if(isIE){target.options.add(newElem);}else{target.add(newElem, null);}}source.remove(index);newIndex=index;if(index>=0){index--;}}}if(newIndex<source.length){source.selectedIndex=newIndex;}else{source.selectedIndex=source.length-1;}setOptionsChanged();bFilterChanged=true;return false;}function moveAllChannels(iDirection){var source=null;switch(iDirection){case 0: source=selectChannels;break;case 1: source=availChannels;break;}if(source.length>0){if(iDirection==0){if(!confirm("Are you sure you want to clear all your selected channels? This action is not reversible! If you choose OK, you will need to re-select your preferred channels again.")){return false;}}source.selectedIndex=source.length-1;while(source.length>0){moveOneChannel(iDirection);source.selectedIndex=source.length-1;}}return false;}function mouseMoved(e){if(isIE){mouseX=event.clientX;mouseY=event.clientY;}else{mouseX=e.pageX;mouseY=e.pageY;}if(mouseX < 0){mouseX=0;}if(mouseY < 0){mouseY=0;}}function stopAds(bGotoDataProcess){var adCell=document.getElementById("TvgoIFrameTop");if(adCell!=null){adCell.src="";}adCell=document.getElementById("TvgoIFrameRight");if(adCell!=null){adCell.src="";}adCell=document.getElementById("TvgoIFrameBot");if(adCell!=null){adCell.src="";}adCell=document.getElementById("TvgoIFrameButton");if(adCell!=null){adCell.src="";}if(bGotoDataProcess){setTimeout("onDataComplete()", 1);}}function getBooleanInt(bool){if(bool){return 1;}return 0;}function intToBool(i){if(parseInt(i,10)!=0){return true;}return false;}function xmlPrefsDataEvent(){if(xmlPrefsData.readyState==4 || xmlPrefsData.readyState=="complete"){}}function saveCookieOptions(){var strOptCookie="";var strVer=formatInt(iCurrentCookieVer,2);var dt=new Date();var timestamp=dt.getFullYear()+'/'+formatInt(dt.getMonth()+1,2)+'/'+formatInt(dt.getDate(),2)+'.'+formatInt(dt.getHours(),2)+':'+formatInt(dt.getMinutes(),2)+':'+formatInt(dt.getSeconds(),2);strOptCookie+="tvg"+strVer+"|";strOptCookie+=timestamp+"|";strOptCookie+=getBooleanInt(optionHideMusic)+"|";strOptCookie+=getBooleanInt(optionHideIcons)+"|";strOptCookie+=getBooleanInt(optionTruncateText)+"|";strOptCookie+=getBooleanInt(optionScrollGrid)+"|";strOptCookie+=getBooleanInt(optionFavChannels)+"|";strOptCookie+=getBooleanInt(optionNoGridSelect)+"|";strOptCookie+=optionGridHeightPx+"|";strOptCookie+=optionTimebarRepeat+"|";strOptCookie+=optionGridMinutes+"|";strOptCookie+=optionGridStart+"|";strOptCookie+=getBooleanInt(optionDisableFlyovers)+"|";strOptCookie+=getBooleanInt(optionPopNewWindows)+"|";strOptCookie+=getBooleanInt(optionHidePPV)+"|";setCookie(cookieOptions, strOptCookie, 365);var urlData=dataPathOffset+"/listings/data/gridprefs.ashx";xmlPrefsData=GetXmlHttpObject(xmlPrefsDataEvent);if(xmlPrefsData!=null){xmlPrefsData.open("GET", urlData , true);xmlPrefsData.send(null);}}function initOptionValues(){setCheckbox("chkTruncateText", optionTruncateText);setCheckbox("chkHideMusic", optionHideMusic);setCheckbox("chkHidePPV", optionHidePPV);setCheckbox("chkHideIcons", optionHideIcons);setCheckbox("chkNoGridSelect", optionNoGridSelect);setCheckbox("chkDisableFlyovers", optionDisableFlyovers);setCheckbox("chkPopNewWindows", optionPopNewWindows);setCheckbox("gridScroll", optionScrollGrid);setCheckbox("gridExpand", !optionScrollGrid);setSelectByValue("selGridHeightPx", optionGridHeightPx);setSelectByValue("selTimebarRepeat", optionTimebarRepeat);setSelectByValue("timespanSelect", optionGridMinutes);if(optionGridStart!="-1"){var obj=document.getElementById("selStartTime");if(obj!=null){obj.disabled=false;obj.value=optionGridStart;obj=document.getElementById("defGridStartFixed");if(obj!=null){obj.checked=true;}obj=document.getElementById("defGridStartLocal");if(obj!=null){obj.checked=false;}}}if(optionScrollGrid){doFixedHeightClick();}else{doScrollingGridClick();}}function setSelectByValue(strID, strValue){var o=document.getElementById(strID);if(o!=null){for(var n=0;n<o.options.length;n++){if(o.options[n].value==strValue){o.selectedIndex=n;return;}}}}function setCheckbox(strID, bChecked){var o=document.getElementById(strID);if(o!=null){o.checked=bChecked;}}function readCookieOptions(){var strCookie=readCookie(cookieOptions);if(strCookie==null){return;}var oCD=1;var oHM=2;var oHI=3;var oTT=4;var oSG=5;var oFC=6;var oNS=7;var oGH=8;var oTR=9;var oGM=10;var oGS=11;var oDF=12;var oPW=13;var oPP=14;var tmpOpts=strCookie.split("|");if(tmpOpts.length<12){return;}var strVer=tmpOpts[0];strVer=strVer.replace('tvg','');var iVer=parseInt(strVer,10);var bUpdateCookie=false;if(iVer<iCurrentCookieVer){if(iVer==(iCurrentCookieVer-1)){oHM=1;oHI=2;oTT=3;oSG=4;oFC=5;oNS=6;oGH=7;oTR=8;oGM=9;oGS=10;oDF=11;oPW=12;oPP=13;bUpdateCookie
true;}else{saveCookieOptions();return;}}else{var strDate=tmpOpts[oCD].replace('.',' ');var dtDT=new Date();dtDT.setTime(Date.parse(strDate));}optionHideMusic=intToBool(tmpOpts[oHM]);optionHideIcons=false;optionTruncateText=intToBool(tmpOpts[oTT]);optionScrollGrid=intToBool(tmpOpts[oSG]);optionNoGridSelect=true;optionGridHeightPx=parseInt(tmpOpts[oGH],10);optionTimebarRepeat=parseInt(tmpOpts[oTR],10);optionGridMinutes=parseInt(tmpOpts[oGM],10);optionGridStart=tmpOpts[oGS];optionDisableFlyovers=intToBool(tmpOpts[oDF]);optionPopNewWindows=intToBool(tmpOpts[oPW]);optionHidePPV=intToBool(tmpOpts[oPP]);iGridSpanMinutes=optionGridMinutes;paramGridMins=iGridSpanMinutes;if(bUpdateCookie){saveCookieOptions();}}function getMaxZ(){if(document.getElementsByTagName){return document.getElementsByTagName("DIV").length;}else if(document.all){return document.body.all.tags("DIV").length;}else if(document.layers){return document.layers.length;}return 999999999;}function initDrag(){if(document.layers){document.captureEvents(Event.MOUSEMOVE|Event.MOUSEDOWN|Event.MOUSEUP);}document.onmousemove=dragf;document.onmousedown=dragf;document.onmouseup=dragf;dragDiv=null;dr
gInit=1;zMax=getMaxZ();}function dragf(arg){ev=arg?arg:event;mouseMoved(ev);if(dragDiv && ev.type=="mousedown"){dragOn=1;dragX=(ev.pageX?ev.pageX:ev.clientX)-parseInt(dragDiv.style.left,10);dragY=(ev.pageY?ev.pageY:ev.clientY)-parseInt(dragDiv.style.top,10);dragDiv.style.zIndex=zMax++;return false;}if(ev.type=="mouseup"){dragOn=0;}if(dragDiv && ev.type=="mousemove" && dragOn){dragDiv.style.left=(ev.pageX?ev.pageX:ev.clientX)-dragX;dragDiv.style.top=(ev.pageY?ev.pageY:ev.clientY)-dragY;return false;}if(ev.type=="mouseout"){if(!dragOn){dragDiv=null;}}}function drag(div){if(!dragInit){initDrag();}if(!dragOn){dragDiv=document.getElementById?document.getElementById(div):document.all?document.all[div]:document.layers?document.layers[div]:null;if(document.layers){dragDiv.style=dragDiv;}dragDiv.onmouseout=dragf;}}function gf(nIndex){nFlyoverIndex=nIndex;nFlyoverHandle=setTimeout("getFlyoverInfo(1)", 0);}function getFlyoverInfo(nDirection){var theDiv=document.getElementById("ProgramDesc");if(theDiv!=null){if(nDirection==0){theDiv.style.display="none";theDiv.style.visibility="hidden";clearTimeout(nFlyoverHandle);nFlyoverHandle=null;return;}if(objGridData[nFlyoverIndex]!=null){var objRowData=objGridData[nFlyoverIndex].split("\t");getDetailData(objRowData[colProgramID]);}}}var colAjaxProgramID=0;var colAjaxTitle=1;var colAjaxEpisode=2;var colAjaxEpDesc=3;var colAjaxSeriesID=4;var colAjaxMovieID=5;var colAjaxDuration=6;var colAjaxTvRating=7;var colAjaxMvRating=8;var colAjaxReleaseYr=9;var colAjaxCategory=10;var colAjaxSubCategory=11;var colAjaxCountry=12;var colAjaxDirector=13;var colAjaxCastInfo=14;var colAjaxRemoteRecordURL=15;function fillPageSizeVars(){if(isIE){iClientWidth=document.documentElement.clientWidth;if(iClientWidth==0){iClientWidth=document.body.clientWidth;}iClientHeight=document.documentElement.clientHeight;if(iClientHeight==0){iClientHeight=document.body.clientHeight;}}else{iClientWidth=window.innerWidth;iClientHeight=wi
dow.innerHeight;}}function callRSI(rsiTitle, rsiCategory, rsiSubCategory){try{DM_addToLoc("CloseUpMasterTitle", rsiTitle);DM_addToLoc("CloseUpCategory0", rsiCategory);DM_addToLoc("CloseUpCategory1", rsiSubCategory);DM_tag();}catch(err){}}function drawFlyoverDesc(strDescription){fillPageSizeVars();var objData=strDescription.split("\n");var objDetails=objData[0].split("\t");var objAmazon=null;if(objData.length>1){objAmazon=objData[1].split("\t");}strDescription=objDetails[colAjaxEpDesc];var strShowTitle="";var strAirTime="";var strEpisodeTitle="";var objDIV=null;var iSeriesID=0;var iMovieID=0;if((strDescription==null)||(strDescription.length<=0)){strDescription="Program description not available.";objDIV=document.getElementById("fomoreinfo");if(objDIV!=null){objDIV.style.visibility="hidden";objDIV.style.display="none";}}else{objDIV=document.getElementById("fomoreinfo");if(objDIV!=null){objDIV.style.visibility="visible";objDIV.style.display="block";}}if(objGridData[nFlyoverIndex]!=null){var theDiv=document.getElementById("ProgramDesc");if(theDiv==null){return;}var objRowData=objGridData[nFlyoverIndex].split("\t");strShowTitle=objDetails[colAjaxTitle];strAirTime=formatTime(getDateFromParam(objRowData[colStartTime]))+"  "+objRowData[colCallLetters];if(objRowData[colChannelNumber].length>0){strAirTime+="  ch:"+objRowData[colChannelNumber];}if(objDetails[colAjaxEpisode]!=null){if(objDetails[colAjaxEpisode].length>0){strEpisodeTitle=objDetails[colAjaxEpisode];}}iSeriesID=objDetails[colAjaxSeriesID];iMovieID=objDetails[colAjaxMovieID];var iDuration=parseInt(objRowData[colDuration],10);objDIV=document.getElementById("fotitle");if(objDIV!=null){objDIV.innerHTML=strShowTitle;}else{alert('no title div');}if(iDuration>0){strAirTime+="  "+iDuration+"min";}if(parseInt(objDetails[colAjaxReleaseYr],10)>0){strAirTime+="  "+objDetails[colAjaxReleaseYr];}var strRating=objDetails[colAjaxTvRating];if(strRating.indexOf("None")<0){strAirTime+="  "+strRating;}else{strRating=objDetails[colAjaxMvRating];if(strRating.indexOf("None")<0){strAirTime+="  "+strRating;}}objDIV=document.getElementById("foairtime");if(objDIV!=null){objDIV.innerHTML=strAirTime;}objDIV=document.getElementById("foepisode");if(objDIV!=null){if(strEpisodeTitle.length>0){objDIV.innerHTML=strEpisodeTitle;objDIV.style.visibility="visible";objDIV.style.display="block";}else{objDIV.innerHTML="";objDIV.style.visibility="hidden";objDIV.style.display="none";}}objDIV=document.getElementById("fosummary");if(objDIV!=null){objDIV.innerHTML=strDescription;}objDIV=document.getElementById("moreInfoLink");if(objDIV!=null){objDIV.href="java script:cu("+nFlyoverIndex+","+iSeriesID+","+iMovieID+")";}objDIV=document.getElementById("remoteRecordLink");var objDIV2=document.getElementById("tivoreclink");if((objDIV!=null)&&(objDIV2!=null)){if(objDetails[colAjaxRemoteRecordURL].length > 0){objDIV2.style.visibility="visible";objDIV.href=objDetails[colAjaxRemoteRecordURL];objDIV.style.display="block";objDIV.style.visibility="visible";}else{objDIV2.style.visibility="hidden";objDIV.href="#";objDIV.style.display="none";objDIV.style.visibility="hidden";}}var iCategory=parseInt(objRowData[colCategory],10);objDIV2=document.getElementById("foProgDescCell");if(objDIV2!=null){switch(iCategory){case 2: objDIV2.style.backgroundColor="#BBEEEE";break;case 64: objDIV2.style.backgroundColor="#F4F4B1";break;case 1024: objDIV2.style.backgroundColor="#BFEDBF";break;case 256: objDIV2.style.backgroundColor="#CCCCDD";break;default: objDIV2.style.backgroundColor="#FFFFFF";break;}}var azDetailPageURL=1;var azTitle=2;var azImageSrc=3;var azPublisher=4;var azBinding=5;var azRating=6;var azShipInfo=7;var azPrice=8;var azPriceDate=9;var azRow=document.getElementById("AmazonRow");if(objAmazon!=null){var azTmp=document.getElementById("azImage");azTmp.src=objAmazon[azImageSrc];azTmp=document.getElementById("azImgHref");azTmp.href=objAmazon[azDetailPageURL];azTmp=document.getElementById("azTitle");azTmp.href=objAmazon[azDetailPageURL];azTmp.innerHTML=objAmazon[azTitle];azTmp=document.getElementById("azPrice");azTmp.innerHTML=objAmazon[azPrice];azTmp=document.getElementById("azBinding");azTmp.innerHTML=objAmazon[azBinding];azTmp=document.getElementById("azShipInfo");azTmp.innerHTML=objAmazon[azShipInfo];azTmp=document.getElementById("azPublisher");azTmp.innerHTML=objAmazon[azPublisher];azTmp=document.getElementById("azPriceDate");azTmp.innerHTML=objAmazon[azPriceDate];var stars="";var ws=parseInt(objAmazon[azRating],10);for(var wsc=0;wsc<ws;wsc++){stars+="<image class='stars' src='/images/search/ColorStar.gif' alt='nostar'>";}if(parseFloat(objAmazon[azRating])-parseFloat(ws)>0.0){stars+="<image class='stars' src='/images/search/star_half.gif' alt='nostar'>";}azTmp=document.getElementById("azRating");azTmp.innerHTML=stars;if(azRow!=null){azRow.style.display="block";azRow.style.visibility="visible";}}else{if(azRow!=null){azRow.style.display="none";azRow.style.visibility="hidden";}}var theDescDiv=document.getElementById("ProgramDesc");var iBalloonWidth=0;var strPointer="<img src='images/new/pointerd.gif'>";if(theDescDiv!=null){iBalloonWidth=parseInt(theDescDiv.style.width,10);}var iHorizontalNudge=22;var leftOffset=0;if(parseInt(iClientWidth,10)> parseInt(iDocumentWidth,10)){leftOffset=parseInt((parseInt(iClientWidth,10)-parseInt(iDocumentWidth,10)-15,10)/2);}var iScrollX=0;var iScrollY=0;if(isIE){iScrollX=(document.all)?document.body.scrollLeft:window.pageXOffset;iScrollY=(document.all)?document.body.scrollTop:window.pageYOffset;}var iLeftNavWidth=180;if(mouseX-iLeftNavWidth-leftOffset+iScrollX<(iGridWidthPixels/2)){theDiv.style.left=mouseX+iScrollX-iHorizontalNudge;objDIV=document.getElementById("fobotline");if(objDIV!=null){objDIV.style.textAlign="left";}objDIV=document.getElementById("fotopline");if(objDIV!=null){objDIV.style.textAlign="left";}}else{theDiv.style.left=mouseX-iBalloonWidth+iScrollX+iHorizontalNudge;objDIV=document.getElementById("fobotline");if(objDIV!=null){objDIV.style.textAlign="right";}objDIV=document.getElementById("fotopline");if(objDIV!=null){objDIV.style.textAlign="right";}}theDiv.style.display="block";theDiv.style.zIndex=getMaxZ()+1;var iTop=mouseY-theDiv.offsetHeight-3+iScrollY;if(iTop<360){iTop=mouseY+3+iScrollY;strPointer="<img src='images/new/pointeru.gif'>";objDIV=document.getElementById("fotopline");if(objDIV!=null){objDIV.innerHTML=strPointer;}objDIV=document.getElementById("fobotline");if(objDIV!=null){objDIV.innerHTML="";}}else{strPointer="<img src='images/new/pointerd.gif'>";objDIV=document.getElementById("fobotline");if(objDIV!=null){objDIV.innerHTML=strPointer;}objDIV=document.getElementById("fotopline");if(objDIV!=null){objDIV.innerHTML="";}}theDiv.style.top=iTop;theDiv.style.visibility="visible";countFlyover(objDetails[colAjaxCategory], objDetails[colAjaxSubCategory], strShowTitle, objDetails[colAjaxProgramID], objDetails[colAjaxSeriesID], "HoverProgram");callRSI(strShowTitle, objDetails[colAjaxCategory], objDetails[colAjaxSubCategory]);}clearTimeout(nFlyoverHandle);nFlyoverHandle=null;}function xmlDetailEvent(){if(xmlDetailData.readyState==4 || xmlDetailData.readyState=="complete"){PastCloseups[nFlyoverIndex]=xmlDetailData.responseText;drawFlyoverDesc(xmlDetailData.responseText);}}function getDetailData(nProgramID){if(PastCloseups[nFlyoverIndex]!=null){drawFlyoverDesc(PastCloseups[nFlyoverIndex]);return;}var urlData=dataPathOffset+"/listings/data/ajaxdetail.ashx";var qparams="Qr="+nProgramID;qparams+="&srvid="+iServiceID;if(!isOptionChecked("chkDisableTiVo", false)){var objOneRow=objGridData[nFlyoverIndex].split("\t");qparams+="&srcid="+objOneRow[colSourceID];qparams+="&chnum="+objOneRow[colChannelNumber];qparams+="&chlet="+escape(objOneRow[colCallLetters]);qparams+="&time="+objOneRow[colStartTime];qparams+="&srctyp="+objOneRow[colSourceType];qparams+="&dur="+objOneRow[colDuration];}xmlDetailData=GetXmlHttpObject(xmlDetailEvent);if(xmlDetailData!=null){xmlDetailData.open("POST", urlData , true);xmlDetailData.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlDetailData.send(qparams);}}function formatInt(iValue,iDigits){iValue=''+iValue;while(iValue.length<iDigits){iValue='0'+iValue;}return iValue;}function formatTime(dt){var hour=dt.getHours();var AmPm="am";if(hour==0){hour=12;}else{if(hour>=12){AmPm="pm";if(hour>12){hour-=12;}}}var mins=formatInt(dt.getMinutes(),2);return hour+":"+mins+AmPm;}function getDateFromParam(str){return new Date(parseInt(str.substring(0,4),10),parseInt(str.substring(4,6),10)-1,parseInt(str.substring(6,8),10),parseInt(str.substring(8,10),10),parseInt(str.substring(10,12),10),0);}function printGrid(){countGridAction("Print", "");var printURL="GridPrint.aspx?"+getQueryParameters()+"&dest=printer";var printwin=window.open('', 'tvgoprintwin', 'width=780,height=500,scrollbars=yes');printwin.location=printURL;}

If anyone cares to figure out what it does, that would be great. From just browsing through it, I think it uses certain variables to make a URL of which file to look for. The "autogenerated" warning at the top most likely just means that the variables (like beginning time, ending time, time zone, etc.) are generated by some other script, but I think this script does contain the code that actually gets the data.

Edited by greeniguana00
0

Share this post


Link to post
Share on other sites

If you look at that code long enough images start to appear. It's kinda scary actually!!!

0

Share this post


Link to post
Share on other sites
If you look at that code long enough images start to appear. It's kinda scary actually!!!

Lay off the drugs :blink:

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0