var popSe = document.getElementById("popSe")
var popPs = document.getElementById("popPs")
var popIn = document.getElementById("popIn")

function Search()
{
	document.location.href="http://www.hermes-softlab.si/search/search.asp?search=" + escape(document.getElementById("search").value);
}


function hideAll()
{
	popSe.style.display = "none";
	popPs.style.display = "none";
	popIn.style.display = "none";		
}

function popUp(elm)
{
	hideAll()
	pos = document.getElementById(elm).offsetLeft
	posY = document.getElementById("navContainer").offsetTop + document.getElementById("navContainer").offsetHeight
	document.getElementById("pop" + elm).style.left = pos + "px";
	document.getElementById("pop" + elm).style.top = posY + "px";
	document.getElementById("pop" + elm).style.display = "block";
}

function goToPage()
{
  var sel = document.getElementById("language").selectedIndex

  if (sel=="0")
  {
    location.href ='http://www.hermes-softlab.com';
  }
    if (sel=="1")
  {
    location.href = 'http://www.hermes-softlab.de';
  }  
  if (sel=="2")
  {
    location.href = 'http://www.hermes-softlab.ba';
  }
  if (sel=="3")
  {
    location.href = 'http://www.hermes-softlab.de';
  }
  if (sel=="4")
  {
    location.href = 'http://www.hermes-softlab.ie';
  }   
  if (sel=="6")
  {
    location.href ='http://www.comtrade.com/serbia/';
  }
  if (sel=="7")
  {
    location.href = 'http://www.comtrade.com/';
  }
  if (sel=="8")
  {
    location.href = 'http://www.comtradegroup.com';
  }  
}

function contains(parent,child)
{
	if (parent==child) return true;
	var t = child;
	if (t && t.parentNode)
	{
		if (t.parentNode == parent)
		return true;
	else
		return contains(parent,t.parentNode);
	} 
	return false;
}

function onMouseOutHandler(div,e)
{
	var e = e || event;
	var relatedTarget = e.relatedTarget || e.toElement;
	if (contains(div,relatedTarget)){
		return;
	}
	hideAll();
}


<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->
var interval = 10; // delay between rotating images (in seconds)
var random_display = 0; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/banner/E-zavarovanje-06.gif");
image_list[image_index++] = new imageItem("images/banner/DSI-06.gif");
var number_of_image = image_list.length;

function imageItem(image_location) 
{
  this.image_item = new Image();
  this.image_item.src = image_location;
}

function get_ImageItemLocation(imageObj) 
{
  return(imageObj.image_item.src)
}

function generate(x, y) 
{
  var range = y - x + 1;
  return Math.floor(Math.random() * range) + x;
}

function getNextImage() 
{
  if (random_display) 
  {
    image_index = generate(0, number_of_image-1);
  }
  else 
  {
    image_index = (image_index+1) % number_of_image;
  }
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}

function rotateImage(place) 
{
  var new_image = getNextImage();
  document[place].src = new_image;

  stringythingy = new String(new_image)

  if (stringythingy.indexOf("E-zavarovanje-06.gif")>0)
  {
    document.getElementById('rLink').href = "news/events_1.html";
  }
  
  if (stringythingy.indexOf("DSI-06.gif")>0)
  {
    document.getElementById('rLink').href = "news/events_2.html";
  }
  var recur_call = "rotateImage('"+place+"')";
  setTimeout(recur_call, interval);
}

function appendShareAndBookmark()
{
 document.write('<a class="a2a_dd" href="http://www.addtoany.com/share_save?linkname='+escape(document.title)+'&amp;linkurl='+escape(location.href)+'"><img border="0" src="http://www.hermes-softlab.si/images/elements/Bookmarks_01.jpg" hspace="0" alt="" width="22" height="22">Objavite na spletu</a>');
}
function showAndHideCallUs()
{
if (document.getElementById('call_us').style.display=='table-row')
	document.getElementById('call_us').style.display='none'
else
	document.getElementById('call_us').style.display='table-row'
}