//evost.org;core.js

// -- MENU
sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//menu preloaders
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

var preLoaded = false;
function init() {
	if(document.images) {
		menu_bg_bottom = newImage("../../images/style/main/menu_bg_bottom.gif");
		menu_bg_footer = newImage("../../images/style/main/menu_bg_footer.gif");
		menu_bg_footer_hover = newImage("../../images/style/main/menu_bg_footer_hover.gif");
		preLoaded = true;	
	}

}

// -- DEFAULT

function showPic (whichpic) { 
	if (document.getElementById) { 
		document.getElementById('holder').src = whichpic.href; 
		if (whichpic.title) { 
			document.getElementById('name').childNodes[0].nodeValue = whichpic.title; 
		} else { 
			document.getElementById('name').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; 
		} 
		return false; 
	} else { 
		return true; 
	} 
}
