var gmt = new Date;
var lsm = new Date;
var lso = new Date;
	lsm.setMonth(2); 		// March
	lsm.setDate(14); 
var day = lsm.getDay();		// 
	lsm.setDate(14-day); 	// Second Sunday
	lso.setMonth(10); 		// November
	lso.setDate(7);
var day = lso.getDay(); 	//
	lso.setDate(7-day); 	// First Sunday
	
if (gmt < lsm || gmt >= lso) dst = 0; 
else dst = 1;

var dstoffset = 60
if   ( dst == 0 ) 
     {dstoffset = 0};
     
var time = new Date();
 time.setTime(time.getTime() + time.getTimezoneOffset()*60*1000);
 daygmt = time.getDay()
 hoursgmt = time.getHours()
     
var time = new Date();
 time.setTime(time.getTime() + (time.getTimezoneOffset() + dstoffset)*60*1000);
 day = time.getDay()
 hours = time.getHours()


 	if  
	 (((day == 2) || (day == 3 ) || (day == 5) || (day == 6)) && (hours < 3))
     {document.write("<a href='http://216.126.84.214:8030/listen.pls'><img src='http://www.catholicradio.ca/images/on-air.gif' border=0 alt='S&#322;uchaj KSM - na &#380;ywo' width='160' height='30'></a>");
     }	   
    else
    if
       (((day == 0) || (day == 1 ) || (day == 4)) && (hours < 2))
     {document.write("<a href='http://216.126.84.214:8030/listen.pls'><img src='http://www.catholicradio.ca/images/on-air.gif' border=0 alt='S&#322;uchaj KSM - na &#380;ywo' width='160' height='30'></a>");
     }
    else     
     {document.write("<a href='http://ksmradio.com/pol/radio.html'><img src='http://www.ksmradio.com/core/ksmlogo02.png' border=0 alt='S&#322;uchaj KSM - Codziennie o 20:00' width='150' height='40'></a>");
     } 
