/*-----------------Polecenia wykonywane podczas ładowania strony-------------------------*/

/*=======================================================================================*/
function wyslij_mail()
{
pole_mail = document.mail.mail_user.value
mail_str = new String(pole_mail);
szukaj1 = mail_str.search(' ');

pole_tytul = document.mail.subject.value
tytul_str = new String(pole_tytul);
szukaj2 = tytul_str.search('  ');

pole_wiad = document.mail.wiadomosc.value
wiad_str = new String(pole_wiad);
szukaj3 = wiad_str.search('   ');

if (szukaj1 != -1 || szukaj2 != -1 || szukaj3 != -1)
	{
	if (szukaj1 != -1)
		{
		document.mail.mail_user.value = "";
		window.alert("Adres email zawiera zbyt wiele spacji!");
		txt = "<input type=\"submit\" value=\"Wyślij\" disabled>";
		zatwierdz.innerHTML = txt;
		document.mail.mail_user.focus();
		}
	else if (szukaj2 != -1)
		{
		document.mail.subject.value = "";
		window.alert("Tytuł zawiera zbyt wiele spacji!");
		txt = "<input type=\"submit\" value=\"Wyślij\" disabled>";
		zatwierdz.innerHTML = txt;
		document.mail.subject.focus();
		}
	else if (szukaj3 != -1)
		{
		document.mail.wiadomosc.value = "";
		window.alert("Wiadomo?ć zawiera zbyt wiele spacji!");
		txt = "<input type=\"submit\" value=\"Wyślij\" disabled>";
		zatwierdz.innerHTML = txt;
		document.mail.wiadomosc.focus();
		}
	}
else
	{
		if (pole_mail == "" || pole_tytul == "" || pole_wiad == "")	//2
			{
			txt = "<input type=\"submit\" value=\"Wyślij\" disabled>";
			zatwierdz.innerHTML = txt;
			}
		else
			{
			txt = "<input type=\"submit\" value=\"Wyślij\">";
			zatwierdz.innerHTML = txt;
			}
	}
}
/*=======================================================================================*/
function spr_mail()
{
//--------------------------------------------------
// Sprawdzenie poprawno?ći adresu e-mail
//--------------------------------------------------

adres = new String(document.mail.mail_user.value);

malpa = adres.indexOf('@', adres);

if (malpa == -1)
	{
	document.mail.mail_user.focus();
	document.mail.mail_user.value = "";
	alert("Nieprawidłowy adres e-mail !")
	return false;
	}
else
	{
	podziel = adres.split('@');

	login = new String(podziel[0]);
	serwer = new String(podziel[1]);

	dlugosc_login = login.length;
	dlugosc_serwer = serwer.length;

	if (dlugosc_login == 0 || dlugosc_serwer == 0)
		{
		document.mail.mail_user.focus();
		document.mail.mail_user.value = "";
		alert("Nieprawidłowy adres e-mail !")
		return false;	
		}
	}
}
/*=======================================================================================*/
function wyszukaj()
{
sl = document.szuk.slowo.value
slowo_str = new String(sl);
szukaj = slowo_str.search('  ');

if (szukaj != -1)
	{
	document.szuk.slowo.value = "";
	window.alert("Słowo zawiera zbyt wiele spacji!");
	txt = "<input type=\"submit\" value=\"Szukaj\" disabled>";
	znajdz.innerHTML = txt;
	document.szuk.slowo.focus();
	}
else
	{
	if (sl == "")
		{
		txt = "<input type=\"submit\" value=\"Szukaj\" disabled>";
		znajdz.innerHTML = txt;
		}
	else
		{
		txt = "<input type=\"submit\" value=\"Szukaj\">";
		znajdz.innerHTML = txt;
		}
	}
}
/*=======================================================================================*/

DayName = new Array(7)
DayName[0] = "niedziela "
DayName[1] = "poniedziałek "
DayName[2] = "wtorek "
DayName[3] = "?roda "
DayName[4] = "czwartek "
DayName[5] = "pi?tek "
DayName[6] = "sobota "

MonthName = new Array(12)
MonthName[0] = "stycznia "
MonthName[1] = "lutego "
MonthName[2] = "marca "
MonthName[3] = "kwietnia "
MonthName[4] = "maja "
MonthName[5] = "czerwca "
MonthName[6] = "lipca "
MonthName[7] = "sierpnia "
MonthName[8] = "wrze?nia "
MonthName[9] = "paĄdziernika "
MonthName[10] = "listopada "
MonthName[11] = "grudnia "

function getDateStr(){
    var Today = new Date()
    var WeekDay = Today.getDay()
    var Month = Today.getMonth()
    var Day = Today.getDate()
    var Year = Today.getFullYear()

    if(Year <= 99)
        Year += 1900

    return Day + " " + MonthName[Month] + " " + Year + ", " + DayName[WeekDay] + ", "
}
<!-- hide// Navigation - Stop

var timerID = null;
var timerRunning = false;

function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var dzien=getDateStr();
var timeValue = dzien
timeValue += "" + ((hours >12) ? hours :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds

window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

//-->


function startclock () {
stopclock();
showtime();
}
// un hide --->
