function nextArticle(){
		oldArticle=actualArticle;
		articlesCount=articlesCount;
		actualArticle++;
		if (actualArticle>articlesCount) actualArticle=1;
		opacity=1;
		timer = setInterval("fade()",50);

		eval("article"+actualArticle+"E.style.opacity=String(0)");
		eval("article"+actualArticle+"E.style.filter='alpha(opacity='+String(0)+')'");

		eval("sE(article"+actualArticle+"E)");
		fototimer=setTimeout("nextArticle()",4000);
	}
function fade(){
	opacity-=0.1;
	ropacity=1-opacity;
	eval("article"+oldArticle+"E.style.opacity=String(opacity)");
	eval("article"+oldArticle+"E.style.filter='alpha(opacity='+String(opacity*100)+')'");
	eval("article"+actualArticle+"E.style.opacity=String(ropacity)");
	eval("article"+actualArticle+"E.style.filter='alpha(opacity='+String(ropacity*100)+')'");
	if (opacity<0) {
		eval("hE(article"+oldArticle+"E)");
		eval("article"+oldArticle+"E.style.opacity=String(100)");
		eval("article"+oldArticle+"E.style.filter='alpha(opacity='+String(100)+')'");

		clearInterval(timer);
	}
	
}

d=document;l=(d.layers)?1:0;op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;ie=(d.all)?1:0;
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}

function sE(e){if(l)e.visibility='show';else e.style.display='block';return false;}
function siE(e){if(l)e.visibility='show';else e.style.display='inline';return false;}
function hE(e){if(l)e.visibility='hide';else e.style.display='none';return false;}


function saveCookie(name,value,days) {
	if (days) {
		var date=new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000))
		var expires="; expires="+date.toGMTString()
	} else expires=""
	document.cookie=name+"="+value+expires+"; path=/"
}

function readCookie(name) {
	var nameEQ=name+"="
	var ca=document.cookie.split(';')
	for(var i=0;i<ca.length;i++) {
		var c=ca[i];
		while (c.charAt(0)==' ') c=c.substring(1,c.length)
		if (c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length)
	}
	return null
}

function setdatetoday(){
var d = new Date()
year=d.getFullYear()+'';
month=(d.getMonth() + 1);
if (month<10)month="0"+month;
date=d.getDate();
if (date<10)date="0"+date;
hours=d.getHours();
if (hours<10)hours="0"+hours;
minutes=d.getMinutes();
if (minutes<10)minutes="0"+minutes;



document.zed.in_date.value=year+'-'+month+'-'+date+' '+hours+':'+minutes+':00';
}


function toNewWindow(URL,w,h,t,l,n)
{
	
window.open(URL,n,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+w+", height="+h+", left="+l+", top="+t+"");	
}

var popup=null;
function image_popup(myimage,w,h,title)
{
html = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" +
		"\"http://www.w3.org/TR/html4/loose.dtd\">" +
 		"<HTML><HEAD><TITLE>" + title + " - Stolars, Prievidza</TITLE>" +
		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" +
		"</HEAD><BODY style=\"margin:0px;padding:0px;\">" +
		"<div class=\"image\" style=\"width:"+w+"px; height:"+h+"px;\"><img src='" + myimage + "' width='"+w+"' height='"+h+"' border='0' onclick=\"javascript:window.close()\" onmouseover=\"this.style.cursor='pointer';\">" +
		"</div></BODY></HTML>";
		
		 LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		 TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		 //h = 30;
		// w = 30;
		 settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,noresizable';
		 
		 if(!popup || popup.closed)	
		 	//open new popup
		 	popup=window.open('','',settings);
		 popup.document.open();
		 popup.document.write(html);
		 popup.focus();
		 popup.document.close();
		 
		 return false;
}