

var RolloverWin
var HintWin

isIE  = document.all;
isNN  = !document.all && document.getElementById;
isN4  = document.layers;
document.onmousedown = InitWin;
var timerID = 0;


function InitWin(e){
	RolloverWin = isIE ? document.all.theLayer : document.getElementById("theLayer");  
}

function SetWinPos (X, Y) {
	if (isIE||isNN) {
		RolloverWin.style ["left"] = X + "px";
		RolloverWin.style ["top"] = Y + "px";
	}
	else if (isN4) {
		document.theLayer.left=X;
		document.theLayer.top=Y;
	}
}

function hideTheLayer(){
	if (isIE||isNN) RolloverWin.style ["visibility"] = "hidden";
	else if (isN4) document.theLayer ["visibility"] = "hide";
}

function showTheLayer(e, Title, Descr){
	var rInfo = document.getElementById("RolloverInfo");  
	var rTitle = document.getElementById("RolloverTitle");  

	hideTheHint()
	
	var xpos = e.getAttribute ("LayerX");
	var ypos = e.getAttribute ("LayerY");

	SetWinPos (xpos, ypos);
		
	rInfo.innerHTML = Descr;
	rTitle.innerHTML = Title;

	if (isIE||isNN) RolloverWin.style ["visibility"] = "visible";
	else if (isN4) document.theLayer ["visibility"] = "show";
}

function updateTheLayer(Title, Descr) {
	var rInfo = document.getElementById("RolloverInfo");  
	var rTitle = document.getElementById("RolloverTitle");  

	rTitle.innerHTML = Title;
	rInfo.innerHTML = Descr;
}




function SetHintWinPos (e) {
	var xpos = e.getAttribute ("LayerX");
	var ypos = e.getAttribute ("LayerY");
	
	if ((isIE||isNN) && HintWin) {
		HintWin.style ["left"] = xpos + "px";
		HintWin.style ["top"]  = ypos + "px";
	}
	else if (isN4) {
		document.theHint.left=X;
		document.theHint.top=Y;
	}
}

function hideTheHint(){
	if (isIE||isNN) HintWin.style ["visibility"] = "hidden";
	else if (isN4) document.theHint.visibility="hide";
}

function showTheHint(e, href, Title){
	SetHintWinPos (e);

	var hText = document.getElementById ("HintText");
	if (hText)
		hText.innerHTML = "<A onclick=\"" + href + "\">" + Title + "</A>";

	if (isIE||isNN) HintWin.style ["visibility"] = "visible";
	else if (isN4) document.theHint.visibility="show";
}




function OnMouseOverHotel (e, fname) {
	if(timerID) {
		clearTimeout(timerID);
	}

	e.src = fname;
	HintWin = document.getElementById("theHint");  
	
	showTheHint (e, e.getAttribute ("onclickText"), e.getAttribute ("Hint"))
}

function OnMouseOutHotel (e, fname) {
	e.src = fname;
	timerID = setTimeout("hideTheHint ()", 300);
}


function OnMouseOverCityGroup (e, fname) {
	HintWin = document.getElementById("theHint");  
	SetHintWinPos (e);
	e.src = fname;

	var hText = document.getElementById ("HintText");
	hText.innerHTML = e.getAttribute ("CityNames");

	if (isIE||isNN) HintWin.style ["visibility"] = "visible";
	else if (isN4) document.theHint.visibility="show";
}

function OnMouseOutCityGroup (e, fname) {
	e.src = fname;
	hideTheHint ();
}


