//
// AUTO-GENERATED FILE - DO NOT EDIT!!!
//  8:18:30, Mon Nov 16, 2009 (GMT)
//
var wtdtCategory="", wtdtSubCategory="", wtdtShowTitle="", wtdtProgramID="", wtdtSeriesID="";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 autoOpenCloseup(){var idx=figIndex;var row=figRow;var osf=figOffsetFudge;var rht=40;if(isIE){rht=41;}clearFindInGrid();iGridScrollTop=(row*rht)+(osf)-80;optionGenreFilter=0;optionFavChannels=false;f3(idx,row);scrollTheGrid();}function cu(nIndex, iSeriesID, iMovieID){getFlyoverInfo(0);var objRowData=objGridData[nIndex];countGridAction("MoreInfo", objRowData[colProgramTitle]);srCountGridEvent(objRowData[colCategory], objRowData[colSubCategory], objRowData[colProgramTitle], objRowData[colProgramID], iSeriesID, "ClickProgram");var theURL="/detail/generic.aspx";var iCategory=objRowData[colCategory];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 f1(cell){var idx=parseInt(cell.id.replace("q",""));if(idx!=nFlyoverIndex){lastFlyColor=cell.style.backgroundColor;cell.style.backgroundColor="#EEEEEE";cell.style.color="#0000FF";cell.style.textDecoration="underline";}var objOneRow=objGridData[idx];var strTitle=objOneRow[colProgramTitle];window.status=objOneRow[colProgramTitle]+" "+formatTime(getDateFromParam(objOneRow[colStartTime]))+" "+objOneRow[colCallLetters]+" "+objOneRow[colChannelNumber];}function f2(cell){var idx=parseInt(cell.id.replace("q",""));if(idx==nFlyoverIndex){return;}cell.style.backgroundColor=lastFlyColor;cell.style.color="#000000";cell.style.textDecoration="none";window.status="";}function f3(nIndex, nRow){var cutr=document.getElementById("icr"+nRow);var cutd=document.getElementById("icd"+nRow);var cupc=document.getElementById("q"+nIndex);var cupcold=document.getElementById("q"+nFlyoverIndex);strLastFoTab="";if(cutr!=null){if((nFlyoverIndex==nIndex)||(nFlyoverIndex==-1)){if((isFF)||(isSafari)){if(cutr.style.visibility=="visible"){cutd.innerHTML="";cupc.style.color="";cupc.style.textDecoration="";cupc.style.backgroundColor=lastFlyColor;cupc.style.borderBottom="solid 1px #DCDDCB";cutr.style.visibility="collapse";nFlyoverIndex=-1;}else{cupc.style.backgroundColor=v2bgColor;cupc.style.color="#FF0000";cupc.style.textDecoration="none";cupc.style.borderBottom=("solid 1px "+v2bgColor);nFlyoverIndex=nIndex;}}else{if(cutr.style.display=="block"){cutd.innerHTML="";cupc.style.color="";cupc.style.textDecoration="";cupc.style.fontWeight="normal";cupc.style.backgroundColor=lastFlyColor;cupc.style.borderBottom="solid 1px #DCDDCB";cutr.style.display="none";nFlyoverIndex=-1;}else{cupc.style.backgroundColor=v2bgColor;cupc.style.color="#FF0000";cupc.style.textDecoration="none";cupc.style.borderBottom=("solid 1px "+v2bgColor);nFlyoverIndex=nIndex;}}}else{if(cupcold!=null){cupcold.style.borderBottom="solid 1px #DCDDCB";cupcold.style.backgroundColor=lastFlyColor;cupcold.style.color="";cupcold.style.textDecoration="";}cupc.style.backgroundColor=v2bgColor;cupc.style.color="#FF0000";cupc.style.textDecoration="none";cupc.style.borderBottom=("solid 1px "+v2bgColor);nFlyoverIndex=nIndex;}}else{nFlyoverIndex=nIndex;}if((nRow!=nFlyoverRow)&&(nFlyoverIndex>=0)){cutr=document.getElementById("icr"+nFlyoverRow);cutd=document.getElementById("icd"+nFlyoverRow);if((cutr!=null)&&(cutd!=null)){if((isFF)||(isSafari)){cutd.innerHTML="";cutr.style.visibility="collapse";}else{cutd.innerHTML="";cutr.style.display="none";}}}if(nFlyoverIndex>=0){nFlyoverRow=nRow;setTimeout("getFlyoverInfo(1)", 0);}}function closeFlyover(){if(optionCloseupsFooter){var cutr=document.getElementById("icrCloseup");var cutd=document.getElementById("icdCloseup");if((isFF)||(isSafari)){cutr.style.visibility="collapse";cutd.innerHTML="";}else{cutr.style.display="none";cutd.innerHTML="";}document.getElementById("gridDiv").style.height=optionGridHeightPx+"px";return;}f3(nFlyoverIndex, nFlyoverRow);return ;}function getFlyoverInfo(nDirection){if(nDirection==0){var theRow=document.getElementById("icr"+nFlyoverRow);var cutd=document.getElementById("icd"+nFlyoverRow);var cupcold=document.getElementById("q"+nFlyoverIndex);if(cupcold!=null){cupcold.style.backgroundColor=lastFlyColor;}nFlyoverIndex=-1;if(theRow!=null){if((isFF)||(isSafari)){theRow.style.visibility="collapse";cutd.innerHTML="";}else{theRow.style.display="none";cutd.innerHTML="";}}return;}if(objGridData[nFlyoverIndex]!=null){var objRowData=objGridData[nFlyoverIndex];getDetailData(objRowData[colProgramID]);}}function adjustCloseupSize(){var cutr=document.getElementById("icrCloseup");var cutd=document.getElementById("icdCloseup");var gridDiv=document.getElementById("gridDiv");gridDiv.style.height=(optionGridHeightPx-cutd.offsetHeight)+"px";}function drawFlyoverDesc(strDescription){var objData=strDescription.split("\n");var objDetails=objData[0].split("\t");var objAmazon=null;var strCastList="";var bDoMetrics=false;if(objData.length >=3){strCastList=objData[rowCastList];}strDescription=objDetails[colAjaxEpDesc];var strShowTitle="";var strAirTime="";var strEpisodeTitle="";var objDIV=null;var iSeriesID=0;var iMovieID=0;var strAjaxObjectUrl="";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){strAjaxObjectUrl=objDetails[colAjaxObjectUrl];var objRowData=objGridData[nFlyoverIndex];strShowTitle=objDetails[colAjaxTitle];strAirTime=formatTime(getDateFromParam(objRowData[colStartTime]))+"&nbsp;&nbsp;"+objRowData[colCallLetters];if(objRowData[colChannelNumber].length>0){strAirTime+="&nbsp;&nbsp;ch:"+objRowData[colChannelNumber];}if(objDetails[colAjaxEpisode]!=null){if(objDetails[colAjaxEpisode].length>0){strEpisodeTitle=objDetails[colAjaxEpisode];}}iSeriesID=objDetails[colAjaxSeriesID];iMovieID=objDetails[colAjaxMovieID];var iDuration=objRowData[colDuration];objDIV=document.getElementById("fotitle");if(objDIV !=null){objDIV.innerHTML=strShowTitle;objDIV.style.cursor="pointer";if(strAjaxObjectUrl!=null){if(strAjaxObjectUrl.length>0){objDIV.href=strAjaxObjectUrl;}else{objDIV.href="javascript:cu("+nFlyoverIndex+","+iSeriesID+","+iMovieID+")";}}else{objDIV.href="javascript:cu("+nFlyoverIndex+","+iSeriesID+","+iMovieID+")";}}else{alert('no title div');}objDIV=document.getElementById("fodvrlink");if((objDIV !=null)&&(objDetails[colAjaxDvrLink]!=null)){if(objDetails[colAjaxDvrLink].length > 20){objDIV.innerHTML=objDetails[colAjaxDvrLink];}}if(iDuration>0){strAirTime+="&nbsp;&nbsp;"+iDuration+"min";}if(parseInt(objDetails[colAjaxReleaseYr],10)>0){strAirTime+="&nbsp;&nbsp;"+objDetails[colAjaxReleaseYr];}var strRating=objDetails[colAjaxTvRating];if((strRating!=null)&&(strRating.indexOf("None")<0)){strAirTime+="&nbsp;&nbsp;"+strRating;}else{strRating=objDetails[colAjaxMvRating];if((strRating!=null)&&(strRating.indexOf("None")<0)){strAirTime+="&nbsp;&nbsp;"+strRating;}}objDIV=document.getElementById("foairtime");if(objDIV !=null){objDIV.innerHTML=strAirTime;}else{alert("NO foairtime");}objDIV=document.getElementById("foepisode");if(objDIV!=null){if(strEpisodeTitle.length>0){objDIV.innerHTML=strEpisodeTitle;objDIV.style.visibility="visible";objDIV.style.display="block";if(isProgramNew(objRowData)){objDIV.innerHTML+="&nbsp;<font style='font-size:11px;color:#CC0000;'>New</font>";}}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){if((strAjaxObjectUrl!=null)&&(strAjaxObjectUrl.length<=0)){objDIV.href="javascript:cu("+nFlyoverIndex+","+iSeriesID+","+iMovieID+")";}else{objDIV.href=strAjaxObjectUrl;}}var objTabCell=document.getElementById("foObjectTabsCell");if(objTabCell !=null){objTabCell.innerHTML=objData[rowObjectTabs];}var theDescDiv=document.getElementById("ProgramDesc");var cutr=document.getElementById("icr"+nFlyoverRow);if(cutr !=null){if((isFF)||(isSafari)){cutr.style.visibility="visible";}else{cutr.style.display="block";}}if(objDetails[colAjaxShowBadgeURL]!="NO-IMAGE"){var bi=document.getElementById("badgeImageCell");if(bi!=null){bi.style.display="block";}bi=document.getElementById("badgeImage");if(bi!=null){bi.src=objDetails[colAjaxShowBadgeURL];bi.style.onclick="javascript:cu("+nFlyoverIndex+","+iSeriesID+","+iMovieID+")";bi.onmouseover="window.status=\"click for more "+strShowTitle+" info\"";bi.onmouseout="window.status=''";}}else{var bi=document.getElementById("badgeImageCell");if(bi!=null){bi.style.display="none";}}var adCell=document.getElementById("closeupAd");if(adCell!=null){if(bCloseupAd){var adsrc=getDARTag("closeup");adCell.src=adsrc.replace(/ord=/,"program="+escape(strShowTitle)+";ord=");}else{adCell.style.display="none";adCell.style.visibility="hidden";}}var cutd=document.getElementById("icd"+nFlyoverRow);if(optionCloseupsFooter){cutd=document.getElementById("icdCloseup");}if(cutd !=null){var strNewID="id=\"ID_fo";if(isIE){strNewID="id=ID_fo";}cutd.innerHTML=theDescDiv.innerHTML.replace(/id=[\"\']*fo/gi, strNewID);cutd.style.color="#000000";cutd.style.textAlign="left";}try{wtdtCategory=objDetails[colAjaxCategory];wtdtSubCategory=objDetails[colAjaxSubCategory];wtdtShowTitle=strShowTitle;wtdtProgramID=objDetails[colAjaxProgramID];wtdtSeriesID=objDetails[colAjaxSeriesID];bDoMetrics=true;}catch(err){}}doCuLayer(null,'synopsis');if(bDoMetrics){setTimeout("doCloseupMetrics()", 10);}}function doCloseupMetrics(){try{countFlyover(wtdtCategory, wtdtSubCategory, wtdtShowTitle, wtdtProgramID, wtdtSeriesID, "ListingsCloseup");callRSI(strShowTitle, wtdtCategory, wtdtSubCategory);countGridAction("Inline Closeup", wtdtShowTitle);}catch(err){}wtdtCategory="";wtdtSubCategory="";wtdtShowTitle="";wtdtProgramID="";wtdtSeriesID="";}function xmlDetailEvent(){if(xmlDetailData.readyState==4 || xmlDetailData.readyState=="complete"){PastCloseups[nFlyoverIndex]=xmlDetailData.responseText;drawFlyoverDesc(xmlDetailData.responseText);}}function isProgramNew(objOneRow){if((objOneRow[colAttributes] & 4)==4){return true;}return false;}function isProgramRepeat(objOneRow){if((objOneRow[colAttributes] & 2)==2){return true;}return false;}function isProgramCC(objOneRow){if((objOneRow[colAttributes] & 8)==8){return true;}return false;}function getDetailData(nProgramID){if(PastCloseups[nFlyoverIndex]!=null){drawFlyoverDesc(PastCloseups[nFlyoverIndex]);return;}var objOneRow=objGridData[nFlyoverIndex];var urlData="/listings/data/detailcache.aspx";var qparams="";qparams+="Qr="+nProgramID;qparams+="&tvoid="+objOneRow[colTVObjectID];var strFlags="";if(isProgramRepeat(objOneRow)){strFlags+="R";}if(isProgramNew(objOneRow)){strFlags+="N";}if(isProgramCC(objOneRow)){strFlags+="C";}if(strFlags.length>0){qparams+="&flags="+strFlags;}qparams+="&v2=1";xmlDetailData=GetXmlHttpObject(xmlDetailEvent);if(xmlDetailData!=null){xmlDetailData.open("GET", urlData+"?"+qparams , true);xmlDetailData.send(null);}}function doCuLayer(obj, strLayer){if(strLastFoTab==strLayer){return;}var i=0;var o=document.getElementById("ID_fosubtab"+i);var a=document.getElementById("ID_fosubtab"+i+"img");if(obj!=null){while(o!=null){i++;o.style.color="#006699";a.src="/images/home/home_arrow.gif";o=document.getElementById("ID_fosubtab"+i);a=document.getElementById("ID_fosubtab"+i+"img");}obj.style.color="#CC0000";}var layerCell=document.getElementById("ID_foLayerCell");if(layerCell==null){return;}if(strLastFoTab==strLayer){layerCell.style.display="none";strLastFoTab="";return;}var cells=PastCloseups[nFlyoverIndex].split("\n");if(obj!=null){layerCell.style.overflowX="visible";layerCell.style.overflowY="visible";layerCell.style.overflow="visible";layerCell.style.height="auto";a=document.getElementById(obj.id+"img");if(a!=null){a.src="/images/home/home_arrow_down.gif";}else{alert('no image');}}switch(strLayer){case "synopsis": if((cells[rowSynopsis]!=null)&&(cells[rowSynopsis].length>0)){layerCell.innerHTML=cells[rowSynopsis];layerCell.style.display="block";if(obj!=null){countGridAction("SubTabClick", "Episode Info");}}break;case "blog": layerCell.innerHTML=cells[rowBlog];layerCell.style.display="block";countGridAction("SubTabClick", "Show Blog");break;case "castdetails": layerCell.innerHTML=cells[rowCastList];layerCell.style.display="block";countGridAction("SubTabClick", "Cast");break;case "videos": layerCell.innerHTML=cells[rowVideoList];layerCell.style.display="block";countGridAction("SubTabClick", "Videos");break;case "episodes": layerCell.innerHTML=cells[rowEpisodeList];layerCell.style.display="block";countGridAction("SubTabClick", "Episode List");break;case "recaps": layerCell.innerHTML=cells[rowRecaps];layerCell.style.display="block";countGridAction("SubTabClick", "Latest Recap");break;case "news": layerCell.innerHTML=cells[rowNews];layerCell.style.display="block";countGridAction("SubTabClick", "News");break;case "photos": layerCell.innerHTML=cells[rowPhotoList];layerCell.style.display="block";countGridAction("SubTabClick", "Photos");break;case "review": layerCell.innerHTML=cells[rowReview];layerCell.style.display="block";countGridAction("SubTabClick", "Review");break;default: layerCell.innerHTML="";break;}strLastFoTab=strLayer;}
