// from today_v3_js.txt, nowplaying2_js.txt use dnin show codes // Daylight Savings info // 2007 03/11 11/04 2nd Sun in March 1st Sun in Nov // 2008 03/09 11/02 // 2009 03/08 11/01 // 2010 03/14 11/07 var TimezoneOffset = -5 // adjust to always keep tod in CST/CDT zone NB CDT var localTime = new Date() var ms = localTime.getTime() + (localTime.getTimezoneOffset() * 60000) + TimezoneOffset * 3600000 today = new Date(ms) var da = today.getDay(); var hr = today.getHours(); var mn = today.getMinutes(); var to = (hr * 100) + mn; var cssdd = '.dd' + da; var cssda = '.d' + da; var csshr = '.h0'; var csstr = '.t0'; // show ending times for each day var showe = new Array(); showe[0] = new Array(200, 500, 700, 900, 1200, 1500, 1700, 1900, 2100, 2400); showe[1] = new Array(530,800,900,1100,1200,1300,1400,1500,1700,1800,1900,2200,2400); showe[2] = new Array(200,530,800,900,1100,1200,1300,1400,1500,1700,1800,1900,2000,2100,2400); showe[3] = new Array(300,530,800,900,1100,1200,1300,1400,1500,1800,1900,2000,2200,2400); showe[4] = new Array(300,530,800,900,1100,1200,1300,1400,1500,1700,1800,1900,2000,2200,2400); showe[5] = new Array(300,530,800,900,1100,1200,1300,1400,1500,1700,1800,2000,2200,2400); showe[6] = new Array(100,300,600,900,1000,1200,1400,1500,1600,1700,1800,2000,2300,2400); if (to < 100) { csshr = '.h0'; csstr = '.t0';} else if (to < 130) { csshr = '.h100'; csstr = '.t100';} else if (to < 200) { csshr = '.h130'; csstr = '.t130';} else if (to < 300) { csshr = '.h200'; csstr = '.t200';} else if (to < 400) { csshr = '.h300'; csstr = '.t300';} else if (to < 500) { csshr = '.h400'; csstr = '.t400';} else if (to < 530) { csshr = '.h500'; csstr = '.t500';} else if (to < 600) { csshr = '.h530'; csstr = '.t530';} else if (to < 700) { csshr = '.h600'; csstr = '.t600';} else if (to < 800) { csshr = '.h700'; csstr = '.t700';} else if (to < 900) { csshr = '.h800'; csstr = '.t800';} else if (to <1000) { csshr = '.h900'; csstr = '.t900'; } else if (to <1100) { csshr = '.h1000'; csstr = '.t1000'; } else if (to <1200) { csshr = '.h1100'; csstr = '.t1100'; } else if (to <1300) { csshr = '.h1200'; csstr = '.t1200'; } else if (to <1400) { csshr = '.h1300'; csstr = '.t1300'; } else if (to <1500) { csshr = '.h1400'; csstr = '.t1400'; } else if (to <1600) { csshr = '.h1500'; csstr = '.t1500'; } else if (to <1700) { csshr = '.h1600'; csstr = '.t1600'; } else if (to <1800) { csshr = '.h1700'; csstr = '.t1700'; } else if (to <1900) { csshr = '.h1800'; csstr = '.t1800'; } else if (to <2000) { csshr = '.h1900'; csstr = '.t1900'; } else if (to <2100) { csshr = '.h2000'; csstr = '.t2000'; } else if (to <2200) { csshr = '.h2100'; csstr = '.t2100'; } else if (to <2300) { csshr = '.h2200'; csstr = '.t2200'; } else if (to <2400) { csshr = '.h2300'; csstr = '.t2300'; } for (i in showe[da]) { if (to < showe[da][i]) { var ii = 'd' + da + 'i' + i; break; } } // ii now has dnin show id // v4