var nav = ["home", "services", "about", "careers", "contacts"];
var wrk = false; var d = 1;
var hel = null; var heh = false;

function init() {
	if (ini == '') ini = 'home';
	
	hel = document.getElementById("header");
	
	for (i=0;i<nav.length;i++) {
		var e = document.getElementById(nav[i]);
		e.onmouseover = hilite;
		if (nav[i] == ini) {
			e.className = 'mna';
			opend(ini);
		}
	}
}

function hilite() {	
	for (i=0;i<nav.length;i++) {
		document.getElementById(nav[i]).className = ((this.id == nav[i]) ? 'mna' : 'mnn');	
	}
	
	document.getElementById("content").onmouseover = function() {
		reinit();
		this.onmouseover = null;
	}
}

function reinit() {
	document.getElementById(ini).onmouseover();	
}

function opend(ee) {		
	switch (ee) {
		case "about":
			heh = true;
			document.getElementById("n_about").style["display"] = "block";
			document.getElementById("n_services").style["display"] = "none";
			break;
		case "services":
			heh = true;
			document.getElementById("n_about").style["display"] = "none";
			document.getElementById("n_services").style["display"] = "block";
			break;
	}
	
	//if (!wrk) anim8();
	
	hel.style['height'] = ((heh) ? 24 : 12) + "px";
}

/*
function anim8() {
	wrk = true;
	
	if ((d > 0 && heh < 24) || (d < 0 && heh > 12)) {
		setTimeout('anim8()', 50);		
		heh += d;
		hel.style["height"] = heh+"px";
	} else wrk = false;
}
*/

function noop() {
}