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 timeValue = "" + ((hours < 10) ? "0" : "") + hours;
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;

//document.clock.face.value = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
	window.status = timeValue;
	timerID = setTimeout("showtime()",1000);
	timerRunning = true;
}
function startclock () {
	// Make sure the clock is stopped
	stopclock();
	showtime();
}
function makevisible (cur, which) {
	if (which==0)
		cur.filters.alpha.opacity = 100
	else
		cur.filters.alpha.opacity = 85
}


function jobSearchCheck() {
	if  ( form.nazwisko.value=="" || 
				form.imiona.value=="" ||
				form.nazwisko2.value=="" ||
				form.rodzice.value=="" ||
				form.stan.value=="" ||
				form.urodzenie.value=="" ||
				form.obywatelstwo.value=="" ||
				form.adres.value=="" ||
				form.adres2.value=="" ||
				(	form.telefon1.value=="" && form.telefon2.value=="" && form.telefon3.value==""	) ||
				form.email.value=="" ||
				form.wykszt.value==""
	)
		alert("Proszę uzupełnić wszystkie pola oznaczone gwiazdką...");
	else if (form.email.value.indexOf('@',0) == -1 || 
					 form.email.value.indexOf('.',0) == -1) 
		alert("Niepoprawny adres e-mail!"); 
	else if (!form.ochrona.checked)
		alert("Proszę zaznaczyć zgodę na przetwarzanie danych osobowych!");
	else
		form.submit();
}

function newCompanyCheck() {
	if  ( form.nazwa.value=="" || 
			  form.telefon.value=="" ||
				form.email.value=="" ||
				form.adres.value=="" ||
				form.opis.value==""			
	)
		alert("Proszę uzupełnić pola oznaczone gwiazdką...");
	else if (form.email.value.indexOf('@',0) == -1 || 
					 form.email.value.indexOf('.',0) == -1) 
		alert("Niepoprawny adres e-mail!"); 
	else if (	form.kategoria.value=="-- wybierz --")
		alert("Proszę wybrać kategorię (branżę)...");	 
	else
		form.submit();
}


function newJobCheck() {
	if  ( form.nazwa.value=="" || 
			  form.adres.value=="" ||
				form.stanowisko.value=="" ||
				form.wymagania.value=="" ||							
				form.miejsce.value=="" ||
				form.data_waznosci.value=="" ||				
				form.dokumenty.value==""				
	)
		alert("Proszę uzupełnić pola oznaczone gwiazdką...");
	else
		form.submit();
}

function courseCheck() {
	if  ( form.inazwisko.value=="" || 
			  (form.telefon.value=="" && form.email.value=="") ||
				form.osob.value==""
	)
		alert("Proszę poprawnie uzupełnić pola oznaczone gwiazdką...");
	else
		form.submit();

}

/*
function Start() {
	startclock();
}
function CheckBrowser()
{ 
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new CheckBrowser()
if(document.layers){ //NS4 resize fix...
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}  
//Fixing the browsercheck for opera... 
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
if(navigator.userAgent.indexOf('Opera')>-1 && document.getElementById){ //Opera 5 resize fix.
	scrX= innerWidth; scrY= innerHeight;
	document.onmousemove= function(){
		if(scrX<innerWidth-10 || scrY<innerHeight-10 || scrX>innerWidth+10 || scrY>innerHeight+10){
			scrX = innerWidth;
			scrY = innerHeight;
			Start();
		}
	};
}
if(bw.bw) onload = Start;
else alert ("Masz stara przegladarke!\n"); 
*/


