function nacitajObrazky()
	{
	pole = new Array('data/screen1.jpg','data/screen2.jpg','data/screen3.jpg','data/screen4.jpg','data/screen5.jpg','data/screen6.jpg','data/screen7.jpg');
	prezentaciaObrazkov('0');
	}
	
function prezentaciaObrazkov(i)
	{
	document.getElementById('prezentacia').src = pole[i];
	timer_show = setTimeout('prezentaciaObrazkov('+((i*1+1)%7)+')',2500);	
	}
	
function zastavPrezentaciuObrazkov()
	{
	clearTimeout(timer_show);	
	}

function nastavCas()
	{
	var datum = new Date();
	s=datum.getSeconds();
	m=datum.getMinutes();
	h=datum.getHours();
	
	d=datum.getDate();
	o=datum.getMonth()+1;
	y=datum.getFullYear();
	}
	
function cas()
	{
    if (s*1==59) 
		{
		if (m*1==59)
			{
			if (h*1==23)
				{
				h='0';
				d=d*1+1;
				}
				else
				{
				h=h*1+1;
				}
			m='0';	
			}
			else
			{
			m=m*1+1;	
			}
		s='0';
		}
		else
	    {
		s=s*1+1;	
		}
    if ((h=='0')&&(m=='0')&&(s=='2'))
    	{
	    nastavCas();
	    s=s*1+1;
    	}    
	if (m*1<10) { mi='0'+m; }
		else { mi = m; }
	if (s*1<10) { se='0'+s; }
		else { se = s; }
    document.getElementById('cas').innerHTML=d+'.'+o+'.'+y+' '+h+':'+mi+':'+se;
	timer = setTimeout('cas()',1000);
	}

function zastavCas()
	{
	clearTimeout(timer);
	}
	
function poslednaAktualizacia()
	{
	akt = new Date(document.lastModified);
	mn = akt.getMinutes();
	if (mn<10)
		{
		mn='0'+mn;	
		}
	document.getElementById('aktualizacia').innerHTML= 'Posledná aktualizácia: '+akt.getDate()+'.'+(akt.getMonth()+1)+'.'+akt.getFullYear()+' '+akt.getHours()+':'+mn;
	}
	
function formular()
	{
	if (document.getElementById('meno').value.length == '0')
		{
		window.alert('Prosím, zadajte svoje meno.');
		return false;
		}
	else
		{
		if (!((document.getElementById('mail').value.length > 4)&&(document.getElementById('mail').value.indexOf('@') > 0)&&(document.getElementById('mail').value.indexOf('@') < document.getElementById('mail').value.length-3)&&(document.getElementById('mail').value.indexOf('@') == document.getElementById('mail').value.lastIndexOf('@'))))
			{
			window.alert('Prosím, zadajte svoju e-mailovú adresu.');
			return false;	
			}
			else
			{
			if (document.getElementById('popis').value.length == '0')
				{
				window.alert('Prosím, popíšte váš problém s používaním programu.');
				return false;	
				}	
			}
		}	
	return true;
	}

