// JavaScript Document
<!--
thisdomain = document.location +"";
thisdomain = thisdomain.substring(thisdomain.indexOf('//')+2,thisdomain.length);
thisdomain = thisdomain.substring(0,thisdomain.indexOf('/'));
thisdomain = (navigator.appName != "Netscape")? thisdomain.substring(thisdomain.indexOf('.')+1,thisdomain.length): thisdomain;

function getCookieVal (offset) {
   	var endstr = document.cookie.indexOf (";", offset);
 	if (endstr == -1)
 		endstr = document.cookie.length;
 	return unescape(document.cookie.substring(offset, endstr));
 }

function SetCookie (name,value,expires,path,domain,secure) {
 document.cookie = name + "=" + escape (value) +
 	((expires) ? ";expires=" + expires.toGMTString() : "") +
 	((path) ? ";path=" + path : "") + 	((domain) ? "; domain=" + domain : "") +
 	((secure) ? "; secure" : "");
 }

function GetCookie (name) {
 	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 getCookieVal (j);
 		i = document.cookie.indexOf(" ", i) + 1;
 		if (i == 0) break;
	}	return null;
}

function DeleteCookie (name) {
 	var exp = new Date();
 	exp.setTime (exp.getTime() - 1);
 	var cval = GetCookie (name);
 	document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() +  ";path=/";
 } 

function FixCookieDate (date) {
 	var base = new Date(0);
 	var skew = base.getTime();
	if(skew > 0)		date.setTime (date.getTime() - skew);
     }

function link(videoNum) 
{
//	if(videoNum == "1150")	
//	{
//		var expdate = new Date ();
// 		FixCookieDate (expdate);
// 		expdate.setTime (expdate.getTime() + (365 * 2 * 24 * 60 * 60 * 1000));
//			SetCookie("player", "", expdate, "/",thisdomain);
//		SetCookie("bitrate", "", expdate, "/",thisdomain);
//		DeleteCookie("player");
//		DeleteCookie("bitrate");
//	}
//	document.cookie = "video=" + videoNum;
 	//window.open('jhbbroadcast.html','MediaPlayer','height=500, width=475, top=10, left=10,scrollbars=0,resizable=0,toolbar=0');
 	window.open('jhbbroadcast2.html','MediaPlayer','height=500, width=475, top=10, left=10,scrollbars=0,resizable=0,toolbar=0');

}

function countdown_clock(year, month, day, hour, minute, format)
         {
         //I chose a div as the container for the timer, but
         //it can be an input tag inside a form, or anything
         //who's displayed content can be changed through
         //client-side scripting.
         html_code = '<div id="countdown"></div>';
         
         document.write(html_code);
         
         countdown(year, month, day, hour, minute, format);                
         }
		 
function countdown_clock2(year, month, day, hour, minute, format,
						  				yearToday, monthToday, dayToday, hourToday, minuteToday)
         {
         //I chose a div as the container for the timer, but
         //it can be an input tag inside a form, or anything
         //who's displayed content can be changed through
         //client-side scripting.
         html_code = '<div id="countdown"></div>';
         
         document.write(html_code);
         
         countdown(year, month, day, hour, minute, format);                
         }
		 
function countdown2(year, month, day, hour, minute, format, 
					yearToday, monthToday, dayToday, hourToday, minuteToday)
         {
         Today = new Date();
         Todays_Year = Today.getFullYear() - 2000;
         Todays_Month = Today.getMonth() + 1;                  
         
         //Convert both today's date and the target date into miliseconds.                           
/*		 
         Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getUTCDate(), 
                                 Today.getUTCHours(), Today.getUTCMinutes(), Today.getUTCSeconds())).getTime();                                 
*/		 
         Todays_Date = (new Date(yearToday, monthToday, dayToday, hourToday, minuteToday, 00)).getTime();                  
		 

         Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();                  
         
         //Find their difference, and convert that into seconds.                  
         Time_Left = Math.round((Target_Date - Todays_Date) / 1000);
         
         if(Time_Left < 0)
            Time_Left = 0;
         
         switch(format)
               {
               case 0:
                    //The simplest way to display the time left.
                    document.all.countdown.innerHTML = Time_Left + ' seconds';
                    break;
               case 1:
                    //More datailed.
                    days = Math.floor(Time_Left / (60 * 60 * 24));
                    Time_Left %= (60 * 60 * 24);
                    hours = Math.floor(Time_Left / (60 * 60));
                    Time_Left %= (60 * 60);
                    minutes = Math.floor(Time_Left / 60);
                    Time_Left %= 60;
                    seconds = Time_Left;
                    
                    dps = 's'; hps = 's'; mps = 's'; sps = 's';
                    //ps is short for plural suffix.
                    if(days == 1) dps ='';
                    if(hours == 1) hps ='';
                    if(minutes == 1) mps ='';
                    if(seconds == 1) sps ='';
                    
                    document.all.countdown.innerHTML = days + ' day' + dps + ' ';
                    document.all.countdown.innerHTML += hours + ' hour' + hps + ' ';
                    document.all.countdown.innerHTML += minutes + ' minute' + mps + ' and ';
                    document.all.countdown.innerHTML += seconds + ' second' + sps;
                    break;
					//If the countdown is less than 24 hours don't put the days in there.
               case 2:
                    //More datailed.
                    days = Math.floor(Time_Left / (60 * 60 * 24));
                    Time_Left %= (60 * 60 * 24);
                    hours = Math.floor(Time_Left / (60 * 60));
                    Time_Left %= (60 * 60);
                    minutes = Math.floor(Time_Left / 60);
                    Time_Left %= 60;
                    seconds = Time_Left;
                    
                    dps = 's'; hps = 's'; mps = 's'; sps = 's';
                    //ps is short for plural suffix.
                    if(days == 1) dps ='';
                    if(hours == 1) hps ='';
                    if(minutes == 1) mps ='';
                    if(seconds == 1) sps ='';
                    
                    //document.all.countdown.innerHTML = days + ' day' + dps + ' ';
                    document.all.countdown.innerHTML = hours + ' hour' + hps + ' ';
                    document.all.countdown.innerHTML += minutes + ' minute' + mps + ' ';
                    document.all.countdown.innerHTML += seconds + ' second' + sps;
                    break;					
					
               default: 
			   
                    document.all.countdown.innerHTML = Time_Left + ' seconds';
               }
               
         //Recursive call, keeps the clock ticking.
         setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000);
         }		 
         
