function MM_goToURL() { //v3.0
	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
var timerIdTop		= 0;
var timerIdRight	= 0;
var timerIdContent	= 0;
var timerIdHalf		= 0;
var countImagesTop		= 0;
var countImagesRight	= 0;
var countImagesContent	= 0;
var countImagesHalf		= 0;
function wladaRemoveElement(elemID) {
	var elem = document.getElementById(elemID);
	//elem.parentNode.removeChild(elem);
}
function startTimeTop()
{
	if(imagesTop.length > 0)
	{
		if(timerIdTop)
		{
			timerIdTop = 0;
		}
		var tDateTop = new Date();
		
		if(countImagesTop >= imagesTop.length)
		{
			countImagesTop = 0;
		}
		//if(tDateTop.getSeconds() % 1 == 0)
		//{
		
			if (document.getElementById("banner_top_img2") != null)
			{
				document.getElementById("banner_top_img2").src 		= imagesTop[countImagesTop];
				document.getElementById("banner_top_img2").alt 		= "banner_top";
				document.getElementById("banner_top_img2").parentNode.href = imagesHrefTop[countImagesTop];
			}
		//}
		countImagesTop++;
		
		timerIdTop = setTimeout("startTimeTop()", 5000);
	} else {
		// nema banera, ne prikazuj img okvir!!!
		// remove img element
		wladaRemoveElement("banner_top_img2");
	}
}
function startTimeRight()
{
	if(imagesRight.length > 0)
	{
		if(timerIdRight)
		{
			timerIdRight = 0;
		}
		var tDateRight = new Date();
		
		if(countImagesRight == imagesRight.length)
		{
			countImagesRight = 0;
		}
	//	if(tDate2.getSeconds() % 1 == 0)
	//	{
			if (document.getElementById("banner_right_img2") != null)
			{
				document.getElementById("banner_right_img2").src = imagesRight[countImagesRight];
				document.getElementById("banner_right_img2").alt = "banner_right";
				document.getElementById("banner_right_img2").parentNode.href = imagesHrefRight[countImagesRight];
			}
	//	}
		countImagesRight++;
		
		timerIdRight = setTimeout("startTimeRight()", 7000);
	} else {
		// nema banera, ne prikazuj img okvir!!!
		// remove img element
		wladaRemoveElement("banner_right_img2");
	}
}
function startTimeContent()
{
	if(imagesContent.length > 0)
	{
		if(timerIdContent)
		{
			timerIdContent = 0;
		}
		var tDateContent = new Date();
		
		if(countImagesContent == imagesContent.length)
		{
			countImagesContent = 0;
		}
	//	if(tDate2.getSeconds() % 1 == 0)
	//	{
			if (document.getElementById("banner_content_img2") != null)
			{
				document.getElementById("banner_content_img2").src = imagesContent[countImagesContent];
				document.getElementById("banner_content_img2").alt = "banner_content";
				document.getElementById("banner_content_img2").parentNode.href = imagesHrefContent[countImagesContent];
			}
	//	}
		countImagesContent++;
		
		timerIdContent = setTimeout("startTimeContent()", 4500);
	} else {
		// nema banera, ne prikazuj img okvir!!!
		// remove img element
		wladaRemoveElement("banner_content_img2");
	}
}
function startTimeHalf()
{
	if(imagesHalf.length > 0)
	{
		if(timerIdHalf)
		{
			timerIdHalf = 0;
		}
		var tDateHalf = new Date();
		
		if(countImagesHalf == imagesHalf.length)
		{
			countImagesHalf = 0;
		}
	//	if(tDate2.getSeconds() % 1 == 0)
	//	{
			if (document.getElementById("banner_half_img2") != null)
			{
				document.getElementById("banner_half_img2").src = imagesHalf[countImagesHalf];
				document.getElementById("banner_half_img2").alt = "banner_half";
				document.getElementById("banner_half_img2").parentNode.href = imagesHrefHalf[countImagesHalf];
			}
	//	}
		countImagesHalf++;
		
		timerIdHalf = setTimeout("startTimeHalf()", 3000);
	} else {
		// nema banera, ne prikazuj img okvir!!!
		// remove img element
		wladaRemoveElement("banner_half_img2");
	}
}



function loadAll() {
	//timerIdTop = setInterval("startTimeTop()", 5000);
	
	startTimeTop();
	startTimeRight();
	startTimeContent();
	startTimeHalf();
	
	
	
	// for other functionalities //

	// photoGallery();	// change.js - used to change 5 imgs every 5 sec - replaced with [startTimeTop()]

	//MM_CheckFlashVersion('8,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');
}
/*
function MM_goToURL() { //v3.0
	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
*/

function goToURL(myurl)
{
	window.location = myurl;
}

