// Main menu 
jsHover = function() {
		var menu = document.getElementById("mainmenu");
		if (menu)
		{
				var hEls = menu.getElementsByTagName("li");

				for (var i = 0, len = hEls.length; i < len; i++) {
						hEls[i].onmouseover = function() {
								this.className += " jshover";
						}

						hEls[i].onmouseout = function() {
								this.className = this.className.replace(" jshover", "");
						}
				}
		}
}
if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);


// Big photo
var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera')  > -1);
var isIE = (!isOpera && ua.indexOf('msie') > -1);
 
function getDocumentHeight() {
		return Math.max(document.compatMode != 'CSS1Compat' ? document.body.scrollHeight : document.documentElement.scrollHeight, getViewportHeight());
}
 
function getViewportHeight() {
	  return ((document.compatMode || isIE) && !isOpera) ? (document.compatMode == 'CSS1Compat') ? document.documentElement.clientHeight : document.body.clientHeight : (document.parentWindow || document.defaultView).innerHeight;
}

function showPhoto() {
	document.getElementById('gall_main').style.height = getDocumentHeight() + 'px';
}