function showKart(mapname){
	var kart = document.getElementById('kart');
	kartX = findPosX(kart);
	kartY = findPosY(kart);
	document.getElementById('kart' + mapname).style.top = kartY - 208;
	document.getElementById('kart' + mapname).style.display = 'block';

        document.getElementById('kartinfo').style.top = kartY + 76;
        document.getElementById('kartinfo').style.left = kartX + 7;
        document.getElementById('kartinfo').style.display = 'block';
}


function hideKart(mapname){
	document.getElementById('kart' + mapname).style.display = 'none';
	document.getElementById('kartinfo').style.display = 'none';
}


function showMenu(catid){
	var elem = document.getElementById('cat_' + catid);
	posX = findPosX(elem);
	posY = findPosY(elem);
	document.getElementById('subcat_' + catid).style.left = posX;
	document.getElementById('subcat_' + catid).style.top = posY + 30;
	document.getElementById('subcat_' + catid).style.display = 'block';
}


function hideMenu(catid){
	document.getElementById('subcat_' + catid).style.display = 'none';
}

var actid;

function setmouseout(catid){
	actid=setTimeout('hideMenu('+catid+')', 1000);
}

function setmouseover(catid){
	clearTimeout(actid);
	showMenu(catid);
}


var origWidth, origHeight;

if (document.layers) {
  origWidth = window.innerWidth;
  origHeight = window.innerHeight;
  onresize = function() { if(innerWidth != origWidth || innerHeight != origHeight) location.reload(); }
}

else if (document.all) onresize = function() { window.location.reload();
}


function findPosX(obj)
{
var curleft = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
return curleft;
}


function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}



