
<!--
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: William and Mari Bontrager :: http://willmaster.com/ */

// Copyright 1999, 2000 by William and Mari Bontrager.

// See complete instructions in the article "Easy Time 
//   Zone Offset Calculator" in WillMaster Possibilities 
//   issue # 46: http://willmaster.com/possibilities/archives/


here_offset = 300;
// The above number must be changed to the number of minutes 
//   difference between your time and UT during STANDARD TIME 
//   -- not Daylight Savings Time. If you are in UT, (the 
//   same time zone as Greenwich, England), this number 
//   will be 0 (zero). If your time is later than UT (east 
//   of Greenwich, England), the number is negative. 
//   Otherwise, the number is positive.
// NOTE: To calculate the number automatically, go to 
//   http://willmaster.com/possibilities/demo/eztzoffset.html

DST_month_start = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents the month the period begins. 
//   Otherwise, the number is 0 (zero).

DST_day_start = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents day of the month the period 
//   begins. Otherwise, the number is 0 (zero).

DST_month_end = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents the month the period ends. 
//   Otherwise, the number is 0 (zero).

DST_day_end = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents day of the month the period 
//   ends. Otherwise, the number is 0 (zero).


// The above number must be either 12 or 24. Use 12 if you 
//   want a 12-hour clock with "AM" or "PM" appended to the 
//   time. Use 24 if you want a 24-hour clock.
// NOTE: What you specify here is the default. You can change 
//   this value right before you use a function.



can_use_this = false;
if(parseInt(navigator.appVersion) >= 4) { can_use_this = true; }
vtime = new Date();
if(DST_month_start > 0) {
	var b = false;
	var m = vtime.getMonth();
	var d = vtime.getDate();
	DST_month_start--;
	DST_month_end--;
	if((m > DST_month_start) && (m < DST_month_end)) { b = true; }
	else
	{
		if((m == DST_month_start) && (d >= DST_day_start)) { b = true; }
		if((m == DST_month_end) && (d <= DST_day_end)) { b = true; }
	}
	if(b == true) { here_offset -= 60; }
}
Diff = vtime.getTimezoneOffset() - here_offset;
weekdays=new Array("niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota");



clocktype = 24;
vtime = new Date();
function get_date1() {
	var rs = weekdays[vtime.getDay()] +', ';
	
	
	var miesiac = 1 + vtime.getMonth();
	if(miesiac < 10) { miesiac = '0'+miesiac; }
	
		rs = rs+ vtime.getDate() + '.'+ miesiac +'.'+ vtime.getFullYear() +' ';	
	return rs;
}

function get_hours1() {
var rs = "";
	var hr = vtime.getHours();
		
		rs = rs+ hr + ':';
		if(vtime.getMinutes() < 10) { rs += '0'; }
		rs += vtime.getMinutes() +':';
		if(vtime.getSeconds() < 10) { rs += '0'; }
		rs += vtime.getSeconds();
		return rs;
}
/**/
/* wyswietlanie daty i godziny na stronie*/
/*obsĹ‚uga czasu*/
$(document).ready(function() {
	$('div.czas').text(""+get_date1());
	//$('span.gruby').text(" "+get_hours1());
	UR_Start();
});

function showFilled(Value) 
{
	return (Value > 9) ? "" + Value : "0" + Value;
}


function UR_Start() 
{
	UR_Nu = new Date;
	UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());

	document.getElementById("godz").innerHTML =  UR_Indhold;
	setTimeout("UR_Start()",1000);
}