function countdown(year, month, day, hour, minute, format)
         {
         Today = new Date();
         Todays_Year = Today.getFullYear() - 2000;
         Todays_Month = Today.getMonth() + 1;                  
         
         //Convert both today's date and the target date into miliseconds.                           
/*		 
         Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getUTCDate(), 
                                 Today.getUTCHours(), Today.getUTCMinutes(), Today.getUTCSeconds())).getTime();                                 
*/		 
         Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(), 
                                 Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();                                 

         Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();                  
         
         //Find their difference, and convert that into seconds.                  
         Time_Left = Math.round((Target_Date - Todays_Date) / 1000);
         
         if(Time_Left < 0)
            Time_Left = 0;
         
         switch(format)
               {
               case 0:
                    //The simplest way to display the time left.
                    document.all.countdown.innerHTML = Time_Left + ' seconds';
                    break;
               case 1:
                    //More datailed.
                    days = Math.floor(Time_Left / (60 * 60 * 24));
                    Time_Left %= (60 * 60 * 24);
                    hours = Math.floor(Time_Left / (60 * 60));
                    Time_Left %= (60 * 60);
                    minutes = Math.floor(Time_Left / 60);
                    Time_Left %= 60;
                    seconds = Time_Left;
                    
                    dps = 's'; hps = 's'; mps = 's'; sps = 's';
                    //ps is short for plural suffix.
                    if(days == 1) dps ='';
                    if(hours == 1) hps ='';
                    if(minutes == 1) mps ='';
                    if(seconds == 1) sps ='';
                    
                    document.all.countdown.innerHTML = days + ' day' + dps + ' ';
                    document.all.countdown.innerHTML += hours + ' hour' + hps + ' ';
                    document.all.countdown.innerHTML += minutes + ' minute' + mps + ' and ';
                    document.all.countdown.innerHTML += seconds + ' second' + sps;
                    break;
					//If the countdown is less than 24 hours don't put the days in there.
               case 2:
                    //More datailed.
                    days = Math.floor(Time_Left / (60 * 60 * 24));
                    Time_Left %= (60 * 60 * 24);
                    hours = Math.floor(Time_Left / (60 * 60));
                    Time_Left %= (60 * 60);
                    minutes = Math.floor(Time_Left / 60);
                    Time_Left %= 60;
                    seconds = Time_Left;
                    
                    dps = 's'; hps = 's'; mps = 's'; sps = 's';
                    //ps is short for plural suffix.
                    if(days == 1) dps ='';
                    if(hours == 1) hps ='';
                    if(minutes == 1) mps ='';
                    if(seconds == 1) sps ='';
                    
                    //document.all.countdown.innerHTML = days + ' day' + dps + ' ';
                    document.all.countdown.innerHTML = hours + ' hour' + hps + ' ';
                    document.all.countdown.innerHTML += minutes + ' minute' + mps + ' ';
                    document.all.countdown.innerHTML += seconds + ' second' + sps;
                    break;					
					
               default: 
			   
                    document.all.countdown.innerHTML = Time_Left + ' seconds';
               }
               
         //Recursive call, keeps the clock ticking.
         setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000);
         }


	
function tableWorkaround(cols)
{ 
	if (document.all) 
	{ 
		document.write('<tr>'); 
		for (var i = 0; i < cols; i++) 
		{ 
			document.write('<td></td>'); 
		} 
		document.write('</tr>') 
	}; 
}

function tableWorkaround2_colheader() 
{ 
	if (document.all) 
	{
		document.write('<col width="0">') 
	}; 
}

function tableWorkaround2(rowHeight) 
{ 
	if (document.all) 
	{ 
		document.write('<td height="' + rowHeight + '">');
		document.write('</td>') 
	}; 
}


function openNewURL(newURL)
{
	
window.open(newURL,'JHBVideos',
'height=455, width=630, top=0, left=0,scrollbars=0,resizable=0,toolbar=0');
	
}
