ns6 = (document.getElementById&&!document.all)?true:false;

function nocontextmenu() { 
	if (!ns6) {
		event.cancelBubble = true; 
		event.returnValue = false; return false; 
	}
} 
document.oncontextmenu = nocontextmenu; 

document.onselectstart=new Function ("return false");





function init() {
	isInit = true;
}



plusX = Array( 0, 2, -69, -69, 2);
plusY = Array( 0, -44, -44, -9, -9);

//IE only
var here = new Array(Object);
var new_undefined;

function hn(firma) {
if (isInit) {
if (parent.map.pocet >= 0 && parent.map.pocet != typeof(new_undefined)) {
	//IE only
	for (i=1; i<=4; i++) {
		if (!ns6) here[i] = eval("parent.map.here"+i+"Div.style"); else here[i] = parent.map.document.getElementById("here"+i+"Div").style;
	}
	cislo = parseInt(parent.map.pocetMiest)+parseInt(firma);
	if (parent.map.pocet >= cislo) {
		if (!ns6) firm = eval("parent.map.obj"+cislo+".style"); else firm = parent.map.document.getElementById("obj"+cislo).style;
		if (!ns6) ikona = eval("parent.map.document.all.im"+cislo); else ikona = parent.map.document.getElementById("im"+cislo);

		stredX = parseInt((parent.map.pWidth*parent.map.rozmerX)/2);
		stredY = parseInt((parent.map.pHeight*parent.map.rozmerY)/2);
		if ((parseInt(firm.left) < stredX)&&(parseInt(firm.top) >= stredY)) cislo = 1;
		if ((parseInt(firm.left) >= stredX)&&(parseInt(firm.top) >= stredY)) cislo = 2;
		if ((parseInt(firm.left) < stredX)&&(parseInt(firm.top) < stredY)) cislo = 4;
		if ((parseInt(firm.left) >= stredX)&&(parseInt(firm.top) < stredY)) cislo = 3;
	
		halfWidth  = parseInt(ikona.width);
		halfHeight = parseInt(ikona.height);
		if (halfWidth  == null) halfWidth  = 10;
		if (halfHeight == null) halfHeight = 10;
	
		if (ns6) halfHeight += 18;
		
		here[cislo].left = parseInt(firm.left) + parseInt(halfWidth  / 2)  + plusX[cislo] + "px";
		here[cislo].top  = parseInt(firm.top)  + parseInt(halfHeight / 2)  + plusY[cislo] + "px";
	
		here[cislo].visibility = "visible";
	}
}
}
}

function hf(firma) {
	if ((here.length>2)&&(isInit)&&(parent.map.pocet >= 0)) for (i=1; i<=4; i++) here[i].visibility = "hidden";
}

function lon(firma) {
	if (isInit) document.images["im"+firma].style.display = "";
}

function loff(firma) {
	if (isInit) document.images["im"+firma].style.display = "none";
}


parent.kamScroll = 0;
parent.kamSlide = 128 + 9;

parent.oldScroll = 0;
parent.oldSlide = 128 + 9;

ukazTo = false;
function HighLightOn(ktore) {	
	if (isInit && pocet>=ktore) {
		if (!ns6) objekt = eval("document.all.p"+ktore); else objekt = document.getElementById("p"+ktore);
		polozka = objekt.style;
		polozka.backgroundColor = highLightColor;
		if (ukazTo) { clearInterval(ukazTo); ukazTo = false; }
		if (!ukazTo) ukazTo = setInterval('window.scroll(0,objekt.offsetTop - 150);',500);
	}
}

function HighLightOff(ktore) {
	if (isInit && pocet>=ktore) {
		if (!ns6) objekt = eval("document.all.p"+ktore); else objekt = document.getElementById("p"+ktore);
		if (polozka) {
			polozka.backgroundColor = "";			
		}
		if (ukazTo) { clearInterval(ukazTo); ukazTo = false; }
	}
}


