function branchRedirect() {
	if(document.getElementById("branchsList").options[document.getElementById("branchsList").selectedIndex].value == "none") {
		return;
	}
	window.location = document.getElementById("branchsList").options[document.getElementById("branchsList").selectedIndex].value;
	return;
}

function showAlt(altText) {
	document.getElementById("altText").innerHTML = altText;

	w_width = oCanvas.clientWidth ? oCanvas.clientWidth + oCanvas.scrollLeft : window.innerWidth + window.pageXOffset;
	w_height = window.innerHeight ? window.innerHeight + window.pageYOffset : oCanvas.clientHeight + oCanvas.scrollTop; 

	t_width = document.getElementById("altText").offsetWidth;
	t_height = document.getElementById("altText").offsetHeight;

	if (x + t_width > w_width) x = w_width - t_width;
	if (y + t_height > w_height) y = w_height - t_height;

	document.getElementById("altDiv").style.left = x;
	document.getElementById("altDiv").style.top = y;

	document.getElementById("altDiv").style.visibility = "visible";
}

function hideAlt() {
	document.getElementById("altText").innerHTML = "";
	document.getElementById("altDiv").style.visibility = "hidden";
}

var x = 0, y = 0; //координаты курсора мыши
var bClicked = false;

function getMouseCoords(e) {
        oCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];

        x = window.event ? event.clientX + oCanvas.scrollLeft : e.pageX;
        y = window.event ? event.clientY + oCanvas.scrollTop : e.pageY; 
}

document.onmousemove = getMouseCoords;

function showHideAlt(altText) {
	bClicked = !bClicked;
	if (bClicked) showAlt(altText); else hideAlt();
}