function wbl_pr( strName, dtProgStart, nDuration, strChannel, nChannelID, nProgID, tStartUTC, strDesc, strEpisode, strCategory, strKeywords ) { this.strName = strName; this.dtProgStart = dtProgStart; this.nDuration = nDuration; this.strChannel = strChannel; this.nChannelID = nChannelID; this.nProgID = nProgID; this.tStartUTC = Number( "0x" + tStartUTC ) * 1000; this.strCategory = strCategory; this.arrKeywords = strKeywords.split( ", " ); this.genreURLList = "genre=" + strCategory; for( var n = 0; n < this.arrKeywords.length; n++ ) { if( this.genreURLList.length ) { this.genreURLList += "&"; } var keyword = this.arrKeywords[ n ]; this.genreURLList += "genre=" + keyword.replace( / /g, "-" ); } }; var mydg_search_arrProgrammes = new Array( new wbl_pr( "The Twilight Zone", "05:30 Monday 23rd November", 30, "Zone Horror", 50277, 63281, "4B0A1DD8", "The Trouble with Templeton. Series 2, episode 9. <br>Classic series guest. The balance of time is disrupted when a Broadway composer is given the chance to meddle with the past and save his lost love, with dire results.<br>Starring: Gina Gershon<br> (4 Star)", "The Trouble with Templeton", "Science Fiction Series", "Action, Adventure, Fantasy, Horror, Sci-Fi, Science Fiction, Sci Fi, Series, Anthology, 4 Star" )
,new wbl_pr( "The Twilight Zone", "06:30 Monday 23rd November", 30, "Zone Horror Plus 1", 50660, 63493, "4B0A2BE8", "The Trouble with Templeton. Series 2, episode 9. <br>Classic series guest. The balance of time is disrupted when a Broadway composer is given the chance to meddle with the past and save his lost love, with dire results.<br>Starring: Gina Gershon<br> (4 Star)", "The Trouble with Templeton", "Science Fiction Series", "Action, Adventure, Fantasy, Horror, Sci-Fi, Science Fiction, Sci Fi, Series, Anthology, 4 Star" )
,new wbl_pr( "P.S. I Love You", "20:00 Monday 23rd November", 130, "Sky Movies Drama", 97, 58147, "4B0AE9C0", "New York widow Holly is devastated by her husband&#39;s sudden demise, but messages he left behind offer a ray of hope.<br>Director: Richard LaGravenese<br>Starring: Hilary Swank, Gerard Butler, Lisa Kudrow, Gina Gershon, James Marsters, Kathy Bates<br> (Widescreen, Subtitles, Dolby Digital 5.1, Audio Described, 2007, 12, 3 Star)", "", "Film", "Comedy, Drama, Romance, Film, Movie, Movies, Films, Widescreen, Subtitles, Dolby Digital 5.1, Audio Described, 12, 3 Star" )
,new wbl_pr( "P.S. I Love You", "20:00 Monday 23rd November", 130, "Sky Movies Drama HD", 50753, 58331, "4B0AE9C0", "New York widow Holly is devastated by her husband&#39;s sudden demise, but messages he left behind offer a ray of hope.<br>Director: Richard LaGravenese<br>Starring: Hilary Swank, Gerard Butler, Lisa Kudrow, Gina Gershon, James Marsters, Kathy Bates<br> (Widescreen, High Definition, Subtitles, Dolby Digital 5.1, Audio Described, 2007, 12, 3 Star)", "", "Film", "Comedy, Drama, Romance, Film, Movie, Movies, Films, Widescreen, High Definition, Subtitles, Dolby Digital 5.1, Audio Described, 12, 3 Star" )
,new wbl_pr( "P.S. I Love You", "18:40 Friday 27th November", 140, "Sky Screen 2 HD", 50527, 60430, "4B101D00", "New York widow Holly is devastated by her husband&#39;s sudden demise, but messages he left behind offer a ray of hope.<br>Director: Richard LaGravenese<br>Starring: Hilary Swank, Gerard Butler, Lisa Kudrow, Gina Gershon, James Marsters, Kathy Bates<br> (Widescreen, High Definition, Subtitles, Dolby Digital 5.1, Audio Described, 2007, 12, 3 Star)", "", "Film", "Comedy, Drama, Romance, Film, Movie, Movies, Films, Widescreen, High Definition, Subtitles, Dolby Digital 5.1, Audio Described, 12, 3 Star" )
 ); function mydg_search_load() { var searchKeywords = "Gina Gershon"; var searchURL = "Gina%20Gershon"; w = function (c){document.writeln(c); }; getCookie = function( name ) { getCookVal = function( offset ) { var endstr = document.cookie.indexOf (";", offset); if( endstr == -1 ) endstr = document.cookie.length; return unescape( document.cookie.substring( offset, endstr ) ); }; var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while( i < clen ) { var j = i + alen; if( document.cookie.substring( i, j ) == arg ) return getCookVal( j ); i = document.cookie.indexOf( " ", i ) + 1; if( i == 0 ) break; } return null; }; df = function( strPID, strName, strChannel, strCat, genreURLList ) { popUp = function(strURL) { var defTop = 50; var defLeft = 50; var defWidth = 640; var defHeight = 640; var popupWin = window.open(strURL,'desc_win','resizable,scrollbars,top=' + defTop + ',left='+ defLeft +',width='+ defWidth +',height='+ defHeight); }; popUp( "http://www.mydigiguide.com/tv-guide/tv.dll?" + genreURLList + "&title=" + escape(strName) + "&channel=" + escape(strChannel) + "&a=19&h=68&f=1&PID=" + strPID ); }; var mydg_search_dateToday = new Date(); var mydg_search_dateTomorrow = new Date( mydg_search_dateToday.getTime() + 86400000 ); getNiceDateTime = function( dt ) { isSameDay = function( dt1, dt2 ) { var n1 = Math.ceil( dt1.getTime() / 86400000 ); var n2 = Math.ceil( dt2.getTime() / 86400000 ); if( n1 == n2 ) return true; return false; }; getNiceTime = function( dt ) { var mins = dt.getMinutes(); if( dt.getHours() > 12 ) return dt.getHours() - 12 + ":" + (mins < 10 ? "0" + mins : mins ) + "pm"; else return dt.getHours() + ":" + (mins < 10 ? "0" + mins : mins ) + "am"; }; var niceTimeSummary = ""; if( isSameDay( mydg_search_dateToday, dateProgStart ) ) { if( dateProgStart.getHours() >= 18 ) niceTimeSummary = "Tonight at " + getNiceTime( dateProgStart ); else niceTimeSummary = getNiceTime( dateProgStart ); } else if( isSameDay( mydg_search_dateTomorrow, dateProgStart ) ) { niceTimeSummary = "Tomorrow at " + getNiceTime( dateProgStart ); } else { var dayPostFix = "th"; switch( dt.getDate() ) { case 1: case 21: case 31: dayPostFix = "st"; break; case 2: case 22: dayPostFix = "nd"; break; case 3: case 23: dayPostFix = "rd"; break; } var monthName = ""; switch( dt.getMonth() ) { case 0: monthName = "January"; break; case 1: monthName = "February"; break; case 2: monthName = "March"; break; case 3: monthName = "April"; break; case 4: monthName = "May"; break; case 5: monthName = "June"; break; case 6: monthName = "July"; break; case 7: monthName = "August"; break; case 8: monthName = "September"; break; case 9: monthName = "October"; break; case 10: monthName = "November"; break; case 11: monthName = "December"; break; } niceTimeSummary = monthName + " " + dt.getDate() + dayPostFix + " at " + getNiceTime( dateProgStart );; } return niceTimeSummary; }; includeStyle = function( styleVar ) { if( styleVar != undefined && styleVar.length ) { return " style='" + styleVar + "'"; } return ""; }; if( typeof( mydg_search_version ) != "undefined" && mydg_search_version == 2 ) { var style_programme_list_none = "margin:10px;"; var style_programme_list = ""; var style_programme_list_item = ""; var style_programme_details = ""; var style_programme_name = ""; var style_programme_name_link = ""; var style_programme_time = ""; var style_programme_channel = ""; if( typeof( mydg_search_inline_styles ) != "undefined" ) { if( typeof( mydg_search_inline_styles.programme_list_none ) != "undefined" ) { style_programme_list_none = mydg_search_inline_styles.programme_list_none; } if( typeof( mydg_search_inline_styles.programme_list ) != "undefined" ) { style_programme_list = mydg_search_inline_styles.programme_list; } if( typeof( mydg_search_inline_styles.programme_list_item ) != "undefined" ) { style_programme_list_item = mydg_search_inline_styles.programme_list_item; } if( typeof( mydg_search_inline_styles.programme_details ) != "undefined" ) { style_programme_details = mydg_search_inline_styles.programme_details; } if( typeof( mydg_search_inline_styles.programme_name ) != "undefined" ) { style_programme_name = mydg_search_inline_styles.programme_name; } if( typeof( mydg_search_inline_styles.programme_name_link ) != "undefined" ) { style_programme_name_link = mydg_search_inline_styles.programme_name_link; } if( typeof( mydg_search_inline_styles.programme_time ) != "undefined" ) { style_programme_time = mydg_search_inline_styles.programme_time; } if( typeof( mydg_search_inline_styles.programme_channel ) != "undefined" ) { style_programme_channel = mydg_search_inline_styles.programme_channel; } } var content = ""; if ( mydg_search_arrProgrammes.length <= 0 ) { content +=( "<p class='programme-list-none'" + includeStyle( style_programme_list_none ) + ">Sorry, no programmes are currently showing.</p>" ); } else { content +=( "<ul class='programme_list'" + includeStyle( style_programme_list ) + ">" ); for( var i = 0; i < mydg_search_arrProgrammes.length; i++ ) { var dateProgStart = new Date( mydg_search_arrProgrammes[i].tStartUTC ); var popupLink = "JavaScript:df(" + mydg_search_arrProgrammes[i].nProgID + ",\"" + mydg_search_arrProgrammes[i].strName + "\",\"" + mydg_search_arrProgrammes[i].strChannel + "\",\"" + mydg_search_arrProgrammes[i].strCategory + "\",\"" + mydg_search_arrProgrammes[i].genreURLList + "\");"; content +=( "<li class='programme_list_item'" + includeStyle( style_programme_list_item ) + "><span class='programme_name'" + includeStyle( style_programme_name ) + "><a href='" + popupLink + "' title=\"View the programme description for " + mydg_search_arrProgrammes[i].strName + "\" class='programme_name_link'" + includeStyle( style_programme_name_link ) + ">" + mydg_search_arrProgrammes[i].strName + "</a></span><span class='programme_details'" + includeStyle( style_programme_details ) + "><span class='programme_time'" + includeStyle( style_programme_time ) + ">" + getNiceDateTime( dateProgStart ) + "</span> on <span class='programme_channel'" + includeStyle( style_programme_channel ) + ">" + mydg_search_arrProgrammes[i].strChannel + "</span></span></li>" ); } content +=( "</ul>" ); } var id = document.getElementById("mydg_search"); if( id ) { id.innerHTML = content; } else { w( content ); } } else { w( "<table width=" + tblWIDTH + " bgcolor=\"" + tblBGCOL + "\" cellpadding=2 cellspacing=0 border=1 bordercolorlight=\"#FFFFFF\" bordercolordark=\"#FFFFFF\">" ); w( "<tr bgcolor=\"" + pfindHEADCOL + "\"><td bordercolordark=\"" + tblBORDCOL + "\" bordercolorlight=\"" + tblBORDCOL + "\"><font size=" + pfindHEADFSIZE + " color=\"" + pfindHEADFCOLOR + "\" face=\"" + pfindFFACE + "\"><b>INSTANT SEARCH</b> for '" + searchKeywords + "'</font></td></tr><tr><td bordercolordark=\"" + tblBORDCOL + "\" bordercolorlight=\"" + tblBORDCOL + "\"><font size=" + pfindFSIZE + " color=\"" + pfindFCOLOR + "\" face=\"" + pfindFFACE + "\">" ); if ( mydg_search_arrProgrammes.length <= 0 ) { w( "<center><br><a href=\"http://www.mydigiguide.com/tv-guide/tv.dll\" target=\"_blank\"><img src=\"http://www.mydigiguide.com/i/wbllogo.gif\" width=89 height=56 border=0 alt=\"Get your UK and Ireland TV and Radio listings from myDigiGuide\"></a><p><b>Sorry, no programmes that match the keywords: '" + searchKeywords + "' are currently showing.</b></center>" ); } else { w( "<b><font size=" + pfindFSIZE + " color=\"" + pfindFCOLOR + "\" face=\"" + pfindFFACE + "\">Click the programme name for a full description or click the channel name for a complete listing.</font></b><br><br>"); for ( i = 0; i < mydg_search_arrProgrammes.length; i++) { var tmpStart = mydg_search_arrProgrammes[i].dtProgStart; var tTime = tmpStart.substring(0, 5); var tDate = tmpStart.substring(6, tmpStart.length); var popupLink = "JavaScript:df(" + mydg_search_arrProgrammes[i].nProgID + ",\"" + mydg_search_arrProgrammes[i].strName + "\",\"" + mydg_search_arrProgrammes[i].strChannel + "\",\"" + mydg_search_arrProgrammes[i].strCategory + "\",\"" + mydg_search_arrProgrammes[i].genreURLList + "\");"; w( "<a href='" + popupLink + "' title=\"View the programme description for " + mydg_search_arrProgrammes[i].strName + "\"><b><font size=" + pfindFSIZE + " color=\"" + pfindFCOLOR + "\" face=\"" + pfindFFACE + "\"><u>" + mydg_search_arrProgrammes[i].strName + "</u></font></b></a> showing on <a href=\"http://www.mydigiguide.com/tv-guide/tv.dll?a=2&amp;ch=" + mydg_search_arrProgrammes[i].nChannelID + "&amp;dt=" + mydg_search_arrProgrammes[i].strProgDate + "&amp;lz=0\" title=\"View full listings for " + mydg_search_arrProgrammes[i].strChannel + "\" target=\"_blank\"><font size=" + pfindFSIZE + " color=\"" + pfindFCOLOR + "\" face=\"" + pfindFFACE + "\"><u>" + mydg_search_arrProgrammes[i].strChannel + "</u></font></a>, " ); if ( bTimeNewLine == 1 ) { w( "<br>&nbsp;&nbsp;&nbsp;" ); } w( "<i>" + tDate + " at " + tTime + "</i><br>" ); } w( "<br><a href=\"http://www.digiguide.com/p/wbl/freecontent.shtml\" target=\"_blank\"><font color=\"" + pfindFCOLOR + "\" face=\"" + pfindFFACE + "\"><b><u>UK TV Guide, 14+ days listings for 600+ channels, all major providers, searching, reminders</u></b></a>" ); } w( "</font></td></tr></table>" ); } }; mydg_search_load();