function initPage()
{
	var nav = document.getElementById("navigation-navigation");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			// added by ae
			
			// hacks red images into active classed 
/*
			if (nodes[i].className.indexOf("active") != -1) {


				var images = nodes[i].getElementsByTagName("image");
				for (var z = 0; z < images.length; z++)
				{
					images[z].src.replace("0x5f584e","0xB5121B");
					images[z].reload();
				}
		
			}
*/
			// end ae
			
			nodes[i].onmouseover = function () 
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}

function setActiveNav(el) {
	if (el.parentNode.className.indexOf("active") != -1) {
		// if this text is not yet red
		if (el.src.indexOf("0xB5121B") == -1) {
		// make it red
		el.src = '/sites/all/text/file.drawtext2.php?bgcolor=0xffffff&color=0xB5121B&size=' + (/our-expertise/.test(el.parentNode.href) ? '10' : '12') + '&text=' + "'" + el.alt + "'";
		}
	}
} 

function setHoverNav(el) {
		// make text red
		el.src = '/sites/all/text/file.drawtext2.php?bgcolor=0xffffff&color=0xB5121B&size=' + (/our-expertise/.test(el.parentNode.href) ? '10' : '12') + '&text=' + "'" + el.alt + "'";
} 

function setNormalNav(el) {
		// make text black
		el.src = '/sites/all/text/file.drawtext2.php?bgcolor=0xffffff&color=0x5f584e&size=' + (/our-expertise/.test(el.parentNode.href) ? '10' : '12') + '&text=' + "'" + el.alt + "'";
} 


if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage);


