var browser_ver="unknown"
var html5_compatible="No"
var au_state="ready"
var t_time=1
var y_time=1
var mvolume=.09
vol=6
function b_detect() {
var muser=navigator.userAgent
if (muser.indexOf("Firefox/3.5")>0) {
browser_ver="Firefox 3.5"
html5_compatible="Yes"
}
if (muser.indexOf("Firefox/3.6")>0) {
browser_ver="Firefox 3.6"
html5_compatible="Yes"
}
if (muser.indexOf("Firefox/3.5")>0) {
browser_ver="Firefox 3.5"
html5_compatible="Yes"
}
if (muser.indexOf("MSIE 8.0")>0) {
browser_ver="MSIE 8.0"
}
if (muser.indexOf("Chrome/")>0) {
browser_ver="Google Chrome 9"
html5_compatible="Yes"
}
if (muser.indexOf("Safari")>0 && muser.indexOf("Chrome")<1) {
browser_ver="Safari"
}
if (muser.indexOf("iPhone")>0 && muser.indexOf("Chrome")<1) {
browser_ver="iPhone"
}
if(!!document.createElement('audio').canPlayType) {
html5_compatible="Yes"
}
//today_flash()
t_duration=document.getElementById("today5").duration
y_duration=document.getElementById("yesterday5").duration
controls_set()
}
function controls_set() {
a=get_cookie("volume")
if (a) {
vol=a
}
switch(vol) {
case "1": y_v1();t_v1(); break;
case "2": y_v2();t_v2(); break;
case "3": y_v3();t_v3(); break;
case "4": y_v4();t_v4(); break;
case "5": y_v5();t_v5(); break;
case "6": y_v6();t_v6(); break;
case "7": y_v7();t_v7(); break;
case "8": y_v8();t_v8(); break;
case "9": y_v9();t_v9(); break;
default: y_v6();t_v6()
}
}
function get_cookie ( cookie_name )
{
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
if ( results )
return ( unescape ( results[2] ) );
else
return null;
}
function play_today() {
if (html5_compatible=="Yes" || !!document.createElement('audio').canPlayType) {
play_today5()
}
else {
if (browser_ver=="MSIE 8.0") {
play_today1()
}
else {
today_flash()
}
}
}
function play_today5() {
document.getElementById("today5").volume=mvolume
//setTimeout('alert(document.getElementById("today5").duration)',t_duration*1000)
//alert(document.getElementById("today5").duration)
if (document.getElementById("today5").ended || document.getElementById("today5").paused) {
document.getElementById("today5").play();
document.getElementById("t-controls").style.visibility="visible"
if (document.getElementById("today5").duration) {
// today_hide=setTimeout("today_end()",document.getElementById("today5").duration*1000);
today_hide=setTimeout("today_end()",3000)
setTimeout("duration_adjust()",1000)
}
else {
today_hide=setTimeout("today_end()",3000)
setTimeout("duration_adjust()",1000)
}
} else {
clearTimeout(today_hide)
document.getElementById("today5").pause();
document.getElementById("today5").currentTime=0
today_end()
}
}
function duration_adjust() {
adj_dur=document.getElementById("today5").duration-1
clearTimeout(today_hide)
today_hide=setTimeout("today_end()",adj_dur*1001);
}
function today_end() {
document.getElementById("t-controls").style.visibility="hidden"
var mdate=new Date("December 31, 2019");
var expiredate=mdate.toGMTString();
var audio_cookie="volume="+vol+";expires="+expiredate;
document.cookie=audio_cookie;
}
function play_today1() {
if (au_state=="ready") {
document.getElementById("today1").Play();
//au_state="stopped"
}
else {
document.getElementById("today1").Stop();
au_state="ready"
}
}
function today_flash() {
document.getElementById("today_mp3_span").innerHTML='