window.onload = choosePic;
var adImages = new Array("images/blocks/new_index.gif","images/blocks/ton_uni.gif", "images/blocks/meister.gif", "images/blocks/rezgrad.gif", "images/blocks/akcija22.gif", "images/blocks/akcijaV10.gif", "images/blocks/akcijaV21.gif", "images/blocks/pAk34.gif.gif");
var coords1 = new Array("68,228,168,248","200,223,303,243");
var coords2 = new Array("68,461,168,480","200,469,303,491");
var href1 = new Array("?p=asortiman&s=b_lucko", "?p=asortiman&s=tondach", "?p=asortiman&s=erlus");
var href2 = new Array("?p=asortiman&s=jub", "?p=asortiman&s=unipor");
var width = new Array("500", "500", "500", "500", "500", "500", "500", "500");
var height = new Array("500", "500", "500", "500", "347", "347", "347", "347");
function rotate()
{
	thisAd++;
	if (thisAd == adImages.length)
	{
		thisAd = 0;
	}
	document.getElementById("jsIndex").src = adImages[thisAd];
	document.getElementById("jsIndex").width = width[thisAd];
	document.getElementById("jsIndex").height = height[thisAd];
	document.getElementById("area1").coords = coords1[thisAd];
	document.getElementById("area2").coords = coords2[thisAd];
	document.getElementById("area1").href = href1[thisAd];
	document.getElementById("area2").href = href2[thisAd];
	setTimeout("rotate()", 20000);
}
function choosePic()
{
	thisAd = Math.floor((Math.random() * adImages.length));
	document.getElementById("jsIndex").src = adImages[thisAd];
	document.getElementById("jsIndex").width = width[thisAd];
	document.getElementById("jsIndex").height = height[thisAd];
	document.getElementById("area1").coords = coords1[thisAd];
	document.getElementById("area2").coords = coords2[thisAd];
	document.getElementById("area1").href = href1[thisAd];
	document.getElementById("area2").href = href2[thisAd];
	rotate();
}
<!-- Browser Window Size and Position -->
<!--copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005 -->
<!-- you may copy these functions but please keep the copyright notice as well -->
function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;} function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;} function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;} function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;} function posRight() {return posLeft()+pageWidth();} function posBottom() {return posTop()+pageHeight();}

function myPopUp(){
var gradPop = new Array("images/blocks/graditelj1.jpg","images/blocks/graditelj2.jpg","images/blocks/graditelj3.jpg");
var gradHeight = new Array("341","266","376");
gRandom = Math.floor((Math.random() * gradPop.length));
Pop = window.open(gradPop[gRandom],'sumanWin','width=241,height='+gradHeight[gRandom]+',status=no,scrollbars=no,menubar=no,resizable=no,directories=no,toolbar=no,location=no');
moveWin();
}

function moveWin() {
<!-- Copyright 2002, Sandeep Gangadharan -->
<!-- For more free scripts go to "http://sivamdesign.com/scripts/" -->

mov1 = Math.floor((Math.random() * pageWidth()));
mov2 = Math.floor((Math.random() * pageHeight()));
Pop.moveTo(mov1,mov2);setTimeout("moveWin()", 5000);}

function showFlash()
{	
	document.getElementById("syFlash").style.visibility = "visible";
}