 jsHover = function() {
    var hEls = document.getElementById("nav").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);

function popup_img(filename)
{
   var newImage = new Image();
   newImage.src = filename;
   newWin = window.open(filename,'win',
"width="+newImage.width+",height="+newImage.height+",resizable=no,scrollbars=no,status=no");
}

        function getCookie(name)
        {
            var arg = name + "=";
            startpos = document.cookie.indexOf(arg, 0);
            if (startpos == -1) return "";
            else startpos += arg.length;

            endpos = document.cookie.indexOf(';', startpos);
            if (endpos == -1) endpos = document.cookie.length;

            return document.cookie.substring(startpos, endpos);
        }
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/;";
}
function eraseCookie(name) {
	createCookie(name,"",-1);
}
function SwitchMenu(id) {
	var d = document.getElementById(id);
	var ar = document.getElementById('secMenuLayer').getElementsByTagName('ul');
	for (var i=0; i<ar.length; i++) {
		if (ar[i]) {
			ar[i].style.display = 'none';
		}
	}
	if (d) {
		d.style.display='block';
		createCookie('menu',id,1)
	}
}
function getMenu() {
	var id = getCookie('menu');
	SwitchMenu(id);

}