
arrNavs = new Array();


arrNavs[0] = 'training';

training_on = new Image(); training_off = new Image(); training_over = new Image();
training_on.src = "/_shared/_images/nav/en/training.png";
training_over.src = "/_shared/_images/nav/en/training.png";
training_off.src = "/_shared/_images/nav/en/training.png";


arrNavs[0] = 'communication';

communication_on = new Image(); communication_off = new Image(); communication_over = new Image();
communication_on.src = "/_shared/_images/nav/en/communication.png";
communication_over.src = "/_shared/_images/nav/en/communication.png";
communication_off.src = "/_shared/_images/nav/en/communication.png";


arrNavs[0] = 'company';

company_on = new Image(); company_off = new Image(); company_over = new Image();
company_on.src = "/_shared/_images/nav/en/company.png";
company_over.src = "/_shared/_images/nav/en/company.png";
company_off.src = "/_shared/_images/nav/en/company.png";


activeNav = 'global.js.php?section=training&lang=en&key=551';

/* function for changing main nav images */

function navOver(name,over) {
	
	if (activeNav == name) {
		document["navImg"+name].src = (over == 1) ? eval(name+"_over.src") : eval(name+"_on.src");
	} else {
		document["navImg"+name].src = (over == 1) ? eval(name+"_over.src") : eval(name+"_off.src");
	}
	
	if (document.getElementById("navDiv"+name)) document.getElementById("navDiv"+name).style.visibility = (over == 1) ? 'visible' : 'hidden';
	/* if (document.getElementById("navDiv"+name)) document.getElementById("navDiv"+name).style.display = (over == 1) ? 'block' : 'none'; */
}

function closeAllNavs() {
	for (i = 0; i < arrNavs.length; i++) {
		navOver(arrNavs[i],0);
	}
}

/* function for relocating */

function goTo(location) {
	// if (location.indexOf('http') != -1) {
	//	window.open(location,'SafetyNewsOnline');
	//} else {
		top.location.href = location;
	//}
}
