<!-- <![CDATA[ 
function sunr(){

var lat = 52.2
var lon = 21.05
var gmtTime = 1
var zenith = 90.83
var zenith2 = 96

var dzisiaj = new Date()
var rok = dzisiaj.getYear()
var godz = dzisiaj.getHours()
var minut = dzisiaj.getMinutes()
if(rok<2000)
rok=rok+1900

  var rokStart = new Date(rok,0,1);
  var msPerDay = 24 * 60 * 60 * 1000;
  var id,pause=0, position=0;


  dzisiaj = new Date();
  czasMinal = (dzisiaj.getTime() - rokStart.getTime());
  e_dzienRoku = (czasMinal / msPerDay);
  var dzienRoku = Math.floor(e_dzienRoku) + 1;
  
  lonGodz = (lon / 15)
  
  tSS = dzienRoku + ((18-lonGodz) / 24);
  tSR = dzienRoku + ((6-lonGodz) / 24);
  
  function sunsr(t,z,lat,lonGodz,gmtTime)
  {
  
    M = (0.9856 * t) - 3.289;
  
  rM = M * (Math.PI / 180);
  rM2 = 2 * M * (Math.PI / 180);
	
  sinM = Math.sin(rM);
  sin2M = Math.sin(rM2);  

  
  L = M + (1.916 * sinM) + (0.02 * sin2M) + 282.634;
  
	if(L>360)
		L-=360;
	if(L<0)
		L+=360;
	if(L>360)
		L-=360;
	if(L<0)
		L+=360;
		
  rL = L * Math.PI / 180;
  
  tanL = 0.91764 * Math.tan(rL);
  
  RA = Math.atan(tanL) * 180 / Math.PI;
  
	if(RA>360)
		RA-=360;
	if(RA<0)
		RA+=360;
		
  LQ = (Math.floor(L/90))*90;
  RAQ = (Math.floor(RA/90))*90;
  RA = RA + (LQ - RAQ);
  
  RA = RA / 15;
  
  sinDec = 0.39782 * Math.sin(L * Math.PI / 180);
  cosDec = Math.cos(Math.asin(sinDec));
  
  cosH = (Math.cos(z * Math.PI / 180) - (sinDec * Math.sin(lat * Math.PI / 180))) / (cosDec * Math.cos(lat * Math.PI / 180));
  
  if(t==tSR)
  		H = Math.acos(cosH) * 180 / Math.PI;
  else
  		H = 360 - Math.acos(cosH) * 180 / Math.PI;
  H = H / 15;
  
  T = H + RA - (0.06571 * t) - 6.622;
  
  UT = T - lonGodz;
  
	if(UT>24)
		UT -= 24;
	if(UT<0)
		UT += 24;
		
	UT=UT+gmtTime;
	if(UT<0)
		UT+=24;
		
  return UT;

  }
  
function godzina(UT)
{

	hour = Math.floor(UT);
	minutes = Math.round(60*(UT - hour));
	if (minutes<10)
		minutes = "0" + minutes;
	
	if (minutes==60)
	{
		hour = hour + 1;
		minutes = "00";
	}

	UT = hour+":"+minutes;
	return UT;
}

function wschod(UT,godz,minut)
{
	hour = Math.floor(UT);
	minutes = Math.round(60*(UT-hour));
	
	wsczas = hour * 100 + minutes;
	obczas = godz * 100 + minut;
	
	if (obczas < wsczas)
		tekst = "wzejdzie o godz. ";
	else
		tekst = "wzeszło o godz. ";
		
	return tekst;
}

function zachod(UT,godz,minut)
{
	hour = Math.floor(UT);
	minutes = Math.round(60*(UT-hour));
	
	zachczas = hour * 100 + minutes;
	obczas = godz * 100 + minut;
	
	if (obczas < zachczas)
		tekst = "zajdzie o godz. ";
	else
		tekst = "zaszło o godz. ";
		
	return tekst;
}

wsch=sunsr(tSS,zenith,lat,lonGodz,gmtTime);
zach=sunsr(tSR,zenith,lat,lonGodz,gmtTime);

sunrise="Słońce " + wschod(wsch,godz,minut) + godzina(wsch) + ", " + zachod(zach,godz,minut) + godzina(zach);

if (navigator.appName == "Netscape"){
document.getElementById("suntime").innerHTML = sunrise
}
if (navigator.appName == "Opera" || navigator.appName == "Microsoft Internet Explorer"){
suntime.innerHTML=sunrise
}
setTimeout("sunr()",10000)
}
 


// ]]> -->
