var popSe = document.getElementById("popSe")
var popPs = document.getElementById("popPs")
var popPr = document.getElementById("popPr")
var popIn = document.getElementById("popIn")


function Search()
{
	document.location.href="http://www.hermes-softlab.com/search/search.asp?search=" + document.getElementById("search").value
}

function hideAll()
{
	popSe.style.display = "none";
	popPs.style.display = "none";
	popPr.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=="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=="5")
  {
    location.href ='http://www.hermes-softlab.si';
  }  
  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();
}
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.com/images/elements/Bookmarks_01.jpg" hspace="0" alt="Bookmark" width="22" height="22">Share &amp; Bookmark</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'
}
